@mohasinac/appkit 2.7.59 → 2.8.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/_internal/client/features/filters/filter-load-options.d.ts +4 -5
- package/dist/_internal/server/features/auctions/og.js +8 -32
- package/dist/_internal/server/features/blog/og.js +10 -49
- package/dist/_internal/server/features/checkout/actions.js +6 -0
- package/dist/_internal/server/features/classified/og.js +9 -51
- package/dist/_internal/server/features/digital-code/actions.d.ts +11 -0
- package/dist/_internal/server/features/digital-code/actions.js +30 -0
- package/dist/_internal/server/features/digital-code/index.d.ts +1 -0
- package/dist/_internal/server/features/digital-code/index.js +1 -0
- package/dist/_internal/server/features/digital-code/og.js +9 -51
- package/dist/_internal/server/features/events/og.js +10 -49
- package/dist/_internal/server/features/item-requests/data.d.ts +17 -0
- package/dist/_internal/server/features/item-requests/data.js +20 -0
- package/dist/_internal/server/features/item-requests/index.d.ts +2 -0
- package/dist/_internal/server/features/item-requests/index.js +2 -0
- package/dist/_internal/server/features/item-requests/og.d.ts +40 -0
- package/dist/_internal/server/features/item-requests/og.js +136 -0
- package/dist/_internal/server/features/live/actions.d.ts +5 -0
- package/dist/_internal/server/features/live/actions.js +24 -0
- package/dist/_internal/server/features/live/index.d.ts +1 -0
- package/dist/_internal/server/features/live/index.js +1 -0
- package/dist/_internal/server/features/live/og.js +9 -51
- package/dist/_internal/server/features/media/contextGuards.js +19 -8
- package/dist/_internal/server/features/pre-orders/og.js +8 -32
- package/dist/_internal/server/features/prize-draws/data.d.ts +17 -0
- package/dist/_internal/server/features/prize-draws/data.js +20 -0
- package/dist/_internal/server/features/prize-draws/index.d.ts +2 -0
- package/dist/_internal/server/features/prize-draws/index.js +2 -0
- package/dist/_internal/server/features/prize-draws/og.d.ts +30 -0
- package/dist/_internal/server/features/prize-draws/og.js +50 -0
- package/dist/_internal/server/features/products/og.js +8 -33
- package/dist/_internal/server/features/seo/og-layout.d.ts +42 -0
- package/dist/_internal/server/features/seo/og-layout.js +69 -0
- package/dist/_internal/server/features/stores/og.js +8 -41
- package/dist/_internal/server/features/sublisting-categories/og.js +11 -42
- package/dist/client.d.ts +10 -6
- package/dist/client.js +7 -3
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.js +2 -0
- package/dist/constants/notification-types.d.ts +20 -0
- package/dist/constants/notification-types.js +37 -0
- package/dist/constants/pagination-presets.d.ts +39 -0
- package/dist/constants/pagination-presets.js +38 -0
- package/dist/errors/messages.d.ts +0 -4
- package/dist/errors/messages.js +0 -4
- package/dist/features/account/components/UserOffersPanel.js +1 -1
- package/dist/features/account/components/UserSupportView.d.ts +1 -2
- package/dist/features/account/components/UserSupportView.js +9 -1
- package/dist/features/admin/actions/admin-actions.js +16 -1
- package/dist/features/admin/components/AdminAllEventEntriesView.d.ts +2 -3
- package/dist/features/admin/components/AdminAllEventEntriesView.js +50 -83
- package/dist/features/admin/components/AdminBidsView.d.ts +2 -3
- package/dist/features/admin/components/AdminBidsView.js +64 -98
- package/dist/features/admin/components/AdminBlogView.d.ts +3 -7
- package/dist/features/admin/components/AdminBlogView.js +53 -83
- package/dist/features/admin/components/AdminBrandsView.d.ts +2 -3
- package/dist/features/admin/components/AdminBrandsView.js +84 -83
- package/dist/features/admin/components/AdminBundlesView.js +82 -125
- package/dist/features/admin/components/AdminCarouselView.d.ts +2 -2
- package/dist/features/admin/components/AdminCarouselView.js +17 -52
- package/dist/features/admin/components/AdminCartsView.d.ts +2 -3
- package/dist/features/admin/components/AdminCartsView.js +39 -88
- package/dist/features/admin/components/AdminCategoriesView.d.ts +3 -3
- package/dist/features/admin/components/AdminCategoriesView.js +98 -92
- package/dist/features/admin/components/AdminCategoryEditorView.js +2 -2
- package/dist/features/admin/components/AdminClassifiedView.d.ts +3 -0
- package/dist/features/admin/components/AdminClassifiedView.js +44 -0
- package/dist/features/admin/components/AdminContactView.d.ts +2 -2
- package/dist/features/admin/components/AdminContactView.js +104 -111
- package/dist/features/admin/components/AdminCouponsView.d.ts +3 -6
- package/dist/features/admin/components/AdminCouponsView.js +66 -86
- package/dist/features/admin/components/AdminDigitalCodesView.d.ts +3 -0
- package/dist/features/admin/components/AdminDigitalCodesView.js +51 -0
- package/dist/features/admin/components/AdminFaqsView.d.ts +4 -4
- package/dist/features/admin/components/AdminFaqsView.js +77 -33
- package/dist/features/admin/components/AdminFeaturesView.d.ts +2 -3
- package/dist/features/admin/components/AdminFeaturesView.js +57 -70
- package/dist/features/admin/components/AdminGroupedListingsView.d.ts +3 -0
- package/dist/features/admin/components/AdminGroupedListingsView.js +43 -0
- package/dist/features/admin/components/AdminHistoryView.d.ts +2 -3
- package/dist/features/admin/components/AdminHistoryView.js +35 -52
- package/dist/features/admin/components/AdminListingScaffold.d.ts +2 -2
- package/dist/features/admin/components/AdminListingScaffold.js +3 -3
- package/dist/features/admin/components/AdminLiveView.d.ts +3 -0
- package/dist/features/admin/components/AdminLiveView.js +50 -0
- package/dist/features/admin/components/AdminNewsletterView.d.ts +2 -2
- package/dist/features/admin/components/AdminNewsletterView.js +67 -97
- package/dist/features/admin/components/AdminNotificationsView.d.ts +2 -3
- package/dist/features/admin/components/AdminNotificationsView.js +67 -93
- package/dist/features/admin/components/AdminOrderEditorView.js +10 -10
- package/dist/features/admin/components/AdminOrdersView.d.ts +2 -3
- package/dist/features/admin/components/AdminOrdersView.js +93 -107
- package/dist/features/admin/components/AdminPayoutsView.d.ts +2 -3
- package/dist/features/admin/components/AdminPayoutsView.js +51 -91
- package/dist/features/admin/components/AdminPrizeDrawsView.d.ts +2 -3
- package/dist/features/admin/components/AdminPrizeDrawsView.js +39 -76
- package/dist/features/admin/components/AdminProductEditorView.js +3 -3
- package/dist/features/admin/components/AdminProductsView.d.ts +4 -4
- package/dist/features/admin/components/AdminProductsView.js +167 -163
- package/dist/features/admin/components/AdminReturnRequestsView.d.ts +1 -1
- package/dist/features/admin/components/AdminReturnRequestsView.js +64 -66
- package/dist/features/admin/components/AdminReviewsView.d.ts +3 -7
- package/dist/features/admin/components/AdminReviewsView.js +94 -110
- package/dist/features/admin/components/AdminScammersView.d.ts +2 -3
- package/dist/features/admin/components/AdminScammersView.js +53 -97
- package/dist/features/admin/components/AdminSectionsView.js +1 -1
- package/dist/features/admin/components/AdminSessionsView.d.ts +2 -3
- package/dist/features/admin/components/AdminSessionsView.js +62 -89
- package/dist/features/admin/components/AdminStoreAddressesView.d.ts +1 -1
- package/dist/features/admin/components/AdminStoreAddressesView.js +39 -53
- package/dist/features/admin/components/AdminStoreEditorView.js +21 -8
- package/dist/features/admin/components/AdminStoresView.d.ts +2 -3
- package/dist/features/admin/components/AdminStoresView.js +67 -99
- package/dist/features/admin/components/AdminSublistingCategoriesView.d.ts +1 -1
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +28 -44
- package/dist/features/admin/components/AdminSupportTicketDetailView.d.ts +10 -1
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +191 -5
- package/dist/features/admin/components/AdminSupportTicketsView.d.ts +2 -3
- package/dist/features/admin/components/AdminSupportTicketsView.js +65 -96
- package/dist/features/admin/components/AdminTeamView.d.ts +2 -2
- package/dist/features/admin/components/AdminTeamView.js +40 -74
- package/dist/features/admin/components/AdminUserEditorView.d.ts +11 -1
- package/dist/features/admin/components/AdminUserEditorView.js +80 -6
- package/dist/features/admin/components/AdminUsersView.d.ts +2 -3
- package/dist/features/admin/components/AdminUsersView.js +108 -100
- package/dist/features/admin/components/AdminViewCards.d.ts +1 -1
- package/dist/features/admin/components/AdminWishlistsView.d.ts +2 -3
- package/dist/features/admin/components/AdminWishlistsView.js +36 -62
- package/dist/features/admin/components/DataListingView.d.ts +122 -0
- package/dist/features/admin/components/DataListingView.js +66 -0
- package/dist/features/admin/components/index.d.ts +10 -4
- package/dist/features/admin/components/index.js +6 -2
- package/dist/features/admin/constants/filter-tabs.d.ts +23 -17
- package/dist/features/admin/constants/filter-tabs.js +21 -17
- package/dist/features/admin/hooks/useAdminListing.d.ts +1 -0
- package/dist/features/admin/hooks/useAdminListing.js +1 -1
- package/dist/features/admin/schemas/firestore.js +6 -7
- package/dist/features/auctions/server.d.ts +0 -1
- package/dist/features/auctions/server.js +0 -1
- package/dist/features/auth/actions/realtime-token-actions.js +1 -1
- package/dist/features/auth/repository/user.repository.js +1 -1
- package/dist/features/cart/repository/cart.repository.d.ts +4 -1
- package/dist/features/cart/repository/cart.repository.js +12 -0
- package/dist/features/checkout/hooks/useCheckoutApi.d.ts +0 -2
- package/dist/features/checkout/index.d.ts +1 -1
- package/dist/features/events/components/AdminEventsView.d.ts +3 -3
- package/dist/features/events/components/AdminEventsView.js +50 -86
- package/dist/features/events/components/EventOfferCard.d.ts +19 -0
- package/dist/features/events/components/EventOfferCard.js +29 -0
- package/dist/features/events/components/EventRaffleEntryForm.d.ts +25 -0
- package/dist/features/events/components/EventRaffleEntryForm.js +37 -0
- package/dist/features/events/components/EventRafflesSection.d.ts +1 -4
- package/dist/features/events/components/EventRafflesSection.js +17 -6
- package/dist/features/events/components/EventSaleBanner.d.ts +21 -0
- package/dist/features/events/components/EventSaleBanner.js +18 -0
- package/dist/features/events/components/index.d.ts +6 -0
- package/dist/features/events/components/index.js +4 -0
- package/dist/features/events/repository/event-entry.repository.d.ts +5 -0
- package/dist/features/events/repository/event-entry.repository.js +7 -0
- package/dist/features/filters/AsyncFacetSection.d.ts +1 -1
- package/dist/features/homepage/components/FAQSection.d.ts +0 -5
- package/dist/features/homepage/lib/live-stats.js +1 -1
- package/dist/features/homepage/schemas/firestore.d.ts +0 -2
- package/dist/features/layout/index.d.ts +0 -2
- package/dist/features/layout/index.js +0 -1
- package/dist/features/pre-orders/server.d.ts +0 -1
- package/dist/features/pre-orders/server.js +0 -1
- package/dist/features/products/components/GroupSettingsPanel.js +2 -2
- package/dist/features/products/components/PrizeDrawItemsEditor.js +2 -2
- package/dist/features/products/components/PrizeDrawsSection.d.ts +1 -4
- package/dist/features/products/components/PrizeDrawsSection.js +17 -6
- package/dist/features/products/components/PrizeRevealModal.js +1 -1
- package/dist/features/products/components/ProductCardMetadataSection.d.ts +11 -0
- package/dist/features/products/components/ProductCardMetadataSection.js +25 -0
- package/dist/features/products/components/ProductDetailPageView.js +3 -1
- package/dist/features/products/components/ProductFeaturesSelector.js +1 -1
- package/dist/features/products/components/ProductGradingTab.d.ts +13 -0
- package/dist/features/products/components/ProductGradingTab.js +25 -0
- package/dist/features/products/components/ProductGrid.js +14 -2
- package/dist/features/products/components/ProductTabsShell.d.ts +5 -1
- package/dist/features/products/components/ProductTabsShell.js +6 -1
- package/dist/features/products/components/index.d.ts +4 -0
- package/dist/features/products/components/index.js +3 -0
- package/dist/features/products/constants/action-defs.d.ts +5 -0
- package/dist/features/products/constants/action-defs.js +52 -32
- package/dist/features/products/constants/sieve.d.ts +24 -4
- package/dist/features/products/constants/sieve.js +20 -11
- package/dist/features/products/schemas/firestore.d.ts +17 -0
- package/dist/features/products/schemas/product-features.validators.d.ts +2 -2
- package/dist/features/products/schemas/product-templates.d.ts +2 -4
- package/dist/features/products/types/index.d.ts +4 -0
- package/dist/features/promotions/server.d.ts +0 -1
- package/dist/features/promotions/server.js +0 -1
- package/dist/features/search/api/route.js +44 -1
- package/dist/features/search/components/Search.js +2 -0
- package/dist/features/search/hooks/useNavSuggestions.d.ts +5 -1
- package/dist/features/search/hooks/useNavSuggestions.js +31 -4
- package/dist/features/seller/components/BrandInlineSelect.js +2 -2
- package/dist/features/seller/components/CategoryInlineSelect.js +2 -2
- package/dist/features/seller/components/SellerAddressesView.js +1 -1
- package/dist/features/seller/components/SellerAuctionsView.d.ts +3 -3
- package/dist/features/seller/components/SellerAuctionsView.js +60 -90
- package/dist/features/seller/components/SellerBidsView.js +1 -1
- package/dist/features/seller/components/SellerBundlesView.js +64 -89
- package/dist/features/seller/components/SellerClassifiedView.js +67 -90
- package/dist/features/seller/components/SellerCouponEditorView.js +1 -1
- package/dist/features/seller/components/SellerCouponsView.d.ts +2 -2
- package/dist/features/seller/components/SellerCouponsView.js +45 -84
- package/dist/features/seller/components/SellerDigitalCodesView.js +63 -88
- package/dist/features/seller/components/SellerGroupedListingsView.js +33 -49
- package/dist/features/seller/components/SellerLiveView.js +63 -84
- package/dist/features/seller/components/SellerOffersPanel.js +1 -1
- package/dist/features/seller/components/SellerOffersView.d.ts +2 -2
- package/dist/features/seller/components/SellerOffersView.js +37 -69
- package/dist/features/seller/components/SellerOrdersView.d.ts +2 -2
- package/dist/features/seller/components/SellerOrdersView.js +4 -4
- package/dist/features/seller/components/SellerPayoutMethodsView.js +1 -1
- package/dist/features/seller/components/SellerPayoutsView.d.ts +2 -2
- package/dist/features/seller/components/SellerPayoutsView.js +34 -68
- package/dist/features/seller/components/SellerPreOrdersView.d.ts +2 -2
- package/dist/features/seller/components/SellerPreOrdersView.js +49 -82
- package/dist/features/seller/components/SellerPrizeDrawsView.d.ts +2 -2
- package/dist/features/seller/components/SellerPrizeDrawsView.js +49 -82
- package/dist/features/seller/components/SellerProductShell.d.ts +1 -1
- package/dist/features/seller/components/SellerProductsView.d.ts +2 -2
- package/dist/features/seller/components/SellerProductsView.js +15 -10
- package/dist/features/seller/components/SellerShippingConfigsView.js +1 -1
- package/dist/features/seller/components/SellerSidebar.d.ts +0 -4
- package/dist/features/seller/components/SellerSidebar.js +0 -2
- package/dist/features/seller/components/SellerStoreCategoriesView.js +1 -1
- package/dist/features/seller/components/SellerTemplatesView.js +2 -2
- package/dist/features/seller/components/SellersListView.d.ts +1 -2
- package/dist/features/seller/components/analytics/SellerAnalyticsStats.d.ts +5 -0
- package/dist/features/seller/components/analytics/SellerAnalyticsStats.js +2 -8
- package/dist/features/seller/components/index.d.ts +0 -3
- package/dist/features/seller/components/index.js +0 -2
- package/dist/features/seller/server.d.ts +0 -1
- package/dist/features/seller/server.js +0 -1
- package/dist/features/shell/FormShell.d.ts +1 -1
- package/dist/features/shell/FormShell.js +4 -1
- package/dist/features/shell/field-groups/ImageFieldGroup.d.ts +18 -0
- package/dist/features/shell/field-groups/ImageFieldGroup.js +15 -0
- package/dist/features/shell/field-groups/SeoFieldGroup.d.ts +22 -0
- package/dist/features/shell/field-groups/SeoFieldGroup.js +16 -0
- package/dist/features/shell/field-groups/StatusFieldGroup.d.ts +35 -0
- package/dist/features/shell/field-groups/StatusFieldGroup.js +16 -0
- package/dist/features/shell/field-groups/TitleDescriptionGroup.d.ts +40 -0
- package/dist/features/shell/field-groups/TitleDescriptionGroup.js +16 -0
- package/dist/features/shell/field-groups/index.d.ts +13 -0
- package/dist/features/shell/field-groups/index.js +9 -0
- package/dist/features/shell/index.d.ts +2 -0
- package/dist/features/shell/index.js +1 -0
- package/dist/features/stores/components/StoreCapabilitiesGuideView.d.ts +1 -2
- package/dist/features/stores/components/StoreFinanceGuideView.d.ts +1 -2
- package/dist/features/stores/components/StoreHeader.js +2 -1
- package/dist/features/stores/components/StoreListingsGuideView.d.ts +1 -2
- package/dist/features/stores/components/StoreOrdersGuideView.d.ts +1 -2
- package/dist/features/stores/components/StoreScopedSearch.d.ts +16 -0
- package/dist/features/stores/components/StoreScopedSearch.js +27 -0
- package/dist/features/stores/components/StoreSettingsGuideView.d.ts +1 -2
- package/dist/features/stores/server.d.ts +0 -1
- package/dist/features/stores/server.js +0 -1
- package/dist/features/support/schemas/firestore.d.ts +22 -1
- package/dist/features/support/schemas/firestore.js +10 -0
- package/dist/features/wishlist/server.d.ts +0 -1
- package/dist/features/wishlist/server.js +0 -1
- package/dist/index.d.ts +9 -27
- package/dist/index.js +14 -50
- package/dist/next/routing/route-map.d.ts +8 -0
- package/dist/next/routing/route-map.js +4 -0
- package/dist/react/hooks/useListingTypeFlags.d.ts +32 -0
- package/dist/react/hooks/useListingTypeFlags.js +19 -0
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.js +1 -1
- package/dist/security/pii-redact.d.ts +8 -0
- package/dist/security/pii-redact.js +10 -1
- package/dist/seed/grouped-listings-seed-data.d.ts +4 -0
- package/dist/seed/products-preorders-seed-data.d.ts +4 -0
- package/dist/seed/products-prize-draws-seed-data.js +3 -0
- package/dist/seed/site-settings-seed-data.js +5 -5
- package/dist/seed/sub-listings-seed-data.d.ts +4 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +4 -0
- package/dist/styles.css +54 -395
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/BaseListingCard.d.ts +10 -0
- package/dist/ui/components/BaseListingCard.js +17 -1
- package/dist/ui/components/DetailPageGallery.d.ts +32 -0
- package/dist/ui/components/DetailPageGallery.js +47 -0
- package/dist/ui/components/DetailPageHero.d.ts +30 -0
- package/dist/ui/components/DetailPageHero.js +22 -0
- package/dist/ui/components/DetailPageTabs.d.ts +34 -0
- package/dist/ui/components/DetailPageTabs.js +38 -0
- package/dist/ui/components/HorizontalScroller.style.css +15 -2
- package/dist/ui/components/ListingLayout.d.ts +11 -2
- package/dist/ui/components/ListingLayout.js +12 -6
- package/dist/ui/components/PaginatedSelect.d.ts +66 -0
- package/dist/ui/components/PaginatedSelect.js +201 -0
- package/dist/ui/components/PaginatedSelect.style.css +254 -0
- package/dist/ui/components/Semantic.d.ts +0 -4
- package/dist/ui/components/Semantic.js +0 -2
- package/dist/ui/components/SettingsSection.d.ts +47 -0
- package/dist/ui/components/SettingsSection.js +38 -0
- package/dist/ui/components/index.style.css +1 -4
- package/dist/ui/index.d.ts +12 -14
- package/dist/ui/index.js +6 -7
- package/dist/utils/id-generators.d.ts +1 -18
- package/dist/utils/id-generators.js +51 -18
- package/dist/validation/schemas.d.ts +25 -0
- package/dist/validation/schemas.js +28 -0
- package/package.json +1 -1
|
@@ -15,7 +15,10 @@ export function useFormShell() {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
const FOCUSABLE = 'a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';
|
|
18
|
-
export function FormShell({ isOpen, onClose, title, breadcrumb, isDirty = false, isLoading = false, sections, onSaveDraft, onPublish, saveLabel = FORM_ACTION_META[FORM_ACTION_ID.SAVE_DRAFT].label, publishLabel = FORM_ACTION_META[FORM_ACTION_ID.PUBLISH].label, renderBottomBar, previewSlot, splitPreview
|
|
18
|
+
export function FormShell({ isOpen, onClose, title, breadcrumb, isDirty = false, isLoading = false, sections, onSaveDraft, onPublish, saveLabel = FORM_ACTION_META[FORM_ACTION_ID.SAVE_DRAFT].label, publishLabel = FORM_ACTION_META[FORM_ACTION_ID.PUBLISH].label, renderBottomBar, previewSlot, splitPreview: splitPreviewProp, children, }) {
|
|
19
|
+
// W1-37: auto-enable splitPreview when a previewSlot is provided. Callers
|
|
20
|
+
// can still pass splitPreview={false} explicitly to opt out.
|
|
21
|
+
const splitPreview = splitPreviewProp ?? Boolean(previewSlot);
|
|
19
22
|
const panelRef = useRef(null);
|
|
20
23
|
const bodyRef = useRef(null);
|
|
21
24
|
const [showUnsaved, setShowUnsaved] = useState(false);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface ImageFieldGroupProps {
|
|
3
|
+
/** Slot for the hero / cover image input — wire your own ImageUpload here. */
|
|
4
|
+
heroSlot?: ReactNode;
|
|
5
|
+
/** Slot for an additional gallery input (e.g. MediaUploadField with multi-image). */
|
|
6
|
+
gallerySlot?: ReactNode;
|
|
7
|
+
/** Optional section label override. */
|
|
8
|
+
sectionTitle?: ReactNode;
|
|
9
|
+
sectionDescription?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* `ImageFieldGroup` — wraps hero + gallery image slots in a `SettingsSection`.
|
|
13
|
+
* The actual `<ImageUpload>` / `<MediaUploadField>` instances stay with the
|
|
14
|
+
* consumer because their `onUpload` / context wiring is form-specific.
|
|
15
|
+
*
|
|
16
|
+
* W1-15 — extracted 2026-05-23.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ImageFieldGroup({ heroSlot, gallerySlot, sectionTitle, sectionDescription, }: ImageFieldGroupProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { SettingsSection } from "../../../ui/components/SettingsSection";
|
|
4
|
+
/**
|
|
5
|
+
* `ImageFieldGroup` — wraps hero + gallery image slots in a `SettingsSection`.
|
|
6
|
+
* The actual `<ImageUpload>` / `<MediaUploadField>` instances stay with the
|
|
7
|
+
* consumer because their `onUpload` / context wiring is form-specific.
|
|
8
|
+
*
|
|
9
|
+
* W1-15 — extracted 2026-05-23.
|
|
10
|
+
*/
|
|
11
|
+
export function ImageFieldGroup({ heroSlot, gallerySlot, sectionTitle = "Images", sectionDescription, }) {
|
|
12
|
+
if (!heroSlot && !gallerySlot)
|
|
13
|
+
return null;
|
|
14
|
+
return (_jsxs(SettingsSection, { title: sectionTitle, description: sectionDescription, children: [heroSlot, gallerySlot] }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface SeoFieldGroupProps {
|
|
3
|
+
seoTitle: string;
|
|
4
|
+
seoDescription: string;
|
|
5
|
+
slug: string;
|
|
6
|
+
onSeoTitleChange: (next: string) => void;
|
|
7
|
+
onSeoDescriptionChange: (next: string) => void;
|
|
8
|
+
onSlugChange?: (next: string) => void;
|
|
9
|
+
/** Read-only computed canonical URL preview (e.g. `https://letitrip.in/products/<slug>`). */
|
|
10
|
+
canonicalPreview?: string;
|
|
11
|
+
/** Optional section label override. */
|
|
12
|
+
sectionTitle?: ReactNode;
|
|
13
|
+
sectionDescription?: ReactNode;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* `SeoFieldGroup` — shared SEO inputs (title / description / slug) used across
|
|
18
|
+
* Product, Blog, Category, FAQ editors.
|
|
19
|
+
*
|
|
20
|
+
* W1-15 — extracted 2026-05-23.
|
|
21
|
+
*/
|
|
22
|
+
export declare function SeoFieldGroup({ seoTitle, seoDescription, slug, onSeoTitleChange, onSeoDescriptionChange, onSlugChange, canonicalPreview, sectionTitle, sectionDescription, disabled, }: SeoFieldGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Input } from "../../../ui/components/Input";
|
|
4
|
+
import { Textarea } from "../../../ui/components/Textarea";
|
|
5
|
+
import { SettingsSection } from "../../../ui/components/SettingsSection";
|
|
6
|
+
const SEO_TITLE_MAX = 60;
|
|
7
|
+
const SEO_DESC_MAX = 160;
|
|
8
|
+
/**
|
|
9
|
+
* `SeoFieldGroup` — shared SEO inputs (title / description / slug) used across
|
|
10
|
+
* Product, Blog, Category, FAQ editors.
|
|
11
|
+
*
|
|
12
|
+
* W1-15 — extracted 2026-05-23.
|
|
13
|
+
*/
|
|
14
|
+
export function SeoFieldGroup({ seoTitle, seoDescription, slug, onSeoTitleChange, onSeoDescriptionChange, onSlugChange, canonicalPreview, sectionTitle = "SEO", sectionDescription = "Override the auto-generated metadata if needed. Leave blank to use defaults.", disabled = false, }) {
|
|
15
|
+
return (_jsxs(SettingsSection, { title: sectionTitle, description: sectionDescription, children: [_jsx(Input, { label: "SEO title", value: seoTitle, onChange: (e) => onSeoTitleChange(e.target.value), placeholder: "Falls back to the page title", maxLength: SEO_TITLE_MAX, helperText: `Max ${SEO_TITLE_MAX} characters.`, disabled: disabled }), _jsx(Textarea, { label: "SEO description", value: seoDescription, onChange: (e) => onSeoDescriptionChange(e.target.value), placeholder: "Falls back to the page description", maxLength: SEO_DESC_MAX, helperText: `Max ${SEO_DESC_MAX} characters.`, rows: 3, disabled: disabled }), onSlugChange ? (_jsx(Input, { label: "URL slug", value: slug, onChange: (e) => onSlugChange(e.target.value), disabled: disabled, helperText: canonicalPreview ? `Canonical: ${canonicalPreview}` : undefined })) : null] }));
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface StatusFieldGroupOption<T extends string = string> {
|
|
3
|
+
value: T;
|
|
4
|
+
label: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface StatusFieldGroupProps<T extends string = string> {
|
|
8
|
+
/** Current status value. */
|
|
9
|
+
status: T;
|
|
10
|
+
/** Available status options. */
|
|
11
|
+
options: readonly StatusFieldGroupOption<T>[];
|
|
12
|
+
/** Setter. */
|
|
13
|
+
onStatusChange: (next: T) => void;
|
|
14
|
+
/** Optional sub-toggles below the status select (e.g. `isFeatured`, `isPromoted`). */
|
|
15
|
+
toggles?: ReadonlyArray<{
|
|
16
|
+
key: string;
|
|
17
|
+
label: ReactNode;
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
checked: boolean;
|
|
20
|
+
onChange: (next: boolean) => void;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
/** Optional section label override. */
|
|
24
|
+
sectionTitle?: ReactNode;
|
|
25
|
+
sectionDescription?: ReactNode;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* `StatusFieldGroup` — status select plus optional sub-toggles (featured /
|
|
30
|
+
* promoted / pinned, etc.) used across Product, Blog, Event, Coupon, FAQ
|
|
31
|
+
* editors.
|
|
32
|
+
*
|
|
33
|
+
* W1-15 — extracted 2026-05-23.
|
|
34
|
+
*/
|
|
35
|
+
export declare function StatusFieldGroup<T extends string = string>({ status, options, onStatusChange, toggles, sectionTitle, sectionDescription, disabled, }: StatusFieldGroupProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Select } from "../../../ui/components/Select";
|
|
4
|
+
import { ToggleRow, SettingsSection } from "../../../ui/components/SettingsSection";
|
|
5
|
+
/**
|
|
6
|
+
* `StatusFieldGroup` — status select plus optional sub-toggles (featured /
|
|
7
|
+
* promoted / pinned, etc.) used across Product, Blog, Event, Coupon, FAQ
|
|
8
|
+
* editors.
|
|
9
|
+
*
|
|
10
|
+
* W1-15 — extracted 2026-05-23.
|
|
11
|
+
*/
|
|
12
|
+
export function StatusFieldGroup({ status, options, onStatusChange, toggles, sectionTitle = "Status", sectionDescription, disabled = false, }) {
|
|
13
|
+
return (_jsxs(SettingsSection, { title: sectionTitle, description: sectionDescription, children: [_jsx(Select, { label: "Visibility status", value: status, onValueChange: (v) => onStatusChange(v), options: options.map((o) => ({ value: o.value, label: o.label })), disabled: disabled }), toggles?.length
|
|
14
|
+
? toggles.map((t) => (_jsx(ToggleRow, { label: t.label, description: t.description, checked: t.checked, onChange: t.onChange, disabled: t.disabled ?? disabled }, t.key)))
|
|
15
|
+
: null] }));
|
|
16
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export interface TitleDescriptionGroupProps {
|
|
3
|
+
/** Form field value: title. */
|
|
4
|
+
title: string;
|
|
5
|
+
/** Form field value: description (plain text). */
|
|
6
|
+
description: string;
|
|
7
|
+
/** Setters. */
|
|
8
|
+
onTitleChange: (next: string) => void;
|
|
9
|
+
onDescriptionChange: (next: string) => void;
|
|
10
|
+
/** Optional section label override. */
|
|
11
|
+
sectionTitle?: ReactNode;
|
|
12
|
+
/** Optional section description. */
|
|
13
|
+
sectionDescription?: ReactNode;
|
|
14
|
+
/** Optional placeholder overrides. */
|
|
15
|
+
titlePlaceholder?: string;
|
|
16
|
+
descriptionPlaceholder?: string;
|
|
17
|
+
/** Disable both inputs. */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** When true, render a rich-text editor instead of plain `<Textarea>` (consumer-provided). */
|
|
20
|
+
renderDescription?: (args: {
|
|
21
|
+
value: string;
|
|
22
|
+
onChange: (next: string) => void;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
}) => ReactNode;
|
|
25
|
+
/** Field-level validation messages. */
|
|
26
|
+
titleError?: string;
|
|
27
|
+
descriptionError?: string;
|
|
28
|
+
/** Max length helpers. */
|
|
29
|
+
titleMaxLength?: number;
|
|
30
|
+
descriptionMaxLength?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* `TitleDescriptionGroup` — shared title + description fields used across
|
|
34
|
+
* Product, Blog, Category, Event, FAQ, Feature, Brand editors. Optionally
|
|
35
|
+
* accepts a `renderDescription` slot to plug in the rich-text editor without
|
|
36
|
+
* coupling this primitive to it.
|
|
37
|
+
*
|
|
38
|
+
* W1-15 — extracted 2026-05-23.
|
|
39
|
+
*/
|
|
40
|
+
export declare function TitleDescriptionGroup({ title, description, onTitleChange, onDescriptionChange, sectionTitle, sectionDescription, titlePlaceholder, descriptionPlaceholder, disabled, renderDescription, titleError, descriptionError, titleMaxLength, descriptionMaxLength, }: TitleDescriptionGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Input } from "../../../ui/components/Input";
|
|
4
|
+
import { Textarea } from "../../../ui/components/Textarea";
|
|
5
|
+
import { SettingsSection } from "../../../ui/components/SettingsSection";
|
|
6
|
+
/**
|
|
7
|
+
* `TitleDescriptionGroup` — shared title + description fields used across
|
|
8
|
+
* Product, Blog, Category, Event, FAQ, Feature, Brand editors. Optionally
|
|
9
|
+
* accepts a `renderDescription` slot to plug in the rich-text editor without
|
|
10
|
+
* coupling this primitive to it.
|
|
11
|
+
*
|
|
12
|
+
* W1-15 — extracted 2026-05-23.
|
|
13
|
+
*/
|
|
14
|
+
export function TitleDescriptionGroup({ title, description, onTitleChange, onDescriptionChange, sectionTitle = "Title & description", sectionDescription, titlePlaceholder, descriptionPlaceholder, disabled = false, renderDescription, titleError, descriptionError, titleMaxLength, descriptionMaxLength, }) {
|
|
15
|
+
return (_jsxs(SettingsSection, { title: sectionTitle, description: sectionDescription, children: [_jsx(Input, { label: "Title", value: title, onChange: (e) => onTitleChange(e.target.value), placeholder: titlePlaceholder, disabled: disabled, maxLength: titleMaxLength, error: titleError, required: true }), renderDescription ? (renderDescription({ value: description, onChange: onDescriptionChange, disabled })) : (_jsx(Textarea, { label: "Description", value: description, onChange: (e) => onDescriptionChange(e.target.value), placeholder: descriptionPlaceholder, disabled: disabled, maxLength: descriptionMaxLength, error: descriptionError, rows: 5 }))] }));
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field-group primitives (W1-15) — composable form sections used across the
|
|
3
|
+
* admin/seller editor surface. Each group is a thin wrapper around primitive
|
|
4
|
+
* inputs that encapsulates a recurring 3-or-more-field pattern.
|
|
5
|
+
*/
|
|
6
|
+
export type { TitleDescriptionGroupProps } from "./TitleDescriptionGroup";
|
|
7
|
+
export { TitleDescriptionGroup } from "./TitleDescriptionGroup";
|
|
8
|
+
export type { ImageFieldGroupProps } from "./ImageFieldGroup";
|
|
9
|
+
export { ImageFieldGroup } from "./ImageFieldGroup";
|
|
10
|
+
export type { SeoFieldGroupProps } from "./SeoFieldGroup";
|
|
11
|
+
export { SeoFieldGroup } from "./SeoFieldGroup";
|
|
12
|
+
export type { StatusFieldGroupProps, StatusFieldGroupOption } from "./StatusFieldGroup";
|
|
13
|
+
export { StatusFieldGroup } from "./StatusFieldGroup";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Field-group primitives (W1-15) — composable form sections used across the
|
|
3
|
+
* admin/seller editor surface. Each group is a thin wrapper around primitive
|
|
4
|
+
* inputs that encapsulates a recurring 3-or-more-field pattern.
|
|
5
|
+
*/
|
|
6
|
+
export { TitleDescriptionGroup } from "./TitleDescriptionGroup";
|
|
7
|
+
export { ImageFieldGroup } from "./ImageFieldGroup";
|
|
8
|
+
export { SeoFieldGroup } from "./SeoFieldGroup";
|
|
9
|
+
export { StatusFieldGroup } from "./StatusFieldGroup";
|
|
@@ -4,3 +4,5 @@ export type { QuickFieldType, QuickFieldDef, QuickFormDrawerProps } from "./Quic
|
|
|
4
4
|
export { QuickFormDrawer } from "./QuickFormDrawer";
|
|
5
5
|
export type { StepDef, StepFormProps, StepFormActionsProps } from "./StepForm";
|
|
6
6
|
export { StepForm, StepFormActions, StepIndicator } from "./StepForm";
|
|
7
|
+
export type { TitleDescriptionGroupProps, ImageFieldGroupProps, SeoFieldGroupProps, StatusFieldGroupProps, StatusFieldGroupOption, } from "./field-groups";
|
|
8
|
+
export { TitleDescriptionGroup, ImageFieldGroup, SeoFieldGroup, StatusFieldGroup, } from "./field-groups";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { FormShell, useFormShell } from "./FormShell";
|
|
2
2
|
export { QuickFormDrawer } from "./QuickFormDrawer";
|
|
3
3
|
export { StepForm, StepFormActions, StepIndicator } from "./StepForm";
|
|
4
|
+
export { TitleDescriptionGroup, ImageFieldGroup, SeoFieldGroup, StatusFieldGroup, } from "./field-groups";
|
|
@@ -2,8 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Button, Div, Heading, RichText, Row, Section, Span, Text, } from "../../../ui";
|
|
3
3
|
import { normalizeRichTextHtml } from "../../../utils/string.formatter";
|
|
4
4
|
import { ShareButton } from "../../products/components/ShareButton";
|
|
5
|
+
import { StoreScopedSearch } from "./StoreScopedSearch";
|
|
5
6
|
export function StoreHeader({ store, labels = {}, onFollow, className = "", }) {
|
|
6
7
|
return (_jsxs(Section, { surface: "default", className: `border-b border-gray-200 dark:border-slate-700 ${className}`, children: [store.storeBannerURL && (_jsx(Div, { className: "h-40 md:h-56 overflow-hidden bg-gray-100 dark:bg-slate-800", children: _jsx(Div, { role: "img", "aria-label": `${store.storeName} banner`, className: "h-full w-full bg-center bg-cover", style: { backgroundImage: `url(${store.storeBannerURL})` } }) })), _jsxs(Div, { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4", children: [_jsxs(Div, { className: "flex items-end gap-4", children: [store.storeLogoURL ? (_jsx(Div, { role: "img", "aria-label": store.storeName, className: "-mt-8 h-16 w-16 rounded-xl border-2 border-white dark:border-slate-800 bg-center bg-cover shadow-sm", style: { backgroundImage: `url(${store.storeLogoURL})` } })) : (_jsx(Div, { className: "-mt-8 h-16 w-16 rounded-xl border-2 border-white dark:border-slate-800 bg-orange-100 dark:bg-orange-900/30 flex items-center justify-center text-orange-600 dark:text-orange-400 font-bold text-2xl shadow-sm", children: store.storeName[0]?.toUpperCase() })), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsxs(Div, { className: "flex flex-wrap items-center gap-2 mb-0.5", children: [_jsx(Heading, { level: 1, className: "text-xl font-bold text-gray-900 dark:text-zinc-100", children: store.storeName }), store.averageRating != null && store.averageRating > 0 && (_jsxs(Span, { className: "inline-flex items-center gap-1 text-sm font-medium text-amber-500", children: ["\u2605 ", store.averageRating.toFixed(1)] }))] }), _jsxs(Row, { className: "gap-3 text-xs text-gray-500 dark:text-zinc-400 mb-0.5", children: [store.category && _jsx(Span, { className: "capitalize", children: store.category }), store.totalProducts != null && store.totalProducts > 0 && (_jsxs(Span, { children: [store.totalProducts, " ", labels.products ?? "products"] })), store.totalReviews != null && store.totalReviews > 0 && (_jsxs(Span, { children: [store.totalReviews, " ", labels.reviews ?? "reviews"] })), store.itemsSold != null && store.itemsSold > 0 && (_jsxs(Span, { children: [store.itemsSold, " ", labels.sold ?? "sold"] }))] }), store.storeDescription && (_jsx(RichText, { html: normalizeRichTextHtml(store.storeDescription), copyableCode: true, className: "mt-0.5" }))] }), _jsxs(Row, { gap: "sm", align: "center", className: "shrink-0", children: [_jsx(ShareButton, { title: store.storeName }), onFollow && (_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => onFollow(store.storeSlug), className: "rounded-lg border border-orange-500 px-4 py-2 text-sm font-medium text-orange-500 hover:bg-orange-50 transition-colors", children: labels.follow ?? "Follow" }))] })] }), store.isVacationMode && (_jsx(Text, { className: "mt-3 rounded-lg bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 px-3 py-2 text-sm text-yellow-700 dark:text-yellow-300", children: store.vacationMessage ??
|
|
7
8
|
labels.vacationMode ??
|
|
8
|
-
"Store is on vacation mode" }))] })] }));
|
|
9
|
+
"Store is on vacation mode" })), _jsx(Div, { className: "mt-3", children: _jsx(StoreScopedSearch, { storeId: store.storeSlug, storeName: store.storeName }) })] })] }));
|
|
9
10
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface StoreScopedSearchProps {
|
|
2
|
+
storeId: string;
|
|
3
|
+
storeName: string;
|
|
4
|
+
/** Override placeholder; falls back to "Search {storeName}…". */
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* W1-19 — inline search input scoped to a single store. Submits to
|
|
10
|
+
* `/products?storeId={storeId}&q={query}` so the public product listing
|
|
11
|
+
* filters down to this seller's catalog. Lives alongside `StoreHeader` and
|
|
12
|
+
* is the store-page complement to the global `<Search>` slot rendered in
|
|
13
|
+
* `LayoutShellClient`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function StoreScopedSearch({ storeId, storeName, placeholder, className, }: StoreScopedSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { useRouter } from "next/navigation";
|
|
5
|
+
import { Button, Input, Row } from "../../../ui";
|
|
6
|
+
import { ROUTES } from "../../../next/routing/route-map";
|
|
7
|
+
/**
|
|
8
|
+
* W1-19 — inline search input scoped to a single store. Submits to
|
|
9
|
+
* `/products?storeId={storeId}&q={query}` so the public product listing
|
|
10
|
+
* filters down to this seller's catalog. Lives alongside `StoreHeader` and
|
|
11
|
+
* is the store-page complement to the global `<Search>` slot rendered in
|
|
12
|
+
* `LayoutShellClient`.
|
|
13
|
+
*/
|
|
14
|
+
export function StoreScopedSearch({ storeId, storeName, placeholder, className = "", }) {
|
|
15
|
+
const router = useRouter();
|
|
16
|
+
const [value, setValue] = useState("");
|
|
17
|
+
const submit = (e) => {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
const q = value.trim();
|
|
20
|
+
const base = String(ROUTES.PUBLIC.PRODUCTS);
|
|
21
|
+
const params = new URLSearchParams({ storeId });
|
|
22
|
+
if (q)
|
|
23
|
+
params.set("q", q);
|
|
24
|
+
router.push(`${base}?${params.toString()}`);
|
|
25
|
+
};
|
|
26
|
+
return (_jsx("form", { onSubmit: submit, className: `w-full ${className}`, children: _jsxs(Row, { gap: "sm", align: "center", className: "w-full", children: [_jsx(Input, { type: "search", value: value, onChange: (e) => setValue(e.target.value), placeholder: placeholder ?? `Search ${storeName}…`, "aria-label": `Search ${storeName}`, className: "flex-1" }), _jsx(Button, { type: "submit", variant: "primary", size: "sm", children: "Search" })] }) }));
|
|
27
|
+
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Server-only entry point — repositories and API route handlers.
|
|
5
5
|
*/
|
|
6
6
|
export * from "./actions";
|
|
7
|
-
export { StoresRepository } from "./repository/stores.repository";
|
|
8
7
|
export { StoreRepository, storeRepository, } from "./repository/store.repository";
|
|
9
8
|
export { GET as storesGET, GET } from "./api/route";
|
|
10
9
|
export { GET as storeSlugGET } from "./api/[storeSlug]/route";
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* Server-only entry point — repositories and API route handlers.
|
|
5
5
|
*/
|
|
6
6
|
export * from "./actions";
|
|
7
|
-
export { StoresRepository } from "./repository/stores.repository";
|
|
8
7
|
export { StoreRepository, storeRepository, } from "./repository/store.repository";
|
|
9
8
|
// SB-UNI-A 2026-05-13 — storeAddressRepository deleted. Use addressesRepository
|
|
10
9
|
// (top-level addresses collection with ownerType:"store").
|
|
@@ -23,6 +23,9 @@ export declare const TicketCategoryValues: {
|
|
|
23
23
|
readonly REFUND_REQUEST: "refund_request";
|
|
24
24
|
readonly AUCTION_DISPUTE: "auction_dispute";
|
|
25
25
|
readonly GENERAL: "general";
|
|
26
|
+
readonly STORE_CHANGE_REQUEST: "store_change_request";
|
|
27
|
+
readonly ORDER_MODIFICATION_REQUEST: "order_modification_request";
|
|
28
|
+
readonly UNBAN_REQUEST: "unban_request";
|
|
26
29
|
};
|
|
27
30
|
export type TicketCategory = (typeof TicketCategoryValues)[keyof typeof TicketCategoryValues];
|
|
28
31
|
export declare const TicketStatusValues: {
|
|
@@ -54,6 +57,19 @@ export interface TicketMessage {
|
|
|
54
57
|
attachments?: string[];
|
|
55
58
|
createdAt: Date;
|
|
56
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Subject entities a ticket concerns. Assigned by admin/support agents so a
|
|
62
|
+
* single ticket can reference the buyer, store, order, product, or bid in
|
|
63
|
+
* dispute. Used to render clickable chips in the ticket detail view that link
|
|
64
|
+
* to the relevant admin detail page.
|
|
65
|
+
*/
|
|
66
|
+
export interface TicketRelatedParties {
|
|
67
|
+
userId?: string;
|
|
68
|
+
storeId?: string;
|
|
69
|
+
orderId?: string;
|
|
70
|
+
productId?: string;
|
|
71
|
+
bidId?: string;
|
|
72
|
+
}
|
|
57
73
|
export interface SupportTicketDocument {
|
|
58
74
|
id: string;
|
|
59
75
|
userId: string;
|
|
@@ -67,6 +83,11 @@ export interface SupportTicketDocument {
|
|
|
67
83
|
description: string;
|
|
68
84
|
/** Linked order ID — required when category === "order_issue". */
|
|
69
85
|
orderId?: string;
|
|
86
|
+
/**
|
|
87
|
+
* ST-6 — subjects of the ticket. Admin/support assignable. `orderId` is
|
|
88
|
+
* mirrored here for consistency when set via the linked-parties panel.
|
|
89
|
+
*/
|
|
90
|
+
relatedParties?: TicketRelatedParties;
|
|
70
91
|
status: TicketStatus;
|
|
71
92
|
priority: TicketPriority;
|
|
72
93
|
/** UID of the assigned employee. */
|
|
@@ -86,7 +107,7 @@ export interface SupportTicketDocument {
|
|
|
86
107
|
updatedAt: Date;
|
|
87
108
|
}
|
|
88
109
|
export type SupportTicketCreateInput = Pick<SupportTicketDocument, "userId" | "userEmail" | "userDisplayName" | "category" | "subject" | "description" | "orderId">;
|
|
89
|
-
export type SupportTicketUpdateInput = Partial<Pick<SupportTicketDocument, "status" | "priority" | "assignedTo" | "assignedToName" | "internalNotes" | "resolvedAt" | "closedAt">>;
|
|
110
|
+
export type SupportTicketUpdateInput = Partial<Pick<SupportTicketDocument, "status" | "priority" | "assignedTo" | "assignedToName" | "internalNotes" | "resolvedAt" | "closedAt" | "relatedParties">>;
|
|
90
111
|
export declare const SUPPORT_TICKET_COLLECTION: "supportTickets";
|
|
91
112
|
export declare const SUPPORT_TICKET_ID_PREFIX: "ticket-";
|
|
92
113
|
export declare const SUPPORT_TICKET_INDEXED_FIELDS: readonly ["userId", "status", "category", "priority", "assignedTo", "orderId", "createdAt", "updatedAt"];
|
|
@@ -26,6 +26,16 @@ export const TicketCategoryValues = {
|
|
|
26
26
|
REFUND_REQUEST: "refund_request",
|
|
27
27
|
AUCTION_DISPUTE: "auction_dispute",
|
|
28
28
|
GENERAL: "general",
|
|
29
|
+
// ST-4 — sellers request admin-only field changes on their store
|
|
30
|
+
// (status / capabilities / isVerified) through this category.
|
|
31
|
+
STORE_CHANGE_REQUEST: "store_change_request",
|
|
32
|
+
// ST-3 — buyers/sellers request mutation of order line items
|
|
33
|
+
// (wrong item shipped, partial fulfilment, bundle correction).
|
|
34
|
+
ORDER_MODIFICATION_REQUEST: "order_modification_request",
|
|
35
|
+
// ST-5 — users appeal a soft-ban or hard-ban via this category.
|
|
36
|
+
// Server bypasses the create_support_tickets soft-ban guard and the
|
|
37
|
+
// active-ticket limit so the user always has an appeal channel.
|
|
38
|
+
UNBAN_REQUEST: "unban_request",
|
|
29
39
|
};
|
|
30
40
|
export const TicketStatusValues = {
|
|
31
41
|
OPEN: "open",
|
|
@@ -4,5 +4,4 @@
|
|
|
4
4
|
* Server-only entry point for wishlist repositories.
|
|
5
5
|
*/
|
|
6
6
|
export * from "./actions";
|
|
7
|
-
export { WishlistRepository } from "./repository/wishlist.repository";
|
|
8
7
|
export { UserWishlistRepository, wishlistRepository, WishlistFullError, type UserWishlistItem, type WishlistDocument, type WishlistItemSnapshot, } from "./repository/user-wishlist.repository";
|
|
@@ -4,5 +4,4 @@
|
|
|
4
4
|
* Server-only entry point for wishlist repositories.
|
|
5
5
|
*/
|
|
6
6
|
export * from "./actions";
|
|
7
|
-
export { WishlistRepository } from "./repository/wishlist.repository";
|
|
8
7
|
export { UserWishlistRepository, wishlistRepository, WishlistFullError, } from "./repository/user-wishlist.repository";
|
package/dist/index.d.ts
CHANGED
|
@@ -64,18 +64,14 @@ export type { DrawerMode } from "./ui/index";
|
|
|
64
64
|
export type { DrawerProps } from "./ui/index";
|
|
65
65
|
export type { DropdownMenuItem } from "./ui/index";
|
|
66
66
|
export type { DropdownProps } from "./ui/index";
|
|
67
|
-
export type {
|
|
68
|
-
export type {
|
|
69
|
-
export
|
|
70
|
-
export { InlineCreateSelect } from "./ui/index";
|
|
71
|
-
export type { PaginatedMultiSelectProps } from "./ui/index";
|
|
72
|
-
export { PaginatedMultiSelect } from "./ui/index";
|
|
67
|
+
export type { PaginatedSelectOption } from "./ui/index";
|
|
68
|
+
export type { PaginatedSelectProps } from "./ui/index";
|
|
69
|
+
export { PaginatedSelect } from "./ui/index";
|
|
73
70
|
export { EmptyState } from "./ui/index";
|
|
74
71
|
export type { EmptyStateProps } from "./ui/index";
|
|
75
72
|
export type { FilterDrawerProps } from "./ui/index";
|
|
76
73
|
export type { FlowDiagramProps } from "./ui/index";
|
|
77
74
|
export type { FlowStep } from "./ui/index";
|
|
78
|
-
export type { FooterProps } from "./ui/index";
|
|
79
75
|
export type { FormActionsProps } from "./ui/index";
|
|
80
76
|
export type { FormFieldProps } from "./ui/index";
|
|
81
77
|
export type { FormFieldSpanProps } from "./ui/index";
|
|
@@ -113,9 +109,6 @@ export { generateOrderId } from "./utils/index";
|
|
|
113
109
|
export { generatePayoutId } from "./utils/index";
|
|
114
110
|
export { generatePreOrderId } from "./utils/index";
|
|
115
111
|
export { generateProductId } from "./utils/index";
|
|
116
|
-
export { generateProductImageFilename } from "./utils/index";
|
|
117
|
-
export { generateStoreBannerFilename } from "./utils/index";
|
|
118
|
-
export { generateStoreLogoFilename } from "./utils/index";
|
|
119
112
|
export { getBusinessDaysElapsed } from "./utils/index";
|
|
120
113
|
export { getBusinessDaysRemaining } from "./utils/index";
|
|
121
114
|
export { inferMediaTypeFromMime } from "./utils/index";
|
|
@@ -1107,6 +1100,9 @@ export type { QuickEditAction, QuickEditMenuProps } from "./features/admin/index
|
|
|
1107
1100
|
export { AdminPageHeader } from "./features/admin/index";
|
|
1108
1101
|
export { AdminPayoutsView } from "./features/admin/index";
|
|
1109
1102
|
export { AdminPrizeDrawsView } from "./features/admin/index";
|
|
1103
|
+
export { AdminClassifiedView } from "./features/admin/index";
|
|
1104
|
+
export { AdminDigitalCodesView } from "./features/admin/index";
|
|
1105
|
+
export { AdminLiveView } from "./features/admin/index";
|
|
1110
1106
|
export type { AdminPrizeDrawsViewProps } from "./features/admin/index";
|
|
1111
1107
|
export { AdminProductsView } from "./features/admin/index";
|
|
1112
1108
|
export { AdminProductEditorView } from "./features/admin/index";
|
|
@@ -1181,7 +1177,6 @@ export { useCreateChatRoom } from "./features/admin/index";
|
|
|
1181
1177
|
export { useDashboardStats } from "./features/admin/index";
|
|
1182
1178
|
export { useDeleteChatRoom } from "./features/admin/index";
|
|
1183
1179
|
export { useAdminListingData } from "./features/admin/index";
|
|
1184
|
-
export { AdminListingScaffold } from "./features/admin/index";
|
|
1185
1180
|
export { toRecordArray } from "./features/admin/index";
|
|
1186
1181
|
export { toStringValue } from "./features/admin/index";
|
|
1187
1182
|
export { toRelativeDate } from "./features/admin/index";
|
|
@@ -1353,7 +1348,6 @@ export type { PlaceBidPayload } from "./features/auctions/index";
|
|
|
1353
1348
|
export type { PublicBid } from "./features/auctions/index";
|
|
1354
1349
|
export type { RealtimeBidData } from "./features/auctions/index";
|
|
1355
1350
|
export type { UseRealtimeBidsReturn } from "./features/auctions/index";
|
|
1356
|
-
export { AuctionsRepository } from "./features/auctions/server";
|
|
1357
1351
|
export { GET } from "./features/auctions/server";
|
|
1358
1352
|
export { bidsGET } from "./features/auctions/server";
|
|
1359
1353
|
export { getBidById } from "./features/auctions/server";
|
|
@@ -1461,7 +1455,6 @@ export { buildBeforeAfterColumns } from "./features/before-after/index";
|
|
|
1461
1455
|
export { useBeforeAfter } from "./features/before-after/index";
|
|
1462
1456
|
export type { BeforeAfterItem } from "./features/before-after/index";
|
|
1463
1457
|
export type { BeforeAfterListResponse } from "./features/before-after/index";
|
|
1464
|
-
export { BeforeAfterRepository } from "./features/before-after/server";
|
|
1465
1458
|
export { BLOG_ADMIN_SORT_OPTIONS } from "./features/blog/index";
|
|
1466
1459
|
export { BLOG_FILTER_KEYS } from "./features/blog/index";
|
|
1467
1460
|
export { BLOG_POSTS_COLLECTION } from "./features/blog/index";
|
|
@@ -1669,7 +1662,6 @@ export { useCollection } from "./features/collections/index";
|
|
|
1669
1662
|
export { useCollections } from "./features/collections/index";
|
|
1670
1663
|
export type { CollectionItem } from "./features/collections/index";
|
|
1671
1664
|
export type { CollectionListItem } from "./features/collections/index";
|
|
1672
|
-
export { CollectionsRepository } from "./features/collections/server";
|
|
1673
1665
|
export { ConsultationForm } from "./features/consultation/index";
|
|
1674
1666
|
export { bookConsultationSchema } from "./features/consultation/index";
|
|
1675
1667
|
export { buildConsultationColumns } from "./features/consultation/index";
|
|
@@ -2300,7 +2292,6 @@ export type { PreOrderItem } from "./features/pre-orders/index";
|
|
|
2300
2292
|
export type { PreOrderStatus } from "./features/pre-orders/index";
|
|
2301
2293
|
export type { PreorderItem } from "./features/pre-orders/index";
|
|
2302
2294
|
export type { PreorderStatus } from "./features/pre-orders/index";
|
|
2303
|
-
export { PreordersRepository } from "./features/pre-orders/server";
|
|
2304
2295
|
export { preOrdersGET } from "./features/pre-orders/server";
|
|
2305
2296
|
export { preOrdersPOST } from "./features/pre-orders/server";
|
|
2306
2297
|
export { AuctionDetailView } from "./features/products/index";
|
|
@@ -2497,7 +2488,6 @@ export type { RestrictionsConfig } from "./features/promotions/index";
|
|
|
2497
2488
|
export type { TieredDiscount } from "./features/promotions/index";
|
|
2498
2489
|
export type { UsageConfig } from "./features/promotions/index";
|
|
2499
2490
|
export type { ValidityConfig } from "./features/promotions/index";
|
|
2500
|
-
export { PromotionsRepository } from "./features/promotions/server";
|
|
2501
2491
|
export { getPromotions } from "./features/promotions/server";
|
|
2502
2492
|
export { promotionsGET } from "./features/promotions/server";
|
|
2503
2493
|
export { sellerCreateCoupon } from "./features/promotions/server";
|
|
@@ -2647,8 +2637,6 @@ export type { SellerPrizeDrawsViewProps } from "./features/seller/index";
|
|
|
2647
2637
|
export { SellerProductsView } from "./features/seller/index";
|
|
2648
2638
|
export { SellerRevenueChart } from "./features/seller/index";
|
|
2649
2639
|
export { SellerShippingView } from "./features/seller/index";
|
|
2650
|
-
export { SellerSidebar } from "./features/seller/index";
|
|
2651
|
-
export { SellerStatCard } from "./features/seller/index";
|
|
2652
2640
|
export { SellerStoreSetupView } from "./features/seller/index";
|
|
2653
2641
|
export { SellerStoreView } from "./features/seller/index";
|
|
2654
2642
|
export { SellerStorefrontView } from "./features/seller/index";
|
|
@@ -2709,7 +2697,6 @@ export type { SellerDashboardViewProps } from "./features/seller/index";
|
|
|
2709
2697
|
export type { SellerEditProductViewProps } from "./features/seller/index";
|
|
2710
2698
|
export type { SellerGuideViewProps } from "./features/seller/index";
|
|
2711
2699
|
export type { SellerListResponse } from "./features/seller/index";
|
|
2712
|
-
export type { SellerNavItem } from "./features/seller/index";
|
|
2713
2700
|
export type { SellerOffersViewProps } from "./features/seller/index";
|
|
2714
2701
|
export type { SellerOrdersViewProps } from "./features/seller/index";
|
|
2715
2702
|
export type { SellerPayoutHistoryTableLabels } from "./features/seller/index";
|
|
@@ -2745,8 +2732,6 @@ export type { SellerStorefrontViewProps as StoreStorefrontViewProps } from "./fe
|
|
|
2745
2732
|
export type { StoreStatus } from "./features/seller/index";
|
|
2746
2733
|
export type { UpdateSellerStoreInput } from "./features/seller/index";
|
|
2747
2734
|
export type { UseBecomeSellerOptions } from "./features/seller/index";
|
|
2748
|
-
export { PayoutsRepository } from "./features/seller/server";
|
|
2749
|
-
export { SellerRepository } from "./features/seller/server";
|
|
2750
2735
|
export { acceptCounterOffer } from "./features/seller/server";
|
|
2751
2736
|
export { becomeSeller } from "./features/seller/server";
|
|
2752
2737
|
export { bulkSellerOrder } from "./features/seller/server";
|
|
@@ -2880,7 +2865,6 @@ export type { StoreReview } from "./features/stores/index";
|
|
|
2880
2865
|
export type { StoreReviewsData } from "./features/stores/index";
|
|
2881
2866
|
export type { StoreReviewsViewProps } from "./features/stores/index";
|
|
2882
2867
|
export type { StoreTab } from "./features/stores/index";
|
|
2883
|
-
export { StoresRepository } from "./features/stores/server";
|
|
2884
2868
|
export { createStoreAddressForSeller } from "./features/stores/server";
|
|
2885
2869
|
export { deleteStoreAddressForSeller } from "./features/stores/server";
|
|
2886
2870
|
export { getStoreAuctions } from "./features/stores/server";
|
|
@@ -2934,7 +2918,6 @@ export type { WishlistTab } from "./features/wishlist/index";
|
|
|
2934
2918
|
export type { WishlistToggleActions } from "./features/wishlist/index";
|
|
2935
2919
|
export type { WishlistViewProps } from "./features/wishlist/index";
|
|
2936
2920
|
export { UserWishlistRepository } from "./features/wishlist/server";
|
|
2937
|
-
export { WishlistRepository } from "./features/wishlist/server";
|
|
2938
2921
|
export { addToWishlist } from "./features/wishlist/server";
|
|
2939
2922
|
export { getWishlistForUser } from "./features/wishlist/server";
|
|
2940
2923
|
export { removeFromWishlist } from "./features/wishlist/server";
|
|
@@ -2968,7 +2951,6 @@ export type { CategoriesSectionConfig } from "./features/homepage/schemas/index"
|
|
|
2968
2951
|
export type { EventsSectionConfig } from "./features/homepage/schemas/index";
|
|
2969
2952
|
export type { FAQSectionConfig } from "./features/homepage/schemas/index";
|
|
2970
2953
|
export type { FeaturesSectionConfig } from "./features/homepage/schemas/index";
|
|
2971
|
-
export type { GridCard } from "./features/homepage/schemas/index";
|
|
2972
2954
|
export type { GridCardCreateInput } from "./features/homepage/schemas/index";
|
|
2973
2955
|
export type { HomepageSectionCreateInput } from "./features/homepage/schemas/index";
|
|
2974
2956
|
export type { HomepageSectionDocument } from "./features/homepage/schemas/index";
|
|
@@ -2986,9 +2968,9 @@ export { Button } from "./ui/index";
|
|
|
2986
2968
|
export { Heading, Spinner, IconButton, Progress, IndeterminateProgress, Pagination, PageLoader } from "./ui/index";
|
|
2987
2969
|
export { ModalFooter, UnsavedChangesModal, ResponsiveView, Textarea, Checkbox } from "./ui/index";
|
|
2988
2970
|
export { ToastProvider, StarRating, StepperNav, ViewToggle, PriceDisplay, SummaryCard } from "./ui/index";
|
|
2989
|
-
export { CountdownDisplay, ItemRow, HorizontalScroller,
|
|
2971
|
+
export { CountdownDisplay, ItemRow, HorizontalScroller, TabStrip } from "./ui/index";
|
|
2990
2972
|
export { CardBody, MenuTrigger, MenuContent, MenuSeparator, RoleBadge, SkipToMain } from "./ui/index";
|
|
2991
|
-
export { TabsList, TabsContent, PasswordStrengthIndicator,
|
|
2973
|
+
export { TabsList, TabsContent, PasswordStrengthIndicator, TablePagination } from "./ui/index";
|
|
2992
2974
|
export { Stack, classNames, mergeTailwindClasses, SideModal, SideDrawer, RichText, RichTextRenderer } from "./ui/index";
|
|
2993
2975
|
export type { RichTextRendererProps } from "./ui/index";
|
|
2994
2976
|
export { SlottedListingView, DetailViewShell, StackedViewShell } from "./ui/index";
|
|
@@ -3013,7 +2995,7 @@ export { useProfile as useCurrentProfile, useUpdateProfile as useUpdateCurrentPr
|
|
|
3013
2995
|
export { useLogout } from "./features/auth/index";
|
|
3014
2996
|
export { Text, Label, Span } from "./ui/index";
|
|
3015
2997
|
export { Input } from "./ui/index";
|
|
3016
|
-
export { Section, Main, Nav,
|
|
2998
|
+
export { Section, Main, Nav, Ul, Li } from "./ui/index";
|
|
3017
2999
|
export { coerceMediaField, coerceMediaFieldArray, getMediaUrl, mediaFieldSchema } from "./features/media/index";
|
|
3018
3000
|
export { FlowDiagram } from "./ui/index";
|
|
3019
3001
|
export { Grid, Row } from "./ui/index";
|