@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.
- 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/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/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/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/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/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/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/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/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/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/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/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/reservation.utils.ts +23 -0
- package/src/utils/status-badge.utils.ts +36 -0
- package/src/utils/theme.utils.ts +9 -0
- package/src/web.ts +11 -1
|
@@ -1,29 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { Text, View } from 'react-native';
|
|
3
|
+
import { Image, Pressable, Text, View } from 'react-native';
|
|
4
4
|
import { getThemeClasses } from "../../../../utils/theme.utils.js";
|
|
5
5
|
import { resolveText } from "../../../../utils/i18n.utils.js";
|
|
6
|
+
import { ChevronIcon } from "../common/chevron-icon.native.js";
|
|
6
7
|
import { Theme } from "../../model/chat.model.js";
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
export function Info({
|
|
9
10
|
data,
|
|
10
11
|
theme = Theme.Dark,
|
|
11
|
-
language
|
|
12
|
+
language,
|
|
13
|
+
onSelect
|
|
12
14
|
}) {
|
|
13
15
|
const c = getThemeClasses(theme);
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
className: `
|
|
22
|
-
children:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
const items = Array.isArray(data) ? data : [data];
|
|
17
|
+
const renderCard = (item, index) => {
|
|
18
|
+
const name = resolveText(item.name, language);
|
|
19
|
+
const description = resolveText(item.description, language);
|
|
20
|
+
const kicker = item.kicker ? resolveText(item.kicker, language) : undefined;
|
|
21
|
+
const actionLabel = item.actionLabel ? resolveText(item.actionLabel, language) : undefined;
|
|
22
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
23
|
+
className: `overflow-hidden rounded-2xl border ${c.surface} ${c.border}`,
|
|
24
|
+
children: [item.image ? /*#__PURE__*/_jsx(Image, {
|
|
25
|
+
accessibilityLabel: name,
|
|
26
|
+
source: {
|
|
27
|
+
uri: item.image
|
|
28
|
+
},
|
|
29
|
+
className: "h-32 w-full down-sm:h-24"
|
|
30
|
+
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
31
|
+
className: "flex flex-col gap-2 p-4",
|
|
32
|
+
children: [kicker ? /*#__PURE__*/_jsx(Text, {
|
|
33
|
+
className: `w-fit rounded-full border px-2.5 py-1 text-[10px] font-semibold uppercase tracking-wide ${c.actionBorder} ${c.iconText}`,
|
|
34
|
+
children: kicker
|
|
35
|
+
}) : null, /*#__PURE__*/_jsx(Text, {
|
|
36
|
+
className: `text-base font-bold down-sm:text-sm ${c.title}`,
|
|
37
|
+
children: name
|
|
38
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
39
|
+
className: `text-sm leading-relaxed down-sm:text-xs ${c.subtitle}`,
|
|
40
|
+
children: description
|
|
41
|
+
}), actionLabel ? /*#__PURE__*/_jsxs(Pressable, {
|
|
42
|
+
onPress: () => onSelect?.(item),
|
|
43
|
+
className: "mt-1 flex-row items-center gap-1",
|
|
44
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
45
|
+
className: `text-sm font-semibold ${c.iconText}`,
|
|
46
|
+
children: actionLabel
|
|
47
|
+
}), /*#__PURE__*/_jsx(ChevronIcon, {
|
|
48
|
+
size: 14,
|
|
49
|
+
color: c.iconColor
|
|
50
|
+
})]
|
|
51
|
+
}) : null]
|
|
52
|
+
})]
|
|
53
|
+
}, index);
|
|
54
|
+
};
|
|
55
|
+
return /*#__PURE__*/_jsx(View, {
|
|
56
|
+
className: "flex flex-col gap-3",
|
|
57
|
+
children: items.map((item, index) => renderCard(item, index))
|
|
27
58
|
});
|
|
28
59
|
}
|
|
29
60
|
//# sourceMappingURL=info.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Text","View","getThemeClasses","resolveText","Theme","jsx","_jsx","jsxs","_jsxs","Info","data","theme","Dark","language","c","
|
|
1
|
+
{"version":3,"names":["Image","Pressable","Text","View","getThemeClasses","resolveText","ChevronIcon","Theme","jsx","_jsx","jsxs","_jsxs","Info","data","theme","Dark","language","onSelect","c","items","Array","isArray","renderCard","item","index","name","description","kicker","undefined","actionLabel","className","surface","border","children","image","accessibilityLabel","source","uri","actionBorder","iconText","title","subtitle","onPress","size","color","iconColor","map"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/info/info.native.tsx"],"mappings":";;AAAA,SAASA,KAAK,EAAEC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,eAAe,QAAQ,kCAA+B;AAC/D,SAASC,WAAW,QAAQ,iCAA8B;AAC1D,SAASC,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,KAAK,QAAQ,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAI/C,OAAO,SAASC,IAAIA,CAAC;EAAEC,IAAI;EAAEC,KAAK,GAAGP,KAAK,CAACQ,IAAI;EAAEC,QAAQ;EAAEC;AAAuC,CAAC,EAAE;EACnG,MAAMC,CAAC,GAAGd,eAAe,CAACU,KAAK,CAAC;EAChC,MAAMK,KAAK,GAAGC,KAAK,CAACC,OAAO,CAACR,IAAI,CAAC,GAAGA,IAAI,GAAG,CAACA,IAAI,CAAC;EAEjD,MAAMS,UAAU,GAAGA,CAACC,IAAc,EAAEC,KAAa,KAAK;IACpD,MAAMC,IAAI,GAAGpB,WAAW,CAACkB,IAAI,CAACE,IAAI,EAAET,QAAQ,CAAC;IAC7C,MAAMU,WAAW,GAAGrB,WAAW,CAACkB,IAAI,CAACG,WAAW,EAAEV,QAAQ,CAAC;IAC3D,MAAMW,MAAM,GAAGJ,IAAI,CAACI,MAAM,GAAGtB,WAAW,CAACkB,IAAI,CAACI,MAAM,EAAEX,QAAQ,CAAC,GAAGY,SAA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IAAI,EAAE,EAAG;YAACC,KAAK,EAAE1B,CAAC,CAAC2B;UAAU,CAAE,CAAC;QAAA,CACpC,CAAC,GACV,IAAI;MAAA,CACJ,CAAC;IAAA,GA9BErB,KA+BL,CAAC;EAEX,CAAC;EAED,oBACEf,IAAA,CAACN,IAAI;IAAC2B,SAAS,EAAC,qBAAqB;IAAAG,QAAA,EAClCd,KAAK,CAAC2B,GAAG,CAAC,CAACvB,IAAI,EAAEC,KAAK,KAAKF,UAAU,CAACC,IAAI,EAAEC,KAAK,CAAC;EAAC,CAChD,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Order","OrderStatus"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/order/index.ts"],"mappings":";;AAAA,SAASA,KAAK,QAAQ,SAAS;AAC/B,SAASC,WAAW,QAAQ,kBAAe","ignoreList":[]}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Fragment } from 'react';
|
|
4
|
+
import { getThemeClasses } from "../../../../utils/theme.utils.js";
|
|
5
|
+
import { getOrderStatusStyle } from "../../../../utils/order.utils.js";
|
|
6
|
+
import { resolveText } from "../../../../utils/i18n.utils.js";
|
|
7
|
+
import { useExpandableList } from "../../../../utils/use-expandable-list.js";
|
|
8
|
+
import { Collapsible } from '../common/collapsible';
|
|
9
|
+
import { CartIcon } from '../common/cart-icon';
|
|
10
|
+
import { ChevronIcon } from '../common/chevron-icon';
|
|
11
|
+
import { OrderStatus } from "./order.model.js";
|
|
12
|
+
import { ItemAction, Theme } from "../../model/chat.model.js";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
+
export function Order({
|
|
15
|
+
data,
|
|
16
|
+
theme = Theme.Dark,
|
|
17
|
+
language,
|
|
18
|
+
actionLabel,
|
|
19
|
+
onAction,
|
|
20
|
+
onSelect
|
|
21
|
+
}) {
|
|
22
|
+
const c = getThemeClasses(theme);
|
|
23
|
+
const order = Array.isArray(data) ? data[0] : data;
|
|
24
|
+
const items = order?.items ?? [];
|
|
25
|
+
const {
|
|
26
|
+
head,
|
|
27
|
+
rest,
|
|
28
|
+
expanded,
|
|
29
|
+
hasMore,
|
|
30
|
+
toggle
|
|
31
|
+
} = useExpandableList(items);
|
|
32
|
+
if (!order) return null;
|
|
33
|
+
const onSelectRow = onSelect;
|
|
34
|
+
const location = order.location ? resolveText(order.location, language) : undefined;
|
|
35
|
+
const totalLabel = order.totalLabel ? resolveText(order.totalLabel, language) : undefined;
|
|
36
|
+
const action = order.actionLabel ? resolveText(order.actionLabel, language) : typeof actionLabel === 'function' ? actionLabel(order) : actionLabel;
|
|
37
|
+
const headerStyle = getOrderStatusStyle(order.status, theme);
|
|
38
|
+
const headerStatusLabel = order.statusLabel ? resolveText(order.statusLabel, language) : headerStyle.label;
|
|
39
|
+
const renderRow = row => {
|
|
40
|
+
const name = resolveText(row.name, language);
|
|
41
|
+
const isRejected = row.status === OrderStatus.Rejected;
|
|
42
|
+
const s = getOrderStatusStyle(row.status, theme);
|
|
43
|
+
const statusLabel = row.statusLabel ? resolveText(row.statusLabel, language) : s.label;
|
|
44
|
+
return /*#__PURE__*/_jsxs("button", {
|
|
45
|
+
type: "button",
|
|
46
|
+
className: "flex w-full items-center gap-3 py-2.5 text-left",
|
|
47
|
+
onClick: () => onSelectRow?.(row),
|
|
48
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
49
|
+
className: "relative shrink-0",
|
|
50
|
+
children: [row.image ? /*#__PURE__*/_jsx("img", {
|
|
51
|
+
src: row.image,
|
|
52
|
+
alt: name,
|
|
53
|
+
className: `h-11 w-11 rounded-lg object-cover ${c.iconBg}`
|
|
54
|
+
}) : /*#__PURE__*/_jsx("div", {
|
|
55
|
+
className: `h-11 w-11 rounded-lg ${c.iconBg}`
|
|
56
|
+
}), row.quantity > 1 ? /*#__PURE__*/_jsx("span", {
|
|
57
|
+
className: "absolute -right-1.5 -top-1.5 flex h-5 w-5 items-center justify-center rounded-full bg-indigo-500 text-[10px] font-bold text-white",
|
|
58
|
+
children: row.quantity
|
|
59
|
+
}) : null]
|
|
60
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
61
|
+
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
62
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
63
|
+
className: "flex items-center justify-between gap-2",
|
|
64
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
65
|
+
className: `truncate text-sm font-semibold ${isRejected ? 'line-through opacity-60' : ''} ${c.title}`,
|
|
66
|
+
children: name
|
|
67
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
68
|
+
className: `shrink-0 text-sm font-bold ${isRejected ? 'line-through opacity-60' : ''} ${c.price}`,
|
|
69
|
+
children: row.price
|
|
70
|
+
})]
|
|
71
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
72
|
+
className: "flex items-center justify-between gap-2",
|
|
73
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
74
|
+
className: `truncate text-xs ${c.subtitle}`,
|
|
75
|
+
children: [row.unitPrice ? `${row.unitPrice} each` : '', row.unitPrice && row.duration ? ' · ' : '', row.duration ?? '']
|
|
76
|
+
}), row.status ? /*#__PURE__*/_jsx("span", {
|
|
77
|
+
className: `shrink-0 rounded-full px-2 py-0.5 text-[11px] font-semibold ${s.badgeBg} ${s.badgeText}`,
|
|
78
|
+
children: statusLabel
|
|
79
|
+
}) : null]
|
|
80
|
+
})]
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
85
|
+
className: `rounded-2xl border p-3.5 ${c.surface} ${c.border}`,
|
|
86
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
87
|
+
className: "flex items-center gap-3",
|
|
88
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
89
|
+
className: `flex h-11 w-11 shrink-0 items-center justify-center rounded-xl ${c.iconBg}`,
|
|
90
|
+
children: /*#__PURE__*/_jsx(CartIcon, {
|
|
91
|
+
size: 20,
|
|
92
|
+
color: c.iconColor
|
|
93
|
+
})
|
|
94
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
95
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
96
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
97
|
+
className: `truncate text-base font-bold ${c.title}`,
|
|
98
|
+
children: ["Order #", order.orderNumber]
|
|
99
|
+
}), location ? /*#__PURE__*/_jsx("span", {
|
|
100
|
+
className: `truncate text-xs ${c.subtitle}`,
|
|
101
|
+
children: location
|
|
102
|
+
}) : null]
|
|
103
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
104
|
+
className: `shrink-0 rounded-full px-2.5 py-1 text-xs font-semibold ${headerStyle.badgeBg} ${headerStyle.badgeText}`,
|
|
105
|
+
children: headerStatusLabel
|
|
106
|
+
})]
|
|
107
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
108
|
+
className: `my-3 h-px ${c.divider}`
|
|
109
|
+
}), head.map((row, index) => /*#__PURE__*/_jsxs(Fragment, {
|
|
110
|
+
children: [index > 0 ? /*#__PURE__*/_jsx("div", {
|
|
111
|
+
className: `h-px ${c.divider}`
|
|
112
|
+
}) : null, renderRow(row)]
|
|
113
|
+
}, row.id)), hasMore ? /*#__PURE__*/_jsx(Collapsible, {
|
|
114
|
+
expanded: expanded,
|
|
115
|
+
children: rest.map(row => /*#__PURE__*/_jsxs(Fragment, {
|
|
116
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
117
|
+
className: `h-px ${c.divider}`
|
|
118
|
+
}), renderRow(row)]
|
|
119
|
+
}, row.id))
|
|
120
|
+
}) : null, hasMore ? /*#__PURE__*/_jsxs("button", {
|
|
121
|
+
type: "button",
|
|
122
|
+
onClick: toggle,
|
|
123
|
+
className: "mt-1 flex w-full items-center justify-between gap-2 rounded-xl py-2",
|
|
124
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
125
|
+
className: "flex items-center gap-2",
|
|
126
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
|
127
|
+
className: `flex h-7 w-7 items-center justify-center rounded-full text-xs font-semibold ${c.iconBg} ${c.iconText}`,
|
|
128
|
+
children: ["+", rest.length]
|
|
129
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
130
|
+
className: `text-sm ${c.subtitle}`,
|
|
131
|
+
children: expanded ? `Showing all ${items.length} items` : `Showing ${head.length} of ${items.length} items`
|
|
132
|
+
})]
|
|
133
|
+
}), /*#__PURE__*/_jsxs("span", {
|
|
134
|
+
className: `flex shrink-0 items-center gap-1 text-sm font-semibold ${c.iconText}`,
|
|
135
|
+
children: [expanded ? 'Show less' : 'View all', /*#__PURE__*/_jsx("span", {
|
|
136
|
+
className: `transition-transform ${expanded ? 'rotate-180' : ''}`,
|
|
137
|
+
children: /*#__PURE__*/_jsx(ChevronIcon, {
|
|
138
|
+
size: 14,
|
|
139
|
+
color: "currentColor"
|
|
140
|
+
})
|
|
141
|
+
})]
|
|
142
|
+
})]
|
|
143
|
+
}) : null, order.total || action ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
144
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
145
|
+
className: `my-3 h-px ${c.divider}`
|
|
146
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
147
|
+
className: "flex items-center justify-between gap-3",
|
|
148
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
149
|
+
className: "flex flex-col",
|
|
150
|
+
children: [totalLabel ? /*#__PURE__*/_jsx("span", {
|
|
151
|
+
className: `text-xs ${c.subtitle}`,
|
|
152
|
+
children: totalLabel
|
|
153
|
+
}) : null, order.total ? /*#__PURE__*/_jsx("span", {
|
|
154
|
+
className: `text-lg font-bold ${c.title}`,
|
|
155
|
+
children: order.total
|
|
156
|
+
}) : null]
|
|
157
|
+
}), action ? /*#__PURE__*/_jsx("button", {
|
|
158
|
+
type: "button",
|
|
159
|
+
onClick: () => onAction?.(order, ItemAction.Track),
|
|
160
|
+
className: "rounded-xl bg-indigo-500 px-4 py-2 text-sm font-semibold text-white",
|
|
161
|
+
children: action
|
|
162
|
+
}) : null]
|
|
163
|
+
})]
|
|
164
|
+
}) : null]
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Fragment","getThemeClasses","getOrderStatusStyle","resolveText","useExpandableList","Collapsible","CartIcon","ChevronIcon","OrderStatus","ItemAction","Theme","jsx","_jsx","jsxs","_jsxs","_Fragment","Order","data","theme","Dark","language","actionLabel","onAction","onSelect","c","order","Array","isArray","items","head","rest","expanded","hasMore","toggle","onSelectRow","location","undefined","totalLabel","action","headerStyle","status","headerStatusLabel","statusLabel","label","renderRow","row","name","isRejected","Rejected","s","type","className","onClick","children","image","src","alt","iconBg","quantity","title","price","subtitle","unitPrice","duration","badgeBg","badgeText","surface","border","size","color","iconColor","orderNumber","divider","map","index","id","iconText","length","total","Track"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/order/order.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,eAAe,QAAQ,kCAA+B;AAC/D,SAASC,mBAAmB,QAAQ,kCAA+B;AACnE,SAASC,WAAW,QAAQ,iCAA8B;AAC1D,SAASC,iBAAiB,QAAQ,0CAAuC;AACzE,SAASC,WAAW,QAAQ,uBAAuB;AACnD,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,WAAW,QAAQ,wBAAwB;AACpD,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,UAAU,EAAEC,KAAK,QAAQ,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAd,QAAA,IAAAe,SAAA;AAI3D,OAAO,SAASC,KAAKA,CAAC;EACpBC,IAAI;EACJC,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MuC,SAAS,EAAE,WAAW3B,CAAC,CAACqC,QAAQ,EAAG;YAAAR,QAAA,EAAEhB;UAAU,CAAO,CAAC,GAAG,IAAI,EACjFZ,KAAK,CAACqD,KAAK,gBAAGlE,IAAA;YAAMuC,SAAS,EAAE,qBAAqB3B,CAAC,CAACmC,KAAK,EAAG;YAAAN,QAAA,EAAE5B,KAAK,CAACqD;UAAK,CAAO,CAAC,GAAG,IAAI;QAAA,CACxF,CAAC,EAELxC,MAAM,gBACL1B,IAAA;UACEsC,IAAI,EAAC,QAAQ;UACbE,OAAO,EAAEA,CAAA,KAAM9B,QAAQ,GAAGG,KAAK,EAAEhB,UAAU,CAACsE,KAAK,CAAE;UACnD5B,SAAS,EAAC,qEAAqE;UAAAE,QAAA,EAE9Ef;QAAM,CACD,CAAC,GACP,IAAI;MAAA,CACL,CAAC;IAAA,CACN,CAAC,GACD,IAAI;EAAA,CACL,CAAC;AAEV","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export let OrderStatus = /*#__PURE__*/function (OrderStatus) {
|
|
4
|
+
OrderStatus["Pending"] = "pending";
|
|
5
|
+
OrderStatus["Preparing"] = "preparing";
|
|
6
|
+
OrderStatus["Accepted"] = "accepted";
|
|
7
|
+
OrderStatus["Rejected"] = "rejected";
|
|
8
|
+
OrderStatus["Delivered"] = "delivered";
|
|
9
|
+
return OrderStatus;
|
|
10
|
+
}({});
|
|
11
|
+
//# sourceMappingURL=order.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["OrderStatus"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/order/order.model.ts"],"mappings":";;AAEA,WAAYA,WAAW,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Fragment } from 'react';
|
|
4
|
+
import { Image, Pressable, Text, View } from 'react-native';
|
|
5
|
+
import { getThemeClasses } from "../../../../utils/theme.utils.js";
|
|
6
|
+
import { getOrderStatusStyle } from "../../../../utils/order.utils.js";
|
|
7
|
+
import { resolveText } from "../../../../utils/i18n.utils.js";
|
|
8
|
+
import { useExpandableList } from "../../../../utils/use-expandable-list.js";
|
|
9
|
+
import { Collapsible } from "../common/collapsible.native.js";
|
|
10
|
+
import { CartIcon } from "../common/cart-icon.native.js";
|
|
11
|
+
import { ChevronIcon } from "../common/chevron-icon.native.js";
|
|
12
|
+
import { OrderStatus } from "./order.model.js";
|
|
13
|
+
import { ItemAction, Theme } from "../../model/chat.model.js";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
|
+
export function Order({
|
|
16
|
+
data,
|
|
17
|
+
theme = Theme.Dark,
|
|
18
|
+
language,
|
|
19
|
+
actionLabel,
|
|
20
|
+
onAction,
|
|
21
|
+
onSelect
|
|
22
|
+
}) {
|
|
23
|
+
const c = getThemeClasses(theme);
|
|
24
|
+
const order = Array.isArray(data) ? data[0] : data;
|
|
25
|
+
const items = order?.items ?? [];
|
|
26
|
+
const {
|
|
27
|
+
head,
|
|
28
|
+
rest,
|
|
29
|
+
expanded,
|
|
30
|
+
hasMore,
|
|
31
|
+
toggle
|
|
32
|
+
} = useExpandableList(items);
|
|
33
|
+
if (!order) return null;
|
|
34
|
+
const onSelectRow = onSelect;
|
|
35
|
+
const location = order.location ? resolveText(order.location, language) : undefined;
|
|
36
|
+
const totalLabel = order.totalLabel ? resolveText(order.totalLabel, language) : undefined;
|
|
37
|
+
const action = order.actionLabel ? resolveText(order.actionLabel, language) : typeof actionLabel === 'function' ? actionLabel(order) : actionLabel;
|
|
38
|
+
const headerStyle = getOrderStatusStyle(order.status, theme);
|
|
39
|
+
const headerStatusLabel = order.statusLabel ? resolveText(order.statusLabel, language) : headerStyle.label;
|
|
40
|
+
const renderRow = row => {
|
|
41
|
+
const name = resolveText(row.name, language);
|
|
42
|
+
const isRejected = row.status === OrderStatus.Rejected;
|
|
43
|
+
const s = getOrderStatusStyle(row.status, theme);
|
|
44
|
+
const statusLabel = row.statusLabel ? resolveText(row.statusLabel, language) : s.label;
|
|
45
|
+
return /*#__PURE__*/_jsxs(Pressable, {
|
|
46
|
+
className: "flex-row items-center gap-3 py-2.5",
|
|
47
|
+
onPress: () => onSelectRow?.(row),
|
|
48
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
49
|
+
className: "relative",
|
|
50
|
+
children: [row.image ? /*#__PURE__*/_jsx(Image, {
|
|
51
|
+
accessibilityLabel: name,
|
|
52
|
+
source: {
|
|
53
|
+
uri: row.image
|
|
54
|
+
},
|
|
55
|
+
className: `h-11 w-11 rounded-lg ${c.iconBg}`
|
|
56
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
57
|
+
className: `h-11 w-11 rounded-lg ${c.iconBg}`
|
|
58
|
+
}), row.quantity > 1 ? /*#__PURE__*/_jsx(View, {
|
|
59
|
+
className: "absolute -right-1.5 -top-1.5 h-5 w-5 items-center justify-center rounded-full bg-indigo-500",
|
|
60
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
61
|
+
className: "text-[10px] font-bold text-white",
|
|
62
|
+
children: row.quantity
|
|
63
|
+
})
|
|
64
|
+
}) : null]
|
|
65
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
66
|
+
className: "flex-1 gap-1",
|
|
67
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
68
|
+
className: "flex-row items-center justify-between gap-2",
|
|
69
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
70
|
+
className: `flex-1 text-sm font-semibold ${isRejected ? 'line-through opacity-60' : ''} ${c.title}`,
|
|
71
|
+
numberOfLines: 1,
|
|
72
|
+
children: name
|
|
73
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
74
|
+
className: `text-sm font-bold ${isRejected ? 'line-through opacity-60' : ''} ${c.price}`,
|
|
75
|
+
children: row.price
|
|
76
|
+
})]
|
|
77
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
78
|
+
className: "flex-row items-center justify-between gap-2",
|
|
79
|
+
children: [/*#__PURE__*/_jsxs(Text, {
|
|
80
|
+
className: `flex-1 text-xs ${c.subtitle}`,
|
|
81
|
+
numberOfLines: 1,
|
|
82
|
+
children: [row.unitPrice ? `${row.unitPrice} each` : '', row.unitPrice && row.duration ? ' · ' : '', row.duration ?? '']
|
|
83
|
+
}), row.status ? /*#__PURE__*/_jsx(View, {
|
|
84
|
+
className: `rounded-full px-2 py-0.5 ${s.badgeBg}`,
|
|
85
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
86
|
+
className: `text-[11px] font-semibold ${s.badgeText}`,
|
|
87
|
+
children: statusLabel
|
|
88
|
+
})
|
|
89
|
+
}) : null]
|
|
90
|
+
})]
|
|
91
|
+
})]
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
95
|
+
className: `rounded-2xl border p-3.5 ${c.surface} ${c.border}`,
|
|
96
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
97
|
+
className: "flex-row items-center gap-3",
|
|
98
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
99
|
+
className: `h-11 w-11 items-center justify-center rounded-xl ${c.iconBg}`,
|
|
100
|
+
children: /*#__PURE__*/_jsx(CartIcon, {
|
|
101
|
+
size: 20,
|
|
102
|
+
color: c.iconColor
|
|
103
|
+
})
|
|
104
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
105
|
+
className: "flex-1",
|
|
106
|
+
children: [/*#__PURE__*/_jsxs(Text, {
|
|
107
|
+
className: `text-base font-bold ${c.title}`,
|
|
108
|
+
numberOfLines: 1,
|
|
109
|
+
children: ["Order #", order.orderNumber]
|
|
110
|
+
}), location ? /*#__PURE__*/_jsx(Text, {
|
|
111
|
+
className: `text-xs ${c.subtitle}`,
|
|
112
|
+
numberOfLines: 1,
|
|
113
|
+
children: location
|
|
114
|
+
}) : null]
|
|
115
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
116
|
+
className: `rounded-full px-2.5 py-1 ${headerStyle.badgeBg}`,
|
|
117
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
118
|
+
className: `text-xs font-semibold ${headerStyle.badgeText}`,
|
|
119
|
+
children: headerStatusLabel
|
|
120
|
+
})
|
|
121
|
+
})]
|
|
122
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
123
|
+
className: `my-3 h-px ${c.divider}`
|
|
124
|
+
}), head.map((row, index) => /*#__PURE__*/_jsxs(Fragment, {
|
|
125
|
+
children: [index > 0 ? /*#__PURE__*/_jsx(View, {
|
|
126
|
+
className: `h-px ${c.divider}`
|
|
127
|
+
}) : null, renderRow(row)]
|
|
128
|
+
}, row.id)), hasMore ? /*#__PURE__*/_jsx(Collapsible, {
|
|
129
|
+
expanded: expanded,
|
|
130
|
+
children: rest.map(row => /*#__PURE__*/_jsxs(Fragment, {
|
|
131
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
132
|
+
className: `h-px ${c.divider}`
|
|
133
|
+
}), renderRow(row)]
|
|
134
|
+
}, row.id))
|
|
135
|
+
}) : null, hasMore ? /*#__PURE__*/_jsxs(Pressable, {
|
|
136
|
+
onPress: toggle,
|
|
137
|
+
className: "mt-1 flex-row items-center justify-between gap-2 py-2",
|
|
138
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
139
|
+
className: "flex-row items-center gap-2",
|
|
140
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
141
|
+
className: `h-7 w-7 items-center justify-center rounded-full ${c.iconBg}`,
|
|
142
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
143
|
+
className: `text-xs font-semibold ${c.iconText}`,
|
|
144
|
+
children: ["+", rest.length]
|
|
145
|
+
})
|
|
146
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
147
|
+
className: `text-sm ${c.subtitle}`,
|
|
148
|
+
children: expanded ? `Showing all ${items.length} items` : `Showing ${head.length} of ${items.length} items`
|
|
149
|
+
})]
|
|
150
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
151
|
+
className: "flex-row items-center gap-1",
|
|
152
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
153
|
+
className: `text-sm font-semibold ${c.iconText}`,
|
|
154
|
+
children: expanded ? 'Show less' : 'View all'
|
|
155
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
156
|
+
className: expanded ? 'rotate-180' : undefined,
|
|
157
|
+
children: /*#__PURE__*/_jsx(ChevronIcon, {
|
|
158
|
+
size: 14,
|
|
159
|
+
color: c.iconColor
|
|
160
|
+
})
|
|
161
|
+
})]
|
|
162
|
+
})]
|
|
163
|
+
}) : null, order.total || action ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
164
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
165
|
+
className: `my-3 h-px ${c.divider}`
|
|
166
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
167
|
+
className: "flex-row items-center justify-between gap-3",
|
|
168
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
169
|
+
children: [totalLabel ? /*#__PURE__*/_jsx(Text, {
|
|
170
|
+
className: `text-xs ${c.subtitle}`,
|
|
171
|
+
children: totalLabel
|
|
172
|
+
}) : null, order.total ? /*#__PURE__*/_jsx(Text, {
|
|
173
|
+
className: `text-lg font-bold ${c.title}`,
|
|
174
|
+
children: order.total
|
|
175
|
+
}) : null]
|
|
176
|
+
}), action ? /*#__PURE__*/_jsx(Pressable, {
|
|
177
|
+
onPress: () => onAction?.(order, ItemAction.Track),
|
|
178
|
+
className: "rounded-xl bg-indigo-500 px-4 py-2",
|
|
179
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
180
|
+
className: "text-sm font-semibold text-white",
|
|
181
|
+
children: action
|
|
182
|
+
})
|
|
183
|
+
}) : null]
|
|
184
|
+
})]
|
|
185
|
+
}) : null]
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
//# sourceMappingURL=order.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Fragment","Image","Pressable","Text","View","getThemeClasses","getOrderStatusStyle","resolveText","useExpandableList","Collapsible","CartIcon","ChevronIcon","OrderStatus","ItemAction","Theme","jsx","_jsx","jsxs","_jsxs","_Fragment","Order","data","theme","Dark","language","actionLabel","onAction","onSelect","c","order","Array","isArray","items","head","rest","expanded","hasMore","toggle","onSelectRow","location","undefined","totalLabel","action","headerStyle","status","headerStatusLabel","statusLabel","label","renderRow","row","name","isRejected","Rejected","s","className","onPress","children","image","accessibilityLabel","source","uri","iconBg","quantity","title","numberOfLines","price","subtitle","unitPrice","duration","badgeBg","badgeText","surface","border","size","color","iconColor","orderNumber","divider","map","index","id","iconText","length","total","Track"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/order/order.native.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,KAAK,EAAEC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC3D,SAASC,eAAe,QAAQ,kCAA+B;AAC/D,SAASC,mBAAmB,QAAQ,kCAA+B;AACnE,SAASC,WAAW,QAAQ,iCAA8B;AAC1D,SAASC,iBAAiB,QAAQ,0CAAuC;AACzE,SAASC,WAAW,QAAQ,iCAA8B;AAC1D,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,WAAW,QAAQ,kCAA+B;AAC3D,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,UAAU,EAAEC,KAAK,QAAQ,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAlB,QAAA,IAAAmB,SAAA;AAI3D,OAAO,SAASC,KAAKA,CAAC;EACpBC,IAAI;EACJC,KAAK,GAAGR,KAAK,CAAC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CAAoC;UAAAE,QAAA,eAE9CxC,IAAA,CAACb,IAAI;YAACmD,SAAS,EAAC,kCAAkC;YAAAE,QAAA,EAAEd;UAAM,CAAO;QAAC,CACzD,CAAC,GACV,IAAI;MAAA,CACJ,CAAC;IAAA,CACP,CAAC,GACD,IAAI;EAAA,CACJ,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Reservation","ReservationStatus"],"sourceRoot":"../../../../../../src","sources":["features/chat/components/reservation/index.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,eAAe;AAC3C,SAASC,iBAAiB,QAAQ,wBAAqB","ignoreList":[]}
|