@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,278 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Packaged admin host for the unified `<BookingJourney />` wizard —
|
|
5
|
+
* supplies CRM-backed contact pickers, the B2B billing default, real
|
|
6
|
+
* departure/units/voucher pickers over operator inventory, and post-commit
|
|
7
|
+
* navigation to the new booking's detail page.
|
|
8
|
+
*
|
|
9
|
+
* Per booking-journey-architecture §8.1 + §10 Phase B, packaged per the
|
|
10
|
+
* packaged-admin RFC Phase 3: cross-route navigation resolves through
|
|
11
|
+
* semantic destinations (`booking.detail` on commit, `catalog.browse` on
|
|
12
|
+
* cancel), and the data client comes from the host-mounted
|
|
13
|
+
* `VoyantReactProvider` — no app route tree, no app fetcher import.
|
|
14
|
+
*/
|
|
15
|
+
import { useQuery } from "@tanstack/react-query";
|
|
16
|
+
import { useAdminNavigate, useOperatorAdminMessages } from "@voyant-travel/admin";
|
|
17
|
+
import { useAddresses } from "@voyant-travel/identity-react";
|
|
18
|
+
import { getProductMediaQueryOptions, getProductQueryOptions } from "@voyant-travel/inventory-react";
|
|
19
|
+
import { useOrganization, usePerson } from "@voyant-travel/relationships-react";
|
|
20
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
21
|
+
import { emptyPersonPickerValue, PersonPickerSection, } from "../components/person-picker-section.js";
|
|
22
|
+
import { BookingJourney, } from "../journey/index.js";
|
|
23
|
+
import { useVoyantBookingsContext } from "../provider.js";
|
|
24
|
+
import { JourneyBillingDuplicateWarning } from "./journey-billing-duplicate-warning.js";
|
|
25
|
+
import { JourneyDeparturePicker } from "./journey-departure-picker.js";
|
|
26
|
+
import { JourneyUnitsPicker } from "./journey-units-picker.js";
|
|
27
|
+
import { JourneyVoucherPicker } from "./journey-voucher-picker.js";
|
|
28
|
+
/** The catalog browse surface the journey returns to when cancelled. */
|
|
29
|
+
function journeyReturnSurface(vertical) {
|
|
30
|
+
switch (vertical) {
|
|
31
|
+
case "cruises":
|
|
32
|
+
return "cruises";
|
|
33
|
+
case "accommodations":
|
|
34
|
+
return "accommodations";
|
|
35
|
+
default:
|
|
36
|
+
return "products";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export function BookingJourneyHost({ entityModule, entityId, sourceKind, sourceConnectionId, sourceRef, departureId, departureDate, optionId, roomTypeId, ratePlanId, board, entityName, entityImageUrl, draftId, className, }) {
|
|
40
|
+
const navigate = useAdminNavigate();
|
|
41
|
+
const entitySummary = useEntitySummary(entityModule, entityId, {
|
|
42
|
+
name: entityName,
|
|
43
|
+
heroImageUrl: entityImageUrl,
|
|
44
|
+
});
|
|
45
|
+
const slots = {
|
|
46
|
+
renderLeadContactPicker({ apply, buyerType }) {
|
|
47
|
+
return _jsx(CrmLeadPicker, { apply: apply, buyerType: buyerType });
|
|
48
|
+
},
|
|
49
|
+
renderBillingExtras(ctx) {
|
|
50
|
+
// Warn if the picked lead already booked this departure.
|
|
51
|
+
return _jsx(JourneyBillingDuplicateWarning, { ...ctx });
|
|
52
|
+
},
|
|
53
|
+
renderDeparturePicker(pickerProps) {
|
|
54
|
+
// Owned: real scheduled departures from availability. Sourced products
|
|
55
|
+
// have none; when one was booked from a specific offer the date came in
|
|
56
|
+
// pre-selected, so we lock it (a different date = a different offer).
|
|
57
|
+
return _jsx(JourneyDeparturePicker, { ...pickerProps, lockDeparture: Boolean(departureDate) });
|
|
58
|
+
},
|
|
59
|
+
renderUnitsPicker(pickerProps) {
|
|
60
|
+
// Rooms/units for the picked option + departure (operator inventory).
|
|
61
|
+
return _jsx(JourneyUnitsPicker, { ...pickerProps });
|
|
62
|
+
},
|
|
63
|
+
renderVoucherPicker(pickerProps) {
|
|
64
|
+
// Admin searches + selects a voucher (no need to know the code).
|
|
65
|
+
return _jsx(JourneyVoucherPicker, { ...pickerProps });
|
|
66
|
+
},
|
|
67
|
+
renderTravelerContactPicker({ apply, selectedPersonId }) {
|
|
68
|
+
// Travelers reuse the same picker (person-only). Adapt the picker's
|
|
69
|
+
// partial lead-apply to the traveler apply (always a person), and
|
|
70
|
+
// reflect the row's linked person so "Copy from billing" selects it.
|
|
71
|
+
return (_jsx(CrmLeadPicker, { variant: "traveler", linkedPersonId: selectedPersonId, apply: (contact) => apply({
|
|
72
|
+
firstName: contact.firstName ?? "",
|
|
73
|
+
lastName: contact.lastName ?? "",
|
|
74
|
+
email: contact.email,
|
|
75
|
+
phone: contact.phone,
|
|
76
|
+
personId: contact.personId,
|
|
77
|
+
}) }));
|
|
78
|
+
},
|
|
79
|
+
onCommitted(result) {
|
|
80
|
+
// Land on the new booking's detail page.
|
|
81
|
+
navigate("booking.detail", { bookingId: result.bookingId });
|
|
82
|
+
},
|
|
83
|
+
onCancelled() {
|
|
84
|
+
navigate("catalog.browse", { surface: journeyReturnSurface(entityModule) });
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
return (_jsx(BookingJourney, { surface: "admin", entityModule: entityModule, entityId: entityId, sourceKind: sourceKind, sourceConnectionId: sourceConnectionId, sourceRef: sourceRef, draftId: draftId, initialConfigure: {
|
|
88
|
+
...(departureId ? { departureSlotId: departureId } : {}),
|
|
89
|
+
...(departureDate ? { departureDate } : {}),
|
|
90
|
+
...(optionId ? { variantId: optionId } : {}),
|
|
91
|
+
...(roomTypeId ? { roomTypeId } : {}),
|
|
92
|
+
...(ratePlanId ? { ratePlanId } : {}),
|
|
93
|
+
...(board ? { board } : {}),
|
|
94
|
+
}, defaultBuyerType: "B2B",
|
|
95
|
+
// Operator payment options: hold (reserve, collect later), online payment
|
|
96
|
+
// link (the customer pays via the hosted PSP page — we never charge a card
|
|
97
|
+
// instantly here), bank transfer, and agency credit.
|
|
98
|
+
paymentCapabilities: {
|
|
99
|
+
acceptsCard: true,
|
|
100
|
+
acceptsHold: true,
|
|
101
|
+
acceptsBankTransfer: true,
|
|
102
|
+
acceptsTicketOnCredit: true,
|
|
103
|
+
}, entitySummary: entitySummary, className: className, ...slots }));
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Builds the "what you're booking" preview shown atop the journey side
|
|
107
|
+
* panel — the product's name + first image, for an instant preview before
|
|
108
|
+
* the quote returns. Owned products in the `products` table resolve via the
|
|
109
|
+
* client fetch; a sourced/connect id isn't in that table, so it falls back to
|
|
110
|
+
* the `hints` (name + hero image) carried from the catalog detail page. We
|
|
111
|
+
* can't (and needn't) tell owned from sourced on the client — the URL no
|
|
112
|
+
* longer carries `sourceKind` — so we try the products fetch for the
|
|
113
|
+
* `products` vertical and let the hints cover everything else.
|
|
114
|
+
*/
|
|
115
|
+
function useEntitySummary(entityModule, entityId, hints) {
|
|
116
|
+
const tryProductSummary = entityModule === "products" && Boolean(entityId);
|
|
117
|
+
const client = useVoyantBookingsContext();
|
|
118
|
+
const productQuery = useQuery({
|
|
119
|
+
...getProductQueryOptions(client, entityId),
|
|
120
|
+
enabled: tryProductSummary,
|
|
121
|
+
retry: false,
|
|
122
|
+
});
|
|
123
|
+
const mediaQuery = useQuery({
|
|
124
|
+
...getProductMediaQueryOptions(client, entityId, { mediaType: "image" }),
|
|
125
|
+
enabled: tryProductSummary,
|
|
126
|
+
retry: false,
|
|
127
|
+
});
|
|
128
|
+
return useMemo(() => {
|
|
129
|
+
const product = productQuery.data;
|
|
130
|
+
if (product) {
|
|
131
|
+
// First product-level (not day-scoped) image, if any.
|
|
132
|
+
const heroImageUrl = (mediaQuery.data?.data ?? [])
|
|
133
|
+
.filter((media) => media.mediaType === "image" && media.dayId == null)
|
|
134
|
+
.map((media) => media.url)
|
|
135
|
+
.find(Boolean);
|
|
136
|
+
return {
|
|
137
|
+
name: product.name,
|
|
138
|
+
vertical: "products",
|
|
139
|
+
...(heroImageUrl ? { heroImageUrl } : {}),
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
// Sourced/connect entity (not in the owned table) — use the preview hints.
|
|
143
|
+
if (hints.name) {
|
|
144
|
+
return {
|
|
145
|
+
name: hints.name,
|
|
146
|
+
vertical: entityModule,
|
|
147
|
+
...(hints.heroImageUrl ? { heroImageUrl: hints.heroImageUrl } : {}),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
return undefined;
|
|
151
|
+
}, [productQuery.data, mediaQuery.data, hints.name, hints.heroImageUrl, entityModule]);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* CRM-backed picker for the journey's contact slots. Buyer type drives the
|
|
155
|
+
* mode (there's no bill-to toggle): for the LEAD slot it searches PEOPLE on
|
|
156
|
+
* B2C and ORGANIZATIONS on B2B — picking either hydrates the journey from the
|
|
157
|
+
* CRM record (person → name/email/phone; org → company name/tax id). The
|
|
158
|
+
* per-traveler slot is always a person picker.
|
|
159
|
+
*/
|
|
160
|
+
function CrmLeadPicker({ apply, buyerType, variant = "lead", linkedPersonId, }) {
|
|
161
|
+
const t = useOperatorAdminMessages().bookings.detail.bookingJourney;
|
|
162
|
+
// The lead picker bills an organization on B2B; everything else is a person.
|
|
163
|
+
const orgMode = variant === "lead" && buyerType === "B2B";
|
|
164
|
+
const [value, setValue] = useState(emptyPersonPickerValue);
|
|
165
|
+
// Reflect an externally-set person (copy-from-billing, or a re-opened
|
|
166
|
+
// draft) in the combobox. The hydrate effect below then fills the names;
|
|
167
|
+
// the `appliedPersonId` ref keeps that idempotent.
|
|
168
|
+
useEffect(() => {
|
|
169
|
+
if (!linkedPersonId)
|
|
170
|
+
return;
|
|
171
|
+
setValue((cur) => cur.personId === linkedPersonId
|
|
172
|
+
? cur
|
|
173
|
+
: { ...cur, mode: "existing", personId: linkedPersonId });
|
|
174
|
+
}, [linkedPersonId]);
|
|
175
|
+
// Keep the picker's target aligned with the Buyer type radio.
|
|
176
|
+
useEffect(() => {
|
|
177
|
+
setValue((current) => {
|
|
178
|
+
const desired = orgMode ? "organization" : "person";
|
|
179
|
+
return (current.billTo ?? "person") === desired ? current : { ...current, billTo: desired };
|
|
180
|
+
});
|
|
181
|
+
}, [orgMode]);
|
|
182
|
+
// Hydrate from the picked CRM person (B2C). The picker yields just an id;
|
|
183
|
+
// we fetch the record and apply the real name/email/phone.
|
|
184
|
+
const selectedPersonId = !orgMode && value.mode === "existing" && value.personId ? value.personId : undefined;
|
|
185
|
+
const personQuery = usePerson(selectedPersonId, { enabled: Boolean(selectedPersonId) });
|
|
186
|
+
const appliedPersonId = useRef(null);
|
|
187
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: applies once per resolved record; the ref guards re-entry from apply()->setDraft re-renders -- owner: bookings-react; existing suppression is intentional pending typed cleanup.
|
|
188
|
+
useEffect(() => {
|
|
189
|
+
const person = personQuery.data;
|
|
190
|
+
if (!person || appliedPersonId.current === person.id)
|
|
191
|
+
return;
|
|
192
|
+
appliedPersonId.current = person.id;
|
|
193
|
+
apply({
|
|
194
|
+
firstName: person.firstName,
|
|
195
|
+
lastName: person.lastName,
|
|
196
|
+
email: person.email ?? undefined,
|
|
197
|
+
phone: person.phone ?? undefined,
|
|
198
|
+
personId: person.id,
|
|
199
|
+
});
|
|
200
|
+
}, [personQuery.data]);
|
|
201
|
+
// Hydrate the company fields from the picked CRM organization (B2B).
|
|
202
|
+
const selectedOrgId = orgMode && value.organizationId ? value.organizationId : undefined;
|
|
203
|
+
const orgQuery = useOrganization(selectedOrgId, { enabled: Boolean(selectedOrgId) });
|
|
204
|
+
const appliedOrgId = useRef(null);
|
|
205
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: applies once per resolved record; the ref guards re-entry -- owner: bookings-react; existing suppression is intentional pending typed cleanup.
|
|
206
|
+
useEffect(() => {
|
|
207
|
+
const org = orgQuery.data;
|
|
208
|
+
if (!org || appliedOrgId.current === org.id)
|
|
209
|
+
return;
|
|
210
|
+
appliedOrgId.current = org.id;
|
|
211
|
+
apply({
|
|
212
|
+
organizationId: org.id,
|
|
213
|
+
companyName: org.legalName ?? org.name,
|
|
214
|
+
taxId: org.taxId ?? undefined,
|
|
215
|
+
});
|
|
216
|
+
}, [orgQuery.data]);
|
|
217
|
+
// Hydrate the billing address from the picked person (B2C) or org (B2B)
|
|
218
|
+
// primary CRM address — so the operator never re-types it and the tax
|
|
219
|
+
// country is set. Missing → surfaced as a warning to fix in the picker.
|
|
220
|
+
const addressEntityType = orgMode ? "organization" : "person";
|
|
221
|
+
// Only the billing lead pulls an address; travelers don't carry one.
|
|
222
|
+
const addressEntityId = variant === "lead" ? (orgMode ? selectedOrgId : selectedPersonId) : undefined;
|
|
223
|
+
const addressQuery = useAddresses({
|
|
224
|
+
entityType: addressEntityType,
|
|
225
|
+
entityId: addressEntityId,
|
|
226
|
+
isPrimary: true,
|
|
227
|
+
limit: 1,
|
|
228
|
+
enabled: Boolean(addressEntityId),
|
|
229
|
+
});
|
|
230
|
+
const appliedAddressKey = useRef(null);
|
|
231
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: applies once per resolved address; the ref guards re-entry -- owner: bookings-react; existing suppression is intentional pending typed cleanup.
|
|
232
|
+
useEffect(() => {
|
|
233
|
+
const addr = addressQuery.data?.data?.[0];
|
|
234
|
+
if (!addressEntityId || !addr)
|
|
235
|
+
return;
|
|
236
|
+
const key = `${addressEntityType}:${addressEntityId}`;
|
|
237
|
+
if (appliedAddressKey.current === key)
|
|
238
|
+
return;
|
|
239
|
+
appliedAddressKey.current = key;
|
|
240
|
+
apply({
|
|
241
|
+
address: {
|
|
242
|
+
line1: addr.line1 ?? undefined,
|
|
243
|
+
line2: addr.line2 ?? undefined,
|
|
244
|
+
city: addr.city ?? undefined,
|
|
245
|
+
postal: addr.postalCode ?? undefined,
|
|
246
|
+
country: addr.country ?? undefined,
|
|
247
|
+
},
|
|
248
|
+
});
|
|
249
|
+
}, [addressQuery.data, addressEntityId]);
|
|
250
|
+
function commit(next) {
|
|
251
|
+
setValue(next);
|
|
252
|
+
if ((next.billTo ?? "person") === "organization") {
|
|
253
|
+
if (next.organizationId !== appliedOrgId.current)
|
|
254
|
+
appliedOrgId.current = null;
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
if (next.mode === "existing" && next.personId) {
|
|
258
|
+
if (next.personId !== appliedPersonId.current)
|
|
259
|
+
appliedPersonId.current = null;
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
appliedPersonId.current = null;
|
|
263
|
+
if (next.mode === "new") {
|
|
264
|
+
apply({
|
|
265
|
+
firstName: next.newPerson.firstName,
|
|
266
|
+
lastName: next.newPerson.lastName,
|
|
267
|
+
email: next.newPerson.email || undefined,
|
|
268
|
+
phone: next.newPerson.phone || undefined,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return (_jsx(PersonPickerSection, { value: value, onChange: commit,
|
|
273
|
+
// Org is an allowed target for the lead (so its CRM org search runs),
|
|
274
|
+
// but the toggle is hidden — Buyer type is the single control.
|
|
275
|
+
showOrganization: variant === "lead", hideTargetToggle: true, labels: {
|
|
276
|
+
person: variant === "traveler" ? t.travelerPickerLabel : t.leadContactPickerLabel,
|
|
277
|
+
} }));
|
|
278
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { BookingListFiltersState } from "../components/booking-list.js";
|
|
3
|
+
export interface BookingsHostProps {
|
|
4
|
+
/** Filter / sort / paging state parsed from the URL by the route file. */
|
|
5
|
+
initialFilters?: Partial<BookingListFiltersState>;
|
|
6
|
+
/** Fires on any filter change; the route file projects it back into the URL. */
|
|
7
|
+
onFiltersChange?: (filters: BookingListFiltersState) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Extra action(s) rendered alongside the primary "New booking" button.
|
|
10
|
+
* App-owned adjacent flows (e.g. the operator's "Compose trip" link)
|
|
11
|
+
* land here so the packaged page doesn't hardcode other domains.
|
|
12
|
+
*/
|
|
13
|
+
headerActions?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Packaged admin host for `BookingsPage` (packaged-admin RFC Phase 3).
|
|
17
|
+
*
|
|
18
|
+
* Proof-of-contract for semantic destinations (RFC §4.7): no host route
|
|
19
|
+
* tree is imported — opening a booking resolves `"booking.detail"` and the
|
|
20
|
+
* "New booking" button resolves `"booking.create"` through the resolvers
|
|
21
|
+
* the workspace shell registered. The route file stays the thin binding
|
|
22
|
+
* layer for search-state (via {@link bookingsIndexSearchSchema} and the
|
|
23
|
+
* `bookingsSearchToFilters`/`bookingsFiltersToSearch` helpers).
|
|
24
|
+
*/
|
|
25
|
+
export declare function BookingsHost({ initialFilters, onFiltersChange, headerActions, }: BookingsHostProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=bookings-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-host.d.ts","sourceRoot":"","sources":["../../src/admin/bookings-host.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAG5E,MAAM,WAAW,iBAAiB;IAChC,0EAA0E;IAC1E,cAAc,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAA;IACjD,gFAAgF;IAChF,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,IAAI,CAAA;IAC5D;;;;OAIG;IACH,aAAa,CAAC,EAAE,SAAS,CAAA;CAC1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAC3B,cAAc,EACd,eAAe,EACf,aAAa,GACd,EAAE,iBAAiB,2CAYnB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useAdminNavigate } from "@voyant-travel/admin";
|
|
4
|
+
import { BookingsPage } from "../components/bookings-page.js";
|
|
5
|
+
/**
|
|
6
|
+
* Packaged admin host for `BookingsPage` (packaged-admin RFC Phase 3).
|
|
7
|
+
*
|
|
8
|
+
* Proof-of-contract for semantic destinations (RFC §4.7): no host route
|
|
9
|
+
* tree is imported — opening a booking resolves `"booking.detail"` and the
|
|
10
|
+
* "New booking" button resolves `"booking.create"` through the resolvers
|
|
11
|
+
* the workspace shell registered. The route file stays the thin binding
|
|
12
|
+
* layer for search-state (via {@link bookingsIndexSearchSchema} and the
|
|
13
|
+
* `bookingsSearchToFilters`/`bookingsFiltersToSearch` helpers).
|
|
14
|
+
*/
|
|
15
|
+
export function BookingsHost({ initialFilters, onFiltersChange, headerActions, }) {
|
|
16
|
+
const navigateTo = useAdminNavigate();
|
|
17
|
+
return (_jsx(BookingsPage, { onCreateBooking: () => navigateTo("booking.create", {}), onBookingOpen: (booking) => navigateTo("booking.detail", { bookingId: booking.id }), headerActions: headerActions, initialFilters: initialFilters, onFiltersChange: onFiltersChange }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Route-level placeholder for the bookings list. Mirrors `BookingsPage` +
|
|
3
|
+
* `BookingList`:
|
|
4
|
+
* - Page title + description
|
|
5
|
+
* - Search input (left) + "New booking" button (right)
|
|
6
|
+
* - 5-column table: Booking # / Status / Sell Amount / Pax / Start Date
|
|
7
|
+
* - Pagination bar
|
|
8
|
+
*/
|
|
9
|
+
export declare function BookingsListSkeleton(): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=bookings-list-skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookings-list-skeleton.d.ts","sourceRoot":"","sources":["../../src/admin/bookings-list-skeleton.tsx"],"names":[],"mappings":"AAaA;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,4CA2CnC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useOperatorAdminMessages } from "@voyant-travel/admin";
|
|
4
|
+
import { Skeleton } from "@voyant-travel/ui/components/skeleton";
|
|
5
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@voyant-travel/ui/components/table";
|
|
6
|
+
/**
|
|
7
|
+
* Route-level placeholder for the bookings list. Mirrors `BookingsPage` +
|
|
8
|
+
* `BookingList`:
|
|
9
|
+
* - Page title + description
|
|
10
|
+
* - Search input (left) + "New booking" button (right)
|
|
11
|
+
* - 5-column table: Booking # / Status / Sell Amount / Pax / Start Date
|
|
12
|
+
* - Pagination bar
|
|
13
|
+
*/
|
|
14
|
+
export function BookingsListSkeleton() {
|
|
15
|
+
const bookingMessages = useOperatorAdminMessages().bookings.list;
|
|
16
|
+
return (_jsxs("div", { className: "flex flex-col gap-6 p-6", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Skeleton, { className: "h-7 w-28" }), _jsx(Skeleton, { className: "h-4 w-80" })] }), _jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [_jsx(Skeleton, { className: "h-9 w-full max-w-sm" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Skeleton, { className: "h-9 w-32" }), _jsx(Skeleton, { className: "h-9 w-36" })] })] }), _jsx("div", { className: "rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: bookingMessages.tableBookingNumber }), _jsx(TableHead, { children: bookingMessages.tableStatus }), _jsx(TableHead, { children: bookingMessages.tableSellAmount }), _jsx(TableHead, { children: bookingMessages.tablePax }), _jsx(TableHead, { children: bookingMessages.tableStartDate })] }) }), _jsx(SkeletonRows, { rows: 8, widths: ["w-28", "w-20", "w-24", "w-6", "w-24"] })] }) }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Skeleton, { className: "h-4 w-40" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Skeleton, { className: "h-8 w-20" }), _jsx(Skeleton, { className: "h-4 w-20" }), _jsx(Skeleton, { className: "h-8 w-16" })] })] })] }));
|
|
17
|
+
}
|
|
18
|
+
/** Placeholder `<TableBody>` with one skeleton line per cell. */
|
|
19
|
+
function SkeletonRows({ rows, widths }) {
|
|
20
|
+
return (_jsx(TableBody, { children: Array.from({ length: rows }).map((_, r) => (_jsx(TableRow
|
|
21
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: stable placeholders -- owner: bookings-react; existing suppression is intentional pending typed cleanup.
|
|
22
|
+
, { children: widths.map((width, c) => (_jsx(TableCell
|
|
23
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: stable placeholders -- owner: bookings-react; existing suppression is intentional pending typed cleanup.
|
|
24
|
+
, { children: _jsx(Skeleton, { className: `h-4 ${width}` }) }, c))) }, r))) }));
|
|
25
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { type AdminExtension } from "@voyant-travel/admin";
|
|
2
|
+
import type { ComponentType, ReactNode } from "react";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import type { BookingDetailTabValue } from "../components/booking-detail-page.js";
|
|
5
|
+
import type { BookingListFiltersState } from "../components/booking-list.js";
|
|
6
|
+
/**
|
|
7
|
+
* Semantic destinations the bookings admin surfaces navigate to
|
|
8
|
+
* (packaged-admin RFC §4.7). The booking pages link into routes they do not
|
|
9
|
+
* own — the CRM person/organization pages, the product editor, the finance
|
|
10
|
+
* payment/invoice pages — so instead of importing a host route tree they
|
|
11
|
+
* resolve these keys through `useAdminHref`/`useAdminNavigate` from
|
|
12
|
+
* `@voyant-travel/admin`. Hosts register one resolver per key
|
|
13
|
+
* (`satisfies AdminDestinationResolvers`).
|
|
14
|
+
*
|
|
15
|
+
* `booking.detail`/`booking.list`/`booking.create` are declared here even
|
|
16
|
+
* though bookings pages are their first consumers: other domains' packaged
|
|
17
|
+
* pages navigate TO bookings through the same keys.
|
|
18
|
+
*/
|
|
19
|
+
declare module "@voyant-travel/admin" {
|
|
20
|
+
interface AdminDestinations {
|
|
21
|
+
/** The bookings list page. */
|
|
22
|
+
"booking.list": Record<string, never>;
|
|
23
|
+
/** A booking's detail page; `tab` deep-links a specific tab. */
|
|
24
|
+
"booking.detail": {
|
|
25
|
+
bookingId: string;
|
|
26
|
+
tab?: BookingDetailTabValue;
|
|
27
|
+
};
|
|
28
|
+
/** The "New booking" entry point (product picker → unified journey). */
|
|
29
|
+
"booking.create": Record<string, never>;
|
|
30
|
+
/** A CRM person's detail page. */
|
|
31
|
+
"person.detail": {
|
|
32
|
+
personId: string;
|
|
33
|
+
};
|
|
34
|
+
/** A CRM organization's detail page. */
|
|
35
|
+
"organization.detail": {
|
|
36
|
+
organizationId: string;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The owned-product editor/detail page. Also declared by
|
|
40
|
+
* `@voyant-travel/catalog-react/admin` — interface merging requires the member
|
|
41
|
+
* shape to stay identical across packages.
|
|
42
|
+
*/
|
|
43
|
+
"product.detail": {
|
|
44
|
+
productId: string;
|
|
45
|
+
};
|
|
46
|
+
/** An availability slot's detail page. */
|
|
47
|
+
"availabilitySlot.detail": {
|
|
48
|
+
slotId: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The trips's "new trip" entry. Declared here because the
|
|
52
|
+
* packaged `/bookings/compose` alias route forwards to it — the composer
|
|
53
|
+
* pages themselves live in the trips area, whose admin entry
|
|
54
|
+
* may also declare this key (interface merging requires the member shape
|
|
55
|
+
* to stay identical across packages).
|
|
56
|
+
*/
|
|
57
|
+
"trip.create": Record<string, never>;
|
|
58
|
+
/** A payment's detail page in the finance area. */
|
|
59
|
+
"payment.detail": {
|
|
60
|
+
paymentId: string;
|
|
61
|
+
};
|
|
62
|
+
/** An invoice's full detail page in the finance area. */
|
|
63
|
+
"invoice.detail": {
|
|
64
|
+
invoiceId: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* A legal contract's detail page. Also declared by
|
|
68
|
+
* `@voyant-travel/legal-react/admin` — interface merging requires the member
|
|
69
|
+
* shape to stay identical across packages. Declared here because the
|
|
70
|
+
* booking Documents tab links contract rows to their detail page.
|
|
71
|
+
*/
|
|
72
|
+
"contract.detail": {
|
|
73
|
+
contractId: string;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
export type { BookingContractDialogProps } from "./booking-contract-dialog.js";
|
|
78
|
+
export type { BookingDetailHostProps, BookingDetailHostSlot, BookingDetailHostSlotContext, BookingDetailHostSlots, } from "./booking-detail-host.js";
|
|
79
|
+
export { BookingDetailSkeleton } from "./booking-detail-skeleton.js";
|
|
80
|
+
export type { BookingDocumentsTableProps } from "./booking-documents-table.js";
|
|
81
|
+
export type { BookingInvoiceSheetProps } from "./booking-invoice-sheet.js";
|
|
82
|
+
export type { BookingJourneyHostProps } from "./booking-journey-host.js";
|
|
83
|
+
export type { BookingsHostProps } from "./bookings-host.js";
|
|
84
|
+
export { BookingsListSkeleton } from "./bookings-list-skeleton.js";
|
|
85
|
+
export type { PersonBookingsWidgetProps } from "./person-bookings-widget.js";
|
|
86
|
+
export { bookingDetailFinanceEndSlot, bookingDetailFinanceStartSlot, bookingDetailInvoicesTabSlot, } from "./slots.js";
|
|
87
|
+
/**
|
|
88
|
+
* Search contract for the bookings list page: the URL projection of
|
|
89
|
+
* `BookingListFiltersState` (filters, sort, paging). Package-owned so the
|
|
90
|
+
* route file, the host, and the extension contribution validate the same
|
|
91
|
+
* shape. Defaults are absent from the URL — see
|
|
92
|
+
* {@link bookingsFiltersToSearch}.
|
|
93
|
+
*/
|
|
94
|
+
export declare const bookingsIndexSearchSchema: z.ZodObject<{
|
|
95
|
+
search: z.ZodOptional<z.ZodString>;
|
|
96
|
+
status: z.ZodOptional<z.ZodString>;
|
|
97
|
+
productId: z.ZodOptional<z.ZodString>;
|
|
98
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
99
|
+
supplierId: z.ZodOptional<z.ZodString>;
|
|
100
|
+
productCategoryId: z.ZodOptional<z.ZodString>;
|
|
101
|
+
personId: z.ZodOptional<z.ZodString>;
|
|
102
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
103
|
+
availabilitySlotId: z.ZodOptional<z.ZodString>;
|
|
104
|
+
dateFrom: z.ZodOptional<z.ZodString>;
|
|
105
|
+
dateTo: z.ZodOptional<z.ZodString>;
|
|
106
|
+
paxMin: z.ZodOptional<z.ZodString>;
|
|
107
|
+
paxMax: z.ZodOptional<z.ZodString>;
|
|
108
|
+
sortBy: z.ZodOptional<z.ZodEnum<{
|
|
109
|
+
status: "status";
|
|
110
|
+
startDate: "startDate";
|
|
111
|
+
endDate: "endDate";
|
|
112
|
+
pax: "pax";
|
|
113
|
+
bookingNumber: "bookingNumber";
|
|
114
|
+
sellAmount: "sellAmount";
|
|
115
|
+
createdAt: "createdAt";
|
|
116
|
+
}>>;
|
|
117
|
+
sortDir: z.ZodOptional<z.ZodEnum<{
|
|
118
|
+
asc: "asc";
|
|
119
|
+
desc: "desc";
|
|
120
|
+
}>>;
|
|
121
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
export type BookingsIndexSearchParams = z.infer<typeof bookingsIndexSearchSchema>;
|
|
124
|
+
/** URL search params → `BookingList` initial state. Empty / `"all"` /
|
|
125
|
+
* default values are absent in the URL; we let `BookingList`'s defaults
|
|
126
|
+
* fill them in. */
|
|
127
|
+
export declare function bookingsSearchToFilters(search: BookingsIndexSearchParams): Partial<BookingListFiltersState>;
|
|
128
|
+
/** Project the filter snapshot back into URL search params, dropping
|
|
129
|
+
* any value that matches the component's default so the URL stays
|
|
130
|
+
* clean when the operator is viewing the unfiltered list. */
|
|
131
|
+
export declare function bookingsFiltersToSearch(filters: BookingListFiltersState): BookingsIndexSearchParams;
|
|
132
|
+
/** Tab values of the canonical `BookingDetailPage`, as a search-param schema. */
|
|
133
|
+
export declare const bookingDetailTabSchema: z.ZodEnum<{
|
|
134
|
+
metadata: "metadata";
|
|
135
|
+
items: "items";
|
|
136
|
+
travelers: "travelers";
|
|
137
|
+
suppliers: "suppliers";
|
|
138
|
+
invoices: "invoices";
|
|
139
|
+
documents: "documents";
|
|
140
|
+
activity: "activity";
|
|
141
|
+
finance: "finance";
|
|
142
|
+
}>;
|
|
143
|
+
/**
|
|
144
|
+
* Search contract for the booking detail page. `productId`/`slotId` only
|
|
145
|
+
* matter for the `"new"` pseudo-id: a deep link with a product pre-chosen
|
|
146
|
+
* redirects into the unified booking journey (host route concern).
|
|
147
|
+
*/
|
|
148
|
+
export declare const bookingDetailSearchSchema: z.ZodObject<{
|
|
149
|
+
productId: z.ZodOptional<z.ZodString>;
|
|
150
|
+
slotId: z.ZodOptional<z.ZodString>;
|
|
151
|
+
tab: z.ZodOptional<z.ZodEnum<{
|
|
152
|
+
metadata: "metadata";
|
|
153
|
+
items: "items";
|
|
154
|
+
travelers: "travelers";
|
|
155
|
+
suppliers: "suppliers";
|
|
156
|
+
invoices: "invoices";
|
|
157
|
+
documents: "documents";
|
|
158
|
+
activity: "activity";
|
|
159
|
+
finance: "finance";
|
|
160
|
+
}>>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
export type BookingDetailSearchParams = z.infer<typeof bookingDetailSearchSchema>;
|
|
163
|
+
/**
|
|
164
|
+
* Search contract for the packaged "New booking" entry page. A deep link
|
|
165
|
+
* with `productId` pre-chosen (e.g. launched from a product page) forwards
|
|
166
|
+
* straight into the unified booking journey; `slotId` pins the departure.
|
|
167
|
+
*/
|
|
168
|
+
export declare const bookingNewSearchSchema: z.ZodObject<{
|
|
169
|
+
productId: z.ZodOptional<z.ZodString>;
|
|
170
|
+
slotId: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
export type BookingNewSearchParams = z.infer<typeof bookingNewSearchSchema>;
|
|
173
|
+
/**
|
|
174
|
+
* Search contract for the unified booking journey page — the URL projection
|
|
175
|
+
* of the journey's entry state (provenance, pre-pinned departure/option/
|
|
176
|
+
* rate, side-panel preview hints). Key PRESENCE is meaningful: callers pass
|
|
177
|
+
* only the fields their selection actually carries.
|
|
178
|
+
*/
|
|
179
|
+
export declare const bookingJourneySearchSchema: z.ZodObject<{
|
|
180
|
+
sourceKind: z.ZodString;
|
|
181
|
+
sourceConnectionId: z.ZodOptional<z.ZodString>;
|
|
182
|
+
sourceRef: z.ZodOptional<z.ZodString>;
|
|
183
|
+
departureId: z.ZodOptional<z.ZodString>;
|
|
184
|
+
departureDate: z.ZodOptional<z.ZodString>;
|
|
185
|
+
optionId: z.ZodOptional<z.ZodString>;
|
|
186
|
+
roomTypeId: z.ZodOptional<z.ZodString>;
|
|
187
|
+
ratePlanId: z.ZodOptional<z.ZodString>;
|
|
188
|
+
board: z.ZodOptional<z.ZodString>;
|
|
189
|
+
entityName: z.ZodOptional<z.ZodString>;
|
|
190
|
+
entityImageUrl: z.ZodOptional<z.ZodString>;
|
|
191
|
+
draftId: z.ZodOptional<z.ZodString>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
export type BookingJourneySearchParams = z.infer<typeof bookingJourneySearchSchema>;
|
|
194
|
+
/**
|
|
195
|
+
* Props contract of the booking detail PAGE component the "bookings-detail"
|
|
196
|
+
* contribution mounts — the route-state subset of `BookingDetailHostProps`.
|
|
197
|
+
* The packaged default wraps {@link BookingDetailHost} with exactly these;
|
|
198
|
+
* hosts substitute their own implementation via
|
|
199
|
+
* {@link CreateBookingsAdminExtensionOptions.detailPageComponent} when they
|
|
200
|
+
* need to compose app-owned flows around the host (e.g. payment dialogs).
|
|
201
|
+
*/
|
|
202
|
+
export interface BookingDetailPageComponentProps {
|
|
203
|
+
id: string;
|
|
204
|
+
activeTab?: BookingDetailTabValue;
|
|
205
|
+
onTabChange?: (tab: BookingDetailTabValue) => void;
|
|
206
|
+
}
|
|
207
|
+
export interface CreateBookingsAdminExtensionOptions {
|
|
208
|
+
/** Mount path of the bookings pages inside the admin workspace. Default `/bookings`. */
|
|
209
|
+
basePath?: string;
|
|
210
|
+
/** Localized page titles. Defaults are the English operator nav labels. */
|
|
211
|
+
labels?: {
|
|
212
|
+
bookings?: string;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* App-owned extra header action(s) rendered alongside the bookings list's
|
|
216
|
+
* primary "New booking" button (e.g. the operator's "Compose trip" link).
|
|
217
|
+
* Forwarded to {@link BookingsHost}'s `headerActions` by the index page so
|
|
218
|
+
* the packaged page doesn't hardcode other domains.
|
|
219
|
+
*/
|
|
220
|
+
indexHeaderActions?: ReactNode;
|
|
221
|
+
/**
|
|
222
|
+
* Substitute implementation for the booking detail page, loaded lazily so
|
|
223
|
+
* it stays in its own chunk. Defaults to the packaged page wrapping
|
|
224
|
+
* {@link BookingDetailHost}. The operator overrides this to compose the
|
|
225
|
+
* app-owned payment/payment-link dialogs around the host — those dialogs
|
|
226
|
+
* live app-side because `@voyant-travel/finance-react/ui` and
|
|
227
|
+
* `@voyant-travel/finance-react/checkout-ui` depend on this package, so importing them
|
|
228
|
+
* here would be a cycle.
|
|
229
|
+
*/
|
|
230
|
+
detailPageComponent?: () => Promise<{
|
|
231
|
+
default: ComponentType<BookingDetailPageComponentProps>;
|
|
232
|
+
}>;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* The bookings admin contribution (packaged-admin RFC Phase 3,
|
|
236
|
+
* `@voyant-travel/<domain>-ui/admin` convention).
|
|
237
|
+
*
|
|
238
|
+
* NAVIGATION: deliberately none. The Bookings nav item is part of the BASE
|
|
239
|
+
* operator navigation — see `createOperatorAdminNavigation` in
|
|
240
|
+
* `@voyant-travel/admin` — so contributing nav entries here would duplicate it.
|
|
241
|
+
* If the base nav ever drops the bookings item, this extension is where the
|
|
242
|
+
* entry moves.
|
|
243
|
+
*
|
|
244
|
+
* ROUTES: full implementations (packaged-admin RFC §4.8) — the package-owned
|
|
245
|
+
* search contracts ({@link bookingsIndexSearchSchema} for the list,
|
|
246
|
+
* {@link bookingDetailSearchSchema} for the detail page), loaders that
|
|
247
|
+
* prefetch through the host-supplied runtime, and lazy `page` modules. The
|
|
248
|
+
* PAGES are package-owned too: {@link BookingsHost} and
|
|
249
|
+
* {@link BookingDetailHost} bind the canonical bookings pages to their data
|
|
250
|
+
* wiring (bookings/finance provider context) and resolve every cross-route
|
|
251
|
+
* link through the semantic destinations declared above — no app RPC client,
|
|
252
|
+
* no host route tree.
|
|
253
|
+
*
|
|
254
|
+
* `component:` stays unattached; each contribution carries a lazy `page`
|
|
255
|
+
* loader instead. The host binder wraps it in the router's lazy-component
|
|
256
|
+
* machinery (so the page lands in its own chunk) and hands the resolved
|
|
257
|
+
* component its route state as `AdminRoutePageProps` — which is how the
|
|
258
|
+
* param/search-taking bookings pages mount without a host route file. The
|
|
259
|
+
* `page` thunks below dynamically import the SPECIFIC page modules, never
|
|
260
|
+
* this barrel, so the factory itself never pins page code into the
|
|
261
|
+
* workspace-chrome chunk.
|
|
262
|
+
*
|
|
263
|
+
* WIDGETS: the crm-ui ↔ bookings-ui cycle resolution (RFC §4.7). The CRM
|
|
264
|
+
* person detail page mounts a Bookings tab, but this package depends on
|
|
265
|
+
* `@voyant-travel/relationships-react/ui`, so crm-ui's host cannot import the bookings-owned
|
|
266
|
+
* card. Instead this extension contributes {@link PersonBookingsWidget} on
|
|
267
|
+
* the `person.details.bookings-tab` slot crm-ui's `PersonDetailHost`
|
|
268
|
+
* exposes; the host mounts its Bookings tab whenever a contribution targets
|
|
269
|
+
* that slot and hands the widget its typed slot context
|
|
270
|
+
* (`PersonDetailBookingsTabContext`) as props.
|
|
271
|
+
*/
|
|
272
|
+
export declare function createBookingsAdminExtension(options?: CreateBookingsAdminExtensionOptions): AdminExtension;
|
|
273
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/admin/index.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EAMpB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AACjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAM5E;;;;;;;;;;;;GAYG;AACH,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,iBAAiB;QACzB,8BAA8B;QAC9B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACrC,gEAAgE;QAChE,gBAAgB,EAAE;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,GAAG,CAAC,EAAE,qBAAqB,CAAA;SAAE,CAAA;QACpE,wEAAwE;QACxE,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACvC,kCAAkC;QAClC,eAAe,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAA;QACrC,wCAAwC;QACxC,qBAAqB,EAAE;YAAE,cAAc,EAAE,MAAM,CAAA;SAAE,CAAA;QACjD;;;;WAIG;QACH,gBAAgB,EAAE;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;QACvC,0CAA0C;QAC1C,yBAAyB,EAAE;YAAE,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;QAC7C;;;;;;WAMG;QACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACpC,mDAAmD;QACnD,gBAAgB,EAAE;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;QACvC,yDAAyD;QACzD,gBAAgB,EAAE;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;QACvC;;;;;WAKG;QACH,iBAAiB,EAAE;YAAE,UAAU,EAAE,MAAM,CAAA;SAAE,CAAA;KAC1C;CACF;AAYD,YAAY,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAC9E,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACpE,YAAY,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAC9E,YAAY,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAC1E,YAAY,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACxE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,YAAY,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,YAAY,CAAA;AAanB;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBpC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF;;mBAEmB;AACnB,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAmBlC;AAED;;6DAE6D;AAC7D,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,uBAAuB,GAC/B,yBAAyB,CAmB3B;AAED,iFAAiF;AACjF,eAAO,MAAM,sBAAsB;;;;;;;;;EASU,CAAA;AAE7C;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;iBAIpC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEjF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;iBAGjC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE3E;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;iBAerC,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AAEnF;;;;;;;GAOG;AACH,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,CAAC,EAAE,qBAAqB,CAAA;IACjC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,qBAAqB,KAAK,IAAI,CAAA;CACnD;AAED,MAAM,WAAW,mCAAmC;IAClD,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;IACD;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAA;IAC9B;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC;QAClC,OAAO,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAA;KACxD,CAAC,CAAA;CACH;AAqCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE,mCAAwC,GAChD,cAAc,CAuIhB"}
|