@mohasinac/appkit 2.7.26 → 2.7.30
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/_internal/client/features/classified/ClassifiedDetailView.js +2 -2
- package/dist/_internal/client/features/digital-code/CodeRevealPanel.js +2 -2
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +1 -1
- package/dist/_internal/server/features/checkout/actions.js +42 -35
- package/dist/_internal/server/features/classified/adapters.d.ts +21 -0
- package/dist/_internal/server/features/classified/adapters.js +24 -0
- package/dist/_internal/server/features/classified/index.d.ts +3 -0
- package/dist/_internal/server/features/classified/index.js +3 -0
- package/dist/_internal/server/features/classified/metadata.d.ts +8 -0
- package/dist/_internal/server/features/classified/metadata.js +43 -0
- package/dist/_internal/server/features/classified/og.d.ts +30 -0
- package/dist/_internal/server/features/classified/og.js +76 -0
- package/dist/_internal/server/features/digital-code/adapters.d.ts +21 -0
- package/dist/_internal/server/features/digital-code/adapters.js +29 -0
- package/dist/_internal/server/features/digital-code/index.d.ts +3 -0
- package/dist/_internal/server/features/digital-code/index.js +3 -0
- package/dist/_internal/server/features/digital-code/metadata.d.ts +8 -0
- package/dist/_internal/server/features/digital-code/metadata.js +36 -0
- package/dist/_internal/server/features/digital-code/og.d.ts +27 -0
- package/dist/_internal/server/features/digital-code/og.js +77 -0
- package/dist/_internal/server/features/live/adapters.d.ts +21 -0
- package/dist/_internal/server/features/live/adapters.js +34 -0
- package/dist/_internal/server/features/live/index.d.ts +3 -0
- package/dist/_internal/server/features/live/index.js +3 -0
- package/dist/_internal/server/features/live/metadata.d.ts +8 -0
- package/dist/_internal/server/features/live/metadata.js +39 -0
- package/dist/_internal/server/features/live/og.d.ts +27 -0
- package/dist/_internal/server/features/live/og.js +72 -0
- package/dist/_internal/server/features/promotions/actions.js +4 -3
- package/dist/_internal/server/jobs/core/onOrderCreate.js +19 -16
- package/dist/_internal/server/jobs/core/onOrderStatusChange.js +25 -22
- package/dist/_internal/server/jobs/core/onProductWrite.js +48 -58
- package/dist/_internal/shared/actions/action-registry.js +310 -8
- package/dist/_internal/shared/features/blog/schema.d.ts +4 -4
- package/dist/_internal/shared/features/brands/schema.d.ts +5 -5
- package/dist/_internal/shared/features/cart/schema.d.ts +18 -18
- package/dist/_internal/shared/features/categories/bundle-copy.d.ts +1 -1
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +38 -38
- package/dist/_internal/shared/features/events/schema.d.ts +8 -8
- package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
- package/dist/_internal/shared/features/products/schema.d.ts +42 -42
- package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
- package/dist/_internal/shared/features/reviews/schema.d.ts +1 -1
- package/dist/_internal/shared/media/limits.js +4 -3
- package/dist/client.d.ts +2 -0
- package/dist/client.js +1 -0
- package/dist/configs/next.js +4 -0
- package/dist/constants/table-keys.d.ts +6 -0
- package/dist/constants/table-keys.js +9 -0
- package/dist/core/hooks/useSyncManager.js +9 -8
- package/dist/features/about/components/FeesView.js +10 -7
- package/dist/features/about/components/HelpPageView.js +10 -1
- package/dist/features/about/components/HowAuctionsWorkView.js +10 -1
- package/dist/features/about/components/HowCheckoutWorksView.js +10 -1
- package/dist/features/about/components/HowOffersWorkView.js +10 -1
- package/dist/features/about/components/HowOrdersWorkView.js +10 -1
- package/dist/features/about/components/HowPayoutsWorkView.js +10 -1
- package/dist/features/about/components/HowPreOrdersWorkView.js +10 -1
- package/dist/features/about/components/HowReviewsWorkView.js +10 -1
- package/dist/features/about/components/PublicProfileView.js +44 -14
- package/dist/features/about/components/SecurityPrivacyView.js +7 -1
- package/dist/features/account/components/AddressesIndexListing.js +2 -2
- package/dist/features/account/components/NotificationBell.js +27 -16
- package/dist/features/account/components/NotificationPreferencesPanel.d.ts +9 -0
- package/dist/features/account/components/NotificationPreferencesPanel.js +91 -0
- package/dist/features/account/components/UserSidebar.js +4 -4
- package/dist/features/account/components/UserSupportView.js +16 -6
- package/dist/features/account/components/index.d.ts +2 -0
- package/dist/features/account/components/index.js +1 -0
- package/dist/features/account/schemas/index.d.ts +4 -4
- package/dist/features/account/types/index.d.ts +34 -0
- package/dist/features/admin/actions/admin-actions.js +4 -3
- package/dist/features/admin/actions/notification-actions.d.ts +24 -22
- package/dist/features/admin/actions/notification-actions.js +122 -22
- package/dist/features/admin/components/AdminAdEditorView.js +29 -15
- package/dist/features/admin/components/AdminAdsView.js +22 -28
- package/dist/features/admin/components/AdminAllEventEntriesView.js +6 -1
- package/dist/features/admin/components/AdminBidsView.js +10 -3
- package/dist/features/admin/components/AdminBlogEditorView.js +2 -2
- package/dist/features/admin/components/AdminBlogView.js +8 -3
- package/dist/features/admin/components/AdminBrandsView.js +7 -2
- package/dist/features/admin/components/AdminBundleEditorView.js +5 -2
- package/dist/features/admin/components/AdminCarouselEditorView.js +6 -3
- package/dist/features/admin/components/AdminCarouselView.js +13 -7
- package/dist/features/admin/components/AdminCategoriesView.js +8 -3
- package/dist/features/admin/components/AdminCategoryEditorView.js +2 -2
- package/dist/features/admin/components/AdminContactView.js +6 -1
- package/dist/features/admin/components/AdminCouponEditorView.js +8 -2
- package/dist/features/admin/components/AdminCouponsView.js +6 -1
- package/dist/features/admin/components/AdminEmployeeEditorView.js +12 -9
- package/dist/features/admin/components/AdminFaqEditorView.js +2 -2
- package/dist/features/admin/components/AdminFaqsView.js +7 -2
- package/dist/features/admin/components/AdminFeaturesView.js +4 -3
- package/dist/features/admin/components/AdminMediaView.js +9 -8
- package/dist/features/admin/components/AdminNavigationView.js +10 -17
- package/dist/features/admin/components/AdminNewsletterView.js +6 -1
- package/dist/features/admin/components/AdminNotificationsView.js +11 -3
- package/dist/features/admin/components/AdminOrdersView.js +6 -1
- package/dist/features/admin/components/AdminPayoutsView.js +10 -3
- package/dist/features/admin/components/AdminPrizeDrawsView.js +10 -3
- package/dist/features/admin/components/AdminProductsView.js +18 -12
- package/dist/features/admin/components/AdminReviewsView.js +33 -24
- package/dist/features/admin/components/AdminScammerEditorView.js +3 -2
- package/dist/features/admin/components/AdminScammersView.js +28 -26
- package/dist/features/admin/components/AdminSectionsView.js +112 -99
- package/dist/features/admin/components/AdminSessionsView.js +10 -3
- package/dist/features/admin/components/AdminSidebar.js +4 -4
- package/dist/features/admin/components/AdminSiteSettingsView.js +45 -4
- package/dist/features/admin/components/AdminStoresView.js +6 -1
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +0 -1
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +1 -1
- package/dist/features/admin/components/AdminSupportTicketsView.js +32 -34
- package/dist/features/admin/components/AdminTeamView.js +6 -1
- package/dist/features/admin/components/AdminUserEditorView.js +8 -15
- package/dist/features/admin/components/AdminUsersView.js +6 -1
- package/dist/features/admin/components/AdminViewCards.js +4 -3
- package/dist/features/admin/components/DashboardStats.js +2 -2
- package/dist/features/admin/components/DataTable.js +2 -2
- package/dist/features/admin/components/sections/adminSectionsTypes.js +4 -3
- package/dist/features/admin/repository/chat.repository.js +8 -8
- package/dist/features/admin/repository/site-settings.repository.d.ts +1 -0
- package/dist/features/admin/repository/site-settings.repository.js +11 -9
- package/dist/features/admin/schemas/firestore.d.ts +38 -0
- package/dist/features/admin/schemas/firestore.js +15 -0
- package/dist/features/auctions/components/AuctionDetailPageView.js +13 -19
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +18 -9
- package/dist/features/auctions/components/MarketplaceAuctionGrid.js +3 -2
- package/dist/features/auctions/components/index.d.ts +0 -1
- package/dist/features/auctions/components/index.js +0 -1
- package/dist/features/auctions/schemas/index.d.ts +14 -14
- package/dist/features/auth/actions/realtime-token-actions.js +19 -4
- package/dist/features/auth/components/RegisterForm.js +8 -4
- package/dist/features/auth/consent-otp.d.ts +2 -0
- package/dist/features/auth/consent-otp.js +8 -0
- package/dist/features/auth/schemas/firestore.d.ts +2 -0
- package/dist/features/auth/schemas/firestore.js +18 -25
- package/dist/features/auth/schemas/index.d.ts +2 -2
- package/dist/features/before-after/api/[id]/route.js +8 -6
- package/dist/features/before-after/schemas/index.d.ts +2 -2
- package/dist/features/blog/actions/blog-actions.d.ts +3 -3
- package/dist/features/blog/components/BlogIndexListing.js +21 -2
- package/dist/features/blog/components/BlogPostForm.js +11 -5
- package/dist/features/blog/components/BlogPostView.js +10 -2
- package/dist/features/blog/schemas/index.d.ts +18 -18
- package/dist/features/cart/components/CartDrawer.js +3 -2
- package/dist/features/cart/repository/cart.repository.js +4 -3
- package/dist/features/cart/utils/pending-ops.d.ts +1 -1
- package/dist/features/categories/api/[id]/route.js +4 -3
- package/dist/features/categories/api/route.js +4 -3
- package/dist/features/categories/components/BrandDetailPageView.js +2 -2
- package/dist/features/categories/components/BrandDetailTabs.js +2 -2
- package/dist/features/categories/components/BundleCollage.d.ts +8 -0
- package/dist/features/categories/components/BundleCollage.js +50 -0
- package/dist/features/categories/components/BundleDetailView.js +2 -10
- package/dist/features/categories/components/BundleItemsPicker.js +20 -13
- package/dist/features/categories/components/CategoriesIndexListing.js +28 -9
- package/dist/features/categories/components/CategoryDetailPageView.js +2 -2
- package/dist/features/categories/components/CategoryDetailTabs.js +2 -2
- package/dist/features/categories/components/CategoryProductsListing.js +52 -13
- package/dist/features/categories/components/index.d.ts +2 -0
- package/dist/features/categories/components/index.js +1 -0
- package/dist/features/categories/schemas/index.d.ts +6 -6
- package/dist/features/checkout/actions/checkout-actions.js +4 -3
- package/dist/features/checkout/hooks/usePaymentCheckout.js +31 -22
- package/dist/features/classified/components/ClassifiedFilters.d.ts +8 -0
- package/dist/features/classified/components/ClassifiedFilters.js +19 -0
- package/dist/features/classified/components/ClassifiedIndexListing.d.ts +4 -0
- package/dist/features/classified/components/ClassifiedIndexListing.js +110 -0
- package/dist/features/classified/components/ClassifiedListView.d.ts +6 -0
- package/dist/features/classified/components/ClassifiedListView.js +43 -0
- package/dist/features/classified/components/index.d.ts +6 -0
- package/dist/features/classified/components/index.js +3 -0
- package/dist/features/collections/api/[slug]/route.js +16 -12
- package/dist/features/collections/schemas/index.d.ts +5 -5
- package/dist/features/consultation/api/[id]/route.js +12 -9
- package/dist/features/consultation/components/ConsultationForm.js +3 -2
- package/dist/features/consultation/schemas/index.d.ts +6 -6
- package/dist/features/contact/email.js +77 -116
- package/dist/features/copilot/components/AdminCopilotView.js +12 -2
- package/dist/features/corporate/api/[id]/route.js +12 -9
- package/dist/features/corporate/components/CorporateInquiryForm.js +2 -1
- package/dist/features/digital-codes/components/DigitalCodeFilters.d.ts +8 -0
- package/dist/features/digital-codes/components/DigitalCodeFilters.js +16 -0
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.d.ts +4 -0
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +107 -0
- package/dist/features/digital-codes/components/DigitalCodesListView.d.ts +6 -0
- package/dist/features/digital-codes/components/DigitalCodesListView.js +37 -0
- package/dist/features/digital-codes/components/index.d.ts +6 -0
- package/dist/features/digital-codes/components/index.js +3 -0
- package/dist/features/events/actions/event-actions.js +4 -3
- package/dist/features/events/components/AdminEventEditorView.js +3 -2
- package/dist/features/events/components/AdminEventsView.js +4 -2
- package/dist/features/events/components/EventPollWidget.js +5 -5
- package/dist/features/events/components/EventsIndexListing.js +2 -2
- package/dist/features/events/schemas/index.d.ts +20 -20
- package/dist/features/faq/actions/faq-actions.d.ts +8 -8
- package/dist/features/faq/components/ContactCTA.js +3 -1
- package/dist/features/faq/components/FAQAccordion.js +1 -1
- package/dist/features/faq/schemas/index.d.ts +4 -4
- package/dist/features/filters/AsyncFacetSection.d.ts +18 -0
- package/dist/features/filters/AsyncFacetSection.js +65 -0
- package/dist/features/forms/Checkbox.js +2 -2
- package/dist/features/forms/Input.js +2 -2
- package/dist/features/forms/Radio.js +5 -5
- package/dist/features/forms/Select.js +2 -2
- package/dist/features/forms/Slider.js +2 -2
- package/dist/features/forms/Textarea.js +2 -2
- package/dist/features/homepage/api/[id]/route.js +4 -3
- package/dist/features/homepage/api/sections/[id]/route.js +12 -9
- package/dist/features/homepage/components/AdSlot.js +2 -1
- package/dist/features/homepage/components/AdvertisementBanner.js +5 -3
- package/dist/features/homepage/components/BrandsSection.js +2 -2
- package/dist/features/homepage/components/CTABannerSection.js +2 -2
- package/dist/features/homepage/components/CharacterHotspot.d.ts +2 -2
- package/dist/features/homepage/components/CharacterHotspot.js +119 -157
- package/dist/features/homepage/components/CharacterHotspotForm.js +25 -20
- package/dist/features/homepage/components/CustomCardsSection.js +8 -6
- package/dist/features/homepage/components/FeaturedProductsSection.js +2 -2
- package/dist/features/homepage/components/GoogleReviewsSection.js +3 -3
- package/dist/features/homepage/components/HeroBanner.js +5 -4
- package/dist/features/homepage/components/HeroCarousel.js +13 -26
- package/dist/features/homepage/components/HowItWorksSection.js +4 -2
- package/dist/features/homepage/components/SocialFeedSection.js +2 -2
- package/dist/features/homepage/components/SocialPostCard.js +3 -2
- package/dist/features/homepage/lib/social-feed-fetcher.js +6 -3
- package/dist/features/layout/AppLayoutShell.d.ts +8 -2
- package/dist/features/layout/AppLayoutShell.js +55 -84
- package/dist/features/layout/BottomActions.js +43 -48
- package/dist/features/layout/NavbarWithSettings.d.ts +6 -0
- package/dist/features/layout/NavbarWithSettings.js +11 -0
- package/dist/features/live/components/LiveItemFilters.d.ts +8 -0
- package/dist/features/live/components/LiveItemFilters.js +23 -0
- package/dist/features/live/components/LiveItemsIndexListing.d.ts +4 -0
- package/dist/features/live/components/LiveItemsIndexListing.js +108 -0
- package/dist/features/live/components/LiveItemsListView.d.ts +6 -0
- package/dist/features/live/components/LiveItemsListView.js +43 -0
- package/dist/features/live/components/index.d.ts +6 -0
- package/dist/features/live/components/index.js +3 -0
- package/dist/features/media/MediaLightbox.js +8 -14
- package/dist/features/media/types/index.d.ts +2 -2
- package/dist/features/media/upload/CameraCapture.js +2 -2
- package/dist/features/media/upload/ImageUpload.js +4 -2
- package/dist/features/media/upload/MediaUploadField.js +24 -8
- package/dist/features/media/upload/MediaUploadList.js +1 -1
- package/dist/features/orders/actions/order-actions.js +4 -3
- package/dist/features/orders/components/MarketplaceOrderCard.js +2 -1
- package/dist/features/orders/components/OrderFilters.js +12 -9
- package/dist/features/orders/schemas/index.d.ts +6 -6
- package/dist/features/pre-orders/api/[id]/route.js +12 -9
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +5 -4
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +27 -20
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +17 -52
- package/dist/features/pre-orders/components/PreorderCard.d.ts +0 -9
- package/dist/features/pre-orders/components/PreorderCard.js +2 -13
- package/dist/features/pre-orders/components/index.d.ts +1 -1
- package/dist/features/pre-orders/components/index.js +1 -1
- package/dist/features/pre-orders/schemas/index.d.ts +10 -10
- package/dist/features/products/api/[id]/route.js +9 -7
- package/dist/features/products/api/route.js +1 -1
- package/dist/features/products/columns/productTableColumns.js +2 -2
- package/dist/features/products/components/AuctionsIndexListing.js +15 -51
- package/dist/features/products/components/BidHistory.js +2 -2
- package/dist/features/products/components/CompareOverlay.js +3 -2
- package/dist/features/products/components/MakeOfferButton.js +20 -14
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +2 -1
- package/dist/features/products/components/PrizeDrawCollage.d.ts +1 -15
- package/dist/features/products/components/PrizeDrawCollage.js +54 -14
- package/dist/features/products/components/PrizeDrawDetailPageView.js +2 -1
- package/dist/features/products/components/PrizeDrawEntryActions.js +2 -1
- package/dist/features/products/components/PrizeDrawItemsEditor.js +9 -7
- package/dist/features/products/components/PrizeDrawsIndexListing.js +18 -51
- package/dist/features/products/components/PrizeRevealModal.js +24 -14
- package/dist/features/products/components/ProductDetailPageView.js +2 -1
- package/dist/features/products/components/ProductFilters.js +8 -6
- package/dist/features/products/components/ProductForm.js +12 -10
- package/dist/features/products/components/ProductGalleryClient.js +2 -1
- package/dist/features/products/components/ProductGrid.js +11 -14
- package/dist/features/products/components/ProductsIndexListing.js +16 -52
- package/dist/features/products/components/ProductsIndexPageView.js +2 -2
- package/dist/features/products/schemas/index.d.ts +56 -56
- package/dist/features/products/schemas/product-features.validators.d.ts +14 -14
- package/dist/features/promotions/components/CouponsIndexListing.js +1 -1
- package/dist/features/promotions/schemas/index.d.ts +6 -6
- package/dist/features/reviews/actions/review-actions.js +6 -5
- package/dist/features/reviews/api/[id]/route.js +4 -3
- package/dist/features/reviews/components/ReviewDetailPageView.js +2 -2
- package/dist/features/reviews/components/ReviewDetailShell.js +6 -3
- package/dist/features/reviews/components/ReviewsIndexListing.js +2 -2
- package/dist/features/reviews/schemas/index.d.ts +6 -6
- package/dist/features/scams/components/ScamProfileView.js +19 -10
- package/dist/features/scams/components/ScamRegistryView.js +2 -1
- package/dist/features/search/components/Search.d.ts +1 -1
- package/dist/features/search/components/Search.js +56 -49
- package/dist/features/search/schemas/index.d.ts +5 -5
- package/dist/features/seller/actions/offer-actions.js +11 -9
- package/dist/features/seller/components/SellerAddressesView.js +6 -4
- package/dist/features/seller/components/SellerBidsView.js +2 -2
- package/dist/features/seller/components/SellerCouponsView.js +1 -1
- package/dist/features/seller/components/SellerOffersPanel.js +6 -1
- package/dist/features/seller/components/SellerOrdersView.js +1 -1
- package/dist/features/seller/components/SellerPayoutSettingsView.js +3 -3
- package/dist/features/seller/components/SellerPreOrdersView.js +5 -4
- package/dist/features/seller/components/SellerPrizeDrawsView.js +5 -4
- package/dist/features/seller/components/SellerProductShell.d.ts +19 -1
- package/dist/features/seller/components/SellerProductShell.js +75 -9
- package/dist/features/seller/components/SellerProductsView.js +10 -11
- package/dist/features/seller/components/SellerShippingView.js +3 -3
- package/dist/features/seller/components/SellerSidebar.js +10 -7
- package/dist/features/seller/components/SellerStorefrontView.js +3 -3
- package/dist/features/seller/schemas/index.d.ts +4 -4
- package/dist/features/shell/FormShell.js +2 -1
- package/dist/features/shell/QuickFormDrawer.js +4 -3
- package/dist/features/shell/StepForm.js +4 -3
- package/dist/features/stores/actions/store-query-actions.js +4 -3
- package/dist/features/stores/components/StoreAboutView.js +2 -1
- package/dist/features/stores/components/StoreAuctionsListing.js +43 -64
- package/dist/features/stores/components/StoreDetailLayoutView.js +2 -2
- package/dist/features/stores/components/StorePreOrdersListing.js +33 -57
- package/dist/features/stores/components/StoreProductsListing.js +16 -49
- package/dist/features/stores/components/StoresIndexListing.js +2 -2
- package/dist/features/stores/schemas/index.d.ts +2 -2
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +8 -7
- package/dist/features/wishlist/hooks/useGuestWishlist.d.ts +5 -5
- package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +6 -6
- package/dist/features/wishlist/utils/guest-wishlist.d.ts +5 -5
- package/dist/index.d.ts +21 -3
- package/dist/index.js +1737 -1725
- package/dist/monitoring/server-logger.js +5 -9
- package/dist/next/api/apiHandler.js +56 -37
- package/dist/next/components/GlobalError.js +2 -1
- package/dist/next/routing/route-map.d.ts +27 -0
- package/dist/next/routing/route-map.js +10 -0
- package/dist/react/ErrorBoundary.js +2 -1
- package/dist/react/contexts/SessionContext.js +38 -28
- package/dist/react/hooks/useCamera.d.ts +1 -1
- package/dist/react/hooks/useCamera.js +8 -7
- package/dist/seed/site-settings-seed-data.js +6 -0
- package/dist/server-entry.d.ts +3 -0
- package/dist/server-entry.js +3 -0
- package/dist/server.d.ts +12 -0
- package/dist/server.js +15 -0
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/DataTable.js +28 -7
- package/dist/ui/components/Button.d.ts +8 -1
- package/dist/ui/components/Button.js +47 -8
- package/dist/ui/components/CollageLightbox.d.ts +18 -0
- package/dist/ui/components/CollageLightbox.js +41 -0
- package/dist/ui/components/Dropdown.js +7 -6
- package/dist/ui/components/ImageLightbox.d.ts +7 -1
- package/dist/ui/components/ImageLightbox.js +15 -5
- package/dist/ui/components/PageLoader.js +4 -3
- package/dist/ui/components/PaginatedMultiSelect.d.ts +28 -0
- package/dist/ui/components/PaginatedMultiSelect.js +141 -0
- package/dist/ui/components/PaginatedMultiSelect.style.css +272 -0
- package/dist/ui/components/Semantic.js +1 -1
- package/dist/ui/components/SideDrawer.js +17 -15
- package/dist/ui/components/index.style.css +1 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +1 -0
- package/dist/utils/number.formatter.js +5 -13
- package/dist/utils/string.formatter.js +21 -18
- package/dist/validation/schemas.d.ts +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/* PaginatedMultiSelect — multi-value chips + async paginated checkbox dropdown */
|
|
2
|
+
|
|
3
|
+
.appkit-pms {
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* ── chips row ── */
|
|
8
|
+
.appkit-pms__chips {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
gap: 0.375rem;
|
|
12
|
+
margin-bottom: 0.375rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.appkit-pms__chip {
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 0.25rem;
|
|
19
|
+
border-radius: 9999px;
|
|
20
|
+
border: 1px solid var(--appkit-color-border);
|
|
21
|
+
background: var(--appkit-color-surface);
|
|
22
|
+
padding: 0.125rem 0.5rem 0.125rem 0.625rem;
|
|
23
|
+
font-size: 0.75rem;
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
color: var(--appkit-color-text);
|
|
26
|
+
line-height: 1.5;
|
|
27
|
+
max-width: 12rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:is(.dark) .appkit-pms__chip {
|
|
31
|
+
border-color: var(--appkit-color-border);
|
|
32
|
+
background: var(--appkit-color-surface);
|
|
33
|
+
color: var(--appkit-color-text);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.appkit-pms__chip-label {
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
text-overflow: ellipsis;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.appkit-pms__chip-remove {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
width: 1rem;
|
|
48
|
+
height: 1rem;
|
|
49
|
+
border-radius: 9999px;
|
|
50
|
+
font-size: 0.7rem;
|
|
51
|
+
color: var(--appkit-color-text-muted);
|
|
52
|
+
transition: color 0.15s, background-color 0.15s;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.appkit-pms__chip-remove:hover {
|
|
56
|
+
color: var(--appkit-color-text);
|
|
57
|
+
background-color: var(--appkit-color-zinc-100);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:is(.dark) .appkit-pms__chip-remove:hover {
|
|
61
|
+
color: var(--appkit-color-text);
|
|
62
|
+
background-color: var(--appkit-color-slate-700);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.appkit-pms__overflow-chip {
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
border-radius: 9999px;
|
|
69
|
+
border: 1px dashed var(--appkit-color-border);
|
|
70
|
+
padding: 0.125rem 0.625rem;
|
|
71
|
+
font-size: 0.75rem;
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
color: var(--appkit-color-text-muted);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* ── trigger ── */
|
|
77
|
+
.appkit-pms__trigger {
|
|
78
|
+
display: flex;
|
|
79
|
+
width: 100%;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
border-radius: 0.5rem;
|
|
83
|
+
border: 1px solid var(--appkit-color-zinc-300);
|
|
84
|
+
padding: 0.5rem 0.75rem;
|
|
85
|
+
font-size: 0.875rem;
|
|
86
|
+
background: var(--appkit-color-surface);
|
|
87
|
+
color: var(--appkit-color-zinc-800);
|
|
88
|
+
transition: border-color 0.15s;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.appkit-pms__trigger:hover:not(:disabled) {
|
|
92
|
+
border-color: var(--appkit-color-zinc-400);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.appkit-pms__trigger:focus-visible {
|
|
96
|
+
outline: 2px solid var(--appkit-color-focus-ring, var(--appkit-color-primary));
|
|
97
|
+
outline-offset: 2px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:is(.dark) .appkit-pms__trigger {
|
|
101
|
+
border-color: var(--appkit-color-border);
|
|
102
|
+
background: var(--appkit-color-surface);
|
|
103
|
+
color: var(--appkit-color-slate-200);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.appkit-pms__trigger--disabled {
|
|
107
|
+
cursor: not-allowed;
|
|
108
|
+
opacity: 0.5;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.appkit-pms__placeholder {
|
|
112
|
+
color: var(--appkit-color-text-faint);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.appkit-pms__trigger-left {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
gap: 0.375rem;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.appkit-pms__trigger-count {
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
font-size: 0.75rem;
|
|
125
|
+
font-weight: 600;
|
|
126
|
+
color: var(--appkit-color-primary);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* ── dropdown ── */
|
|
130
|
+
.appkit-pms__dropdown {
|
|
131
|
+
position: absolute;
|
|
132
|
+
z-index: var(--appkit-z-dropdown);
|
|
133
|
+
margin-top: 0.25rem;
|
|
134
|
+
width: 100%;
|
|
135
|
+
min-width: 14rem;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
border-radius: 0.5rem;
|
|
138
|
+
border: 1px solid var(--appkit-color-border);
|
|
139
|
+
background: var(--appkit-color-surface);
|
|
140
|
+
box-shadow: var(--appkit-shadow-lg);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:is(.dark) .appkit-pms__dropdown {
|
|
144
|
+
border-color: var(--appkit-color-border);
|
|
145
|
+
background: var(--appkit-color-surface);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.appkit-pms__search {
|
|
149
|
+
border-radius: 0;
|
|
150
|
+
border-left: 0;
|
|
151
|
+
border-right: 0;
|
|
152
|
+
border-top: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* ── option list ── */
|
|
156
|
+
.appkit-pms__list {
|
|
157
|
+
max-height: 13rem;
|
|
158
|
+
overflow-y: auto;
|
|
159
|
+
padding: 0.25rem 0;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.appkit-pms__option {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
gap: 0.625rem;
|
|
166
|
+
width: 100%;
|
|
167
|
+
padding: 0.5rem 0.75rem;
|
|
168
|
+
font-size: 0.875rem;
|
|
169
|
+
text-align: left;
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
transition: background-color 0.1s;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.appkit-pms__option:hover {
|
|
175
|
+
background-color: var(--appkit-color-zinc-100);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
:is(.dark) .appkit-pms__option:hover {
|
|
179
|
+
background-color: var(--appkit-color-slate-800);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.appkit-pms__option--selected {
|
|
183
|
+
font-weight: 500;
|
|
184
|
+
background-color: var(--appkit-color-zinc-50);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:is(.dark) .appkit-pms__option--selected {
|
|
188
|
+
background-color: rgba(15, 23, 42, 0.6);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.appkit-pms__checkbox {
|
|
192
|
+
flex-shrink: 0;
|
|
193
|
+
width: 1rem;
|
|
194
|
+
height: 1rem;
|
|
195
|
+
border-radius: 0.25rem;
|
|
196
|
+
border: 1.5px solid var(--appkit-color-zinc-400);
|
|
197
|
+
background: var(--appkit-color-surface);
|
|
198
|
+
display: flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
justify-content: center;
|
|
201
|
+
transition: border-color 0.15s, background-color 0.15s;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.appkit-pms__option--selected .appkit-pms__checkbox {
|
|
205
|
+
border-color: var(--appkit-color-primary);
|
|
206
|
+
background: var(--appkit-color-primary);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:is(.dark) .appkit-pms__option--selected .appkit-pms__checkbox {
|
|
210
|
+
border-color: var(--appkit-color-primary);
|
|
211
|
+
background: var(--appkit-color-primary);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.appkit-pms__checkmark {
|
|
215
|
+
display: none;
|
|
216
|
+
font-size: 0.6rem;
|
|
217
|
+
color: var(--appkit-color-text-on-primary, #fff);
|
|
218
|
+
font-weight: 700;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.appkit-pms__option--selected .appkit-pms__checkmark {
|
|
222
|
+
display: block;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.appkit-pms__option-label {
|
|
226
|
+
overflow: hidden;
|
|
227
|
+
text-overflow: ellipsis;
|
|
228
|
+
white-space: nowrap;
|
|
229
|
+
flex: 1;
|
|
230
|
+
color: var(--appkit-color-text);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* ── empty / loading / load-more / create ── */
|
|
234
|
+
.appkit-pms__empty,
|
|
235
|
+
.appkit-pms__loading {
|
|
236
|
+
padding: 0.5rem 0.75rem;
|
|
237
|
+
font-size: 0.75rem;
|
|
238
|
+
color: var(--appkit-color-text-muted);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.appkit-pms__load-more {
|
|
242
|
+
width: 100%;
|
|
243
|
+
padding: 0.5rem 0.75rem;
|
|
244
|
+
text-align: left;
|
|
245
|
+
font-size: 0.75rem;
|
|
246
|
+
color: var(--appkit-color-secondary-600);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.appkit-pms__load-more:hover {
|
|
250
|
+
text-decoration: underline;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.appkit-pms__create-btn {
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
gap: 0.375rem;
|
|
257
|
+
width: 100%;
|
|
258
|
+
padding: 0.5rem 0.75rem;
|
|
259
|
+
font-size: 0.8125rem;
|
|
260
|
+
font-weight: 500;
|
|
261
|
+
color: var(--appkit-color-primary);
|
|
262
|
+
border-top: 1px solid var(--appkit-color-border-subtle);
|
|
263
|
+
transition: background-color 0.1s;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.appkit-pms__create-btn:hover {
|
|
267
|
+
background-color: var(--appkit-color-zinc-50);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
:is(.dark) .appkit-pms__create-btn:hover {
|
|
271
|
+
background-color: var(--appkit-color-slate-800);
|
|
272
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
export const Section = React.forwardRef(({ className = "", children, ...props }, ref) => (_jsx("section", { className: className, ref: ref, ...props,
|
|
3
|
+
export const Section = React.forwardRef(({ className = "", children, ...props }, ref) => (_jsx("section", { className: className, ref: ref, ...props, children: children })));
|
|
4
4
|
Section.displayName = "Section";
|
|
5
5
|
export function Article({ className = "", children, ...props }) {
|
|
6
6
|
return (_jsx("article", { className: className, ...props, children: children }));
|
|
@@ -6,6 +6,7 @@ import { Button } from "./Button";
|
|
|
6
6
|
import { Row } from "./Layout";
|
|
7
7
|
import { Heading, Span } from "./Typography";
|
|
8
8
|
import { useSwipe } from "../../react";
|
|
9
|
+
import { Text } from "./Typography";
|
|
9
10
|
const UI_SIDE_DRAWER = {
|
|
10
11
|
backdrop: "appkit-side-drawer__backdrop",
|
|
11
12
|
root: "appkit-side-drawer",
|
|
@@ -37,6 +38,20 @@ function getFocusableElements(container) {
|
|
|
37
38
|
return [];
|
|
38
39
|
return Array.from(container.querySelectorAll(FOCUSABLE_SELECTOR));
|
|
39
40
|
}
|
|
41
|
+
function handleFocusTrap(e, first, last) {
|
|
42
|
+
if (e.shiftKey) {
|
|
43
|
+
if (document.activeElement === first) {
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
last.focus();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
if (document.activeElement === last) {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
first.focus();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
40
55
|
/**
|
|
41
56
|
* SideDrawer — accessible slide-in panel with focus trap, swipe-to-close,
|
|
42
57
|
* and an optional unsaved-changes confirmation overlay.
|
|
@@ -83,20 +98,7 @@ export function SideDrawer({ isOpen, onClose, title, children, footer, mode = "v
|
|
|
83
98
|
e.preventDefault();
|
|
84
99
|
return;
|
|
85
100
|
}
|
|
86
|
-
|
|
87
|
-
const last = focusable[focusable.length - 1];
|
|
88
|
-
if (e.shiftKey) {
|
|
89
|
-
if (document.activeElement === first) {
|
|
90
|
-
e.preventDefault();
|
|
91
|
-
last.focus();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
if (document.activeElement === last) {
|
|
96
|
-
e.preventDefault();
|
|
97
|
-
first.focus();
|
|
98
|
-
}
|
|
99
|
-
}
|
|
101
|
+
handleFocusTrap(e, focusable[0], focusable[focusable.length - 1]);
|
|
100
102
|
}
|
|
101
103
|
};
|
|
102
104
|
document.addEventListener("keydown", handleKeyDown);
|
|
@@ -146,5 +148,5 @@ export function SideDrawer({ isOpen, onClose, title, children, footer, mode = "v
|
|
|
146
148
|
return (_jsxs(_Fragment, { children: [_jsx("div", { className: UI_SIDE_DRAWER.backdrop, onClick: attemptClose, "aria-hidden": "true" }), _jsxs("div", { ref: drawerRef, className: [UI_SIDE_DRAWER.root, positionClass].join(" "), role: "dialog", "aria-modal": "true", "aria-labelledby": "drawer-title", "data-section": "sidedrawer-div-598", children: [_jsxs(Row, { justify: "between", gap: "none", className: [
|
|
147
149
|
UI_SIDE_DRAWER.header,
|
|
148
150
|
UI_SIDE_DRAWER.headerMode[mode],
|
|
149
|
-
].join(" "), children: [_jsxs(Row, { gap: "3", className: "min-w-0", children: [_jsx(Button, { variant: "ghost", onClick: attemptClose, className: UI_SIDE_DRAWER.closeBtn, "aria-label": tActions("close"), children: _jsx("svg", { className: UI_SIDE_DRAWER.closeIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }), _jsx(Heading, { level: 3, id: "drawer-title", className: "truncate", children: title })] }), mode === "delete" && (_jsx(Span, { className: UI_SIDE_DRAWER.deleteBadge, children: tActions("delete") }))] }), _jsx("div", { className: UI_SIDE_DRAWER.content, "data-section": "sidedrawer-div-599", children: children }), footer && _jsx("div", { className: UI_SIDE_DRAWER.footer, "data-section": "sidedrawer-div-600", children: footer })] }), showUnsavedWarning && (_jsxs(_Fragment, { children: [_jsx("div", { className: UI_SIDE_DRAWER.warnBackdrop, onClick: cancelClose }), _jsxs("div", { className: UI_SIDE_DRAWER.warnDialog, "data-section": "sidedrawer-div-601", children: [_jsxs("div", { className: UI_SIDE_DRAWER.warnHeader, "data-section": "sidedrawer-div-602", children: [_jsx("div", { className: UI_SIDE_DRAWER.warnIcon, "data-section": "sidedrawer-div-603", children: _jsx("svg", { fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }) }), _jsxs("div", { "data-section": "sidedrawer-div-604", children: [_jsx(Heading, { level: 4, className: "mb-1", children: tConfirm("unsavedChangesTitle") }), _jsx(
|
|
151
|
+
].join(" "), children: [_jsxs(Row, { gap: "3", className: "min-w-0", children: [_jsx(Button, { variant: "ghost", onClick: attemptClose, className: UI_SIDE_DRAWER.closeBtn, "aria-label": tActions("close"), children: _jsx("svg", { className: UI_SIDE_DRAWER.closeIcon, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }), _jsx(Heading, { level: 3, id: "drawer-title", className: "truncate", children: title })] }), mode === "delete" && (_jsx(Span, { className: UI_SIDE_DRAWER.deleteBadge, children: tActions("delete") }))] }), _jsx("div", { className: UI_SIDE_DRAWER.content, "data-section": "sidedrawer-div-599", children: children }), footer && _jsx("div", { className: UI_SIDE_DRAWER.footer, "data-section": "sidedrawer-div-600", children: footer })] }), showUnsavedWarning && (_jsxs(_Fragment, { children: [_jsx("div", { className: UI_SIDE_DRAWER.warnBackdrop, onClick: cancelClose }), _jsxs("div", { className: UI_SIDE_DRAWER.warnDialog, "data-section": "sidedrawer-div-601", children: [_jsxs("div", { className: UI_SIDE_DRAWER.warnHeader, "data-section": "sidedrawer-div-602", children: [_jsx("div", { className: UI_SIDE_DRAWER.warnIcon, "data-section": "sidedrawer-div-603", children: _jsx("svg", { fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }) }), _jsxs("div", { "data-section": "sidedrawer-div-604", children: [_jsx(Heading, { level: 4, className: "mb-1", children: tConfirm("unsavedChangesTitle") }), _jsx(Text, { className: UI_SIDE_DRAWER.warnText, children: tConfirm("unsavedChangesDescription") })] })] }), _jsxs("div", { className: UI_SIDE_DRAWER.warnActions, "data-section": "sidedrawer-div-605", children: [_jsx(Button, { variant: "outline", onClick: cancelClose, size: "sm", children: tActions("keepEditing") }), _jsx(Button, { variant: "danger", onClick: confirmClose, size: "sm", children: tActions("discardChanges") })] })] })] }))] }));
|
|
150
152
|
}
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
@import "./BaseListingCard.style.css";
|
|
59
59
|
@import "./ConfirmDeleteModal.style.css";
|
|
60
60
|
@import "./DynamicSelect.style.css";
|
|
61
|
+
@import "./PaginatedMultiSelect.style.css";
|
|
61
62
|
@import "./SideDrawer.style.css";
|
|
62
63
|
@import "./FormActionBar.style.css";
|
|
63
64
|
@import "./BackgroundRenderer.style.css";
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -117,6 +117,8 @@ export type { DynamicSelectProps, DynamicSelectOption, AsyncPage, } from "./comp
|
|
|
117
117
|
export { DynamicSelect } from "./components/DynamicSelect";
|
|
118
118
|
export type { InlineCreateSelectProps } from "./components/InlineCreateSelect";
|
|
119
119
|
export { InlineCreateSelect } from "./components/InlineCreateSelect";
|
|
120
|
+
export type { PaginatedMultiSelectProps } from "./components/PaginatedMultiSelect";
|
|
121
|
+
export { PaginatedMultiSelect } from "./components/PaginatedMultiSelect";
|
|
120
122
|
export type { RoleBadgeProps } from "./components/RoleBadge";
|
|
121
123
|
export { RoleBadge } from "./components/RoleBadge";
|
|
122
124
|
export type { SkipToMainProps } from "./components/SkipToMain";
|
package/dist/ui/index.js
CHANGED
|
@@ -62,6 +62,7 @@ export { Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, DropdownSeparato
|
|
|
62
62
|
export { Menu, MenuTrigger, MenuContent, MenuItem, MenuSeparator, } from "./components/Menu";
|
|
63
63
|
export { DynamicSelect } from "./components/DynamicSelect";
|
|
64
64
|
export { InlineCreateSelect } from "./components/InlineCreateSelect";
|
|
65
|
+
export { PaginatedMultiSelect } from "./components/PaginatedMultiSelect";
|
|
65
66
|
export { RoleBadge } from "./components/RoleBadge";
|
|
66
67
|
export { SkipToMain } from "./components/SkipToMain";
|
|
67
68
|
export { NavigationLoader } from "./components/NavigationLoader";
|
|
@@ -64,31 +64,23 @@ export function parseFormattedNumber(str) {
|
|
|
64
64
|
}
|
|
65
65
|
else if (lastDotIndex > -1 && lastCommaIndex === -1) {
|
|
66
66
|
const afterDot = cleaned.substring(lastDotIndex + 1);
|
|
67
|
-
|
|
67
|
+
const isThousands = dotCount > 1 || afterDot.length > 3;
|
|
68
|
+
if (isThousands)
|
|
68
69
|
cleaned = cleaned.replace(/\./g, "");
|
|
69
|
-
}
|
|
70
|
-
else if (afterDot.length > 3) {
|
|
71
|
-
cleaned = cleaned.replace(/\./g, "");
|
|
72
|
-
}
|
|
73
70
|
decimalSeparator = ".";
|
|
74
71
|
thousandsSeparator = "";
|
|
75
72
|
}
|
|
76
73
|
else if (lastCommaIndex > -1 && lastDotIndex === -1) {
|
|
77
74
|
const afterComma = cleaned.substring(lastCommaIndex + 1);
|
|
78
|
-
|
|
75
|
+
const commaIsThousands = commaCount > 1 || afterComma.length > 3;
|
|
76
|
+
if (commaIsThousands) {
|
|
79
77
|
cleaned = cleaned.replace(/,/g, "");
|
|
80
78
|
decimalSeparator = ".";
|
|
81
|
-
thousandsSeparator = "";
|
|
82
|
-
}
|
|
83
|
-
else if (afterComma.length > 3) {
|
|
84
|
-
cleaned = cleaned.replace(/,/g, "");
|
|
85
|
-
decimalSeparator = ".";
|
|
86
|
-
thousandsSeparator = "";
|
|
87
79
|
}
|
|
88
80
|
else {
|
|
89
81
|
decimalSeparator = ",";
|
|
90
|
-
thousandsSeparator = "";
|
|
91
82
|
}
|
|
83
|
+
thousandsSeparator = "";
|
|
92
84
|
}
|
|
93
85
|
let result = cleaned;
|
|
94
86
|
if (thousandsSeparator) {
|
|
@@ -61,6 +61,26 @@ export function randomString(length = 10) {
|
|
|
61
61
|
export function isEmptyString(str) {
|
|
62
62
|
return !str || str.trim().length === 0;
|
|
63
63
|
}
|
|
64
|
+
const PROSEMIRROR_MARK_WRAP = {
|
|
65
|
+
bold: ["<strong>", "</strong>"],
|
|
66
|
+
italic: ["<em>", "</em>"],
|
|
67
|
+
underline: ["<u>", "</u>"],
|
|
68
|
+
strike: ["<s>", "</s>"],
|
|
69
|
+
code: ["<code>", "</code>"],
|
|
70
|
+
};
|
|
71
|
+
function applyMark(text, mark) {
|
|
72
|
+
const wrap = PROSEMIRROR_MARK_WRAP[mark.type];
|
|
73
|
+
if (wrap) {
|
|
74
|
+
return `${wrap[0]}${text}${wrap[1]}`;
|
|
75
|
+
}
|
|
76
|
+
if (mark.type === "link") {
|
|
77
|
+
const rawHref = String(mark.attrs?.href ?? "#").trim();
|
|
78
|
+
const safe = /^(https?:\/\/|mailto:|\/|#)/i.test(rawHref) ? rawHref : "#";
|
|
79
|
+
const href = safe.replace(/[&"<>]/g, (c) => ({ "&": "&", '"': """, "<": "<", ">": ">" })[c] ?? c);
|
|
80
|
+
return `<a href="${href}" rel="noopener noreferrer">${text}</a>`;
|
|
81
|
+
}
|
|
82
|
+
return text;
|
|
83
|
+
}
|
|
64
84
|
function renderProseMirrorNodes(nodes) {
|
|
65
85
|
return nodes.map(renderProseMirrorNode).join("");
|
|
66
86
|
}
|
|
@@ -76,24 +96,7 @@ function renderProseMirrorNode(node) {
|
|
|
76
96
|
let text = escapeHtml(node.text ?? "");
|
|
77
97
|
if (node.marks) {
|
|
78
98
|
for (const mark of node.marks) {
|
|
79
|
-
|
|
80
|
-
text = `<strong>${text}</strong>`;
|
|
81
|
-
else if (mark.type === "italic")
|
|
82
|
-
text = `<em>${text}</em>`;
|
|
83
|
-
else if (mark.type === "underline")
|
|
84
|
-
text = `<u>${text}</u>`;
|
|
85
|
-
else if (mark.type === "strike")
|
|
86
|
-
text = `<s>${text}</s>`;
|
|
87
|
-
else if (mark.type === "code")
|
|
88
|
-
text = `<code>${text}</code>`;
|
|
89
|
-
else if (mark.type === "link") {
|
|
90
|
-
const rawHref = String(mark.attrs?.href ?? "#").trim();
|
|
91
|
-
const safe = /^(https?:\/\/|mailto:|\/|#)/i.test(rawHref)
|
|
92
|
-
? rawHref
|
|
93
|
-
: "#";
|
|
94
|
-
const href = safe.replace(/[&"<>]/g, (c) => ({ "&": "&", '"': """, "<": "<", ">": ">" })[c] ?? c);
|
|
95
|
-
text = `<a href="${href}" rel="noopener noreferrer">${text}</a>`;
|
|
96
|
-
}
|
|
99
|
+
text = applyMark(text, mark);
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
return text;
|
|
@@ -36,14 +36,14 @@ export declare const addressSchema: z.ZodObject<{
|
|
|
36
36
|
}, "strip", z.ZodTypeAny, {
|
|
37
37
|
country: string;
|
|
38
38
|
state: string;
|
|
39
|
-
street: string;
|
|
40
39
|
city: string;
|
|
40
|
+
street: string;
|
|
41
41
|
pincode: string;
|
|
42
42
|
}, {
|
|
43
43
|
country: string;
|
|
44
44
|
state: string;
|
|
45
|
-
street: string;
|
|
46
45
|
city: string;
|
|
46
|
+
street: string;
|
|
47
47
|
pincode: string;
|
|
48
48
|
}>;
|
|
49
49
|
export declare const resetPasswordSchema: z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mohasinac/appkit",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.30",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"watch:css": "tailwindcss -i src/tailwind-input.css -o dist/tailwind-utilities.css --watch",
|
|
148
148
|
"audit": "node scripts/audit-violations.mjs",
|
|
149
149
|
"check:types": "tsc --noEmit",
|
|
150
|
-
"check:audits": "node scripts/audit-violations.mjs && node scripts/verify-entries.mjs && node scripts/verify-css-build.mjs && node scripts/audit-use-client.mjs && node scripts/audit-double-navigation.mjs && node scripts/audit-repository-fields.mjs",
|
|
150
|
+
"check:audits": "node scripts/audit-violations.mjs && node scripts/verify-entries.mjs && node scripts/verify-css-build.mjs && node scripts/audit-use-client.mjs && node scripts/audit-double-navigation.mjs && node scripts/audit-repository-fields.mjs && node scripts/audit-query-provider.mjs",
|
|
151
151
|
"check": "npm run check:types && npm run check:audits"
|
|
152
152
|
},
|
|
153
153
|
"dependencies": {
|