@voyant-travel/operations-react 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +11 -0
- package/dist/admin.d.ts +59 -0
- package/dist/admin.d.ts.map +1 -0
- package/dist/admin.js +165 -0
- package/dist/availability/admin/availability-index-host.d.ts +12 -0
- package/dist/availability/admin/availability-index-host.d.ts.map +1 -0
- package/dist/availability/admin/availability-index-host.js +125 -0
- package/dist/availability/admin/availability-page-data.d.ts +9 -0
- package/dist/availability/admin/availability-page-data.d.ts.map +1 -0
- package/dist/availability/admin/availability-page-data.js +25 -0
- package/dist/availability/admin/index.d.ts +70 -0
- package/dist/availability/admin/index.d.ts.map +1 -0
- package/dist/availability/admin/index.js +140 -0
- package/dist/availability/admin/option-resource-template-seat-map.d.ts +10 -0
- package/dist/availability/admin/option-resource-template-seat-map.d.ts.map +1 -0
- package/dist/availability/admin/option-resource-template-seat-map.js +36 -0
- package/dist/availability/admin/option-resource-templates-panel.d.ts +22 -0
- package/dist/availability/admin/option-resource-templates-panel.d.ts.map +1 -0
- package/dist/availability/admin/option-resource-templates-panel.js +221 -0
- package/dist/availability/admin/pages/availability-rule-detail-page.d.ts +9 -0
- package/dist/availability/admin/pages/availability-rule-detail-page.d.ts.map +1 -0
- package/dist/availability/admin/pages/availability-rule-detail-page.js +11 -0
- package/dist/availability/admin/pages/availability-slot-detail-page.d.ts +9 -0
- package/dist/availability/admin/pages/availability-slot-detail-page.d.ts.map +1 -0
- package/dist/availability/admin/pages/availability-slot-detail-page.js +11 -0
- package/dist/availability/admin/pages/availability-start-time-detail-page.d.ts +9 -0
- package/dist/availability/admin/pages/availability-start-time-detail-page.d.ts.map +1 -0
- package/dist/availability/admin/pages/availability-start-time-detail-page.js +11 -0
- package/dist/availability/admin/rule-detail-host.d.ts +14 -0
- package/dist/availability/admin/rule-detail-host.d.ts.map +1 -0
- package/dist/availability/admin/rule-detail-host.js +27 -0
- package/dist/availability/admin/slot-detail-host.d.ts +29 -0
- package/dist/availability/admin/slot-detail-host.d.ts.map +1 -0
- package/dist/availability/admin/slot-detail-host.js +110 -0
- package/dist/availability/admin/start-time-detail-host.d.ts +15 -0
- package/dist/availability/admin/start-time-detail-host.d.ts.map +1 -0
- package/dist/availability/admin/start-time-detail-host.js +37 -0
- package/dist/availability/allocation/components/seat-map-builder.d.ts +25 -0
- package/dist/availability/allocation/components/seat-map-builder.d.ts.map +1 -0
- package/dist/availability/allocation/components/seat-map-builder.js +133 -0
- package/dist/availability/allocation/components/slot-allocation-add-resource-dialog.d.ts +29 -0
- package/dist/availability/allocation/components/slot-allocation-add-resource-dialog.d.ts.map +1 -0
- package/dist/availability/allocation/components/slot-allocation-add-resource-dialog.js +19 -0
- package/dist/availability/allocation/components/slot-allocation-model.d.ts +111 -0
- package/dist/availability/allocation/components/slot-allocation-model.d.ts.map +1 -0
- package/dist/availability/allocation/components/slot-allocation-model.js +237 -0
- package/dist/availability/allocation/components/slot-allocation-page-panels.d.ts +17 -0
- package/dist/availability/allocation/components/slot-allocation-page-panels.d.ts.map +1 -0
- package/dist/availability/allocation/components/slot-allocation-page-panels.js +27 -0
- package/dist/availability/allocation/components/slot-allocation-page.d.ts +51 -0
- package/dist/availability/allocation/components/slot-allocation-page.d.ts.map +1 -0
- package/dist/availability/allocation/components/slot-allocation-page.js +217 -0
- package/dist/availability/allocation/components/slot-allocation-resource-view-rows.d.ts +28 -0
- package/dist/availability/allocation/components/slot-allocation-resource-view-rows.d.ts.map +1 -0
- package/dist/availability/allocation/components/slot-allocation-resource-view-rows.js +90 -0
- package/dist/availability/allocation/components/slot-allocation-resource-view.d.ts +34 -0
- package/dist/availability/allocation/components/slot-allocation-resource-view.d.ts.map +1 -0
- package/dist/availability/allocation/components/slot-allocation-resource-view.js +35 -0
- package/dist/availability/allocation/components/slot-allocation-seat-view.d.ts +17 -0
- package/dist/availability/allocation/components/slot-allocation-seat-view.d.ts.map +1 -0
- package/dist/availability/allocation/components/slot-allocation-seat-view.js +97 -0
- package/dist/availability/allocation/components/slot-allocation-shared.d.ts +54 -0
- package/dist/availability/allocation/components/slot-allocation-shared.d.ts.map +1 -0
- package/dist/availability/allocation/components/slot-allocation-shared.js +106 -0
- package/dist/availability/allocation/i18n/index.d.ts +2 -0
- package/dist/availability/allocation/i18n/index.d.ts.map +1 -0
- package/dist/availability/allocation/i18n/index.js +1 -0
- package/dist/availability/allocation/i18n/provider.d.ts +692 -0
- package/dist/availability/allocation/i18n/provider.d.ts.map +1 -0
- package/dist/availability/allocation/i18n/provider.js +320 -0
- package/dist/availability/allocation/index.d.ts +4 -0
- package/dist/availability/allocation/index.d.ts.map +1 -0
- package/dist/availability/allocation/index.js +3 -0
- package/dist/availability/client.d.ts +14 -0
- package/dist/availability/client.d.ts.map +1 -0
- package/dist/availability/client.js +59 -0
- package/dist/availability/components/availability-columns.d.ts +42 -0
- package/dist/availability/components/availability-columns.d.ts.map +1 -0
- package/dist/availability/components/availability-columns.js +182 -0
- package/dist/availability/components/availability-dialogs/closeout-dialog.d.ts +13 -0
- package/dist/availability/components/availability-dialogs/closeout-dialog.d.ts.map +1 -0
- package/dist/availability/components/availability-dialogs/closeout-dialog.js +60 -0
- package/dist/availability/components/availability-dialogs/pickup-point-dialog.d.ts +12 -0
- package/dist/availability/components/availability-dialogs/pickup-point-dialog.d.ts.map +1 -0
- package/dist/availability/components/availability-dialogs/pickup-point-dialog.js +58 -0
- package/dist/availability/components/availability-dialogs/rule-dialog.d.ts +12 -0
- package/dist/availability/components/availability-dialogs/rule-dialog.d.ts.map +1 -0
- package/dist/availability/components/availability-dialogs/rule-dialog.js +76 -0
- package/dist/availability/components/availability-dialogs/shared.d.ts +213 -0
- package/dist/availability/components/availability-dialogs/shared.d.ts.map +1 -0
- package/dist/availability/components/availability-dialogs/shared.js +16 -0
- package/dist/availability/components/availability-dialogs/slot-dialog.d.ts +14 -0
- package/dist/availability/components/availability-dialogs/slot-dialog.d.ts.map +1 -0
- package/dist/availability/components/availability-dialogs/slot-dialog.js +138 -0
- package/dist/availability/components/availability-dialogs/start-time-dialog.d.ts +12 -0
- package/dist/availability/components/availability-dialogs/start-time-dialog.d.ts.map +1 -0
- package/dist/availability/components/availability-dialogs/start-time-dialog.js +62 -0
- package/dist/availability/components/availability-dialogs.d.ts +7 -0
- package/dist/availability/components/availability-dialogs.d.ts.map +1 -0
- package/dist/availability/components/availability-dialogs.js +6 -0
- package/dist/availability/components/availability-overview.d.ts +54 -0
- package/dist/availability/components/availability-overview.d.ts.map +1 -0
- package/dist/availability/components/availability-overview.js +50 -0
- package/dist/availability/components/availability-page.d.ts +32 -0
- package/dist/availability/components/availability-page.d.ts.map +1 -0
- package/dist/availability/components/availability-page.js +128 -0
- package/dist/availability/components/availability-rule-detail-page.d.ts +251 -0
- package/dist/availability/components/availability-rule-detail-page.d.ts.map +1 -0
- package/dist/availability/components/availability-rule-detail-page.js +74 -0
- package/dist/availability/components/availability-section-header.d.ts +8 -0
- package/dist/availability/components/availability-section-header.d.ts.map +1 -0
- package/dist/availability/components/availability-section-header.js +7 -0
- package/dist/availability/components/availability-skeletons.d.ts +6 -0
- package/dist/availability/components/availability-skeletons.d.ts.map +1 -0
- package/dist/availability/components/availability-skeletons.js +34 -0
- package/dist/availability/components/availability-slot-detail-activity.d.ts +30 -0
- package/dist/availability/components/availability-slot-detail-activity.d.ts.map +1 -0
- package/dist/availability/components/availability-slot-detail-activity.js +82 -0
- package/dist/availability/components/availability-slot-detail-financials.d.ts +27 -0
- package/dist/availability/components/availability-slot-detail-financials.d.ts.map +1 -0
- package/dist/availability/components/availability-slot-detail-financials.js +92 -0
- package/dist/availability/components/availability-slot-detail-meta.d.ts +38 -0
- package/dist/availability/components/availability-slot-detail-meta.d.ts.map +1 -0
- package/dist/availability/components/availability-slot-detail-meta.js +68 -0
- package/dist/availability/components/availability-slot-detail-page.d.ts +963 -0
- package/dist/availability/components/availability-slot-detail-page.d.ts.map +1 -0
- package/dist/availability/components/availability-slot-detail-page.js +159 -0
- package/dist/availability/components/availability-start-time-detail-page.d.ts +246 -0
- package/dist/availability/components/availability-start-time-detail-page.d.ts.map +1 -0
- package/dist/availability/components/availability-start-time-detail-page.js +83 -0
- package/dist/availability/components/availability-tabs/other-tabs.d.ts +58 -0
- package/dist/availability/components/availability-tabs/other-tabs.d.ts.map +1 -0
- package/dist/availability/components/availability-tabs/other-tabs.js +127 -0
- package/dist/availability/components/availability-tabs/shared.d.ts +80 -0
- package/dist/availability/components/availability-tabs/shared.d.ts.map +1 -0
- package/dist/availability/components/availability-tabs/shared.js +6 -0
- package/dist/availability/components/availability-tabs/slots-tab.d.ts +23 -0
- package/dist/availability/components/availability-tabs/slots-tab.d.ts.map +1 -0
- package/dist/availability/components/availability-tabs/slots-tab.js +69 -0
- package/dist/availability/components/availability-tabs.d.ts +4 -0
- package/dist/availability/components/availability-tabs.d.ts.map +1 -0
- package/dist/availability/components/availability-tabs.js +3 -0
- package/dist/availability/components/slot-status-tone.d.ts +15 -0
- package/dist/availability/components/slot-status-tone.d.ts.map +1 -0
- package/dist/availability/components/slot-status-tone.js +18 -0
- package/dist/availability/constants.d.ts +26 -0
- package/dist/availability/constants.d.ts.map +1 -0
- package/dist/availability/constants.js +23 -0
- package/dist/availability/form-resolver.d.ts +4 -0
- package/dist/availability/form-resolver.d.ts.map +1 -0
- package/dist/availability/form-resolver.js +40 -0
- package/dist/availability/hooks/index.d.ts +25 -0
- package/dist/availability/hooks/index.d.ts.map +1 -0
- package/dist/availability/hooks/index.js +15 -0
- package/dist/availability/hooks/use-availability-batch-mutations.d.ts +193 -0
- package/dist/availability/hooks/use-availability-batch-mutations.d.ts.map +1 -0
- package/dist/availability/hooks/use-availability-batch-mutations.js +53 -0
- package/dist/availability/hooks/use-availability-closeout-mutation.d.ts +34 -0
- package/dist/availability/hooks/use-availability-closeout-mutation.d.ts.map +1 -0
- package/dist/availability/hooks/use-availability-closeout-mutation.js +38 -0
- package/dist/availability/hooks/use-availability-overview.d.ts +46 -0
- package/dist/availability/hooks/use-availability-overview.d.ts.map +1 -0
- package/dist/availability/hooks/use-availability-overview.js +9 -0
- package/dist/availability/hooks/use-availability-pickup-point-mutation.d.ts +35 -0
- package/dist/availability/hooks/use-availability-pickup-point-mutation.d.ts.map +1 -0
- package/dist/availability/hooks/use-availability-pickup-point-mutation.js +38 -0
- package/dist/availability/hooks/use-availability-rule-mutation.d.ts +52 -0
- package/dist/availability/hooks/use-availability-rule-mutation.d.ts.map +1 -0
- package/dist/availability/hooks/use-availability-rule-mutation.js +41 -0
- package/dist/availability/hooks/use-availability-slot-mutation.d.ts +77 -0
- package/dist/availability/hooks/use-availability-slot-mutation.d.ts.map +1 -0
- package/dist/availability/hooks/use-availability-slot-mutation.js +41 -0
- package/dist/availability/hooks/use-availability-start-time-mutation.d.ts +43 -0
- package/dist/availability/hooks/use-availability-start-time-mutation.d.ts.map +1 -0
- package/dist/availability/hooks/use-availability-start-time-mutation.js +41 -0
- package/dist/availability/hooks/use-closeouts.d.ts +19 -0
- package/dist/availability/hooks/use-closeouts.d.ts.map +1 -0
- package/dist/availability/hooks/use-closeouts.js +9 -0
- package/dist/availability/hooks/use-pickup-points.d.ts +19 -0
- package/dist/availability/hooks/use-pickup-points.d.ts.map +1 -0
- package/dist/availability/hooks/use-pickup-points.js +9 -0
- package/dist/availability/hooks/use-products.d.ts +20 -0
- package/dist/availability/hooks/use-products.d.ts.map +1 -0
- package/dist/availability/hooks/use-products.js +9 -0
- package/dist/availability/hooks/use-rules.d.ts +25 -0
- package/dist/availability/hooks/use-rules.d.ts.map +1 -0
- package/dist/availability/hooks/use-rules.js +9 -0
- package/dist/availability/hooks/use-slot-allocation.d.ts +306 -0
- package/dist/availability/hooks/use-slot-allocation.d.ts.map +1 -0
- package/dist/availability/hooks/use-slot-allocation.js +211 -0
- package/dist/availability/hooks/use-slot-unit-availability.d.ts +25 -0
- package/dist/availability/hooks/use-slot-unit-availability.d.ts.map +1 -0
- package/dist/availability/hooks/use-slot-unit-availability.js +21 -0
- package/dist/availability/hooks/use-slots.d.ts +32 -0
- package/dist/availability/hooks/use-slots.d.ts.map +1 -0
- package/dist/availability/hooks/use-slots.js +9 -0
- package/dist/availability/hooks/use-start-times.d.ts +22 -0
- package/dist/availability/hooks/use-start-times.d.ts.map +1 -0
- package/dist/availability/hooks/use-start-times.js +9 -0
- package/dist/availability/i18n/index.d.ts +2 -0
- package/dist/availability/i18n/index.d.ts.map +1 -0
- package/dist/availability/i18n/index.js +1 -0
- package/dist/availability/i18n/provider.d.ts +2003 -0
- package/dist/availability/i18n/provider.d.ts.map +1 -0
- package/dist/availability/i18n/provider.js +102 -0
- package/dist/availability/index.d.ts +10 -0
- package/dist/availability/index.d.ts.map +1 -0
- package/dist/availability/index.js +9 -0
- package/dist/availability/provider.d.ts +2 -0
- package/dist/availability/provider.d.ts.map +1 -0
- package/dist/availability/provider.js +1 -0
- package/dist/availability/query-keys.d.ts +69 -0
- package/dist/availability/query-keys.d.ts.map +1 -0
- package/dist/availability/query-keys.js +29 -0
- package/dist/availability/query-options.d.ts +1549 -0
- package/dist/availability/query-options.d.ts.map +1 -0
- package/dist/availability/query-options.js +258 -0
- package/dist/availability/schemas.d.ts +974 -0
- package/dist/availability/schemas.d.ts.map +1 -0
- package/dist/availability/schemas.js +329 -0
- package/dist/availability/ui.d.ts +14 -0
- package/dist/availability/ui.d.ts.map +1 -0
- package/dist/availability/ui.js +13 -0
- package/dist/availability/utils.d.ts +10 -0
- package/dist/availability/utils.d.ts.map +1 -0
- package/dist/availability/utils.js +32 -0
- package/dist/ground/client.d.ts +14 -0
- package/dist/ground/client.d.ts.map +1 -0
- package/dist/ground/client.js +58 -0
- package/dist/ground/hooks/index.d.ts +7 -0
- package/dist/ground/hooks/index.d.ts.map +1 -0
- package/dist/ground/hooks/index.js +6 -0
- package/dist/ground/hooks/use-ground-driver-mutation.d.ts +48 -0
- package/dist/ground/hooks/use-ground-driver-mutation.d.ts.map +1 -0
- package/dist/ground/hooks/use-ground-driver-mutation.js +40 -0
- package/dist/ground/hooks/use-ground-drivers.d.ts +23 -0
- package/dist/ground/hooks/use-ground-drivers.d.ts.map +1 -0
- package/dist/ground/hooks/use-ground-drivers.js +12 -0
- package/dist/ground/hooks/use-ground-operator-mutation.d.ts +42 -0
- package/dist/ground/hooks/use-ground-operator-mutation.d.ts.map +1 -0
- package/dist/ground/hooks/use-ground-operator-mutation.js +40 -0
- package/dist/ground/hooks/use-ground-operators.d.ts +21 -0
- package/dist/ground/hooks/use-ground-operators.d.ts.map +1 -0
- package/dist/ground/hooks/use-ground-operators.js +12 -0
- package/dist/ground/hooks/use-ground-vehicle-mutation.d.ts +60 -0
- package/dist/ground/hooks/use-ground-vehicle-mutation.d.ts.map +1 -0
- package/dist/ground/hooks/use-ground-vehicle-mutation.js +40 -0
- package/dist/ground/hooks/use-ground-vehicles.d.ts +27 -0
- package/dist/ground/hooks/use-ground-vehicles.d.ts.map +1 -0
- package/dist/ground/hooks/use-ground-vehicles.js +12 -0
- package/dist/ground/index.d.ts +7 -0
- package/dist/ground/index.d.ts.map +1 -0
- package/dist/ground/index.js +6 -0
- package/dist/ground/provider.d.ts +2 -0
- package/dist/ground/provider.d.ts.map +1 -0
- package/dist/ground/provider.js +1 -0
- package/dist/ground/query-keys.d.ts +35 -0
- package/dist/ground/query-keys.d.ts.map +1 -0
- package/dist/ground/query-keys.js +12 -0
- package/dist/ground/query-options.d.ts +417 -0
- package/dist/ground/query-options.d.ts.map +1 -0
- package/dist/ground/query-options.js +63 -0
- package/dist/ground/schemas.d.ts +212 -0
- package/dist/ground/schemas.d.ts.map +1 -0
- package/dist/ground/schemas.js +45 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/places/client.d.ts +14 -0
- package/dist/places/client.d.ts.map +1 -0
- package/dist/places/client.js +58 -0
- package/dist/places/components/facility-badge.d.ts +13 -0
- package/dist/places/components/facility-badge.d.ts.map +1 -0
- package/dist/places/components/facility-badge.js +22 -0
- package/dist/places/components/facility-combobox.d.ts +16 -0
- package/dist/places/components/facility-combobox.d.ts.map +1 -0
- package/dist/places/components/facility-combobox.js +61 -0
- package/dist/places/components/place-badge.d.ts +2 -0
- package/dist/places/components/place-badge.d.ts.map +1 -0
- package/dist/places/components/place-badge.js +1 -0
- package/dist/places/components/place-combobox.d.ts +2 -0
- package/dist/places/components/place-combobox.d.ts.map +1 -0
- package/dist/places/components/place-combobox.js +1 -0
- package/dist/places/hooks/index.d.ts +23 -0
- package/dist/places/hooks/index.d.ts.map +1 -0
- package/dist/places/hooks/index.js +22 -0
- package/dist/places/hooks/use-facilities.d.ts +31 -0
- package/dist/places/hooks/use-facilities.d.ts.map +1 -0
- package/dist/places/hooks/use-facilities.js +12 -0
- package/dist/places/hooks/use-facility-feature-mutation.d.ts +37 -0
- package/dist/places/hooks/use-facility-feature-mutation.d.ts.map +1 -0
- package/dist/places/hooks/use-facility-feature-mutation.js +38 -0
- package/dist/places/hooks/use-facility-features.d.ts +21 -0
- package/dist/places/hooks/use-facility-features.d.ts.map +1 -0
- package/dist/places/hooks/use-facility-features.js +12 -0
- package/dist/places/hooks/use-facility-mutation.d.ts +74 -0
- package/dist/places/hooks/use-facility-mutation.d.ts.map +1 -0
- package/dist/places/hooks/use-facility-mutation.js +45 -0
- package/dist/places/hooks/use-facility-operation-schedule-mutation.d.ts +37 -0
- package/dist/places/hooks/use-facility-operation-schedule-mutation.d.ts.map +1 -0
- package/dist/places/hooks/use-facility-operation-schedule-mutation.js +44 -0
- package/dist/places/hooks/use-facility-operation-schedules.d.ts +21 -0
- package/dist/places/hooks/use-facility-operation-schedules.d.ts.map +1 -0
- package/dist/places/hooks/use-facility-operation-schedules.js +12 -0
- package/dist/places/hooks/use-facility.d.ts +25 -0
- package/dist/places/hooks/use-facility.d.ts.map +1 -0
- package/dist/places/hooks/use-facility.js +12 -0
- package/dist/places/hooks/use-properties.d.ts +23 -0
- package/dist/places/hooks/use-properties.d.ts.map +1 -0
- package/dist/places/hooks/use-properties.js +12 -0
- package/dist/places/hooks/use-property-group-member-mutation.d.ts +41 -0
- package/dist/places/hooks/use-property-group-member-mutation.d.ts.map +1 -0
- package/dist/places/hooks/use-property-group-member-mutation.js +38 -0
- package/dist/places/hooks/use-property-group-members.d.ts +20 -0
- package/dist/places/hooks/use-property-group-members.d.ts.map +1 -0
- package/dist/places/hooks/use-property-group-members.js +12 -0
- package/dist/places/hooks/use-property-group-mutation.d.ts +50 -0
- package/dist/places/hooks/use-property-group-mutation.d.ts.map +1 -0
- package/dist/places/hooks/use-property-group-mutation.js +39 -0
- package/dist/places/hooks/use-property-group.d.ts +17 -0
- package/dist/places/hooks/use-property-group.d.ts.map +1 -0
- package/dist/places/hooks/use-property-group.js +12 -0
- package/dist/places/hooks/use-property-groups.d.ts +23 -0
- package/dist/places/hooks/use-property-groups.d.ts.map +1 -0
- package/dist/places/hooks/use-property-groups.js +12 -0
- package/dist/places/hooks/use-property-mutation.d.ts +50 -0
- package/dist/places/hooks/use-property-mutation.d.ts.map +1 -0
- package/dist/places/hooks/use-property-mutation.js +40 -0
- package/dist/places/hooks/use-property.d.ts +17 -0
- package/dist/places/hooks/use-property.d.ts.map +1 -0
- package/dist/places/hooks/use-property.js +12 -0
- package/dist/places/i18n/en.d.ts +14 -0
- package/dist/places/i18n/en.d.ts.map +1 -0
- package/dist/places/i18n/en.js +13 -0
- package/dist/places/i18n/index.d.ts +5 -0
- package/dist/places/i18n/index.d.ts.map +1 -0
- package/dist/places/i18n/index.js +3 -0
- package/dist/places/i18n/messages.d.ts +15 -0
- package/dist/places/i18n/messages.d.ts.map +1 -0
- package/dist/places/i18n/messages.js +1 -0
- package/dist/places/i18n/provider.d.ts +50 -0
- package/dist/places/i18n/provider.d.ts.map +1 -0
- package/dist/places/i18n/provider.js +44 -0
- package/dist/places/i18n/ro.d.ts +14 -0
- package/dist/places/i18n/ro.d.ts.map +1 -0
- package/dist/places/i18n/ro.js +13 -0
- package/dist/places/index.d.ts +7 -0
- package/dist/places/index.d.ts.map +1 -0
- package/dist/places/index.js +6 -0
- package/dist/places/provider.d.ts +2 -0
- package/dist/places/provider.d.ts.map +1 -0
- package/dist/places/provider.js +1 -0
- package/dist/places/query-keys.d.ts +92 -0
- package/dist/places/query-keys.d.ts.map +1 -0
- package/dist/places/query-keys.js +22 -0
- package/dist/places/query-options.d.ts +814 -0
- package/dist/places/query-options.d.ts.map +1 -0
- package/dist/places/query-options.js +132 -0
- package/dist/places/schemas.d.ts +464 -0
- package/dist/places/schemas.d.ts.map +1 -0
- package/dist/places/schemas.js +84 -0
- package/dist/places/ui.d.ts +4 -0
- package/dist/places/ui.d.ts.map +1 -0
- package/dist/places/ui.js +3 -0
- package/dist/resources/admin/detail-hosts.d.ts +30 -0
- package/dist/resources/admin/detail-hosts.d.ts.map +1 -0
- package/dist/resources/admin/detail-hosts.js +50 -0
- package/dist/resources/admin/index.d.ts +89 -0
- package/dist/resources/admin/index.d.ts.map +1 -0
- package/dist/resources/admin/index.js +148 -0
- package/dist/resources/admin/pages/resource-allocation-detail-page.d.ts +9 -0
- package/dist/resources/admin/pages/resource-allocation-detail-page.d.ts.map +1 -0
- package/dist/resources/admin/pages/resource-allocation-detail-page.js +11 -0
- package/dist/resources/admin/pages/resource-assignment-detail-page.d.ts +9 -0
- package/dist/resources/admin/pages/resource-assignment-detail-page.d.ts.map +1 -0
- package/dist/resources/admin/pages/resource-assignment-detail-page.js +11 -0
- package/dist/resources/admin/pages/resource-detail-page.d.ts +9 -0
- package/dist/resources/admin/pages/resource-detail-page.d.ts.map +1 -0
- package/dist/resources/admin/pages/resource-detail-page.js +11 -0
- package/dist/resources/admin/pages/resource-pool-detail-page.d.ts +9 -0
- package/dist/resources/admin/pages/resource-pool-detail-page.d.ts.map +1 -0
- package/dist/resources/admin/pages/resource-pool-detail-page.js +11 -0
- package/dist/resources/admin/resources-admin-api.d.ts +22 -0
- package/dist/resources/admin/resources-admin-api.d.ts.map +1 -0
- package/dist/resources/admin/resources-admin-api.js +28 -0
- package/dist/resources/admin/resources-dialog-allocation.d.ts +12 -0
- package/dist/resources/admin/resources-dialog-allocation.d.ts.map +1 -0
- package/dist/resources/admin/resources-dialog-allocation.js +77 -0
- package/dist/resources/admin/resources-dialogs-core.d.ts +16 -0
- package/dist/resources/admin/resources-dialogs-core.d.ts.map +1 -0
- package/dist/resources/admin/resources-dialogs-core.js +133 -0
- package/dist/resources/admin/resources-dialogs-ops.d.ts +19 -0
- package/dist/resources/admin/resources-dialogs-ops.d.ts.map +1 -0
- package/dist/resources/admin/resources-dialogs-ops.js +137 -0
- package/dist/resources/admin/resources-dialogs.d.ts +28 -0
- package/dist/resources/admin/resources-dialogs.d.ts.map +1 -0
- package/dist/resources/admin/resources-dialogs.js +23 -0
- package/dist/resources/admin/resources-host.d.ts +11 -0
- package/dist/resources/admin/resources-host.d.ts.map +1 -0
- package/dist/resources/admin/resources-host.js +159 -0
- package/dist/resources/admin/resources-page-data.d.ts +61 -0
- package/dist/resources/admin/resources-page-data.d.ts.map +1 -0
- package/dist/resources/admin/resources-page-data.js +39 -0
- package/dist/resources/admin/resources-page-skeleton.d.ts +5 -0
- package/dist/resources/admin/resources-page-skeleton.d.ts.map +1 -0
- package/dist/resources/admin/resources-page-skeleton.js +22 -0
- package/dist/resources/client.d.ts +14 -0
- package/dist/resources/client.d.ts.map +1 -0
- package/dist/resources/client.js +59 -0
- package/dist/resources/components/resource-allocation-detail-page.d.ts +16 -0
- package/dist/resources/components/resource-allocation-detail-page.d.ts.map +1 -0
- package/dist/resources/components/resource-allocation-detail-page.js +48 -0
- package/dist/resources/components/resource-assignment-detail-page.d.ts +16 -0
- package/dist/resources/components/resource-assignment-detail-page.d.ts.map +1 -0
- package/dist/resources/components/resource-assignment-detail-page.js +50 -0
- package/dist/resources/components/resource-detail-data.d.ts +34 -0
- package/dist/resources/components/resource-detail-data.d.ts.map +1 -0
- package/dist/resources/components/resource-detail-data.js +90 -0
- package/dist/resources/components/resource-detail-page.d.ts +24 -0
- package/dist/resources/components/resource-detail-page.d.ts.map +1 -0
- package/dist/resources/components/resource-detail-page.js +80 -0
- package/dist/resources/components/resource-detail-shared.d.ts +37 -0
- package/dist/resources/components/resource-detail-shared.d.ts.map +1 -0
- package/dist/resources/components/resource-detail-shared.js +51 -0
- package/dist/resources/components/resource-detail-skeletons.d.ts +14 -0
- package/dist/resources/components/resource-detail-skeletons.d.ts.map +1 -0
- package/dist/resources/components/resource-detail-skeletons.js +24 -0
- package/dist/resources/components/resource-pool-detail-page.d.ts +22 -0
- package/dist/resources/components/resource-pool-detail-page.d.ts.map +1 -0
- package/dist/resources/components/resource-pool-detail-page.js +68 -0
- package/dist/resources/components/resources-overview.d.ts +28 -0
- package/dist/resources/components/resources-overview.d.ts.map +1 -0
- package/dist/resources/components/resources-overview.js +32 -0
- package/dist/resources/components/resources-page-filters.d.ts +22 -0
- package/dist/resources/components/resources-page-filters.d.ts.map +1 -0
- package/dist/resources/components/resources-page-filters.js +40 -0
- package/dist/resources/components/resources-page.d.ts +77 -0
- package/dist/resources/components/resources-page.d.ts.map +1 -0
- package/dist/resources/components/resources-page.js +140 -0
- package/dist/resources/components/resources-section-header.d.ts +7 -0
- package/dist/resources/components/resources-section-header.d.ts.map +1 -0
- package/dist/resources/components/resources-section-header.js +6 -0
- package/dist/resources/components/resources-tabs-primary.d.ts +58 -0
- package/dist/resources/components/resources-tabs-primary.d.ts.map +1 -0
- package/dist/resources/components/resources-tabs-primary.js +201 -0
- package/dist/resources/components/resources-tabs-secondary.d.ts +46 -0
- package/dist/resources/components/resources-tabs-secondary.d.ts.map +1 -0
- package/dist/resources/components/resources-tabs-secondary.js +143 -0
- package/dist/resources/constants.d.ts +44 -0
- package/dist/resources/constants.d.ts.map +1 -0
- package/dist/resources/constants.js +20 -0
- package/dist/resources/hooks/index.d.ts +31 -0
- package/dist/resources/hooks/index.d.ts.map +1 -0
- package/dist/resources/hooks/index.js +15 -0
- package/dist/resources/hooks/use-allocation.d.ts +16 -0
- package/dist/resources/hooks/use-allocation.d.ts.map +1 -0
- package/dist/resources/hooks/use-allocation.js +12 -0
- package/dist/resources/hooks/use-allocations.d.ts +20 -0
- package/dist/resources/hooks/use-allocations.d.ts.map +1 -0
- package/dist/resources/hooks/use-allocations.js +12 -0
- package/dist/resources/hooks/use-assignment.d.ts +17 -0
- package/dist/resources/hooks/use-assignment.d.ts.map +1 -0
- package/dist/resources/hooks/use-assignment.js +12 -0
- package/dist/resources/hooks/use-assignments.d.ts +21 -0
- package/dist/resources/hooks/use-assignments.d.ts.map +1 -0
- package/dist/resources/hooks/use-assignments.js +12 -0
- package/dist/resources/hooks/use-bookings.d.ts +14 -0
- package/dist/resources/hooks/use-bookings.d.ts.map +1 -0
- package/dist/resources/hooks/use-bookings.js +12 -0
- package/dist/resources/hooks/use-closeouts.d.ts +19 -0
- package/dist/resources/hooks/use-closeouts.d.ts.map +1 -0
- package/dist/resources/hooks/use-closeouts.js +12 -0
- package/dist/resources/hooks/use-pool.d.ts +15 -0
- package/dist/resources/hooks/use-pool.d.ts.map +1 -0
- package/dist/resources/hooks/use-pool.js +12 -0
- package/dist/resources/hooks/use-pools.d.ts +19 -0
- package/dist/resources/hooks/use-pools.d.ts.map +1 -0
- package/dist/resources/hooks/use-pools.js +12 -0
- package/dist/resources/hooks/use-products.d.ts +14 -0
- package/dist/resources/hooks/use-products.d.ts.map +1 -0
- package/dist/resources/hooks/use-products.js +12 -0
- package/dist/resources/hooks/use-resource.d.ts +16 -0
- package/dist/resources/hooks/use-resource.d.ts.map +1 -0
- package/dist/resources/hooks/use-resource.js +12 -0
- package/dist/resources/hooks/use-resources.d.ts +20 -0
- package/dist/resources/hooks/use-resources.d.ts.map +1 -0
- package/dist/resources/hooks/use-resources.js +12 -0
- package/dist/resources/hooks/use-rules.d.ts +15 -0
- package/dist/resources/hooks/use-rules.d.ts.map +1 -0
- package/dist/resources/hooks/use-rules.js +12 -0
- package/dist/resources/hooks/use-slots.d.ts +16 -0
- package/dist/resources/hooks/use-slots.d.ts.map +1 -0
- package/dist/resources/hooks/use-slots.js +12 -0
- package/dist/resources/hooks/use-start-times.d.ts +16 -0
- package/dist/resources/hooks/use-start-times.d.ts.map +1 -0
- package/dist/resources/hooks/use-start-times.js +12 -0
- package/dist/resources/hooks/use-suppliers.d.ts +14 -0
- package/dist/resources/hooks/use-suppliers.d.ts.map +1 -0
- package/dist/resources/hooks/use-suppliers.js +12 -0
- package/dist/resources/i18n/en.d.ts +3 -0
- package/dist/resources/i18n/en.d.ts.map +1 -0
- package/dist/resources/i18n/en.js +363 -0
- package/dist/resources/i18n/index.d.ts +5 -0
- package/dist/resources/i18n/index.d.ts.map +1 -0
- package/dist/resources/i18n/index.js +3 -0
- package/dist/resources/i18n/messages.d.ts +298 -0
- package/dist/resources/i18n/messages.d.ts.map +1 -0
- package/dist/resources/i18n/messages.js +1 -0
- package/dist/resources/i18n/provider.d.ts +26 -0
- package/dist/resources/i18n/provider.d.ts.map +1 -0
- package/dist/resources/i18n/provider.js +44 -0
- package/dist/resources/i18n/ro.d.ts +3 -0
- package/dist/resources/i18n/ro.d.ts.map +1 -0
- package/dist/resources/i18n/ro.js +363 -0
- package/dist/resources/i18n/utils.d.ts +18 -0
- package/dist/resources/i18n/utils.d.ts.map +1 -0
- package/dist/resources/i18n/utils.js +30 -0
- package/dist/resources/index.d.ts +9 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +8 -0
- package/dist/resources/provider.d.ts +2 -0
- package/dist/resources/provider.d.ts.map +1 -0
- package/dist/resources/provider.js +1 -0
- package/dist/resources/query-keys.d.ts +73 -0
- package/dist/resources/query-keys.d.ts.map +1 -0
- package/dist/resources/query-keys.js +29 -0
- package/dist/resources/query-options.d.ts +801 -0
- package/dist/resources/query-options.d.ts.map +1 -0
- package/dist/resources/query-options.js +237 -0
- package/dist/resources/schemas.d.ts +452 -0
- package/dist/resources/schemas.d.ts.map +1 -0
- package/dist/resources/schemas.js +126 -0
- package/dist/resources/ui.d.ts +13 -0
- package/dist/resources/ui.d.ts.map +1 -0
- package/dist/resources/ui.js +12 -0
- package/dist/resources/utils.d.ts +14 -0
- package/dist/resources/utils.d.ts.map +1 -0
- package/dist/resources/utils.js +33 -0
- package/package.json +325 -0
- package/src/availability/styles.css +12 -0
- package/src/places/styles.css +11 -0
- package/src/resources/styles.css +11 -0
- package/src/styles.css +3 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type AdminExtension } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Semantic destinations the availability admin surfaces navigate to
|
|
4
|
+
* (packaged-admin RFC §4.7). Keys shared with other domains
|
|
5
|
+
* (`availabilitySlot.detail`, `booking.detail`, `product.detail`) come from
|
|
6
|
+
* the bookings-ui augmentation bound above; declared here are the
|
|
7
|
+
* availability-owned targets the packaged pages and breadcrumbs resolve
|
|
8
|
+
* through `useAdminHref`/`useAdminNavigate`.
|
|
9
|
+
*/
|
|
10
|
+
declare module "@voyant-travel/admin" {
|
|
11
|
+
interface AdminDestinations {
|
|
12
|
+
/** The availability landing page (slots list + calendar). */
|
|
13
|
+
"availabilitySlot.list": Record<string, never>;
|
|
14
|
+
/** An availability start time's detail page. */
|
|
15
|
+
"availabilityStartTime.detail": {
|
|
16
|
+
startTimeId: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export type { OptionResourceTemplatesPanelProps } from "./option-resource-templates-panel.js";
|
|
21
|
+
export type { AvailabilityRuleDetailHostProps } from "./rule-detail-host.js";
|
|
22
|
+
export type { AvailabilitySlotDetailHostProps } from "./slot-detail-host.js";
|
|
23
|
+
export type { AvailabilityStartTimeDetailHostProps } from "./start-time-detail-host.js";
|
|
24
|
+
export interface CreateAvailabilityAdminExtensionOptions {
|
|
25
|
+
/** Mount path of the availability pages inside the admin workspace. Default `/operations/availability`. */
|
|
26
|
+
basePath?: string;
|
|
27
|
+
/** Localized page titles. Defaults are the English operator nav labels. */
|
|
28
|
+
labels?: {
|
|
29
|
+
availability?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The availability admin contribution (packaged-admin RFC Phase 3,
|
|
34
|
+
* `@voyant-travel/<domain>-ui/admin` convention).
|
|
35
|
+
*
|
|
36
|
+
* NAVIGATION: deliberately none. The Availability nav item is part of the
|
|
37
|
+
* BASE operator navigation — see `createOperatorAdminNavigation` in
|
|
38
|
+
* `@voyant-travel/admin` — so contributing a nav entry here would duplicate it.
|
|
39
|
+
* If the base nav ever drops the availability item, this extension is where
|
|
40
|
+
* the entry moves.
|
|
41
|
+
*
|
|
42
|
+
* ROUTES: contributions carry the FULL route implementation (packaged-admin
|
|
43
|
+
* RFC §4.2/§4.8) — lazy `page` module loaders, data loaders fed by the
|
|
44
|
+
* host-supplied {@link AdminRouteLoaderContext} (QueryClient + runtime +
|
|
45
|
+
* params), per-route SSR mode, and pending skeletons. Hosts bind them into
|
|
46
|
+
* their code-assembled admin route tree; no per-route host files needed.
|
|
47
|
+
* The pages stay code-split because each contribution's `page` dynamically
|
|
48
|
+
* imports the specific host/page module — never the admin barrel — so the
|
|
49
|
+
* heavy page chunks load on navigation, not with workspace chrome.
|
|
50
|
+
* {@link AvailabilityIndexHost} (the slots list + calendar landing page,
|
|
51
|
+
* with bulk update/delete running through the typed batch mutation hooks in
|
|
52
|
+
* `@voyant-travel/operations-react/availability`) mounts as a zero-prop page; the detail
|
|
53
|
+
* hosts {@link AvailabilitySlotDetailHost},
|
|
54
|
+
* {@link AvailabilityRuleDetailHost} and
|
|
55
|
+
* {@link AvailabilityStartTimeDetailHost} read their record id from
|
|
56
|
+
* `AdminRoutePageProps` via the default-exported wrappers in `./pages/`.
|
|
57
|
+
* The index host's SSR loader binding is no longer app-side:
|
|
58
|
+
* {@link ensureAvailabilityPageData} runs in the contribution's own loader
|
|
59
|
+
* against the host runtime's cookie-forwarding fetcher. The pages keep
|
|
60
|
+
* their filter state component-local, so there are no URL search contracts,
|
|
61
|
+
* and every cross-route link resolves through the semantic destinations
|
|
62
|
+
* declared above.
|
|
63
|
+
*
|
|
64
|
+
* WIDGETS: none. {@link OptionResourceTemplatesPanel} (the per-option
|
|
65
|
+
* resource templates editor the product editor embeds) ships from this
|
|
66
|
+
* entry as a directly importable component — the products admin host owns
|
|
67
|
+
* where it mounts.
|
|
68
|
+
*/
|
|
69
|
+
export declare function createAvailabilityAdminExtension(options?: CreateAvailabilityAdminExtensionOptions): AdminExtension;
|
|
70
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/availability/admin/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,sBAAsB,CAAA;AAsB7B;;;;;;;GAOG;AACH,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,iBAAiB;QACzB,6DAA6D;QAC7D,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QAC9C,gDAAgD;QAChD,8BAA8B,EAAE;YAAE,WAAW,EAAE,MAAM,CAAA;SAAE,CAAA;KACxD;CACF;AAYD,YAAY,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAA;AAC7F,YAAY,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AAC5E,YAAY,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAA;AAC5E,YAAY,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAA;AAEvF,MAAM,WAAW,uCAAuC;IACtD,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,2EAA2E;IAC3E,MAAM,CAAC,EAAE;QACP,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,GAAE,uCAA4C,GACpD,cAAc,CA0FhB"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { adminRoutePageModule, defineAdminExtension, } from "@voyant-travel/admin";
|
|
2
|
+
// Lean static only: the client module (fetcher). The page-data helper pulls
|
|
3
|
+
// the availability query options (client + response schemas), so the index
|
|
4
|
+
// loader resolves it via dynamic import instead of pinning it into the
|
|
5
|
+
// workspace-chrome chunk that evaluates this factory.
|
|
6
|
+
import { defaultFetcher } from "../client.js";
|
|
7
|
+
import { AvailabilityPageSkeleton, AvailabilityRuleDetailSkeleton, AvailabilitySlotDetailSkeleton, AvailabilityStartTimeDetailSkeleton, } from "../components/availability-skeletons.js";
|
|
8
|
+
/**
|
|
9
|
+
* The availability admin contribution (packaged-admin RFC Phase 3,
|
|
10
|
+
* `@voyant-travel/<domain>-ui/admin` convention).
|
|
11
|
+
*
|
|
12
|
+
* NAVIGATION: deliberately none. The Availability nav item is part of the
|
|
13
|
+
* BASE operator navigation — see `createOperatorAdminNavigation` in
|
|
14
|
+
* `@voyant-travel/admin` — so contributing a nav entry here would duplicate it.
|
|
15
|
+
* If the base nav ever drops the availability item, this extension is where
|
|
16
|
+
* the entry moves.
|
|
17
|
+
*
|
|
18
|
+
* ROUTES: contributions carry the FULL route implementation (packaged-admin
|
|
19
|
+
* RFC §4.2/§4.8) — lazy `page` module loaders, data loaders fed by the
|
|
20
|
+
* host-supplied {@link AdminRouteLoaderContext} (QueryClient + runtime +
|
|
21
|
+
* params), per-route SSR mode, and pending skeletons. Hosts bind them into
|
|
22
|
+
* their code-assembled admin route tree; no per-route host files needed.
|
|
23
|
+
* The pages stay code-split because each contribution's `page` dynamically
|
|
24
|
+
* imports the specific host/page module — never the admin barrel — so the
|
|
25
|
+
* heavy page chunks load on navigation, not with workspace chrome.
|
|
26
|
+
* {@link AvailabilityIndexHost} (the slots list + calendar landing page,
|
|
27
|
+
* with bulk update/delete running through the typed batch mutation hooks in
|
|
28
|
+
* `@voyant-travel/operations-react/availability`) mounts as a zero-prop page; the detail
|
|
29
|
+
* hosts {@link AvailabilitySlotDetailHost},
|
|
30
|
+
* {@link AvailabilityRuleDetailHost} and
|
|
31
|
+
* {@link AvailabilityStartTimeDetailHost} read their record id from
|
|
32
|
+
* `AdminRoutePageProps` via the default-exported wrappers in `./pages/`.
|
|
33
|
+
* The index host's SSR loader binding is no longer app-side:
|
|
34
|
+
* {@link ensureAvailabilityPageData} runs in the contribution's own loader
|
|
35
|
+
* against the host runtime's cookie-forwarding fetcher. The pages keep
|
|
36
|
+
* their filter state component-local, so there are no URL search contracts,
|
|
37
|
+
* and every cross-route link resolves through the semantic destinations
|
|
38
|
+
* declared above.
|
|
39
|
+
*
|
|
40
|
+
* WIDGETS: none. {@link OptionResourceTemplatesPanel} (the per-option
|
|
41
|
+
* resource templates editor the product editor embeds) ships from this
|
|
42
|
+
* entry as a directly importable component — the products admin host owns
|
|
43
|
+
* where it mounts.
|
|
44
|
+
*/
|
|
45
|
+
export function createAvailabilityAdminExtension(options = {}) {
|
|
46
|
+
const { basePath = "/operations/availability", labels = {} } = options;
|
|
47
|
+
const { availability = "Availability" } = labels;
|
|
48
|
+
return defineAdminExtension({
|
|
49
|
+
id: "availability",
|
|
50
|
+
routes: [
|
|
51
|
+
{
|
|
52
|
+
id: "availability-index",
|
|
53
|
+
path: basePath,
|
|
54
|
+
title: availability,
|
|
55
|
+
// Route-backed destination (RFC §4.7 endgame): the key resolves by
|
|
56
|
+
// pure path interpolation of this route, so the host's resolver is
|
|
57
|
+
// generated (`voyant admin generate --destinations`).
|
|
58
|
+
destination: "availabilitySlot.list",
|
|
59
|
+
ssr: "data-only",
|
|
60
|
+
page: () => import("./availability-index-host.js").then((module) => adminRoutePageModule(module.AvailabilityIndexHost)),
|
|
61
|
+
// Awaits only what the slots tab + the products picker need for
|
|
62
|
+
// first paint; the slot dialog's rules/start-times dimensions
|
|
63
|
+
// prefetch in the background. Dynamic import on purpose: the helper
|
|
64
|
+
// pulls the availability query options, and a static import here
|
|
65
|
+
// would pin them into the workspace-chrome chunk.
|
|
66
|
+
loader: async ({ queryClient, runtime }) => {
|
|
67
|
+
const { ensureAvailabilityPageData } = await import("./availability-page-data.js");
|
|
68
|
+
return ensureAvailabilityPageData(queryClient, loaderClient(runtime));
|
|
69
|
+
},
|
|
70
|
+
pendingComponent: AvailabilityPageSkeleton,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "availability-slot-detail",
|
|
74
|
+
path: `${basePath}/$id`,
|
|
75
|
+
title: availability,
|
|
76
|
+
// Key declared by @voyant-travel/bookings-react/admin (bound type-only above).
|
|
77
|
+
destination: "availabilitySlot.detail",
|
|
78
|
+
destinationParams: { id: "slotId" },
|
|
79
|
+
page: () => import("./pages/availability-slot-detail-page.js"),
|
|
80
|
+
loader: async ({ queryClient, runtime, params }) => {
|
|
81
|
+
const id = params.id;
|
|
82
|
+
if (!id)
|
|
83
|
+
return;
|
|
84
|
+
// Dynamic import on purpose: the loader helper lives in the slot
|
|
85
|
+
// detail page module, and a static import here would pin that
|
|
86
|
+
// module into the host's workspace-chrome chunk, defeating the
|
|
87
|
+
// route's code-split. The loader and the page resolve the same
|
|
88
|
+
// chunk, fetched once.
|
|
89
|
+
const { loadAvailabilitySlotDetailPage } = await import("../components/availability-slot-detail-page.js");
|
|
90
|
+
return loadAvailabilitySlotDetailPage(queryClient, loaderClient(runtime), id);
|
|
91
|
+
},
|
|
92
|
+
pendingComponent: AvailabilitySlotDetailSkeleton,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "availability-rule-detail",
|
|
96
|
+
path: `${basePath}/rules/$id`,
|
|
97
|
+
title: availability,
|
|
98
|
+
page: () => import("./pages/availability-rule-detail-page.js"),
|
|
99
|
+
loader: async ({ queryClient, runtime, params }) => {
|
|
100
|
+
const id = params.id;
|
|
101
|
+
if (!id)
|
|
102
|
+
return;
|
|
103
|
+
// Dynamic import on purpose — see the slot detail loader above.
|
|
104
|
+
const { loadAvailabilityRuleDetailPage } = await import("../components/availability-rule-detail-page.js");
|
|
105
|
+
return loadAvailabilityRuleDetailPage(queryClient, loaderClient(runtime), id);
|
|
106
|
+
},
|
|
107
|
+
pendingComponent: AvailabilityRuleDetailSkeleton,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "availability-start-time-detail",
|
|
111
|
+
path: `${basePath}/start-times/$id`,
|
|
112
|
+
title: availability,
|
|
113
|
+
destination: "availabilityStartTime.detail",
|
|
114
|
+
destinationParams: { id: "startTimeId" },
|
|
115
|
+
page: () => import("./pages/availability-start-time-detail-page.js"),
|
|
116
|
+
loader: async ({ queryClient, runtime, params }) => {
|
|
117
|
+
const id = params.id;
|
|
118
|
+
if (!id)
|
|
119
|
+
return;
|
|
120
|
+
// Dynamic import on purpose — see the slot detail loader above.
|
|
121
|
+
const { loadAvailabilityStartTimeDetailPage } = await import("../components/availability-start-time-detail-page.js");
|
|
122
|
+
return loadAvailabilityStartTimeDetailPage(queryClient, loaderClient(runtime), id);
|
|
123
|
+
},
|
|
124
|
+
pendingComponent: AvailabilityStartTimeDetailSkeleton,
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Bridge the host-supplied {@link AdminRouteRuntime} (optional fetcher) to
|
|
131
|
+
* the required-fetcher client contract the availability loaders take.
|
|
132
|
+
*
|
|
133
|
+
* Note: the operator's detail route files built this client with the
|
|
134
|
+
* package `defaultFetcher` (a plain `credentials: "include"` fetch); the
|
|
135
|
+
* contribution uses the host runtime's cookie-forwarding fetcher instead,
|
|
136
|
+
* so detail SSR prefetches authenticate — an intentional improvement.
|
|
137
|
+
*/
|
|
138
|
+
function loaderClient(runtime) {
|
|
139
|
+
return { baseUrl: runtime.baseUrl, fetcher: runtime.fetcher ?? defaultFetcher };
|
|
140
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SeatLayoutSpec } from "../index.js";
|
|
2
|
+
export declare function SeatMapSummaryBadge({ flags, messages, }: {
|
|
3
|
+
flags: Record<string, unknown>;
|
|
4
|
+
messages: {
|
|
5
|
+
seatMapSummary: string;
|
|
6
|
+
};
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export declare function extractLayoutSpec(flags: Record<string, unknown> | null | undefined): SeatLayoutSpec | null;
|
|
9
|
+
export declare function countSeats(spec: SeatLayoutSpec | null): number;
|
|
10
|
+
//# sourceMappingURL=option-resource-template-seat-map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"option-resource-template-seat-map.d.ts","sourceRoot":"","sources":["../../../src/availability/admin/option-resource-template-seat-map.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,aAAa,CAAA;AAEvE,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,QAAQ,EAAE;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,CAAA;CACrC,kDAWA;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,GAChD,cAAc,GAAG,IAAI,CAQvB;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,GAAG,MAAM,CAS9D"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { formatMessage } from "@voyant-travel/i18n";
|
|
4
|
+
import { Badge } from "@voyant-travel/ui/components";
|
|
5
|
+
import { seatLayoutSpecSchema } from "../index.js";
|
|
6
|
+
export function SeatMapSummaryBadge({ flags, messages, }) {
|
|
7
|
+
const spec = extractLayoutSpec(flags);
|
|
8
|
+
if (!spec)
|
|
9
|
+
return null;
|
|
10
|
+
return (_jsx(Badge, { variant: "outline", className: "text-[10px]", children: formatMessage(messages.seatMapSummary, {
|
|
11
|
+
rows: spec.rows.length,
|
|
12
|
+
count: countSeats(spec),
|
|
13
|
+
}) }));
|
|
14
|
+
}
|
|
15
|
+
export function extractLayoutSpec(flags) {
|
|
16
|
+
const raw = flags?.layoutSpec;
|
|
17
|
+
if (!raw)
|
|
18
|
+
return null;
|
|
19
|
+
// Validate against the schema rather than trust the shape — the server
|
|
20
|
+
// stores flags as opaque JSON, so a malformed value (e.g. a row missing
|
|
21
|
+
// `cells`) could otherwise reach `countSeats` and throw at runtime.
|
|
22
|
+
const parsed = seatLayoutSpecSchema.safeParse(raw);
|
|
23
|
+
return parsed.success ? parsed.data : null;
|
|
24
|
+
}
|
|
25
|
+
export function countSeats(spec) {
|
|
26
|
+
if (!spec)
|
|
27
|
+
return 0;
|
|
28
|
+
let count = 0;
|
|
29
|
+
for (const row of spec.rows) {
|
|
30
|
+
for (const cell of row.cells) {
|
|
31
|
+
if (cell === "seat")
|
|
32
|
+
count += 1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return count;
|
|
36
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-option Resource templates editor. Templates drive the Allocation
|
|
3
|
+
* tab's "Generate resources" automation — without a template configured
|
|
4
|
+
* for an option, no rooms/seats/etc. are materialized when bookings hit
|
|
5
|
+
* a slot.
|
|
6
|
+
*
|
|
7
|
+
* Each template is identified by `(optionId, kind, refId)` — an option can
|
|
8
|
+
* hold several templates of the same kind, one per `option_unit` (e.g. a
|
|
9
|
+
* "room" template per room type), distinguished by `refId`. Common kinds:
|
|
10
|
+
* - `room` — accommodation rooms (default capacity 2)
|
|
11
|
+
* - `vehicle_seat` — coach/van seats (capacity 1)
|
|
12
|
+
* - `cabin` — cruise cabins
|
|
13
|
+
*
|
|
14
|
+
* The kind field is a free-form string on the server; we constrain the
|
|
15
|
+
* picker to the known set for UX, but operators can extend by typing.
|
|
16
|
+
*/
|
|
17
|
+
export interface OptionResourceTemplatesPanelProps {
|
|
18
|
+
productId: string;
|
|
19
|
+
optionId: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function OptionResourceTemplatesPanel({ productId, optionId, }: OptionResourceTemplatesPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=option-resource-templates-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"option-resource-templates-panel.d.ts","sourceRoot":"","sources":["../../../src/availability/admin/option-resource-templates-panel.tsx"],"names":[],"mappings":"AAmDA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAiBD,wBAAgB,4BAA4B,CAAC,EAC3C,SAAS,EACT,QAAQ,GACT,EAAE,iCAAiC,2CAqenC"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useOperatorAdminMessages } from "@voyant-travel/admin";
|
|
4
|
+
import { formatMessage } from "@voyant-travel/i18n";
|
|
5
|
+
import { useOptionUnits } from "@voyant-travel/inventory-react";
|
|
6
|
+
import { Badge, Button, Collapsible, CollapsibleContent, CollapsibleTrigger, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@voyant-travel/ui/components";
|
|
7
|
+
import { Armchair, Bed, CalendarCheck, ChevronDown, ChevronRight, Loader2, Pencil, Plus, Sparkles, Trash2, } from "lucide-react";
|
|
8
|
+
import { useMemo, useState } from "react";
|
|
9
|
+
import { SeatMapBuilder } from "../allocation/index.js";
|
|
10
|
+
import { useMaterializeOpenSlotsMutation, useProductResourceTemplates, useResourceTemplateMutation, } from "../index.js";
|
|
11
|
+
import { countSeats, extractLayoutSpec, SeatMapSummaryBadge, } from "./option-resource-template-seat-map.js";
|
|
12
|
+
// Defaults populate the namePattern field when the operator picks a kind. They
|
|
13
|
+
// are starting points the operator edits before saving, not display labels —
|
|
14
|
+
// the localized prompt copy lives in the dialog's namePatternPlaceholder.
|
|
15
|
+
const COMMON_KINDS = [
|
|
16
|
+
// i18n-literal-ok
|
|
17
|
+
{ value: "room", defaultPattern: "Room {sequence}" },
|
|
18
|
+
// i18n-literal-ok
|
|
19
|
+
{ value: "vehicle_seat", defaultPattern: "Seat {sequence}" },
|
|
20
|
+
// i18n-literal-ok
|
|
21
|
+
{ value: "cabin", defaultPattern: "Cabin {sequence}" },
|
|
22
|
+
// i18n-literal-ok
|
|
23
|
+
{ value: "flight_seat", defaultPattern: "Seat {sequence}" },
|
|
24
|
+
];
|
|
25
|
+
export function OptionResourceTemplatesPanel({ productId, optionId, }) {
|
|
26
|
+
const adminMessages = useOperatorAdminMessages();
|
|
27
|
+
const t = adminMessages.availability.details.resourceTemplates;
|
|
28
|
+
const { data, isPending, isError } = useProductResourceTemplates({ productId });
|
|
29
|
+
const { upsert, remove } = useResourceTemplateMutation(productId);
|
|
30
|
+
const materializeOpenSlots = useMaterializeOpenSlotsMutation(productId);
|
|
31
|
+
const templates = useMemo(() => {
|
|
32
|
+
const option = (data?.data ?? []).find((entry) => entry.id === optionId);
|
|
33
|
+
return option?.templates ?? [];
|
|
34
|
+
}, [data?.data, optionId]);
|
|
35
|
+
const totalPerDeparture = useMemo(() => templates.reduce((sum, template) => sum + (template.defaultCount ?? 0), 0), [templates]);
|
|
36
|
+
// The option's room units already carry quantity (maxQuantity) and occupancy
|
|
37
|
+
// — generate departure inventory straight from them instead of re-typing it.
|
|
38
|
+
const { data: unitsData } = useOptionUnits({ optionId, limit: 100 });
|
|
39
|
+
const roomUnits = useMemo(() => (unitsData?.data ?? []).filter((unit) => unit.unitType === "room"), [unitsData?.data]);
|
|
40
|
+
const [open, setOpen] = useState(false);
|
|
41
|
+
const [dialogOpen, setDialogOpen] = useState(false);
|
|
42
|
+
const [seatMapOpen, setSeatMapOpen] = useState(false);
|
|
43
|
+
const [editingKind, setEditingKind] = useState(null);
|
|
44
|
+
// The ref of the template being edited, so submit updates that exact
|
|
45
|
+
// (option, kind, refId) row rather than colliding with siblings of the same
|
|
46
|
+
// kind. Null for ref-less templates (the manual "Add" path).
|
|
47
|
+
const [editingRefType, setEditingRefType] = useState(null);
|
|
48
|
+
const [editingRefId, setEditingRefId] = useState(null);
|
|
49
|
+
const [kindValue, setKindValue] = useState("room");
|
|
50
|
+
const [capacityValue, setCapacityValue] = useState(2);
|
|
51
|
+
const [defaultCountValue, setDefaultCountValue] = useState(1);
|
|
52
|
+
const [namePatternValue, setNamePatternValue] = useState("Room {sequence}");
|
|
53
|
+
const [layoutSpec, setLayoutSpec] = useState(null);
|
|
54
|
+
const [error, setError] = useState(null);
|
|
55
|
+
const [applyResult, setApplyResult] = useState(null);
|
|
56
|
+
const derivedSeatCount = useMemo(() => countSeats(layoutSpec), [layoutSpec]);
|
|
57
|
+
const usingSeatMap = kindValue === "vehicle_seat" && layoutSpec !== null;
|
|
58
|
+
function openCreate() {
|
|
59
|
+
setEditingKind(null);
|
|
60
|
+
setEditingRefType(null);
|
|
61
|
+
setEditingRefId(null);
|
|
62
|
+
setKindValue("room");
|
|
63
|
+
setCapacityValue(2);
|
|
64
|
+
setDefaultCountValue(1);
|
|
65
|
+
setNamePatternValue("Room {sequence}");
|
|
66
|
+
setLayoutSpec(null);
|
|
67
|
+
setError(null);
|
|
68
|
+
setDialogOpen(true);
|
|
69
|
+
}
|
|
70
|
+
function openEdit(template) {
|
|
71
|
+
setEditingKind(template.kind);
|
|
72
|
+
setEditingRefType(template.refType);
|
|
73
|
+
setEditingRefId(template.refId);
|
|
74
|
+
setKindValue(template.kind);
|
|
75
|
+
setCapacityValue(template.capacity);
|
|
76
|
+
setDefaultCountValue(template.defaultCount ?? 0);
|
|
77
|
+
setNamePatternValue(template.namePattern);
|
|
78
|
+
setLayoutSpec(extractLayoutSpec(template.flags));
|
|
79
|
+
setError(null);
|
|
80
|
+
setDialogOpen(true);
|
|
81
|
+
}
|
|
82
|
+
async function submit(event) {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
setError(null);
|
|
85
|
+
const trimmedKind = kindValue.trim();
|
|
86
|
+
const trimmedPattern = namePatternValue.trim();
|
|
87
|
+
const effectiveCapacity = usingSeatMap ? derivedSeatCount : capacityValue;
|
|
88
|
+
if (!trimmedKind || !trimmedPattern || effectiveCapacity < 1) {
|
|
89
|
+
setError(t.validation);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const flags = {};
|
|
93
|
+
if (trimmedKind === "vehicle_seat" && layoutSpec) {
|
|
94
|
+
flags.layoutSpec = layoutSpec;
|
|
95
|
+
}
|
|
96
|
+
try {
|
|
97
|
+
await upsert.mutateAsync({
|
|
98
|
+
optionId,
|
|
99
|
+
kind: trimmedKind,
|
|
100
|
+
input: {
|
|
101
|
+
capacity: effectiveCapacity,
|
|
102
|
+
defaultCount: defaultCountValue > 0 ? defaultCountValue : null,
|
|
103
|
+
namePattern: trimmedPattern,
|
|
104
|
+
// Preserve the edited template's ref so the upsert targets its exact
|
|
105
|
+
// (option, kind, refId) row instead of clobbering a sibling.
|
|
106
|
+
refType: editingRefType,
|
|
107
|
+
refId: editingRefId,
|
|
108
|
+
flags,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
setDialogOpen(false);
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
setError(err instanceof Error ? err.message : t.saveFailed);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
async function handleRemove(kind, refId, label) {
|
|
118
|
+
if (!globalThis.confirm?.(formatMessage(t.deleteConfirm, { kind: label })))
|
|
119
|
+
return;
|
|
120
|
+
try {
|
|
121
|
+
await remove.mutateAsync({ optionId, kind, refId });
|
|
122
|
+
}
|
|
123
|
+
catch (err) {
|
|
124
|
+
setError(err instanceof Error ? err.message : t.deleteFailed);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
async function generateFromRooms() {
|
|
128
|
+
setError(null);
|
|
129
|
+
try {
|
|
130
|
+
for (const unit of roomUnits) {
|
|
131
|
+
await upsert.mutateAsync({
|
|
132
|
+
optionId,
|
|
133
|
+
// All room types share kind "room"; they're distinguished — and
|
|
134
|
+
// travelers are constrained to their booked type — by the option_unit
|
|
135
|
+
// ref (allocator's groupUnitMatchScore: refType "option_unit" + refId
|
|
136
|
+
// === bookedOptionUnitId). The widened (option, kind, ref) unique
|
|
137
|
+
// index lets one option carry a "room" template per unit.
|
|
138
|
+
kind: "room",
|
|
139
|
+
input: {
|
|
140
|
+
capacity: unit.occupancyMax ?? unit.occupancyMin ?? 1,
|
|
141
|
+
defaultCount: unit.maxQuantity ?? null,
|
|
142
|
+
// {index} numbers each room type from 1 (Double 1…20), not the
|
|
143
|
+
// global {sequence}, so the shared "room" pool reads cleanly.
|
|
144
|
+
namePattern: `${unit.name} {index}`,
|
|
145
|
+
refType: "option_unit",
|
|
146
|
+
refId: unit.id,
|
|
147
|
+
flags: {},
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
setOpen(true);
|
|
152
|
+
}
|
|
153
|
+
catch (err) {
|
|
154
|
+
setError(err instanceof Error ? err.message : t.saveFailed);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
async function applyToOpenDepartures() {
|
|
158
|
+
if (!globalThis.confirm?.(t.applyToOpenConfirm))
|
|
159
|
+
return;
|
|
160
|
+
setError(null);
|
|
161
|
+
setApplyResult(null);
|
|
162
|
+
try {
|
|
163
|
+
const result = await materializeOpenSlots.mutateAsync({ optionId });
|
|
164
|
+
setApplyResult(result.slots === 0
|
|
165
|
+
? t.applyToOpenEmpty
|
|
166
|
+
: formatMessage(t.applyToOpenResult, {
|
|
167
|
+
created: result.created,
|
|
168
|
+
slots: result.slots,
|
|
169
|
+
}));
|
|
170
|
+
}
|
|
171
|
+
catch (err) {
|
|
172
|
+
setError(err instanceof Error ? err.message : t.applyToOpenFailed);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const matchingCommon = COMMON_KINDS.find((entry) => entry.value === kindValue);
|
|
176
|
+
const isExtendedKind = !matchingCommon && kindValue.trim().length > 0;
|
|
177
|
+
return (_jsxs(Collapsible, { open: open, onOpenChange: setOpen, children: [_jsxs("div", { className: "rounded-md border bg-background/60", children: [_jsxs(CollapsibleTrigger, { className: "flex w-full items-center gap-2 px-3 py-2.5 text-left", children: [_jsx(Bed, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }), _jsx("span", { className: "font-medium text-sm", children: t.title }), _jsx(Badge, { variant: "secondary", className: "font-normal", children: templates.length === 0
|
|
178
|
+
? t.collapsedEmpty
|
|
179
|
+
: formatMessage(t.collapsedSummary, {
|
|
180
|
+
count: templates.length,
|
|
181
|
+
total: totalPerDeparture,
|
|
182
|
+
}) }), _jsx("span", { className: "flex-1" }), open ? (_jsx(ChevronDown, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" })) : (_jsx(ChevronRight, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }))] }), _jsx(CollapsibleContent, { children: _jsxs("div", { className: "flex flex-col gap-3 border-t p-3", children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsx("p", { className: "text-muted-foreground text-xs", children: t.description }), _jsxs("div", { className: "flex shrink-0 flex-wrap items-center justify-end gap-2", children: [templates.length > 0 ? (_jsxs(Button, { size: "sm", variant: "outline", onClick: () => void applyToOpenDepartures(), disabled: materializeOpenSlots.isPending, children: [_jsx(CalendarCheck, { className: "mr-1 size-4", "aria-hidden": "true" }), t.applyToOpenButton] })) : null, roomUnits.length > 0 ? (_jsxs(Button, { size: "sm", variant: "outline", onClick: () => void generateFromRooms(), disabled: upsert.isPending, children: [_jsx(Sparkles, { className: "mr-1 size-4", "aria-hidden": "true" }), t.generateFromRooms] })) : null, _jsxs(Button, { size: "sm", variant: "outline", onClick: openCreate, children: [_jsx(Plus, { className: "mr-1 size-4", "aria-hidden": "true" }), t.addButton] })] })] }), applyResult ? (_jsx("p", { className: "rounded-md bg-muted/50 px-3 py-2 text-muted-foreground text-xs", children: applyResult })) : null, error ? _jsx("p", { className: "text-destructive text-xs", children: error }) : null, isPending ? (_jsx("p", { className: "flex items-center justify-center gap-2 py-4 text-muted-foreground text-sm", children: _jsx(Loader2, { className: "size-3.5 animate-spin" }) })) : isError ? (_jsx("p", { className: "py-4 text-center text-destructive text-sm", children: t.loadFailed })) : templates.length === 0 ? (_jsx("p", { className: "rounded-md border border-dashed px-3 py-4 text-center text-muted-foreground text-xs", children: roomUnits.length > 0 ? t.generateFromRoomsHint : t.emptyMessage })) : (_jsx("ul", { className: "divide-y overflow-hidden rounded-md border", children: templates.map((template) => {
|
|
183
|
+
const kindLabel = t.kinds[template.kind] ?? template.kind;
|
|
184
|
+
// Several "room" templates share a kind but map to different
|
|
185
|
+
// option_units — surface the unit name so the operator can
|
|
186
|
+
// tell Single / Double / Triple rows apart.
|
|
187
|
+
const unit = template.refId
|
|
188
|
+
? roomUnits.find((entry) => entry.id === template.refId)
|
|
189
|
+
: undefined;
|
|
190
|
+
const displayLabel = unit?.name ?? kindLabel;
|
|
191
|
+
return (_jsxs("li", { className: "flex items-center justify-between gap-3 px-3 py-2.5", children: [_jsx("div", { className: "min-w-0 flex-1", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Badge, { variant: "outline", className: "text-[10px]", children: displayLabel }), _jsx("span", { className: "text-sm", children: formatMessage(t.capacitySummary, {
|
|
192
|
+
capacity: template.capacity,
|
|
193
|
+
count: template.defaultCount ?? 0,
|
|
194
|
+
pattern: template.namePattern,
|
|
195
|
+
}) }), template.kind === "vehicle_seat" ? (_jsx(SeatMapSummaryBadge, { flags: template.flags, messages: t })) : null] }) }), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Button, { size: "sm", variant: "ghost", className: "h-7 px-2", onClick: () => openEdit({
|
|
196
|
+
kind: template.kind,
|
|
197
|
+
refType: template.refType,
|
|
198
|
+
refId: template.refId,
|
|
199
|
+
capacity: template.capacity,
|
|
200
|
+
defaultCount: template.defaultCount,
|
|
201
|
+
namePattern: template.namePattern,
|
|
202
|
+
flags: template.flags,
|
|
203
|
+
}), children: _jsx(Pencil, { className: "size-3.5", "aria-hidden": "true" }) }), _jsx(Button, { size: "sm", variant: "ghost", className: "h-7 px-2 text-destructive hover:text-destructive", onClick: () => void handleRemove(template.kind, template.refId, displayLabel), disabled: remove.isPending, children: _jsx(Trash2, { className: "size-3.5", "aria-hidden": "true" }) })] })] }, template.id));
|
|
204
|
+
}) }))] }) })] }), _jsx(Dialog, { open: dialogOpen, onOpenChange: setDialogOpen, children: _jsxs(DialogContent, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: editingKind ? formatMessage(t.editTitle, { kind: editingKind }) : t.newTitle }) }), _jsxs("form", { onSubmit: submit, children: [_jsxs(DialogBody, { className: "grid gap-4", children: [_jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { htmlFor: "resource-template-kind", children: t.kindLabel }), _jsxs(Select, { value: isExtendedKind ? "__custom__" : kindValue, onValueChange: (value) => {
|
|
205
|
+
if (!value || value === "__custom__") {
|
|
206
|
+
setKindValue("");
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
setKindValue(value);
|
|
210
|
+
const found = COMMON_KINDS.find((entry) => entry.value === value);
|
|
211
|
+
if (found && namePatternValue === "Room {sequence}") {
|
|
212
|
+
setNamePatternValue(found.defaultPattern);
|
|
213
|
+
}
|
|
214
|
+
}, disabled: editingKind !== null, children: [_jsx(SelectTrigger, { id: "resource-template-kind", className: "w-full", children: _jsx(SelectValue, { placeholder: t.kindPlaceholder }) }), _jsxs(SelectContent, { children: [COMMON_KINDS.map((entry) => (_jsx(SelectItem, { value: entry.value, children: t.kinds[entry.value] }, entry.value))), _jsx(SelectItem, { value: "__custom__", children: t.kindCustomOption })] })] }), isExtendedKind || editingKind ? (_jsx(Input, { value: kindValue, onChange: (event) => setKindValue(event.target.value), placeholder: t.kindCustomInputPlaceholder, disabled: editingKind !== null })) : null] }), kindValue === "vehicle_seat" ? (_jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { children: t.seatMapLabel }), layoutSpec ? (_jsxs("div", { className: "flex items-center gap-2 rounded-md border p-3", children: [_jsx(Armchair, { className: "size-4 text-muted-foreground", "aria-hidden": "true" }), _jsx("div", { className: "min-w-0 flex-1 text-sm", children: formatMessage(t.seatMapSummary, {
|
|
215
|
+
rows: layoutSpec.rows.length,
|
|
216
|
+
count: derivedSeatCount,
|
|
217
|
+
}) }), _jsxs(Button, { type: "button", size: "sm", variant: "ghost", onClick: () => setSeatMapOpen(true), children: [_jsx(Pencil, { className: "mr-1 size-3.5", "aria-hidden": "true" }), t.seatMapEditButton] })] })) : (_jsxs("div", { className: "flex flex-col gap-2 rounded-md border border-dashed p-3 text-sm", children: [_jsx("p", { className: "text-muted-foreground", children: t.seatMapEmpty }), _jsxs(Button, { type: "button", size: "sm", variant: "outline", onClick: () => setSeatMapOpen(true), children: [_jsx(Armchair, { className: "mr-1 size-3.5", "aria-hidden": "true" }), t.seatMapEditButton] })] }))] })) : null, _jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { htmlFor: "resource-template-capacity", children: t.capacityLabel }), _jsx(Input, { id: "resource-template-capacity", type: "number", min: 1, value: usingSeatMap ? derivedSeatCount : capacityValue, onChange: (event) => setCapacityValue(Number(event.target.value) || 1), disabled: usingSeatMap }), usingSeatMap ? (_jsx("p", { className: "text-muted-foreground text-xs", children: formatMessage(t.capacityDerivedHint, { count: derivedSeatCount }) })) : null] }), _jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { htmlFor: "resource-template-count", children: t.defaultCountLabel }), _jsx(Input, { id: "resource-template-count", type: "number", min: 0, value: defaultCountValue, onChange: (event) => setDefaultCountValue(Number(event.target.value) || 0) }), _jsx("p", { className: "text-muted-foreground text-xs", children: t.defaultCountHint })] }), _jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { htmlFor: "resource-template-pattern", children: t.namePatternLabel }), _jsx(Input, { id: "resource-template-pattern", value: namePatternValue, onChange: (event) => setNamePatternValue(event.target.value), placeholder: t.namePatternPlaceholder }), _jsx("p", { className: "text-muted-foreground text-xs", children: (() => {
|
|
218
|
+
const [before, after] = t.namePatternHint.split("{placeholder}");
|
|
219
|
+
return (_jsxs(_Fragment, { children: [before, _jsx("code", { children: "{sequence}" }), after] }));
|
|
220
|
+
})() })] }), error ? _jsx("p", { className: "text-destructive text-xs", children: error }) : null] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "ghost", onClick: () => setDialogOpen(false), children: t.cancel }), _jsxs(Button, { type: "submit", disabled: upsert.isPending, children: [upsert.isPending ? (_jsx(Loader2, { className: "mr-1 size-3.5 animate-spin", "aria-hidden": "true" })) : null, editingKind ? t.save : t.createButton] })] })] })] }) }), _jsx(Dialog, { open: seatMapOpen, onOpenChange: setSeatMapOpen, children: _jsxs(DialogContent, { className: "max-w-3xl", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: t.seatMapDialogTitle }) }), _jsx(DialogBody, { children: _jsx(SeatMapBuilder, { value: layoutSpec, onChange: setLayoutSpec }) }), _jsx(DialogFooter, { children: _jsx(Button, { type: "button", onClick: () => setSeatMapOpen(false), children: t.seatMapDialogDone }) })] }) })] }));
|
|
221
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Param-taking page for the `availability-rule-detail` contribution: reads
|
|
4
|
+
* the rule id off {@link AdminRoutePageProps} and binds it onto the packaged
|
|
5
|
+
* host. Resolved lazily through the contribution's `page` loader so the
|
|
6
|
+
* detail page lands in its own chunk.
|
|
7
|
+
*/
|
|
8
|
+
export default function AvailabilityRuleDetailRoutePage({ params }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=availability-rule-detail-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability-rule-detail-page.d.ts","sourceRoot":"","sources":["../../../../src/availability/admin/pages/availability-rule-detail-page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAI/D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,+BAA+B,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAEtF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AvailabilityRuleDetailHost } from "../rule-detail-host.js";
|
|
3
|
+
/**
|
|
4
|
+
* Param-taking page for the `availability-rule-detail` contribution: reads
|
|
5
|
+
* the rule id off {@link AdminRoutePageProps} and binds it onto the packaged
|
|
6
|
+
* host. Resolved lazily through the contribution's `page` loader so the
|
|
7
|
+
* detail page lands in its own chunk.
|
|
8
|
+
*/
|
|
9
|
+
export default function AvailabilityRuleDetailRoutePage({ params }) {
|
|
10
|
+
return _jsx(AvailabilityRuleDetailHost, { ruleId: params.id ?? "" });
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Param-taking page for the `availability-slot-detail` contribution: reads
|
|
4
|
+
* the slot id off {@link AdminRoutePageProps} and binds it onto the packaged
|
|
5
|
+
* host. Resolved lazily through the contribution's `page` loader so the
|
|
6
|
+
* detail page lands in its own chunk.
|
|
7
|
+
*/
|
|
8
|
+
export default function AvailabilitySlotDetailRoutePage({ params }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=availability-slot-detail-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability-slot-detail-page.d.ts","sourceRoot":"","sources":["../../../../src/availability/admin/pages/availability-slot-detail-page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAI/D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,+BAA+B,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAEtF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AvailabilitySlotDetailHost } from "../slot-detail-host.js";
|
|
3
|
+
/**
|
|
4
|
+
* Param-taking page for the `availability-slot-detail` contribution: reads
|
|
5
|
+
* the slot id off {@link AdminRoutePageProps} and binds it onto the packaged
|
|
6
|
+
* host. Resolved lazily through the contribution's `page` loader so the
|
|
7
|
+
* detail page lands in its own chunk.
|
|
8
|
+
*/
|
|
9
|
+
export default function AvailabilitySlotDetailRoutePage({ params }) {
|
|
10
|
+
return _jsx(AvailabilitySlotDetailHost, { slotId: params.id ?? "" });
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AdminRoutePageProps } from "@voyant-travel/admin";
|
|
2
|
+
/**
|
|
3
|
+
* Param-taking page for the `availability-start-time-detail` contribution:
|
|
4
|
+
* reads the start time id off {@link AdminRoutePageProps} and binds it onto
|
|
5
|
+
* the packaged host. Resolved lazily through the contribution's `page`
|
|
6
|
+
* loader so the detail page lands in its own chunk.
|
|
7
|
+
*/
|
|
8
|
+
export default function AvailabilityStartTimeDetailRoutePage({ params }: AdminRoutePageProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=availability-start-time-detail-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability-start-time-detail-page.d.ts","sourceRoot":"","sources":["../../../../src/availability/admin/pages/availability-start-time-detail-page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAI/D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,oCAAoC,CAAC,EAAE,MAAM,EAAE,EAAE,mBAAmB,2CAE3F"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AvailabilityStartTimeDetailHost } from "../start-time-detail-host.js";
|
|
3
|
+
/**
|
|
4
|
+
* Param-taking page for the `availability-start-time-detail` contribution:
|
|
5
|
+
* reads the start time id off {@link AdminRoutePageProps} and binds it onto
|
|
6
|
+
* the packaged host. Resolved lazily through the contribution's `page`
|
|
7
|
+
* loader so the detail page lands in its own chunk.
|
|
8
|
+
*/
|
|
9
|
+
export default function AvailabilityStartTimeDetailRoutePage({ params }) {
|
|
10
|
+
return _jsx(AvailabilityStartTimeDetailHost, { startTimeId: params.id ?? "" });
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface AvailabilityRuleDetailHostProps {
|
|
2
|
+
/** The availability rule id (route param, bound by the host route file). */
|
|
3
|
+
ruleId: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Packaged admin host for the availability rule detail page (packaged-admin
|
|
7
|
+
* RFC Phase 3). Data wiring runs through the shared availability provider
|
|
8
|
+
* context; breadcrumbs through the admin chrome; cross-route links through
|
|
9
|
+
* the semantic destinations `availabilitySlot.list`, `availabilitySlot.detail`
|
|
10
|
+
* and `product.detail` (RFC §4.7). The SSR prefetch loader stays in the host
|
|
11
|
+
* route file with the app's cookie-forwarding fetcher.
|
|
12
|
+
*/
|
|
13
|
+
export declare function AvailabilityRuleDetailHost({ ruleId }: AvailabilityRuleDetailHostProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=rule-detail-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-detail-host.d.ts","sourceRoot":"","sources":["../../../src/availability/admin/rule-detail-host.tsx"],"names":[],"mappings":"AAeA,MAAM,WAAW,+BAA+B;IAC9C,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,MAAM,EAAE,EAAE,+BAA+B,2CAsBrF"}
|