@inorain_development/hotel-smarters-chat-ui 1.2.2 → 1.3.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 (339) hide show
  1. package/lib/commonjs/features/chat/components/common/calendar-icon.js +33 -0
  2. package/lib/commonjs/features/chat/components/common/calendar-icon.js.map +1 -0
  3. package/lib/commonjs/features/chat/components/common/calendar-icon.native.js +33 -0
  4. package/lib/commonjs/features/chat/components/common/calendar-icon.native.js.map +1 -0
  5. package/lib/commonjs/features/chat/components/common/cart-icon.js +36 -0
  6. package/lib/commonjs/features/chat/components/common/cart-icon.js.map +1 -0
  7. package/lib/commonjs/features/chat/components/common/chevron-icon.js +26 -0
  8. package/lib/commonjs/features/chat/components/common/chevron-icon.js.map +1 -0
  9. package/lib/commonjs/features/chat/components/common/chevron-icon.native.js +26 -0
  10. package/lib/commonjs/features/chat/components/common/chevron-icon.native.js.map +1 -0
  11. package/lib/commonjs/features/chat/components/common/plane-icon.js +23 -0
  12. package/lib/commonjs/features/chat/components/common/plane-icon.js.map +1 -0
  13. package/lib/commonjs/features/chat/components/common/plane-icon.native.js +23 -0
  14. package/lib/commonjs/features/chat/components/common/plane-icon.native.js.map +1 -0
  15. package/lib/commonjs/features/chat/components/flight/flight-card.js +130 -0
  16. package/lib/commonjs/features/chat/components/flight/flight-card.js.map +1 -0
  17. package/lib/commonjs/features/chat/components/flight/flight-card.native.js +132 -0
  18. package/lib/commonjs/features/chat/components/flight/flight-card.native.js.map +1 -0
  19. package/lib/commonjs/features/chat/components/flight/flight.js +149 -0
  20. package/lib/commonjs/features/chat/components/flight/flight.js.map +1 -0
  21. package/lib/commonjs/features/chat/components/flight/flight.model.js +6 -0
  22. package/lib/commonjs/features/chat/components/flight/flight.model.js.map +1 -0
  23. package/lib/commonjs/features/chat/components/flight/flight.native.js +151 -0
  24. package/lib/commonjs/features/chat/components/flight/flight.native.js.map +1 -0
  25. package/lib/commonjs/features/chat/components/flight/index.js +13 -0
  26. package/lib/commonjs/features/chat/components/flight/index.js.map +1 -0
  27. package/lib/commonjs/features/chat/components/flight-board/flight-board.js +154 -0
  28. package/lib/commonjs/features/chat/components/flight-board/flight-board.js.map +1 -0
  29. package/lib/commonjs/features/chat/components/flight-board/flight-board.model.js +6 -0
  30. package/lib/commonjs/features/chat/components/flight-board/flight-board.model.js.map +1 -0
  31. package/lib/commonjs/features/chat/components/flight-board/flight-board.native.js +165 -0
  32. package/lib/commonjs/features/chat/components/flight-board/flight-board.native.js.map +1 -0
  33. package/lib/commonjs/features/chat/components/flight-board/index.js +13 -0
  34. package/lib/commonjs/features/chat/components/flight-board/index.js.map +1 -0
  35. package/lib/commonjs/features/chat/components/info/info.js +41 -14
  36. package/lib/commonjs/features/chat/components/info/info.js.map +1 -1
  37. package/lib/commonjs/features/chat/components/info/info.native.js +45 -14
  38. package/lib/commonjs/features/chat/components/info/info.native.js.map +1 -1
  39. package/lib/commonjs/features/chat/components/order/index.js +20 -0
  40. package/lib/commonjs/features/chat/components/order/index.js.map +1 -0
  41. package/lib/commonjs/features/chat/components/order/order.js +171 -0
  42. package/lib/commonjs/features/chat/components/order/order.js.map +1 -0
  43. package/lib/commonjs/features/chat/components/order/order.model.js +15 -0
  44. package/lib/commonjs/features/chat/components/order/order.model.js.map +1 -0
  45. package/lib/commonjs/features/chat/components/order/order.native.js +192 -0
  46. package/lib/commonjs/features/chat/components/order/order.native.js.map +1 -0
  47. package/lib/commonjs/features/chat/components/reservation/index.js +20 -0
  48. package/lib/commonjs/features/chat/components/reservation/index.js.map +1 -0
  49. package/lib/commonjs/features/chat/components/reservation/reservation.js +164 -0
  50. package/lib/commonjs/features/chat/components/reservation/reservation.js.map +1 -0
  51. package/lib/commonjs/features/chat/components/reservation/reservation.model.js +13 -0
  52. package/lib/commonjs/features/chat/components/reservation/reservation.model.js.map +1 -0
  53. package/lib/commonjs/features/chat/components/reservation/reservation.native.js +180 -0
  54. package/lib/commonjs/features/chat/components/reservation/reservation.native.js.map +1 -0
  55. package/lib/commonjs/features/chat/model/chat.model.js +17 -1
  56. package/lib/commonjs/features/chat/model/chat.model.js.map +1 -1
  57. package/lib/commonjs/features/chat/renderer/renderer.js +26 -0
  58. package/lib/commonjs/features/chat/renderer/renderer.js.map +1 -1
  59. package/lib/commonjs/features/chat/renderer/renderer.native.js +26 -0
  60. package/lib/commonjs/features/chat/renderer/renderer.native.js.map +1 -1
  61. package/lib/commonjs/native.js +48 -0
  62. package/lib/commonjs/native.js.map +1 -1
  63. package/lib/commonjs/utils/flight.utils.js +86 -0
  64. package/lib/commonjs/utils/flight.utils.js.map +1 -0
  65. package/lib/commonjs/utils/order.utils.js +24 -0
  66. package/lib/commonjs/utils/order.utils.js.map +1 -0
  67. package/lib/commonjs/utils/reservation.utils.js +22 -0
  68. package/lib/commonjs/utils/reservation.utils.js.map +1 -0
  69. package/lib/commonjs/utils/status-badge.utils.js +75 -0
  70. package/lib/commonjs/utils/status-badge.utils.js.map +1 -0
  71. package/lib/commonjs/utils/theme.utils.js +8 -2
  72. package/lib/commonjs/utils/theme.utils.js.map +1 -1
  73. package/lib/commonjs/web.js +48 -0
  74. package/lib/commonjs/web.js.map +1 -1
  75. package/lib/module/features/chat/components/common/calendar-icon.js +29 -0
  76. package/lib/module/features/chat/components/common/calendar-icon.js.map +1 -0
  77. package/lib/module/features/chat/components/common/calendar-icon.native.js +29 -0
  78. package/lib/module/features/chat/components/common/calendar-icon.native.js.map +1 -0
  79. package/lib/module/features/chat/components/common/cart-icon.js +32 -0
  80. package/lib/module/features/chat/components/common/cart-icon.js.map +1 -0
  81. package/lib/module/features/chat/components/common/chevron-icon.js +22 -0
  82. package/lib/module/features/chat/components/common/chevron-icon.js.map +1 -0
  83. package/lib/module/features/chat/components/common/chevron-icon.native.js +22 -0
  84. package/lib/module/features/chat/components/common/chevron-icon.native.js.map +1 -0
  85. package/lib/module/features/chat/components/common/plane-icon.js +19 -0
  86. package/lib/module/features/chat/components/common/plane-icon.js.map +1 -0
  87. package/lib/module/features/chat/components/common/plane-icon.native.js +19 -0
  88. package/lib/module/features/chat/components/common/plane-icon.native.js.map +1 -0
  89. package/lib/module/features/chat/components/flight/flight-card.js +126 -0
  90. package/lib/module/features/chat/components/flight/flight-card.js.map +1 -0
  91. package/lib/module/features/chat/components/flight/flight-card.native.js +128 -0
  92. package/lib/module/features/chat/components/flight/flight-card.native.js.map +1 -0
  93. package/lib/module/features/chat/components/flight/flight.js +145 -0
  94. package/lib/module/features/chat/components/flight/flight.js.map +1 -0
  95. package/lib/module/features/chat/components/flight/flight.model.js +4 -0
  96. package/lib/module/features/chat/components/flight/flight.model.js.map +1 -0
  97. package/lib/module/features/chat/components/flight/flight.native.js +147 -0
  98. package/lib/module/features/chat/components/flight/flight.native.js.map +1 -0
  99. package/lib/module/features/chat/components/flight/index.js +4 -0
  100. package/lib/module/features/chat/components/flight/index.js.map +1 -0
  101. package/lib/module/features/chat/components/flight-board/flight-board.js +150 -0
  102. package/lib/module/features/chat/components/flight-board/flight-board.js.map +1 -0
  103. package/lib/module/features/chat/components/flight-board/flight-board.model.js +4 -0
  104. package/lib/module/features/chat/components/flight-board/flight-board.model.js.map +1 -0
  105. package/lib/module/features/chat/components/flight-board/flight-board.native.js +161 -0
  106. package/lib/module/features/chat/components/flight-board/flight-board.native.js.map +1 -0
  107. package/lib/module/features/chat/components/flight-board/index.js +4 -0
  108. package/lib/module/features/chat/components/flight-board/index.js.map +1 -0
  109. package/lib/module/features/chat/components/info/info.js +41 -14
  110. package/lib/module/features/chat/components/info/info.js.map +1 -1
  111. package/lib/module/features/chat/components/info/info.native.js +46 -15
  112. package/lib/module/features/chat/components/info/info.native.js.map +1 -1
  113. package/lib/module/features/chat/components/order/index.js +5 -0
  114. package/lib/module/features/chat/components/order/index.js.map +1 -0
  115. package/lib/module/features/chat/components/order/order.js +167 -0
  116. package/lib/module/features/chat/components/order/order.js.map +1 -0
  117. package/lib/module/features/chat/components/order/order.model.js +11 -0
  118. package/lib/module/features/chat/components/order/order.model.js.map +1 -0
  119. package/lib/module/features/chat/components/order/order.native.js +188 -0
  120. package/lib/module/features/chat/components/order/order.native.js.map +1 -0
  121. package/lib/module/features/chat/components/reservation/index.js +5 -0
  122. package/lib/module/features/chat/components/reservation/index.js.map +1 -0
  123. package/lib/module/features/chat/components/reservation/reservation.js +160 -0
  124. package/lib/module/features/chat/components/reservation/reservation.js.map +1 -0
  125. package/lib/module/features/chat/components/reservation/reservation.model.js +9 -0
  126. package/lib/module/features/chat/components/reservation/reservation.model.js.map +1 -0
  127. package/lib/module/features/chat/components/reservation/reservation.native.js +176 -0
  128. package/lib/module/features/chat/components/reservation/reservation.native.js.map +1 -0
  129. package/lib/module/features/chat/model/chat.model.js +16 -0
  130. package/lib/module/features/chat/model/chat.model.js.map +1 -1
  131. package/lib/module/features/chat/renderer/renderer.js +26 -0
  132. package/lib/module/features/chat/renderer/renderer.js.map +1 -1
  133. package/lib/module/features/chat/renderer/renderer.native.js +26 -0
  134. package/lib/module/features/chat/renderer/renderer.native.js.map +1 -1
  135. package/lib/module/native.js +7 -1
  136. package/lib/module/native.js.map +1 -1
  137. package/lib/module/utils/flight.utils.js +82 -0
  138. package/lib/module/utils/flight.utils.js.map +1 -0
  139. package/lib/module/utils/order.utils.js +20 -0
  140. package/lib/module/utils/order.utils.js.map +1 -0
  141. package/lib/module/utils/reservation.utils.js +18 -0
  142. package/lib/module/utils/reservation.utils.js.map +1 -0
  143. package/lib/module/utils/status-badge.utils.js +70 -0
  144. package/lib/module/utils/status-badge.utils.js.map +1 -0
  145. package/lib/module/utils/theme.utils.js +8 -2
  146. package/lib/module/utils/theme.utils.js.map +1 -1
  147. package/lib/module/web.js +7 -1
  148. package/lib/module/web.js.map +1 -1
  149. package/lib/typescript/commonjs/features/chat/components/common/calendar-icon.d.ts +6 -0
  150. package/lib/typescript/commonjs/features/chat/components/common/calendar-icon.d.ts.map +1 -0
  151. package/lib/typescript/commonjs/features/chat/components/common/calendar-icon.native.d.ts +6 -0
  152. package/lib/typescript/commonjs/features/chat/components/common/calendar-icon.native.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/features/chat/components/common/cart-icon.d.ts +6 -0
  154. package/lib/typescript/commonjs/features/chat/components/common/cart-icon.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/features/chat/components/common/chevron-icon.d.ts +6 -0
  156. package/lib/typescript/commonjs/features/chat/components/common/chevron-icon.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/features/chat/components/common/chevron-icon.native.d.ts +6 -0
  158. package/lib/typescript/commonjs/features/chat/components/common/chevron-icon.native.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/features/chat/components/common/plane-icon.d.ts +6 -0
  160. package/lib/typescript/commonjs/features/chat/components/common/plane-icon.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/features/chat/components/common/plane-icon.native.d.ts +6 -0
  162. package/lib/typescript/commonjs/features/chat/components/common/plane-icon.native.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/features/chat/components/flight/flight-card.d.ts +12 -0
  164. package/lib/typescript/commonjs/features/chat/components/flight/flight-card.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/features/chat/components/flight/flight-card.native.d.ts +12 -0
  166. package/lib/typescript/commonjs/features/chat/components/flight/flight-card.native.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/features/chat/components/flight/flight.d.ts +4 -0
  168. package/lib/typescript/commonjs/features/chat/components/flight/flight.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/features/chat/components/flight/flight.model.d.ts +19 -0
  170. package/lib/typescript/commonjs/features/chat/components/flight/flight.model.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/features/chat/components/flight/flight.native.d.ts +4 -0
  172. package/lib/typescript/commonjs/features/chat/components/flight/flight.native.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/features/chat/components/flight/index.d.ts +3 -0
  174. package/lib/typescript/commonjs/features/chat/components/flight/index.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.d.ts +4 -0
  176. package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.model.d.ts +22 -0
  178. package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.model.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.native.d.ts +4 -0
  180. package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.native.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/features/chat/components/flight-board/index.d.ts +3 -0
  182. package/lib/typescript/commonjs/features/chat/components/flight-board/index.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/features/chat/components/info/info.d.ts +1 -1
  184. package/lib/typescript/commonjs/features/chat/components/info/info.d.ts.map +1 -1
  185. package/lib/typescript/commonjs/features/chat/components/info/info.model.d.ts +3 -0
  186. package/lib/typescript/commonjs/features/chat/components/info/info.model.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/features/chat/components/info/info.native.d.ts +1 -1
  188. package/lib/typescript/commonjs/features/chat/components/info/info.native.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/features/chat/components/order/index.d.ts +4 -0
  190. package/lib/typescript/commonjs/features/chat/components/order/index.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/features/chat/components/order/order.d.ts +4 -0
  192. package/lib/typescript/commonjs/features/chat/components/order/order.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/features/chat/components/order/order.model.d.ts +30 -0
  194. package/lib/typescript/commonjs/features/chat/components/order/order.model.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/features/chat/components/order/order.native.d.ts +4 -0
  196. package/lib/typescript/commonjs/features/chat/components/order/order.native.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/features/chat/components/reservation/index.d.ts +4 -0
  198. package/lib/typescript/commonjs/features/chat/components/reservation/index.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/features/chat/components/reservation/reservation.d.ts +4 -0
  200. package/lib/typescript/commonjs/features/chat/components/reservation/reservation.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/features/chat/components/reservation/reservation.model.d.ts +27 -0
  202. package/lib/typescript/commonjs/features/chat/components/reservation/reservation.model.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/features/chat/components/reservation/reservation.native.d.ts +4 -0
  204. package/lib/typescript/commonjs/features/chat/components/reservation/reservation.native.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/features/chat/model/chat.model.d.ts +17 -2
  206. package/lib/typescript/commonjs/features/chat/model/chat.model.d.ts.map +1 -1
  207. package/lib/typescript/commonjs/features/chat/renderer/renderer.d.ts +5 -1
  208. package/lib/typescript/commonjs/features/chat/renderer/renderer.d.ts.map +1 -1
  209. package/lib/typescript/commonjs/features/chat/renderer/renderer.native.d.ts +5 -1
  210. package/lib/typescript/commonjs/features/chat/renderer/renderer.native.d.ts.map +1 -1
  211. package/lib/typescript/commonjs/native.d.ts +11 -1
  212. package/lib/typescript/commonjs/native.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/utils/flight.utils.d.ts +10 -0
  214. package/lib/typescript/commonjs/utils/flight.utils.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/utils/order.utils.d.ts +7 -0
  216. package/lib/typescript/commonjs/utils/order.utils.d.ts.map +1 -0
  217. package/lib/typescript/commonjs/utils/reservation.utils.d.ts +7 -0
  218. package/lib/typescript/commonjs/utils/reservation.utils.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/utils/status-badge.utils.d.ts +15 -0
  220. package/lib/typescript/commonjs/utils/status-badge.utils.d.ts.map +1 -0
  221. package/lib/typescript/commonjs/utils/theme.utils.d.ts +3 -0
  222. package/lib/typescript/commonjs/utils/theme.utils.d.ts.map +1 -1
  223. package/lib/typescript/commonjs/web.d.ts +11 -1
  224. package/lib/typescript/commonjs/web.d.ts.map +1 -1
  225. package/lib/typescript/module/features/chat/components/common/calendar-icon.d.ts +6 -0
  226. package/lib/typescript/module/features/chat/components/common/calendar-icon.d.ts.map +1 -0
  227. package/lib/typescript/module/features/chat/components/common/calendar-icon.native.d.ts +6 -0
  228. package/lib/typescript/module/features/chat/components/common/calendar-icon.native.d.ts.map +1 -0
  229. package/lib/typescript/module/features/chat/components/common/cart-icon.d.ts +6 -0
  230. package/lib/typescript/module/features/chat/components/common/cart-icon.d.ts.map +1 -0
  231. package/lib/typescript/module/features/chat/components/common/chevron-icon.d.ts +6 -0
  232. package/lib/typescript/module/features/chat/components/common/chevron-icon.d.ts.map +1 -0
  233. package/lib/typescript/module/features/chat/components/common/chevron-icon.native.d.ts +6 -0
  234. package/lib/typescript/module/features/chat/components/common/chevron-icon.native.d.ts.map +1 -0
  235. package/lib/typescript/module/features/chat/components/common/plane-icon.d.ts +6 -0
  236. package/lib/typescript/module/features/chat/components/common/plane-icon.d.ts.map +1 -0
  237. package/lib/typescript/module/features/chat/components/common/plane-icon.native.d.ts +6 -0
  238. package/lib/typescript/module/features/chat/components/common/plane-icon.native.d.ts.map +1 -0
  239. package/lib/typescript/module/features/chat/components/flight/flight-card.d.ts +12 -0
  240. package/lib/typescript/module/features/chat/components/flight/flight-card.d.ts.map +1 -0
  241. package/lib/typescript/module/features/chat/components/flight/flight-card.native.d.ts +12 -0
  242. package/lib/typescript/module/features/chat/components/flight/flight-card.native.d.ts.map +1 -0
  243. package/lib/typescript/module/features/chat/components/flight/flight.d.ts +4 -0
  244. package/lib/typescript/module/features/chat/components/flight/flight.d.ts.map +1 -0
  245. package/lib/typescript/module/features/chat/components/flight/flight.model.d.ts +19 -0
  246. package/lib/typescript/module/features/chat/components/flight/flight.model.d.ts.map +1 -0
  247. package/lib/typescript/module/features/chat/components/flight/flight.native.d.ts +4 -0
  248. package/lib/typescript/module/features/chat/components/flight/flight.native.d.ts.map +1 -0
  249. package/lib/typescript/module/features/chat/components/flight/index.d.ts +3 -0
  250. package/lib/typescript/module/features/chat/components/flight/index.d.ts.map +1 -0
  251. package/lib/typescript/module/features/chat/components/flight-board/flight-board.d.ts +4 -0
  252. package/lib/typescript/module/features/chat/components/flight-board/flight-board.d.ts.map +1 -0
  253. package/lib/typescript/module/features/chat/components/flight-board/flight-board.model.d.ts +22 -0
  254. package/lib/typescript/module/features/chat/components/flight-board/flight-board.model.d.ts.map +1 -0
  255. package/lib/typescript/module/features/chat/components/flight-board/flight-board.native.d.ts +4 -0
  256. package/lib/typescript/module/features/chat/components/flight-board/flight-board.native.d.ts.map +1 -0
  257. package/lib/typescript/module/features/chat/components/flight-board/index.d.ts +3 -0
  258. package/lib/typescript/module/features/chat/components/flight-board/index.d.ts.map +1 -0
  259. package/lib/typescript/module/features/chat/components/info/info.d.ts +1 -1
  260. package/lib/typescript/module/features/chat/components/info/info.d.ts.map +1 -1
  261. package/lib/typescript/module/features/chat/components/info/info.model.d.ts +3 -0
  262. package/lib/typescript/module/features/chat/components/info/info.model.d.ts.map +1 -1
  263. package/lib/typescript/module/features/chat/components/info/info.native.d.ts +1 -1
  264. package/lib/typescript/module/features/chat/components/info/info.native.d.ts.map +1 -1
  265. package/lib/typescript/module/features/chat/components/order/index.d.ts +4 -0
  266. package/lib/typescript/module/features/chat/components/order/index.d.ts.map +1 -0
  267. package/lib/typescript/module/features/chat/components/order/order.d.ts +4 -0
  268. package/lib/typescript/module/features/chat/components/order/order.d.ts.map +1 -0
  269. package/lib/typescript/module/features/chat/components/order/order.model.d.ts +30 -0
  270. package/lib/typescript/module/features/chat/components/order/order.model.d.ts.map +1 -0
  271. package/lib/typescript/module/features/chat/components/order/order.native.d.ts +4 -0
  272. package/lib/typescript/module/features/chat/components/order/order.native.d.ts.map +1 -0
  273. package/lib/typescript/module/features/chat/components/reservation/index.d.ts +4 -0
  274. package/lib/typescript/module/features/chat/components/reservation/index.d.ts.map +1 -0
  275. package/lib/typescript/module/features/chat/components/reservation/reservation.d.ts +4 -0
  276. package/lib/typescript/module/features/chat/components/reservation/reservation.d.ts.map +1 -0
  277. package/lib/typescript/module/features/chat/components/reservation/reservation.model.d.ts +27 -0
  278. package/lib/typescript/module/features/chat/components/reservation/reservation.model.d.ts.map +1 -0
  279. package/lib/typescript/module/features/chat/components/reservation/reservation.native.d.ts +4 -0
  280. package/lib/typescript/module/features/chat/components/reservation/reservation.native.d.ts.map +1 -0
  281. package/lib/typescript/module/features/chat/model/chat.model.d.ts +17 -2
  282. package/lib/typescript/module/features/chat/model/chat.model.d.ts.map +1 -1
  283. package/lib/typescript/module/features/chat/renderer/renderer.d.ts +5 -1
  284. package/lib/typescript/module/features/chat/renderer/renderer.d.ts.map +1 -1
  285. package/lib/typescript/module/features/chat/renderer/renderer.native.d.ts +5 -1
  286. package/lib/typescript/module/features/chat/renderer/renderer.native.d.ts.map +1 -1
  287. package/lib/typescript/module/native.d.ts +11 -1
  288. package/lib/typescript/module/native.d.ts.map +1 -1
  289. package/lib/typescript/module/utils/flight.utils.d.ts +10 -0
  290. package/lib/typescript/module/utils/flight.utils.d.ts.map +1 -0
  291. package/lib/typescript/module/utils/order.utils.d.ts +7 -0
  292. package/lib/typescript/module/utils/order.utils.d.ts.map +1 -0
  293. package/lib/typescript/module/utils/reservation.utils.d.ts +7 -0
  294. package/lib/typescript/module/utils/reservation.utils.d.ts.map +1 -0
  295. package/lib/typescript/module/utils/status-badge.utils.d.ts +15 -0
  296. package/lib/typescript/module/utils/status-badge.utils.d.ts.map +1 -0
  297. package/lib/typescript/module/utils/theme.utils.d.ts +3 -0
  298. package/lib/typescript/module/utils/theme.utils.d.ts.map +1 -1
  299. package/lib/typescript/module/web.d.ts +11 -1
  300. package/lib/typescript/module/web.d.ts.map +1 -1
  301. package/package.json +1 -1
  302. package/src/features/chat/components/common/calendar-icon.native.tsx +13 -0
  303. package/src/features/chat/components/common/calendar-icon.tsx +13 -0
  304. package/src/features/chat/components/common/cart-icon.tsx +20 -0
  305. package/src/features/chat/components/common/chevron-icon.native.tsx +18 -0
  306. package/src/features/chat/components/common/chevron-icon.tsx +18 -0
  307. package/src/features/chat/components/common/plane-icon.native.tsx +15 -0
  308. package/src/features/chat/components/common/plane-icon.tsx +15 -0
  309. package/src/features/chat/components/flight/flight-card.native.tsx +100 -0
  310. package/src/features/chat/components/flight/flight-card.tsx +100 -0
  311. package/src/features/chat/components/flight/flight.model.ts +20 -0
  312. package/src/features/chat/components/flight/flight.native.tsx +131 -0
  313. package/src/features/chat/components/flight/flight.tsx +131 -0
  314. package/src/features/chat/components/flight/index.ts +2 -0
  315. package/src/features/chat/components/flight-board/flight-board.model.ts +23 -0
  316. package/src/features/chat/components/flight-board/flight-board.native.tsx +155 -0
  317. package/src/features/chat/components/flight-board/flight-board.tsx +160 -0
  318. package/src/features/chat/components/flight-board/index.ts +2 -0
  319. package/src/features/chat/components/info/info.model.ts +3 -0
  320. package/src/features/chat/components/info/info.native.tsx +47 -11
  321. package/src/features/chat/components/info/info.tsx +43 -10
  322. package/src/features/chat/components/order/index.ts +3 -0
  323. package/src/features/chat/components/order/order.model.ts +32 -0
  324. package/src/features/chat/components/order/order.native.tsx +175 -0
  325. package/src/features/chat/components/order/order.tsx +176 -0
  326. package/src/features/chat/components/reservation/index.ts +3 -0
  327. package/src/features/chat/components/reservation/reservation.model.ts +29 -0
  328. package/src/features/chat/components/reservation/reservation.native.tsx +159 -0
  329. package/src/features/chat/components/reservation/reservation.tsx +161 -0
  330. package/src/features/chat/model/chat.model.ts +16 -0
  331. package/src/features/chat/renderer/renderer.native.tsx +29 -1
  332. package/src/features/chat/renderer/renderer.tsx +29 -1
  333. package/src/native.ts +11 -1
  334. package/src/utils/flight.utils.ts +35 -0
  335. package/src/utils/order.utils.ts +28 -0
  336. package/src/utils/reservation.utils.ts +23 -0
  337. package/src/utils/status-badge.utils.ts +36 -0
  338. package/src/utils/theme.utils.ts +9 -0
  339. package/src/web.ts +11 -1
