@voyant-travel/inventory-react 0.1.0

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 (564) hide show
  1. package/LICENSE +201 -0
  2. package/dist/admin/index.d.ts +91 -0
  3. package/dist/admin/index.d.ts.map +1 -0
  4. package/dist/admin/index.js +132 -0
  5. package/dist/admin/pages/product-detail-page.d.ts +18 -0
  6. package/dist/admin/pages/product-detail-page.d.ts.map +1 -0
  7. package/dist/admin/pages/product-detail-page.js +63 -0
  8. package/dist/admin/product-categories-host.d.ts +7 -0
  9. package/dist/admin/product-categories-host.d.ts.map +1 -0
  10. package/dist/admin/product-categories-host.js +11 -0
  11. package/dist/admin/product-detail-api.d.ts +22 -0
  12. package/dist/admin/product-detail-api.d.ts.map +1 -0
  13. package/dist/admin/product-detail-api.js +58 -0
  14. package/dist/admin/products-host.d.ts +11 -0
  15. package/dist/admin/products-host.d.ts.map +1 -0
  16. package/dist/admin/products-host.js +17 -0
  17. package/dist/admin/products-list-skeleton.d.ts +10 -0
  18. package/dist/admin/products-list-skeleton.d.ts.map +1 -0
  19. package/dist/admin/products-list-skeleton.js +23 -0
  20. package/dist/client.d.ts +16 -0
  21. package/dist/client.d.ts.map +1 -0
  22. package/dist/client.js +79 -0
  23. package/dist/components/option-unit-dialog.d.ts +11 -0
  24. package/dist/components/option-unit-dialog.d.ts.map +1 -0
  25. package/dist/components/option-unit-dialog.js +17 -0
  26. package/dist/components/option-unit-form.d.ts +17 -0
  27. package/dist/components/option-unit-form.d.ts.map +1 -0
  28. package/dist/components/option-unit-form.js +123 -0
  29. package/dist/components/product-action-ledger-card.d.ts +17 -0
  30. package/dist/components/product-action-ledger-card.d.ts.map +1 -0
  31. package/dist/components/product-action-ledger-card.js +73 -0
  32. package/dist/components/product-catalog-card.d.ts +14 -0
  33. package/dist/components/product-catalog-card.d.ts.map +1 -0
  34. package/dist/components/product-catalog-card.js +44 -0
  35. package/dist/components/product-categories-page.d.ts +7 -0
  36. package/dist/components/product-categories-page.d.ts.map +1 -0
  37. package/dist/components/product-categories-page.js +9 -0
  38. package/dist/components/product-category-combobox.d.ts +10 -0
  39. package/dist/components/product-category-combobox.d.ts.map +1 -0
  40. package/dist/components/product-category-combobox.js +47 -0
  41. package/dist/components/product-category-dialog.d.ts +9 -0
  42. package/dist/components/product-category-dialog.d.ts.map +1 -0
  43. package/dist/components/product-category-dialog.js +17 -0
  44. package/dist/components/product-category-form.d.ts +15 -0
  45. package/dist/components/product-category-form.d.ts.map +1 -0
  46. package/dist/components/product-category-form.js +82 -0
  47. package/dist/components/product-category-list.d.ts +5 -0
  48. package/dist/components/product-category-list.d.ts.map +1 -0
  49. package/dist/components/product-category-list.js +48 -0
  50. package/dist/components/product-combobox.d.ts +13 -0
  51. package/dist/components/product-combobox.d.ts.map +1 -0
  52. package/dist/components/product-combobox.js +23 -0
  53. package/dist/components/product-contract-template-combobox.d.ts +9 -0
  54. package/dist/components/product-contract-template-combobox.d.ts.map +1 -0
  55. package/dist/components/product-contract-template-combobox.js +97 -0
  56. package/dist/components/product-day-dialog.d.ts +20 -0
  57. package/dist/components/product-day-dialog.d.ts.map +1 -0
  58. package/dist/components/product-day-dialog.js +20 -0
  59. package/dist/components/product-day-form.d.ts +19 -0
  60. package/dist/components/product-day-form.d.ts.map +1 -0
  61. package/dist/components/product-day-form.js +77 -0
  62. package/dist/components/product-day-media-tray.d.ts +11 -0
  63. package/dist/components/product-day-media-tray.d.ts.map +1 -0
  64. package/dist/components/product-day-media-tray.js +74 -0
  65. package/dist/components/product-day-service-dialog.d.ts +14 -0
  66. package/dist/components/product-day-service-dialog.d.ts.map +1 -0
  67. package/dist/components/product-day-service-dialog.js +19 -0
  68. package/dist/components/product-day-service-form.d.ts +44 -0
  69. package/dist/components/product-day-service-form.d.ts.map +1 -0
  70. package/dist/components/product-day-service-form.js +152 -0
  71. package/dist/components/product-detail/commerce-client.d.ts +314 -0
  72. package/dist/components/product-detail/commerce-client.d.ts.map +1 -0
  73. package/dist/components/product-detail/commerce-client.js +261 -0
  74. package/dist/components/product-detail/host.d.ts +54 -0
  75. package/dist/components/product-detail/host.d.ts.map +1 -0
  76. package/dist/components/product-detail/host.js +27 -0
  77. package/dist/components/product-detail/index.d.ts +6 -0
  78. package/dist/components/product-detail/index.d.ts.map +1 -0
  79. package/dist/components/product-detail/index.js +5 -0
  80. package/dist/components/product-detail/product-activity-section.d.ts +4 -0
  81. package/dist/components/product-detail/product-activity-section.d.ts.map +1 -0
  82. package/dist/components/product-detail/product-activity-section.js +37 -0
  83. package/dist/components/product-detail/product-day-sheet.d.ts +14 -0
  84. package/dist/components/product-detail/product-day-sheet.d.ts.map +1 -0
  85. package/dist/components/product-detail/product-day-sheet.js +75 -0
  86. package/dist/components/product-detail/product-day-translation.d.ts +41 -0
  87. package/dist/components/product-detail/product-day-translation.d.ts.map +1 -0
  88. package/dist/components/product-detail/product-day-translation.js +111 -0
  89. package/dist/components/product-detail/product-departure-dialog.d.ts +11 -0
  90. package/dist/components/product-detail/product-departure-dialog.d.ts.map +1 -0
  91. package/dist/components/product-detail/product-departure-dialog.js +10 -0
  92. package/dist/components/product-detail/product-departure-form.d.ts +25 -0
  93. package/dist/components/product-detail/product-departure-form.d.ts.map +1 -0
  94. package/dist/components/product-detail/product-departure-form.js +241 -0
  95. package/dist/components/product-detail/product-departure-pricing-override-dialog.d.ts +8 -0
  96. package/dist/components/product-detail/product-departure-pricing-override-dialog.d.ts.map +1 -0
  97. package/dist/components/product-detail/product-departure-pricing-override-dialog.js +126 -0
  98. package/dist/components/product-detail/product-detail-availability-sections.d.ts +19 -0
  99. package/dist/components/product-detail/product-detail-availability-sections.d.ts.map +1 -0
  100. package/dist/components/product-detail/product-detail-availability-sections.js +29 -0
  101. package/dist/components/product-detail/product-detail-channel-section.d.ts +8 -0
  102. package/dist/components/product-detail/product-detail-channel-section.d.ts.map +1 -0
  103. package/dist/components/product-detail/product-detail-channel-section.js +16 -0
  104. package/dist/components/product-detail/product-detail-day-row.d.ts +14 -0
  105. package/dist/components/product-detail/product-detail-day-row.d.ts.map +1 -0
  106. package/dist/components/product-detail/product-detail-day-row.js +43 -0
  107. package/dist/components/product-detail/product-detail-dialog.d.ts +10 -0
  108. package/dist/components/product-detail/product-detail-dialog.d.ts.map +1 -0
  109. package/dist/components/product-detail/product-detail-dialog.js +10 -0
  110. package/dist/components/product-detail/product-detail-form.d.ts +22 -0
  111. package/dist/components/product-detail/product-detail-form.d.ts.map +1 -0
  112. package/dist/components/product-detail/product-detail-form.js +205 -0
  113. package/dist/components/product-detail/product-detail-header.d.ts +12 -0
  114. package/dist/components/product-detail/product-detail-header.d.ts.map +1 -0
  115. package/dist/components/product-detail/product-detail-header.js +19 -0
  116. package/dist/components/product-detail/product-detail-itinerary-section.d.ts +4 -0
  117. package/dist/components/product-detail/product-detail-itinerary-section.d.ts.map +1 -0
  118. package/dist/components/product-detail/product-detail-itinerary-section.js +201 -0
  119. package/dist/components/product-detail/product-detail-media-sections.d.ts +15 -0
  120. package/dist/components/product-detail/product-detail-media-sections.d.ts.map +1 -0
  121. package/dist/components/product-detail/product-detail-media-sections.js +19 -0
  122. package/dist/components/product-detail/product-detail-organize-section.d.ts +6 -0
  123. package/dist/components/product-detail/product-detail-organize-section.d.ts.map +1 -0
  124. package/dist/components/product-detail/product-detail-organize-section.js +18 -0
  125. package/dist/components/product-detail/product-detail-page.d.ts +4 -0
  126. package/dist/components/product-detail/product-detail-page.d.ts.map +1 -0
  127. package/dist/components/product-detail/product-detail-page.js +95 -0
  128. package/dist/components/product-detail/product-detail-section-shell.d.ts +19 -0
  129. package/dist/components/product-detail/product-detail-section-shell.d.ts.map +1 -0
  130. package/dist/components/product-detail/product-detail-section-shell.js +23 -0
  131. package/dist/components/product-detail/product-detail-sections.d.ts +7 -0
  132. package/dist/components/product-detail/product-detail-sections.d.ts.map +1 -0
  133. package/dist/components/product-detail/product-detail-sections.js +6 -0
  134. package/dist/components/product-detail/product-detail-shared.d.ts +264 -0
  135. package/dist/components/product-detail/product-detail-shared.d.ts.map +1 -0
  136. package/dist/components/product-detail/product-detail-shared.js +157 -0
  137. package/dist/components/product-detail/product-detail-skeleton.d.ts +9 -0
  138. package/dist/components/product-detail/product-detail-skeleton.d.ts.map +1 -0
  139. package/dist/components/product-detail/product-detail-skeleton.js +53 -0
  140. package/dist/components/product-detail/product-detail-summary-section.d.ts +6 -0
  141. package/dist/components/product-detail/product-detail-summary-section.d.ts.map +1 -0
  142. package/dist/components/product-detail/product-detail-summary-section.js +66 -0
  143. package/dist/components/product-detail/product-extra-dialog.d.ts +21 -0
  144. package/dist/components/product-detail/product-extra-dialog.d.ts.map +1 -0
  145. package/dist/components/product-detail/product-extra-dialog.js +131 -0
  146. package/dist/components/product-detail/product-itinerary-form.d.ts +16 -0
  147. package/dist/components/product-detail/product-itinerary-form.d.ts.map +1 -0
  148. package/dist/components/product-detail/product-itinerary-form.js +38 -0
  149. package/dist/components/product-detail/product-market-rules-section.d.ts +6 -0
  150. package/dist/components/product-detail/product-market-rules-section.d.ts.map +1 -0
  151. package/dist/components/product-detail/product-market-rules-section.js +81 -0
  152. package/dist/components/product-detail/product-media-gallery.d.ts +19 -0
  153. package/dist/components/product-detail/product-media-gallery.d.ts.map +1 -0
  154. package/dist/components/product-detail/product-media-gallery.js +114 -0
  155. package/dist/components/product-detail/product-option-price-rule-dialog.d.ts +12 -0
  156. package/dist/components/product-detail/product-option-price-rule-dialog.d.ts.map +1 -0
  157. package/dist/components/product-detail/product-option-price-rule-dialog.js +10 -0
  158. package/dist/components/product-detail/product-option-price-rule-form.d.ts +29 -0
  159. package/dist/components/product-detail/product-option-price-rule-form.d.ts.map +1 -0
  160. package/dist/components/product-detail/product-option-price-rule-form.js +122 -0
  161. package/dist/components/product-detail/product-option-pricing-grid.d.ts +16 -0
  162. package/dist/components/product-detail/product-option-pricing-grid.d.ts.map +1 -0
  163. package/dist/components/product-detail/product-option-pricing-grid.js +236 -0
  164. package/dist/components/product-detail/product-options-extra-price-rules.d.ts +8 -0
  165. package/dist/components/product-detail/product-options-extra-price-rules.d.ts.map +1 -0
  166. package/dist/components/product-detail/product-options-extra-price-rules.js +123 -0
  167. package/dist/components/product-detail/product-options-pricing-helpers.d.ts +14 -0
  168. package/dist/components/product-detail/product-options-pricing-helpers.d.ts.map +1 -0
  169. package/dist/components/product-detail/product-options-pricing-helpers.js +49 -0
  170. package/dist/components/product-detail/product-options-pricing-panel.d.ts +17 -0
  171. package/dist/components/product-detail/product-options-pricing-panel.d.ts.map +1 -0
  172. package/dist/components/product-detail/product-options-pricing-panel.js +88 -0
  173. package/dist/components/product-detail/product-options-pricing.d.ts +5 -0
  174. package/dist/components/product-detail/product-options-pricing.d.ts.map +1 -0
  175. package/dist/components/product-detail/product-options-pricing.js +4 -0
  176. package/dist/components/product-detail/product-options-shared.d.ts +236 -0
  177. package/dist/components/product-detail/product-options-shared.d.ts.map +1 -0
  178. package/dist/components/product-detail/product-options-shared.js +57 -0
  179. package/dist/components/product-detail/product-options-traveler-category-dialog.d.ts +12 -0
  180. package/dist/components/product-detail/product-options-traveler-category-dialog.d.ts.map +1 -0
  181. package/dist/components/product-detail/product-options-traveler-category-dialog.js +132 -0
  182. package/dist/components/product-detail/product-options-unit-price-matrix.d.ts +10 -0
  183. package/dist/components/product-detail/product-options-unit-price-matrix.d.ts.map +1 -0
  184. package/dist/components/product-detail/product-options-unit-price-matrix.js +103 -0
  185. package/dist/components/product-detail/product-payment-policy-section.d.ts +17 -0
  186. package/dist/components/product-detail/product-payment-policy-section.d.ts.map +1 -0
  187. package/dist/components/product-detail/product-payment-policy-section.js +58 -0
  188. package/dist/components/product-detail/product-schedule-dialog.d.ts +11 -0
  189. package/dist/components/product-detail/product-schedule-dialog.d.ts.map +1 -0
  190. package/dist/components/product-detail/product-schedule-dialog.js +10 -0
  191. package/dist/components/product-detail/product-schedule-form.d.ts +17 -0
  192. package/dist/components/product-detail/product-schedule-form.d.ts.map +1 -0
  193. package/dist/components/product-detail/product-schedule-form.js +223 -0
  194. package/dist/components/product-detail/product-service-dialog.d.ts +12 -0
  195. package/dist/components/product-detail/product-service-dialog.d.ts.map +1 -0
  196. package/dist/components/product-detail/product-service-dialog.js +10 -0
  197. package/dist/components/product-detail/product-service-form.d.ts +22 -0
  198. package/dist/components/product-detail/product-service-form.d.ts.map +1 -0
  199. package/dist/components/product-detail/product-service-form.js +154 -0
  200. package/dist/components/product-detail/product-translation-popover.d.ts +94 -0
  201. package/dist/components/product-detail/product-translation-popover.d.ts.map +1 -0
  202. package/dist/components/product-detail/product-translation-popover.js +238 -0
  203. package/dist/components/product-detail/product-unit-dialog.d.ts +14 -0
  204. package/dist/components/product-detail/product-unit-dialog.d.ts.map +1 -0
  205. package/dist/components/product-detail/product-unit-dialog.js +10 -0
  206. package/dist/components/product-detail/product-unit-form.d.ts +34 -0
  207. package/dist/components/product-detail/product-unit-form.d.ts.map +1 -0
  208. package/dist/components/product-detail/product-unit-form.js +139 -0
  209. package/dist/components/product-detail/product-unit-price-rule-dialog.d.ts +17 -0
  210. package/dist/components/product-detail/product-unit-price-rule-dialog.d.ts.map +1 -0
  211. package/dist/components/product-detail/product-unit-price-rule-dialog.js +10 -0
  212. package/dist/components/product-detail/product-unit-price-rule-form.d.ts +29 -0
  213. package/dist/components/product-detail/product-unit-price-rule-form.d.ts.map +1 -0
  214. package/dist/components/product-detail/product-unit-price-rule-form.js +144 -0
  215. package/dist/components/product-detail/rrule-labels.d.ts +2 -0
  216. package/dist/components/product-detail/rrule-labels.d.ts.map +1 -0
  217. package/dist/components/product-detail/rrule-labels.js +65 -0
  218. package/dist/components/product-detail/timezone-options.d.ts +9 -0
  219. package/dist/components/product-detail/timezone-options.d.ts.map +1 -0
  220. package/dist/components/product-detail/timezone-options.js +28 -0
  221. package/dist/components/product-detail/use-product-detail-data.d.ts +41 -0
  222. package/dist/components/product-detail/use-product-detail-data.d.ts.map +1 -0
  223. package/dist/components/product-detail/use-product-detail-data.js +143 -0
  224. package/dist/components/product-detail/use-product-detail-dialogs.d.ts +24 -0
  225. package/dist/components/product-detail/use-product-detail-dialogs.d.ts.map +1 -0
  226. package/dist/components/product-detail/use-product-detail-dialogs.js +40 -0
  227. package/dist/components/product-detail/zod-resolver.d.ts +4 -0
  228. package/dist/components/product-detail/zod-resolver.d.ts.map +1 -0
  229. package/dist/components/product-detail/zod-resolver.js +39 -0
  230. package/dist/components/product-detail-page.d.ts +57 -0
  231. package/dist/components/product-detail-page.d.ts.map +1 -0
  232. package/dist/components/product-detail-page.js +118 -0
  233. package/dist/components/product-detail.d.ts +2 -0
  234. package/dist/components/product-detail.d.ts.map +1 -0
  235. package/dist/components/product-detail.js +1 -0
  236. package/dist/components/product-dialog.d.ts +9 -0
  237. package/dist/components/product-dialog.d.ts.map +1 -0
  238. package/dist/components/product-dialog.js +13 -0
  239. package/dist/components/product-facility-combobox.d.ts +9 -0
  240. package/dist/components/product-facility-combobox.d.ts.map +1 -0
  241. package/dist/components/product-facility-combobox.js +94 -0
  242. package/dist/components/product-form.d.ts +14 -0
  243. package/dist/components/product-form.d.ts.map +1 -0
  244. package/dist/components/product-form.js +191 -0
  245. package/dist/components/product-itinerary-day-row.d.ts +22 -0
  246. package/dist/components/product-itinerary-day-row.d.ts.map +1 -0
  247. package/dist/components/product-itinerary-day-row.js +17 -0
  248. package/dist/components/product-itinerary-dialog.d.ts +16 -0
  249. package/dist/components/product-itinerary-dialog.d.ts.map +1 -0
  250. package/dist/components/product-itinerary-dialog.js +85 -0
  251. package/dist/components/product-itinerary-section.d.ts +16 -0
  252. package/dist/components/product-itinerary-section.d.ts.map +1 -0
  253. package/dist/components/product-itinerary-section.js +105 -0
  254. package/dist/components/product-list.d.ts +7 -0
  255. package/dist/components/product-list.d.ts.map +1 -0
  256. package/dist/components/product-list.js +155 -0
  257. package/dist/components/product-media-dialog.d.ts +11 -0
  258. package/dist/components/product-media-dialog.d.ts.map +1 -0
  259. package/dist/components/product-media-dialog.js +17 -0
  260. package/dist/components/product-media-form.d.ts +17 -0
  261. package/dist/components/product-media-form.d.ts.map +1 -0
  262. package/dist/components/product-media-form.js +101 -0
  263. package/dist/components/product-media-lightbox.d.ts +7 -0
  264. package/dist/components/product-media-lightbox.d.ts.map +1 -0
  265. package/dist/components/product-media-lightbox.js +31 -0
  266. package/dist/components/product-media-section.d.ts +27 -0
  267. package/dist/components/product-media-section.d.ts.map +1 -0
  268. package/dist/components/product-media-section.js +130 -0
  269. package/dist/components/product-media-tile.d.ts +17 -0
  270. package/dist/components/product-media-tile.d.ts.map +1 -0
  271. package/dist/components/product-media-tile.js +16 -0
  272. package/dist/components/product-option-dialog.d.ts +11 -0
  273. package/dist/components/product-option-dialog.d.ts.map +1 -0
  274. package/dist/components/product-option-dialog.js +17 -0
  275. package/dist/components/product-option-form.d.ts +17 -0
  276. package/dist/components/product-option-form.d.ts.map +1 -0
  277. package/dist/components/product-option-form.js +91 -0
  278. package/dist/components/product-options-section.d.ts +13 -0
  279. package/dist/components/product-options-section.d.ts.map +1 -0
  280. package/dist/components/product-options-section.js +200 -0
  281. package/dist/components/product-quick-view-sheet.d.ts +23 -0
  282. package/dist/components/product-quick-view-sheet.d.ts.map +1 -0
  283. package/dist/components/product-quick-view-sheet.js +65 -0
  284. package/dist/components/product-tag-dialog.d.ts +9 -0
  285. package/dist/components/product-tag-dialog.d.ts.map +1 -0
  286. package/dist/components/product-tag-dialog.js +17 -0
  287. package/dist/components/product-tag-form.d.ts +15 -0
  288. package/dist/components/product-tag-form.d.ts.map +1 -0
  289. package/dist/components/product-tag-form.js +48 -0
  290. package/dist/components/product-tag-list.d.ts +5 -0
  291. package/dist/components/product-tag-list.d.ts.map +1 -0
  292. package/dist/components/product-tag-list.js +44 -0
  293. package/dist/components/product-tags-page.d.ts +7 -0
  294. package/dist/components/product-tags-page.d.ts.map +1 -0
  295. package/dist/components/product-tags-page.js +9 -0
  296. package/dist/components/product-tax-class-combobox.d.ts +9 -0
  297. package/dist/components/product-tax-class-combobox.d.ts.map +1 -0
  298. package/dist/components/product-tax-class-combobox.js +100 -0
  299. package/dist/components/product-translations-card.d.ts +7 -0
  300. package/dist/components/product-translations-card.d.ts.map +1 -0
  301. package/dist/components/product-translations-card.js +188 -0
  302. package/dist/components/product-type-combobox.d.ts +9 -0
  303. package/dist/components/product-type-combobox.d.ts.map +1 -0
  304. package/dist/components/product-type-combobox.js +48 -0
  305. package/dist/components/product-types-page.d.ts +6 -0
  306. package/dist/components/product-types-page.d.ts.map +1 -0
  307. package/dist/components/product-types-page.js +103 -0
  308. package/dist/components/product-version-dialog.d.ts +8 -0
  309. package/dist/components/product-version-dialog.d.ts.map +1 -0
  310. package/dist/components/product-version-dialog.js +39 -0
  311. package/dist/components/product-versions-section.d.ts +7 -0
  312. package/dist/components/product-versions-section.d.ts.map +1 -0
  313. package/dist/components/product-versions-section.js +19 -0
  314. package/dist/components/products-page.d.ts +8 -0
  315. package/dist/components/products-page.d.ts.map +1 -0
  316. package/dist/components/products-page.js +8 -0
  317. package/dist/extras/client.d.ts +14 -0
  318. package/dist/extras/client.d.ts.map +1 -0
  319. package/dist/extras/client.js +58 -0
  320. package/dist/extras/components/extra-catalog-card.d.ts +13 -0
  321. package/dist/extras/components/extra-catalog-card.d.ts.map +1 -0
  322. package/dist/extras/components/extra-catalog-card.js +52 -0
  323. package/dist/extras/components/product-combobox.d.ts +9 -0
  324. package/dist/extras/components/product-combobox.d.ts.map +1 -0
  325. package/dist/extras/components/product-combobox.js +46 -0
  326. package/dist/extras/hooks/index.d.ts +4 -0
  327. package/dist/extras/hooks/index.d.ts.map +1 -0
  328. package/dist/extras/hooks/index.js +3 -0
  329. package/dist/extras/hooks/use-product-extra-mutation.d.ts +70 -0
  330. package/dist/extras/hooks/use-product-extra-mutation.d.ts.map +1 -0
  331. package/dist/extras/hooks/use-product-extra-mutation.js +38 -0
  332. package/dist/extras/hooks/use-product-extra.d.ts +24 -0
  333. package/dist/extras/hooks/use-product-extra.d.ts.map +1 -0
  334. package/dist/extras/hooks/use-product-extra.js +12 -0
  335. package/dist/extras/hooks/use-product-extras.d.ts +30 -0
  336. package/dist/extras/hooks/use-product-extras.d.ts.map +1 -0
  337. package/dist/extras/hooks/use-product-extras.js +12 -0
  338. package/dist/extras/i18n/en.d.ts +52 -0
  339. package/dist/extras/i18n/en.d.ts.map +1 -0
  340. package/dist/extras/i18n/en.js +51 -0
  341. package/dist/extras/i18n/index.d.ts +5 -0
  342. package/dist/extras/i18n/index.d.ts.map +1 -0
  343. package/dist/extras/i18n/index.js +3 -0
  344. package/dist/extras/i18n/messages.d.ts +37 -0
  345. package/dist/extras/i18n/messages.d.ts.map +1 -0
  346. package/dist/extras/i18n/messages.js +1 -0
  347. package/dist/extras/i18n/provider.d.ts +126 -0
  348. package/dist/extras/i18n/provider.d.ts.map +1 -0
  349. package/dist/extras/i18n/provider.js +44 -0
  350. package/dist/extras/i18n/ro.d.ts +52 -0
  351. package/dist/extras/i18n/ro.d.ts.map +1 -0
  352. package/dist/extras/i18n/ro.js +51 -0
  353. package/dist/extras/index.d.ts +7 -0
  354. package/dist/extras/index.d.ts.map +1 -0
  355. package/dist/extras/index.js +6 -0
  356. package/dist/extras/provider.d.ts +2 -0
  357. package/dist/extras/provider.d.ts.map +1 -0
  358. package/dist/extras/provider.js +1 -0
  359. package/dist/extras/query-keys.d.ts +16 -0
  360. package/dist/extras/query-keys.d.ts.map +1 -0
  361. package/dist/extras/query-keys.js +8 -0
  362. package/dist/extras/query-options.d.ts +455 -0
  363. package/dist/extras/query-options.d.ts.map +1 -0
  364. package/dist/extras/query-options.js +44 -0
  365. package/dist/extras/schemas.d.ts +416 -0
  366. package/dist/extras/schemas.d.ts.map +1 -0
  367. package/dist/extras/schemas.js +89 -0
  368. package/dist/extras/ui.d.ts +3 -0
  369. package/dist/extras/ui.d.ts.map +1 -0
  370. package/dist/extras/ui.js +2 -0
  371. package/dist/extras-compat.d.ts +3 -0
  372. package/dist/extras-compat.d.ts.map +1 -0
  373. package/dist/extras-compat.js +1 -0
  374. package/dist/extras.d.ts +10 -0
  375. package/dist/extras.d.ts.map +1 -0
  376. package/dist/extras.js +9 -0
  377. package/dist/hooks/index.d.ts +36 -0
  378. package/dist/hooks/index.d.ts.map +1 -0
  379. package/dist/hooks/index.js +35 -0
  380. package/dist/hooks/use-duplicate-product-option-mutation.d.ts +19 -0
  381. package/dist/hooks/use-duplicate-product-option-mutation.d.ts.map +1 -0
  382. package/dist/hooks/use-duplicate-product-option-mutation.js +65 -0
  383. package/dist/hooks/use-option-unit-mutation.d.ts +60 -0
  384. package/dist/hooks/use-option-unit-mutation.d.ts.map +1 -0
  385. package/dist/hooks/use-option-unit-mutation.js +41 -0
  386. package/dist/hooks/use-option-unit.d.ts +21 -0
  387. package/dist/hooks/use-option-unit.d.ts.map +1 -0
  388. package/dist/hooks/use-option-unit.js +12 -0
  389. package/dist/hooks/use-option-units.d.ts +27 -0
  390. package/dist/hooks/use-option-units.d.ts.map +1 -0
  391. package/dist/hooks/use-option-units.js +12 -0
  392. package/dist/hooks/use-product-action-ledger.d.ts +48 -0
  393. package/dist/hooks/use-product-action-ledger.d.ts.map +1 -0
  394. package/dist/hooks/use-product-action-ledger.js +12 -0
  395. package/dist/hooks/use-product-categories.d.ts +32 -0
  396. package/dist/hooks/use-product-categories.d.ts.map +1 -0
  397. package/dist/hooks/use-product-categories.js +29 -0
  398. package/dist/hooks/use-product-category-mutation.d.ts +65 -0
  399. package/dist/hooks/use-product-category-mutation.d.ts.map +1 -0
  400. package/dist/hooks/use-product-category-mutation.js +39 -0
  401. package/dist/hooks/use-product-category.d.ts +26 -0
  402. package/dist/hooks/use-product-category.d.ts.map +1 -0
  403. package/dist/hooks/use-product-category.js +18 -0
  404. package/dist/hooks/use-product-day-mutation.d.ts +43 -0
  405. package/dist/hooks/use-product-day-mutation.d.ts.map +1 -0
  406. package/dist/hooks/use-product-day-mutation.js +54 -0
  407. package/dist/hooks/use-product-day-service-mutation.d.ts +66 -0
  408. package/dist/hooks/use-product-day-service-mutation.d.ts.map +1 -0
  409. package/dist/hooks/use-product-day-service-mutation.js +41 -0
  410. package/dist/hooks/use-product-day-services.d.ts +21 -0
  411. package/dist/hooks/use-product-day-services.d.ts.map +1 -0
  412. package/dist/hooks/use-product-day-services.js +12 -0
  413. package/dist/hooks/use-product-day-translation-mutation.d.ts +49 -0
  414. package/dist/hooks/use-product-day-translation-mutation.d.ts.map +1 -0
  415. package/dist/hooks/use-product-day-translation-mutation.js +38 -0
  416. package/dist/hooks/use-product-day-translations.d.ts +19 -0
  417. package/dist/hooks/use-product-day-translations.d.ts.map +1 -0
  418. package/dist/hooks/use-product-day-translations.js +20 -0
  419. package/dist/hooks/use-product-days.d.ts +16 -0
  420. package/dist/hooks/use-product-days.d.ts.map +1 -0
  421. package/dist/hooks/use-product-days.js +12 -0
  422. package/dist/hooks/use-product-itineraries.d.ts +15 -0
  423. package/dist/hooks/use-product-itineraries.d.ts.map +1 -0
  424. package/dist/hooks/use-product-itineraries.js +12 -0
  425. package/dist/hooks/use-product-itinerary-days.d.ts +16 -0
  426. package/dist/hooks/use-product-itinerary-days.d.ts.map +1 -0
  427. package/dist/hooks/use-product-itinerary-days.js +12 -0
  428. package/dist/hooks/use-product-itinerary-mutation.d.ts +54 -0
  429. package/dist/hooks/use-product-itinerary-mutation.d.ts.map +1 -0
  430. package/dist/hooks/use-product-itinerary-mutation.js +63 -0
  431. package/dist/hooks/use-product-media-mutation.d.ts +101 -0
  432. package/dist/hooks/use-product-media-mutation.d.ts.map +1 -0
  433. package/dist/hooks/use-product-media-mutation.js +69 -0
  434. package/dist/hooks/use-product-media.d.ts +26 -0
  435. package/dist/hooks/use-product-media.d.ts.map +1 -0
  436. package/dist/hooks/use-product-media.js +12 -0
  437. package/dist/hooks/use-product-mutation.d.ts +121 -0
  438. package/dist/hooks/use-product-mutation.d.ts.map +1 -0
  439. package/dist/hooks/use-product-mutation.js +44 -0
  440. package/dist/hooks/use-product-option-mutation.d.ts +49 -0
  441. package/dist/hooks/use-product-option-mutation.d.ts.map +1 -0
  442. package/dist/hooks/use-product-option-mutation.js +39 -0
  443. package/dist/hooks/use-product-option.d.ts +18 -0
  444. package/dist/hooks/use-product-option.d.ts.map +1 -0
  445. package/dist/hooks/use-product-option.js +12 -0
  446. package/dist/hooks/use-product-options.d.ts +24 -0
  447. package/dist/hooks/use-product-options.d.ts.map +1 -0
  448. package/dist/hooks/use-product-options.js +12 -0
  449. package/dist/hooks/use-product-tag-mutation.d.ts +25 -0
  450. package/dist/hooks/use-product-tag-mutation.d.ts.map +1 -0
  451. package/dist/hooks/use-product-tag-mutation.js +39 -0
  452. package/dist/hooks/use-product-tag.d.ts +10 -0
  453. package/dist/hooks/use-product-tag.d.ts.map +1 -0
  454. package/dist/hooks/use-product-tag.js +18 -0
  455. package/dist/hooks/use-product-tags.d.ts +16 -0
  456. package/dist/hooks/use-product-tags.d.ts.map +1 -0
  457. package/dist/hooks/use-product-tags.js +25 -0
  458. package/dist/hooks/use-product-translation-mutation.d.ts +52 -0
  459. package/dist/hooks/use-product-translation-mutation.d.ts.map +1 -0
  460. package/dist/hooks/use-product-translation-mutation.js +47 -0
  461. package/dist/hooks/use-product-translations.d.ts +28 -0
  462. package/dist/hooks/use-product-translations.d.ts.map +1 -0
  463. package/dist/hooks/use-product-translations.js +24 -0
  464. package/dist/hooks/use-product-type-mutation.d.ts +50 -0
  465. package/dist/hooks/use-product-type-mutation.d.ts.map +1 -0
  466. package/dist/hooks/use-product-type-mutation.js +47 -0
  467. package/dist/hooks/use-product-type.d.ts +15 -0
  468. package/dist/hooks/use-product-type.d.ts.map +1 -0
  469. package/dist/hooks/use-product-type.js +12 -0
  470. package/dist/hooks/use-product-types.d.ts +21 -0
  471. package/dist/hooks/use-product-types.d.ts.map +1 -0
  472. package/dist/hooks/use-product-types.js +9 -0
  473. package/dist/hooks/use-product-version-mutation.d.ts +16 -0
  474. package/dist/hooks/use-product-version-mutation.d.ts.map +1 -0
  475. package/dist/hooks/use-product-version-mutation.js +22 -0
  476. package/dist/hooks/use-product-versions.d.ts +15 -0
  477. package/dist/hooks/use-product-versions.d.ts.map +1 -0
  478. package/dist/hooks/use-product-versions.js +12 -0
  479. package/dist/hooks/use-product.d.ts +45 -0
  480. package/dist/hooks/use-product.d.ts.map +1 -0
  481. package/dist/hooks/use-product.js +23 -0
  482. package/dist/hooks/use-products.d.ts +51 -0
  483. package/dist/hooks/use-products.d.ts.map +1 -0
  484. package/dist/hooks/use-products.js +38 -0
  485. package/dist/i18n/en-catalog.d.ts +199 -0
  486. package/dist/i18n/en-catalog.d.ts.map +1 -0
  487. package/dist/i18n/en-catalog.js +198 -0
  488. package/dist/i18n/en-core.d.ts +323 -0
  489. package/dist/i18n/en-core.d.ts.map +1 -0
  490. package/dist/i18n/en-core.js +322 -0
  491. package/dist/i18n/en-operations.d.ts +287 -0
  492. package/dist/i18n/en-operations.d.ts.map +1 -0
  493. package/dist/i18n/en-operations.js +286 -0
  494. package/dist/i18n/en.d.ts +803 -0
  495. package/dist/i18n/en.d.ts.map +1 -0
  496. package/dist/i18n/en.js +8 -0
  497. package/dist/i18n/index.d.ts +5 -0
  498. package/dist/i18n/index.d.ts.map +1 -0
  499. package/dist/i18n/index.js +3 -0
  500. package/dist/i18n/message-shared.d.ts +6 -0
  501. package/dist/i18n/message-shared.d.ts.map +1 -0
  502. package/dist/i18n/message-shared.js +1 -0
  503. package/dist/i18n/messages-catalog.d.ts +199 -0
  504. package/dist/i18n/messages-catalog.d.ts.map +1 -0
  505. package/dist/i18n/messages-catalog.js +1 -0
  506. package/dist/i18n/messages-core.d.ts +304 -0
  507. package/dist/i18n/messages-core.d.ts.map +1 -0
  508. package/dist/i18n/messages-core.js +1 -0
  509. package/dist/i18n/messages-operations.d.ts +287 -0
  510. package/dist/i18n/messages-operations.d.ts.map +1 -0
  511. package/dist/i18n/messages-operations.js +1 -0
  512. package/dist/i18n/messages.d.ts +6 -0
  513. package/dist/i18n/messages.d.ts.map +1 -0
  514. package/dist/i18n/messages.js +1 -0
  515. package/dist/i18n/provider.d.ts +1628 -0
  516. package/dist/i18n/provider.d.ts.map +1 -0
  517. package/dist/i18n/provider.js +44 -0
  518. package/dist/i18n/ro-catalog.d.ts +199 -0
  519. package/dist/i18n/ro-catalog.d.ts.map +1 -0
  520. package/dist/i18n/ro-catalog.js +198 -0
  521. package/dist/i18n/ro-core.d.ts +323 -0
  522. package/dist/i18n/ro-core.d.ts.map +1 -0
  523. package/dist/i18n/ro-core.js +322 -0
  524. package/dist/i18n/ro-operations.d.ts +287 -0
  525. package/dist/i18n/ro-operations.d.ts.map +1 -0
  526. package/dist/i18n/ro-operations.js +286 -0
  527. package/dist/i18n/ro.d.ts +803 -0
  528. package/dist/i18n/ro.d.ts.map +1 -0
  529. package/dist/i18n/ro.js +8 -0
  530. package/dist/i18n-en.d.ts +2 -0
  531. package/dist/i18n-en.d.ts.map +1 -0
  532. package/dist/i18n-en.js +1 -0
  533. package/dist/i18n-ro.d.ts +2 -0
  534. package/dist/i18n-ro.d.ts.map +1 -0
  535. package/dist/i18n-ro.js +1 -0
  536. package/dist/i18n.d.ts +2 -0
  537. package/dist/i18n.d.ts.map +1 -0
  538. package/dist/i18n.js +1 -0
  539. package/dist/index.d.ts +9 -0
  540. package/dist/index.d.ts.map +1 -0
  541. package/dist/index.js +8 -0
  542. package/dist/operations.d.ts +53 -0
  543. package/dist/operations.d.ts.map +1 -0
  544. package/dist/operations.js +13 -0
  545. package/dist/provider.d.ts +2 -0
  546. package/dist/provider.d.ts.map +1 -0
  547. package/dist/provider.js +1 -0
  548. package/dist/query-keys.d.ts +114 -0
  549. package/dist/query-keys.d.ts.map +1 -0
  550. package/dist/query-keys.js +34 -0
  551. package/dist/query-options-action-ledger.d.ts +194 -0
  552. package/dist/query-options-action-ledger.d.ts.map +1 -0
  553. package/dist/query-options-action-ledger.js +20 -0
  554. package/dist/query-options.d.ts +1313 -0
  555. package/dist/query-options.d.ts.map +1 -0
  556. package/dist/query-options.js +281 -0
  557. package/dist/schemas.d.ts +1098 -0
  558. package/dist/schemas.d.ts.map +1 -0
  559. package/dist/schemas.js +320 -0
  560. package/dist/ui.d.ts +44 -0
  561. package/dist/ui.d.ts.map +1 -0
  562. package/dist/ui.js +42 -0
  563. package/package.json +159 -0
  564. package/src/styles.css +12 -0
