@voyant-travel/bookings-react 0.119.3
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/LICENSE +201 -0
- package/README.md +87 -0
- package/dist/admin/booking-contract-dialog.d.ts +22 -0
- package/dist/admin/booking-contract-dialog.d.ts.map +1 -0
- package/dist/admin/booking-contract-dialog.js +161 -0
- package/dist/admin/booking-detail-host.d.ts +103 -0
- package/dist/admin/booking-detail-host.d.ts.map +1 -0
- package/dist/admin/booking-detail-host.js +127 -0
- package/dist/admin/booking-detail-skeleton.d.ts +7 -0
- package/dist/admin/booking-detail-skeleton.d.ts.map +1 -0
- package/dist/admin/booking-detail-skeleton.js +24 -0
- package/dist/admin/booking-documents-table.d.ts +13 -0
- package/dist/admin/booking-documents-table.d.ts.map +1 -0
- package/dist/admin/booking-documents-table.js +259 -0
- package/dist/admin/booking-invoice-sheet.d.ts +18 -0
- package/dist/admin/booking-invoice-sheet.d.ts.map +1 -0
- package/dist/admin/booking-invoice-sheet.js +101 -0
- package/dist/admin/booking-journey-host.d.ts +24 -0
- package/dist/admin/booking-journey-host.d.ts.map +1 -0
- package/dist/admin/booking-journey-host.js +278 -0
- package/dist/admin/bookings-host.d.ts +26 -0
- package/dist/admin/bookings-host.d.ts.map +1 -0
- package/dist/admin/bookings-host.js +18 -0
- package/dist/admin/bookings-list-skeleton.d.ts +10 -0
- package/dist/admin/bookings-list-skeleton.d.ts.map +1 -0
- package/dist/admin/bookings-list-skeleton.js +25 -0
- package/dist/admin/index.d.ts +273 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +331 -0
- package/dist/admin/journey-billing-duplicate-warning.d.ts +3 -0
- package/dist/admin/journey-billing-duplicate-warning.d.ts.map +1 -0
- package/dist/admin/journey-billing-duplicate-warning.js +26 -0
- package/dist/admin/journey-departure-picker.d.ts +7 -0
- package/dist/admin/journey-departure-picker.d.ts.map +1 -0
- package/dist/admin/journey-departure-picker.js +100 -0
- package/dist/admin/journey-units-picker.d.ts +11 -0
- package/dist/admin/journey-units-picker.d.ts.map +1 -0
- package/dist/admin/journey-units-picker.js +60 -0
- package/dist/admin/journey-voucher-picker.d.ts +3 -0
- package/dist/admin/journey-voucher-picker.d.ts.map +1 -0
- package/dist/admin/journey-voucher-picker.js +71 -0
- package/dist/admin/pages/booking-compose-page.d.ts +9 -0
- package/dist/admin/pages/booking-compose-page.d.ts.map +1 -0
- package/dist/admin/pages/booking-compose-page.js +17 -0
- package/dist/admin/pages/booking-detail-page.d.ts +11 -0
- package/dist/admin/pages/booking-detail-page.d.ts.map +1 -0
- package/dist/admin/pages/booking-detail-page.js +14 -0
- package/dist/admin/pages/booking-journey-page.d.ts +12 -0
- package/dist/admin/pages/booking-journey-page.d.ts.map +1 -0
- package/dist/admin/pages/booking-journey-page.js +26 -0
- package/dist/admin/pages/booking-new-page.d.ts +15 -0
- package/dist/admin/pages/booking-new-page.d.ts.map +1 -0
- package/dist/admin/pages/booking-new-page.js +50 -0
- package/dist/admin/pages/bookings-index-page.d.ts +20 -0
- package/dist/admin/pages/bookings-index-page.d.ts.map +1 -0
- package/dist/admin/pages/bookings-index-page.js +18 -0
- package/dist/admin/person-bookings-widget.d.ts +13 -0
- package/dist/admin/person-bookings-widget.d.ts.map +1 -0
- package/dist/admin/person-bookings-widget.js +48 -0
- package/dist/admin/slots.d.ts +31 -0
- package/dist/admin/slots.d.ts.map +1 -0
- package/dist/admin/slots.js +30 -0
- package/dist/admin/use-booking-action-ledger-events.d.ts +15 -0
- package/dist/admin/use-booking-action-ledger-events.d.ts.map +1 -0
- package/dist/admin/use-booking-action-ledger-events.js +66 -0
- package/dist/client.d.ts +14 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +59 -0
- package/dist/components/booking-activity-timeline.d.ts +32 -0
- package/dist/components/booking-activity-timeline.d.ts.map +1 -0
- package/dist/components/booking-activity-timeline.js +147 -0
- package/dist/components/booking-billing-dialog.d.ts +16 -0
- package/dist/components/booking-billing-dialog.d.ts.map +1 -0
- package/dist/components/booking-billing-dialog.js +315 -0
- package/dist/components/booking-cancellation-dialog.d.ts +18 -0
- package/dist/components/booking-cancellation-dialog.d.ts.map +1 -0
- package/dist/components/booking-cancellation-dialog.js +79 -0
- package/dist/components/booking-combobox.d.ts +13 -0
- package/dist/components/booking-combobox.d.ts.map +1 -0
- package/dist/components/booking-combobox.js +44 -0
- package/dist/components/booking-create-form-utils.d.ts +56 -0
- package/dist/components/booking-create-form-utils.d.ts.map +1 -0
- package/dist/components/booking-create-form-utils.js +216 -0
- package/dist/components/booking-create-page.d.ts +14 -0
- package/dist/components/booking-create-page.d.ts.map +1 -0
- package/dist/components/booking-create-page.js +11 -0
- package/dist/components/booking-create-preview-card.d.ts +26 -0
- package/dist/components/booking-create-preview-card.d.ts.map +1 -0
- package/dist/components/booking-create-preview-card.js +107 -0
- package/dist/components/booking-create-product-extras-picker.d.ts +18 -0
- package/dist/components/booking-create-product-extras-picker.d.ts.map +1 -0
- package/dist/components/booking-create-product-extras-picker.js +82 -0
- package/dist/components/booking-create-sheet.d.ts +34 -0
- package/dist/components/booking-create-sheet.d.ts.map +1 -0
- package/dist/components/booking-create-sheet.js +811 -0
- package/dist/components/booking-create-utils.d.ts +66 -0
- package/dist/components/booking-create-utils.d.ts.map +1 -0
- package/dist/components/booking-create-utils.js +185 -0
- package/dist/components/booking-detail-page.d.ts +126 -0
- package/dist/components/booking-detail-page.d.ts.map +1 -0
- package/dist/components/booking-detail-page.js +264 -0
- package/dist/components/booking-dialog.d.ts +28 -0
- package/dist/components/booking-dialog.d.ts.map +1 -0
- package/dist/components/booking-dialog.js +130 -0
- package/dist/components/booking-document-dialog.d.ts +8 -0
- package/dist/components/booking-document-dialog.d.ts.map +1 -0
- package/dist/components/booking-document-dialog.js +83 -0
- package/dist/components/booking-document-list.d.ts +5 -0
- package/dist/components/booking-document-list.d.ts.map +1 -0
- package/dist/components/booking-document-list.js +43 -0
- package/dist/components/booking-group-link-dialog.d.ts +10 -0
- package/dist/components/booking-group-link-dialog.d.ts.map +1 -0
- package/dist/components/booking-group-link-dialog.js +79 -0
- package/dist/components/booking-group-section.d.ts +27 -0
- package/dist/components/booking-group-section.d.ts.map +1 -0
- package/dist/components/booking-group-section.js +51 -0
- package/dist/components/booking-guarantee-dialog.d.ts +10 -0
- package/dist/components/booking-guarantee-dialog.d.ts.map +1 -0
- package/dist/components/booking-guarantee-dialog.js +123 -0
- package/dist/components/booking-guarantee-list.d.ts +5 -0
- package/dist/components/booking-guarantee-list.d.ts.map +1 -0
- package/dist/components/booking-guarantee-list.js +86 -0
- package/dist/components/booking-item-dialog.d.ts +10 -0
- package/dist/components/booking-item-dialog.d.ts.map +1 -0
- package/dist/components/booking-item-dialog.js +155 -0
- package/dist/components/booking-item-list.d.ts +12 -0
- package/dist/components/booking-item-list.d.ts.map +1 -0
- package/dist/components/booking-item-list.js +191 -0
- package/dist/components/booking-item-travelers.d.ts +6 -0
- package/dist/components/booking-item-travelers.d.ts.map +1 -0
- package/dist/components/booking-item-travelers.js +57 -0
- package/dist/components/booking-list-filters.d.ts +43 -0
- package/dist/components/booking-list-filters.d.ts.map +1 -0
- package/dist/components/booking-list-filters.js +192 -0
- package/dist/components/booking-list.d.ts +50 -0
- package/dist/components/booking-list.d.ts.map +1 -0
- package/dist/components/booking-list.js +352 -0
- package/dist/components/booking-note-dialog.d.ts +16 -0
- package/dist/components/booking-note-dialog.d.ts.map +1 -0
- package/dist/components/booking-note-dialog.js +41 -0
- package/dist/components/booking-notes.d.ts +5 -0
- package/dist/components/booking-notes.d.ts.map +1 -0
- package/dist/components/booking-notes.js +45 -0
- package/dist/components/booking-payment-reconciliation-banner.d.ts +5 -0
- package/dist/components/booking-payment-reconciliation-banner.d.ts.map +1 -0
- package/dist/components/booking-payment-reconciliation-banner.js +91 -0
- package/dist/components/booking-payment-schedule-dialog.d.ts +10 -0
- package/dist/components/booking-payment-schedule-dialog.d.ts.map +1 -0
- package/dist/components/booking-payment-schedule-dialog.js +117 -0
- package/dist/components/booking-payment-schedule-list.d.ts +10 -0
- package/dist/components/booking-payment-schedule-list.d.ts.map +1 -0
- package/dist/components/booking-payment-schedule-list.js +217 -0
- package/dist/components/booking-payments-summary.d.ts +83 -0
- package/dist/components/booking-payments-summary.d.ts.map +1 -0
- package/dist/components/booking-payments-summary.js +176 -0
- package/dist/components/booking-quick-view-sheet.d.ts +14 -0
- package/dist/components/booking-quick-view-sheet.d.ts.map +1 -0
- package/dist/components/booking-quick-view-sheet.js +283 -0
- package/dist/components/bookings-page.d.ts +19 -0
- package/dist/components/bookings-page.d.ts.map +1 -0
- package/dist/components/bookings-page.js +9 -0
- package/dist/components/file-dropzone.d.ts +25 -0
- package/dist/components/file-dropzone.d.ts.map +1 -0
- package/dist/components/file-dropzone.js +102 -0
- package/dist/components/icon-action-button.d.ts +18 -0
- package/dist/components/icon-action-button.d.ts.map +1 -0
- package/dist/components/icon-action-button.js +13 -0
- package/dist/components/option-units-stepper-section.d.ts +111 -0
- package/dist/components/option-units-stepper-section.d.ts.map +1 -0
- package/dist/components/option-units-stepper-section.js +276 -0
- package/dist/components/payment-schedule-section.d.ts +91 -0
- package/dist/components/payment-schedule-section.d.ts.map +1 -0
- package/dist/components/payment-schedule-section.js +206 -0
- package/dist/components/person-picker-section.d.ts +71 -0
- package/dist/components/person-picker-section.d.ts.map +1 -0
- package/dist/components/person-picker-section.js +160 -0
- package/dist/components/price-breakdown-section.d.ts +83 -0
- package/dist/components/price-breakdown-section.d.ts.map +1 -0
- package/dist/components/price-breakdown-section.js +278 -0
- package/dist/components/product-picker-section.d.ts +29 -0
- package/dist/components/product-picker-section.d.ts.map +1 -0
- package/dist/components/product-picker-section.js +74 -0
- package/dist/components/shared-room-section.d.ts +40 -0
- package/dist/components/shared-room-section.d.ts.map +1 -0
- package/dist/components/shared-room-section.js +99 -0
- package/dist/components/status-badge.d.ts +24 -0
- package/dist/components/status-badge.d.ts.map +1 -0
- package/dist/components/status-badge.js +65 -0
- package/dist/components/status-change-dialog.d.ts +10 -0
- package/dist/components/status-change-dialog.d.ts.map +1 -0
- package/dist/components/status-change-dialog.js +57 -0
- package/dist/components/supplier-status-dialog.d.ts +10 -0
- package/dist/components/supplier-status-dialog.d.ts.map +1 -0
- package/dist/components/supplier-status-dialog.js +98 -0
- package/dist/components/supplier-status-list.d.ts +5 -0
- package/dist/components/supplier-status-list.d.ts.map +1 -0
- package/dist/components/supplier-status-list.js +115 -0
- package/dist/components/traveler-category-buttons.d.ts +26 -0
- package/dist/components/traveler-category-buttons.d.ts.map +1 -0
- package/dist/components/traveler-category-buttons.js +35 -0
- package/dist/components/traveler-dialog.d.ts +10 -0
- package/dist/components/traveler-dialog.d.ts.map +1 -0
- package/dist/components/traveler-dialog.js +256 -0
- package/dist/components/traveler-list.d.ts +6 -0
- package/dist/components/traveler-list.d.ts.map +1 -0
- package/dist/components/traveler-list.js +295 -0
- package/dist/components/travelers-section-controls.d.ts +52 -0
- package/dist/components/travelers-section-controls.d.ts.map +1 -0
- package/dist/components/travelers-section-controls.js +206 -0
- package/dist/components/travelers-section.d.ts +159 -0
- package/dist/components/travelers-section.d.ts.map +1 -0
- package/dist/components/travelers-section.js +355 -0
- package/dist/components/voucher-picker-section.d.ts +50 -0
- package/dist/components/voucher-picker-section.d.ts.map +1 -0
- package/dist/components/voucher-picker-section.js +79 -0
- package/dist/extras/client.d.ts +14 -0
- package/dist/extras/client.d.ts.map +1 -0
- package/dist/extras/client.js +58 -0
- package/dist/extras/components/extra-catalog-card.d.ts +13 -0
- package/dist/extras/components/extra-catalog-card.d.ts.map +1 -0
- package/dist/extras/components/extra-catalog-card.js +52 -0
- package/dist/extras/components/product-combobox.d.ts +9 -0
- package/dist/extras/components/product-combobox.d.ts.map +1 -0
- package/dist/extras/components/product-combobox.js +46 -0
- package/dist/extras/components/slot-extras-manifest-panel.d.ts +6 -0
- package/dist/extras/components/slot-extras-manifest-panel.d.ts.map +1 -0
- package/dist/extras/components/slot-extras-manifest-panel.js +108 -0
- package/dist/extras/hooks/index.d.ts +5 -0
- package/dist/extras/hooks/index.d.ts.map +1 -0
- package/dist/extras/hooks/index.js +4 -0
- package/dist/extras/hooks/use-product-extra.d.ts +24 -0
- package/dist/extras/hooks/use-product-extra.d.ts.map +1 -0
- package/dist/extras/hooks/use-product-extra.js +12 -0
- package/dist/extras/hooks/use-product-extras.d.ts +30 -0
- package/dist/extras/hooks/use-product-extras.d.ts.map +1 -0
- package/dist/extras/hooks/use-product-extras.js +12 -0
- package/dist/extras/hooks/use-slot-extra-manifest-mutation.d.ts +48 -0
- package/dist/extras/hooks/use-slot-extra-manifest-mutation.d.ts.map +1 -0
- package/dist/extras/hooks/use-slot-extra-manifest-mutation.js +26 -0
- package/dist/extras/hooks/use-slot-extra-manifest.d.ts +68 -0
- package/dist/extras/hooks/use-slot-extra-manifest.d.ts.map +1 -0
- package/dist/extras/hooks/use-slot-extra-manifest.js +11 -0
- package/dist/extras/i18n/en.d.ts +52 -0
- package/dist/extras/i18n/en.d.ts.map +1 -0
- package/dist/extras/i18n/en.js +51 -0
- package/dist/extras/i18n/index.d.ts +5 -0
- package/dist/extras/i18n/index.d.ts.map +1 -0
- package/dist/extras/i18n/index.js +3 -0
- package/dist/extras/i18n/messages.d.ts +37 -0
- package/dist/extras/i18n/messages.d.ts.map +1 -0
- package/dist/extras/i18n/messages.js +1 -0
- package/dist/extras/i18n/provider.d.ts +126 -0
- package/dist/extras/i18n/provider.d.ts.map +1 -0
- package/dist/extras/i18n/provider.js +44 -0
- package/dist/extras/i18n/ro.d.ts +52 -0
- package/dist/extras/i18n/ro.d.ts.map +1 -0
- package/dist/extras/i18n/ro.js +51 -0
- package/dist/extras/index.d.ts +7 -0
- package/dist/extras/index.d.ts.map +1 -0
- package/dist/extras/index.js +6 -0
- package/dist/extras/provider.d.ts +2 -0
- package/dist/extras/provider.d.ts.map +1 -0
- package/dist/extras/provider.js +1 -0
- package/dist/extras/query-keys.d.ts +16 -0
- package/dist/extras/query-keys.d.ts.map +1 -0
- package/dist/extras/query-keys.js +8 -0
- package/dist/extras/query-options.d.ts +455 -0
- package/dist/extras/query-options.d.ts.map +1 -0
- package/dist/extras/query-options.js +44 -0
- package/dist/extras/schemas.d.ts +416 -0
- package/dist/extras/schemas.d.ts.map +1 -0
- package/dist/extras/schemas.js +89 -0
- package/dist/extras/ui.d.ts +4 -0
- package/dist/extras/ui.d.ts.map +1 -0
- package/dist/extras/ui.js +3 -0
- package/dist/extras.d.ts +10 -0
- package/dist/extras.d.ts.map +1 -0
- package/dist/extras.js +9 -0
- package/dist/hooks/index.d.ts +36 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +35 -0
- package/dist/hooks/use-booking-action-ledger.d.ts +63 -0
- package/dist/hooks/use-booking-action-ledger.d.ts.map +1 -0
- package/dist/hooks/use-booking-action-ledger.js +34 -0
- package/dist/hooks/use-booking-activity.d.ts +17 -0
- package/dist/hooks/use-booking-activity.d.ts.map +1 -0
- package/dist/hooks/use-booking-activity.js +12 -0
- package/dist/hooks/use-booking-cancel-mutation.d.ts +69 -0
- package/dist/hooks/use-booking-cancel-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-cancel-mutation.js +24 -0
- package/dist/hooks/use-booking-contract-generation.d.ts +31 -0
- package/dist/hooks/use-booking-contract-generation.d.ts.map +1 -0
- package/dist/hooks/use-booking-contract-generation.js +36 -0
- package/dist/hooks/use-booking-convert-mutation.d.ts +81 -0
- package/dist/hooks/use-booking-convert-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-convert-mutation.js +24 -0
- package/dist/hooks/use-booking-create-mutation.d.ts +337 -0
- package/dist/hooks/use-booking-create-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-create-mutation.js +43 -0
- package/dist/hooks/use-booking-documents.d.ts +41 -0
- package/dist/hooks/use-booking-documents.d.ts.map +1 -0
- package/dist/hooks/use-booking-documents.js +46 -0
- package/dist/hooks/use-booking-dual-create-mutation.d.ts +338 -0
- package/dist/hooks/use-booking-dual-create-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-dual-create-mutation.js +45 -0
- package/dist/hooks/use-booking-group-for-booking.d.ts +24 -0
- package/dist/hooks/use-booking-group-for-booking.d.ts.map +1 -0
- package/dist/hooks/use-booking-group-for-booking.js +12 -0
- package/dist/hooks/use-booking-group-member-mutation.d.ts +27 -0
- package/dist/hooks/use-booking-group-member-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-group-member-mutation.js +38 -0
- package/dist/hooks/use-booking-group-mutation.d.ts +40 -0
- package/dist/hooks/use-booking-group-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-group-mutation.js +32 -0
- package/dist/hooks/use-booking-group.d.ts +85 -0
- package/dist/hooks/use-booking-group.d.ts.map +1 -0
- package/dist/hooks/use-booking-group.js +12 -0
- package/dist/hooks/use-booking-groups.d.ts +21 -0
- package/dist/hooks/use-booking-groups.d.ts.map +1 -0
- package/dist/hooks/use-booking-groups.js +12 -0
- package/dist/hooks/use-booking-item-mutation.d.ts +101 -0
- package/dist/hooks/use-booking-item-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-item-mutation.js +42 -0
- package/dist/hooks/use-booking-item-travelers.d.ts +32 -0
- package/dist/hooks/use-booking-item-travelers.d.ts.map +1 -0
- package/dist/hooks/use-booking-item-travelers.js +48 -0
- package/dist/hooks/use-booking-items.d.ts +36 -0
- package/dist/hooks/use-booking-items.d.ts.map +1 -0
- package/dist/hooks/use-booking-items.js +12 -0
- package/dist/hooks/use-booking-mutation.d.ts +158 -0
- package/dist/hooks/use-booking-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-mutation.js +39 -0
- package/dist/hooks/use-booking-note-mutation.d.ts +39 -0
- package/dist/hooks/use-booking-note-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-note-mutation.js +44 -0
- package/dist/hooks/use-booking-notes.d.ts +15 -0
- package/dist/hooks/use-booking-notes.d.ts.map +1 -0
- package/dist/hooks/use-booking-notes.js +12 -0
- package/dist/hooks/use-booking-primary-product.d.ts +28 -0
- package/dist/hooks/use-booking-primary-product.d.ts.map +1 -0
- package/dist/hooks/use-booking-primary-product.js +20 -0
- package/dist/hooks/use-booking-status-mutation.d.ts +156 -0
- package/dist/hooks/use-booking-status-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-status-mutation.js +54 -0
- package/dist/hooks/use-booking-tax-preview.d.ts +29 -0
- package/dist/hooks/use-booking-tax-preview.d.ts.map +1 -0
- package/dist/hooks/use-booking-tax-preview.js +21 -0
- package/dist/hooks/use-booking.d.ts +67 -0
- package/dist/hooks/use-booking.d.ts.map +1 -0
- package/dist/hooks/use-booking.js +12 -0
- package/dist/hooks/use-bookings.d.ts +71 -0
- package/dist/hooks/use-bookings.d.ts.map +1 -0
- package/dist/hooks/use-bookings.js +12 -0
- package/dist/hooks/use-pricing-preview.d.ts +61 -0
- package/dist/hooks/use-pricing-preview.d.ts.map +1 -0
- package/dist/hooks/use-pricing-preview.js +18 -0
- package/dist/hooks/use-public-booking-session-flow-mutation.d.ts +148 -0
- package/dist/hooks/use-public-booking-session-flow-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-session-flow-mutation.js +35 -0
- package/dist/hooks/use-public-booking-session-state.d.ts +16 -0
- package/dist/hooks/use-public-booking-session-state.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-session-state.js +12 -0
- package/dist/hooks/use-public-booking-session.d.ts +101 -0
- package/dist/hooks/use-public-booking-session.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-session.js +12 -0
- package/dist/hooks/use-reveal-traveler.d.ts +54 -0
- package/dist/hooks/use-reveal-traveler.d.ts.map +1 -0
- package/dist/hooks/use-reveal-traveler.js +18 -0
- package/dist/hooks/use-sharing-groups.d.ts +41 -0
- package/dist/hooks/use-sharing-groups.d.ts.map +1 -0
- package/dist/hooks/use-sharing-groups.js +20 -0
- package/dist/hooks/use-supplier-status-mutation.d.ts +46 -0
- package/dist/hooks/use-supplier-status-mutation.d.ts.map +1 -0
- package/dist/hooks/use-supplier-status-mutation.js +39 -0
- package/dist/hooks/use-supplier-statuses.d.ts +20 -0
- package/dist/hooks/use-supplier-statuses.d.ts.map +1 -0
- package/dist/hooks/use-supplier-statuses.js +12 -0
- package/dist/hooks/use-traveler-mutation.d.ts +55 -0
- package/dist/hooks/use-traveler-mutation.d.ts.map +1 -0
- package/dist/hooks/use-traveler-mutation.js +42 -0
- package/dist/hooks/use-traveler-with-travel-details-mutation.d.ts +120 -0
- package/dist/hooks/use-traveler-with-travel-details-mutation.d.ts.map +1 -0
- package/dist/hooks/use-traveler-with-travel-details-mutation.js +43 -0
- package/dist/hooks/use-travelers.d.ts +23 -0
- package/dist/hooks/use-travelers.d.ts.map +1 -0
- package/dist/hooks/use-travelers.js +12 -0
- package/dist/i18n/en-base.d.ts +295 -0
- package/dist/i18n/en-base.d.ts.map +1 -0
- package/dist/i18n/en-base.js +294 -0
- package/dist/i18n/en-create-list.d.ts +327 -0
- package/dist/i18n/en-create-list.d.ts.map +1 -0
- package/dist/i18n/en-create-list.js +326 -0
- package/dist/i18n/en-journey.d.ts +229 -0
- package/dist/i18n/en-journey.d.ts.map +1 -0
- package/dist/i18n/en-journey.js +228 -0
- package/dist/i18n/en-operations.d.ts +382 -0
- package/dist/i18n/en-operations.d.ts.map +1 -0
- package/dist/i18n/en-operations.js +381 -0
- package/dist/i18n/en-sections.d.ts +360 -0
- package/dist/i18n/en-sections.d.ts.map +1 -0
- package/dist/i18n/en-sections.js +359 -0
- package/dist/i18n/en.d.ts +1581 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +12 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/messages-base.d.ts +251 -0
- package/dist/i18n/messages-base.d.ts.map +1 -0
- package/dist/i18n/messages-base.js +1 -0
- package/dist/i18n/messages-create-list.d.ts +310 -0
- package/dist/i18n/messages-create-list.d.ts.map +1 -0
- package/dist/i18n/messages-create-list.js +1 -0
- package/dist/i18n/messages-journey.d.ts +198 -0
- package/dist/i18n/messages-journey.d.ts.map +1 -0
- package/dist/i18n/messages-journey.js +1 -0
- package/dist/i18n/messages-operations.d.ts +362 -0
- package/dist/i18n/messages-operations.d.ts.map +1 -0
- package/dist/i18n/messages-operations.js +1 -0
- package/dist/i18n/messages-sections.d.ts +312 -0
- package/dist/i18n/messages-sections.d.ts.map +1 -0
- package/dist/i18n/messages-sections.js +1 -0
- package/dist/i18n/messages.d.ts +7 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +3185 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +45 -0
- package/dist/i18n/ro-base.d.ts +295 -0
- package/dist/i18n/ro-base.d.ts.map +1 -0
- package/dist/i18n/ro-base.js +294 -0
- package/dist/i18n/ro-create-list.d.ts +327 -0
- package/dist/i18n/ro-create-list.d.ts.map +1 -0
- package/dist/i18n/ro-create-list.js +326 -0
- package/dist/i18n/ro-journey.d.ts +229 -0
- package/dist/i18n/ro-journey.d.ts.map +1 -0
- package/dist/i18n/ro-journey.js +228 -0
- package/dist/i18n/ro-operations.d.ts +382 -0
- package/dist/i18n/ro-operations.d.ts.map +1 -0
- package/dist/i18n/ro-operations.js +381 -0
- package/dist/i18n/ro-sections.d.ts +360 -0
- package/dist/i18n/ro-sections.d.ts.map +1 -0
- package/dist/i18n/ro-sections.js +359 -0
- package/dist/i18n/ro.d.ts +1581 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +12 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/journey/components/booking-journey-rules.d.ts +48 -0
- package/dist/journey/components/booking-journey-rules.d.ts.map +1 -0
- package/dist/journey/components/booking-journey-rules.js +235 -0
- package/dist/journey/components/booking-journey.d.ts +3 -0
- package/dist/journey/components/booking-journey.d.ts.map +1 -0
- package/dist/journey/components/booking-journey.js +368 -0
- package/dist/journey/components/configure-step-skeleton.d.ts +8 -0
- package/dist/journey/components/configure-step-skeleton.d.ts.map +1 -0
- package/dist/journey/components/configure-step-skeleton.js +11 -0
- package/dist/journey/components/contract-preview-dialog.d.ts +47 -0
- package/dist/journey/components/contract-preview-dialog.d.ts.map +1 -0
- package/dist/journey/components/contract-preview-dialog.js +124 -0
- package/dist/journey/components/journey-steps/accommodation-step.d.ts +3 -0
- package/dist/journey/components/journey-steps/accommodation-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/accommodation-step.js +71 -0
- package/dist/journey/components/journey-steps/addons-step.d.ts +3 -0
- package/dist/journey/components/journey-steps/addons-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/addons-step.js +40 -0
- package/dist/journey/components/journey-steps/billing-step.d.ts +8 -0
- package/dist/journey/components/journey-steps/billing-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/billing-step.js +78 -0
- package/dist/journey/components/journey-steps/configure-steps.d.ts +28 -0
- package/dist/journey/components/journey-steps/configure-steps.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/configure-steps.js +232 -0
- package/dist/journey/components/journey-steps/documents-step.d.ts +11 -0
- package/dist/journey/components/journey-steps/documents-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/documents-step.js +36 -0
- package/dist/journey/components/journey-steps/payment-step.d.ts +29 -0
- package/dist/journey/components/journey-steps/payment-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/payment-step.js +225 -0
- package/dist/journey/components/journey-steps/review-step.d.ts +27 -0
- package/dist/journey/components/journey-steps/review-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/review-step.js +18 -0
- package/dist/journey/components/journey-steps/shared.d.ts +75 -0
- package/dist/journey/components/journey-steps/shared.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/shared.js +108 -0
- package/dist/journey/components/journey-steps/travelers-step.d.ts +7 -0
- package/dist/journey/components/journey-steps/travelers-step.d.ts.map +1 -0
- package/dist/journey/components/journey-steps/travelers-step.js +201 -0
- package/dist/journey/components/journey-steps.d.ts +21 -0
- package/dist/journey/components/journey-steps.d.ts.map +1 -0
- package/dist/journey/components/journey-steps.js +20 -0
- package/dist/journey/components/side-panel.d.ts +17 -0
- package/dist/journey/components/side-panel.d.ts.map +1 -0
- package/dist/journey/components/side-panel.js +245 -0
- package/dist/journey/components/stacked-journey.d.ts +30 -0
- package/dist/journey/components/stacked-journey.d.ts.map +1 -0
- package/dist/journey/components/stacked-journey.js +50 -0
- package/dist/journey/components/step-header.d.ts +7 -0
- package/dist/journey/components/step-header.d.ts.map +1 -0
- package/dist/journey/components/step-header.js +12 -0
- package/dist/journey/index.d.ts +18 -0
- package/dist/journey/index.d.ts.map +1 -0
- package/dist/journey/index.js +17 -0
- package/dist/journey/lib/draft-state.d.ts +35 -0
- package/dist/journey/lib/draft-state.d.ts.map +1 -0
- package/dist/journey/lib/draft-state.js +57 -0
- package/dist/journey/lib/pax-band-dependencies.d.ts +27 -0
- package/dist/journey/lib/pax-band-dependencies.d.ts.map +1 -0
- package/dist/journey/lib/pax-band-dependencies.js +50 -0
- package/dist/journey/lib/payment-schedule.d.ts +19 -0
- package/dist/journey/lib/payment-schedule.d.ts.map +1 -0
- package/dist/journey/lib/payment-schedule.js +90 -0
- package/dist/journey/types.d.ts +403 -0
- package/dist/journey/types.d.ts.map +1 -0
- package/dist/journey/types.js +19 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +1 -0
- package/dist/query-keys.d.ts +74 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +26 -0
- package/dist/query-options.d.ts +2534 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +233 -0
- package/dist/requirements/client.d.ts +14 -0
- package/dist/requirements/client.d.ts.map +1 -0
- package/dist/requirements/client.js +59 -0
- package/dist/requirements/components/booking-requirements-contact-tab.d.ts +8 -0
- package/dist/requirements/components/booking-requirements-contact-tab.d.ts.map +1 -0
- package/dist/requirements/components/booking-requirements-contact-tab.js +8 -0
- package/dist/requirements/components/booking-requirements-questions-tab.d.ts +14 -0
- package/dist/requirements/components/booking-requirements-questions-tab.d.ts.map +1 -0
- package/dist/requirements/components/booking-requirements-questions-tab.js +17 -0
- package/dist/requirements/constants.d.ts +114 -0
- package/dist/requirements/constants.d.ts.map +1 -0
- package/dist/requirements/constants.js +45 -0
- package/dist/requirements/hooks/index.d.ts +6 -0
- package/dist/requirements/hooks/index.d.ts.map +1 -0
- package/dist/requirements/hooks/index.js +6 -0
- package/dist/requirements/hooks/use-booking-questions.d.ts +24 -0
- package/dist/requirements/hooks/use-booking-questions.d.ts.map +1 -0
- package/dist/requirements/hooks/use-booking-questions.js +9 -0
- package/dist/requirements/hooks/use-contact-requirements.d.ts +22 -0
- package/dist/requirements/hooks/use-contact-requirements.d.ts.map +1 -0
- package/dist/requirements/hooks/use-contact-requirements.js +9 -0
- package/dist/requirements/hooks/use-products.d.ts +16 -0
- package/dist/requirements/hooks/use-products.d.ts.map +1 -0
- package/dist/requirements/hooks/use-products.js +9 -0
- package/dist/requirements/hooks/use-question-options.d.ts +19 -0
- package/dist/requirements/hooks/use-question-options.d.ts.map +1 -0
- package/dist/requirements/hooks/use-question-options.js +9 -0
- package/dist/requirements/hooks/use-transport-requirements.d.ts +30 -0
- package/dist/requirements/hooks/use-transport-requirements.d.ts.map +1 -0
- package/dist/requirements/hooks/use-transport-requirements.js +9 -0
- package/dist/requirements/i18n/en.d.ts +94 -0
- package/dist/requirements/i18n/en.d.ts.map +1 -0
- package/dist/requirements/i18n/en.js +93 -0
- package/dist/requirements/i18n/index.d.ts +5 -0
- package/dist/requirements/i18n/index.d.ts.map +1 -0
- package/dist/requirements/i18n/index.js +3 -0
- package/dist/requirements/i18n/messages.d.ts +59 -0
- package/dist/requirements/i18n/messages.d.ts.map +1 -0
- package/dist/requirements/i18n/messages.js +1 -0
- package/dist/requirements/i18n/provider.d.ts +210 -0
- package/dist/requirements/i18n/provider.d.ts.map +1 -0
- package/dist/requirements/i18n/provider.js +44 -0
- package/dist/requirements/i18n/ro.d.ts +94 -0
- package/dist/requirements/i18n/ro.d.ts.map +1 -0
- package/dist/requirements/i18n/ro.js +93 -0
- package/dist/requirements/index.d.ts +9 -0
- package/dist/requirements/index.d.ts.map +1 -0
- package/dist/requirements/index.js +8 -0
- package/dist/requirements/provider.d.ts +2 -0
- package/dist/requirements/provider.d.ts.map +1 -0
- package/dist/requirements/provider.js +1 -0
- package/dist/requirements/query-keys.d.ts +33 -0
- package/dist/requirements/query-keys.d.ts.map +1 -0
- package/dist/requirements/query-keys.js +13 -0
- package/dist/requirements/query-options.d.ts +371 -0
- package/dist/requirements/query-options.d.ts.map +1 -0
- package/dist/requirements/query-options.js +80 -0
- package/dist/requirements/schemas.d.ts +320 -0
- package/dist/requirements/schemas.d.ts.map +1 -0
- package/dist/requirements/schemas.js +121 -0
- package/dist/requirements/ui.d.ts +4 -0
- package/dist/requirements/ui.d.ts.map +1 -0
- package/dist/requirements/ui.js +3 -0
- package/dist/requirements/utils.d.ts +2 -0
- package/dist/requirements/utils.d.ts.map +1 -0
- package/dist/requirements/utils.js +4 -0
- package/dist/schemas.d.ts +2070 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +507 -0
- package/dist/status-presentation.d.ts +34 -0
- package/dist/status-presentation.d.ts.map +1 -0
- package/dist/status-presentation.js +38 -0
- package/dist/ui.d.ts +43 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +42 -0
- package/package.json +256 -0
- package/src/requirements/styles.css +1 -0
- package/src/styles.css +13 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useAdminNavigate } from "@voyant-travel/admin";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
/**
|
|
5
|
+
* Legacy alias: `/bookings/compose` → the trips. The composer used
|
|
6
|
+
* to live here; it moved under the trips area, and this packaged page keeps
|
|
7
|
+
* the old URL working by forwarding to the `trip.create` destination (the
|
|
8
|
+
* host resolves it to its composer route). `replace` keeps route-redirect
|
|
9
|
+
* history semantics — the alias never lands in history.
|
|
10
|
+
*/
|
|
11
|
+
export default function BookingComposePage() {
|
|
12
|
+
const navigate = useAdminNavigate();
|
|
13
|
+
React.useEffect(() => {
|
|
14
|
+
navigate("trip.create", {}, { replace: true });
|
|
15
|
+
}, [navigate]);
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BookingDetailPageComponentProps } from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Default packaged booking detail page (packaged-admin RFC §4.8):
|
|
4
|
+
* {@link BookingDetailHost} with no app-owned dialogs wired. Hosts that need
|
|
5
|
+
* to attach app-local flows (record-payment / payment-link dialogs, which
|
|
6
|
+
* live app-side because the finance/checkout UI packages depend on this
|
|
7
|
+
* package) substitute their own wrapper via
|
|
8
|
+
* `CreateBookingsAdminExtensionOptions.detailPageComponent`.
|
|
9
|
+
*/
|
|
10
|
+
export default function BookingDetailDefaultPage({ id, activeTab, onTabChange, }: BookingDetailPageComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=booking-detail-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booking-detail-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/booking-detail-page.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAA;AAElE;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,EAC/C,EAAE,EACF,SAAS,EACT,WAAW,GACZ,EAAE,+BAA+B,2CAEjC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { BookingDetailHost } from "../booking-detail-host.js";
|
|
4
|
+
/**
|
|
5
|
+
* Default packaged booking detail page (packaged-admin RFC §4.8):
|
|
6
|
+
* {@link BookingDetailHost} with no app-owned dialogs wired. Hosts that need
|
|
7
|
+
* to attach app-local flows (record-payment / payment-link dialogs, which
|
|
8
|
+
* live app-side because the finance/checkout UI packages depend on this
|
|
9
|
+
* package) substitute their own wrapper via
|
|
10
|
+
* `CreateBookingsAdminExtensionOptions.detailPageComponent`.
|
|
11
|
+
*/
|
|
12
|
+
export default function BookingDetailDefaultPage({ id, activeTab, onTabChange, }) {
|
|
13
|
+
return _jsx(BookingDetailHost, { id: id, activeTab: activeTab, onTabChange: onTabChange });
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Packaged unified booking journey page (packaged-admin RFC §4.8): binds the
|
|
4
|
+
* route's `$entityModule`/`$entityId` params and the journey search contract
|
|
5
|
+
* (`bookingJourneySearchSchema`) onto {@link BookingJourneyHost}. Mounted at
|
|
6
|
+
* `/catalog/journey/$entityModule/$entityId` — a flat path under the
|
|
7
|
+
* workspace layout, so the wizard renders with workspace chrome but OUTSIDE
|
|
8
|
+
* any catalog section nesting (the same semantics the old `catalog_.journey`
|
|
9
|
+
* escaped route file had).
|
|
10
|
+
*/
|
|
11
|
+
export default function BookingJourneyPage({ params, search }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=booking-journey-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booking-journey-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/booking-journey-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAM/D;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CA0BjF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { BookingJourneyHost } from "../booking-journey-host.js";
|
|
5
|
+
/**
|
|
6
|
+
* Packaged unified booking journey page (packaged-admin RFC §4.8): binds the
|
|
7
|
+
* route's `$entityModule`/`$entityId` params and the journey search contract
|
|
8
|
+
* (`bookingJourneySearchSchema`) onto {@link BookingJourneyHost}. Mounted at
|
|
9
|
+
* `/catalog/journey/$entityModule/$entityId` — a flat path under the
|
|
10
|
+
* workspace layout, so the wizard renders with workspace chrome but OUTSIDE
|
|
11
|
+
* any catalog section nesting (the same semantics the old `catalog_.journey`
|
|
12
|
+
* escaped route file had).
|
|
13
|
+
*/
|
|
14
|
+
export default function BookingJourneyPage({ params, search }) {
|
|
15
|
+
const journeySearch = search;
|
|
16
|
+
// Stable draft id — refresh-safe when carried in the URL; generated once
|
|
17
|
+
// per mount otherwise.
|
|
18
|
+
const draftId = useMemo(() => journeySearch.draftId ?? generateDraftId(), [journeySearch.draftId]);
|
|
19
|
+
return (_jsx("div", { className: "container mx-auto py-6", children: _jsx(BookingJourneyHost, { entityModule: params.entityModule ?? "", entityId: params.entityId ?? "", sourceKind: journeySearch.sourceKind, sourceConnectionId: journeySearch.sourceConnectionId, sourceRef: journeySearch.sourceRef, departureId: journeySearch.departureId, departureDate: journeySearch.departureDate, optionId: journeySearch.optionId, roomTypeId: journeySearch.roomTypeId, ratePlanId: journeySearch.ratePlanId, board: journeySearch.board, entityName: journeySearch.entityName, entityImageUrl: journeySearch.entityImageUrl, draftId: draftId }) }));
|
|
20
|
+
}
|
|
21
|
+
function generateDraftId() {
|
|
22
|
+
if (typeof globalThis.crypto !== "undefined" && globalThis.crypto.randomUUID) {
|
|
23
|
+
return `bdrf_${globalThis.crypto.randomUUID().replace(/-/g, "")}`;
|
|
24
|
+
}
|
|
25
|
+
return `bdrf_${Date.now().toString(36)}${Math.random().toString(36).slice(2, 10)}`;
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Packaged "New booking" entry page (packaged-admin RFC §4.8): pick an owned
|
|
4
|
+
* product, then route into the unified booking journey so every booking goes
|
|
5
|
+
* through one flow. Owned products come straight off the products table —
|
|
6
|
+
* real names (including non-English), always browsable, with a proper
|
|
7
|
+
* loading state. Supplier-sourced products are booked from the catalog
|
|
8
|
+
* browse/detail pages (which carry the connect provenance), not here.
|
|
9
|
+
*
|
|
10
|
+
* Mounted at `/bookings/new` — a static path, so it outranks the
|
|
11
|
+
* `/bookings/$id` detail route for the `"new"` segment by the router's
|
|
12
|
+
* static-over-dynamic scoring.
|
|
13
|
+
*/
|
|
14
|
+
export default function BookingNewPage({ search }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
//# sourceMappingURL=booking-new-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booking-new-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/booking-new-page.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,mBAAmB,EAAoB,MAAM,sBAAsB,CAAA;AAUjF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,kDAmDrE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useAdminNavigate } from "@voyant-travel/admin";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { ProductPickerSection } from "../../components/product-picker-section.js";
|
|
6
|
+
import { useBookingsUiMessagesOrDefault } from "../../i18n/provider.js";
|
|
7
|
+
/**
|
|
8
|
+
* Packaged "New booking" entry page (packaged-admin RFC §4.8): pick an owned
|
|
9
|
+
* product, then route into the unified booking journey so every booking goes
|
|
10
|
+
* through one flow. Owned products come straight off the products table —
|
|
11
|
+
* real names (including non-English), always browsable, with a proper
|
|
12
|
+
* loading state. Supplier-sourced products are booked from the catalog
|
|
13
|
+
* browse/detail pages (which carry the connect provenance), not here.
|
|
14
|
+
*
|
|
15
|
+
* Mounted at `/bookings/new` — a static path, so it outranks the
|
|
16
|
+
* `/bookings/$id` detail route for the `"new"` segment by the router's
|
|
17
|
+
* static-over-dynamic scoring.
|
|
18
|
+
*/
|
|
19
|
+
export default function BookingNewPage({ search }) {
|
|
20
|
+
const { productId, slotId } = search;
|
|
21
|
+
const navigate = useAdminNavigate();
|
|
22
|
+
const messages = useBookingsUiMessagesOrDefault();
|
|
23
|
+
// Deep-link with a product already chosen (e.g. launched from a product
|
|
24
|
+
// page) → straight into the unified booking journey for that owned
|
|
25
|
+
// product. `replace` keeps route-redirect history semantics.
|
|
26
|
+
React.useEffect(() => {
|
|
27
|
+
if (!productId)
|
|
28
|
+
return;
|
|
29
|
+
navigate("bookingJourney.start", {
|
|
30
|
+
entityModule: "products",
|
|
31
|
+
entityId: productId,
|
|
32
|
+
sourceKind: "owned",
|
|
33
|
+
...(slotId ? { departureId: slotId } : {}),
|
|
34
|
+
}, { replace: true });
|
|
35
|
+
}, [productId, slotId, navigate]);
|
|
36
|
+
if (productId)
|
|
37
|
+
return null;
|
|
38
|
+
return (_jsxs("main", { className: "mx-auto flex w-full max-w-screen-md flex-col gap-6 px-4 py-6 sm:px-6 lg:px-8", children: [_jsxs("header", { className: "flex flex-col gap-1", children: [_jsx("h1", { className: "font-semibold text-2xl tracking-normal", children: messages.bookingCreatePage.title }), _jsx("p", { className: "text-muted-foreground text-sm", children: messages.bookingCreatePage.description })] }), _jsx(ProductPickerSection, { value: { productId: "", optionId: null }, enabled: true, lockProduct: false, showOptionPicker: false,
|
|
39
|
+
// Owned pick -> journey with `owned` provenance. Clearing the field
|
|
40
|
+
// yields an empty productId, which we ignore.
|
|
41
|
+
onChange: (value) => {
|
|
42
|
+
if (value.productId) {
|
|
43
|
+
navigate("bookingJourney.start", {
|
|
44
|
+
entityModule: "products",
|
|
45
|
+
entityId: value.productId,
|
|
46
|
+
sourceKind: "owned",
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
} })] }));
|
|
50
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export interface BookingsIndexPageProps extends AdminRoutePageProps {
|
|
4
|
+
/**
|
|
5
|
+
* App-owned extra header action(s) rendered alongside the primary
|
|
6
|
+
* "New booking" button — wired through
|
|
7
|
+
* `CreateBookingsAdminExtensionOptions.indexHeaderActions` by the
|
|
8
|
+
* extension factory's tiny page wrapper.
|
|
9
|
+
*/
|
|
10
|
+
headerActions?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Packaged bookings list page (packaged-admin RFC §4.8): binds the route's
|
|
14
|
+
* URL search state onto {@link BookingsHost}'s filter props. The search shape
|
|
15
|
+
* is the package-owned contract the contribution's `validateSearch` parses
|
|
16
|
+
* (`bookingsIndexSearchSchema`), so the cast below narrows to a shape the
|
|
17
|
+
* router already validated.
|
|
18
|
+
*/
|
|
19
|
+
export default function BookingsIndexPage({ search, updateSearch, headerActions, }: BookingsIndexPageProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=bookings-index-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-index-page.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/bookings-index-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAStC,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE;;;;;OAKG;IACH,aAAa,CAAC,EAAE,SAAS,CAAA;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,MAAM,EACN,YAAY,EACZ,aAAa,GACd,EAAE,sBAAsB,2CAaxB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { BookingsHost } from "../bookings-host.js";
|
|
4
|
+
import { bookingsFiltersToSearch, bookingsSearchToFilters, } from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Packaged bookings list page (packaged-admin RFC §4.8): binds the route's
|
|
7
|
+
* URL search state onto {@link BookingsHost}'s filter props. The search shape
|
|
8
|
+
* is the package-owned contract the contribution's `validateSearch` parses
|
|
9
|
+
* (`bookingsIndexSearchSchema`), so the cast below narrows to a shape the
|
|
10
|
+
* router already validated.
|
|
11
|
+
*/
|
|
12
|
+
export default function BookingsIndexPage({ search, updateSearch, headerActions, }) {
|
|
13
|
+
return (_jsx(BookingsHost, { headerActions: headerActions, initialFilters: bookingsSearchToFilters(search), onFiltersChange: (filters) =>
|
|
14
|
+
// Full search replace on purpose: the projection re-derives the WHOLE
|
|
15
|
+
// search state from the filter snapshot, so the updater ignores
|
|
16
|
+
// `prev` instead of merging stale params back in.
|
|
17
|
+
updateSearch(() => bookingsFiltersToSearch(filters), { replace: true }) }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { PersonDetailBookingsTabContext } from "@voyant-travel/relationships-react/admin";
|
|
2
|
+
export type PersonBookingsWidgetProps = PersonDetailBookingsTabContext;
|
|
3
|
+
/**
|
|
4
|
+
* The person detail page's Bookings tab, contributed as a widget on
|
|
5
|
+
* crm-ui's `person.details.bookings-tab` slot (packaged-admin RFC §4.7
|
|
6
|
+
* cycle resolution): this package depends on `@voyant-travel/relationships-react/ui`, so the
|
|
7
|
+
* person detail host cannot import this card — the contribution travels
|
|
8
|
+
* the widget seam instead. Receives the slot's typed context
|
|
9
|
+
* (`PersonDetailBookingsTabContext`) as props and opens rows through the
|
|
10
|
+
* semantic `booking.detail` destination.
|
|
11
|
+
*/
|
|
12
|
+
export declare function PersonBookingsWidget({ personId }: PersonBookingsWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=person-bookings-widget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person-bookings-widget.d.ts","sourceRoot":"","sources":["../../src/admin/person-bookings-widget.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAA;AAa9F,MAAM,MAAM,yBAAyB,GAAG,8BAA8B,CAAA;AAEtE;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,EAAE,yBAAyB,2CAmF3E"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useAdminNavigate, useOperatorAdminMessages } from "@voyant-travel/admin";
|
|
4
|
+
import { Badge } from "@voyant-travel/ui/components/badge";
|
|
5
|
+
import { Skeleton } from "@voyant-travel/ui/components/skeleton";
|
|
6
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@voyant-travel/ui/components/table";
|
|
7
|
+
import { bookingStatusBadgeVariant, useBookings } from "../index.js";
|
|
8
|
+
/**
|
|
9
|
+
* The person detail page's Bookings tab, contributed as a widget on
|
|
10
|
+
* crm-ui's `person.details.bookings-tab` slot (packaged-admin RFC §4.7
|
|
11
|
+
* cycle resolution): this package depends on `@voyant-travel/relationships-react/ui`, so the
|
|
12
|
+
* person detail host cannot import this card — the contribution travels
|
|
13
|
+
* the widget seam instead. Receives the slot's typed context
|
|
14
|
+
* (`PersonDetailBookingsTabContext`) as props and opens rows through the
|
|
15
|
+
* semantic `booking.detail` destination.
|
|
16
|
+
*/
|
|
17
|
+
export function PersonBookingsWidget({ personId }) {
|
|
18
|
+
const adminMessages = useOperatorAdminMessages();
|
|
19
|
+
const messages = adminMessages.bookings.list;
|
|
20
|
+
const navigateTo = useAdminNavigate();
|
|
21
|
+
const bookingsQuery = useBookings({ personId, limit: 50 });
|
|
22
|
+
const bookings = bookingsQuery.data?.data ?? [];
|
|
23
|
+
if (bookingsQuery.isPending) {
|
|
24
|
+
return (_jsxs("div", { className: "space-y-2 p-4", children: [_jsx(Skeleton, { className: "h-10 w-full" }), _jsx(Skeleton, { className: "h-10 w-full" }), _jsx(Skeleton, { className: "h-10 w-full" })] }));
|
|
25
|
+
}
|
|
26
|
+
if (bookingsQuery.isError) {
|
|
27
|
+
return (_jsx("div", { className: "p-6 text-center text-destructive text-sm", children: adminMessages.crm.personDetail.notFound }));
|
|
28
|
+
}
|
|
29
|
+
if (bookings.length === 0) {
|
|
30
|
+
return (_jsx("div", { className: "p-6 text-center text-muted-foreground text-sm", children: messages.relatedEmpty }));
|
|
31
|
+
}
|
|
32
|
+
return (_jsx("div", { className: "rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: messages.tableBookingNumber }), _jsx(TableHead, { children: messages.tableItems }), _jsx(TableHead, { children: messages.tableStatus }), _jsx(TableHead, { children: messages.tableSellAmount }), _jsx(TableHead, { children: messages.tablePax }), _jsx(TableHead, { children: messages.tableStartDate })] }) }), _jsx(TableBody, { children: bookings.map((booking) => {
|
|
33
|
+
const firstItem = booking.items?.[0];
|
|
34
|
+
const itemLabel = firstItem?.productName ?? firstItem?.title ?? "—";
|
|
35
|
+
const extraItems = Math.max((booking.items?.length ?? 0) - 1, 0);
|
|
36
|
+
return (_jsxs(TableRow, { onClick: () => navigateTo("booking.detail", { bookingId: booking.id }), className: "cursor-pointer", children: [_jsx(TableCell, { className: "font-medium", children: booking.bookingNumber }), _jsx(TableCell, { children: _jsxs("div", { className: "max-w-[280px] truncate", title: itemLabel, children: [itemLabel, extraItems > 0 ? (_jsxs("span", { className: "ml-1 text-muted-foreground text-xs", children: ["+", extraItems] })) : null] }) }), _jsx(TableCell, { children: _jsx(Badge, { variant: bookingStatusBadgeVariant[booking.status], children: booking.status }) }), _jsx(TableCell, { children: booking.sellAmountCents == null
|
|
37
|
+
? "—"
|
|
38
|
+
: `${(booking.sellAmountCents / 100).toFixed(2)} ${booking.sellCurrency}` }), _jsx(TableCell, { children: booking.pax ?? "—" }), _jsx(TableCell, { children: formatBookingDate(booking.startsAt ?? booking.startDate) })] }, booking.id));
|
|
39
|
+
}) })] }) }));
|
|
40
|
+
}
|
|
41
|
+
function formatBookingDate(value) {
|
|
42
|
+
if (!value)
|
|
43
|
+
return "—";
|
|
44
|
+
const date = new Date(/^\d{4}-\d{2}-\d{2}$/.test(value) ? `${value}T00:00:00` : value);
|
|
45
|
+
if (Number.isNaN(date.getTime()))
|
|
46
|
+
return "—";
|
|
47
|
+
return date.toLocaleDateString();
|
|
48
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Widget slot ids exposed by the bookings admin host pages.
|
|
3
|
+
*
|
|
4
|
+
* Kept in their own module (no component imports) so slot-id consumers —
|
|
5
|
+
* other domains' admin extension factories, which live in the host's
|
|
6
|
+
* eagerly-evaluated workspace-chrome chunk — can import them without
|
|
7
|
+
* pulling the heavy booking detail host into the entry graph.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Widget slot rendered as the booking detail page's Invoices tab
|
|
11
|
+
* (packaged-admin RFC §4.7 cycle resolution): `@voyant-travel/finance-react/ui` depends
|
|
12
|
+
* on this package, so the host cannot import the finance-owned invoices card
|
|
13
|
+
* directly — instead finance's admin extension contributes a widget targeting
|
|
14
|
+
* this slot and the host mounts the tab whenever a contribution exists.
|
|
15
|
+
* Widgets receive `BookingDetailHostSlotContext` as props.
|
|
16
|
+
*/
|
|
17
|
+
export declare const bookingDetailInvoicesTabSlot = "booking.details.invoices-tab";
|
|
18
|
+
/**
|
|
19
|
+
* Widget slot rendered at the top of the booking detail page's Finance tab
|
|
20
|
+
* (same §4.7 cycle resolution as {@link bookingDetailInvoicesTabSlot}).
|
|
21
|
+
* `@voyant-travel/finance-react/ui` contributes its pending payment-sessions card here.
|
|
22
|
+
* Widgets receive `BookingDetailHostSlotContext` as props.
|
|
23
|
+
*/
|
|
24
|
+
export declare const bookingDetailFinanceStartSlot = "booking.details.finance-start";
|
|
25
|
+
/**
|
|
26
|
+
* Widget slot rendered at the bottom of the booking detail page's Finance
|
|
27
|
+
* tab. `@voyant-travel/finance-react/ui` contributes its payment-policy override card
|
|
28
|
+
* here. Widgets receive `BookingDetailHostSlotContext` as props.
|
|
29
|
+
*/
|
|
30
|
+
export declare const bookingDetailFinanceEndSlot = "booking.details.finance-end";
|
|
31
|
+
//# sourceMappingURL=slots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/admin/slots.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,iCAAiC,CAAA;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,kCAAkC,CAAA;AAE5E;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,gCAAgC,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Widget slot ids exposed by the bookings admin host pages.
|
|
3
|
+
*
|
|
4
|
+
* Kept in their own module (no component imports) so slot-id consumers —
|
|
5
|
+
* other domains' admin extension factories, which live in the host's
|
|
6
|
+
* eagerly-evaluated workspace-chrome chunk — can import them without
|
|
7
|
+
* pulling the heavy booking detail host into the entry graph.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Widget slot rendered as the booking detail page's Invoices tab
|
|
11
|
+
* (packaged-admin RFC §4.7 cycle resolution): `@voyant-travel/finance-react/ui` depends
|
|
12
|
+
* on this package, so the host cannot import the finance-owned invoices card
|
|
13
|
+
* directly — instead finance's admin extension contributes a widget targeting
|
|
14
|
+
* this slot and the host mounts the tab whenever a contribution exists.
|
|
15
|
+
* Widgets receive `BookingDetailHostSlotContext` as props.
|
|
16
|
+
*/
|
|
17
|
+
export const bookingDetailInvoicesTabSlot = "booking.details.invoices-tab";
|
|
18
|
+
/**
|
|
19
|
+
* Widget slot rendered at the top of the booking detail page's Finance tab
|
|
20
|
+
* (same §4.7 cycle resolution as {@link bookingDetailInvoicesTabSlot}).
|
|
21
|
+
* `@voyant-travel/finance-react/ui` contributes its pending payment-sessions card here.
|
|
22
|
+
* Widgets receive `BookingDetailHostSlotContext` as props.
|
|
23
|
+
*/
|
|
24
|
+
export const bookingDetailFinanceStartSlot = "booking.details.finance-start";
|
|
25
|
+
/**
|
|
26
|
+
* Widget slot rendered at the bottom of the booking detail page's Finance
|
|
27
|
+
* tab. `@voyant-travel/finance-react/ui` contributes its payment-policy override card
|
|
28
|
+
* here. Widgets receive `BookingDetailHostSlotContext` as props.
|
|
29
|
+
*/
|
|
30
|
+
export const bookingDetailFinanceEndSlot = "booking.details.finance-end";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TimelineEvent } from "../components/booking-activity-timeline.js";
|
|
2
|
+
/**
|
|
3
|
+
* Fetch the booking's central action-ledger entries and map them into
|
|
4
|
+
* `TimelineEvent`s so they can be merged into `BookingActivityTimeline`.
|
|
5
|
+
* Replaces the standalone Ledger tab — operators see one chronological
|
|
6
|
+
* activity feed instead of two sibling tabs.
|
|
7
|
+
*
|
|
8
|
+
* Returns a "Load more" `footer` element when the cursor pager hasn't
|
|
9
|
+
* exhausted yet so the timeline can render it below the event list.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useBookingActionLedgerEvents(bookingId: string): {
|
|
12
|
+
events: TimelineEvent[];
|
|
13
|
+
footer: React.ReactNode | null;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=use-booking-action-ledger-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-booking-action-ledger-events.d.ts","sourceRoot":"","sources":["../../src/admin/use-booking-action-ledger-events.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAA;AAO/E;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG;IAC/D,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,MAAM,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAA;CAC/B,CAgDA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useOperatorAdminMessages } from "@voyant-travel/admin";
|
|
4
|
+
import { Button } from "@voyant-travel/ui/components/button";
|
|
5
|
+
import { ScrollText } from "lucide-react";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
import { useBookingActionLedger, } from "../index.js";
|
|
8
|
+
/**
|
|
9
|
+
* Fetch the booking's central action-ledger entries and map them into
|
|
10
|
+
* `TimelineEvent`s so they can be merged into `BookingActivityTimeline`.
|
|
11
|
+
* Replaces the standalone Ledger tab — operators see one chronological
|
|
12
|
+
* activity feed instead of two sibling tabs.
|
|
13
|
+
*
|
|
14
|
+
* Returns a "Load more" `footer` element when the cursor pager hasn't
|
|
15
|
+
* exhausted yet so the timeline can render it below the event list.
|
|
16
|
+
*/
|
|
17
|
+
export function useBookingActionLedgerEvents(bookingId) {
|
|
18
|
+
const t = useOperatorAdminMessages().bookings.detail.actionLedger;
|
|
19
|
+
const ledgerQuery = useBookingActionLedger(bookingId);
|
|
20
|
+
const pages = useMemo(() => ledgerQuery.data?.pages ?? [], [ledgerQuery.data]);
|
|
21
|
+
const travelers = pages[0]?.travelers ?? [];
|
|
22
|
+
const travelersById = useMemo(() => new Map(travelers.map((traveler) => [traveler.id, traveler])), [travelers]);
|
|
23
|
+
const events = useMemo(() => {
|
|
24
|
+
const all = [];
|
|
25
|
+
for (const page of pages) {
|
|
26
|
+
for (const entry of page.data) {
|
|
27
|
+
const traveler = travelersById.get(entry.targetId) ?? null;
|
|
28
|
+
all.push({
|
|
29
|
+
id: `action:${entry.id}`,
|
|
30
|
+
source: "action",
|
|
31
|
+
title: formatActionName(entry.actionName),
|
|
32
|
+
description: formatLedgerDescription(entry, traveler, t.travelerFallback, t.targetBooking),
|
|
33
|
+
actorId: entry.principalId,
|
|
34
|
+
timestamp: entry.occurredAt,
|
|
35
|
+
icon: ScrollText,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return all;
|
|
40
|
+
}, [pages, travelersById, t.targetBooking, t.travelerFallback]);
|
|
41
|
+
const footer = ledgerQuery.hasNextPage ? (_jsx(Button, { type: "button", variant: "outline", size: "sm", disabled: ledgerQuery.isFetchingNextPage, onClick: () => void ledgerQuery.fetchNextPage(), children: ledgerQuery.isFetchingNextPage ? t.loadingMore : t.loadMore })) : null;
|
|
42
|
+
return { events, footer };
|
|
43
|
+
}
|
|
44
|
+
function formatActionName(value) {
|
|
45
|
+
return value.replaceAll(".", " / ").replaceAll("_", " ");
|
|
46
|
+
}
|
|
47
|
+
function formatTarget(entry, traveler, travelerFallback, bookingFallback) {
|
|
48
|
+
if (traveler) {
|
|
49
|
+
return [traveler.firstName, traveler.lastName].filter(Boolean).join(" ") || travelerFallback;
|
|
50
|
+
}
|
|
51
|
+
if (entry.targetType === "booking")
|
|
52
|
+
return bookingFallback;
|
|
53
|
+
return entry.targetType.replaceAll("_", " ");
|
|
54
|
+
}
|
|
55
|
+
function formatLedgerDescription(entry, traveler, travelerFallback, bookingFallback) {
|
|
56
|
+
// status / target / risk are machine-readable enum strings the
|
|
57
|
+
// ledger ships unmodified (matches the standalone panel behaviour).
|
|
58
|
+
const parts = [
|
|
59
|
+
entry.status,
|
|
60
|
+
formatTarget(entry, traveler, travelerFallback, bookingFallback),
|
|
61
|
+
entry.evaluatedRisk,
|
|
62
|
+
];
|
|
63
|
+
if (entry.routeOrToolName)
|
|
64
|
+
parts.push(entry.routeOrToolName);
|
|
65
|
+
return parts.join(" · ");
|
|
66
|
+
}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
export type VoyantFetcher = (url: string, init?: RequestInit) => Promise<Response>;
|
|
3
|
+
export declare const defaultFetcher: VoyantFetcher;
|
|
4
|
+
export declare class VoyantApiError extends Error {
|
|
5
|
+
readonly status: number;
|
|
6
|
+
readonly body: unknown;
|
|
7
|
+
constructor(message: string, status: number, body: unknown);
|
|
8
|
+
}
|
|
9
|
+
export interface FetchWithValidationOptions {
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
fetcher: VoyantFetcher;
|
|
12
|
+
}
|
|
13
|
+
export declare function fetchWithValidation<TOut>(path: string, schema: z.ZodType<TOut>, options: FetchWithValidationOptions, init?: RequestInit): Promise<TOut>;
|
|
14
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,aACoB,CAAA;AAEjD,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;gBAEV,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;CAM3D;AAaD,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,aAAa,CAAA;CACvB;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAC5C,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EACvB,OAAO,EAAE,0BAA0B,EACnC,IAAI,CAAC,EAAE,WAAW,GACjB,OAAO,CAAC,IAAI,CAAC,CAgCf"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export const defaultFetcher = (url, init) => fetch(url, { credentials: "include", ...init });
|
|
2
|
+
export class VoyantApiError extends Error {
|
|
3
|
+
status;
|
|
4
|
+
body;
|
|
5
|
+
constructor(message, status, body) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = "VoyantApiError";
|
|
8
|
+
this.status = status;
|
|
9
|
+
this.body = body;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function extractErrorMessage(status, statusText, body) {
|
|
13
|
+
if (typeof body === "object" && body !== null && "error" in body) {
|
|
14
|
+
const err = body.error;
|
|
15
|
+
if (typeof err === "string")
|
|
16
|
+
return err;
|
|
17
|
+
if (typeof err === "object" && err !== null && "message" in err) {
|
|
18
|
+
return String(err.message);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return `Voyant API error: ${status} ${statusText}`;
|
|
22
|
+
}
|
|
23
|
+
export async function fetchWithValidation(path, schema, options, init) {
|
|
24
|
+
const url = joinUrl(options.baseUrl, path);
|
|
25
|
+
const headers = new Headers(init?.headers);
|
|
26
|
+
if (init?.body !== undefined && !headers.has("Content-Type")) {
|
|
27
|
+
headers.set("Content-Type", "application/json");
|
|
28
|
+
}
|
|
29
|
+
const response = await options.fetcher(url, { ...init, headers });
|
|
30
|
+
if (!response.ok) {
|
|
31
|
+
const body = await safeJson(response);
|
|
32
|
+
throw new VoyantApiError(extractErrorMessage(response.status, response.statusText, body), response.status, body);
|
|
33
|
+
}
|
|
34
|
+
if (response.status === 204) {
|
|
35
|
+
return schema.parse(undefined);
|
|
36
|
+
}
|
|
37
|
+
const body = await safeJson(response);
|
|
38
|
+
const parsed = schema.safeParse(body);
|
|
39
|
+
if (!parsed.success) {
|
|
40
|
+
throw new VoyantApiError(`Voyant API response failed validation: ${parsed.error.message}`, response.status, body);
|
|
41
|
+
}
|
|
42
|
+
return parsed.data;
|
|
43
|
+
}
|
|
44
|
+
async function safeJson(response) {
|
|
45
|
+
const text = await response.text();
|
|
46
|
+
if (!text)
|
|
47
|
+
return undefined;
|
|
48
|
+
try {
|
|
49
|
+
return JSON.parse(text);
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return text;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function joinUrl(baseUrl, path) {
|
|
56
|
+
const trimmedBase = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
|
|
57
|
+
const trimmedPath = path.startsWith("/") ? path : `/${path}`;
|
|
58
|
+
return `${trimmedBase}${trimmedPath}`;
|
|
59
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type LucideIcon } from "lucide-react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface BookingActivityTimelineProps {
|
|
4
|
+
bookingId: string;
|
|
5
|
+
/**
|
|
6
|
+
* Extra events to merge into the timeline alongside the built-in
|
|
7
|
+
* activity / document / payment sources. Operator starters pass
|
|
8
|
+
* action-ledger entries through here so the timeline stays a single
|
|
9
|
+
* chronological feed instead of getting split across tabs.
|
|
10
|
+
*/
|
|
11
|
+
additionalEvents?: readonly TimelineEvent[];
|
|
12
|
+
/** Rendered below the pagination — e.g. a "load more" pager for action-ledger entries. */
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
/** Page size for the client-side pager. Defaults to 10. */
|
|
15
|
+
pageSize?: number;
|
|
16
|
+
}
|
|
17
|
+
export type TimelineSource = "activity" | "document" | "payment" | "action";
|
|
18
|
+
export type TimelineEvent = {
|
|
19
|
+
id: string;
|
|
20
|
+
source: TimelineSource;
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string | null;
|
|
23
|
+
actorId?: string | null;
|
|
24
|
+
timestamp: string;
|
|
25
|
+
icon: LucideIcon;
|
|
26
|
+
link?: {
|
|
27
|
+
href: string;
|
|
28
|
+
label: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare function BookingActivityTimeline({ bookingId, additionalEvents, footer, pageSize, }: BookingActivityTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
//# sourceMappingURL=booking-activity-timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booking-activity-timeline.d.ts","sourceRoot":"","sources":["../../src/components/booking-activity-timeline.tsx"],"names":[],"mappings":"AAYA,OAAO,EAML,KAAK,UAAU,EAKhB,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,MAAM,CAAA;IACjB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;IAC3C,0FAA0F;IAC1F,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE3E,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,cAAc,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,UAAU,CAAA;IAChB,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CACvC,CAAA;AA6BD,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,gBAAgB,EAChB,MAAM,EACN,QAAa,GACd,EAAE,4BAA4B,2CAgJ9B"}
|