@myrjfa/ui 0.3.1
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 +19 -0
- package/dist/chat/ChatMain.d.ts +12 -0
- package/dist/chat/ChatMain.d.ts.map +1 -0
- package/dist/chat/ChatMain.js +390 -0
- package/dist/chat/ChatSidebar.d.ts +15 -0
- package/dist/chat/ChatSidebar.d.ts.map +1 -0
- package/dist/chat/ChatSidebar.js +32 -0
- package/dist/chat/ConversationList.d.ts +20 -0
- package/dist/chat/ConversationList.d.ts.map +1 -0
- package/dist/chat/ConversationList.js +95 -0
- package/dist/chat/EventPanel.d.ts +11 -0
- package/dist/chat/EventPanel.d.ts.map +1 -0
- package/dist/chat/EventPanel.js +76 -0
- package/dist/chat/ExpensePanel.d.ts +14 -0
- package/dist/chat/ExpensePanel.d.ts.map +1 -0
- package/dist/chat/ExpensePanel.js +282 -0
- package/dist/chat/MessageBubble.d.ts +29 -0
- package/dist/chat/MessageBubble.d.ts.map +1 -0
- package/dist/chat/MessageBubble.js +425 -0
- package/dist/chat/MessageInput.d.ts +34 -0
- package/dist/chat/MessageInput.d.ts.map +1 -0
- package/dist/chat/MessageInput.js +330 -0
- package/dist/chat/MilestonePanel.d.ts +14 -0
- package/dist/chat/MilestonePanel.d.ts.map +1 -0
- package/dist/chat/MilestonePanel.js +209 -0
- package/dist/chat/components/ParticipantSelector.d.ts +11 -0
- package/dist/chat/components/ParticipantSelector.d.ts.map +1 -0
- package/dist/chat/components/ParticipantSelector.js +26 -0
- package/dist/chat/components/SplitInputs.d.ts +12 -0
- package/dist/chat/components/SplitInputs.d.ts.map +1 -0
- package/dist/chat/components/SplitInputs.js +84 -0
- package/dist/chat/components/SplitTypeSelector.d.ts +8 -0
- package/dist/chat/components/SplitTypeSelector.d.ts.map +1 -0
- package/dist/chat/components/SplitTypeSelector.js +13 -0
- package/dist/chat/dialogs/AddMemberDialog.d.ts +15 -0
- package/dist/chat/dialogs/AddMemberDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/AddMemberDialog.js +43 -0
- package/dist/chat/dialogs/CameraDialog.d.ts +8 -0
- package/dist/chat/dialogs/CameraDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/CameraDialog.js +81 -0
- package/dist/chat/dialogs/ChatInfoDialog.d.ts +10 -0
- package/dist/chat/dialogs/ChatInfoDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/ChatInfoDialog.js +75 -0
- package/dist/chat/dialogs/ConversationSearchDialog.d.ts +8 -0
- package/dist/chat/dialogs/ConversationSearchDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/ConversationSearchDialog.js +53 -0
- package/dist/chat/dialogs/CreateEventDialog.d.ts +22 -0
- package/dist/chat/dialogs/CreateEventDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/CreateEventDialog.js +51 -0
- package/dist/chat/dialogs/CreatePollDialog.d.ts +8 -0
- package/dist/chat/dialogs/CreatePollDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/CreatePollDialog.js +38 -0
- package/dist/chat/dialogs/EditPollDialog.d.ts +14 -0
- package/dist/chat/dialogs/EditPollDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/EditPollDialog.js +33 -0
- package/dist/chat/dialogs/ExpenseAnalyticsDialog.d.ts +20 -0
- package/dist/chat/dialogs/ExpenseAnalyticsDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/ExpenseAnalyticsDialog.js +58 -0
- package/dist/chat/dialogs/GroupInfoDialog.d.ts +10 -0
- package/dist/chat/dialogs/GroupInfoDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/GroupInfoDialog.js +81 -0
- package/dist/chat/dialogs/GroupInfoViewDialog.d.ts +9 -0
- package/dist/chat/dialogs/GroupInfoViewDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/GroupInfoViewDialog.js +15 -0
- package/dist/chat/dialogs/HostWorkspaceDialog.d.ts +9 -0
- package/dist/chat/dialogs/HostWorkspaceDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/HostWorkspaceDialog.js +90 -0
- package/dist/chat/dialogs/MediaComposerDialog.d.ts +9 -0
- package/dist/chat/dialogs/MediaComposerDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/MediaComposerDialog.js +41 -0
- package/dist/chat/dialogs/NewChatDialog.d.ts +2 -0
- package/dist/chat/dialogs/NewChatDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/NewChatDialog.js +48 -0
- package/dist/chat/dialogs/NewGroupDialog.d.ts +2 -0
- package/dist/chat/dialogs/NewGroupDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/NewGroupDialog.js +44 -0
- package/dist/chat/dialogs/ParticipantsDialog.d.ts +12 -0
- package/dist/chat/dialogs/ParticipantsDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/ParticipantsDialog.js +134 -0
- package/dist/chat/dialogs/PayAndSplitDialog.d.ts +12 -0
- package/dist/chat/dialogs/PayAndSplitDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/PayAndSplitDialog.js +124 -0
- package/dist/chat/dialogs/PaymentProfileDialog.d.ts +5 -0
- package/dist/chat/dialogs/PaymentProfileDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/PaymentProfileDialog.js +45 -0
- package/dist/chat/dialogs/PollVotersDialog.d.ts +10 -0
- package/dist/chat/dialogs/PollVotersDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/PollVotersDialog.js +11 -0
- package/dist/chat/dialogs/ShareLocationDialog.d.ts +8 -0
- package/dist/chat/dialogs/ShareLocationDialog.d.ts.map +1 -0
- package/dist/chat/dialogs/ShareLocationDialog.js +47 -0
- package/dist/chat/index.d.ts +8 -0
- package/dist/chat/index.d.ts.map +1 -0
- package/dist/chat/index.js +7 -0
- package/dist/components/CityAutocomplete.d.ts +5 -0
- package/dist/components/CityAutocomplete.d.ts.map +1 -0
- package/dist/components/CityAutocomplete.js +112 -0
- package/dist/components/CreateListingDropdown.d.ts +5 -0
- package/dist/components/CreateListingDropdown.d.ts.map +1 -0
- package/dist/components/CreateListingDropdown.js +21 -0
- package/dist/components/DestinationAutocomplete.d.ts +11 -0
- package/dist/components/DestinationAutocomplete.d.ts.map +1 -0
- package/dist/components/DestinationAutocomplete.js +24 -0
- package/dist/components/StateAutocomplete.d.ts +10 -0
- package/dist/components/StateAutocomplete.d.ts.map +1 -0
- package/dist/components/StateAutocomplete.js +34 -0
- package/dist/components/admin/AdminBookingRegistrationsList.d.ts +5 -0
- package/dist/components/admin/AdminBookingRegistrationsList.d.ts.map +1 -0
- package/dist/components/admin/AdminBookingRegistrationsList.js +69 -0
- package/dist/components/admin/AdminListingActionsWrapper.d.ts +9 -0
- package/dist/components/admin/AdminListingActionsWrapper.d.ts.map +1 -0
- package/dist/components/admin/AdminListingActionsWrapper.js +200 -0
- package/dist/components/ads/ActivateAdPlacementButton.d.ts +6 -0
- package/dist/components/ads/ActivateAdPlacementButton.d.ts.map +1 -0
- package/dist/components/ads/ActivateAdPlacementButton.js +27 -0
- package/dist/components/ads/AdOfferCard.d.ts +6 -0
- package/dist/components/ads/AdOfferCard.d.ts.map +1 -0
- package/dist/components/ads/AdOfferCard.js +15 -0
- package/dist/components/adventure/AdventureAvailabilityPlanner.d.ts +17 -0
- package/dist/components/adventure/AdventureAvailabilityPlanner.d.ts.map +1 -0
- package/dist/components/adventure/AdventureAvailabilityPlanner.js +106 -0
- package/dist/components/adventure/AdventureQueryCard.d.ts +5 -0
- package/dist/components/adventure/AdventureQueryCard.d.ts.map +1 -0
- package/dist/components/adventure/AdventureQueryCard.js +65 -0
- package/dist/components/adventure/AdventureSlotBuilder.d.ts +41 -0
- package/dist/components/adventure/AdventureSlotBuilder.d.ts.map +1 -0
- package/dist/components/adventure/AdventureSlotBuilder.js +146 -0
- package/dist/components/booking/booking-form.d.ts +39 -0
- package/dist/components/booking/booking-form.d.ts.map +1 -0
- package/dist/components/booking/booking-form.js +847 -0
- package/dist/components/brand/BrandPageView.d.ts +8 -0
- package/dist/components/brand/BrandPageView.d.ts.map +1 -0
- package/dist/components/brand/BrandPageView.js +97 -0
- package/dist/components/companion/AnonymousChat.d.ts +22 -0
- package/dist/components/companion/AnonymousChat.d.ts.map +1 -0
- package/dist/components/companion/AnonymousChat.js +24 -0
- package/dist/components/companion/SwipeCard.d.ts +25 -0
- package/dist/components/companion/SwipeCard.d.ts.map +1 -0
- package/dist/components/companion/SwipeCard.js +58 -0
- package/dist/components/create-flow/ConfirmDiscardDialog.d.ts +11 -0
- package/dist/components/create-flow/ConfirmDiscardDialog.d.ts.map +1 -0
- package/dist/components/create-flow/ConfirmDiscardDialog.js +14 -0
- package/dist/components/create-flow/EntityEditLoadingState.d.ts +2 -0
- package/dist/components/create-flow/EntityEditLoadingState.d.ts.map +1 -0
- package/dist/components/create-flow/EntityEditLoadingState.js +6 -0
- package/dist/components/create-flow/EntityFormCompletionState.d.ts +12 -0
- package/dist/components/create-flow/EntityFormCompletionState.d.ts.map +1 -0
- package/dist/components/create-flow/EntityFormCompletionState.js +10 -0
- package/dist/components/create-flow/EntityFormHeader.d.ts +9 -0
- package/dist/components/create-flow/EntityFormHeader.d.ts.map +1 -0
- package/dist/components/create-flow/EntityFormHeader.js +7 -0
- package/dist/components/create-flow/EntityFormPageFrame.d.ts +10 -0
- package/dist/components/create-flow/EntityFormPageFrame.d.ts.map +1 -0
- package/dist/components/create-flow/EntityFormPageFrame.js +10 -0
- package/dist/components/create-flow/ImageUploader.d.ts +30 -0
- package/dist/components/create-flow/ImageUploader.d.ts.map +1 -0
- package/dist/components/create-flow/ImageUploader.js +193 -0
- package/dist/components/create-flow/MultiStepWizard.d.ts +25 -0
- package/dist/components/create-flow/MultiStepWizard.d.ts.map +1 -0
- package/dist/components/create-flow/MultiStepWizard.js +31 -0
- package/dist/components/create-flow/ReviewConfirmationCard.d.ts +8 -0
- package/dist/components/create-flow/ReviewConfirmationCard.d.ts.map +1 -0
- package/dist/components/create-flow/ReviewConfirmationCard.js +5 -0
- package/dist/components/create-flow/ReviewMetricGrid.d.ts +15 -0
- package/dist/components/create-flow/ReviewMetricGrid.d.ts.map +1 -0
- package/dist/components/create-flow/ReviewMetricGrid.js +8 -0
- package/dist/components/create-flow/TemplateSelectionDialog.d.ts +17 -0
- package/dist/components/create-flow/TemplateSelectionDialog.d.ts.map +1 -0
- package/dist/components/create-flow/TemplateSelectionDialog.js +7 -0
- package/dist/components/discounts/OffersAndCouponsSheet.d.ts +13 -0
- package/dist/components/discounts/OffersAndCouponsSheet.d.ts.map +1 -0
- package/dist/components/discounts/OffersAndCouponsSheet.js +81 -0
- package/dist/components/enquiry/EnquiryFormParts.d.ts +40 -0
- package/dist/components/enquiry/EnquiryFormParts.d.ts.map +1 -0
- package/dist/components/enquiry/EnquiryFormParts.js +29 -0
- package/dist/components/form-sections/FaqSection.d.ts +24 -0
- package/dist/components/form-sections/FaqSection.d.ts.map +1 -0
- package/dist/components/form-sections/FaqSection.js +17 -0
- package/dist/components/form-sections/OpportunityBasicsSection.d.ts +8 -0
- package/dist/components/form-sections/OpportunityBasicsSection.d.ts.map +1 -0
- package/dist/components/form-sections/OpportunityBasicsSection.js +26 -0
- package/dist/components/form-sections/OpportunityDetailsSection.d.ts +18 -0
- package/dist/components/form-sections/OpportunityDetailsSection.d.ts.map +1 -0
- package/dist/components/form-sections/OpportunityDetailsSection.js +10 -0
- package/dist/components/form-sections/OpportunityTypeSection.d.ts +7 -0
- package/dist/components/form-sections/OpportunityTypeSection.d.ts.map +1 -0
- package/dist/components/form-sections/OpportunityTypeSection.js +15 -0
- package/dist/components/form-sections/PackageDetailsSection.d.ts +22 -0
- package/dist/components/form-sections/PackageDetailsSection.d.ts.map +1 -0
- package/dist/components/form-sections/PackageDetailsSection.js +20 -0
- package/dist/components/form-sections/PackageItinerarySection.d.ts +21 -0
- package/dist/components/form-sections/PackageItinerarySection.d.ts.map +1 -0
- package/dist/components/form-sections/PackageItinerarySection.js +112 -0
- package/dist/components/form-sections/PackagePricingSection.d.ts +8 -0
- package/dist/components/form-sections/PackagePricingSection.d.ts.map +1 -0
- package/dist/components/form-sections/PackagePricingSection.js +11 -0
- package/dist/components/form-sections/PackageReviewSection.d.ts +12 -0
- package/dist/components/form-sections/PackageReviewSection.d.ts.map +1 -0
- package/dist/components/form-sections/PackageReviewSection.js +26 -0
- package/dist/components/form-sections/RentalBasicsSection.d.ts +12 -0
- package/dist/components/form-sections/RentalBasicsSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalBasicsSection.js +91 -0
- package/dist/components/form-sections/RentalCapacitySection.d.ts +9 -0
- package/dist/components/form-sections/RentalCapacitySection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalCapacitySection.js +23 -0
- package/dist/components/form-sections/RentalLocationSection.d.ts +10 -0
- package/dist/components/form-sections/RentalLocationSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalLocationSection.js +41 -0
- package/dist/components/form-sections/RentalReviewSection.d.ts +10 -0
- package/dist/components/form-sections/RentalReviewSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalReviewSection.js +27 -0
- package/dist/components/form-sections/RentalRulesSection.d.ts +7 -0
- package/dist/components/form-sections/RentalRulesSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalRulesSection.js +10 -0
- package/dist/components/form-sections/RentalSpecsSection.d.ts +7 -0
- package/dist/components/form-sections/RentalSpecsSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalSpecsSection.js +10 -0
- package/dist/components/host-dashboard/HostCalendar.d.ts +8 -0
- package/dist/components/host-dashboard/HostCalendar.d.ts.map +1 -0
- package/dist/components/host-dashboard/HostCalendar.js +43 -0
- package/dist/components/host-dashboard/HostCalendarGrid.d.ts +34 -0
- package/dist/components/host-dashboard/HostCalendarGrid.d.ts.map +1 -0
- package/dist/components/host-dashboard/HostCalendarGrid.js +30 -0
- package/dist/components/host-dashboard/HostListingMultiSelect.d.ts +12 -0
- package/dist/components/host-dashboard/HostListingMultiSelect.d.ts.map +1 -0
- package/dist/components/host-dashboard/HostListingMultiSelect.js +24 -0
- package/dist/components/host-dashboard/HostManageCalendarShell.d.ts +17 -0
- package/dist/components/host-dashboard/HostManageCalendarShell.d.ts.map +1 -0
- package/dist/components/host-dashboard/HostManageCalendarShell.js +5 -0
- package/dist/components/host-dashboard/HostSidebarNavigation.d.ts +2 -0
- package/dist/components/host-dashboard/HostSidebarNavigation.d.ts.map +1 -0
- package/dist/components/host-dashboard/HostSidebarNavigation.js +299 -0
- package/dist/components/host-dashboard/ManageFeatureSwitcher.d.ts +15 -0
- package/dist/components/host-dashboard/ManageFeatureSwitcher.d.ts.map +1 -0
- package/dist/components/host-dashboard/ManageFeatureSwitcher.js +43 -0
- package/dist/components/host-dashboard/PageHeader.d.ts +14 -0
- package/dist/components/host-dashboard/PageHeader.d.ts.map +1 -0
- package/dist/components/host-dashboard/PageHeader.js +8 -0
- package/dist/components/host-dashboard/PlaceholderPage.d.ts +4 -0
- package/dist/components/host-dashboard/PlaceholderPage.d.ts.map +1 -0
- package/dist/components/host-dashboard/PlaceholderPage.js +9 -0
- package/dist/components/host-dashboard/StatCard.d.ts +15 -0
- package/dist/components/host-dashboard/StatCard.d.ts.map +1 -0
- package/dist/components/host-dashboard/StatCard.js +38 -0
- package/dist/components/layout/AppProviders.d.ts +5 -0
- package/dist/components/layout/AppProviders.d.ts.map +1 -0
- package/dist/components/layout/AppProviders.js +11 -0
- package/dist/components/layout/PublicRouteLayout.d.ts +5 -0
- package/dist/components/layout/PublicRouteLayout.d.ts.map +1 -0
- package/dist/components/layout/PublicRouteLayout.js +5 -0
- package/dist/components/layout/PublicShell.d.ts +5 -0
- package/dist/components/layout/PublicShell.d.ts.map +1 -0
- package/dist/components/layout/PublicShell.js +5 -0
- package/dist/components/location/LocationPicker.d.ts +27 -0
- package/dist/components/location/LocationPicker.d.ts.map +1 -0
- package/dist/components/location/LocationPicker.js +415 -0
- package/dist/components/location/LocationPreview.d.ts +11 -0
- package/dist/components/location/LocationPreview.d.ts.map +1 -0
- package/dist/components/location/LocationPreview.js +12 -0
- package/dist/components/location/MapPicker.d.ts +9 -0
- package/dist/components/location/MapPicker.d.ts.map +1 -0
- package/dist/components/location/MapPicker.js +40 -0
- package/dist/components/location/MapPreview.d.ts +8 -0
- package/dist/components/location/MapPreview.d.ts.map +1 -0
- package/dist/components/location/MapPreview.js +17 -0
- package/dist/components/location/PlaceLinkInline.d.ts +14 -0
- package/dist/components/location/PlaceLinkInline.d.ts.map +1 -0
- package/dist/components/location/PlaceLinkInline.js +30 -0
- package/dist/components/location/leafletMap.d.ts +8 -0
- package/dist/components/location/leafletMap.d.ts.map +1 -0
- package/dist/components/location/leafletMap.js +74 -0
- package/dist/components/ui/GuestOrLoginDialog.d.ts +11 -0
- package/dist/components/ui/GuestOrLoginDialog.d.ts.map +1 -0
- package/dist/components/ui/GuestOrLoginDialog.js +19 -0
- package/dist/components/ui/ImageGalleryViewer.d.ts +10 -0
- package/dist/components/ui/ImageGalleryViewer.d.ts.map +1 -0
- package/dist/components/ui/ImageGalleryViewer.js +59 -0
- package/dist/components/ui/LocationInput.d.ts +12 -0
- package/dist/components/ui/LocationInput.d.ts.map +1 -0
- package/dist/components/ui/LocationInput.js +39 -0
- package/dist/components/ui/PropertyGalleryClient.d.ts +8 -0
- package/dist/components/ui/PropertyGalleryClient.d.ts.map +1 -0
- package/dist/components/ui/PropertyGalleryClient.js +22 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +75 -0
- package/dist/components/ui/dashboard/admin-adventures-table.d.ts +12 -0
- package/dist/components/ui/dashboard/admin-adventures-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/admin-adventures-table.js +94 -0
- package/dist/components/ui/dashboard/admin-blogs-table.d.ts +11 -0
- package/dist/components/ui/dashboard/admin-blogs-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/admin-blogs-table.js +58 -0
- package/dist/components/ui/dashboard/admin-opportunities-table.d.ts +20 -0
- package/dist/components/ui/dashboard/admin-opportunities-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/admin-opportunities-table.js +139 -0
- package/dist/components/ui/dashboard/admin-rentals-table.d.ts +12 -0
- package/dist/components/ui/dashboard/admin-rentals-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/admin-rentals-table.js +85 -0
- package/dist/components/ui/dashboard/admin-travel-package-table.d.ts +16 -0
- package/dist/components/ui/dashboard/admin-travel-package-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/admin-travel-package-table.js +103 -0
- package/dist/components/ui/dashboard/adventures-table.d.ts +16 -0
- package/dist/components/ui/dashboard/adventures-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/adventures-table.js +151 -0
- package/dist/components/ui/dashboard/approver-applications-table.d.ts +13 -0
- package/dist/components/ui/dashboard/approver-applications-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/approver-applications-table.js +85 -0
- package/dist/components/ui/dashboard/approver-package-enquiries-table.d.ts +11 -0
- package/dist/components/ui/dashboard/approver-package-enquiries-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/approver-package-enquiries-table.js +102 -0
- package/dist/components/ui/dashboard/archive-confirm-modal.d.ts +9 -0
- package/dist/components/ui/dashboard/archive-confirm-modal.d.ts.map +1 -0
- package/dist/components/ui/dashboard/archive-confirm-modal.js +6 -0
- package/dist/components/ui/dashboard/blogs-table.d.ts +10 -0
- package/dist/components/ui/dashboard/blogs-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/blogs-table.js +62 -0
- package/dist/components/ui/dashboard/bookings-table.d.ts +13 -0
- package/dist/components/ui/dashboard/bookings-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/bookings-table.js +165 -0
- package/dist/components/ui/dashboard/dashboard-page-shell.d.ts +7 -0
- package/dist/components/ui/dashboard/dashboard-page-shell.d.ts.map +1 -0
- package/dist/components/ui/dashboard/dashboard-page-shell.js +5 -0
- package/dist/components/ui/dashboard/data-table-shell.d.ts +18 -0
- package/dist/components/ui/dashboard/data-table-shell.d.ts.map +1 -0
- package/dist/components/ui/dashboard/data-table-shell.js +6 -0
- package/dist/components/ui/dashboard/delete-confirm-modal.d.ts +9 -0
- package/dist/components/ui/dashboard/delete-confirm-modal.d.ts.map +1 -0
- package/dist/components/ui/dashboard/delete-confirm-modal.js +6 -0
- package/dist/components/ui/dashboard/entity-list-page-state.d.ts +25 -0
- package/dist/components/ui/dashboard/entity-list-page-state.d.ts.map +1 -0
- package/dist/components/ui/dashboard/entity-list-page-state.js +17 -0
- package/dist/components/ui/dashboard/generic-entity-table.d.ts +36 -0
- package/dist/components/ui/dashboard/generic-entity-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/generic-entity-table.js +203 -0
- package/dist/components/ui/dashboard/opportunities-table.d.ts +17 -0
- package/dist/components/ui/dashboard/opportunities-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/opportunities-table.js +143 -0
- package/dist/components/ui/dashboard/rentals-table.d.ts +17 -0
- package/dist/components/ui/dashboard/rentals-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/rentals-table.js +155 -0
- package/dist/components/ui/dashboard/restore-confirm-modal.d.ts +9 -0
- package/dist/components/ui/dashboard/restore-confirm-modal.d.ts.map +1 -0
- package/dist/components/ui/dashboard/restore-confirm-modal.js +6 -0
- package/dist/components/ui/dashboard/stats-card.d.ts +6 -0
- package/dist/components/ui/dashboard/stats-card.d.ts.map +1 -0
- package/dist/components/ui/dashboard/stats-card.js +5 -0
- package/dist/components/ui/dashboard/travel-packages-table.d.ts +16 -0
- package/dist/components/ui/dashboard/travel-packages-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/travel-packages-table.js +134 -0
- package/dist/components/ui/dashboard/user-applications-table.d.ts +12 -0
- package/dist/components/ui/dashboard/user-applications-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/user-applications-table.js +79 -0
- package/dist/components/ui/loading-skeleton.d.ts +10 -0
- package/dist/components/ui/loading-skeleton.d.ts.map +1 -0
- package/dist/components/ui/loading-skeleton.js +49 -0
- package/dist/components/ui/misc/IosPwaNavBar.d.ts +8 -0
- package/dist/components/ui/misc/IosPwaNavBar.d.ts.map +1 -0
- package/dist/components/ui/misc/IosPwaNavBar.js +25 -0
- package/dist/components/ui/misc/document-upload-button.d.ts +10 -0
- package/dist/components/ui/misc/document-upload-button.d.ts.map +1 -0
- package/dist/components/ui/misc/document-upload-button.js +12 -0
- package/dist/components/ui/misc/empty-state.d.ts +9 -0
- package/dist/components/ui/misc/empty-state.d.ts.map +1 -0
- package/dist/components/ui/misc/empty-state.js +4 -0
- package/dist/components/ui/misc/image-cropper.d.ts +9 -0
- package/dist/components/ui/misc/image-cropper.d.ts.map +1 -0
- package/dist/components/ui/misc/image-cropper.js +28 -0
- package/dist/components/ui/misc/pwa-install-button.d.ts +2 -0
- package/dist/components/ui/misc/pwa-install-button.d.ts.map +1 -0
- package/dist/components/ui/misc/pwa-install-button.js +17 -0
- package/dist/components/ui/misc/rental-tile.d.ts +6 -0
- package/dist/components/ui/misc/rental-tile.d.ts.map +1 -0
- package/dist/components/ui/misc/rental-tile.js +56 -0
- package/dist/components/ui/misc/skeleton-extras.d.ts +32 -0
- package/dist/components/ui/misc/skeleton-extras.d.ts.map +1 -0
- package/dist/components/ui/misc/skeleton-extras.js +58 -0
- package/dist/components/ui/misc/tile.d.ts +4 -0
- package/dist/components/ui/misc/tile.d.ts.map +1 -0
- package/dist/components/ui/misc/tile.js +45 -0
- package/dist/components/ui/misc/whatsapp-help.d.ts +7 -0
- package/dist/components/ui/misc/whatsapp-help.d.ts.map +1 -0
- package/dist/components/ui/misc/whatsapp-help.js +6 -0
- package/dist/components/ui/motion.d.ts +14 -0
- package/dist/components/ui/motion.d.ts.map +1 -0
- package/dist/components/ui/motion.js +17 -0
- package/dist/components/ui/trippeaze/breadcrumb-trail.d.ts +10 -0
- package/dist/components/ui/trippeaze/breadcrumb-trail.d.ts.map +1 -0
- package/dist/components/ui/trippeaze/breadcrumb-trail.js +15 -0
- package/dist/components/ui/trippeaze/chip-tabs.d.ts +13 -0
- package/dist/components/ui/trippeaze/chip-tabs.d.ts.map +1 -0
- package/dist/components/ui/trippeaze/chip-tabs.js +6 -0
- package/dist/components/ui/trippeaze/page-shell.d.ts +22 -0
- package/dist/components/ui/trippeaze/page-shell.d.ts.map +1 -0
- package/dist/components/ui/trippeaze/page-shell.js +15 -0
- package/dist/components/ui/trippeaze/search-input.d.ts +5 -0
- package/dist/components/ui/trippeaze/search-input.d.ts.map +1 -0
- package/dist/components/ui/trippeaze/search-input.js +7 -0
- package/dist/components/user-dashboard/UserDashboardShellSidebar.d.ts +2 -0
- package/dist/components/user-dashboard/UserDashboardShellSidebar.d.ts.map +1 -0
- package/dist/components/user-dashboard/UserDashboardShellSidebar.js +17 -0
- package/dist/components/user-dashboard/UserSidebarNav.d.ts +2 -0
- package/dist/components/user-dashboard/UserSidebarNav.d.ts.map +1 -0
- package/dist/components/user-dashboard/UserSidebarNav.js +68 -0
- package/dist/dashboard/action-buttons.d.ts +17 -0
- package/dist/dashboard/action-buttons.d.ts.map +1 -0
- package/dist/dashboard/action-buttons.js +22 -0
- package/dist/dashboard/app-sidebar.d.ts +3 -0
- package/dist/dashboard/app-sidebar.d.ts.map +1 -0
- package/dist/dashboard/app-sidebar.js +61 -0
- package/dist/dashboard/card-header.d.ts +11 -0
- package/dist/dashboard/card-header.d.ts.map +1 -0
- package/dist/dashboard/card-header.js +7 -0
- package/dist/dashboard/dashboard-components.d.ts +13 -0
- package/dist/dashboard/dashboard-components.d.ts.map +1 -0
- package/dist/dashboard/dashboard-components.js +10 -0
- package/dist/dashboard/data-table.d.ts +24 -0
- package/dist/dashboard/data-table.d.ts.map +1 -0
- package/dist/dashboard/data-table.js +88 -0
- package/dist/dashboard/nav-main.d.ts +9 -0
- package/dist/dashboard/nav-main.d.ts.map +1 -0
- package/dist/dashboard/nav-main.js +9 -0
- package/dist/dashboard/nav-secondary.d.ts +10 -0
- package/dist/dashboard/nav-secondary.d.ts.map +1 -0
- package/dist/dashboard/nav-secondary.js +6 -0
- package/dist/dashboard/stats-card.d.ts +6 -0
- package/dist/dashboard/stats-card.d.ts.map +1 -0
- package/dist/dashboard/stats-card.js +5 -0
- package/dist/dashboard/table.d.ts +11 -0
- package/dist/dashboard/table.d.ts.map +1 -0
- package/dist/dashboard/table.js +21 -0
- package/dist/header/mobile-nav-item.d.ts +9 -0
- package/dist/header/mobile-nav-item.d.ts.map +1 -0
- package/dist/header/mobile-nav-item.js +6 -0
- package/dist/header/mobile-navbar.d.ts +5 -0
- package/dist/header/mobile-navbar.d.ts.map +1 -0
- package/dist/header/mobile-navbar.js +30 -0
- package/dist/header/nav-item.d.ts +10 -0
- package/dist/header/nav-item.d.ts.map +1 -0
- package/dist/header/nav-item.js +6 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +85 -0
- package/dist/layout/AppProviders.d.ts +5 -0
- package/dist/layout/AppProviders.d.ts.map +1 -0
- package/dist/layout/AppProviders.js +11 -0
- package/dist/layout/PublicShell.d.ts +5 -0
- package/dist/layout/PublicShell.d.ts.map +1 -0
- package/dist/layout/PublicShell.js +5 -0
- package/dist/main/footer.d.ts +6 -0
- package/dist/main/footer.d.ts.map +1 -0
- package/dist/main/footer.js +58 -0
- package/dist/main/navbar.d.ts +6 -0
- package/dist/main/navbar.d.ts.map +1 -0
- package/dist/main/navbar.js +130 -0
- package/dist/main/paginationBar.d.ts +5 -0
- package/dist/main/paginationBar.d.ts.map +1 -0
- package/dist/main/paginationBar.js +28 -0
- package/dist/main/portfolio/portfolioItem.d.ts +7 -0
- package/dist/main/portfolio/portfolioItem.d.ts.map +1 -0
- package/dist/main/portfolio/portfolioItem.js +7 -0
- package/dist/main/portfolio/portfolioPopup.d.ts +8 -0
- package/dist/main/portfolio/portfolioPopup.d.ts.map +1 -0
- package/dist/main/portfolio/portfolioPopup.js +71 -0
- package/dist/main/review-page.d.ts +14 -0
- package/dist/main/review-page.d.ts.map +1 -0
- package/dist/main/review-page.js +209 -0
- package/dist/misc/IosPwaNavBar.d.ts +8 -0
- package/dist/misc/IosPwaNavBar.d.ts.map +1 -0
- package/dist/misc/IosPwaNavBar.js +25 -0
- package/dist/misc/accordion.d.ts +7 -0
- package/dist/misc/accordion.d.ts.map +1 -0
- package/dist/misc/accordion.js +18 -0
- package/dist/misc/alert-dialog.d.ts +14 -0
- package/dist/misc/alert-dialog.d.ts.map +1 -0
- package/dist/misc/alert-dialog.js +39 -0
- package/dist/misc/alert.d.ts +9 -0
- package/dist/misc/alert.d.ts.map +1 -0
- package/dist/misc/alert.js +24 -0
- package/dist/misc/alertdialogclaude.d.ts +15 -0
- package/dist/misc/alertdialogclaude.d.ts.map +1 -0
- package/dist/misc/alertdialogclaude.js +151 -0
- package/dist/misc/avatar.d.ts +6 -0
- package/dist/misc/avatar.d.ts.map +1 -0
- package/dist/misc/avatar.js +14 -0
- package/dist/misc/badge.d.ts +9 -0
- package/dist/misc/badge.d.ts.map +1 -0
- package/dist/misc/badge.js +22 -0
- package/dist/misc/button.d.ts +13 -0
- package/dist/misc/button.d.ts.map +1 -0
- package/dist/misc/button.js +59 -0
- package/dist/misc/card.d.ts +9 -0
- package/dist/misc/card.d.ts.map +1 -0
- package/dist/misc/card.js +21 -0
- package/dist/misc/carousel.d.ts +20 -0
- package/dist/misc/carousel.d.ts.map +1 -0
- package/dist/misc/carousel.js +99 -0
- package/dist/misc/checkbox.d.ts +4 -0
- package/dist/misc/checkbox.d.ts.map +1 -0
- package/dist/misc/checkbox.js +9 -0
- package/dist/misc/command.d.ts +18 -0
- package/dist/misc/command.d.ts.map +1 -0
- package/dist/misc/command.js +34 -0
- package/dist/misc/datepicker.d.ts +15 -0
- package/dist/misc/datepicker.d.ts.map +1 -0
- package/dist/misc/datepicker.js +221 -0
- package/dist/misc/dialog.d.ts +13 -0
- package/dist/misc/dialog.d.ts.map +1 -0
- package/dist/misc/dialog.js +36 -0
- package/dist/misc/discount-strategy-editor.d.ts +22 -0
- package/dist/misc/discount-strategy-editor.d.ts.map +1 -0
- package/dist/misc/discount-strategy-editor.js +61 -0
- package/dist/misc/document-upload-button.d.ts +12 -0
- package/dist/misc/document-upload-button.d.ts.map +1 -0
- package/dist/misc/document-upload-button.js +27 -0
- package/dist/misc/dropdown-menu.d.ts +25 -0
- package/dist/misc/dropdown-menu.d.ts.map +1 -0
- package/dist/misc/dropdown-menu.js +51 -0
- package/dist/misc/empty-state.d.ts +10 -0
- package/dist/misc/empty-state.d.ts.map +1 -0
- package/dist/misc/empty-state.js +5 -0
- package/dist/misc/faq.d.ts +5 -0
- package/dist/misc/faq.d.ts.map +1 -0
- package/dist/misc/faq.js +5 -0
- package/dist/misc/file-preview.d.ts +9 -0
- package/dist/misc/file-preview.d.ts.map +1 -0
- package/dist/misc/file-preview.js +76 -0
- package/dist/misc/filter.d.ts +12 -0
- package/dist/misc/filter.d.ts.map +1 -0
- package/dist/misc/filter.js +44 -0
- package/dist/misc/filterBar.d.ts +39 -0
- package/dist/misc/filterBar.d.ts.map +1 -0
- package/dist/misc/filterBar.js +384 -0
- package/dist/misc/form.d.ts +25 -0
- package/dist/misc/form.d.ts.map +1 -0
- package/dist/misc/form.js +60 -0
- package/dist/misc/image-compressor.d.ts +29 -0
- package/dist/misc/image-compressor.d.ts.map +1 -0
- package/dist/misc/image-compressor.js +70 -0
- package/dist/misc/image-cropper.d.ts +10 -0
- package/dist/misc/image-cropper.d.ts.map +1 -0
- package/dist/misc/image-cropper.js +44 -0
- package/dist/misc/input.d.ts +7 -0
- package/dist/misc/input.d.ts.map +1 -0
- package/dist/misc/input.js +11 -0
- package/dist/misc/label.d.ts +4 -0
- package/dist/misc/label.d.ts.map +1 -0
- package/dist/misc/label.js +8 -0
- package/dist/misc/line-carousel.d.ts +9 -0
- package/dist/misc/line-carousel.d.ts.map +1 -0
- package/dist/misc/line-carousel.js +5 -0
- package/dist/misc/listing-wishlist-button.d.ts +13 -0
- package/dist/misc/listing-wishlist-button.d.ts.map +1 -0
- package/dist/misc/listing-wishlist-button.js +42 -0
- package/dist/misc/location/leafletMap.d.ts +8 -0
- package/dist/misc/location/leafletMap.d.ts.map +1 -0
- package/dist/misc/location/leafletMap.js +62 -0
- package/dist/misc/location/locationPicker.d.ts +5 -0
- package/dist/misc/location/locationPicker.d.ts.map +1 -0
- package/dist/misc/location/locationPicker.js +95 -0
- package/dist/misc/location-autocomplete.d.ts +28 -0
- package/dist/misc/location-autocomplete.d.ts.map +1 -0
- package/dist/misc/location-autocomplete.js +121 -0
- package/dist/misc/newsLetter.d.ts +3 -0
- package/dist/misc/newsLetter.d.ts.map +1 -0
- package/dist/misc/newsLetter.js +41 -0
- package/dist/misc/non-modal-multi-select.d.ts +21 -0
- package/dist/misc/non-modal-multi-select.d.ts.map +1 -0
- package/dist/misc/non-modal-multi-select.js +25 -0
- package/dist/misc/non-modal-select.d.ts +22 -0
- package/dist/misc/non-modal-select.d.ts.map +1 -0
- package/dist/misc/non-modal-select.js +23 -0
- package/dist/misc/notification.d.ts +7 -0
- package/dist/misc/notification.d.ts.map +1 -0
- package/dist/misc/notification.js +157 -0
- package/dist/misc/pagination.d.ts +15 -0
- package/dist/misc/pagination.d.ts.map +1 -0
- package/dist/misc/pagination.js +30 -0
- package/dist/misc/password-eye.d.ts +7 -0
- package/dist/misc/password-eye.d.ts.map +1 -0
- package/dist/misc/password-eye.js +7 -0
- package/dist/misc/popover.d.ts +7 -0
- package/dist/misc/popover.d.ts.map +1 -0
- package/dist/misc/popover.js +17 -0
- package/dist/misc/pricing-strategy-editor.d.ts +17 -0
- package/dist/misc/pricing-strategy-editor.d.ts.map +1 -0
- package/dist/misc/pricing-strategy-editor.js +80 -0
- package/dist/misc/progress.d.ts +4 -0
- package/dist/misc/progress.d.ts.map +1 -0
- package/dist/misc/progress.js +8 -0
- package/dist/misc/pwa-install-button.d.ts +9 -0
- package/dist/misc/pwa-install-button.d.ts.map +1 -0
- package/dist/misc/pwa-install-button.js +160 -0
- package/dist/misc/rental-tile.d.ts +6 -0
- package/dist/misc/rental-tile.d.ts.map +1 -0
- package/dist/misc/rental-tile.js +33 -0
- package/dist/misc/scroll-area.d.ts +5 -0
- package/dist/misc/scroll-area.d.ts.map +1 -0
- package/dist/misc/scroll-area.js +13 -0
- package/dist/misc/searchBar.d.ts +6 -0
- package/dist/misc/searchBar.d.ts.map +1 -0
- package/dist/misc/searchBar.js +89 -0
- package/dist/misc/searchBox.d.ts +13 -0
- package/dist/misc/searchBox.d.ts.map +1 -0
- package/dist/misc/searchBox.js +63 -0
- package/dist/misc/select.d.ts +13 -0
- package/dist/misc/select.d.ts.map +1 -0
- package/dist/misc/select.js +38 -0
- package/dist/misc/separator.d.ts +4 -0
- package/dist/misc/separator.d.ts.map +1 -0
- package/dist/misc/separator.js +8 -0
- package/dist/misc/share.d.ts +5 -0
- package/dist/misc/share.d.ts.map +1 -0
- package/dist/misc/share.js +157 -0
- package/dist/misc/sheet.d.ts +13 -0
- package/dist/misc/sheet.d.ts.map +1 -0
- package/dist/misc/sheet.js +40 -0
- package/dist/misc/sidebar.d.ts +70 -0
- package/dist/misc/sidebar.d.ts.map +1 -0
- package/dist/misc/sidebar.js +212 -0
- package/dist/misc/skeleton.d.ts +38 -0
- package/dist/misc/skeleton.d.ts.map +1 -0
- package/dist/misc/skeleton.js +43 -0
- package/dist/misc/slider.d.ts +5 -0
- package/dist/misc/slider.d.ts.map +1 -0
- package/dist/misc/slider.js +11 -0
- package/dist/misc/starRating.d.ts +4 -0
- package/dist/misc/starRating.d.ts.map +1 -0
- package/dist/misc/starRating.js +11 -0
- package/dist/misc/stateCard.d.ts +7 -0
- package/dist/misc/stateCard.d.ts.map +1 -0
- package/dist/misc/stateCard.js +21 -0
- package/dist/misc/step-progress.d.ts +16 -0
- package/dist/misc/step-progress.d.ts.map +1 -0
- package/dist/misc/step-progress.js +40 -0
- package/dist/misc/switch.d.ts +5 -0
- package/dist/misc/switch.d.ts.map +1 -0
- package/dist/misc/switch.js +8 -0
- package/dist/misc/tabs.d.ts +8 -0
- package/dist/misc/tabs.d.ts.map +1 -0
- package/dist/misc/tabs.js +17 -0
- package/dist/misc/tag-filter-input.d.ts +16 -0
- package/dist/misc/tag-filter-input.d.ts.map +1 -0
- package/dist/misc/tag-filter-input.js +26 -0
- package/dist/misc/textarea.d.ts +4 -0
- package/dist/misc/textarea.d.ts.map +1 -0
- package/dist/misc/textarea.js +6 -0
- package/dist/misc/tile.d.ts +4 -0
- package/dist/misc/tile.d.ts.map +1 -0
- package/dist/misc/tile.js +45 -0
- package/dist/misc/time-select.d.ts +14 -0
- package/dist/misc/time-select.d.ts.map +1 -0
- package/dist/misc/time-select.js +13 -0
- package/dist/misc/tooltip.d.ts +8 -0
- package/dist/misc/tooltip.d.ts.map +1 -0
- package/dist/misc/tooltip.js +17 -0
- package/dist/misc/whatsapp-help.d.ts +9 -0
- package/dist/misc/whatsapp-help.d.ts.map +1 -0
- package/dist/misc/whatsapp-help.js +13 -0
- package/dist/misc/wizard-footer.d.ts +18 -0
- package/dist/misc/wizard-footer.d.ts.map +1 -0
- package/dist/misc/wizard-footer.js +11 -0
- package/dist/profile/socialLink.d.ts +10 -0
- package/dist/profile/socialLink.d.ts.map +1 -0
- package/dist/profile/socialLink.js +66 -0
- package/dist/utils/permissions.d.ts +7 -0
- package/dist/utils/permissions.d.ts.map +1 -0
- package/dist/utils/permissions.js +38 -0
- package/package.json +93 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
5
|
+
import { XIcon } from "lucide-react";
|
|
6
|
+
function Dialog({ ...props }) {
|
|
7
|
+
return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
8
|
+
}
|
|
9
|
+
function DialogTrigger({ ...props }) {
|
|
10
|
+
return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
11
|
+
}
|
|
12
|
+
function DialogPortal({ ...props }) {
|
|
13
|
+
return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
14
|
+
}
|
|
15
|
+
function DialogClose({ ...props }) {
|
|
16
|
+
return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
|
|
17
|
+
}
|
|
18
|
+
function DialogOverlay({ className, ...props }) {
|
|
19
|
+
return (_jsx(DialogPrimitive.Overlay, { "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[1000] bg-black/80", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function DialogContent({ className, children, ...props }) {
|
|
22
|
+
return (_jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-[1001] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: "Close" })] })] })] }));
|
|
23
|
+
}
|
|
24
|
+
function DialogHeader({ className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
function DialogFooter({ className, ...props }) {
|
|
28
|
+
return (_jsx("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
29
|
+
}
|
|
30
|
+
function DialogTitle({ className, ...props }) {
|
|
31
|
+
return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn("text-lg leading-none font-semibold", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
function DialogDescription({ className, ...props }) {
|
|
34
|
+
return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type DiscountStrategy } from "@myrjfa/state/dist/lib/models/discount";
|
|
2
|
+
type Props = {
|
|
3
|
+
strategies: DiscountStrategy[];
|
|
4
|
+
onStrategiesChange: (strategies: DiscountStrategy[]) => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
cardClassName?: string;
|
|
7
|
+
isAdmin?: boolean;
|
|
8
|
+
targetOptions?: {
|
|
9
|
+
hosts: Array<{
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
listings: Array<{
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
featureType: string;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default function DiscountStrategyEditor({ strategies, onStrategiesChange, title, cardClassName, isAdmin, targetOptions }: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export { DiscountStrategyEditor };
|
|
22
|
+
//# sourceMappingURL=discount-strategy-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discount-strategy-editor.d.ts","sourceRoot":"","sources":["../../src/misc/discount-strategy-editor.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAoD,KAAK,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAUjI,KAAK,KAAK,GAAG;IACX,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,kBAAkB,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE;QACd,KAAK,EAAE,KAAK,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAC5C,QAAQ,EAAE,KAAK,CAAC;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACrE,CAAC;CACH,CAAC;AAgCF,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAE,UAAU,EAAE,kBAAkB,EAAE,KAAmB,EAAE,aAAa,EAAE,OAAe,EAAE,aAAa,EAAE,EAAE,KAAK,2CAwE3J;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Plus, Trash2 } from "lucide-react";
|
|
4
|
+
import { createEmptyDiscountStrategy } from "@myrjfa/state/dist/lib/models/discount";
|
|
5
|
+
import { Button } from "./button";
|
|
6
|
+
import { Card, CardContent, CardHeader, CardTitle } from "./card";
|
|
7
|
+
import { DatePicker } from "./datepicker";
|
|
8
|
+
import { Input } from "./input";
|
|
9
|
+
import { Label } from "./label";
|
|
10
|
+
import { NonModalSelect } from "./non-modal-select";
|
|
11
|
+
import { NonModalMultiSelect } from "./non-modal-multi-select";
|
|
12
|
+
import { Textarea } from "./textarea";
|
|
13
|
+
const TYPES = [
|
|
14
|
+
["duration", "Long duration"], ["early_booking", "Early booking"], ["last_minute", "Last minute"],
|
|
15
|
+
["scheduled", "Scheduled promotion"], ["recurring", "Recurring window"], ["group", "Group"],
|
|
16
|
+
["quantity", "Quantity"], ["coupon", "Coupon code"], ["first_booking", "First booking"],
|
|
17
|
+
["checkout_recovery", "Checkout recovery"], ["payment_offer", "Payment method"], ["partner", "Partner program"],
|
|
18
|
+
];
|
|
19
|
+
const typeOptions = TYPES.map(([value, label]) => ({ value, label }));
|
|
20
|
+
const originOptions = [
|
|
21
|
+
{ value: "staff_campaign", label: "Staff applied (platform funded)" },
|
|
22
|
+
{ value: "staff_suggestion", label: "Suggest to host" },
|
|
23
|
+
];
|
|
24
|
+
const statusOptions = (origin) => [
|
|
25
|
+
{ value: "draft", label: "Draft" },
|
|
26
|
+
{ value: origin === "staff_suggestion" ? "suggested" : "active", label: origin === "staff_suggestion" ? "Suggested" : "Active" },
|
|
27
|
+
{ value: "paused", label: "Paused" },
|
|
28
|
+
];
|
|
29
|
+
const scopeOptions = (isAdmin) => [
|
|
30
|
+
...(isAdmin ? [{ value: "platform", label: "Platform" }] : []),
|
|
31
|
+
{ value: "host", label: "Specific hosts" },
|
|
32
|
+
{ value: "listing", label: "Specific listings" },
|
|
33
|
+
];
|
|
34
|
+
const featureOptions = [
|
|
35
|
+
{ value: "stay", label: "Stays" }, { value: "rental", label: "Rentals" },
|
|
36
|
+
{ value: "adventure", label: "Adventures" }, { value: "event", label: "Events" },
|
|
37
|
+
{ value: "package", label: "Packages" }, { value: "guide", label: "Guides" },
|
|
38
|
+
{ value: "store", label: "Store products" },
|
|
39
|
+
];
|
|
40
|
+
const csv = (value) => value.split(",").map((item) => item.trim()).filter(Boolean);
|
|
41
|
+
export default function DiscountStrategyEditor({ strategies, onStrategiesChange, title = "Discounts", cardClassName, isAdmin = false, targetOptions }) {
|
|
42
|
+
const update = (index, updater) => onStrategiesChange(strategies.map((strategy, current) => current === index ? updater(strategy) : strategy));
|
|
43
|
+
const add = () => {
|
|
44
|
+
const origin = isAdmin ? "staff_campaign" : "host";
|
|
45
|
+
onStrategiesChange([...strategies, createEmptyDiscountStrategy(origin)]);
|
|
46
|
+
};
|
|
47
|
+
const changePercentage = (index, percentage) => update(index, (strategy) => {
|
|
48
|
+
const next = Math.min(Math.max(percentage || 0, 0), 100);
|
|
49
|
+
const funding = strategy.origin === "staff_campaign"
|
|
50
|
+
? { hostPercentagePoints: 0, platformPercentagePoints: next, partnerPercentagePoints: 0 }
|
|
51
|
+
: strategy.origin === "host"
|
|
52
|
+
? { hostPercentagePoints: next, platformPercentagePoints: 0, partnerPercentagePoints: 0 }
|
|
53
|
+
: strategy.funding;
|
|
54
|
+
return { ...strategy, percentage: next, funding };
|
|
55
|
+
});
|
|
56
|
+
return (_jsxs(Card, { className: cardClassName, children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: title }) }), _jsxs(CardContent, { className: "space-y-6", children: [strategies.map((strategy, index) => {
|
|
57
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
58
|
+
return (_jsxs("div", { className: "space-y-5 rounded-2xl border p-4", children: [_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("h3", { className: "font-semibold", children: strategy.name || `Discount ${index + 1}` }), _jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "text-red-600", onClick: () => onStrategiesChange(strategies.filter((_, current) => current !== index)), children: [_jsx(Trash2, { className: "mr-1 size-4" }), " Remove"] })] }), _jsxs("div", { className: "grid gap-4 md:grid-cols-2 xl:grid-cols-3", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Name" }), _jsx(Input, { value: strategy.name, onChange: (event) => update(index, (item) => ({ ...item, name: event.target.value })), placeholder: "Monsoon offer" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Strategy" }), _jsx(NonModalSelect, { "aria-label": "Discount strategy", value: strategy.strategyType, options: typeOptions, onValueChange: (value) => update(index, (item) => ({ ...item, strategyType: value, conditions: { ...item.conditions, firstBookingOnly: value === "first_booking" }, stacking: { ...item.stacking, group: value === "coupon" ? "coupon" : value === "payment_offer" ? "payment" : value === "partner" ? "partner" : value === "checkout_recovery" ? "recovery" : "automatic" } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Percentage" }), _jsx(Input, { type: "number", min: 0.01, max: 100, value: strategy.percentage, showZeroAsEmpty: true, onChange: (event) => changePercentage(index, Number(event.target.value)) })] }), isAdmin && _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Origin" }), _jsx(NonModalSelect, { "aria-label": "Discount origin", value: strategy.origin, options: originOptions, onValueChange: (value) => update(index, (item) => { const origin = value; const next = createEmptyDiscountStrategy(origin); return { ...item, origin, status: origin === "staff_suggestion" ? "suggested" : item.status, funding: { ...next.funding, ...(origin === "staff_suggestion" ? item.funding : {}) } }; }) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Status" }), _jsx(NonModalSelect, { "aria-label": "Discount status", value: strategy.status, options: statusOptions(strategy.origin), onValueChange: (value) => update(index, (item) => ({ ...item, status: value })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Target scope" }), _jsx(NonModalSelect, { "aria-label": "Discount target scope", value: strategy.targetScope, options: scopeOptions(isAdmin), onValueChange: (value) => update(index, (item) => ({ ...item, targetScope: value, targetIds: value === "platform" ? [] : item.targetIds, targetId: value === "platform" ? null : item.targetId })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Feature types" }), _jsx(NonModalMultiSelect, { "aria-label": "Discount feature types", value: strategy.featureTypes, options: featureOptions, emptyLabel: "All feature types", onValueChange: (featureTypes) => update(index, (item) => { var _a; const selectedFeatures = featureTypes; const selectedListingIds = item.targetScope === "listing" ? (((_a = item.targetIds) === null || _a === void 0 ? void 0 : _a.length) ? item.targetIds : item.targetId ? [item.targetId] : []).filter((id) => ((targetOptions === null || targetOptions === void 0 ? void 0 : targetOptions.listings) || []).some((listing) => listing.id === id && selectedFeatures.includes(listing.featureType))) : item.targetIds; return { ...item, featureTypes: selectedFeatures, targetIds: selectedListingIds || [], targetId: (selectedListingIds === null || selectedListingIds === void 0 ? void 0 : selectedListingIds[0]) || (item.targetScope === "listing" ? null : item.targetId) }; }) })] }), strategy.targetScope === "host" && _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Target hosts" }), _jsx(NonModalMultiSelect, { "aria-label": "Target hosts", value: ((_a = strategy.targetIds) === null || _a === void 0 ? void 0 : _a.length) ? strategy.targetIds : strategy.targetId ? [strategy.targetId] : [], options: ((targetOptions === null || targetOptions === void 0 ? void 0 : targetOptions.hosts) || []).map((host) => ({ value: host.id, label: host.label })), placeholder: "Select hosts", searchable: true, searchPlaceholder: "Search hosts...", onValueChange: (targetIds) => update(index, (item) => ({ ...item, targetIds, targetId: targetIds[0] || null })) })] }), strategy.targetScope === "listing" && _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Target listings" }), _jsx(NonModalMultiSelect, { "aria-label": "Target listings", value: ((_b = strategy.targetIds) === null || _b === void 0 ? void 0 : _b.length) ? strategy.targetIds : strategy.targetId ? [strategy.targetId] : [], options: strategy.featureTypes.length ? ((targetOptions === null || targetOptions === void 0 ? void 0 : targetOptions.listings) || []).filter((listing) => strategy.featureTypes.includes(listing.featureType)).map((listing) => ({ value: listing.id, label: `${listing.label} (${listing.featureType})` })) : [], placeholder: "Select listings", searchable: true, searchPlaceholder: "Search listings...", emptyMessage: strategy.featureTypes.length ? "No matching listings found." : "Select at least one feature type first.", onValueChange: (targetIds) => update(index, (item) => ({ ...item, targetIds, targetId: targetIds[0] || null })) })] }), strategy.strategyType === "coupon" && _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Coupon code" }), _jsx(Input, { value: strategy.couponCode || "", onChange: (event) => update(index, (item) => ({ ...item, couponCode: event.target.value.toUpperCase() })), placeholder: "TRIP10" })] }), strategy.strategyType === "duration" && _jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Minimum units / nights" }), _jsx(Input, { type: "number", min: 1, value: (_c = strategy.conditions.minUnits) !== null && _c !== void 0 ? _c : "", onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, minUnits: Number(event.target.value) || null } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Maximum units / nights" }), _jsx(Input, { type: "number", min: 1, value: (_d = strategy.conditions.maxUnits) !== null && _d !== void 0 ? _d : "", onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, maxUnits: Number(event.target.value) || null } })) })] })] }), strategy.strategyType === "early_booking" && _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Minimum lead days" }), _jsx(Input, { type: "number", min: 0, value: strategy.conditions.bookingLeadMinMinutes ? strategy.conditions.bookingLeadMinMinutes / 1440 : "", onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, bookingLeadMinMinutes: Number(event.target.value) * 1440 || null } })) })] }), strategy.strategyType === "last_minute" && _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Maximum lead hours" }), _jsx(Input, { type: "number", min: 0, value: strategy.conditions.bookingLeadMaxMinutes ? strategy.conditions.bookingLeadMaxMinutes / 60 : "", onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, bookingLeadMaxMinutes: Number(event.target.value) * 60 || null } })) })] }), ["group", "quantity"].includes(strategy.strategyType) && _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Minimum quantity / participants" }), _jsx(Input, { type: "number", min: 1, value: (_f = (_e = strategy.conditions.minQuantity) !== null && _e !== void 0 ? _e : strategy.conditions.minParticipants) !== null && _f !== void 0 ? _f : "", onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, minQuantity: Number(event.target.value) || null, minParticipants: Number(event.target.value) || null } })) })] }), strategy.strategyType === "checkout_recovery" && _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Checkout delay minutes" }), _jsx(Input, { type: "number", min: 1, value: (_g = strategy.conditions.checkoutDelayMinutes) !== null && _g !== void 0 ? _g : "", onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, checkoutDelayMinutes: Number(event.target.value) || null } })) })] }), strategy.strategyType === "recurring" && _jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Weekdays (0 Sun - 6 Sat)" }), _jsx(Input, { value: strategy.conditions.recurringDays.join(", "), onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, recurringDays: csv(event.target.value).map(Number).filter((day) => day >= 0 && day <= 6) } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Start time" }), _jsx(Input, { type: "time", value: strategy.conditions.recurringStartTime || "", onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, recurringStartTime: event.target.value } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "End time" }), _jsx(Input, { type: "time", value: strategy.conditions.recurringEndTime || "", onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, recurringEndTime: event.target.value } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Timezone" }), _jsx(Input, { value: strategy.conditions.timezone || "Asia/Kolkata", onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, timezone: event.target.value } })) })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Minimum subtotal" }), _jsx(Input, { type: "number", min: 0, value: (_h = strategy.conditions.minSubtotal) !== null && _h !== void 0 ? _h : "", onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, minSubtotal: Number(event.target.value) || null } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Booking starts" }), _jsx(DatePicker, { label: "", includeTime: true, field: { value: strategy.conditions.bookingStartsAt ? new Date(strategy.conditions.bookingStartsAt) : null, onChange: (date) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, bookingStartsAt: date.toISOString() } })) }, onClear: () => update(index, (item) => ({ ...item, conditions: { ...item.conditions, bookingStartsAt: null } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Booking ends" }), _jsx(DatePicker, { label: "", includeTime: true, field: { value: strategy.conditions.bookingEndsAt ? new Date(strategy.conditions.bookingEndsAt) : null, onChange: (date) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, bookingEndsAt: date.toISOString() } })) }, onClear: () => update(index, (item) => ({ ...item, conditions: { ...item.conditions, bookingEndsAt: null } })) })] }), strategy.strategyType === "scheduled" && _jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Service starts" }), _jsx(DatePicker, { label: "", includeTime: true, field: { value: strategy.conditions.serviceStartsAt ? new Date(strategy.conditions.serviceStartsAt) : null, onChange: (date) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, serviceStartsAt: date.toISOString() } })) }, onClear: () => update(index, (item) => ({ ...item, conditions: { ...item.conditions, serviceStartsAt: null } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Service ends" }), _jsx(DatePicker, { label: "", includeTime: true, field: { value: strategy.conditions.serviceEndsAt ? new Date(strategy.conditions.serviceEndsAt) : null, onChange: (date) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, serviceEndsAt: date.toISOString() } })) }, onClear: () => update(index, (item) => ({ ...item, conditions: { ...item.conditions, serviceEndsAt: null } })) })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Priority" }), _jsx(Input, { type: "number", value: strategy.stacking.priority, onChange: (event) => update(index, (item) => ({ ...item, stacking: { ...item.stacking, priority: Number(event.target.value) || 0 } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Compatible groups" }), _jsx(Input, { value: strategy.stacking.compatibleGroups.join(", "), onChange: (event) => update(index, (item) => ({ ...item, stacking: { ...item.stacking, compatibleGroups: csv(event.target.value).filter((value) => ["automatic", "coupon", "payment", "partner", "recovery"].includes(value)) } })), placeholder: "coupon, payment" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Total redemptions" }), _jsx(Input, { type: "number", min: 1, value: (_j = strategy.usageLimits.total) !== null && _j !== void 0 ? _j : "", onChange: (event) => update(index, (item) => ({ ...item, usageLimits: { ...item.usageLimits, total: Number(event.target.value) || null } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Per-user redemptions" }), _jsx(Input, { type: "number", min: 1, value: (_k = strategy.usageLimits.perUser) !== null && _k !== void 0 ? _k : "", onChange: (event) => update(index, (item) => ({ ...item, usageLimits: { ...item.usageLimits, perUser: Number(event.target.value) || null } })) })] }), strategy.strategyType === "payment_offer" && _jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Payment methods" }), _jsx(Input, { value: strategy.conditions.paymentMethods.join(", "), onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, paymentMethods: csv(event.target.value) } })), placeholder: "card, netbanking" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Card types" }), _jsx(Input, { value: strategy.conditions.cardTypes.join(", "), onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, cardTypes: csv(event.target.value) } })), placeholder: "credit, debit" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Issuers / banks" }), _jsx(Input, { value: strategy.conditions.issuers.join(", "), onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, issuers: csv(event.target.value) } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Networks" }), _jsx(Input, { value: strategy.conditions.networks.join(", "), onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, networks: csv(event.target.value) } })), placeholder: "visa, mastercard, rupay" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Razorpay offer ID" }), _jsx(Input, { value: strategy.razorpayOfferId || "", onChange: (event) => update(index, (item) => ({ ...item, razorpayOfferId: event.target.value })) })] })] }), strategy.strategyType === "partner" && _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Partner program IDs" }), _jsx(Input, { value: strategy.conditions.partnerProgramIds.join(", "), onChange: (event) => update(index, (item) => ({ ...item, conditions: { ...item.conditions, partnerProgramIds: csv(event.target.value) } })) })] })] }), strategy.origin === "staff_suggestion" && _jsxs("div", { className: "grid gap-4 rounded-xl bg-slate-50 p-3 md:grid-cols-3", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Host points" }), _jsx(Input, { type: "number", min: 0, value: strategy.funding.hostPercentagePoints, onChange: (event) => update(index, (item) => ({ ...item, funding: { ...item.funding, hostPercentagePoints: Number(event.target.value) || 0 } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Platform points" }), _jsx(Input, { type: "number", min: 0, value: strategy.funding.platformPercentagePoints, onChange: (event) => update(index, (item) => ({ ...item, funding: { ...item.funding, platformPercentagePoints: Number(event.target.value) || 0 } })) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Partner points" }), _jsx(Input, { type: "number", min: 0, value: strategy.funding.partnerPercentagePoints, onChange: (event) => update(index, (item) => ({ ...item, funding: { ...item.funding, partnerPercentagePoints: Number(event.target.value) || 0 } })) })] })] }), strategy.origin === "staff_campaign" && strategy.funding.platformPercentagePoints > 0 && _jsx("p", { className: "rounded-xl border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: "Eligibility warning: this platform-funded offer is applied only when its discount amount can be fully covered by the platform fee plus convenience fee for the selected currency, listing, and booking. It will be hidden from customers when that fee pool is insufficient." }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { children: "Description" }), _jsx(Textarea, { value: strategy.description, onChange: (event) => update(index, (item) => ({ ...item, description: event.target.value })) })] })] }, strategy._id || index));
|
|
59
|
+
}), _jsxs(Button, { type: "button", onClick: add, children: [_jsx(Plus, { className: "mr-2 size-4" }), " Add discount strategy"] })] })] }));
|
|
60
|
+
}
|
|
61
|
+
export { DiscountStrategyEditor };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type UploadType = "image" | "document" | "both";
|
|
2
|
+
interface FileUploadProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
type?: UploadType;
|
|
6
|
+
value?: File | null;
|
|
7
|
+
onChange: (file: File | null) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function FileUpload({ label, required, type, value, onChange, className, }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=document-upload-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-upload-button.d.ts","sourceRoot":"","sources":["../../src/misc/document-upload-button.tsx"],"names":[],"mappings":"AAMA,KAAK,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;AAEhD,UAAU,eAAe;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,EACvB,KAAqB,EACrB,QAAQ,EACR,IAAa,EACb,KAAK,EACL,QAAQ,EACR,SAAS,GACZ,EAAE,eAAe,2CAmEjB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
4
|
+
import { FileUp, ImageIcon, FileText } from "lucide-react";
|
|
5
|
+
import { Input } from "./input";
|
|
6
|
+
import { Label } from "./label";
|
|
7
|
+
export function FileUpload({ label = "Upload File", required, type = "both", value, onChange, className, }) {
|
|
8
|
+
const inputRef = useRef(null);
|
|
9
|
+
const acceptMap = {
|
|
10
|
+
image: "image/*",
|
|
11
|
+
document: "application/pdf",
|
|
12
|
+
both: "application/pdf,image/*",
|
|
13
|
+
};
|
|
14
|
+
const helperTextMap = {
|
|
15
|
+
image: "Image only",
|
|
16
|
+
document: "PDF only",
|
|
17
|
+
both: "PDF or image",
|
|
18
|
+
};
|
|
19
|
+
const Icon = type === "image"
|
|
20
|
+
? ImageIcon
|
|
21
|
+
: type === "document"
|
|
22
|
+
? FileText
|
|
23
|
+
: FileUp;
|
|
24
|
+
return (_jsxs("div", { className: cn("w-full", className), children: [_jsxs(Label, { className: "text-sm font-medium", children: [label, " ", required && _jsx("span", { className: "text-destructive", children: "*" }), _jsxs("span", { className: "text-xs text-muted-foreground ml-2", children: ["(", helperTextMap[type], ")"] })] }), _jsxs("div", { onClick: () => { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, className: cn("mt-2 border-2 border-dashed rounded-lg cursor-pointer transition-all", "flex flex-col items-center justify-center text-center", "hover:border-primary/50",
|
|
25
|
+
// 📱 Responsive sizing
|
|
26
|
+
"p-3"), children: [_jsx(Icon, { className: "w-5 h-5 sm:w-6 sm:h-6 text-muted-foreground mb-1" }), value ? (_jsx("p", { className: "text-xs sm:text-sm text-primary font-medium break-all", children: value.name })) : (_jsx("p", { className: "text-xs sm:text-sm text-muted-foreground", children: "Tap or click to upload" })), _jsx(Input, { ref: inputRef, type: "file", accept: acceptMap[type], className: "hidden", onChange: (e) => { var _a, _b; return onChange((_b = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : null); } })] })] }));
|
|
27
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
2
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
8
|
+
inset?: boolean;
|
|
9
|
+
variant?: "default" | "destructive";
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
25
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/misc/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AAKtE,iBAAS,YAAY,CAAC,EACpB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,2CAEzD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,MAAM,CAAC,2CAI3D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,2CAO5D;AAED,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,UAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,2CAc5D;AAED,iBAAS,iBAAiB,CAAC,EACzB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC,2CAI1D;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAK,EACL,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAA;CACpC,2CAaA;AAED,iBAAS,wBAAwB,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,YAAY,CAAC,2CAmBjE;AAED,iBAAS,sBAAsB,CAAC,EAC9B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,2CAO/D;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,SAAS,CAAC,2CAkB9D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC,GAAG;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAYA;AAED,iBAAS,qBAAqB,CAAC,EAC7B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,SAAS,CAAC,2CAQ9D;AAED,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAW9B;AAED,iBAAS,eAAe,CAAC,EACvB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,GAAG,CAAC,2CAExD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,GAAG;IACjE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,2CAeA;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,2CAW/D;AAED,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
5
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
6
|
+
function DropdownMenu({ ...props }) {
|
|
7
|
+
return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
8
|
+
}
|
|
9
|
+
function DropdownMenuPortal({ ...props }) {
|
|
10
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props }));
|
|
11
|
+
}
|
|
12
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
13
|
+
return (_jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props }));
|
|
14
|
+
}
|
|
15
|
+
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
16
|
+
return (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className), ...props }) }));
|
|
17
|
+
}
|
|
18
|
+
function DropdownMenuGroup({ ...props }) {
|
|
19
|
+
return (_jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props }));
|
|
20
|
+
}
|
|
21
|
+
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
22
|
+
return (_jsx(DropdownMenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function DropdownMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
25
|
+
return (_jsxs(DropdownMenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
26
|
+
}
|
|
27
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
28
|
+
return (_jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }));
|
|
29
|
+
}
|
|
30
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
31
|
+
return (_jsxs(DropdownMenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
32
|
+
}
|
|
33
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
34
|
+
return (_jsx(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
37
|
+
return (_jsx(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("bg-border -mx-1 my-1 h-px", className), ...props }));
|
|
38
|
+
}
|
|
39
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
40
|
+
return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className), ...props }));
|
|
41
|
+
}
|
|
42
|
+
function DropdownMenuSub({ ...props }) {
|
|
43
|
+
return _jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
44
|
+
}
|
|
45
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
46
|
+
return (_jsxs(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
|
|
47
|
+
}
|
|
48
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
49
|
+
return (_jsx(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg", className), ...props }));
|
|
50
|
+
}
|
|
51
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface EmptyStateProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function EmptyState({ title, description, icon, action, }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=empty-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/misc/empty-state.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,eAAe;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,UAAU,CAAC,EACvB,KAA0B,EAC1B,WAAW,EACX,IAAI,EACJ,MAAM,GACT,EAAE,eAAe,2CAajB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Inbox } from 'lucide-react';
|
|
3
|
+
export function EmptyState({ title = 'Nothing here yet', description, icon, action, }) {
|
|
4
|
+
return (_jsxs("div", { className: "flex flex-col items-center justify-center py-16 px-4 text-center gap-3", children: [_jsx("div", { className: "text-muted-foreground", children: icon !== null && icon !== void 0 ? icon : _jsx(Inbox, { className: "w-12 h-12 mx-auto mb-2 opacity-40" }) }), _jsx("h3", { className: "text-lg font-semibold text-foreground", children: title }), description && (_jsx("p", { className: "text-sm text-muted-foreground max-w-xs", children: description })), action && _jsx("div", { className: "mt-2", children: action })] }));
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faq.d.ts","sourceRoot":"","sources":["../../src/misc/faq.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAG/D,wBAAgB,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;CAAE,2CAkBjD"}
|
package/dist/misc/faq.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './accordion';
|
|
3
|
+
export function Faq({ faqs }) {
|
|
4
|
+
return (_jsxs("div", { children: [_jsx("h2", { className: "text-2xl font-bold text-center mb-6", children: "Frequently Asked Questions" }), _jsx(Accordion, { type: "multiple", className: "space-y-2", children: faqs.map((faq, index) => (_jsxs(AccordionItem, { value: `item-${index}`, className: "border border-gray-200 rounded-lg last:border-b", children: [_jsx(AccordionTrigger, { className: "text-left px-4 py-3 font-medium", children: faq.question }), _jsx(AccordionContent, { className: "px-4 pb-4 text-sm text-gray-600", children: faq.answer })] }, index))) })] }));
|
|
5
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const DocumentPreviewButton: ({ filepath, label, icon, size, labelInMobile, }: {
|
|
2
|
+
filepath: string | File;
|
|
3
|
+
label?: string;
|
|
4
|
+
icon?: any;
|
|
5
|
+
size?: "icon" | "lg" | "sm" | "default";
|
|
6
|
+
labelInMobile?: boolean;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { DocumentPreviewButton };
|
|
9
|
+
//# sourceMappingURL=file-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-preview.d.ts","sourceRoot":"","sources":["../../src/misc/file-preview.tsx"],"names":[],"mappings":"AAuBA,QAAA,MAAM,qBAAqB,GAAI,iDAM5B;IACC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,4CAsEA,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { FileIcon, ImageIcon, VideoIcon } from 'lucide-react';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { showAlert } from './alertdialogclaude';
|
|
6
|
+
import { Button } from './button';
|
|
7
|
+
const mimeMap = {
|
|
8
|
+
'.pdf': 'application/pdf',
|
|
9
|
+
'.jpg': 'image/jpeg',
|
|
10
|
+
'.jpeg': 'image/jpeg',
|
|
11
|
+
'.png': 'image/png',
|
|
12
|
+
'.gif': 'image/gif',
|
|
13
|
+
'.webp': 'image/webp',
|
|
14
|
+
'.mp4': 'video/mp4',
|
|
15
|
+
'.webm': 'video/webm',
|
|
16
|
+
'.mov': 'video/quicktime',
|
|
17
|
+
// Add more as needed
|
|
18
|
+
};
|
|
19
|
+
const imageTypes = ["jpg", "jpeg", "png", "gif", "webp"];
|
|
20
|
+
const videotypes = ["mp4", "webm"];
|
|
21
|
+
const docTypes = ["pdf"];
|
|
22
|
+
const DocumentPreviewButton = ({ filepath, label, icon, size = 'default', labelInMobile = false, }) => {
|
|
23
|
+
const [loading, setLoading] = useState(false);
|
|
24
|
+
let labelInternal = label;
|
|
25
|
+
let IconInternal = icon || _jsx(FileIcon, { className: "h-8 w-8 text-chart-2" });
|
|
26
|
+
if (typeof filepath === 'string') {
|
|
27
|
+
const ext = filepath.split('.').pop() || "unknown";
|
|
28
|
+
if (imageTypes.includes(ext)) {
|
|
29
|
+
labelInternal = label || "View Image";
|
|
30
|
+
IconInternal = icon || _jsx(ImageIcon, { className: "h-8 w-8 text-chart-2" });
|
|
31
|
+
}
|
|
32
|
+
else if (videotypes.includes(ext)) {
|
|
33
|
+
labelInternal = label || "View Video";
|
|
34
|
+
IconInternal = icon || _jsx(VideoIcon, { className: "h-8 w-8 text-chart-2" });
|
|
35
|
+
}
|
|
36
|
+
else if (docTypes.includes(ext)) {
|
|
37
|
+
labelInternal = label || "View Doc";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const handleOpenFile = async () => {
|
|
41
|
+
try {
|
|
42
|
+
setLoading(true);
|
|
43
|
+
let blob;
|
|
44
|
+
if (typeof filepath === 'string') {
|
|
45
|
+
const response = await fetch(filepath);
|
|
46
|
+
if (!response.ok) {
|
|
47
|
+
await showAlert('Error fetching file');
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const rawBlob = await response.blob();
|
|
51
|
+
console.log('Blob type:', rawBlob.type);
|
|
52
|
+
const matchedExt = Object.keys(mimeMap).find(ext => filepath.toLowerCase().endsWith(ext));
|
|
53
|
+
const type = matchedExt ? mimeMap[matchedExt] : rawBlob.type;
|
|
54
|
+
blob = new Blob([rawBlob], { type: type }); // Force correct type
|
|
55
|
+
}
|
|
56
|
+
else if (filepath instanceof File) {
|
|
57
|
+
blob = new Blob([filepath], { type: 'application/pdf' });
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
await showAlert('Invalid file');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const fileURL = URL.createObjectURL(blob);
|
|
64
|
+
window.open(fileURL, '_blank', 'noopener,noreferrer');
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
console.error('Error opening file:', error);
|
|
68
|
+
await showAlert('Could not open document.');
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
setLoading(false);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return (_jsx("div", { className: "flex flex-col items-center", children: _jsxs(Button, { variant: "outline", size: size, className: "w-full cursor-pointer flex md:flex", onClick: handleOpenFile, disabled: loading, children: [IconInternal, _jsx("span", { className: `${labelInMobile ? "inline" : "hidden"} md:inline`, children: labelInternal })] }) }));
|
|
75
|
+
};
|
|
76
|
+
export { DocumentPreviewButton };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type FilterProps = {
|
|
2
|
+
values: string[];
|
|
3
|
+
label: string;
|
|
4
|
+
formType: string;
|
|
5
|
+
selectedValue: string | null | undefined;
|
|
6
|
+
onChange: (value: string | null) => void;
|
|
7
|
+
others?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const uniqDecoded: (arr: string[]) => string[];
|
|
10
|
+
declare const Filter: React.FC<FilterProps>;
|
|
11
|
+
export { Filter };
|
|
12
|
+
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/misc/filter.tsx"],"names":[],"mappings":"AAsBA,KAAK,WAAW,GAAG;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,OAAO,CAAA;CACnB,CAAC;AACF,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,EAAE,aACwC,CAAC;AAElF,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAqHjC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
4
|
+
import { Check, ChevronDown } from "lucide-react";
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
|
+
import { Button } from "./button";
|
|
7
|
+
import { Command, CommandEmpty, CommandInput, CommandItem, CommandList } from "./command";
|
|
8
|
+
import { Input } from "./input";
|
|
9
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover";
|
|
10
|
+
import { Select, SelectContent, SelectItem, SelectTrigger } from "./select";
|
|
11
|
+
export const uniqDecoded = (arr) => Array.from(new Set(arr.map(v => decodeURIComponent(v.trim().toLowerCase()))));
|
|
12
|
+
const Filter = ({ values, label, formType, selectedValue, onChange, others }) => {
|
|
13
|
+
var _a;
|
|
14
|
+
const [open, setOpen] = useState(false);
|
|
15
|
+
const [popoverWidth, setPopoverWidth] = useState(0);
|
|
16
|
+
const triggerRef = useRef(null);
|
|
17
|
+
const [isCustom, setIsCustom] = useState(false);
|
|
18
|
+
const [customValue, setCustomValue] = useState("");
|
|
19
|
+
const data = uniqDecoded(values);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (triggerRef.current) {
|
|
22
|
+
setPopoverWidth(triggerRef.current.offsetWidth);
|
|
23
|
+
}
|
|
24
|
+
}, [(_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth]);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!open) {
|
|
27
|
+
setIsCustom(false);
|
|
28
|
+
setCustomValue("");
|
|
29
|
+
}
|
|
30
|
+
}, [open]);
|
|
31
|
+
return (_jsx("div", { className: cn("filter-container", label), children: formType === "select" ? (_jsxs(Select, { value: selectedValue !== null && selectedValue !== void 0 ? selectedValue : "", onValueChange: (val) => onChange(val === "clear" ? null : val), children: [_jsx(SelectTrigger, { className: "w-full bg-transparent hover:bg-muted border-none shadow-none", children: !selectedValue || selectedValue === "clear" || selectedValue[0] == '0'
|
|
32
|
+
? `Choose ${label.toLowerCase()}...`
|
|
33
|
+
: selectedValue }), _jsxs(SelectContent, { className: "w-full z-[301]", children: [_jsx(SelectItem, { value: "clear", children: _jsx("em", { children: "Clear" }) }), data.map((option) => (_jsx(SelectItem, { value: option, children: option }, option)))] })] })) : (_jsxs(Popover, { open: open, onOpenChange: setOpen, modal: false, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { ref: triggerRef, variant: "ghost", role: "combobox", className: "filter-box justify-between w-full", children: [selectedValue || `Select ${label.toLowerCase()}...`, _jsx(ChevronDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), _jsxs(PopoverContent, { className: "p-0 z-[310] pointer-events-auto overflow-hidden", style: { width: popoverWidth > 0 ? `${popoverWidth}px` : 'auto' }, align: "start", onWheel: (e) => e.stopPropagation(), children: [_jsxs(Command, { children: [_jsx(CommandInput, { placeholder: `Search ${label.toLowerCase()}...` }), _jsx(CommandEmpty, { children: "No results found." }), _jsx(CommandList, { children: data.map((option) => (_jsxs(CommandItem, { value: option, onSelect: () => {
|
|
34
|
+
onChange(option);
|
|
35
|
+
setOpen(false);
|
|
36
|
+
}, children: [_jsx(Check, { className: cn("mr-2 h-4 w-4", selectedValue === option ? "opacity-100" : "opacity-0") }), option] }, option))) })] }), others &&
|
|
37
|
+
(_jsx("div", { children: isCustom ? (_jsx("div", { className: "border-t px-5 py-2", children: _jsx(Input, { placeholder: `Enter other ${label.toLowerCase()}`, value: customValue, onChange: (e) => setCustomValue(e.target.value), onKeyDown: (e) => {
|
|
38
|
+
if (e.key === "Enter" && customValue.trim()) {
|
|
39
|
+
onChange(customValue.trim());
|
|
40
|
+
setOpen(false);
|
|
41
|
+
}
|
|
42
|
+
}, autoFocus: true }) })) : (_jsx("div", { className: "border-t px-10 py-2 cursor-pointer text-sm hover:bg-muted", onClick: () => setIsCustom(true), children: "Other" })) }))] })] })) }));
|
|
43
|
+
};
|
|
44
|
+
export { Filter };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { TileProps } from "@myrjfa/state/dist/lib/models/tile";
|
|
2
|
+
export interface FilterOptionConfig {
|
|
3
|
+
label: string;
|
|
4
|
+
type: 'autoComplete' | 'select' | 'range' | 'text';
|
|
5
|
+
datatype: 'string[]' | 'number' | 'string' | 'range';
|
|
6
|
+
displayName: string;
|
|
7
|
+
options?: readonly {
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
}[];
|
|
12
|
+
rangeUnit?: string;
|
|
13
|
+
rangeMin?: number;
|
|
14
|
+
rangeMax?: number;
|
|
15
|
+
rangeStep?: number;
|
|
16
|
+
rangeInputType?: 'slider' | 'number';
|
|
17
|
+
defaultValue?: string | number | string[] | {
|
|
18
|
+
min: number;
|
|
19
|
+
max: number;
|
|
20
|
+
};
|
|
21
|
+
deriveFromTiles?: keyof TileProps;
|
|
22
|
+
locationScope?: 'all' | 'city';
|
|
23
|
+
hideActiveBadge?: boolean;
|
|
24
|
+
visibility?: 'bar' | 'expanded';
|
|
25
|
+
showForTypes?: string[];
|
|
26
|
+
groupWith?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface FilterBarProps {
|
|
29
|
+
tiles: TileProps[];
|
|
30
|
+
filterConfig?: FilterOptionConfig[];
|
|
31
|
+
hero?: {
|
|
32
|
+
eyebrow?: string;
|
|
33
|
+
title: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
theme?: 'sand' | 'emerald' | 'sunset' | 'slate' | 'ocean';
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export declare function FilterBar({ tiles, filterConfig, hero }: FilterBarProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
//# sourceMappingURL=filterBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterBar.d.ts","sourceRoot":"","sources":["../../src/misc/filterBar.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAK/D,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IACnD,QAAQ,EAAE,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrD,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,CAAC,EAAE,SAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAE5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAErC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAEzE,eAAe,CAAC,EAAE,MAAM,SAAS,CAAC;IAClC,aAAa,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,UAAU,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC;IAEhC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACpC,IAAI,CAAC,EAAE;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;KAC7D,CAAC;CACL;AAmlBD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,cAAc,2CAMtE"}
|