@inorain_development/hotel-smarters-chat-ui 1.2.1 → 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.
- package/lib/commonjs/features/chat/components/common/calendar-icon.js +33 -0
- package/lib/commonjs/features/chat/components/common/calendar-icon.js.map +1 -0
- package/lib/commonjs/features/chat/components/common/calendar-icon.native.js +33 -0
- package/lib/commonjs/features/chat/components/common/calendar-icon.native.js.map +1 -0
- package/lib/commonjs/features/chat/components/common/cart-icon.js +36 -0
- package/lib/commonjs/features/chat/components/common/cart-icon.js.map +1 -0
- package/lib/commonjs/features/chat/components/common/chevron-icon.js +26 -0
- package/lib/commonjs/features/chat/components/common/chevron-icon.js.map +1 -0
- package/lib/commonjs/features/chat/components/common/chevron-icon.native.js +26 -0
- package/lib/commonjs/features/chat/components/common/chevron-icon.native.js.map +1 -0
- package/lib/commonjs/features/chat/components/common/plane-icon.js +23 -0
- package/lib/commonjs/features/chat/components/common/plane-icon.js.map +1 -0
- package/lib/commonjs/features/chat/components/common/plane-icon.native.js +23 -0
- package/lib/commonjs/features/chat/components/common/plane-icon.native.js.map +1 -0
- package/lib/commonjs/features/chat/components/event/event.js +5 -3
- package/lib/commonjs/features/chat/components/event/event.js.map +1 -1
- package/lib/commonjs/features/chat/components/event/event.native.js +5 -3
- package/lib/commonjs/features/chat/components/event/event.native.js.map +1 -1
- package/lib/commonjs/features/chat/components/flight/flight-card.js +130 -0
- package/lib/commonjs/features/chat/components/flight/flight-card.js.map +1 -0
- package/lib/commonjs/features/chat/components/flight/flight-card.native.js +132 -0
- package/lib/commonjs/features/chat/components/flight/flight-card.native.js.map +1 -0
- package/lib/commonjs/features/chat/components/flight/flight.js +149 -0
- package/lib/commonjs/features/chat/components/flight/flight.js.map +1 -0
- package/lib/commonjs/features/chat/components/flight/flight.model.js +6 -0
- package/lib/commonjs/features/chat/components/flight/flight.model.js.map +1 -0
- package/lib/commonjs/features/chat/components/flight/flight.native.js +151 -0
- package/lib/commonjs/features/chat/components/flight/flight.native.js.map +1 -0
- package/lib/commonjs/features/chat/components/flight/index.js +13 -0
- package/lib/commonjs/features/chat/components/flight/index.js.map +1 -0
- package/lib/commonjs/features/chat/components/flight-board/flight-board.js +154 -0
- package/lib/commonjs/features/chat/components/flight-board/flight-board.js.map +1 -0
- package/lib/commonjs/features/chat/components/flight-board/flight-board.model.js +6 -0
- package/lib/commonjs/features/chat/components/flight-board/flight-board.model.js.map +1 -0
- package/lib/commonjs/features/chat/components/flight-board/flight-board.native.js +165 -0
- package/lib/commonjs/features/chat/components/flight-board/flight-board.native.js.map +1 -0
- package/lib/commonjs/features/chat/components/flight-board/index.js +13 -0
- package/lib/commonjs/features/chat/components/flight-board/index.js.map +1 -0
- package/lib/commonjs/features/chat/components/info/info.js +41 -14
- package/lib/commonjs/features/chat/components/info/info.js.map +1 -1
- package/lib/commonjs/features/chat/components/info/info.native.js +45 -14
- package/lib/commonjs/features/chat/components/info/info.native.js.map +1 -1
- package/lib/commonjs/features/chat/components/order/index.js +20 -0
- package/lib/commonjs/features/chat/components/order/index.js.map +1 -0
- package/lib/commonjs/features/chat/components/order/order.js +171 -0
- package/lib/commonjs/features/chat/components/order/order.js.map +1 -0
- package/lib/commonjs/features/chat/components/order/order.model.js +15 -0
- package/lib/commonjs/features/chat/components/order/order.model.js.map +1 -0
- package/lib/commonjs/features/chat/components/order/order.native.js +192 -0
- package/lib/commonjs/features/chat/components/order/order.native.js.map +1 -0
- package/lib/commonjs/features/chat/components/reservation/index.js +20 -0
- package/lib/commonjs/features/chat/components/reservation/index.js.map +1 -0
- package/lib/commonjs/features/chat/components/reservation/reservation.js +164 -0
- package/lib/commonjs/features/chat/components/reservation/reservation.js.map +1 -0
- package/lib/commonjs/features/chat/components/reservation/reservation.model.js +13 -0
- package/lib/commonjs/features/chat/components/reservation/reservation.model.js.map +1 -0
- package/lib/commonjs/features/chat/components/reservation/reservation.native.js +180 -0
- package/lib/commonjs/features/chat/components/reservation/reservation.native.js.map +1 -0
- package/lib/commonjs/features/chat/model/chat.model.js +17 -1
- package/lib/commonjs/features/chat/model/chat.model.js.map +1 -1
- package/lib/commonjs/features/chat/renderer/renderer.js +26 -0
- package/lib/commonjs/features/chat/renderer/renderer.js.map +1 -1
- package/lib/commonjs/features/chat/renderer/renderer.native.js +26 -0
- package/lib/commonjs/features/chat/renderer/renderer.native.js.map +1 -1
- package/lib/commonjs/native.js +48 -0
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/utils/flight.utils.js +86 -0
- package/lib/commonjs/utils/flight.utils.js.map +1 -0
- package/lib/commonjs/utils/order.utils.js +24 -0
- package/lib/commonjs/utils/order.utils.js.map +1 -0
- package/lib/commonjs/utils/price.utils.js +4 -4
- package/lib/commonjs/utils/price.utils.js.map +1 -1
- package/lib/commonjs/utils/reservation.utils.js +22 -0
- package/lib/commonjs/utils/reservation.utils.js.map +1 -0
- package/lib/commonjs/utils/status-badge.utils.js +75 -0
- package/lib/commonjs/utils/status-badge.utils.js.map +1 -0
- package/lib/commonjs/utils/theme.utils.js +8 -2
- package/lib/commonjs/utils/theme.utils.js.map +1 -1
- package/lib/commonjs/utils/time.utils.js +51 -0
- package/lib/commonjs/utils/time.utils.js.map +1 -0
- package/lib/commonjs/web.js +48 -0
- package/lib/commonjs/web.js.map +1 -1
- package/lib/module/features/chat/components/common/calendar-icon.js +29 -0
- package/lib/module/features/chat/components/common/calendar-icon.js.map +1 -0
- package/lib/module/features/chat/components/common/calendar-icon.native.js +29 -0
- package/lib/module/features/chat/components/common/calendar-icon.native.js.map +1 -0
- package/lib/module/features/chat/components/common/cart-icon.js +32 -0
- package/lib/module/features/chat/components/common/cart-icon.js.map +1 -0
- package/lib/module/features/chat/components/common/chevron-icon.js +22 -0
- package/lib/module/features/chat/components/common/chevron-icon.js.map +1 -0
- package/lib/module/features/chat/components/common/chevron-icon.native.js +22 -0
- package/lib/module/features/chat/components/common/chevron-icon.native.js.map +1 -0
- package/lib/module/features/chat/components/common/plane-icon.js +19 -0
- package/lib/module/features/chat/components/common/plane-icon.js.map +1 -0
- package/lib/module/features/chat/components/common/plane-icon.native.js +19 -0
- package/lib/module/features/chat/components/common/plane-icon.native.js.map +1 -0
- package/lib/module/features/chat/components/event/event.js +5 -3
- package/lib/module/features/chat/components/event/event.js.map +1 -1
- package/lib/module/features/chat/components/event/event.native.js +5 -3
- package/lib/module/features/chat/components/event/event.native.js.map +1 -1
- package/lib/module/features/chat/components/flight/flight-card.js +126 -0
- package/lib/module/features/chat/components/flight/flight-card.js.map +1 -0
- package/lib/module/features/chat/components/flight/flight-card.native.js +128 -0
- package/lib/module/features/chat/components/flight/flight-card.native.js.map +1 -0
- package/lib/module/features/chat/components/flight/flight.js +145 -0
- package/lib/module/features/chat/components/flight/flight.js.map +1 -0
- package/lib/module/features/chat/components/flight/flight.model.js +4 -0
- package/lib/module/features/chat/components/flight/flight.model.js.map +1 -0
- package/lib/module/features/chat/components/flight/flight.native.js +147 -0
- package/lib/module/features/chat/components/flight/flight.native.js.map +1 -0
- package/lib/module/features/chat/components/flight/index.js +4 -0
- package/lib/module/features/chat/components/flight/index.js.map +1 -0
- package/lib/module/features/chat/components/flight-board/flight-board.js +150 -0
- package/lib/module/features/chat/components/flight-board/flight-board.js.map +1 -0
- package/lib/module/features/chat/components/flight-board/flight-board.model.js +4 -0
- package/lib/module/features/chat/components/flight-board/flight-board.model.js.map +1 -0
- package/lib/module/features/chat/components/flight-board/flight-board.native.js +161 -0
- package/lib/module/features/chat/components/flight-board/flight-board.native.js.map +1 -0
- package/lib/module/features/chat/components/flight-board/index.js +4 -0
- package/lib/module/features/chat/components/flight-board/index.js.map +1 -0
- package/lib/module/features/chat/components/info/info.js +41 -14
- package/lib/module/features/chat/components/info/info.js.map +1 -1
- package/lib/module/features/chat/components/info/info.native.js +46 -15
- package/lib/module/features/chat/components/info/info.native.js.map +1 -1
- package/lib/module/features/chat/components/order/index.js +5 -0
- package/lib/module/features/chat/components/order/index.js.map +1 -0
- package/lib/module/features/chat/components/order/order.js +167 -0
- package/lib/module/features/chat/components/order/order.js.map +1 -0
- package/lib/module/features/chat/components/order/order.model.js +11 -0
- package/lib/module/features/chat/components/order/order.model.js.map +1 -0
- package/lib/module/features/chat/components/order/order.native.js +188 -0
- package/lib/module/features/chat/components/order/order.native.js.map +1 -0
- package/lib/module/features/chat/components/reservation/index.js +5 -0
- package/lib/module/features/chat/components/reservation/index.js.map +1 -0
- package/lib/module/features/chat/components/reservation/reservation.js +160 -0
- package/lib/module/features/chat/components/reservation/reservation.js.map +1 -0
- package/lib/module/features/chat/components/reservation/reservation.model.js +9 -0
- package/lib/module/features/chat/components/reservation/reservation.model.js.map +1 -0
- package/lib/module/features/chat/components/reservation/reservation.native.js +176 -0
- package/lib/module/features/chat/components/reservation/reservation.native.js.map +1 -0
- package/lib/module/features/chat/model/chat.model.js +16 -0
- package/lib/module/features/chat/model/chat.model.js.map +1 -1
- package/lib/module/features/chat/renderer/renderer.js +26 -0
- package/lib/module/features/chat/renderer/renderer.js.map +1 -1
- package/lib/module/features/chat/renderer/renderer.native.js +26 -0
- package/lib/module/features/chat/renderer/renderer.native.js.map +1 -1
- package/lib/module/native.js +7 -1
- package/lib/module/native.js.map +1 -1
- package/lib/module/utils/flight.utils.js +82 -0
- package/lib/module/utils/flight.utils.js.map +1 -0
- package/lib/module/utils/order.utils.js +20 -0
- package/lib/module/utils/order.utils.js.map +1 -0
- package/lib/module/utils/price.utils.js +4 -4
- package/lib/module/utils/price.utils.js.map +1 -1
- package/lib/module/utils/reservation.utils.js +18 -0
- package/lib/module/utils/reservation.utils.js.map +1 -0
- package/lib/module/utils/status-badge.utils.js +70 -0
- package/lib/module/utils/status-badge.utils.js.map +1 -0
- package/lib/module/utils/theme.utils.js +8 -2
- package/lib/module/utils/theme.utils.js.map +1 -1
- package/lib/module/utils/time.utils.js +46 -0
- package/lib/module/utils/time.utils.js.map +1 -0
- package/lib/module/web.js +7 -1
- package/lib/module/web.js.map +1 -1
- package/lib/typescript/commonjs/features/chat/components/common/calendar-icon.d.ts +6 -0
- package/lib/typescript/commonjs/features/chat/components/common/calendar-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/common/calendar-icon.native.d.ts +6 -0
- package/lib/typescript/commonjs/features/chat/components/common/calendar-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/common/cart-icon.d.ts +6 -0
- package/lib/typescript/commonjs/features/chat/components/common/cart-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/common/chevron-icon.d.ts +6 -0
- package/lib/typescript/commonjs/features/chat/components/common/chevron-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/common/chevron-icon.native.d.ts +6 -0
- package/lib/typescript/commonjs/features/chat/components/common/chevron-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/common/plane-icon.d.ts +6 -0
- package/lib/typescript/commonjs/features/chat/components/common/plane-icon.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/common/plane-icon.native.d.ts +6 -0
- package/lib/typescript/commonjs/features/chat/components/common/plane-icon.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/event/event.d.ts.map +1 -1
- package/lib/typescript/commonjs/features/chat/components/event/event.model.d.ts +3 -1
- package/lib/typescript/commonjs/features/chat/components/event/event.model.d.ts.map +1 -1
- package/lib/typescript/commonjs/features/chat/components/event/event.native.d.ts.map +1 -1
- package/lib/typescript/commonjs/features/chat/components/flight/flight-card.d.ts +12 -0
- package/lib/typescript/commonjs/features/chat/components/flight/flight-card.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/flight/flight-card.native.d.ts +12 -0
- package/lib/typescript/commonjs/features/chat/components/flight/flight-card.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/flight/flight.d.ts +4 -0
- package/lib/typescript/commonjs/features/chat/components/flight/flight.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/flight/flight.model.d.ts +19 -0
- package/lib/typescript/commonjs/features/chat/components/flight/flight.model.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/flight/flight.native.d.ts +4 -0
- package/lib/typescript/commonjs/features/chat/components/flight/flight.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/flight/index.d.ts +3 -0
- package/lib/typescript/commonjs/features/chat/components/flight/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.d.ts +4 -0
- package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.model.d.ts +22 -0
- package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.model.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.native.d.ts +4 -0
- package/lib/typescript/commonjs/features/chat/components/flight-board/flight-board.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/flight-board/index.d.ts +3 -0
- package/lib/typescript/commonjs/features/chat/components/flight-board/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/info/info.d.ts +1 -1
- package/lib/typescript/commonjs/features/chat/components/info/info.d.ts.map +1 -1
- package/lib/typescript/commonjs/features/chat/components/info/info.model.d.ts +3 -0
- package/lib/typescript/commonjs/features/chat/components/info/info.model.d.ts.map +1 -1
- package/lib/typescript/commonjs/features/chat/components/info/info.native.d.ts +1 -1
- package/lib/typescript/commonjs/features/chat/components/info/info.native.d.ts.map +1 -1
- package/lib/typescript/commonjs/features/chat/components/order/index.d.ts +4 -0
- package/lib/typescript/commonjs/features/chat/components/order/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/order/order.d.ts +4 -0
- package/lib/typescript/commonjs/features/chat/components/order/order.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/order/order.model.d.ts +30 -0
- package/lib/typescript/commonjs/features/chat/components/order/order.model.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/order/order.native.d.ts +4 -0
- package/lib/typescript/commonjs/features/chat/components/order/order.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/reservation/index.d.ts +4 -0
- package/lib/typescript/commonjs/features/chat/components/reservation/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/reservation/reservation.d.ts +4 -0
- package/lib/typescript/commonjs/features/chat/components/reservation/reservation.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/reservation/reservation.model.d.ts +27 -0
- package/lib/typescript/commonjs/features/chat/components/reservation/reservation.model.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/components/reservation/reservation.native.d.ts +4 -0
- package/lib/typescript/commonjs/features/chat/components/reservation/reservation.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/features/chat/model/chat.model.d.ts +17 -2
- package/lib/typescript/commonjs/features/chat/model/chat.model.d.ts.map +1 -1
- package/lib/typescript/commonjs/features/chat/renderer/renderer.d.ts +5 -1
- package/lib/typescript/commonjs/features/chat/renderer/renderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/features/chat/renderer/renderer.native.d.ts +5 -1
- package/lib/typescript/commonjs/features/chat/renderer/renderer.native.d.ts.map +1 -1
- package/lib/typescript/commonjs/native.d.ts +11 -1
- package/lib/typescript/commonjs/native.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/flight.utils.d.ts +10 -0
- package/lib/typescript/commonjs/utils/flight.utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/order.utils.d.ts +7 -0
- package/lib/typescript/commonjs/utils/order.utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/reservation.utils.d.ts +7 -0
- package/lib/typescript/commonjs/utils/reservation.utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/status-badge.utils.d.ts +15 -0
- package/lib/typescript/commonjs/utils/status-badge.utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/theme.utils.d.ts +3 -0
- package/lib/typescript/commonjs/utils/theme.utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/time.utils.d.ts +3 -0
- package/lib/typescript/commonjs/utils/time.utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/web.d.ts +11 -1
- package/lib/typescript/commonjs/web.d.ts.map +1 -1
- package/lib/typescript/module/features/chat/components/common/calendar-icon.d.ts +6 -0
- package/lib/typescript/module/features/chat/components/common/calendar-icon.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/common/calendar-icon.native.d.ts +6 -0
- package/lib/typescript/module/features/chat/components/common/calendar-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/common/cart-icon.d.ts +6 -0
- package/lib/typescript/module/features/chat/components/common/cart-icon.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/common/chevron-icon.d.ts +6 -0
- package/lib/typescript/module/features/chat/components/common/chevron-icon.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/common/chevron-icon.native.d.ts +6 -0
- package/lib/typescript/module/features/chat/components/common/chevron-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/common/plane-icon.d.ts +6 -0
- package/lib/typescript/module/features/chat/components/common/plane-icon.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/common/plane-icon.native.d.ts +6 -0
- package/lib/typescript/module/features/chat/components/common/plane-icon.native.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/event/event.d.ts.map +1 -1
- package/lib/typescript/module/features/chat/components/event/event.model.d.ts +3 -1
- package/lib/typescript/module/features/chat/components/event/event.model.d.ts.map +1 -1
- package/lib/typescript/module/features/chat/components/event/event.native.d.ts.map +1 -1
- package/lib/typescript/module/features/chat/components/flight/flight-card.d.ts +12 -0
- package/lib/typescript/module/features/chat/components/flight/flight-card.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/flight/flight-card.native.d.ts +12 -0
- package/lib/typescript/module/features/chat/components/flight/flight-card.native.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/flight/flight.d.ts +4 -0
- package/lib/typescript/module/features/chat/components/flight/flight.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/flight/flight.model.d.ts +19 -0
- package/lib/typescript/module/features/chat/components/flight/flight.model.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/flight/flight.native.d.ts +4 -0
- package/lib/typescript/module/features/chat/components/flight/flight.native.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/flight/index.d.ts +3 -0
- package/lib/typescript/module/features/chat/components/flight/index.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/flight-board/flight-board.d.ts +4 -0
- package/lib/typescript/module/features/chat/components/flight-board/flight-board.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/flight-board/flight-board.model.d.ts +22 -0
- package/lib/typescript/module/features/chat/components/flight-board/flight-board.model.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/flight-board/flight-board.native.d.ts +4 -0
- package/lib/typescript/module/features/chat/components/flight-board/flight-board.native.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/flight-board/index.d.ts +3 -0
- package/lib/typescript/module/features/chat/components/flight-board/index.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/info/info.d.ts +1 -1
- package/lib/typescript/module/features/chat/components/info/info.d.ts.map +1 -1
- package/lib/typescript/module/features/chat/components/info/info.model.d.ts +3 -0
- package/lib/typescript/module/features/chat/components/info/info.model.d.ts.map +1 -1
- package/lib/typescript/module/features/chat/components/info/info.native.d.ts +1 -1
- package/lib/typescript/module/features/chat/components/info/info.native.d.ts.map +1 -1
- package/lib/typescript/module/features/chat/components/order/index.d.ts +4 -0
- package/lib/typescript/module/features/chat/components/order/index.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/order/order.d.ts +4 -0
- package/lib/typescript/module/features/chat/components/order/order.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/order/order.model.d.ts +30 -0
- package/lib/typescript/module/features/chat/components/order/order.model.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/order/order.native.d.ts +4 -0
- package/lib/typescript/module/features/chat/components/order/order.native.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/reservation/index.d.ts +4 -0
- package/lib/typescript/module/features/chat/components/reservation/index.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/reservation/reservation.d.ts +4 -0
- package/lib/typescript/module/features/chat/components/reservation/reservation.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/reservation/reservation.model.d.ts +27 -0
- package/lib/typescript/module/features/chat/components/reservation/reservation.model.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/components/reservation/reservation.native.d.ts +4 -0
- package/lib/typescript/module/features/chat/components/reservation/reservation.native.d.ts.map +1 -0
- package/lib/typescript/module/features/chat/model/chat.model.d.ts +17 -2
- package/lib/typescript/module/features/chat/model/chat.model.d.ts.map +1 -1
- package/lib/typescript/module/features/chat/renderer/renderer.d.ts +5 -1
- package/lib/typescript/module/features/chat/renderer/renderer.d.ts.map +1 -1
- package/lib/typescript/module/features/chat/renderer/renderer.native.d.ts +5 -1
- package/lib/typescript/module/features/chat/renderer/renderer.native.d.ts.map +1 -1
- package/lib/typescript/module/native.d.ts +11 -1
- package/lib/typescript/module/native.d.ts.map +1 -1
- package/lib/typescript/module/utils/flight.utils.d.ts +10 -0
- package/lib/typescript/module/utils/flight.utils.d.ts.map +1 -0
- package/lib/typescript/module/utils/order.utils.d.ts +7 -0
- package/lib/typescript/module/utils/order.utils.d.ts.map +1 -0
- package/lib/typescript/module/utils/reservation.utils.d.ts +7 -0
- package/lib/typescript/module/utils/reservation.utils.d.ts.map +1 -0
- package/lib/typescript/module/utils/status-badge.utils.d.ts +15 -0
- package/lib/typescript/module/utils/status-badge.utils.d.ts.map +1 -0
- package/lib/typescript/module/utils/theme.utils.d.ts +3 -0
- package/lib/typescript/module/utils/theme.utils.d.ts.map +1 -1
- package/lib/typescript/module/utils/time.utils.d.ts +3 -0
- package/lib/typescript/module/utils/time.utils.d.ts.map +1 -0
- package/lib/typescript/module/web.d.ts +11 -1
- package/lib/typescript/module/web.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/chat/components/common/calendar-icon.native.tsx +13 -0
- package/src/features/chat/components/common/calendar-icon.tsx +13 -0
- package/src/features/chat/components/common/cart-icon.tsx +20 -0
- package/src/features/chat/components/common/chevron-icon.native.tsx +18 -0
- package/src/features/chat/components/common/chevron-icon.tsx +18 -0
- package/src/features/chat/components/common/plane-icon.native.tsx +15 -0
- package/src/features/chat/components/common/plane-icon.tsx +15 -0
- package/src/features/chat/components/event/event.model.ts +3 -1
- package/src/features/chat/components/event/event.native.tsx +6 -2
- package/src/features/chat/components/event/event.tsx +6 -2
- package/src/features/chat/components/flight/flight-card.native.tsx +100 -0
- package/src/features/chat/components/flight/flight-card.tsx +100 -0
- package/src/features/chat/components/flight/flight.model.ts +20 -0
- package/src/features/chat/components/flight/flight.native.tsx +131 -0
- package/src/features/chat/components/flight/flight.tsx +131 -0
- package/src/features/chat/components/flight/index.ts +2 -0
- package/src/features/chat/components/flight-board/flight-board.model.ts +23 -0
- package/src/features/chat/components/flight-board/flight-board.native.tsx +155 -0
- package/src/features/chat/components/flight-board/flight-board.tsx +160 -0
- package/src/features/chat/components/flight-board/index.ts +2 -0
- package/src/features/chat/components/info/info.model.ts +3 -0
- package/src/features/chat/components/info/info.native.tsx +47 -11
- package/src/features/chat/components/info/info.tsx +43 -10
- package/src/features/chat/components/order/index.ts +3 -0
- package/src/features/chat/components/order/order.model.ts +32 -0
- package/src/features/chat/components/order/order.native.tsx +175 -0
- package/src/features/chat/components/order/order.tsx +176 -0
- package/src/features/chat/components/reservation/index.ts +3 -0
- package/src/features/chat/components/reservation/reservation.model.ts +29 -0
- package/src/features/chat/components/reservation/reservation.native.tsx +159 -0
- package/src/features/chat/components/reservation/reservation.tsx +161 -0
- package/src/features/chat/model/chat.model.ts +16 -0
- package/src/features/chat/renderer/renderer.native.tsx +29 -1
- package/src/features/chat/renderer/renderer.tsx +29 -1
- package/src/native.ts +11 -1
- package/src/utils/flight.utils.ts +35 -0
- package/src/utils/order.utils.ts +28 -0
- package/src/utils/price.utils.ts +4 -4
- package/src/utils/reservation.utils.ts +23 -0
- package/src/utils/status-badge.utils.ts +36 -0
- package/src/utils/theme.utils.ts +9 -0
- package/src/utils/time.utils.ts +58 -0
- package/src/web.ts +11 -1
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FlightBoard = FlightBoard;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _themeUtils = require("../../../../utils/theme.utils.js");
|
|
9
|
+
var _flightUtils = require("../../../../utils/flight.utils.js");
|
|
10
|
+
var _i18nUtils = require("../../../../utils/i18n.utils.js");
|
|
11
|
+
var _useExpandableList = require("../../../../utils/use-expandable-list.js");
|
|
12
|
+
var _collapsible = require("../common/collapsible");
|
|
13
|
+
var _planeIcon = require("../common/plane-icon");
|
|
14
|
+
var _chevronIcon = require("../common/chevron-icon");
|
|
15
|
+
var _chatModel = require("../../model/chat.model.js");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
const BOARD_COLLAPSED_COUNT = 5;
|
|
18
|
+
function FlightBoard({
|
|
19
|
+
data,
|
|
20
|
+
theme = _chatModel.Theme.Dark,
|
|
21
|
+
language,
|
|
22
|
+
onSelect
|
|
23
|
+
}) {
|
|
24
|
+
const c = (0, _themeUtils.getThemeClasses)(theme);
|
|
25
|
+
const board = Array.isArray(data) ? data[0] : data;
|
|
26
|
+
const [tab, setTab] = (0, _react.useState)('departures');
|
|
27
|
+
const onSelectRow = onSelect;
|
|
28
|
+
const arrivals = board?.arrivals ?? [];
|
|
29
|
+
const hasArrivals = arrivals.length > 0;
|
|
30
|
+
const rows = tab === 'arrivals' ? arrivals : board?.departures ?? [];
|
|
31
|
+
const {
|
|
32
|
+
head,
|
|
33
|
+
rest,
|
|
34
|
+
expanded,
|
|
35
|
+
hasMore,
|
|
36
|
+
toggle
|
|
37
|
+
} = (0, _useExpandableList.useExpandableList)(rows, BOARD_COLLAPSED_COUNT);
|
|
38
|
+
if (!board) return null;
|
|
39
|
+
const airport = (0, _i18nUtils.resolveText)(board.airport, language);
|
|
40
|
+
const noun = tab === 'arrivals' ? 'arrivals' : 'departures';
|
|
41
|
+
const renderRow = row => {
|
|
42
|
+
const s = (0, _flightUtils.getFlightStatusStyle)(row.status ?? _chatModel.FlightStatus.OnTime, theme);
|
|
43
|
+
const statusLabel = row.statusLabel ? (0, _i18nUtils.resolveText)(row.statusLabel, language) : s.label;
|
|
44
|
+
const city = (0, _i18nUtils.resolveText)(row.city, language);
|
|
45
|
+
const airline = (0, _i18nUtils.resolveText)(row.airline, language);
|
|
46
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
47
|
+
type: "button",
|
|
48
|
+
className: "flex w-full items-center gap-2 py-2.5 text-left",
|
|
49
|
+
onClick: () => onSelectRow?.(row),
|
|
50
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
51
|
+
className: `w-12 shrink-0 text-sm font-bold ${c.title}`,
|
|
52
|
+
children: row.time
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
54
|
+
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
55
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
56
|
+
className: "h-2 w-2 shrink-0 rounded-full",
|
|
57
|
+
style: {
|
|
58
|
+
backgroundColor: row.accent ?? c.iconColor
|
|
59
|
+
}
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
61
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
62
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
63
|
+
className: `truncate text-sm font-semibold ${c.title}`,
|
|
64
|
+
children: [city, " \xB7 ", row.code]
|
|
65
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
66
|
+
className: `truncate text-xs ${c.subtitle}`,
|
|
67
|
+
children: [airline, " \xB7 ", row.flightNumber]
|
|
68
|
+
})]
|
|
69
|
+
})]
|
|
70
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
71
|
+
className: `w-10 shrink-0 text-center text-sm font-semibold ${c.title}`,
|
|
72
|
+
children: row.gate ?? '—'
|
|
73
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
74
|
+
className: `shrink-0 rounded-full px-2 py-1 text-xs font-semibold ${s.badgeBg} ${s.badgeText}`,
|
|
75
|
+
children: statusLabel
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
80
|
+
className: `rounded-2xl border p-3 ${c.surface} ${c.border}`,
|
|
81
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
82
|
+
className: "flex items-center gap-3",
|
|
83
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
84
|
+
className: `flex h-11 w-11 shrink-0 items-center justify-center rounded-xl ${c.iconBg}`,
|
|
85
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_planeIcon.PlaneIcon, {
|
|
86
|
+
size: 20,
|
|
87
|
+
color: c.iconColor
|
|
88
|
+
})
|
|
89
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
90
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
91
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
92
|
+
className: `truncate text-base font-bold ${c.title}`,
|
|
93
|
+
children: [airport, " \xB7 ", board.code]
|
|
94
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
95
|
+
className: "flex items-center gap-1.5",
|
|
96
|
+
children: [board.live ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
97
|
+
className: "h-1.5 w-1.5 rounded-full bg-emerald-400"
|
|
98
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
99
|
+
className: `truncate text-xs ${c.subtitle}`,
|
|
100
|
+
children: [board.live ? 'Live' : 'Schedule', board.updatedAt ? ` · updated ${board.updatedAt}` : '']
|
|
101
|
+
})]
|
|
102
|
+
})]
|
|
103
|
+
}), hasArrivals ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
104
|
+
className: "flex shrink-0 rounded-full bg-black/20 p-0.5",
|
|
105
|
+
children: ['departures', 'arrivals'].map(t => /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
106
|
+
type: "button",
|
|
107
|
+
onClick: () => setTab(t),
|
|
108
|
+
className: `rounded-full px-3 py-1 text-xs font-semibold ${tab === t ? 'bg-indigo-500 text-white' : c.subtitle}`,
|
|
109
|
+
children: t === 'arrivals' ? 'Arrivals' : 'Departures'
|
|
110
|
+
}, t))
|
|
111
|
+
}) : null]
|
|
112
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
113
|
+
className: `my-3 h-px ${c.divider}`
|
|
114
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
115
|
+
className: "flex items-center gap-2 pb-1",
|
|
116
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
117
|
+
className: `w-12 shrink-0 text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`,
|
|
118
|
+
children: "Time"
|
|
119
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
120
|
+
className: `flex-1 text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`,
|
|
121
|
+
children: "Flight \xB7 Destination"
|
|
122
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
123
|
+
className: `w-10 shrink-0 text-center text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`,
|
|
124
|
+
children: "Gate"
|
|
125
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
126
|
+
className: `text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`,
|
|
127
|
+
children: "Status"
|
|
128
|
+
})]
|
|
129
|
+
}), head.map((row, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
130
|
+
children: [index > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
131
|
+
className: `h-px ${c.divider}`
|
|
132
|
+
}) : null, renderRow(row)]
|
|
133
|
+
}, row.id)), hasMore ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_collapsible.Collapsible, {
|
|
134
|
+
expanded: expanded,
|
|
135
|
+
children: rest.map(row => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
136
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
137
|
+
className: `h-px ${c.divider}`
|
|
138
|
+
}), renderRow(row)]
|
|
139
|
+
}, row.id))
|
|
140
|
+
}) : null, hasMore ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
141
|
+
type: "button",
|
|
142
|
+
onClick: toggle,
|
|
143
|
+
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}`,
|
|
144
|
+
children: [expanded ? 'Show less' : `View all ${noun}`, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
145
|
+
className: `transition-transform ${expanded ? 'rotate-180' : ''}`,
|
|
146
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_chevronIcon.ChevronIcon, {
|
|
147
|
+
size: 16,
|
|
148
|
+
color: c.mutedIconColor
|
|
149
|
+
})
|
|
150
|
+
})]
|
|
151
|
+
}) : null]
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=flight-board.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_themeUtils","_flightUtils","_i18nUtils","_useExpandableList","_collapsible","_planeIcon","_chevronIcon","_chatModel","_jsxRuntime","BOARD_COLLAPSED_COUNT","FlightBoard","data","theme","Theme","Dark","language","onSelect","c","getThemeClasses","board","Array","isArray","tab","setTab","useState","onSelectRow","arrivals","hasArrivals","length","rows","departures","head","rest","expanded","hasMore","toggle","useExpandableList","airport","resolveText","noun","renderRow","row","s","getFlightStatusStyle","status","FlightStatus","OnTime","statusLabel","label","city","airline","jsxs","type","className","onClick","children","jsx","title","time","style","backgroundColor","accent","iconColor","code","subtitle","flightNumber","gate","badgeBg","badgeText","surface","border","iconBg","PlaneIcon","size","color","live","updatedAt","map","t","divider","index","Fragment","id","Collapsible","actionBorder","actionText","ChevronIcon","mutedIconColor"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/flight-board/flight-board.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AAA6D,IAAAS,WAAA,GAAAT,OAAA;AAI7D,MAAMU,qBAAqB,GAAG,CAAC;AAGxB,SAASC,WAAWA,CAAC;EAC1BC,IAAI;EACJC,KAAK,GAAGC,gBAAK,CAACC,IAAI;EAClBC,QAAQ;EACRC;AACmC,CAAC,EAAE;EACtC,MAAMC,CAAC,GAAG,IAAAC,2BAAe,EAACN,KAAK,CAAC;EAChC,MAAMO,KAAK,GAAGC,KAAK,CAACC,OAAO,CAACV,IAAI,CAAC,GAAGA,IAA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,YAAA,CAAAgF,WAAW;UAACb,IAAI,EAAE,EAAG;UAACC,KAAK,EAAEzD,CAAC,CAACsE;QAAe,CAAE;MAAC,CAC9C,CAAC;IAAA,CACD,CAAC,GACP,IAAI;EAAA,CACL,CAAC;AAEV","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["features/chat/components/flight-board/flight-board.model.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.FlightBoard = FlightBoard;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _themeUtils = require("../../../../utils/theme.utils.js");
|
|
10
|
+
var _flightUtils = require("../../../../utils/flight.utils.js");
|
|
11
|
+
var _i18nUtils = require("../../../../utils/i18n.utils.js");
|
|
12
|
+
var _useExpandableList = require("../../../../utils/use-expandable-list.js");
|
|
13
|
+
var _collapsibleNative = require("../common/collapsible.native.js");
|
|
14
|
+
var _planeIconNative = require("../common/plane-icon.native.js");
|
|
15
|
+
var _chevronIconNative = require("../common/chevron-icon.native.js");
|
|
16
|
+
var _chatModel = require("../../model/chat.model.js");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
const BOARD_COLLAPSED_COUNT = 5;
|
|
19
|
+
function FlightBoard({
|
|
20
|
+
data,
|
|
21
|
+
theme = _chatModel.Theme.Dark,
|
|
22
|
+
language,
|
|
23
|
+
onSelect
|
|
24
|
+
}) {
|
|
25
|
+
const c = (0, _themeUtils.getThemeClasses)(theme);
|
|
26
|
+
const board = Array.isArray(data) ? data[0] : data;
|
|
27
|
+
const [tab, setTab] = (0, _react.useState)('departures');
|
|
28
|
+
const onSelectRow = onSelect;
|
|
29
|
+
const arrivals = board?.arrivals ?? [];
|
|
30
|
+
const hasArrivals = arrivals.length > 0;
|
|
31
|
+
const rows = tab === 'arrivals' ? arrivals : board?.departures ?? [];
|
|
32
|
+
const {
|
|
33
|
+
head,
|
|
34
|
+
rest,
|
|
35
|
+
expanded,
|
|
36
|
+
hasMore,
|
|
37
|
+
toggle
|
|
38
|
+
} = (0, _useExpandableList.useExpandableList)(rows, BOARD_COLLAPSED_COUNT);
|
|
39
|
+
if (!board) return null;
|
|
40
|
+
const airport = (0, _i18nUtils.resolveText)(board.airport, language);
|
|
41
|
+
const noun = tab === 'arrivals' ? 'arrivals' : 'departures';
|
|
42
|
+
const renderRow = row => {
|
|
43
|
+
const s = (0, _flightUtils.getFlightStatusStyle)(row.status ?? _chatModel.FlightStatus.OnTime, theme);
|
|
44
|
+
const statusLabel = row.statusLabel ? (0, _i18nUtils.resolveText)(row.statusLabel, language) : s.label;
|
|
45
|
+
const city = (0, _i18nUtils.resolveText)(row.city, language);
|
|
46
|
+
const airline = (0, _i18nUtils.resolveText)(row.airline, language);
|
|
47
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
48
|
+
className: "flex-row items-center gap-2 py-2.5",
|
|
49
|
+
onPress: () => onSelectRow?.(row),
|
|
50
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
51
|
+
className: `w-12 text-sm font-bold ${c.title}`,
|
|
52
|
+
children: row.time
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
54
|
+
className: "flex-1 flex-row items-center gap-2",
|
|
55
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
56
|
+
className: "h-2 w-2 rounded-full",
|
|
57
|
+
style: {
|
|
58
|
+
backgroundColor: row.accent ?? c.iconColor
|
|
59
|
+
}
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
61
|
+
className: "flex-1",
|
|
62
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
63
|
+
className: `text-sm font-semibold ${c.title}`,
|
|
64
|
+
numberOfLines: 1,
|
|
65
|
+
children: [city, " \xB7 ", row.code]
|
|
66
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
67
|
+
className: `text-xs ${c.subtitle}`,
|
|
68
|
+
numberOfLines: 1,
|
|
69
|
+
children: [airline, " \xB7 ", row.flightNumber]
|
|
70
|
+
})]
|
|
71
|
+
})]
|
|
72
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
73
|
+
className: `w-10 text-center text-sm font-semibold ${c.title}`,
|
|
74
|
+
children: row.gate ?? '—'
|
|
75
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
76
|
+
className: `items-end rounded-full px-2 py-1 ${s.badgeBg}`,
|
|
77
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
78
|
+
className: `text-xs font-semibold ${s.badgeText}`,
|
|
79
|
+
children: statusLabel
|
|
80
|
+
})
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
85
|
+
className: `rounded-2xl border p-3 ${c.surface} ${c.border}`,
|
|
86
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
87
|
+
className: "flex-row items-center gap-3",
|
|
88
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
89
|
+
className: `h-11 w-11 items-center justify-center rounded-xl ${c.iconBg}`,
|
|
90
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_planeIconNative.PlaneIcon, {
|
|
91
|
+
size: 20,
|
|
92
|
+
color: c.iconColor
|
|
93
|
+
})
|
|
94
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
95
|
+
className: "flex-1",
|
|
96
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
97
|
+
className: `text-base font-bold ${c.title}`,
|
|
98
|
+
numberOfLines: 1,
|
|
99
|
+
children: [airport, " \xB7 ", board.code]
|
|
100
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
101
|
+
className: "flex-row items-center gap-1.5",
|
|
102
|
+
children: [board.live ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
103
|
+
className: "h-1.5 w-1.5 rounded-full bg-emerald-400"
|
|
104
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
105
|
+
className: `text-xs ${c.subtitle}`,
|
|
106
|
+
numberOfLines: 1,
|
|
107
|
+
children: [board.live ? 'Live' : 'Schedule', board.updatedAt ? ` · updated ${board.updatedAt}` : '']
|
|
108
|
+
})]
|
|
109
|
+
})]
|
|
110
|
+
}), hasArrivals ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
111
|
+
className: "flex-row rounded-full bg-black/20 p-0.5",
|
|
112
|
+
children: ['departures', 'arrivals'].map(t => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
113
|
+
onPress: () => setTab(t),
|
|
114
|
+
className: `rounded-full px-3 py-1 ${tab === t ? 'bg-indigo-500' : ''}`,
|
|
115
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
116
|
+
className: `text-xs font-semibold ${tab === t ? 'text-white' : c.subtitle}`,
|
|
117
|
+
children: t === 'arrivals' ? 'Arrivals' : 'Departures'
|
|
118
|
+
})
|
|
119
|
+
}, t))
|
|
120
|
+
}) : null]
|
|
121
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
122
|
+
className: `my-3 h-px ${c.divider}`
|
|
123
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
124
|
+
className: "flex-row items-center gap-2 pb-1",
|
|
125
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
126
|
+
className: `w-12 text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`,
|
|
127
|
+
children: "Time"
|
|
128
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
129
|
+
className: `flex-1 text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`,
|
|
130
|
+
children: "Flight \xB7 Destination"
|
|
131
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
132
|
+
className: `w-10 text-center text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`,
|
|
133
|
+
children: "Gate"
|
|
134
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
135
|
+
className: `text-[10px] font-semibold uppercase tracking-wide ${c.subtitle}`,
|
|
136
|
+
children: "Status"
|
|
137
|
+
})]
|
|
138
|
+
}), head.map((row, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
139
|
+
children: [index > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
140
|
+
className: `h-px ${c.divider}`
|
|
141
|
+
}) : null, renderRow(row)]
|
|
142
|
+
}, row.id)), hasMore ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_collapsibleNative.Collapsible, {
|
|
143
|
+
expanded: expanded,
|
|
144
|
+
children: rest.map(row => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
145
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
146
|
+
className: `h-px ${c.divider}`
|
|
147
|
+
}), renderRow(row)]
|
|
148
|
+
}, row.id))
|
|
149
|
+
}) : null, hasMore ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
150
|
+
onPress: toggle,
|
|
151
|
+
className: `mt-2 flex-row items-center justify-center gap-1.5 rounded-xl border py-2 ${c.actionBorder}`,
|
|
152
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
153
|
+
className: `text-sm font-medium ${c.actionText}`,
|
|
154
|
+
children: expanded ? 'Show less' : `View all ${noun}`
|
|
155
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
156
|
+
className: expanded ? 'rotate-180' : undefined,
|
|
157
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_chevronIconNative.ChevronIcon, {
|
|
158
|
+
size: 16,
|
|
159
|
+
color: c.mutedIconColor
|
|
160
|
+
})
|
|
161
|
+
})]
|
|
162
|
+
}) : null]
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=flight-board.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_themeUtils","_flightUtils","_i18nUtils","_useExpandableList","_collapsibleNative","_planeIconNative","_chevronIconNative","_chatModel","_jsxRuntime","BOARD_COLLAPSED_COUNT","FlightBoard","data","theme","Theme","Dark","language","onSelect","c","getThemeClasses","board","Array","isArray","tab","setTab","useState","onSelectRow","arrivals","hasArrivals","length","rows","departures","head","rest","expanded","hasMore","toggle","useExpandableList","airport","resolveText","noun","renderRow","row","s","getFlightStatusStyle","status","FlightStatus","OnTime","statusLabel","label","city","airline","jsxs","Pressable","className","onPress","children","jsx","Text","title","time","View","style","backgroundColor","accent","iconColor","numberOfLines","code","subtitle","flightNumber","gate","badgeBg","badgeText","surface","border","iconBg","PlaneIcon","size","color","live","updatedAt","map","t","divider","index","Fragment","id","Collapsible","actionBorder","actionText","undefined","ChevronIcon","mutedIconColor"],"sourceRoot":"../../../../../../src","sources":["features/chat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1C,SAAS,CAACC,GAAG,CAAC;MAAA,GAFFA,GAAG,CAAC4C,EAGT,CACX;IAAC,CACS,CAAC,GACZ,IAAI,EAEPnD,OAAO,gBACN,IAAA1B,WAAA,CAAA2C,IAAA,EAACpD,YAAA,CAAAqD,SAAS;MACRE,OAAO,EAAEnB,MAAO;MAChBkB,SAAS,EAAE,4EAA4EpC,CAAC,CAACsE,YAAY,EAAG;MAAAhC,QAAA,gBAExG,IAAA/C,WAAA,CAAAgD,GAAA,EAACzD,YAAA,CAAA0D,IAAI;QAACJ,SAAS,EAAE,uBAAuBpC,CAAC,CAACuE,UAAU,EAAG;QAAAjC,QAAA,EACpDtB,QAAQ,GAAG,WAAW,GAAG,YAAYM,IAAI;MAAE,CACxC,CAAC,eACP,IAAA/B,WAAA,CAAAgD,GAAA,EAACzD,YAAA,CAAA6D,IAAI;QAACP,SAAS,EAAEpB,QAAQ,GAAG,YAAY,GAAGwD,SAAU;QAAAlC,QAAA,eACnD,IAAA/C,WAAA,CAAAgD,GAAA,EAAClD,kBAAA,CAAAoF,WAAW;UAACd,IAAI,EAAE,EAAG;UAACC,KAAK,EAAE5D,CAAC,CAAC0E;QAAe,CAAE;MAAC,CAC9C,CAAC;IAAA,CACE,CAAC,GACV,IAAI;EAAA,CACJ,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "FlightBoard", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _flightBoard.FlightBoard;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _flightBoard = require("./flight-board");
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_flightBoard","require"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/flight-board/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -6,27 +6,54 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Info = Info;
|
|
7
7
|
var _themeUtils = require("../../../../utils/theme.utils.js");
|
|
8
8
|
var _i18nUtils = require("../../../../utils/i18n.utils.js");
|
|
9
|
+
var _chevronIcon = require("../common/chevron-icon");
|
|
9
10
|
var _chatModel = require("../../model/chat.model.js");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function Info({
|
|
12
13
|
data,
|
|
13
14
|
theme = _chatModel.Theme.Dark,
|
|
14
|
-
language
|
|
15
|
+
language,
|
|
16
|
+
onSelect
|
|
15
17
|
}) {
|
|
16
18
|
const c = (0, _themeUtils.getThemeClasses)(theme);
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
className: `
|
|
25
|
-
children:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
const items = Array.isArray(data) ? data : [data];
|
|
20
|
+
const renderCard = (item, index) => {
|
|
21
|
+
const name = (0, _i18nUtils.resolveText)(item.name, language);
|
|
22
|
+
const description = (0, _i18nUtils.resolveText)(item.description, language);
|
|
23
|
+
const kicker = item.kicker ? (0, _i18nUtils.resolveText)(item.kicker, language) : undefined;
|
|
24
|
+
const actionLabel = item.actionLabel ? (0, _i18nUtils.resolveText)(item.actionLabel, language) : undefined;
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
26
|
+
className: `overflow-hidden rounded-2xl border ${c.surface} ${c.border}`,
|
|
27
|
+
children: [item.image ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
28
|
+
src: item.image,
|
|
29
|
+
alt: name,
|
|
30
|
+
className: "h-32 w-full object-cover down-sm:h-24"
|
|
31
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
32
|
+
className: "flex flex-col gap-2 p-4",
|
|
33
|
+
children: [kicker ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
34
|
+
className: `w-fit rounded-full border px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wide ${c.actionBorder} ${c.iconText}`,
|
|
35
|
+
children: kicker
|
|
36
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
37
|
+
className: `text-base font-bold down-sm:text-sm ${c.title}`,
|
|
38
|
+
children: name
|
|
39
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
40
|
+
className: `text-sm leading-relaxed down-sm:text-xs ${c.subtitle}`,
|
|
41
|
+
children: description
|
|
42
|
+
}), actionLabel ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
|
43
|
+
type: "button",
|
|
44
|
+
onClick: () => onSelect?.(item),
|
|
45
|
+
className: `mt-1 flex w-fit items-center gap-1 text-sm font-semibold ${c.iconText}`,
|
|
46
|
+
children: [actionLabel, /*#__PURE__*/(0, _jsxRuntime.jsx)(_chevronIcon.ChevronIcon, {
|
|
47
|
+
size: 14,
|
|
48
|
+
color: "currentColor"
|
|
49
|
+
})]
|
|
50
|
+
}) : null]
|
|
51
|
+
})]
|
|
52
|
+
}, index);
|
|
53
|
+
};
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
|
+
className: "flex flex-col gap-3",
|
|
56
|
+
children: items.map((item, index) => renderCard(item, index))
|
|
30
57
|
});
|
|
31
58
|
}
|
|
32
59
|
//# sourceMappingURL=info.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_themeUtils","require","_i18nUtils","_chatModel","_jsxRuntime","Info","data","theme","Theme","Dark","language","c","getThemeClasses","
|
|
1
|
+
{"version":3,"names":["_themeUtils","require","_i18nUtils","_chevronIcon","_chatModel","_jsxRuntime","Info","data","theme","Theme","Dark","language","onSelect","c","getThemeClasses","items","Array","isArray","renderCard","item","index","name","resolveText","description","kicker","undefined","actionLabel","jsxs","className","surface","border","children","image","jsx","src","alt","actionBorder","iconText","title","subtitle","type","onClick","ChevronIcon","size","color","map"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/info/info.tsx"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAA+C,IAAAI,WAAA,GAAAJ,OAAA;AAIxC,SAASK,IAAIA,CAAC;EAAEC,IAAI;EAAEC,KAAK,GAAGC,gBAAK,CAACC,IAAI;EAAEC,QAAQ;EAAEC;AAAuC,CAAC,EAAE;EACnG,MAAMC,CAAC,GAAG,IAAAC,2BAAe,EAACN,KAAK,CAAC;EAChC,MAAMO,KAAK,GAAGC,KAAK,CAACC,OAAO,CAACV,IAAI,CAAC,GAAGA,IAAI,GAAG,CAACA,IAAI,CAAC;EAEjD,MAAMW,UAAU,GAAGA,CAACC,IAAc,EAAEC,KAAa,KAAK;IACpD,MAAMC,IAAI,GAAG,IAAAC,sBAAW,EAACH,IAAI,CAACE,IAAI,EAAEV,QAAQ,CAAC;IAC7C,MAAMY,WAAW,GAAG,IAAAD,sBAAW,EAACH,IAAI,CAACI,WAAW,EAAEZ,QAAQ,CAAC;IAC3D,MAAMa,MAAM,GAAGL,IAAI,CAACK,MAAM,GAAG,IAAAF,sBAAW,EAACH,IAAI,CAACK,MAAM,EAAEb,QAAQ,CAAC,GAAGc,SAAS;IAC3E,MAAMC,WAAW,GAAGP,IAAI,CAACO,WAAW,GAAG,IAAAJ,sBAAW,EAACH,IAAI,CAACO,WAAW,EAAEf,QAAQ,CAAC,GAAGc,SAAS;IAE1F,oBACE,IAAApB,WAAA,CAAAsB,IAAA;MAAiBC,SAAS,EAAE,sCAAsC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C,qBAAqB;IAAAG,QAAA,EACjChB,KAAK,CAAC8B,GAAG,CAAC,CAAC1B,IAAI,EAAEC,KAAK,KAAKF,UAAU,CAACC,IAAI,EAAEC,KAAK,CAAC;EAAC,CACjD,CAAC;AAEV","ignoreList":[]}
|
|
@@ -7,27 +7,58 @@ exports.Info = Info;
|
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _themeUtils = require("../../../../utils/theme.utils.js");
|
|
9
9
|
var _i18nUtils = require("../../../../utils/i18n.utils.js");
|
|
10
|
+
var _chevronIconNative = require("../common/chevron-icon.native.js");
|
|
10
11
|
var _chatModel = require("../../model/chat.model.js");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function Info({
|
|
13
14
|
data,
|
|
14
15
|
theme = _chatModel.Theme.Dark,
|
|
15
|
-
language
|
|
16
|
+
language,
|
|
17
|
+
onSelect
|
|
16
18
|
}) {
|
|
17
19
|
const c = (0, _themeUtils.getThemeClasses)(theme);
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
className: `
|
|
26
|
-
children:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
const items = Array.isArray(data) ? data : [data];
|
|
21
|
+
const renderCard = (item, index) => {
|
|
22
|
+
const name = (0, _i18nUtils.resolveText)(item.name, language);
|
|
23
|
+
const description = (0, _i18nUtils.resolveText)(item.description, language);
|
|
24
|
+
const kicker = item.kicker ? (0, _i18nUtils.resolveText)(item.kicker, language) : undefined;
|
|
25
|
+
const actionLabel = item.actionLabel ? (0, _i18nUtils.resolveText)(item.actionLabel, language) : undefined;
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
27
|
+
className: `overflow-hidden rounded-2xl border ${c.surface} ${c.border}`,
|
|
28
|
+
children: [item.image ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
29
|
+
accessibilityLabel: name,
|
|
30
|
+
source: {
|
|
31
|
+
uri: item.image
|
|
32
|
+
},
|
|
33
|
+
className: "h-32 w-full down-sm:h-24"
|
|
34
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
35
|
+
className: "flex flex-col gap-2 p-4",
|
|
36
|
+
children: [kicker ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
37
|
+
className: `w-fit rounded-full border px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wide ${c.actionBorder} ${c.iconText}`,
|
|
38
|
+
children: kicker
|
|
39
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
40
|
+
className: `text-base font-bold down-sm:text-sm ${c.title}`,
|
|
41
|
+
children: name
|
|
42
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
43
|
+
className: `text-sm leading-relaxed down-sm:text-xs ${c.subtitle}`,
|
|
44
|
+
children: description
|
|
45
|
+
}), actionLabel ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
46
|
+
onPress: () => onSelect?.(item),
|
|
47
|
+
className: "mt-1 flex-row items-center gap-1",
|
|
48
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
49
|
+
className: `text-sm font-semibold ${c.iconText}`,
|
|
50
|
+
children: actionLabel
|
|
51
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_chevronIconNative.ChevronIcon, {
|
|
52
|
+
size: 14,
|
|
53
|
+
color: c.iconColor
|
|
54
|
+
})]
|
|
55
|
+
}) : null]
|
|
56
|
+
})]
|
|
57
|
+
}, index);
|
|
58
|
+
};
|
|
59
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
60
|
+
className: "flex flex-col gap-3",
|
|
61
|
+
children: items.map((item, index) => renderCard(item, index))
|
|
31
62
|
});
|
|
32
63
|
}
|
|
33
64
|
//# sourceMappingURL=info.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_themeUtils","_i18nUtils","_chatModel","_jsxRuntime","Info","data","theme","Theme","Dark","language","c","getThemeClasses","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_themeUtils","_i18nUtils","_chevronIconNative","_chatModel","_jsxRuntime","Info","data","theme","Theme","Dark","language","onSelect","c","getThemeClasses","items","Array","isArray","renderCard","item","index","name","resolveText","description","kicker","undefined","actionLabel","jsxs","View","className","surface","border","children","image","jsx","Image","accessibilityLabel","source","uri","Text","actionBorder","iconText","title","subtitle","Pressable","onPress","ChevronIcon","size","color","iconColor","map"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/info/info.native.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAA+C,IAAAK,WAAA,GAAAL,OAAA;AAIxC,SAASM,IAAIA,CAAC;EAAEC,IAAI;EAAEC,KAAK,GAAGC,gBAAK,CAACC,IAAI;EAAEC,QAAQ;EAAEC;AAAuC,CAAC,EAAE;EACnG,MAAMC,CAAC,GAAG,IAAAC,2BAAe,EAACN,KAAK,CAAC;EAChC,MAAMO,KAAK,GAAGC,KAAK,CAACC,OAAO,CAACV,IAAI,CAAC,GAAGA,IAAI,GAAG,CAACA,IAAI,CAAC;EAEjD,MAAMW,UAAU,GAAGA,CAACC,IAAc,EAAEC,KAAa,KAAK;IACpD,MAAMC,IAAI,GAAG,IAAAC,sBAAW,EAACH,IAAI,CAACE,IAAI,EAAEV,QAAQ,CAAC;IAC7C,MAAMY,WAAW,GAAG,IAAAD,sBAAW,EAACH,IAAI,CAACI,WAAW,EAAE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C8B,QAAQ,EAAG;UAAAX,QAAA,EAAET;QAAW,CAAO,CAAC,EAE7FG,WAAW,gBACV,IAAArB,WAAA,CAAAsB,IAAA,EAAC5B,YAAA,CAAA6C,SAAS;UACRC,OAAO,EAAEA,CAAA,KAAMjC,QAAQ,GAAGO,IAAI,CAAE;UAChCU,SAAS,EAAC,kCAAkC;UAAAG,QAAA,gBAE5C,IAAA3B,WAAA,CAAA6B,GAAA,EAACnC,YAAA,CAAAwC,IAAI;YAACV,SAAS,EAAE,yBAAyBhB,CAAC,CAAC4B,QAAQ,EAAG;YAAAT,QAAA,EAAEN;UAAW,CAAO,CAAC,eAC5E,IAAArB,WAAA,CAAA6B,GAAA,EAAC/B,kBAAA,CAAA2C,WAAW;YAACC,IAAI,EAAE,EAAG;YAACC,KAAK,EAAEnC,CAAC,CAACoC;UAAU,CAAE,CAAC;QAAA,CACpC,CAAC,GACV,IAAI;MAAA,CACJ,CAAC;IAAA,GA9BE7B,KA+BL,CAAC;EAEX,CAAC;EAED,oBACE,IAAAf,WAAA,CAAA6B,GAAA,EAACnC,YAAA,CAAA6B,IAAI;IAACC,SAAS,EAAC,qBAAqB;IAAAG,QAAA,EAClCjB,KAAK,CAACmC,GAAG,CAAC,CAAC/B,IAAI,EAAEC,KAAK,KAAKF,UAAU,CAACC,IAAI,EAAEC,KAAK,CAAC;EAAC,CAChD,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Order", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _order.Order;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "OrderStatus", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _orderModel.OrderStatus;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _order = require("./order");
|
|
19
|
+
var _orderModel = require("./order.model.js");
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_order","require","_orderModel"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/order/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA","ignoreList":[]}
|