@@ -0,0 +1,20 @@
1
+ import type { FlightStatus, LocalizedText } from '../../model/chat.model';
2
+
3
+ export interface Airport {
4
+ code: string;
5
+ city: LocalizedText;
6
+ time: string;
7
+ }
8
+
9
+ export interface FlightItem {
10
+ id: number;
11
+ airline: LocalizedText;
12
+ flightNumber: string;
13
+ status?: FlightStatus;
14
+ statusLabel?: LocalizedText;
15
+ date?: LocalizedText;
16
+ terminal?: LocalizedText;
17
+ from: Airport;
18
+ to: Airport;
19
+ duration?: string;
20
+ }
@@ -0,0 +1,131 @@
1
+ import { useState } from 'react';
2
+ import { Pressable, Text, View } from 'react-native';
3
+ import { getThemeClasses } from '../../../../utils/theme.utils';
4
+ import { getFlightStatusStyle } from '../../../../utils/flight.utils';
5
+ import { resolveText } from '../../../../utils/i18n.utils';
6
+ import { Collapsible } from '../common/collapsible.native';
7
+ import { PlaneIcon } from '../common/plane-icon.native';
8
+ import { ChevronIcon } from '../common/chevron-icon.native';
9
+ import { FlightStatus, Theme } from '../../model/chat.model';
10
+ import type { ChatComponentProps } from '../../model/chat.model';
11
+ import type { FlightItem } from './flight.model';
12
+
13
+ function FlightCard({
14
+ item,
15
+ theme,
16
+ language,
17
+ accent,
18
+ defaultExpanded,
19
+ onSelect,
20
+ }: {
21
+ item: FlightItem;
22
+ theme: Theme;
23
+ language?: string;
24
+ accent: boolean;
25
+ defaultExpanded: boolean;
26
+ onSelect?: (item: FlightItem) => void;
27
+ }) {
28
+ const c = getThemeClasses(theme);
29
+ const [expanded, setExpanded] = useState(defaultExpanded);
30
+
31
+ const s = getFlightStatusStyle(item.status ?? FlightStatus.OnTime, theme);
32
+ const statusLabel = item.statusLabel ? resolveText(item.statusLabel, language) : s.label;
33
+ const airline = resolveText(item.airline, language);
34
+ const fromCity = resolveText(item.from.city, language);
35
+ const toCity = resolveText(item.to.city, language);
36
+ const subline = item.date
37
+ ? `${resolveText(item.date, language)}${item.terminal ? ` · ${resolveText(item.terminal, language)}` : ''}`
38
+ : '';
39
+ const compact = `${item.from.code} → ${item.to.code} · ${item.from.time}`;
40
+
41
+ const iconBg = accent ? c.iconBg : c.mutedIconBg;
42
+ const iconColor = accent ? c.iconColor : c.mutedIconColor;
43
+
44
+ return (
45
+ <View className={`rounded-2xl border p-3 ${c.surface} ${c.border}`}>
46
+ <Pressable
47
+ className="flex-row items-center gap-3"
48
+ onPress={() => {
49
+ setExpanded((v) => !v);
50
+ onSelect?.(item);
51
+ }}
52
+ >
53
+ <View className={`h-11 w-11 items-center justify-center rounded-xl ${iconBg}`}>
54
+ <PlaneIcon size={20} color={iconColor} />
55
+ </View>
56
+
57
+ <View className="flex-1 gap-0.5">
58
+ <Text className={`text-base font-bold down-sm:text-sm ${c.title}`} numberOfLines={2}>
59
+ {airline} · {item.flightNumber}
60
+ </Text>
61
+ <Text className={`text-xs ${c.subtitle}`} numberOfLines={1}>
62
+ {expanded ? subline || compact : compact}
63
+ </Text>
64
+ </View>
65
+
66
+ <View className={`flex-row items-center gap-1.5 rounded-full px-2.5 py-1 ${s.badgeBg}`}>
67
+ {s.showDot ? <View className={`h-1.5 w-1.5 rounded-full ${s.dot}`} /> : null}
68
+ <Text className={`text-xs font-semibold ${s.badgeText}`}>{statusLabel}</Text>
69
+ </View>
70
+
71
+ <View className={expanded ? 'rotate-180' : undefined}>
72
+ <ChevronIcon size={18} color={c.mutedIconColor} />
73
+ </View>
74
+ </Pressable>
75
+
76
+ <Collapsible expanded={expanded}>
77
+ <View className="mt-4 flex-row items-center">
78
+ <View className="items-start">
79
+ <Text className={`text-3xl font-bold down-sm:text-2xl ${c.title}`}>{item.from.code}</Text>
80
+ <Text className={`text-base font-semibold ${c.title}`}>{item.from.time}</Text>
81
+ <Text className={`text-xs ${c.subtitle}`}>{fromCity}</Text>
82
+ </View>
83
+
84
+ <View className="flex-1 items-center px-3">
85
+ {item.duration ? <Text className={`mb-1 text-xs ${c.subtitle}`}>{item.duration}</Text> : null}
86
+ <View className="w-full flex-row items-center">
87
+ <View className={`h-2 w-2 rounded-full ${s.dot}`} />
88
+ <View className={`flex-1 border-t border-dashed ${c.dashLine}`} />
89
+ <View className="rotate-90">
90
+ <PlaneIcon size={16} color={c.iconColor} />
91
+ </View>
92
+ <View className={`flex-1 border-t border-dashed ${c.dashLine}`} />
93
+ <View className={`h-2 w-2 rounded-full ${s.dot}`} />
94
+ </View>
95
+ </View>
96
+
97
+ <View className="items-end">
98
+ <Text className={`text-3xl font-bold down-sm:text-2xl ${c.title}`}>{item.to.code}</Text>
99
+ <Text className={`text-base font-semibold ${c.title}`}>{item.to.time}</Text>
100
+ <Text className={`text-xs ${c.subtitle}`}>{toCity}</Text>
101
+ </View>
102
+ </View>
103
+ </Collapsible>
104
+ </View>
105
+ );
106
+ }
107
+
108
+ export function Flight({
109
+ data,
110
+ theme = Theme.Dark,
111
+ language,
112
+ onSelect,
113
+ }: ChatComponentProps<FlightItem>) {
114
+ const items = Array.isArray(data) ? data : [data];
115
+
116
+ return (
117
+ <View className="gap-3">
118
+ {items.map((item, index) => (
119
+ <FlightCard
120
+ key={item.id}
121
+ item={item}
122
+ theme={theme}
123
+ language={language}
124
+ accent={index === 0}
125
+ defaultExpanded={index === 0}
126
+ onSelect={onSelect}
127
+ />
128
+ ))}
129
+ </View>
130
+ );
131
+ }
@@ -0,0 +1,131 @@
1
+ import { useState } from 'react';
2
+ import { getThemeClasses } from '../../../../utils/theme.utils';
3
+ import { getFlightStatusStyle } from '../../../../utils/flight.utils';
4
+ import { resolveText } from '../../../../utils/i18n.utils';
5
+ import { Collapsible } from '../common/collapsible';
6
+ import { PlaneIcon } from '../common/plane-icon';
7
+ import { ChevronIcon } from '../common/chevron-icon';
8
+ import { FlightStatus, Theme } from '../../model/chat.model';
9
+ import type { ChatComponentProps } from '../../model/chat.model';
10
+ import type { FlightItem } from './flight.model';
11
+
12
+ function FlightCard({
13
+ item,
14
+ theme,
15
+ language,
16
+ accent,
17
+ defaultExpanded,
18
+ onSelect,
19
+ }: {
20
+ item: FlightItem;
21
+ theme: Theme;
22
+ language?: string;
23
+ accent: boolean;
24
+ defaultExpanded: boolean;
25
+ onSelect?: (item: FlightItem) => void;
26
+ }) {
27
+ const c = getThemeClasses(theme);
28
+ const [expanded, setExpanded] = useState(defaultExpanded);
29
+
30
+ const s = getFlightStatusStyle(item.status ?? FlightStatus.OnTime, theme);
31
+ const statusLabel = item.statusLabel ? resolveText(item.statusLabel, language) : s.label;
32
+ const airline = resolveText(item.airline, language);
33
+ const fromCity = resolveText(item.from.city, language);
34
+ const toCity = resolveText(item.to.city, language);
35
+ const subline = item.date
36
+ ? `${resolveText(item.date, language)}${item.terminal ? ` · ${resolveText(item.terminal, language)}` : ''}`
37
+ : '';
38
+ const compact = `${item.from.code} → ${item.to.code} · ${item.from.time}`;
39
+
40
+ const iconBg = accent ? c.iconBg : c.mutedIconBg;
41
+ const iconColor = accent ? c.iconColor : c.mutedIconColor;
42
+
43
+ return (
44
+ <div className={`rounded-2xl border p-3 ${c.surface} ${c.border}`}>
45
+ <button
46
+ type="button"
47
+ className="flex w-full items-center gap-3 text-left"
48
+ onClick={() => {
49
+ setExpanded((v) => !v);
50
+ onSelect?.(item);
51
+ }}
52
+ >
53
+ <div className={`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl ${iconBg}`}>
54
+ <PlaneIcon size={20} color={iconColor} />
55
+ </div>
56
+
57
+ <div className="flex min-w-0 flex-1 flex-col gap-0.5">
58
+ <span className={`text-base font-bold down-sm:text-sm ${c.title}`}>
59
+ {airline} · {item.flightNumber}
60
+ </span>
61
+ <span className={`truncate text-xs ${c.subtitle}`}>
62
+ {expanded ? subline || compact : compact}
63
+ </span>
64
+ </div>
65
+
66
+ <div className={`flex shrink-0 items-center gap-1.5 rounded-full px-2.5 py-1 ${s.badgeBg}`}>
67
+ {s.showDot ? <span className={`h-1.5 w-1.5 rounded-full ${s.dot}`} /> : null}
68
+ <span className={`text-xs font-semibold ${s.badgeText}`}>{statusLabel}</span>
69
+ </div>
70
+
71
+ <span className={`shrink-0 transition-transform ${expanded ? 'rotate-180' : ''}`}>
72
+ <ChevronIcon size={18} color={c.mutedIconColor} />
73
+ </span>
74
+ </button>
75
+
76
+ <Collapsible expanded={expanded}>
77
+ <div className="mt-4 flex items-center">
78
+ <div className="flex flex-col items-start">
79
+ <span className={`text-3xl font-bold down-sm:text-2xl ${c.title}`}>{item.from.code}</span>
80
+ <span className={`text-base font-semibold ${c.title}`}>{item.from.time}</span>
81
+ <span className={`text-xs ${c.subtitle}`}>{fromCity}</span>
82
+ </div>
83
+
84
+ <div className="flex flex-1 flex-col items-center px-3">
85
+ {item.duration ? <span className={`mb-1 text-xs ${c.subtitle}`}>{item.duration}</span> : null}
86
+ <div className="flex w-full items-center">
87
+ <span className={`h-2 w-2 shrink-0 rounded-full ${s.dot}`} />
88
+ <span className={`flex-1 border-t border-dashed ${c.dashLine}`} />
89
+ <span className="rotate-90">
90
+ <PlaneIcon size={16} color={c.iconColor} />
91
+ </span>
92
+ <span className={`flex-1 border-t border-dashed ${c.dashLine}`} />
93
+ <span className={`h-2 w-2 shrink-0 rounded-full ${s.dot}`} />
94
+ </div>
95
+ </div>
96
+
97
+ <div className="flex flex-col items-end">
98
+ <span className={`text-3xl font-bold down-sm:text-2xl ${c.title}`}>{item.to.code}</span>
99
+ <span className={`text-base font-semibold ${c.title}`}>{item.to.time}</span>
100
+ <span className={`text-xs ${c.subtitle}`}>{toCity}</span>
101
+ </div>
102
+ </div>
103
+ </Collapsible>
104
+ </div>
105
+ );
106
+ }
107
+
108
+ export function Flight({
109
+ data,
110
+ theme = Theme.Dark,
111
+ language,
112
+ onSelect,
113
+ }: ChatComponentProps<FlightItem>) {
114
+ const items = Array.isArray(data) ? data : [data];
115
+
116
+ return (
117
+ <div className="flex flex-col gap-3">
118
+ {items.map((item, index) => (
119
+ <FlightCard
120
+ key={item.id}
121
+ item={item}
122
+ theme={theme}
123
+ language={language}
124
+ accent={index === 0}
125
+ defaultExpanded={index === 0}
126
+ onSelect={onSelect}
127
+ />
128
+ ))}
129
+ </div>
130
+ );
131
+ }
@@ -0,0 +1,2 @@
1
+ export { Flight } from './flight';
2
+ export type { FlightItem, Airport } from './flight.model';
@@ -0,0 +1,23 @@
1
+ import type { FlightStatus, LocalizedText } from '../../model/chat.model';
2
+
3
+ export interface FlightRow {
4
+ id: number;
5
+ time: string;
6
+ city: LocalizedText;
7
+ code: string;
8
+ airline: LocalizedText;
9
+ flightNumber: string;
10
+ gate?: string;
11
+ status?: FlightStatus;
12
+ statusLabel?: LocalizedText;
13
+ accent?: string;
14
+ }
15
+
16
+ export interface FlightBoardItem {
17
+ airport: LocalizedText;
18
+ code: string;
19
+ updatedAt?: string;
20
+ live?: boolean;
21
+ departures: FlightRow[];
22
+ arrivals?: FlightRow[];
23
+ }
@@ -0,0 +1,155 @@
1
+ import { Fragment, useState } from 'react';
2
+ import { Pressable, Text, View } from 'react-native';
3
+ import { getThemeClasses } from '../../../../utils/theme.utils';
4
+ import { getFlightStatusStyle } from '../../../../utils/flight.utils';
5
+ import { resolveText } from '../../../../utils/i18n.utils';
6
+ import { useExpandableList } from '../../../../utils/use-expandable-list';
7
+ import { Collapsible } from '../common/collapsible.native';
8
+ import { PlaneIcon } from '../common/plane-icon.native';
9
+ import { ChevronIcon } from '../common/chevron-icon.native';
10
+ import { FlightStatus, Theme } from '../../model/chat.model';
11
+ import type { ChatComponentProps } from '../../model/chat.model';
12
+ import type { FlightBoardItem, FlightRow } from './flight-board.model';
13
+
14
+ const BOARD_COLLAPSED_COUNT = 5;
15
+ type Tab = 'departures' | 'arrivals';
16
+
17
+ export function FlightBoard({
18
+ data,
19
+ theme = Theme.Dark,
20
+ language,
21
+ onSelect,
22
+ }: ChatComponentProps<FlightBoardItem>) {
23
+ const c = getThemeClasses(theme);
24
+ const board = Array.isArray(data) ? data[0] : data;
25
+ const [tab, setTab] = useState<Tab>('departures');
26
+ const onSelectRow = onSelect as ((row: FlightRow) => void) | undefined;
27
+
28
+ const arrivals = board?.arrivals ?? [];
29
+ const hasArrivals = arrivals.length > 0;
30
+ const rows = tab === 'arrivals' ? arrivals : board?.departures ?? [];
31
+ const { head, rest, expanded, hasMore, toggle } = useExpandableList(rows, BOARD_COLLAPSED_COUNT);
32
+
33
+ if (!board) return null;
34
+
35
+ const airport = resolveText(board.airport, language);
36
+ const noun = tab === 'arrivals' ? 'arrivals' : 'departures';
37
+
38
+ const renderRow = (row: FlightRow) => {
39
+ const s = getFlightStatusStyle(row.status ?? FlightStatus.OnTime, theme);
40
+ const statusLabel = row.statusLabel ? resolveText(row.statusLabel, language) : s.label;
41
+ const city = resolveText(row.city, language);
42
+ const airline = resolveText(row.airline, language);
43
+
44
+ return (
45
+ <Pressable className="flex-row items-center gap-2 py-2.5" onPress={() => onSelectRow?.(row)}>
46
+ <Text className={`w-12 text-sm font-bold ${c.title}`}>{row.time}</Text>
47
+
48
+ <View className="flex-1 flex-row items-center gap-2">
49
+ <View
50
+ className="h-2 w-2 rounded-full"
51
+ style={{ backgroundColor: row.accent ?? c.iconColor }}
52
+ />
53
+ <View className="flex-1">
54
+ <Text className={`text-sm font-semibold ${c.title}`} numberOfLines={1}>
55
+ {city} · {row.code}
56
+ </Text>
57
+ <Text className={`text-xs ${c.subtitle}`} numberOfLines={1}>
58
+ {airline} · {row.flightNumber}
59
+ </Text>
60
+ </View>
61
+ </View>
62
+
63
+ <Text className={`w-10 text-center text-sm font-semibold ${c.title}`}>{row.gate ?? '—'}</Text>
64
+
65
+ <View className={`items-end rounded-full px-2 py-1 ${s.badgeBg}`}>
66
+ <Text className={`text-xs font-semibold ${s.badgeText}`}>{statusLabel}</Text>
67
+ </View>
68
+ </Pressable>
69
+ );
70
+ };
71
+
72
+ return (
73
+ <View className={`rounded-2xl border p-3 ${c.surface} ${c.border}`}>
74
+ <View className="flex-row items-center gap-3">
75
+ <View className={`h-11 w-11 items-center justify-center rounded-xl ${c.iconBg}`}>
76
+ <PlaneIcon size={20} color={c.iconColor} />
77
+ </View>
78
+
79
+ <View className="flex-1">
80
+ <Text className={`text-base font-bold ${c.title}`} numberOfLines={1}>
81
+ {airport} · {board.code}
82
+ </Text>
83
+ <View className="flex-row items-center gap-1.5">
84
+ {board.live ? <View className="h-1.5 w-1.5 rounded-full bg-emerald-400" /> : null}
85
+ <Text className={`text-xs ${c.subtitle}`} numberOfLines={1}>
86
+ {board.live ? 'Live' : 'Schedule'}
87
+ {board.updatedAt ? ` · updated ${board.updatedAt}` : ''}
88
+ </Text>
89
+ </View>
90
+ </View>
91
+
92
+ {hasArrivals ? (
93
+ <View className="flex-row rounded-full bg-black/20 p-0.5">
94
+ {(['departures', 'arrivals'] as Tab[]).map((t) => (
95
+ <Pressable
96
+ key={t}
97
+ onPress={() => setTab(t)}
98
+ className={`rounded-full px-3 py-1 ${tab === t ? 'bg-indigo-500' : ''}`}
99
+ >
100
+ <Text className={`text-xs font-semibold ${tab === t ? 'text-white' : c.subtitle}`}>
101
+ {t === 'arrivals' ? 'Arrivals' : 'Departures'}
102
+ </Text>
103
+ </Pressable>
104
+ ))}
105
+ </View>
106
+ ) : null}
107
+ </View>
108
+
109
+ <View className={`my-3 h-px ${c.divider}`} />
110
+
111
+ <View className="flex-row items-center gap-2 pb-1">
112
+ <Text className={`w-12 text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`}>Time</Text>
113
+ <Text className={`flex-1 text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`}>
114
+ Flight · Destination
115
+ </Text>
116
+ <Text className={`w-10 text-center text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`}>
117
+ Gate
118
+ </Text>
119
+ <Text className={`text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`}>Status</Text>
120
+ </View>
121
+
122
+ {head.map((row, index) => (
123
+ <Fragment key={row.id}>
124
+ {index > 0 ? <View className={`h-px ${c.divider}`} /> : null}
125
+ {renderRow(row)}
126
+ </Fragment>
127
+ ))}
128
+
129
+ {hasMore ? (
130
+ <Collapsible expanded={expanded}>
131
+ {rest.map((row) => (
132
+ <Fragment key={row.id}>
133
+ <View className={`h-px ${c.divider}`} />
134
+ {renderRow(row)}
135
+ </Fragment>
136
+ ))}
137
+ </Collapsible>
138
+ ) : null}
139
+
140
+ {hasMore ? (
141
+ <Pressable
142
+ onPress={toggle}
143
+ className={`mt-2 flex-row items-center justify-center gap-1.5 rounded-xl border py-2 ${c.actionBorder}`}
144
+ >
145
+ <Text className={`text-sm font-medium ${c.actionText}`}>
146
+ {expanded ? 'Show less' : `View all ${noun}`}
147
+ </Text>
148
+ <View className={expanded ? 'rotate-180' : undefined}>
149
+ <ChevronIcon size={16} color={c.mutedIconColor} />
150
+ </View>
151
+ </Pressable>
152
+ ) : null}
153
+ </View>
154
+ );
155
+ }
@@ -0,0 +1,160 @@
1
+ import { Fragment, useState } from 'react';
2
+ import { getThemeClasses } from '../../../../utils/theme.utils';
3
+ import { getFlightStatusStyle } from '../../../../utils/flight.utils';
4
+ import { resolveText } from '../../../../utils/i18n.utils';
5
+ import { useExpandableList } from '../../../../utils/use-expandable-list';
6
+ import { Collapsible } from '../common/collapsible';
7
+ import { PlaneIcon } from '../common/plane-icon';
8
+ import { ChevronIcon } from '../common/chevron-icon';
9
+ import { FlightStatus, Theme } from '../../model/chat.model';
10
+ import type { ChatComponentProps } from '../../model/chat.model';
11
+ import type { FlightBoardItem, FlightRow } from './flight-board.model';
12
+
13
+ const BOARD_COLLAPSED_COUNT = 5;
14
+ type Tab = 'departures' | 'arrivals';
15
+
16
+ export function FlightBoard({
17
+ data,
18
+ theme = Theme.Dark,
19
+ language,
20
+ onSelect,
21
+ }: ChatComponentProps<FlightBoardItem>) {
22
+ const c = getThemeClasses(theme);
23
+ const board = Array.isArray(data) ? data[0] : data;
24
+ const [tab, setTab] = useState<Tab>('departures');
25
+ const onSelectRow = onSelect as ((row: FlightRow) => void) | undefined;
26
+
27
+ const arrivals = board?.arrivals ?? [];
28
+ const hasArrivals = arrivals.length > 0;
29
+ const rows = tab === 'arrivals' ? arrivals : board?.departures ?? [];
30
+ const { head, rest, expanded, hasMore, toggle } = useExpandableList(rows, BOARD_COLLAPSED_COUNT);
31
+
32
+ if (!board) return null;
33
+
34
+ const airport = resolveText(board.airport, language);
35
+ const noun = tab === 'arrivals' ? 'arrivals' : 'departures';
36
+
37
+ const renderRow = (row: FlightRow) => {
38
+ const s = getFlightStatusStyle(row.status ?? FlightStatus.OnTime, theme);
39
+ const statusLabel = row.statusLabel ? resolveText(row.statusLabel, language) : s.label;
40
+ const city = resolveText(row.city, language);
41
+ const airline = resolveText(row.airline, language);
42
+
43
+ return (
44
+ <button
45
+ type="button"
46
+ className="flex w-full items-center gap-2 py-2.5 text-left"
47
+ onClick={() => onSelectRow?.(row)}
48
+ >
49
+ <span className={`w-12 shrink-0 text-sm font-bold ${c.title}`}>{row.time}</span>
50
+
51
+ <span className="flex min-w-0 flex-1 items-center gap-2">
52
+ <span
53
+ className="h-2 w-2 shrink-0 rounded-full"
54
+ style={{ backgroundColor: row.accent ?? c.iconColor }}
55
+ />
56
+ <span className="flex min-w-0 flex-1 flex-col">
57
+ <span className={`truncate text-sm font-semibold ${c.title}`}>
58
+ {city} · {row.code}
59
+ </span>
60
+ <span className={`truncate text-xs ${c.subtitle}`}>
61
+ {airline} · {row.flightNumber}
62
+ </span>
63
+ </span>
64
+ </span>
65
+
66
+ <span className={`w-10 shrink-0 text-center text-sm font-semibold ${c.title}`}>{row.gate ?? '—'}</span>
67
+
68
+ <span className={`shrink-0 rounded-full px-2 py-1 text-xs font-semibold ${s.badgeBg} ${s.badgeText}`}>
69
+ {statusLabel}
70
+ </span>
71
+ </button>
72
+ );
73
+ };
74
+
75
+ return (
76
+ <div className={`rounded-2xl border p-3 ${c.surface} ${c.border}`}>
77
+ <div className="flex items-center gap-3">
78
+ <div className={`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl ${c.iconBg}`}>
79
+ <PlaneIcon size={20} color={c.iconColor} />
80
+ </div>
81
+
82
+ <div className="flex min-w-0 flex-1 flex-col">
83
+ <span className={`truncate text-base font-bold ${c.title}`}>
84
+ {airport} · {board.code}
85
+ </span>
86
+ <span className="flex items-center gap-1.5">
87
+ {board.live ? <span className="h-1.5 w-1.5 rounded-full bg-emerald-400" /> : null}
88
+ <span className={`truncate text-xs ${c.subtitle}`}>
89
+ {board.live ? 'Live' : 'Schedule'}
90
+ {board.updatedAt ? ` · updated ${board.updatedAt}` : ''}
91
+ </span>
92
+ </span>
93
+ </div>
94
+
95
+ {hasArrivals ? (
96
+ <div className="flex shrink-0 rounded-full bg-black/20 p-0.5">
97
+ {(['departures', 'arrivals'] as Tab[]).map((t) => (
98
+ <button
99
+ key={t}
100
+ type="button"
101
+ onClick={() => setTab(t)}
102
+ className={`rounded-full px-3 py-1 text-xs font-semibold ${
103
+ tab === t ? 'bg-indigo-500 text-white' : c.subtitle
104
+ }`}
105
+ >
106
+ {t === 'arrivals' ? 'Arrivals' : 'Departures'}
107
+ </button>
108
+ ))}
109
+ </div>
110
+ ) : null}
111
+ </div>
112
+
113
+ <div className={`my-3 h-px ${c.divider}`} />
114
+
115
+ <div className="flex items-center gap-2 pb-1">
116
+ <span className={`w-12 shrink-0 text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`}>
117
+ Time
118
+ </span>
119
+ <span className={`flex-1 text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`}>
120
+ Flight · Destination
121
+ </span>
122
+ <span className={`w-10 shrink-0 text-center text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`}>
123
+ Gate
124
+ </span>
125
+ <span className={`text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`}>Status</span>
126
+ </div>
127
+
128
+ {head.map((row, index) => (
129
+ <Fragment key={row.id}>
130
+ {index > 0 ? <div className={`h-px ${c.divider}`} /> : null}
131
+ {renderRow(row)}
132
+ </Fragment>
133
+ ))}
134
+
135
+ {hasMore ? (
136
+ <Collapsible expanded={expanded}>
137
+ {rest.map((row) => (
138
+ <Fragment key={row.id}>
139
+ <div className={`h-px ${c.divider}`} />
140
+ {renderRow(row)}
141
+ </Fragment>
142
+ ))}
143
+ </Collapsible>
144
+ ) : null}
145
+
146
+ {hasMore ? (
147
+ <button
148
+ type="button"
149
+ onClick={toggle}
150
+ className={`mt-2 flex w-full items-center justify-center gap-1.5 rounded-xl border py-2 text-sm font-medium ${c.actionBorder} ${c.actionText}`}
151
+ >
152
+ {expanded ? 'Show less' : `View all ${noun}`}
153
+ <span className={`transition-transform ${expanded ? 'rotate-180' : ''}`}>
154
+ <ChevronIcon size={16} color={c.mutedIconColor} />
155
+ </span>
156
+ </button>
157
+ ) : null}
158
+ </div>
159
+ );
160
+ }
@@ -0,0 +1,2 @@
1
+ export { FlightBoard } from './flight-board';
2
+ export type { FlightBoardItem, FlightRow } from './flight-board.model';
@@ -3,4 +3,7 @@ import type { LocalizedText } from '../../model/chat.model';
3
3
  export interface InfoItem {
4
4
  name: LocalizedText;
5
5
  description: LocalizedText;
6
+ kicker?: LocalizedText;
7
+ image?: string;
8
+ actionLabel?: LocalizedText;
6
9
  }