@@ -0,0 +1,201 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useQueryClient } from "@tanstack/react-query";
3
+ import { formatMessage } from "@voyant-travel/i18n";
4
+ import { Badge, Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "@voyant-travel/ui/components";
5
+ import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "@voyant-travel/ui/components/alert-dialog";
6
+ import { Copy, MoreHorizontal, Pencil, Plus, Star, Trash2 } from "lucide-react";
7
+ import { useEffect, useMemo, useState } from "react";
8
+ import { productsQueryKeys, useProductDayMutation, useProductItineraries, useProductItineraryDays, useProductItineraryMutation, } from "../../index.js";
9
+ import { ProductItineraryDialog } from "../product-itinerary-dialog.js";
10
+ import { useProductDetailApi, useProductDetailMessages } from "./host.js";
11
+ import { ProductDaySheet } from "./product-day-sheet.js";
12
+ import { ProductDetailDayRow } from "./product-detail-day-row.js";
13
+ import { ActionMenu, EmptyState, Section } from "./product-detail-sections.js";
14
+ import { ServiceDialog } from "./product-service-dialog.js";
15
+ /**
16
+ * Storage-only upload handler for the day media tray. The tray does its
17
+ * own DB insert via `useProductMediaMutation.create` after this returns,
18
+ * so this handler must NOT call the products API — only the R2 upload
19
+ * endpoint — otherwise we'd write two media rows per file.
20
+ */
21
+ const uploadDayMediaToStorage = async (file) => {
22
+ const formData = new FormData();
23
+ formData.append("file", file);
24
+ const res = await fetch("/api/v1/uploads", {
25
+ method: "POST",
26
+ body: formData,
27
+ credentials: "include",
28
+ });
29
+ if (!res.ok)
30
+ throw new Error(`Upload failed (${res.status})`);
31
+ const upload = (await res.json());
32
+ const mediaType = upload.mimeType.startsWith("video/")
33
+ ? "video"
34
+ : upload.mimeType.startsWith("image/")
35
+ ? "image"
36
+ : "document";
37
+ return {
38
+ url: upload.url,
39
+ name: file.name,
40
+ storageKey: upload.key,
41
+ mimeType: upload.mimeType,
42
+ fileSize: upload.size,
43
+ mediaType,
44
+ };
45
+ };
46
+ export function ProductDetailItinerarySection({ productId }) {
47
+ const messages = useProductDetailMessages();
48
+ const api = useProductDetailApi();
49
+ const productMessages = messages.products.core;
50
+ const queryClient = useQueryClient();
51
+ const itineraryQuery = useProductItineraries(productId);
52
+ const itineraryMutation = useProductItineraryMutation();
53
+ const dayMutation = useProductDayMutation();
54
+ const productActionLedgerQueryKey = [...productsQueryKeys.product(productId), "action-ledger"];
55
+ const invalidateProductActionLedger = () => queryClient.invalidateQueries({ queryKey: productActionLedgerQueryKey });
56
+ const [expandedDayId, setExpandedDayId] = useState(null);
57
+ const [selectedItineraryId, setSelectedItineraryId] = useState(null);
58
+ const [dayDialogOpen, setDayDialogOpen] = useState(false);
59
+ const [editingDay, setEditingDay] = useState();
60
+ const [serviceDialogOpen, setServiceDialogOpen] = useState(false);
61
+ const [serviceDialogDayId, setServiceDialogDayId] = useState("");
62
+ const [editingService, setEditingService] = useState();
63
+ const [itineraryDialogOpen, setItineraryDialogOpen] = useState(false);
64
+ const [editingItinerary, setEditingItinerary] = useState();
65
+ const [deleteItineraryTarget, setDeleteItineraryTarget] = useState(null);
66
+ const itineraries = useMemo(() => itineraryQuery.data?.data ?? [], [itineraryQuery.data?.data]);
67
+ const hasMultiple = itineraries.length > 1;
68
+ useEffect(() => {
69
+ if (itineraries.length === 0) {
70
+ setSelectedItineraryId(null);
71
+ return;
72
+ }
73
+ setSelectedItineraryId((current) => {
74
+ if (current && itineraries.some((itinerary) => itinerary.id === current)) {
75
+ return current;
76
+ }
77
+ return itineraries.find((itinerary) => itinerary.isDefault)?.id ?? itineraries[0]?.id ?? null;
78
+ });
79
+ }, [itineraries]);
80
+ const selectedItinerary = useMemo(() => itineraries.find((itinerary) => itinerary.id === selectedItineraryId), [itineraries, selectedItineraryId]);
81
+ const daysQuery = useProductItineraryDays(productId, selectedItineraryId, {
82
+ enabled: Boolean(selectedItineraryId),
83
+ });
84
+ const days = useMemo(() => (daysQuery.data?.data ?? []).slice().sort((left, right) => left.dayNumber - right.dayNumber), [daysQuery.data?.data]);
85
+ const nextDayNumber = days.length > 0 ? Math.max(...days.map((day) => day.dayNumber)) + 1 : 1;
86
+ const openCreateItinerary = () => {
87
+ setEditingItinerary(undefined);
88
+ setItineraryDialogOpen(true);
89
+ };
90
+ const openRenameItinerary = (itinerary) => {
91
+ setEditingItinerary(itinerary);
92
+ setItineraryDialogOpen(true);
93
+ };
94
+ const handleSetDefault = async (itinerary) => {
95
+ if (itinerary.isDefault)
96
+ return;
97
+ await itineraryMutation.update.mutateAsync({
98
+ productId,
99
+ itineraryId: itinerary.id,
100
+ input: { isDefault: true },
101
+ });
102
+ void invalidateProductActionLedger();
103
+ };
104
+ const handleDuplicate = async (itinerary) => {
105
+ const result = await itineraryMutation.duplicate.mutateAsync({
106
+ productId,
107
+ itineraryId: itinerary.id,
108
+ });
109
+ setExpandedDayId(null);
110
+ setSelectedItineraryId(result.itinerary.id);
111
+ void invalidateProductActionLedger();
112
+ };
113
+ const handleConfirmDelete = async () => {
114
+ if (!deleteItineraryTarget)
115
+ return;
116
+ await itineraryMutation.remove.mutateAsync({
117
+ productId,
118
+ itineraryId: deleteItineraryTarget.id,
119
+ });
120
+ setDeleteItineraryTarget(null);
121
+ void invalidateProductActionLedger();
122
+ };
123
+ const sectionTitle = hasMultiple
124
+ ? productMessages.itinerariesTitle
125
+ : productMessages.itineraryTitle;
126
+ return (_jsxs(_Fragment, { children: [_jsx(Section, { title: sectionTitle, actions: _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs(Button, { size: "sm", disabled: !selectedItinerary, onClick: () => {
127
+ setEditingDay(undefined);
128
+ setDayDialogOpen(true);
129
+ }, children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), productMessages.addDay] }), _jsxs(ActionMenu, { children: [_jsxs(DropdownMenuItem, { onClick: openCreateItinerary, children: [_jsx(Plus, { className: "h-4 w-4" }), productMessages.newItinerary] }), selectedItinerary && !hasMultiple ? (_jsxs(_Fragment, { children: [_jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { onClick: () => openRenameItinerary(selectedItinerary), children: [_jsx(Pencil, { className: "h-4 w-4" }), productMessages.renameItinerary] }), _jsxs(DropdownMenuItem, { onClick: () => void handleDuplicate(selectedItinerary), children: [_jsx(Copy, { className: "h-4 w-4" }), productMessages.duplicateItinerary] })] })) : null] })] }), children: itineraryQuery.isPending ? (_jsx(EmptyState, { message: "\u2026" })) : itineraryQuery.isError ? (_jsx("p", { className: "py-6 text-center text-sm text-destructive", children: "Failed to load itineraries." })) : itineraries.length === 0 ? (_jsxs("div", { className: "flex flex-col items-start gap-3 rounded-md border border-dashed p-6", children: [_jsx("p", { className: "text-sm text-muted-foreground", children: productMessages.noItinerariesYet }), _jsxs(Button, { variant: "outline", size: "sm", onClick: openCreateItinerary, children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), productMessages.newItinerary] })] })) : (_jsxs("div", { className: "flex flex-col gap-4", children: [hasMultiple ? (_jsx("div", { className: "flex flex-wrap items-center gap-1 rounded-md border bg-muted/30 p-1", children: itineraries.map((itinerary) => {
130
+ const isSelected = itinerary.id === selectedItineraryId;
131
+ return (_jsxs("div", { className: `flex items-center gap-1 rounded-sm pl-2 pr-1 transition-colors ${isSelected ? "bg-background shadow-sm" : "hover:bg-background/60"}`, children: [_jsxs("button", { type: "button", onClick: () => {
132
+ setExpandedDayId(null);
133
+ setSelectedItineraryId(itinerary.id);
134
+ }, className: "flex items-center gap-2 py-1.5 text-sm", children: [_jsx("span", { className: isSelected ? "font-medium" : "text-muted-foreground", children: itinerary.name }), itinerary.isDefault ? (_jsx(Badge, { variant: "secondary", className: "h-5 px-1.5 text-[10px]", children: productMessages.defaultBadge })) : null] }), _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", "aria-label": formatMessage(productMessages.itineraryRowOptionsLabel, {
135
+ name: itinerary.name,
136
+ }), className: "h-6 w-6 text-muted-foreground", children: _jsx(MoreHorizontal, { className: "h-3.5 w-3.5" }) }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsxs(DropdownMenuItem, { onClick: () => openRenameItinerary(itinerary), children: [_jsx(Pencil, { className: "h-4 w-4" }), productMessages.renameItinerary] }), _jsxs(DropdownMenuItem, { onClick: () => void handleDuplicate(itinerary), children: [_jsx(Copy, { className: "h-4 w-4" }), productMessages.duplicateItinerary] }), _jsxs(DropdownMenuItem, { disabled: itinerary.isDefault, onClick: () => handleSetDefault(itinerary), children: [_jsx(Star, { className: "h-4 w-4" }), productMessages.setDefaultItinerary] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { variant: "destructive", disabled: itinerary.isDefault && itineraries.length > 1, onClick: () => setDeleteItineraryTarget(itinerary), children: [_jsx(Trash2, { className: "h-4 w-4" }), productMessages.deleteItinerary] })] })] })] }, itinerary.id));
137
+ }) })) : null, daysQuery.isPending ? (_jsx(EmptyState, { message: "\u2026" })) : daysQuery.isError ? (_jsx("p", { className: "py-6 text-center text-sm text-destructive", children: messages.products.operations.itineraries.daysLoadFailed })) : days.length === 0 ? (_jsx(EmptyState, { message: productMessages.itineraryEmpty })) : (_jsx("div", { className: "flex flex-col gap-2", children: days.map((day) => (_jsx(ProductDetailDayRow, { day: day, productId: productId, expanded: expandedDayId === day.id, onToggle: () => setExpandedDayId((current) => (current === day.id ? null : day.id)), onEdit: () => {
138
+ setEditingDay(day);
139
+ setDayDialogOpen(true);
140
+ }, onDelete: () => {
141
+ if (window.confirm(productMessages.deleteDayConfirm)) {
142
+ dayMutation.remove.mutate({
143
+ productId,
144
+ itineraryId: selectedItineraryId ?? undefined,
145
+ dayId: day.id,
146
+ }, {
147
+ onSuccess: () => void invalidateProductActionLedger(),
148
+ });
149
+ }
150
+ }, onAddService: () => {
151
+ setServiceDialogDayId(day.id);
152
+ setEditingService(undefined);
153
+ setServiceDialogOpen(true);
154
+ }, onEditService: (service) => {
155
+ setServiceDialogDayId(day.id);
156
+ setEditingService(service);
157
+ setServiceDialogOpen(true);
158
+ }, onDeleteService: (serviceId) => {
159
+ if (window.confirm(productMessages.deleteServiceConfirm)) {
160
+ void api
161
+ .delete(`/v1/products/${productId}/days/${day.id}/services/${serviceId}`)
162
+ .then(async () => {
163
+ await queryClient.invalidateQueries({
164
+ queryKey: ["product-day-services", productId, day.id],
165
+ });
166
+ await invalidateProductActionLedger();
167
+ });
168
+ }
169
+ } }, day.id))) }))] })) }), _jsx(ProductDaySheet, { open: dayDialogOpen, onOpenChange: setDayDialogOpen, productId: productId, itineraryId: selectedItineraryId ?? "", day: editingDay, nextDayNumber: nextDayNumber, uploadMedia: uploadDayMediaToStorage, onSuccess: () => {
170
+ setDayDialogOpen(false);
171
+ setEditingDay(undefined);
172
+ if (selectedItineraryId) {
173
+ void queryClient.invalidateQueries({
174
+ queryKey: ["products", productId, "itineraries", selectedItineraryId, "days"],
175
+ });
176
+ }
177
+ void invalidateProductActionLedger();
178
+ } }), _jsx(ServiceDialog, { open: serviceDialogOpen, onOpenChange: setServiceDialogOpen, productId: productId, dayId: serviceDialogDayId, service: editingService, onSuccess: () => {
179
+ setServiceDialogOpen(false);
180
+ setEditingService(undefined);
181
+ void queryClient.invalidateQueries({
182
+ queryKey: ["product-day-services", productId, serviceDialogDayId],
183
+ });
184
+ void invalidateProductActionLedger();
185
+ } }), _jsx(ProductItineraryDialog, { open: itineraryDialogOpen, onOpenChange: (open) => {
186
+ setItineraryDialogOpen(open);
187
+ if (!open)
188
+ setEditingItinerary(undefined);
189
+ }, productId: productId, itinerary: editingItinerary, itineraryCount: itineraries.length, onSuccess: (itineraryId) => {
190
+ if (!editingItinerary)
191
+ setSelectedItineraryId(itineraryId);
192
+ void invalidateProductActionLedger();
193
+ } }), _jsx(AlertDialog, { open: !!deleteItineraryTarget, onOpenChange: (open) => {
194
+ if (!open)
195
+ setDeleteItineraryTarget(null);
196
+ }, children: _jsxs(AlertDialogContent, { size: "sm", children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: productMessages.deleteItineraryTitle }), _jsx(AlertDialogDescription, { children: deleteItineraryTarget
197
+ ? formatMessage(productMessages.deleteItineraryDescription, {
198
+ name: deleteItineraryTarget.name,
199
+ })
200
+ : null })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { children: productMessages.cancel }), _jsx(AlertDialogAction, { variant: "destructive", onClick: () => void handleConfirmDelete(), children: productMessages.confirmDelete })] })] }) })] }));
201
+ }
@@ -0,0 +1,15 @@
1
+ import type { ProductMediaItem } from "./product-detail-shared.js";
2
+ export declare function ProductBrochureSection({ brochure, isGenerating, onGenerate, }: {
3
+ brochure: ProductMediaItem | null;
4
+ isGenerating: boolean;
5
+ onGenerate: () => void;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export declare function ProductMediaSection({ productId, media, isUploading, onUpload, onSetCover, onDelete, }: {
8
+ productId: string;
9
+ media: ProductMediaItem[];
10
+ isUploading: boolean;
11
+ onUpload: (file: File) => void;
12
+ onSetCover: (mediaId: string) => void;
13
+ onDelete: (mediaId: string) => void;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=product-detail-media-sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-detail-media-sections.d.ts","sourceRoot":"","sources":["../../../src/components/product-detail/product-detail-media-sections.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAGlE,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,EAAE;IACD,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACjC,YAAY,EAAE,OAAO,CAAA;IACrB,UAAU,EAAE,MAAM,IAAI,CAAA;CACvB,2CAmDA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,EACR,UAAU,EACV,QAAQ,GACT,EAAE;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,gBAAgB,EAAE,CAAA;IACzB,WAAW,EAAE,OAAO,CAAA;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAC9B,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC,2CAgBA"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { formatMessage } from "@voyant-travel/i18n";
3
+ import { Button } from "@voyant-travel/ui/components";
4
+ import { Download, FileText, RefreshCw } from "lucide-react";
5
+ import { useProductDetailMessages } from "./host.js";
6
+ import { formatFileSize, Section } from "./product-detail-section-shell.js";
7
+ import { ProductMediaGallery } from "./product-media-gallery.js";
8
+ export function ProductBrochureSection({ brochure, isGenerating, onGenerate, }) {
9
+ const messages = useProductDetailMessages();
10
+ const productMessages = messages.products.core;
11
+ return (_jsx(Section, { title: productMessages.brochureTitle, children: _jsxs("div", { className: "flex flex-col gap-3", children: [brochure ? (_jsxs("div", { className: "flex items-start gap-3 rounded-md border bg-muted/20 p-3", children: [_jsx("div", { className: "mt-0.5 rounded-md bg-background p-2 text-muted-foreground", children: _jsx(FileText, { className: "h-4 w-4" }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "truncate text-sm font-medium", children: brochure.name }), _jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: formatMessage(productMessages.brochureMeta, {
12
+ version: brochure.brochureVersion ?? 1,
13
+ size: formatFileSize(brochure.fileSize),
14
+ }) })] })] })) : (_jsx("p", { className: "text-sm text-muted-foreground", children: productMessages.brochureEmpty })), _jsxs("div", { className: "flex gap-2", children: [brochure ? (_jsx("a", { href: brochure.url, target: "_blank", rel: "noreferrer", className: "flex-1", children: _jsxs(Button, { variant: "outline", size: "sm", className: "w-full", children: [_jsx(Download, { className: "mr-1.5 h-3.5 w-3.5" }), productMessages.downloadBrochure] }) })) : null, _jsxs(Button, { variant: brochure ? "secondary" : "default", size: "sm", className: "flex-1", disabled: isGenerating, onClick: onGenerate, children: [_jsx(RefreshCw, { className: `mr-1.5 h-3.5 w-3.5 ${isGenerating ? "animate-spin" : ""}` }), brochure ? productMessages.regenerateBrochure : productMessages.generateBrochure] })] }), _jsx("p", { className: "text-xs text-muted-foreground", children: productMessages.brochureSizeHint })] }) }));
15
+ }
16
+ export function ProductMediaSection({ productId, media, isUploading, onUpload, onSetCover, onDelete, }) {
17
+ const messages = useProductDetailMessages();
18
+ return (_jsx(Section, { title: messages.products.core.mediaTitle, children: _jsx("div", { className: "flex flex-col gap-4", children: _jsx(ProductMediaGallery, { productId: productId, media: media, isUploading: isUploading, onUpload: onUpload, onSetCover: onSetCover, onDelete: onDelete }) }) }));
19
+ }
@@ -0,0 +1,6 @@
1
+ import { type ProductRecord } from "./product-detail-shared.js";
2
+ export declare function ProductOrganizeSection({ product, onEdit, }: {
3
+ product: ProductRecord;
4
+ onEdit: () => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=product-detail-organize-section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-detail-organize-section.d.ts","sourceRoot":"","sources":["../../../src/components/product-detail/product-detail-organize-section.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAO3F,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,MAAM,GACP,EAAE;IACD,OAAO,EAAE,aAAa,CAAA;IACtB,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,2CAsDA"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { Badge, DropdownMenuItem } from "@voyant-travel/ui/components";
4
+ import { Pencil } from "lucide-react";
5
+ import { useProductDetailApi, useProductDetailMessages } from "./host.js";
6
+ import { ActionMenu, DetailRow, Section } from "./product-detail-section-shell.js";
7
+ import { getProductBookingModeLabel } from "./product-detail-shared.js";
8
+ export function ProductOrganizeSection({ product, onEdit, }) {
9
+ const api = useProductDetailApi();
10
+ const messages = useProductDetailMessages();
11
+ const productMessages = messages.products.core;
12
+ const taxClassQuery = useQuery({
13
+ queryKey: ["tax-class", product.taxClassId],
14
+ enabled: !!product.taxClassId,
15
+ queryFn: () => api.get(`/v1/admin/finance/tax-classes/${product.taxClassId}`),
16
+ });
17
+ return (_jsxs(Section, { title: productMessages.organizeTitle, actions: _jsx(ActionMenu, { children: _jsxs(DropdownMenuItem, { onClick: onEdit, children: [_jsx(Pencil, { className: "h-4 w-4" }), productMessages.edit] }) }), children: [_jsx(DetailRow, { label: productMessages.tagsLabel, value: product.tags.length > 0 ? (_jsx("div", { className: "flex flex-wrap justify-end gap-1", children: product.tags.map((tag) => (_jsx(Badge, { variant: "secondary", className: "text-xs", children: tag }, tag))) })) : (_jsx("span", { className: "text-muted-foreground", children: productMessages.noValue })) }), _jsx(DetailRow, { label: productMessages.typeLabel, value: _jsx("span", { children: getProductBookingModeLabel(product.bookingMode, messages) }) }), _jsx(DetailRow, { label: productMessages.taxClassLabel, value: taxClassQuery.data?.data.label ? (_jsx("span", { children: taxClassQuery.data.data.label })) : (_jsx("span", { className: "text-muted-foreground", children: productMessages.taxClassNone })) })] }));
18
+ }
@@ -0,0 +1,4 @@
1
+ export declare function ProductDetailPage({ id }: {
2
+ id: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=product-detail-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-detail-page.d.ts","sourceRoot":"","sources":["../../../src/components/product-detail/product-detail-page.tsx"],"names":[],"mappings":"AAsCA,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,2CA8MvD"}
@@ -0,0 +1,95 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useQueries } from "@tanstack/react-query";
3
+ import { Button } from "@voyant-travel/ui/components";
4
+ import { useMemo } from "react";
5
+ import { ProductsUiMessagesProvider } from "../../i18n/index.js";
6
+ import { ProductOptionsSection } from "../product-options-section.js";
7
+ import { useProductDetailApi, useProductDetailHost, useProductDetailMessages, useProductLocale, } from "./host.js";
8
+ import { ProductActivitySection } from "./product-activity-section.js";
9
+ import { DepartureDialog } from "./product-departure-dialog.js";
10
+ import { DeparturePricingOverrideDialog } from "./product-departure-pricing-override-dialog.js";
11
+ import { ProductDialog } from "./product-detail-dialog.js";
12
+ import { ProductDetailHeader } from "./product-detail-header.js";
13
+ import { ProductDetailItinerarySection } from "./product-detail-itinerary-section.js";
14
+ import { ProductBrochureSection, ProductChannelsSection, ProductDeparturesSection, ProductDetailsSection, ProductMediaSection, ProductOrganizeSection, ProductSchedulesSection, } from "./product-detail-sections.js";
15
+ import { ProductDetailSkeleton } from "./product-detail-skeleton.js";
16
+ import { ProductMarketRulesSection } from "./product-market-rules-section.js";
17
+ import { PricingPanel } from "./product-options-pricing.js";
18
+ import { deriveOptionPricingLayout, getDeparturePriceOverridesQueryOptions, } from "./product-options-shared.js";
19
+ import { ProductPaymentPolicySection } from "./product-payment-policy-section.js";
20
+ import { ScheduleDialog } from "./product-schedule-dialog.js";
21
+ import { useProductDetailData } from "./use-product-detail-data.js";
22
+ import { useProductDetailDialogs } from "./use-product-detail-dialogs.js";
23
+ export function ProductDetailPage({ id }) {
24
+ const messages = useProductDetailMessages();
25
+ const productMessages = messages.products.core;
26
+ const { navigate, renderOptionExtras } = useProductDetailHost();
27
+ const resolvedLocale = useProductLocale();
28
+ const api = useProductDetailApi();
29
+ const data = useProductDetailData(id);
30
+ const dialogs = useProductDetailDialogs();
31
+ const { product, isPending, slots, rules, channels, mappings, media, itineraryNameById } = data;
32
+ const { mutations, refetch, invalidateProduct } = data;
33
+ const overrideQueries = useQueries({
34
+ queries: slots.map((slot) => ({
35
+ ...getDeparturePriceOverridesQueryOptions(api, slot.id),
36
+ enabled: !!slot.id,
37
+ })),
38
+ });
39
+ const slotIdsWithOverrides = useMemo(() => {
40
+ const set = new Set();
41
+ slots.forEach((slot, index) => {
42
+ const result = overrideQueries[index];
43
+ const items = result?.data?.data ?? [];
44
+ if (items.some((o) => o.active))
45
+ set.add(slot.id);
46
+ });
47
+ return set;
48
+ }, [slots, overrideQueries]);
49
+ const brochure = media.find((item) => item.isBrochure && item.isBrochureCurrent) ??
50
+ media.find((item) => item.isBrochure) ??
51
+ null;
52
+ const galleryMedia = media.filter((item) => !item.isBrochure);
53
+ if (isPending) {
54
+ return _jsx(ProductDetailSkeleton, {});
55
+ }
56
+ if (!product) {
57
+ return (_jsxs("div", { className: "flex flex-col items-center justify-center gap-4 py-12", children: [_jsx("p", { className: "text-muted-foreground", children: productMessages.detailNotFound }), _jsx(Button, { variant: "outline", onClick: () => navigate.toProducts(), children: productMessages.backToProducts })] }));
58
+ }
59
+ return (_jsxs("div", { className: "flex flex-col gap-6 p-6", children: [_jsx(ProductDetailHeader, { product: product, isDuplicating: mutations.duplicateProduct.isPending, isDeleting: mutations.deleteProduct.isPending, onEdit: dialogs.edit.openNow, onAddBooking: () => navigate.toNewBooking(id), onDuplicate: () => {
60
+ mutations.duplicateProduct.mutate(undefined, {
61
+ onSuccess: (result) => {
62
+ navigate.toProduct(result.data.id);
63
+ },
64
+ });
65
+ }, onDelete: () => {
66
+ if (confirm(productMessages.deleteConfirm)) {
67
+ mutations.deleteProduct.mutate(undefined, {
68
+ onSuccess: () => navigate.toProducts(),
69
+ });
70
+ }
71
+ } }), _jsxs("div", { className: "grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_320px]", children: [_jsxs("div", { className: "flex min-w-0 flex-col gap-6", children: [_jsx(ProductDetailsSection, { product: product, onEdit: dialogs.edit.openNow }), _jsx(ProductMediaSection, { productId: id, media: galleryMedia, isUploading: mutations.uploadMedia.isPending, onUpload: (file) => mutations.uploadMedia.mutate({ file }), onSetCover: (mediaId) => mutations.setCover.mutate(mediaId), onDelete: (mediaId) => {
72
+ if (confirm(productMessages.deleteMediaConfirm)) {
73
+ mutations.deleteMedia.mutate(mediaId);
74
+ }
75
+ } }), _jsx(ProductDeparturesSection, { slots: slots, itineraryNameById: itineraryNameById, slotIdsWithOverrides: slotIdsWithOverrides, onCreate: dialogs.departure.openNew, onEdit: dialogs.departure.openEdit, onOverridePrice: dialogs.departureOverride.openEdit, onManageAvailability: (slot) => navigate.toAvailability(slot.id), onDelete: (slotId) => {
76
+ if (confirm(productMessages.deleteDepartureConfirm)) {
77
+ mutations.deleteSlot.mutate(slotId);
78
+ }
79
+ } }), _jsx(ProductSchedulesSection, { rules: rules, onCreate: dialogs.schedule.openNew, onEdit: dialogs.schedule.openEdit, onDelete: (ruleId) => {
80
+ if (confirm(productMessages.deleteScheduleConfirm)) {
81
+ mutations.deleteRule.mutate(ruleId);
82
+ }
83
+ } }), _jsx(ProductDetailItinerarySection, { productId: id }), _jsx(ProductsUiMessagesProvider, { locale: resolvedLocale, children: _jsx(ProductOptionsSection, { productId: id, renderOptionDetails: (option) => (_jsx(PricingPanel, { productId: id, optionId: option.id, optionName: option.name, productCurrency: product.sellCurrency, layout: deriveOptionPricingLayout(product.bookingMode), extras: renderOptionExtras?.(id, option.id) })) }) }), _jsx(ProductPaymentPolicySection, { product: product, onSuccess: invalidateProduct }), _jsx(ProductMarketRulesSection, { productId: id })] }), _jsxs("div", { className: "flex flex-col gap-6", children: [_jsx(ProductChannelsSection, { allChannels: channels, mappings: mappings, onAddChannel: (channelId) => mutations.addChannelMapping.mutate(channelId), onRemoveChannel: (mappingId) => mutations.removeChannelMapping.mutate(mappingId) }), _jsx(ProductOrganizeSection, { product: product, onEdit: dialogs.edit.openNow }), _jsx(ProductBrochureSection, { brochure: brochure, isGenerating: mutations.generateBrochure.isPending, onGenerate: () => mutations.generateBrochure.mutate() }), _jsx(ProductActivitySection, { productId: id })] })] }), _jsx(ProductDialog, { open: dialogs.edit.open, onOpenChange: dialogs.edit.setOpen, product: product, onSuccess: () => {
84
+ dialogs.edit.close();
85
+ invalidateProduct();
86
+ } }), _jsx(DepartureDialog, { open: dialogs.departure.open, onOpenChange: dialogs.departure.setOpen, productId: id, slot: dialogs.departure.editing, onSuccess: () => {
87
+ dialogs.departure.close();
88
+ refetch.slots();
89
+ } }), _jsx(ScheduleDialog, { open: dialogs.schedule.open, onOpenChange: dialogs.schedule.setOpen, productId: id, rule: dialogs.schedule.editing, onSuccess: () => {
90
+ dialogs.schedule.close();
91
+ refetch.rules();
92
+ } }), _jsx(DeparturePricingOverrideDialog, { open: dialogs.departureOverride.open, onOpenChange: dialogs.departureOverride.setOpen, departureId: dialogs.departureOverride.editing?.id ?? null, optionId: dialogs.departureOverride.editing?.optionId ?? null, onSuccess: () => {
93
+ dialogs.departureOverride.close();
94
+ } })] }));
95
+ }
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from "react";
2
+ export declare function Section({ title, actions, children, contentClassName, }: {
3
+ title: string;
4
+ actions?: ReactNode;
5
+ children: ReactNode;
6
+ contentClassName?: string;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ export declare function DetailRow({ label, value }: {
9
+ label: string;
10
+ value: ReactNode;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ export declare function ActionMenu({ children }: {
13
+ children: ReactNode;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ export declare function EmptyState({ message }: {
16
+ message: string;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ export declare function formatFileSize(value: number | null): string;
19
+ //# sourceMappingURL=product-detail-section-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-detail-section-shell.d.ts","sourceRoot":"","sources":["../../../src/components/product-detail/product-detail-section-shell.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,2CAWA;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,2CAO9E;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAW/D;AAED,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,2CAE1D;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAI3D"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, } from "@voyant-travel/ui/components";
3
+ import { Separator } from "@voyant-travel/ui/components/separator";
4
+ import { MoreHorizontal } from "lucide-react";
5
+ export function Section({ title, actions, children, contentClassName, }) {
6
+ return (_jsxs("div", { className: "rounded-lg border bg-card text-card-foreground shadow-sm", children: [_jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [_jsx("h2", { className: "font-semibold leading-none tracking-tight", children: title }), actions] }), _jsx(Separator, {}), _jsx("div", { className: contentClassName ?? "px-6 py-4", children: children })] }));
7
+ }
8
+ export function DetailRow({ label, value }) {
9
+ return (_jsxs("div", { className: "flex items-center justify-between py-3 text-sm [&:not(:last-child)]:border-b", children: [_jsx("span", { className: "text-muted-foreground", children: label }), _jsx("span", { children: value })] }));
10
+ }
11
+ export function ActionMenu({ children }) {
12
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8 text-muted-foreground", children: _jsx(MoreHorizontal, { className: "h-4 w-4" }) }) }), _jsx(DropdownMenuContent, { align: "end", children: children })] }));
13
+ }
14
+ export function EmptyState({ message }) {
15
+ return _jsx("p", { className: "py-6 text-center text-sm text-muted-foreground", children: message });
16
+ }
17
+ export function formatFileSize(value) {
18
+ if (value == null)
19
+ return "-";
20
+ if (value < 1024 * 1024)
21
+ return `${Math.max(1, Math.round(value / 1024))} KB`;
22
+ return `${(value / (1024 * 1024)).toFixed(1)} MB`;
23
+ }
@@ -0,0 +1,7 @@
1
+ export { ProductDeparturesSection, ProductSchedulesSection, } from "./product-detail-availability-sections.js";
2
+ export { ProductChannelsSection } from "./product-detail-channel-section.js";
3
+ export { ProductBrochureSection, ProductMediaSection } from "./product-detail-media-sections.js";
4
+ export { ProductOrganizeSection } from "./product-detail-organize-section.js";
5
+ export { ActionMenu, DetailRow, EmptyState, Section, } from "./product-detail-section-shell.js";
6
+ export { ProductDetailsSection } from "./product-detail-summary-section.js";
7
+ //# sourceMappingURL=product-detail-sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-detail-sections.d.ts","sourceRoot":"","sources":["../../../src/components/product-detail/product-detail-sections.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,2CAA2C,CAAA;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AAChG,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAA;AAC7E,OAAO,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,OAAO,GACR,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export { ProductDeparturesSection, ProductSchedulesSection, } from "./product-detail-availability-sections.js";
2
+ export { ProductChannelsSection } from "./product-detail-channel-section.js";
3
+ export { ProductBrochureSection, ProductMediaSection } from "./product-detail-media-sections.js";
4
+ export { ProductOrganizeSection } from "./product-detail-organize-section.js";
5
+ export { ActionMenu, DetailRow, EmptyState, Section, } from "./product-detail-section-shell.js";
6
+ export { ProductDetailsSection } from "./product-detail-summary-section.js";