@myrjfa/ui 2.1.8 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat/ChatMain.d.ts +1 -1
- package/dist/chat/ChatMain.d.ts.map +1 -1
- package/dist/chat/ChatMain.js +3 -3
- package/dist/chat/ChatSidebar.d.ts +1 -1
- package/dist/chat/ChatSidebar.d.ts.map +1 -1
- package/dist/chat/ConversationList.d.ts +1 -1
- package/dist/chat/ConversationList.d.ts.map +1 -1
- package/dist/chat/ConversationList.js +1 -1
- package/dist/chat/ExpensePanel.js +1 -1
- package/dist/chat/MessageBubble.d.ts +1 -1
- package/dist/chat/MessageBubble.d.ts.map +1 -1
- package/dist/chat/MessageInput.js +1 -1
- package/dist/chat/MilestonePanel.js +1 -1
- package/dist/chat/components/SplitInputs.d.ts +1 -1
- package/dist/chat/components/SplitInputs.d.ts.map +1 -1
- package/dist/chat/components/SplitTypeSelector.d.ts +1 -1
- package/dist/chat/components/SplitTypeSelector.d.ts.map +1 -1
- package/dist/chat/dialogs/AddMemberDialog.d.ts +1 -1
- package/dist/chat/dialogs/AddMemberDialog.d.ts.map +1 -1
- package/dist/chat/dialogs/AddMemberDialog.js +1 -1
- package/dist/chat/dialogs/ExpenseAnalyticsDialog.js +1 -1
- package/dist/chat/dialogs/GroupInfoDialog.d.ts +1 -1
- package/dist/chat/dialogs/GroupInfoDialog.d.ts.map +1 -1
- package/dist/chat/dialogs/GroupInfoDialog.js +1 -1
- package/dist/chat/dialogs/GroupInfoViewDialog.d.ts +1 -1
- package/dist/chat/dialogs/GroupInfoViewDialog.d.ts.map +1 -1
- package/dist/chat/dialogs/NewChatDialog.js +2 -2
- package/dist/chat/dialogs/NewGroupDialog.js +2 -2
- package/dist/chat/dialogs/ParticipantsDialog.d.ts +1 -1
- package/dist/chat/dialogs/ParticipantsDialog.d.ts.map +1 -1
- package/dist/chat/dialogs/ParticipantsDialog.js +1 -1
- 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 +824 -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/ImageUploadStep.d.ts +15 -0
- package/dist/components/create-flow/ImageUploadStep.d.ts.map +1 -0
- package/dist/components/create-flow/ImageUploadStep.js +11 -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/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/ImageUploadSection.d.ts +12 -0
- package/dist/components/form-sections/ImageUploadSection.d.ts.map +1 -0
- package/dist/components/form-sections/ImageUploadSection.js +8 -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/RentalPhotosSection.d.ts +8 -0
- package/dist/components/form-sections/RentalPhotosSection.d.ts.map +1 -0
- package/dist/components/form-sections/RentalPhotosSection.js +7 -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 +262 -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 +133 -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 +100 -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 +12 -0
- package/dist/components/ui/dashboard/bookings-table.d.ts.map +1 -0
- package/dist/components/ui/dashboard/bookings-table.js +160 -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/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 +67 -0
- package/dist/dashboard/action-buttons.d.ts +2 -1
- package/dist/dashboard/action-buttons.d.ts.map +1 -1
- package/dist/dashboard/action-buttons.js +18 -11
- package/dist/dashboard/app-sidebar.d.ts.map +1 -1
- package/dist/dashboard/app-sidebar.js +3 -36
- package/dist/dashboard/dashboard-components.js +1 -1
- package/dist/dashboard/data-table.d.ts +5 -1
- package/dist/dashboard/data-table.d.ts.map +1 -1
- package/dist/dashboard/data-table.js +39 -7
- package/dist/dashboard/table.js +1 -1
- package/dist/header/mobile-nav-item.js +2 -2
- package/dist/header/mobile-navbar.d.ts.map +1 -1
- package/dist/header/mobile-navbar.js +10 -1
- package/dist/header/nav-item.js +2 -2
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/main/footer.d.ts +0 -1
- package/dist/main/footer.d.ts.map +1 -1
- package/dist/main/footer.js +0 -1
- package/dist/main/navbar.d.ts +2 -2
- package/dist/main/navbar.d.ts.map +1 -1
- package/dist/main/navbar.js +73 -44
- package/dist/main/portfolio/portfolioItem.d.ts +1 -1
- package/dist/main/portfolio/portfolioItem.d.ts.map +1 -1
- package/dist/main/portfolio/portfolioPopup.d.ts +1 -1
- package/dist/main/portfolio/portfolioPopup.d.ts.map +1 -1
- package/dist/main/review-page.d.ts +2 -1
- package/dist/main/review-page.d.ts.map +1 -1
- package/dist/main/review-page.js +34 -4
- package/dist/misc/accordion.js +1 -1
- package/dist/misc/alert-dialog.js +1 -1
- package/dist/misc/alert.js +1 -1
- package/dist/misc/alertdialogclaude.js +1 -1
- package/dist/misc/avatar.js +1 -1
- package/dist/misc/badge.js +1 -1
- package/dist/misc/button.d.ts +6 -3
- package/dist/misc/button.d.ts.map +1 -1
- package/dist/misc/button.js +33 -5
- package/dist/misc/card.js +1 -1
- package/dist/misc/carousel.d.ts +2 -2
- package/dist/misc/carousel.d.ts.map +1 -1
- package/dist/misc/carousel.js +13 -5
- package/dist/misc/checkbox.js +1 -1
- package/dist/misc/command.js +1 -1
- package/dist/misc/datepicker.d.ts +2 -1
- package/dist/misc/datepicker.d.ts.map +1 -1
- package/dist/misc/datepicker.js +23 -21
- package/dist/misc/dialog.js +3 -3
- package/dist/misc/discount-strategy-editor.d.ts +11 -0
- package/dist/misc/discount-strategy-editor.d.ts.map +1 -0
- package/dist/misc/discount-strategy-editor.js +82 -0
- package/dist/misc/dropdown-menu.js +1 -1
- package/dist/misc/faq.d.ts +1 -1
- package/dist/misc/faq.d.ts.map +1 -1
- package/dist/misc/filter.js +2 -2
- package/dist/misc/filterBar.d.ts +11 -3
- package/dist/misc/filterBar.d.ts.map +1 -1
- package/dist/misc/filterBar.js +109 -55
- package/dist/misc/form.js +1 -1
- package/dist/misc/input.d.ts +4 -1
- package/dist/misc/input.d.ts.map +1 -1
- package/dist/misc/input.js +8 -3
- package/dist/misc/label.js +1 -1
- 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/locationPicker.js +1 -1
- 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/notification.js +2 -2
- package/dist/misc/pagination.js +1 -1
- package/dist/misc/popover.js +1 -1
- 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.js +1 -1
- package/dist/misc/pwa-install-button.d.ts.map +1 -1
- package/dist/misc/pwa-install-button.js +2 -0
- package/dist/misc/rental-tile.d.ts +1 -1
- package/dist/misc/rental-tile.d.ts.map +1 -1
- package/dist/misc/rental-tile.js +24 -14
- package/dist/misc/scroll-area.js +1 -1
- package/dist/misc/select.js +1 -1
- package/dist/misc/separator.js +1 -1
- package/dist/misc/sheet.js +1 -1
- package/dist/misc/sidebar.js +2 -2
- package/dist/misc/slider.js +1 -1
- package/dist/misc/stateCard.d.ts +1 -1
- package/dist/misc/stateCard.d.ts.map +1 -1
- package/dist/misc/stateCard.js +1 -1
- 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.js +1 -1
- package/dist/misc/tabs.js +1 -1
- 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.js +1 -1
- package/dist/misc/tile.d.ts +1 -1
- package/dist/misc/tile.d.ts.map +1 -1
- package/dist/misc/tile.js +12 -47
- 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.js +1 -1
- 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/package.json +9 -6
- package/dist/misc/dashboard/action-buttons.js +0 -31
- package/dist/misc/misc/alertdialogclaude.js +0 -221
- package/dist/misc/misc/button.js +0 -46
- package/dist/misc/misc/dropdown-menu.js +0 -136
package/dist/misc/filterBar.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { retrieveCity, retrieveState
|
|
3
|
+
import { retrieveCity, retrieveState } from "@myrjfa/state/dist/lib/utils";
|
|
4
|
+
import { INDIAN_CITIES } from "@myrjfa/state/dist/lib/models/props";
|
|
4
5
|
import { Search, SearchIcon, SlidersHorizontal, X } from "lucide-react";
|
|
5
6
|
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
|
6
7
|
import { Suspense, useEffect, useState } from "react";
|
|
7
8
|
import { Button } from "./button";
|
|
8
9
|
import { Filter } from "./filter";
|
|
10
|
+
import { Input } from "./input";
|
|
9
11
|
import { Sheet, SheetContent, SheetTitle, SheetTrigger } from "./sheet";
|
|
10
12
|
import { Slider } from "./slider";
|
|
11
13
|
// Default filter options (backward compatible)
|
|
@@ -14,7 +16,18 @@ const defaultFilterOptions = [
|
|
|
14
16
|
{ label: "skill", type: "autoComplete", datatype: "string[]", displayName: "Skills", deriveFromTiles: 'skills', visibility: 'bar' },
|
|
15
17
|
{ label: "rating", type: "select", datatype: "number", displayName: "Rating", visibility: 'expanded' },
|
|
16
18
|
];
|
|
17
|
-
|
|
19
|
+
const INDIAN_CITY_SET = new Set(INDIAN_CITIES.map((city) => city.trim().toLowerCase()));
|
|
20
|
+
function retrieveScopedCity(location) {
|
|
21
|
+
var _a;
|
|
22
|
+
const parts = location.split(",").map((part) => part.trim()).filter(Boolean);
|
|
23
|
+
if (parts.length > 1) {
|
|
24
|
+
const lastPart = ((_a = parts[parts.length - 1]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || "";
|
|
25
|
+
if (INDIAN_CITY_SET.has(lastPart))
|
|
26
|
+
return lastPart;
|
|
27
|
+
}
|
|
28
|
+
return retrieveCity(location);
|
|
29
|
+
}
|
|
30
|
+
function FilterBarComponent({ tiles, filterConfig = defaultFilterOptions, hero }) {
|
|
18
31
|
const searchParams = useSearchParams();
|
|
19
32
|
const pathname = usePathname();
|
|
20
33
|
const router = useRouter();
|
|
@@ -63,7 +76,32 @@ function FilterBarComponent({ tiles, filterConfig = defaultFilterOptions }) {
|
|
|
63
76
|
});
|
|
64
77
|
setFilterParam(newState);
|
|
65
78
|
}, [searchParams, filterConfig]);
|
|
66
|
-
const
|
|
79
|
+
const getFiltersFromSearchParams = () => {
|
|
80
|
+
const state = {};
|
|
81
|
+
filterConfig.forEach(opt => {
|
|
82
|
+
const param = searchParams.get(opt.label);
|
|
83
|
+
if (opt.datatype === 'string[]') {
|
|
84
|
+
state[opt.label] = (param === null || param === void 0 ? void 0 : param.split(',').filter(Boolean)) || opt.defaultValue || [];
|
|
85
|
+
}
|
|
86
|
+
else if (opt.datatype === 'number') {
|
|
87
|
+
state[opt.label] = parseInt(param || "0", 10) || opt.defaultValue || 0;
|
|
88
|
+
}
|
|
89
|
+
else if (opt.datatype === 'range') {
|
|
90
|
+
const minParam = searchParams.get(`${opt.label}Min`);
|
|
91
|
+
const maxParam = searchParams.get(`${opt.label}Max`);
|
|
92
|
+
const defaultRange = opt.defaultValue || { min: 0, max: 100 };
|
|
93
|
+
state[opt.label] = {
|
|
94
|
+
min: minParam ? parseInt(minParam, 10) : defaultRange.min,
|
|
95
|
+
max: maxParam ? parseInt(maxParam, 10) : defaultRange.max
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
state[opt.label] = param || opt.defaultValue || '';
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
return state;
|
|
103
|
+
};
|
|
104
|
+
const changeMultiParams = (params, options) => {
|
|
67
105
|
const newParams = new URLSearchParams(searchParams);
|
|
68
106
|
newParams.set('page', '1');
|
|
69
107
|
Object.entries(params).forEach(([key, value]) => {
|
|
@@ -107,7 +145,12 @@ function FilterBarComponent({ tiles, filterConfig = defaultFilterOptions }) {
|
|
|
107
145
|
return opt.options.map(o => o.label);
|
|
108
146
|
}
|
|
109
147
|
if (opt.deriveFromTiles === 'location') {
|
|
110
|
-
const tileLocations = (tiles !== null && tiles !== void 0 ? tiles : [])
|
|
148
|
+
const tileLocations = (tiles !== null && tiles !== void 0 ? tiles : [])
|
|
149
|
+
.map(tile => opt.locationScope === 'city'
|
|
150
|
+
? retrieveScopedCity((tile === null || tile === void 0 ? void 0 : tile.location) || '')
|
|
151
|
+
: [retrieveState((tile === null || tile === void 0 ? void 0 : tile.location) || ''), retrieveCity((tile === null || tile === void 0 ? void 0 : tile.location) || '')])
|
|
152
|
+
.flat()
|
|
153
|
+
.filter(Boolean);
|
|
111
154
|
return Array.from(new Set([...tileLocations, ...INDIAN_CITIES]));
|
|
112
155
|
}
|
|
113
156
|
if (opt.deriveFromTiles === 'skills') {
|
|
@@ -130,9 +173,9 @@ function FilterBarComponent({ tiles, filterConfig = defaultFilterOptions }) {
|
|
|
130
173
|
// For select with options, convert label to value
|
|
131
174
|
let actualValue = value;
|
|
132
175
|
if (options) {
|
|
133
|
-
const opt = options.find(o => o.label === value);
|
|
176
|
+
const opt = options.find(o => decodeURIComponent(o.label.trim().toLowerCase()) === value);
|
|
134
177
|
if (opt)
|
|
135
|
-
actualValue = opt.value;
|
|
178
|
+
actualValue = decodeURIComponent(opt.value.trim().toLowerCase());
|
|
136
179
|
}
|
|
137
180
|
setFilterParam(prev => {
|
|
138
181
|
const currentValues = prev[label];
|
|
@@ -157,23 +200,8 @@ function FilterBarComponent({ tiles, filterConfig = defaultFilterOptions }) {
|
|
|
157
200
|
};
|
|
158
201
|
});
|
|
159
202
|
};
|
|
160
|
-
const removeFilter = (label, value) => {
|
|
161
|
-
const config = filterConfig.find(f => f.label === label);
|
|
162
|
-
if ((config === null || config === void 0 ? void 0 : config.datatype) === 'range') {
|
|
163
|
-
// Reset range to default
|
|
164
|
-
const defaultRange = config.defaultValue || { min: 0, max: 100 };
|
|
165
|
-
setFilterParam(prev => ({ ...prev, [label]: defaultRange }));
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
setFilterParam(prev => ({
|
|
169
|
-
...prev,
|
|
170
|
-
[label]: Array.isArray(prev[label])
|
|
171
|
-
? prev[label].filter(v => v !== value)
|
|
172
|
-
: prev[label] === value ? 0 : ((config === null || config === void 0 ? void 0 : config.defaultValue) || '')
|
|
173
|
-
}));
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
203
|
const [sheetOpen, setSheetOpen] = useState(false);
|
|
204
|
+
const [isApplying, setIsApplying] = useState(false);
|
|
177
205
|
// Get current opportunity type for conditional filters
|
|
178
206
|
const currentType = filterParam['type'] || 'volunteer';
|
|
179
207
|
// Filter configs based on showForTypes
|
|
@@ -184,9 +212,9 @@ function FilterBarComponent({ tiles, filterConfig = defaultFilterOptions }) {
|
|
|
184
212
|
return opt.showForTypes.includes(currentType);
|
|
185
213
|
});
|
|
186
214
|
};
|
|
187
|
-
const getActiveFilters = () => {
|
|
215
|
+
const getActiveFilters = (state) => {
|
|
188
216
|
const filters = [];
|
|
189
|
-
Object.entries(
|
|
217
|
+
Object.entries(state).forEach(([key, values]) => {
|
|
190
218
|
const opt = filterConfig.find(o => o.label === key);
|
|
191
219
|
if (!opt)
|
|
192
220
|
return;
|
|
@@ -220,7 +248,34 @@ function FilterBarComponent({ tiles, filterConfig = defaultFilterOptions }) {
|
|
|
220
248
|
});
|
|
221
249
|
return filters;
|
|
222
250
|
};
|
|
223
|
-
const
|
|
251
|
+
const appliedFilterState = getFiltersFromSearchParams();
|
|
252
|
+
const activeFilters = getActiveFilters(appliedFilterState);
|
|
253
|
+
const visibleActiveFilters = activeFilters.filter((filter) => {
|
|
254
|
+
const config = filterConfig.find((opt) => opt.label === filter.label);
|
|
255
|
+
return !(config === null || config === void 0 ? void 0 : config.hideActiveBadge);
|
|
256
|
+
});
|
|
257
|
+
const hasActiveFilters = activeFilters.length > 0;
|
|
258
|
+
const themeStyles = {
|
|
259
|
+
sand: "border-[#e8dccb] bg-[linear-gradient(135deg,#f7efe3_0%,#efe2cd_52%,#e6d4bc_100%)]",
|
|
260
|
+
emerald: "border-emerald-200/70 bg-[linear-gradient(135deg,#ecfdf5_0%,#d1fae5_55%,#ecfeff_100%)]",
|
|
261
|
+
sunset: "border-orange-200/70 bg-[linear-gradient(135deg,#fff7ed_0%,#ffedd5_50%,#fef3c7_100%)]",
|
|
262
|
+
slate: "border-slate-700/70 bg-[linear-gradient(135deg,#0f172a_0%,#111827_55%,#1e293b_100%)]",
|
|
263
|
+
ocean: "border-sky-200/70 bg-[linear-gradient(135deg,#eff6ff_0%,#dbeafe_52%,#ecfeff_100%)]",
|
|
264
|
+
};
|
|
265
|
+
const currentTheme = themeStyles[(hero === null || hero === void 0 ? void 0 : hero.theme) || 'emerald'];
|
|
266
|
+
const expandedSectionClasses = {
|
|
267
|
+
sand: "border-b border-[#e8dccb] bg-[linear-gradient(135deg,#f7efe3_0%,#efe2cd_52%,#e6d4bc_100%)]",
|
|
268
|
+
emerald: "border-b border-emerald-100 bg-[linear-gradient(135deg,#effcf5_0%,#dcfce7_48%,#ecfeff_100%)]",
|
|
269
|
+
sunset: "border-b border-orange-100 bg-[linear-gradient(135deg,#fff7ed_0%,#ffedd5_50%,#fef3c7_100%)]",
|
|
270
|
+
slate: "border-b border-slate-800 bg-[linear-gradient(135deg,#0f172a_0%,#172554_52%,#1e1b4b_100%)]",
|
|
271
|
+
ocean: "border-b border-sky-100 bg-[linear-gradient(135deg,#f0f9ff_0%,#dbeafe_50%,#ecfeff_100%)]",
|
|
272
|
+
};
|
|
273
|
+
const applyFilters = () => {
|
|
274
|
+
setIsApplying(true);
|
|
275
|
+
changeMultiParams(filterParam);
|
|
276
|
+
setSheetOpen(false);
|
|
277
|
+
setTimeout(() => setIsApplying(false), 420);
|
|
278
|
+
};
|
|
224
279
|
const clearAllFilters = () => {
|
|
225
280
|
const clearedParams = getInitialFilterState();
|
|
226
281
|
setFilterParam(clearedParams);
|
|
@@ -229,6 +284,10 @@ function FilterBarComponent({ tiles, filterConfig = defaultFilterOptions }) {
|
|
|
229
284
|
};
|
|
230
285
|
const renderFilterInput = (opt) => {
|
|
231
286
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
287
|
+
if (opt.type === 'text') {
|
|
288
|
+
const value = filterParam[opt.label] || '';
|
|
289
|
+
return (_jsx(Input, { value: value, onChange: (e) => setFilterParam(prev => ({ ...prev, [opt.label]: e.target.value })), placeholder: `Search ${opt.displayName.toLowerCase()}...`, className: "w-full bg-transparent border-none shadow-none px-0 focus-visible:ring-0" }));
|
|
290
|
+
}
|
|
232
291
|
if (opt.type === 'range') {
|
|
233
292
|
const rangeValue = filterParam[opt.label];
|
|
234
293
|
const defaultRange = opt.defaultValue || { min: 0, max: 100 };
|
|
@@ -292,39 +351,34 @@ function FilterBarComponent({ tiles, filterConfig = defaultFilterOptions }) {
|
|
|
292
351
|
const visibleConfigs = getVisibleConfigs(filterConfig);
|
|
293
352
|
const barFilters = visibleConfigs.filter(f => f.visibility !== 'expanded');
|
|
294
353
|
const expandedFilters = visibleConfigs.filter(f => f.visibility === 'expanded');
|
|
295
|
-
|
|
296
|
-
.filter(opt => !opt.groupWith)
|
|
354
|
+
const filtersCard = (_jsx("div", { className: `rounded-[1.75rem] border border-white/70 bg-white/92 shadow-lg backdrop-blur transition-all duration-500 ${hasActiveFilters ? 'p-3 sm:p-3' : 'p-4'}`, children: _jsxs("div", { className: "flex w-full flex-col gap-3 md:flex-row md:items-center", children: [barFilters.slice(0, 3).map((opt, index) => (_jsxs("div", { className: "hidden md:flex min-w-0 flex-1 items-center", children: [_jsx("div", { className: "w-full", children: renderFilterInput(opt) }), index < Math.min(barFilters.length, 3) - 1 ? (_jsx("div", { className: "mx-4 hidden h-10 w-px bg-slate-200 md:block" })) : null] }, opt.label))), _jsxs(Sheet, { open: sheetOpen, onOpenChange: setSheetOpen, children: [_jsx(SheetTrigger, { asChild: true, children: _jsxs("button", { className: "flex h-12 items-center justify-center gap-2 rounded-2xl border border-slate-200 bg-slate-50 px-4 text-sm font-semibold text-slate-600 transition hover:border-slate-300 hover:bg-slate-100 md:min-w-[10rem]", children: [_jsx(SlidersHorizontal, { size: 16, className: "hidden md:block" }), _jsx(SearchIcon, { size: 16, className: "md:hidden" }), _jsx("span", { className: "md:hidden", children: "Start search..." }), _jsx("span", { className: "hidden md:inline", children: expandedFilters.length > 0 ? `+${expandedFilters.length} more` : 'More filters' })] }) }), _jsxs(SheetContent, { side: "bottom", className: "z-[200] max-h-[88vh] overflow-hidden rounded-t-[2rem] border-t border-slate-200 bg-white p-0 shadow-2xl md:inset-x-1/2 md:bottom-auto md:top-1/2 md:h-[min(86vh,820px)] md:w-[min(960px,calc(100vw-3rem))] md:-translate-x-1/2 md:-translate-y-1/2 md:rounded-[2rem] md:border", children: [_jsx("div", { className: "flex items-center justify-center border-b border-slate-200 px-5 py-4 md:px-8", children: _jsx(SheetTitle, { className: "text-lg font-black tracking-tight text-slate-950", children: "Filters" }) }), _jsx("div", { className: "flex-1 overflow-y-auto px-5 py-5 md:px-10 md:py-7", children: _jsx("div", { className: "mx-auto max-w-3xl divide-y divide-slate-100", children: visibleConfigs
|
|
355
|
+
.filter(opt => !opt.groupWith)
|
|
297
356
|
.map((opt) => {
|
|
298
|
-
// Check if this filter has a grouped partner
|
|
299
357
|
const groupedFilter = visibleConfigs.find(f => f.groupWith === opt.label);
|
|
300
358
|
if (groupedFilter) {
|
|
301
|
-
|
|
302
|
-
return (_jsxs("div", { className: "space-y-2", children: [_jsxs("label", { className: "text-sm font-medium text-gray-700", children: [groupedFilter.displayName, " & ", opt.displayName] }), _jsxs("div", { className: "bg-gray-50 rounded-lg p-3 flex items-center gap-4", children: [_jsx("div", { className: "w-28", children: renderFilterInput(groupedFilter) }), _jsx("div", { className: "flex-1", children: renderFilterInput(opt) })] })] }, opt.label));
|
|
359
|
+
return (_jsxs("section", { className: "space-y-4 py-6 first:pt-0", children: [_jsxs("label", { className: "block text-base font-black text-slate-900", children: [groupedFilter.displayName, " & ", opt.displayName] }), _jsxs("div", { className: "grid gap-3 rounded-3xl border border-slate-200 bg-slate-50/70 p-3 sm:grid-cols-[8rem_minmax(0,1fr)]", children: [_jsx("div", { children: renderFilterInput(groupedFilter) }), _jsx("div", { children: renderFilterInput(opt) })] })] }, opt.label));
|
|
303
360
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
changeMultiParams(newState);
|
|
326
|
-
}, className: "ml-1 hover:bg-blue-200 rounded-full p-1 transition-colors", children: _jsx(X, { size: 12 }) })] }, `${filter.label}-${filter.value}-${index}`))), _jsxs("button", { onClick: clearAllFilters, className: "inline-flex items-center gap-1 bg-gray-100 text-gray-600 px-3 py-1 rounded-full text-sm border border-gray-200 hover:bg-gray-200 transition-colors", children: ["Clear All", _jsx(X, { size: 12 })] })] }) }))] }));
|
|
361
|
+
return (_jsxs("section", { className: "space-y-4 py-6 first:pt-0", children: [_jsx("label", { className: "block text-base font-black text-slate-900", children: opt.displayName }), _jsx("div", { className: "rounded-3xl border border-slate-200 bg-slate-50/70 p-3", children: renderFilterInput(opt) })] }, opt.label));
|
|
362
|
+
}) }) }), _jsxs("div", { className: "sticky bottom-0 flex gap-3 border-t border-slate-200 bg-white/95 px-5 py-4 shadow-[0_-18px_45px_-30px_rgba(15,23,42,0.45)] backdrop-blur md:px-10", children: [_jsx(Button, { variant: "outline", onClick: clearAllFilters, className: "h-12 flex-1 rounded-2xl border-slate-300 font-black", children: "Clear All" }), _jsx(Button, { onClick: applyFilters, className: "h-12 flex-1 rounded-2xl font-black shadow-lg shadow-primary/20", children: "Apply Filters" })] })] })] }), _jsxs(Button, { variant: "default", onClick: applyFilters, className: `h-12 rounded-2xl px-5 text-sm font-black transition duration-300 md:min-w-[8.5rem] ${isApplying ? 'scale-95 shadow-[0_0_0_10px_rgba(16,185,129,0.14)]' : 'hover:scale-[1.02] shadow-lg shadow-primary/25'}`, children: [_jsx(Search, { size: 18, className: "mr-2" }), "Search"] })] }) }));
|
|
363
|
+
return hasActiveFilters ? (_jsx("div", { className: "sticky top-16 z-30 mb-10 mt-2 w-full px-4 transition-all duration-500", children: _jsx("div", { className: `mx-auto w-full max-w-6xl overflow-hidden rounded-[2rem] border py-3 shadow-[0_28px_70px_-34px_rgba(15,23,42,0.28)] transition-all duration-500 ${currentTheme}`, children: _jsxs("div", { className: "mx-auto w-full max-w-5xl px-4 sm:px-6", children: [filtersCard, visibleActiveFilters.length > 0 && (_jsx("div", { className: "mt-4", children: _jsxs("div", { className: "flex flex-wrap gap-2", children: [visibleActiveFilters.map((filter, index) => (_jsxs("div", { className: "inline-flex items-center gap-1 rounded-full border border-white/70 bg-white/88 px-3 py-1 text-sm text-slate-700 shadow-sm", children: [_jsxs("span", { className: "font-medium", children: [filter.displayName, ":"] }), _jsx("span", { children: typeof filter.value === 'number' && !filter.isRange
|
|
364
|
+
? `${filter.value} star or more`
|
|
365
|
+
: filter.value }), _jsx("button", { onClick: () => {
|
|
366
|
+
const newState = { ...filterParam };
|
|
367
|
+
if (filter.isRange) {
|
|
368
|
+
const config = filterConfig.find(f => f.label === filter.label);
|
|
369
|
+
newState[filter.label] = (config === null || config === void 0 ? void 0 : config.defaultValue) || { min: 0, max: 100 };
|
|
370
|
+
}
|
|
371
|
+
else if (Array.isArray(filterParam[filter.label])) {
|
|
372
|
+
newState[filter.label] = filterParam[filter.label].filter(v => v !== filter.value);
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
const config = filterConfig.find(f => f.label === filter.label);
|
|
376
|
+
newState[filter.label] = (config === null || config === void 0 ? void 0 : config.defaultValue) || 0;
|
|
377
|
+
}
|
|
378
|
+
setFilterParam(newState);
|
|
379
|
+
changeMultiParams(newState);
|
|
380
|
+
}, className: "ml-1 rounded-full p-1 transition-colors hover:bg-slate-100", children: _jsx(X, { size: 12 }) })] }, `${filter.label}-${filter.value}-${index}`))), _jsx("button", { onClick: clearAllFilters, className: "inline-flex items-center gap-1 rounded-full border border-red-600 bg-white/88 px-3 py-1 text-sm text-slate-600 shadow-sm transition-colors hover:bg-red-200", children: "Clear All" })] }) }))] }) }) })) : (_jsxs("div", { className: `relative w-full overflow-hidden px-4 pb-10 pt-20 transition-all duration-500 ${expandedSectionClasses[(hero === null || hero === void 0 ? void 0 : hero.theme) || 'emerald']}`, children: [_jsxs("div", { className: "pointer-events-none absolute inset-0", children: [_jsx("div", { className: "absolute -left-20 top-8 h-56 w-56 rounded-full bg-white/35 blur-3xl" }), _jsx("div", { className: "absolute right-0 top-0 h-72 w-72 rounded-full bg-white/15 blur-3xl" }), _jsx("div", { className: "absolute bottom-0 left-1/3 h-40 w-40 rounded-full bg-white/15 blur-2xl" })] }), _jsxs("div", { className: "container relative z-10 mx-auto max-w-5xl", children: [hero ? (_jsxs("div", { className: "mb-8 text-center", children: [hero.eyebrow ? (_jsx("span", { className: `inline-flex rounded-full px-3 py-1 text-xs font-black uppercase tracking-[0.2em] shadow-sm ${hero.theme === 'slate' ? 'border border-white/20 bg-white/10 text-white/88' : 'border border-black/10 bg-white/70 text-slate-700'}`, children: hero.eyebrow })) : null, _jsx("h2", { className: `mt-4 text-4xl font-black leading-tight tracking-tight md:text-5xl ${hero.theme === 'slate' ? 'text-white' : 'text-inherit'}`, children: hero.title }), hero.description ? (_jsx("p", { className: `mx-auto mt-2 max-w-3xl text-base font-medium ${hero.theme === 'slate' ? 'text-white/78' : 'text-slate-600'}`, children: hero.description })) : null] })) : null, filtersCard] })] }));
|
|
327
381
|
}
|
|
328
|
-
export function FilterBar({ tiles, filterConfig }) {
|
|
329
|
-
return (_jsx(Suspense, { fallback: _jsx("div", { className: "w-full h-screen flex items-center justify-center", children: "Loading..." }), children: _jsx(FilterBarComponent, { tiles: tiles, filterConfig: filterConfig }) }));
|
|
382
|
+
export function FilterBar({ tiles, filterConfig, hero }) {
|
|
383
|
+
return (_jsx(Suspense, { fallback: _jsx("div", { className: "w-full h-screen flex items-center justify-center", children: "Loading..." }), children: _jsx(FilterBarComponent, { tiles: tiles, filterConfig: filterConfig, hero: hero }) }));
|
|
330
384
|
}
|
package/dist/misc/form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
import { cn } from "@myrjfa/state";
|
|
4
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { Controller, FormProvider, useFormContext, useFormState, } from "react-hook-form";
|
|
7
7
|
import { Label } from "./label";
|
package/dist/misc/input.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
type InputProps = React.ComponentProps<"input"> & {
|
|
3
|
+
showZeroAsEmpty?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare function Input({ className, type, showZeroAsEmpty, value, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
3
6
|
export { Input };
|
|
4
7
|
//# sourceMappingURL=input.d.ts.map
|
package/dist/misc/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/misc/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/misc/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,KAAK,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,eAAuB,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAyBvF;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
package/dist/misc/input.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "@myrjfa/state";
|
|
3
|
-
function Input({ className, type, ...props }) {
|
|
4
|
-
|
|
2
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
3
|
+
function Input({ className, type, showZeroAsEmpty = false, value, ...props }) {
|
|
4
|
+
const normalizedValue = type === "number" &&
|
|
5
|
+
(value == null || Number.isNaN(Number(value)) || (showZeroAsEmpty && Number(value) === 0))
|
|
6
|
+
? ""
|
|
7
|
+
: value;
|
|
8
|
+
const valueProps = value !== undefined || showZeroAsEmpty ? { value: normalizedValue } : {};
|
|
9
|
+
return (_jsx("input", { type: type, "data-slot": "input", ...valueProps, onWheel: (e) => e.currentTarget.blur(), className: cn("border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", "[&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none", className), ...props }));
|
|
5
10
|
}
|
|
6
11
|
export { Input };
|
package/dist/misc/label.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
-
import { cn } from "@myrjfa/state";
|
|
4
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
5
5
|
function Label({ className, ...props }) {
|
|
6
6
|
return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn("flex items-center gap-2 leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), ...props }));
|
|
7
7
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type tileType } from "@myrjfa/state/dist/lib/models/tile";
|
|
2
|
+
type ListingWishlistButtonProps = {
|
|
3
|
+
slug: string;
|
|
4
|
+
tileType: tileType;
|
|
5
|
+
className?: string;
|
|
6
|
+
iconClassName?: string;
|
|
7
|
+
large?: boolean;
|
|
8
|
+
showLabel?: boolean;
|
|
9
|
+
label?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function ListingWishlistButton({ slug, tileType, className, iconClassName, large, showLabel, label, }: ListingWishlistButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=listing-wishlist-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listing-wishlist-button.d.ts","sourceRoot":"","sources":["../../src/misc/listing-wishlist-button.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAQnE,KAAK,0BAA0B,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAIF,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,KAAa,EACb,SAAiB,EACjB,KAAK,GACN,EAAE,0BAA0B,kDA2D5B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { toggleUserWishlist } from "@myrjfa/state/dist/lib/actions/actions";
|
|
4
|
+
import { userAtom, userLoadingAtom } from "@myrjfa/state/dist/lib/userAtom";
|
|
5
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
6
|
+
import { useAtom, useAtomValue } from "jotai";
|
|
7
|
+
import { Heart } from "lucide-react";
|
|
8
|
+
import { useEffect, useState } from "react";
|
|
9
|
+
import { showAlert } from "./alertdialogclaude";
|
|
10
|
+
const usesOpportunityWishlist = (type) => type === "opportunities";
|
|
11
|
+
export function ListingWishlistButton({ slug, tileType, className, iconClassName, large = false, showLabel = false, label, }) {
|
|
12
|
+
const [user, setUser] = useAtom(userAtom);
|
|
13
|
+
const loading = useAtomValue(userLoadingAtom);
|
|
14
|
+
const [wishlisted, setWishlisted] = useState(false);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
var _a;
|
|
17
|
+
if (loading || !user)
|
|
18
|
+
return;
|
|
19
|
+
const list = usesOpportunityWishlist(tileType) ? user.wishlist : user.favPackages;
|
|
20
|
+
setWishlisted((_a = list === null || list === void 0 ? void 0 : list.includes(slug)) !== null && _a !== void 0 ? _a : false);
|
|
21
|
+
}, [loading, slug, tileType, user]);
|
|
22
|
+
if (!user || user.role !== "user" || tileType === "blogs")
|
|
23
|
+
return null;
|
|
24
|
+
const accessibleLabel = label || (wishlisted ? "Remove from wishlist" : "Save to wishlist");
|
|
25
|
+
return (_jsxs("button", { type: "button", onClick: async (event) => {
|
|
26
|
+
event.preventDefault();
|
|
27
|
+
event.stopPropagation();
|
|
28
|
+
const response = await toggleUserWishlist(slug, tileType);
|
|
29
|
+
if (response === null || response === void 0 ? void 0 : response.error) {
|
|
30
|
+
await showAlert(response.error);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
setUser((prev) => {
|
|
34
|
+
if (!prev)
|
|
35
|
+
return prev;
|
|
36
|
+
return usesOpportunityWishlist(tileType)
|
|
37
|
+
? { ...prev, wishlist: response.wishlist }
|
|
38
|
+
: { ...prev, favPackages: response.wishlist };
|
|
39
|
+
});
|
|
40
|
+
setWishlisted((prev) => !prev);
|
|
41
|
+
}, className: cn("inline-flex items-center justify-center gap-2 rounded-full bg-white/90 text-slate-600 shadow-md backdrop-blur transition hover:bg-white hover:text-rose-500", large ? "h-12 px-4" : "h-10 w-10", className), "aria-label": accessibleLabel, title: accessibleLabel, children: [_jsx(Heart, { className: cn(large ? "h-5 w-5" : "h-4 w-4", wishlisted ? "fill-rose-500 text-rose-500" : "text-current", iconClassName) }), showLabel ? (_jsx("span", { className: "text-sm font-bold", children: wishlisted ? "Saved" : "Save" })) : null] }));
|
|
42
|
+
}
|
|
@@ -6,7 +6,7 @@ import { Input } from '../input';
|
|
|
6
6
|
import dynamic from 'next/dynamic';
|
|
7
7
|
import { FormControl, FormField, FormItem, FormLabel, FormMessage } from '../form';
|
|
8
8
|
import { Filter } from '../filter';
|
|
9
|
-
import { getCountryNames, getStates } from
|
|
9
|
+
import { getCountryNames, getStates } from "@myrjfa/state/dist/lib/data/countryStates";
|
|
10
10
|
function NominatimSearch({ onSelect }) {
|
|
11
11
|
const [query, setQuery] = useState('');
|
|
12
12
|
const [results, setResults] = useState([]);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface LocationAutocompleteOption<T = unknown> {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
badge?: string;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
data?: T;
|
|
9
|
+
}
|
|
10
|
+
interface LocationAutocompleteProps<T = unknown> {
|
|
11
|
+
value: string;
|
|
12
|
+
onValueChange: (value: string) => void;
|
|
13
|
+
onSelectOption?: (option: LocationAutocompleteOption<T>) => void;
|
|
14
|
+
loadOptions: (query: string) => LocationAutocompleteOption<T>[] | Promise<LocationAutocompleteOption<T>[]>;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
sectionLabel?: string;
|
|
17
|
+
emptyTitle?: string;
|
|
18
|
+
emptyDescription?: string;
|
|
19
|
+
loadingText?: string;
|
|
20
|
+
variant?: "plain" | "card";
|
|
21
|
+
labelText?: string;
|
|
22
|
+
containerClassName?: string;
|
|
23
|
+
inputClassName?: string;
|
|
24
|
+
maxHeightClassName?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function LocationAutocomplete<T = unknown>({ value, onValueChange, onSelectOption, loadOptions, placeholder, sectionLabel, emptyTitle, emptyDescription, loadingText, variant, labelText, containerClassName, inputClassName, maxHeightClassName, }: LocationAutocompleteProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=location-autocomplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"location-autocomplete.d.ts","sourceRoot":"","sources":["../../src/misc/location-autocomplete.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7E,MAAM,WAAW,0BAA0B,CAAC,CAAC,GAAG,OAAO;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;CACV;AAED,UAAU,yBAAyB,CAAC,CAAC,GAAG,OAAO;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACjE,WAAW,EAAE,CACX,KAAK,EAAE,MAAM,KAEX,0BAA0B,CAAC,CAAC,CAAC,EAAE,GAC/B,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAuBD,wBAAgB,oBAAoB,CAAC,CAAC,GAAG,OAAO,EAAE,EAChD,KAAK,EACL,aAAa,EACb,cAAc,EACd,WAAW,EACX,WAAsC,EACtC,YAA4B,EAC5B,UAA+B,EAC/B,gBAA8C,EAC9C,WAAsC,EACtC,OAAiB,EACjB,SAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,kBAA+B,GAChC,EAAE,yBAAyB,CAAC,CAAC,CAAC,2CA6N9B"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
4
|
+
import { MapPin, Search } from "lucide-react";
|
|
5
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
6
|
+
function highlightMatch(text, query) {
|
|
7
|
+
if (!query)
|
|
8
|
+
return text;
|
|
9
|
+
const parts = text.split(new RegExp(`(${query})`, "gi"));
|
|
10
|
+
return (_jsx(_Fragment, { children: parts.map((part, i) => part.toLowerCase() === query.toLowerCase() ? (_jsx("span", { className: "rounded bg-blue-50 px-0.5 font-bold text-gray-900", children: part }, `${part}-${i}`)) : (_jsx("span", { children: part }, `${part}-${i}`))) }));
|
|
11
|
+
}
|
|
12
|
+
export function LocationAutocomplete({ value, onValueChange, onSelectOption, loadOptions, placeholder = "Search destinations...", sectionLabel = "Suggestions", emptyTitle = "No results found", emptyDescription = "Try a different location.", loadingText = "Searching locations...", variant = "plain", labelText = "Where", containerClassName, inputClassName, maxHeightClassName = "max-h-72", }) {
|
|
13
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
14
|
+
const [query, setQuery] = useState(value);
|
|
15
|
+
const [results, setResults] = useState([]);
|
|
16
|
+
const [loading, setLoading] = useState(false);
|
|
17
|
+
const [selectedIndex, setSelectedIndex] = useState(-1);
|
|
18
|
+
const dropdownRef = useRef(null);
|
|
19
|
+
const cacheRef = useRef({});
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setQuery(value);
|
|
22
|
+
}, [value]);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
function handleClickOutside(event) {
|
|
25
|
+
if (dropdownRef.current &&
|
|
26
|
+
!dropdownRef.current.contains(event.target)) {
|
|
27
|
+
setIsOpen(false);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
31
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
32
|
+
}, []);
|
|
33
|
+
const fetchOptions = async (nextQuery) => {
|
|
34
|
+
if (cacheRef.current[nextQuery]) {
|
|
35
|
+
setResults(cacheRef.current[nextQuery]);
|
|
36
|
+
setLoading(false);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
setLoading(true);
|
|
40
|
+
try {
|
|
41
|
+
const loaded = await loadOptions(nextQuery);
|
|
42
|
+
cacheRef.current[nextQuery] = loaded;
|
|
43
|
+
setResults(loaded);
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
setLoading(false);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (!isOpen)
|
|
51
|
+
return;
|
|
52
|
+
const timer = setTimeout(() => {
|
|
53
|
+
fetchOptions(query);
|
|
54
|
+
}, 250);
|
|
55
|
+
return () => clearTimeout(timer);
|
|
56
|
+
}, [query, isOpen]);
|
|
57
|
+
const handleFocus = () => {
|
|
58
|
+
setIsOpen(true);
|
|
59
|
+
if (!results.length) {
|
|
60
|
+
fetchOptions(query);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const handleSelect = (option) => {
|
|
64
|
+
setQuery(option.title);
|
|
65
|
+
onValueChange(option.title);
|
|
66
|
+
onSelectOption === null || onSelectOption === void 0 ? void 0 : onSelectOption(option);
|
|
67
|
+
setIsOpen(false);
|
|
68
|
+
setSelectedIndex(-1);
|
|
69
|
+
};
|
|
70
|
+
const handleKeyDown = (e) => {
|
|
71
|
+
if (!isOpen) {
|
|
72
|
+
if (e.key === "Enter") {
|
|
73
|
+
onValueChange(query);
|
|
74
|
+
}
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (e.key === "ArrowDown") {
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
setSelectedIndex((prev) => prev < results.length - 1 ? prev + 1 : prev);
|
|
80
|
+
}
|
|
81
|
+
else if (e.key === "ArrowUp") {
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
setSelectedIndex((prev) => (prev > 0 ? prev - 1 : -1));
|
|
84
|
+
}
|
|
85
|
+
else if (e.key === "Enter") {
|
|
86
|
+
e.preventDefault();
|
|
87
|
+
const selected = results[selectedIndex];
|
|
88
|
+
if (selectedIndex >= 0 && selected) {
|
|
89
|
+
handleSelect(selected);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
onValueChange(query);
|
|
93
|
+
setIsOpen(false);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else if (e.key === "Escape") {
|
|
97
|
+
setIsOpen(false);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const rootClasses = useMemo(() => {
|
|
101
|
+
if (variant === "card") {
|
|
102
|
+
return cn("relative flex flex-1 items-center gap-3 rounded-2xl border-2 border-gray-100 bg-white px-4 py-3 transition focus-within:border-primary focus-within:ring-4 focus-within:ring-primary/10", containerClassName);
|
|
103
|
+
}
|
|
104
|
+
return cn("relative", containerClassName);
|
|
105
|
+
}, [containerClassName, variant]);
|
|
106
|
+
return (_jsxs("div", { className: rootClasses, ref: dropdownRef, children: [variant === "card" ? (_jsxs(_Fragment, { children: [_jsx(MapPin, { className: "h-5 w-5 flex-shrink-0 text-primary" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "mb-0.5 text-[10px] font-black uppercase tracking-widest text-gray-400", children: labelText }), _jsx("input", { type: "text", name: "trippeaze-location-search", value: query, autoComplete: "new-password", autoCorrect: "off", spellCheck: false, onFocus: handleFocus, onChange: (e) => {
|
|
107
|
+
setQuery(e.target.value);
|
|
108
|
+
onValueChange(e.target.value);
|
|
109
|
+
setIsOpen(true);
|
|
110
|
+
setSelectedIndex(-1);
|
|
111
|
+
}, onKeyDown: handleKeyDown, placeholder: placeholder, className: cn("w-full bg-transparent text-sm font-semibold text-gray-900 outline-none placeholder:text-gray-300", inputClassName) })] })] })) : (_jsx("input", { type: "text", name: "trippeaze-location-search", value: query, autoComplete: "new-password", autoCorrect: "off", spellCheck: false, placeholder: placeholder, onChange: (e) => {
|
|
112
|
+
setQuery(e.target.value);
|
|
113
|
+
onValueChange(e.target.value);
|
|
114
|
+
setIsOpen(true);
|
|
115
|
+
setSelectedIndex(-1);
|
|
116
|
+
}, onFocus: handleFocus, onKeyDown: handleKeyDown, className: inputClassName })), isOpen && (_jsx("div", { className: "absolute left-0 right-0 top-[calc(100%+8px)] z-50 flex min-w-[280px] flex-col overflow-hidden rounded-2xl border border-gray-100 bg-white py-3 shadow-xl", children: loading && !results.length ? (_jsx("div", { className: "px-4 py-3 text-sm font-medium text-gray-400 animate-pulse", children: loadingText })) : results.length > 0 ? (_jsxs(_Fragment, { children: [!query && (_jsx("p", { className: "px-5 py-2 text-[10px] font-black uppercase tracking-wider text-gray-400", children: sectionLabel })), _jsx("ul", { className: cn("flex w-full flex-col overflow-y-auto", maxHeightClassName), children: results.map((item, index) => {
|
|
117
|
+
var _a;
|
|
118
|
+
const isSelected = index === selectedIndex;
|
|
119
|
+
return (_jsxs("li", { onMouseEnter: () => setSelectedIndex(index), onClick: () => handleSelect(item), className: cn("flex w-full cursor-pointer items-center gap-4 px-5 py-3 transition-colors", isSelected ? "bg-gray-50" : "hover:bg-gray-50"), children: [_jsx("div", { className: "shrink-0 rounded-xl bg-gray-100 p-2.5", children: (_a = item.icon) !== null && _a !== void 0 ? _a : _jsx(MapPin, { className: "h-4 w-4 text-gray-500" }) }), _jsxs("div", { className: "min-w-0 flex-1 text-left", children: [_jsx("div", { className: "truncate text-sm font-semibold text-gray-900", children: highlightMatch(item.title, query) }), item.subtitle ? (_jsx("div", { className: "mt-0.5 truncate text-xs font-medium text-gray-500", children: item.subtitle })) : null] }), item.badge ? (_jsx("span", { className: "shrink-0 text-xs font-semibold text-gray-400", children: item.badge })) : null] }, item.id));
|
|
120
|
+
}) })] })) : (_jsxs("div", { className: "flex flex-col items-center justify-center gap-2 px-5 py-4 text-center", children: [_jsx(Search, { className: "h-6 w-6 text-gray-300" }), _jsx("p", { className: "text-sm font-semibold text-gray-700", children: emptyTitle }), _jsx("p", { className: "text-xs text-gray-400", children: emptyDescription })] })) }))] }));
|
|
121
|
+
}
|
|
@@ -150,8 +150,8 @@ export function NotificationBell({ navItemColor, userId, hostId }) {
|
|
|
150
150
|
return _jsx(FaSpinner, { className: "animate-spin" });
|
|
151
151
|
return _jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("div", { className: `relative cursor-pointer ${navItemColor} transition-colors`, "aria-label": "Notification Bell", children: [_jsx(Bell, { className: "h-5 w-5" }), unreadCount > 0 && (_jsx("span", { className: "absolute -top-1.5 -right-1.5 flex h-4 min-w-[1rem] items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-bold text-white animate-pulse", children: unreadCount > 99 ? "99+" : unreadCount }))] }) }), _jsx(PopoverContent, { className: "w-96 p-0 mt-3 bg-white dark:bg-gray-900 rounded-xl shadow-xl border border-gray-100 dark:border-gray-800", align: "end", sideOffset: 5, children: _jsxs(Card, { className: "border-0 shadow-none bg-transparent", children: [_jsx(CardHeader, { className: "px-5 pb-2", children: _jsxs("div", { className: "flex justify-between items-center", children: [_jsx(CardTitle, { className: "text-base font-semibold", children: "Notifications" }), notifs.length > 0 && unreadCount > 0 && (_jsx(Button, { variant: "ghost", size: "sm", className: "text-xs text-teal-600 hover:text-teal-800 dark:text-teal-400", onClick: handleMarkAllNotifRead, children: "Mark all as read" }))] }) }), _jsx(ScrollArea, { className: "h-80 w-full", children: _jsx("div", { className: "px-2 pb-2", children: notifs.length === 0 ? (_jsxs("div", { className: "flex flex-col items-center justify-center py-16 text-gray-400", children: [_jsx(Bell, { className: "w-10 h-10 mb-3 opacity-30" }), _jsx("p", { className: "text-sm", children: "You're all caught up \uD83C\uDF89" })] })) : (notifs.map((notif) => (_jsxs("div", { className: `flex items-start gap-3 p-3 rounded-lg cursor-pointer transition-all duration-200 hover:bg-gray-50 dark:hover:bg-gray-800/50 ${!notif.read
|
|
152
152
|
? "bg-teal-50/50 dark:bg-teal-900/10 border-l-2 border-teal-500"
|
|
153
|
-
: "border-l-2 border-transparent"} ${loadingNotifId === notif._id ? "opacity-50 pointer-events-none" : ""}`, onClick: () => handleNotifClick(notif), children: [_jsx("div", { className: "flex-shrink-0 mt-0.5", children: getNotificationIcon(notif) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("p", { className: `text-sm leading-snug ${!notif.read ? "font-medium text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`, children: notif.message }), _jsxs("div", { className: "flex items-center gap-2 mt-1", children: [_jsx("p", { className: "text-[11px] text-gray-400", children: notif.timestamp ? formatTimestamp(notif.timestamp) : "" }), notif.type && notif.type !== "general" && (_jsx("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-gray-100 dark:bg-gray-800 text-gray-500 dark:text-gray-400", children: notif.type.replace(/_/g, " ") }))] })] }), !notif.read && (_jsx("div", { className: "flex-shrink-0 mt-2", children: _jsx("div", { className: "w-2 h-2 rounded-full bg-teal-500" }) }))] }, notif._id)))) }) }), notifs.length > NOTIF_LIMIT_FOR_BELL && (_jsx("div", { className: "px-3 py-2 border-t border-gray-100 dark:border-gray-800", children: _jsx(Button, { variant: "ghost", className: "w-full text-teal-600 hover:text-teal-800 hover:bg-teal-50 dark:text-teal-400 dark:hover:bg-teal-900/20 text-sm", onClick: () => { setIsOpen(false); router.push("/inbox"); }, children: "View all notifications" }) }))] }) })] });
|
|
153
|
+
: "border-l-2 border-transparent"} ${loadingNotifId === notif._id ? "opacity-50 pointer-events-none" : ""}`, onClick: () => handleNotifClick(notif), children: [_jsx("div", { className: "flex-shrink-0 mt-0.5", children: getNotificationIcon(notif) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("p", { className: `text-sm leading-snug ${!notif.read ? "font-medium text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`, children: notif.message }), _jsxs("div", { className: "flex items-center gap-2 mt-1", children: [_jsx("p", { className: "text-[11px] text-gray-400", children: notif.timestamp ? formatTimestamp(notif.timestamp) : "" }), notif.type && notif.type !== "general" && (_jsx("span", { className: "text-[10px] px-1.5 py-0.5 rounded-full bg-gray-100 dark:bg-gray-800 text-gray-500 dark:text-gray-400", children: notif.type.replace(/_/g, " ") }))] })] }), !notif.read && (_jsx("div", { className: "flex-shrink-0 mt-2", children: _jsx("div", { className: "w-2 h-2 rounded-full bg-teal-500" }) }))] }, notif._id)))) }) }), notifs.length > NOTIF_LIMIT_FOR_BELL && (_jsx("div", { className: "px-3 py-2 border-t border-gray-100 dark:border-gray-800", children: _jsx(Button, { variant: "ghost", className: "w-full text-teal-600 hover:text-teal-800 hover:bg-teal-50 dark:text-teal-400 dark:hover:bg-teal-900/20 text-sm", onClick: () => { setIsOpen(false); router.push("/dashboard/user/inbox"); }, children: "View all notifications" }) }))] }) })] });
|
|
154
154
|
}
|
|
155
155
|
export function MobileNotificationBell() {
|
|
156
|
-
return (_jsx(MobileNavItem, { icon: _jsx("div", { className: "relative", children: _jsx(Bell, { className: "h-5 w-5" }) }), label: "Notifications", href: "/inbox" }));
|
|
156
|
+
return (_jsx(MobileNavItem, { icon: _jsx("div", { className: "relative", children: _jsx(Bell, { className: "h-5 w-5" }) }), label: "Notifications", href: "/dashboard/user/inbox" }));
|
|
157
157
|
}
|
package/dist/misc/pagination.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "@myrjfa/state";
|
|
2
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
3
3
|
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon, } from "lucide-react";
|
|
4
4
|
import Link from "next/link";
|
|
5
5
|
import { buttonVariants } from "./button";
|
package/dist/misc/popover.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
-
import { cn } from "@myrjfa/state";
|
|
4
|
+
import { cn } from "@myrjfa/state/dist/lib/utils";
|
|
5
5
|
function Popover({ ...props }) {
|
|
6
6
|
return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
7
7
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type PricingStrategy } from "@myrjfa/state/dist/lib/models/pricing";
|
|
2
|
+
type PricingStrategyEditorProps = {
|
|
3
|
+
currency: string;
|
|
4
|
+
strategies: PricingStrategy[];
|
|
5
|
+
onCurrencyChange: (currency: string) => void;
|
|
6
|
+
onStrategiesChange: (strategies: PricingStrategy[]) => void;
|
|
7
|
+
title?: string;
|
|
8
|
+
cardClassName?: string;
|
|
9
|
+
descriptionPlaceholder?: string;
|
|
10
|
+
descriptionHelperText?: string;
|
|
11
|
+
priceOnly?: boolean;
|
|
12
|
+
featureType?: string;
|
|
13
|
+
supportType?: string;
|
|
14
|
+
};
|
|
15
|
+
export default function PricingStrategyEditor({ currency, strategies, onCurrencyChange, onStrategiesChange, title, cardClassName, descriptionPlaceholder, descriptionHelperText, priceOnly, featureType, supportType, }: PricingStrategyEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=pricing-strategy-editor.d.ts.map
|