@mohasinac/appkit 4.11.3 → 4.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/server/features/auctions/service.d.ts +7 -1
- package/dist/_internal/server/features/auctions/service.js +13 -5
- package/dist/_internal/server/features/checkout/actions.d.ts +36 -18
- package/dist/_internal/server/features/checkout/actions.js +127 -45
- package/dist/_internal/server/features/orders/actions.js +5 -3
- package/dist/_internal/server/features/orders/adapters.js +13 -0
- package/dist/_internal/server/features/products/list-public.d.ts +28 -0
- package/dist/_internal/server/features/products/list-public.js +92 -0
- package/dist/_internal/server/functions/firestore.d.ts +1 -2
- package/dist/_internal/server/functions/firestore.js +1 -9
- package/dist/_internal/server/jobs/core/auctionSettlement.js +5 -2
- package/dist/_internal/server/jobs/core/index.d.ts +0 -1
- package/dist/_internal/server/jobs/core/index.js +0 -1
- package/dist/_internal/server/jobs/core/offerExpiry.js +33 -1
- package/dist/_internal/server/jobs/handlers/index.d.ts +1 -2
- package/dist/_internal/server/jobs/handlers/index.js +1 -2
- package/dist/_internal/shared/checkout/lanes.d.ts +20 -0
- package/dist/_internal/shared/checkout/lanes.js +28 -0
- package/dist/_internal/shared/features/auctions/config.d.ts +34 -0
- package/dist/_internal/shared/features/auctions/config.js +47 -3
- package/dist/_internal/shared/features/checkout/config.d.ts +4 -0
- package/dist/_internal/shared/features/checkout/config.js +8 -0
- package/dist/_internal/shared/fees/calculator.d.ts +34 -2
- package/dist/_internal/shared/fees/calculator.js +45 -1
- package/dist/_internal/shared/listing-types/auction/config.js +1 -1
- package/dist/_internal/shared/listing-types/digital-code/config.js +1 -1
- package/dist/_internal/shared/listing-types/live/config.js +1 -1
- package/dist/_internal/shared/listing-types/pre-order/config.js +1 -1
- package/dist/client.d.ts +7 -1
- package/dist/client.js +4 -1
- package/dist/constants/api-endpoints.d.ts +6 -0
- package/dist/constants/api-endpoints.js +2 -0
- package/dist/features/account/components/NotificationBell.js +1 -1
- package/dist/features/admin/components/AdminAddressesView.js +18 -10
- package/dist/features/admin/components/AdminArtView.d.ts +9 -0
- package/dist/features/admin/components/AdminArtView.js +11 -35
- package/dist/features/admin/components/AdminClassifiedView.d.ts +9 -0
- package/dist/features/admin/components/AdminClassifiedView.js +11 -35
- package/dist/features/admin/components/AdminDigitalCodesView.d.ts +9 -0
- package/dist/features/admin/components/AdminDigitalCodesView.js +11 -42
- package/dist/features/admin/components/AdminLiveView.d.ts +9 -0
- package/dist/features/admin/components/AdminLiveView.js +11 -41
- package/dist/features/admin/components/AdminNotificationsView.js +4 -1
- package/dist/features/admin/components/AdminOrderEditorView.d.ts +14 -1
- package/dist/features/admin/components/AdminOrderEditorView.js +18 -5
- package/dist/features/admin/components/AdminOrdersView.js +15 -1
- package/dist/features/admin/components/AdminPaymentMethodsView.js +15 -10
- package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
- package/dist/features/admin/components/AdminSiteSettingsView.js +4 -2
- package/dist/features/admin/components/AdminStickersView.d.ts +9 -0
- package/dist/features/admin/components/AdminStickersView.js +11 -35
- package/dist/features/admin/hooks/useAdminListing.js +7 -2
- package/dist/features/admin/schemas/firestore.d.ts +5 -0
- package/dist/features/admin/schemas/firestore.js +1 -0
- package/dist/features/auctions/actions/bid-actions.js +73 -11
- package/dist/features/auctions/components/AuctionDetailPageView.js +8 -2
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -3
- package/dist/features/auctions/components/PlaceBidFormClient.js +89 -14
- package/dist/features/auctions/schemas/bid-input.d.ts +19 -6
- package/dist/features/auctions/schemas/bid-input.js +19 -7
- package/dist/features/auth/repository/user.repository.js +6 -0
- package/dist/features/cart/components/CartDrawer.d.ts +9 -1
- package/dist/features/cart/components/CartDrawer.js +4 -3
- package/dist/features/cart/components/CartPriceBreakdown.d.ts +61 -0
- package/dist/features/cart/components/CartPriceBreakdown.js +25 -0
- package/dist/features/cart/components/StoreAddonsPicker.d.ts +47 -0
- package/dist/features/cart/components/StoreAddonsPicker.js +21 -0
- package/dist/features/cart/components/index.d.ts +4 -0
- package/dist/features/cart/components/index.js +2 -0
- package/dist/features/cart/repository/cart.repository.d.ts +20 -2
- package/dist/features/cart/repository/cart.repository.js +49 -0
- package/dist/features/cart/schemas/firestore.d.ts +26 -0
- package/dist/features/faq/components/FAQHelpfulButtons.js +2 -2
- package/dist/features/filters/FilterFacetSection.js +1 -1
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -1
- package/dist/features/layout/BackToTop.js +1 -1
- package/dist/features/layout/BottomActions.js +38 -5
- package/dist/features/layout/BottomActionsContext.d.ts +12 -0
- package/dist/features/layout/BottomActionsContext.js +5 -0
- package/dist/features/layout/FooterLayout.js +2 -2
- package/dist/features/layout/TitleBarLayout.js +1 -1
- package/dist/features/layout/hooks/useBottomActions.d.ts +6 -0
- package/dist/features/layout/hooks/useBottomActions.js +11 -1
- package/dist/features/orders/components/OrderAddonBadges.d.ts +36 -0
- package/dist/features/orders/components/OrderAddonBadges.js +28 -0
- package/dist/features/orders/components/index.d.ts +1 -0
- package/dist/features/orders/components/index.js +1 -0
- package/dist/features/orders/repository/orders.repository.d.ts +32 -0
- package/dist/features/orders/repository/orders.repository.js +14 -0
- package/dist/features/orders/types/index.d.ts +22 -0
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +3 -3
- package/dist/features/products/components/ArtStickersListView.js +5 -4
- package/dist/features/products/components/MarketplaceBundleCard.js +2 -2
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +2 -2
- package/dist/features/products/components/PrizeDrawCollage.js +1 -1
- package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -1
- package/dist/features/products/components/PrizeDrawsListingView.js +18 -33
- package/dist/features/products/components/ProductDetailPageView.js +1 -1
- package/dist/features/products/components/ProductGrid.js +3 -3
- package/dist/features/products/components/ProductsIndexListing.js +87 -11
- package/dist/features/products/components/ProductsIndexPageView.js +14 -2
- package/dist/features/products/config/listing-type-listing-config.d.ts +31 -0
- package/dist/features/products/config/listing-type-listing-config.js +74 -0
- package/dist/features/products/hooks/useProducts.js +14 -0
- package/dist/features/products/repository/products.repository.d.ts +0 -4
- package/dist/features/products/repository/products.repository.js +0 -15
- package/dist/features/products/types/index.d.ts +15 -0
- package/dist/features/promotions/repository/coupons.repository.d.ts +12 -0
- package/dist/features/promotions/repository/coupons.repository.js +12 -0
- package/dist/features/seller/components/SellerOrdersView.js +2 -1
- package/dist/features/seller/components/SellerSidebar.js +1 -1
- package/dist/features/stores/components/StoreArtStickersPageView.d.ts +21 -0
- package/dist/features/stores/components/StoreArtStickersPageView.js +30 -0
- package/dist/features/stores/components/StoreAuctionsPageView.d.ts +4 -1
- package/dist/features/stores/components/StoreAuctionsPageView.js +17 -17
- package/dist/features/stores/components/StoreClassifiedsListing.js +7 -0
- package/dist/features/stores/components/StoreClassifiedsPageView.d.ts +4 -1
- package/dist/features/stores/components/StoreClassifiedsPageView.js +16 -12
- package/dist/features/stores/components/StoreDetailLayoutView.js +4 -3
- package/dist/features/stores/components/StoreDigitalCodesListing.js +5 -0
- package/dist/features/stores/components/StoreDigitalCodesPageView.d.ts +4 -1
- package/dist/features/stores/components/StoreDigitalCodesPageView.js +16 -12
- package/dist/features/stores/components/StoreLiveItemsListing.js +7 -0
- package/dist/features/stores/components/StoreLiveItemsPageView.d.ts +4 -1
- package/dist/features/stores/components/StoreLiveItemsPageView.js +16 -12
- package/dist/features/stores/components/StorePreOrdersPageView.d.ts +4 -1
- package/dist/features/stores/components/StorePreOrdersPageView.js +17 -17
- package/dist/features/stores/components/StorePrizeDrawsPageView.d.ts +4 -8
- package/dist/features/stores/components/StorePrizeDrawsPageView.js +17 -22
- package/dist/features/stores/components/StoreProductsListing.d.ts +7 -1
- package/dist/features/stores/components/StoreProductsListing.js +3 -2
- package/dist/features/stores/components/StoreProductsPageView.d.ts +1 -1
- package/dist/features/stores/components/StoreProductsPageView.js +16 -21
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +875 -0
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +1 -1
- package/dist/jobs.d.ts +1 -1
- package/dist/jobs.js +1 -1
- package/dist/next/routing/route-map.d.ts +2 -0
- package/dist/next/routing/route-map.js +5 -0
- package/dist/seed/homepage-sections-seed-data.js +5 -1
- package/dist/seed/reviews-seed-data.js +52 -0
- package/dist/seed/site-settings-seed-data.js +18 -0
- package/dist/server-entry.d.ts +1 -0
- package/dist/server-entry.js +1 -0
- package/dist/styles.css +66 -1
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/color-pairs.js +1 -0
- package/dist/tokens/tokens.css +33 -0
- package/dist/ui/components/Button.style.css +21 -0
- package/dist/ui/components/Checkbox.d.ts +10 -1
- package/dist/ui/components/Checkbox.js +14 -2
- package/dist/ui/components/Checkbox.style.css +11 -0
- package/dist/ui/components/ImageLightbox.js +7 -4
- package/dist/ui/components/surface-tokens.d.ts +7 -0
- package/dist/ui/components/surface-tokens.js +7 -0
- package/package.json +1 -1
- package/dist/_internal/server/jobs/core/onBidPlaced.d.ts +0 -15
- package/dist/_internal/server/jobs/core/onBidPlaced.js +0 -63
- package/dist/_internal/server/jobs/handlers/onBidPlaced.d.ts +0 -3
- package/dist/_internal/server/jobs/handlers/onBidPlaced.js +0 -9
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { PRODUCT_FIELDS } from "../../../constants/field-names";
|
|
3
|
+
import { sortBy } from "../../../constants/sort";
|
|
4
|
+
import { listStoreProducts } from "../../../_internal/server/features/products/list-public";
|
|
5
|
+
import { ART_STICKERS_LISTING_TYPES } from "../../products/constants/listing-tabs";
|
|
6
|
+
import { getStoreBySlug } from "./StoreDetailLayoutView";
|
|
7
|
+
import { StoreProductsListing } from "./StoreProductsListing";
|
|
8
|
+
const DEFAULT_PAGE_SIZE = 24;
|
|
9
|
+
const DEFAULT_SORT = sortBy(PRODUCT_FIELDS.CREATED_AT);
|
|
10
|
+
/**
|
|
11
|
+
* A store's combined Art & Stickers tab.
|
|
12
|
+
*
|
|
13
|
+
* This page did not exist until 2026-08-21: `STORE_PAGE_TABS` had an
|
|
14
|
+
* "Art & Stickers" entry with a real count query behind it, but its href
|
|
15
|
+
* pointed at `STORE_PRODUCTS` — a page that filters `listingType == standard`.
|
|
16
|
+
* So the tab advertised a non-zero count and then rendered none of those items,
|
|
17
|
+
* with no error. Same shape as the category/brand tabs that rendered blank
|
|
18
|
+
* panels (see `audit-tab-body-coverage.mjs`), one level up.
|
|
19
|
+
*
|
|
20
|
+
* Mirrors the public `/art` page in spanning both types at once, since neither
|
|
21
|
+
* has enough inventory to justify a tab of its own.
|
|
22
|
+
*/
|
|
23
|
+
export async function StoreArtStickersPageView({ storeSlug, searchParams, }) {
|
|
24
|
+
const store = await getStoreBySlug(storeSlug);
|
|
25
|
+
const storeId = store?.id;
|
|
26
|
+
if (typeof storeId !== "string" || !storeId)
|
|
27
|
+
return null;
|
|
28
|
+
const result = await listStoreProducts(storeId, ART_STICKERS_LISTING_TYPES, searchParams ?? {}, { pageSize: DEFAULT_PAGE_SIZE, sorts: DEFAULT_SORT });
|
|
29
|
+
return (_jsx(StoreProductsListing, { storeId: storeId, listingTypes: ART_STICKERS_LISTING_TYPES, initialData: result ?? undefined }));
|
|
30
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
type SearchParams = Record<string, string | string[]>;
|
|
2
3
|
export interface StoreAuctionsPageViewProps {
|
|
3
4
|
storeSlug: string;
|
|
5
|
+
searchParams?: SearchParams;
|
|
4
6
|
}
|
|
5
|
-
export declare function StoreAuctionsPageView({ storeSlug }: StoreAuctionsPageViewProps): Promise<React.JSX.Element | null>;
|
|
7
|
+
export declare function StoreAuctionsPageView({ storeSlug, searchParams }: StoreAuctionsPageViewProps): Promise<React.JSX.Element | null>;
|
|
8
|
+
export {};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { sortBy } from "
|
|
4
|
-
import {
|
|
2
|
+
import { PRODUCT_FIELDS } from "../../../constants/field-names";
|
|
3
|
+
import { sortBy } from "../../../constants/sort";
|
|
4
|
+
import { listStoreProducts } from "../../../_internal/server/features/products/list-public";
|
|
5
5
|
import { getStoreBySlug } from "./StoreDetailLayoutView";
|
|
6
6
|
import { StoreAuctionsListing } from "./StoreAuctionsListing";
|
|
7
|
-
|
|
7
|
+
const LISTING_TYPES = ["auction"];
|
|
8
|
+
const DEFAULT_PAGE_SIZE = 24;
|
|
9
|
+
const DEFAULT_SORT = sortBy(PRODUCT_FIELDS.AUCTION_END_DATE, "ASC");
|
|
10
|
+
export async function StoreAuctionsPageView({ storeSlug, searchParams }) {
|
|
8
11
|
const store = await getStoreBySlug(storeSlug);
|
|
9
12
|
const storeId = store?.id;
|
|
10
|
-
|
|
11
|
-
? await productRepository
|
|
12
|
-
.list({
|
|
13
|
-
filters: sieveAnd(sieveFilter("storeId", SIEVE_OP.EQ, storeId), sieveFilter("status", SIEVE_OP.EQ, "published"), sieveFilter("listingType", SIEVE_OP.EQ, "auction")),
|
|
14
|
-
sorts: sortBy("auctionEndDate", "ASC"),
|
|
15
|
-
page: 1,
|
|
16
|
-
pageSize: 24,
|
|
17
|
-
})
|
|
18
|
-
.catch(() => null)
|
|
19
|
-
: null;
|
|
20
|
-
if (!storeId) {
|
|
13
|
+
if (typeof storeId !== "string" || !storeId)
|
|
21
14
|
return null;
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
// Shared query — see listStoreProducts. This view used to call
|
|
16
|
+
// productRepository.list() with an inline filter string and swallow every
|
|
17
|
+
// failure via a bare .catch(() => null), so a missing index rendered as an
|
|
18
|
+
// empty store tab with nothing logged (Root Cause #30's family).
|
|
19
|
+
const result = await listStoreProducts(storeId, LISTING_TYPES, searchParams ?? {}, {
|
|
20
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
21
|
+
sorts: DEFAULT_SORT,
|
|
22
|
+
});
|
|
23
|
+
return _jsx(StoreAuctionsListing, { storeId: storeId, initialData: result ?? undefined });
|
|
24
24
|
}
|
|
@@ -37,6 +37,13 @@ export function StoreClassifiedsListing({ storeId, initialData }) {
|
|
|
37
37
|
perPage: table.getNumber("pageSize", 24),
|
|
38
38
|
storeId: storeId || undefined,
|
|
39
39
|
listingType: "classified",
|
|
40
|
+
// Per-type facets — declared in FILTER_KEYS (so they counted toward the
|
|
41
|
+
// filter badge) and rendered in the drawer, but never sent until 2026-08-21.
|
|
42
|
+
typeFacets: {
|
|
43
|
+
[TABLE_KEYS.CITY]: table.get(TABLE_KEYS.CITY),
|
|
44
|
+
[TABLE_KEYS.NEGOTIABLE]: table.get(TABLE_KEYS.NEGOTIABLE),
|
|
45
|
+
[TABLE_KEYS.ACCEPTS_SHIPPING]: table.get(TABLE_KEYS.ACCEPTS_SHIPPING),
|
|
46
|
+
},
|
|
40
47
|
};
|
|
41
48
|
const { products, totalPages, page, isLoading } = useProducts(params, { initialData });
|
|
42
49
|
const gridClass = "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-[var(--appkit-space-4)]";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
type SearchParams = Record<string, string | string[]>;
|
|
2
3
|
export interface StoreClassifiedsPageViewProps {
|
|
3
4
|
storeSlug: string;
|
|
5
|
+
searchParams?: SearchParams;
|
|
4
6
|
}
|
|
5
|
-
export declare function StoreClassifiedsPageView({ storeSlug }: StoreClassifiedsPageViewProps): Promise<React.JSX.Element | null>;
|
|
7
|
+
export declare function StoreClassifiedsPageView({ storeSlug, searchParams }: StoreClassifiedsPageViewProps): Promise<React.JSX.Element | null>;
|
|
8
|
+
export {};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { PRODUCT_FIELDS } from "../../../constants/field-names";
|
|
3
|
+
import { sortBy } from "../../../constants/sort";
|
|
4
|
+
import { listStoreProducts } from "../../../_internal/server/features/products/list-public";
|
|
4
5
|
import { getStoreBySlug } from "./StoreDetailLayoutView";
|
|
5
6
|
import { StoreClassifiedsListing } from "./StoreClassifiedsListing";
|
|
6
|
-
|
|
7
|
+
const LISTING_TYPES = ["classified"];
|
|
8
|
+
const DEFAULT_PAGE_SIZE = 24;
|
|
9
|
+
const DEFAULT_SORT = sortBy(PRODUCT_FIELDS.CREATED_AT);
|
|
10
|
+
export async function StoreClassifiedsPageView({ storeSlug, searchParams }) {
|
|
7
11
|
const store = await getStoreBySlug(storeSlug);
|
|
8
12
|
const storeId = store?.id;
|
|
9
|
-
if (!storeId)
|
|
13
|
+
if (typeof storeId !== "string" || !storeId)
|
|
10
14
|
return null;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
pageSize:
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
// Shared query — see listStoreProducts. This view used to call
|
|
16
|
+
// productRepository.list() with an inline filter string and swallow every
|
|
17
|
+
// failure via a bare .catch(() => null), so a missing index rendered as an
|
|
18
|
+
// empty store tab with nothing logged (Root Cause #30's family).
|
|
19
|
+
const result = await listStoreProducts(storeId, LISTING_TYPES, searchParams ?? {}, {
|
|
20
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
21
|
+
sorts: DEFAULT_SORT,
|
|
22
|
+
});
|
|
19
23
|
return _jsx(StoreClassifiedsListing, { storeId: storeId, initialData: result ?? undefined });
|
|
20
24
|
}
|
|
@@ -18,9 +18,10 @@ const STORE_LISTING_HREF = {
|
|
|
18
18
|
classifieds: (slug) => String(ROUTES.PUBLIC.STORE_CLASSIFIEDS(slug)),
|
|
19
19
|
"digital-codes": (slug) => String(ROUTES.PUBLIC.STORE_DIGITAL_CODES(slug)),
|
|
20
20
|
live: (slug) => String(ROUTES.PUBLIC.STORE_LIVE(slug)),
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
|
|
21
|
+
// Combined art + stickers, mirroring the public /art page. This used to
|
|
22
|
+
// point at STORE_PRODUCTS, which filters to `standard` — so the tab showed
|
|
23
|
+
// a real non-zero count and landed on a page with none of those items.
|
|
24
|
+
art: (slug) => String(ROUTES.PUBLIC.STORE_ART(slug)),
|
|
24
25
|
};
|
|
25
26
|
export const getStoreBySlug = cache((slug) => storeRepository.findBySlug(slug).catch(() => undefined));
|
|
26
27
|
function tabLabel(base, count) {
|
|
@@ -37,6 +37,11 @@ export function StoreDigitalCodesListing({ storeId, initialData }) {
|
|
|
37
37
|
perPage: table.getNumber("pageSize", 24),
|
|
38
38
|
storeId: storeId || undefined,
|
|
39
39
|
listingType: "digital-code",
|
|
40
|
+
// Per-type facets — declared in FILTER_KEYS (so they counted toward the
|
|
41
|
+
// filter badge) and rendered in the drawer, but never sent until 2026-08-21.
|
|
42
|
+
typeFacets: {
|
|
43
|
+
[TABLE_KEYS.DELIVERY_METHOD]: table.get(TABLE_KEYS.DELIVERY_METHOD),
|
|
44
|
+
},
|
|
40
45
|
};
|
|
41
46
|
const { products, totalPages, page, isLoading } = useProducts(params, { initialData });
|
|
42
47
|
const gridClass = "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-[var(--appkit-space-4)]";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
type SearchParams = Record<string, string | string[]>;
|
|
2
3
|
export interface StoreDigitalCodesPageViewProps {
|
|
3
4
|
storeSlug: string;
|
|
5
|
+
searchParams?: SearchParams;
|
|
4
6
|
}
|
|
5
|
-
export declare function StoreDigitalCodesPageView({ storeSlug }: StoreDigitalCodesPageViewProps): Promise<React.JSX.Element | null>;
|
|
7
|
+
export declare function StoreDigitalCodesPageView({ storeSlug, searchParams }: StoreDigitalCodesPageViewProps): Promise<React.JSX.Element | null>;
|
|
8
|
+
export {};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { PRODUCT_FIELDS } from "../../../constants/field-names";
|
|
3
|
+
import { sortBy } from "../../../constants/sort";
|
|
4
|
+
import { listStoreProducts } from "../../../_internal/server/features/products/list-public";
|
|
4
5
|
import { getStoreBySlug } from "./StoreDetailLayoutView";
|
|
5
6
|
import { StoreDigitalCodesListing } from "./StoreDigitalCodesListing";
|
|
6
|
-
|
|
7
|
+
const LISTING_TYPES = ["digital-code"];
|
|
8
|
+
const DEFAULT_PAGE_SIZE = 24;
|
|
9
|
+
const DEFAULT_SORT = sortBy(PRODUCT_FIELDS.CREATED_AT);
|
|
10
|
+
export async function StoreDigitalCodesPageView({ storeSlug, searchParams }) {
|
|
7
11
|
const store = await getStoreBySlug(storeSlug);
|
|
8
12
|
const storeId = store?.id;
|
|
9
|
-
if (!storeId)
|
|
13
|
+
if (typeof storeId !== "string" || !storeId)
|
|
10
14
|
return null;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
pageSize:
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
// Shared query — see listStoreProducts. This view used to call
|
|
16
|
+
// productRepository.list() with an inline filter string and swallow every
|
|
17
|
+
// failure via a bare .catch(() => null), so a missing index rendered as an
|
|
18
|
+
// empty store tab with nothing logged (Root Cause #30's family).
|
|
19
|
+
const result = await listStoreProducts(storeId, LISTING_TYPES, searchParams ?? {}, {
|
|
20
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
21
|
+
sorts: DEFAULT_SORT,
|
|
22
|
+
});
|
|
19
23
|
return _jsx(StoreDigitalCodesListing, { storeId: storeId, initialData: result ?? undefined });
|
|
20
24
|
}
|
|
@@ -37,6 +37,13 @@ export function StoreLiveItemsListing({ storeId, initialData }) {
|
|
|
37
37
|
perPage: table.getNumber("pageSize", 24),
|
|
38
38
|
storeId: storeId || undefined,
|
|
39
39
|
listingType: "live",
|
|
40
|
+
// Per-type facets — declared in FILTER_KEYS (so they counted toward the
|
|
41
|
+
// filter badge) and rendered in the drawer, but never sent until 2026-08-21.
|
|
42
|
+
typeFacets: {
|
|
43
|
+
[TABLE_KEYS.SPECIES]: table.get(TABLE_KEYS.SPECIES),
|
|
44
|
+
[TABLE_KEYS.LIVE_SEX]: table.get(TABLE_KEYS.LIVE_SEX),
|
|
45
|
+
[TABLE_KEYS.JURISDICTION]: table.get(TABLE_KEYS.JURISDICTION),
|
|
46
|
+
},
|
|
40
47
|
};
|
|
41
48
|
const { products, totalPages, page, isLoading } = useProducts(params, { initialData });
|
|
42
49
|
const gridClass = "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-[var(--appkit-space-4)]";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
type SearchParams = Record<string, string | string[]>;
|
|
2
3
|
export interface StoreLiveItemsPageViewProps {
|
|
3
4
|
storeSlug: string;
|
|
5
|
+
searchParams?: SearchParams;
|
|
4
6
|
}
|
|
5
|
-
export declare function StoreLiveItemsPageView({ storeSlug }: StoreLiveItemsPageViewProps): Promise<React.JSX.Element | null>;
|
|
7
|
+
export declare function StoreLiveItemsPageView({ storeSlug, searchParams }: StoreLiveItemsPageViewProps): Promise<React.JSX.Element | null>;
|
|
8
|
+
export {};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { PRODUCT_FIELDS } from "../../../constants/field-names";
|
|
3
|
+
import { sortBy } from "../../../constants/sort";
|
|
4
|
+
import { listStoreProducts } from "../../../_internal/server/features/products/list-public";
|
|
4
5
|
import { getStoreBySlug } from "./StoreDetailLayoutView";
|
|
5
6
|
import { StoreLiveItemsListing } from "./StoreLiveItemsListing";
|
|
6
|
-
|
|
7
|
+
const LISTING_TYPES = ["live"];
|
|
8
|
+
const DEFAULT_PAGE_SIZE = 24;
|
|
9
|
+
const DEFAULT_SORT = sortBy(PRODUCT_FIELDS.CREATED_AT);
|
|
10
|
+
export async function StoreLiveItemsPageView({ storeSlug, searchParams }) {
|
|
7
11
|
const store = await getStoreBySlug(storeSlug);
|
|
8
12
|
const storeId = store?.id;
|
|
9
|
-
if (!storeId)
|
|
13
|
+
if (typeof storeId !== "string" || !storeId)
|
|
10
14
|
return null;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
pageSize:
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
// Shared query — see listStoreProducts. This view used to call
|
|
16
|
+
// productRepository.list() with an inline filter string and swallow every
|
|
17
|
+
// failure via a bare .catch(() => null), so a missing index rendered as an
|
|
18
|
+
// empty store tab with nothing logged (Root Cause #30's family).
|
|
19
|
+
const result = await listStoreProducts(storeId, LISTING_TYPES, searchParams ?? {}, {
|
|
20
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
21
|
+
sorts: DEFAULT_SORT,
|
|
22
|
+
});
|
|
19
23
|
return _jsx(StoreLiveItemsListing, { storeId: storeId, initialData: result ?? undefined });
|
|
20
24
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
type SearchParams = Record<string, string | string[]>;
|
|
2
3
|
export interface StorePreOrdersPageViewProps {
|
|
3
4
|
storeSlug: string;
|
|
5
|
+
searchParams?: SearchParams;
|
|
4
6
|
}
|
|
5
|
-
export declare function StorePreOrdersPageView({ storeSlug }: StorePreOrdersPageViewProps): Promise<React.JSX.Element | null>;
|
|
7
|
+
export declare function StorePreOrdersPageView({ storeSlug, searchParams }: StorePreOrdersPageViewProps): Promise<React.JSX.Element | null>;
|
|
8
|
+
export {};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { sortBy } from "
|
|
4
|
-
import {
|
|
2
|
+
import { PRODUCT_FIELDS } from "../../../constants/field-names";
|
|
3
|
+
import { sortBy } from "../../../constants/sort";
|
|
4
|
+
import { listStoreProducts } from "../../../_internal/server/features/products/list-public";
|
|
5
5
|
import { getStoreBySlug } from "./StoreDetailLayoutView";
|
|
6
6
|
import { StorePreOrdersListing } from "./StorePreOrdersListing";
|
|
7
|
-
|
|
7
|
+
const LISTING_TYPES = ["pre-order"];
|
|
8
|
+
const DEFAULT_PAGE_SIZE = 24;
|
|
9
|
+
const DEFAULT_SORT = sortBy(PRODUCT_FIELDS.PRE_ORDER_DELIVERY_DATE, "ASC");
|
|
10
|
+
export async function StorePreOrdersPageView({ storeSlug, searchParams }) {
|
|
8
11
|
const store = await getStoreBySlug(storeSlug);
|
|
9
12
|
const storeId = store?.id;
|
|
10
|
-
|
|
11
|
-
? await productRepository
|
|
12
|
-
.list({
|
|
13
|
-
filters: sieveAnd(sieveFilter("storeId", SIEVE_OP.EQ, storeId), sieveFilter("status", SIEVE_OP.EQ, "published"), sieveFilter("listingType", SIEVE_OP.EQ, "pre-order")),
|
|
14
|
-
sorts: sortBy("createdAt", "DESC"),
|
|
15
|
-
page: 1,
|
|
16
|
-
pageSize: 24,
|
|
17
|
-
})
|
|
18
|
-
.catch(() => null)
|
|
19
|
-
: null;
|
|
20
|
-
if (!storeId) {
|
|
13
|
+
if (typeof storeId !== "string" || !storeId)
|
|
21
14
|
return null;
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
// Shared query — see listStoreProducts. This view used to call
|
|
16
|
+
// productRepository.list() with an inline filter string and swallow every
|
|
17
|
+
// failure via a bare .catch(() => null), so a missing index rendered as an
|
|
18
|
+
// empty store tab with nothing logged (Root Cause #30's family).
|
|
19
|
+
const result = await listStoreProducts(storeId, LISTING_TYPES, searchParams ?? {}, {
|
|
20
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
21
|
+
sorts: DEFAULT_SORT,
|
|
22
|
+
});
|
|
23
|
+
return _jsx(StorePreOrdersListing, { storeId: storeId, initialData: result ?? undefined });
|
|
24
24
|
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
type SearchParams = Record<string, string | string[]>;
|
|
2
3
|
export interface StorePrizeDrawsPageViewProps {
|
|
3
4
|
storeSlug: string;
|
|
5
|
+
searchParams?: SearchParams;
|
|
4
6
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
* Server-fetches the seller's prize-draw products and hands them to the
|
|
9
|
-
* client `PrizeDrawsIndexListing` scoped to this store. Mirrors the
|
|
10
|
-
* StorePreOrdersPageView pattern.
|
|
11
|
-
*/
|
|
12
|
-
export declare function StorePrizeDrawsPageView({ storeSlug, }: StorePrizeDrawsPageViewProps): Promise<React.JSX.Element | null>;
|
|
7
|
+
export declare function StorePrizeDrawsPageView({ storeSlug, searchParams }: StorePrizeDrawsPageViewProps): Promise<React.JSX.Element | null>;
|
|
8
|
+
export {};
|
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { sortBy } from "
|
|
4
|
-
import {
|
|
2
|
+
import { PRODUCT_FIELDS } from "../../../constants/field-names";
|
|
3
|
+
import { sortBy } from "../../../constants/sort";
|
|
4
|
+
import { listStoreProducts } from "../../../_internal/server/features/products/list-public";
|
|
5
5
|
import { getStoreBySlug } from "./StoreDetailLayoutView";
|
|
6
6
|
import { PrizeDrawsIndexListing } from "../../products/components/PrizeDrawsIndexListing";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* client `PrizeDrawsIndexListing` scoped to this store. Mirrors the
|
|
12
|
-
* StorePreOrdersPageView pattern.
|
|
13
|
-
*/
|
|
14
|
-
export async function StorePrizeDrawsPageView({ storeSlug, }) {
|
|
7
|
+
const LISTING_TYPES = ["prize-draw"];
|
|
8
|
+
const DEFAULT_PAGE_SIZE = 24;
|
|
9
|
+
const DEFAULT_SORT = sortBy(PRODUCT_FIELDS.CREATED_AT);
|
|
10
|
+
export async function StorePrizeDrawsPageView({ storeSlug, searchParams }) {
|
|
15
11
|
const store = await getStoreBySlug(storeSlug);
|
|
16
12
|
const storeId = store?.id;
|
|
17
|
-
if (!storeId)
|
|
13
|
+
if (typeof storeId !== "string" || !storeId)
|
|
18
14
|
return null;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
return (_jsx(PrizeDrawsIndexListing, { storeId: storeId, initialData: result ?? undefined }));
|
|
15
|
+
// Shared query — see listStoreProducts. This view used to call
|
|
16
|
+
// productRepository.list() with an inline filter string and swallow every
|
|
17
|
+
// failure via a bare .catch(() => null), so a missing index rendered as an
|
|
18
|
+
// empty store tab with nothing logged (Root Cause #30's family).
|
|
19
|
+
const result = await listStoreProducts(storeId, LISTING_TYPES, searchParams ?? {}, {
|
|
20
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
21
|
+
sorts: DEFAULT_SORT,
|
|
22
|
+
});
|
|
23
|
+
return _jsx(PrizeDrawsIndexListing, { storeId: storeId, initialData: result ?? undefined });
|
|
29
24
|
}
|
|
@@ -2,6 +2,12 @@ import React from "react";
|
|
|
2
2
|
export interface StoreProductsListingProps {
|
|
3
3
|
/** Store document ID — used for filtering */
|
|
4
4
|
storeId?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Listing types this tab spans. Defaults to `["standard"]`. The combined
|
|
7
|
+
* Art & Stickers store tab passes both of its types so it renders real
|
|
8
|
+
* content instead of the standard-only set it used to land on.
|
|
9
|
+
*/
|
|
10
|
+
listingTypes?: readonly string[];
|
|
5
11
|
initialData?: any;
|
|
6
12
|
}
|
|
7
|
-
export declare function StoreProductsListing({ storeId, initialData }: StoreProductsListingProps): React.JSX.Element;
|
|
13
|
+
export declare function StoreProductsListing({ storeId, listingTypes, initialData }: StoreProductsListingProps): React.JSX.Element;
|
|
@@ -17,7 +17,7 @@ const __P = {
|
|
|
17
17
|
p3: "p-[var(--appkit-space-3)]",
|
|
18
18
|
};
|
|
19
19
|
const FILTER_KEYS = ["condition", "brand", "minPrice", "maxPrice"];
|
|
20
|
-
export function StoreProductsListing({ storeId, initialData }) {
|
|
20
|
+
export function StoreProductsListing({ storeId, listingTypes = ["standard"], initialData }) {
|
|
21
21
|
const table = useUrlTable({ defaults: { pageSize: "24", sort: "-createdAt" } });
|
|
22
22
|
const { showToast } = useToast();
|
|
23
23
|
const { requireAuth, modalOpen, modalMessage, closeModal } = useAuthGate();
|
|
@@ -53,7 +53,8 @@ export function StoreProductsListing({ storeId, initialData }) {
|
|
|
53
53
|
page: table.getNumber("page", 1),
|
|
54
54
|
perPage: table.getNumber("pageSize", 24),
|
|
55
55
|
storeId: storeId || undefined,
|
|
56
|
-
|
|
56
|
+
// Pipe-joined OR-group when the tab spans several types.
|
|
57
|
+
listingType: listingTypes.join("|"),
|
|
57
58
|
};
|
|
58
59
|
const { products, totalPages, page, isLoading } = useProducts(params, { initialData });
|
|
59
60
|
const commitSearch = useCallback(() => {
|
|
@@ -4,5 +4,5 @@ export interface StoreProductsPageViewProps {
|
|
|
4
4
|
storeSlug: string;
|
|
5
5
|
searchParams?: SearchParams;
|
|
6
6
|
}
|
|
7
|
-
export declare function StoreProductsPageView({ storeSlug, searchParams
|
|
7
|
+
export declare function StoreProductsPageView({ storeSlug, searchParams }: StoreProductsPageViewProps): Promise<React.JSX.Element | null>;
|
|
8
8
|
export {};
|
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { PRODUCT_FIELDS } from "../../../constants/field-names";
|
|
3
|
+
import { sortBy } from "../../../constants/sort";
|
|
4
|
+
import { listStoreProducts } from "../../../_internal/server/features/products/list-public";
|
|
5
5
|
import { getStoreBySlug } from "./StoreDetailLayoutView";
|
|
6
6
|
import { StoreProductsListing } from "./StoreProductsListing";
|
|
7
|
-
const
|
|
7
|
+
const LISTING_TYPES = ["standard"];
|
|
8
8
|
const DEFAULT_PAGE_SIZE = 24;
|
|
9
|
-
const DEFAULT_SORT =
|
|
10
|
-
export async function StoreProductsPageView({ storeSlug, searchParams
|
|
9
|
+
const DEFAULT_SORT = sortBy(PRODUCT_FIELDS.CREATED_AT);
|
|
10
|
+
export async function StoreProductsPageView({ storeSlug, searchParams }) {
|
|
11
11
|
const store = await getStoreBySlug(storeSlug);
|
|
12
12
|
const storeId = store?.id;
|
|
13
|
-
if (!storeId)
|
|
13
|
+
if (typeof storeId !== "string" || !storeId)
|
|
14
14
|
return null;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
page,
|
|
25
|
-
pageSize,
|
|
26
|
-
})
|
|
27
|
-
.catch(() => null);
|
|
28
|
-
return (_jsx(StoreProductsListing, { storeId: storeId, initialData: result ?? undefined }));
|
|
15
|
+
// Shared query — see listStoreProducts. This view used to call
|
|
16
|
+
// productRepository.list() with an inline filter string and swallow every
|
|
17
|
+
// failure via a bare .catch(() => null), so a missing index rendered as an
|
|
18
|
+
// empty store tab with nothing logged (Root Cause #30's family).
|
|
19
|
+
const result = await listStoreProducts(storeId, LISTING_TYPES, searchParams ?? {}, {
|
|
20
|
+
pageSize: DEFAULT_PAGE_SIZE,
|
|
21
|
+
sorts: DEFAULT_SORT,
|
|
22
|
+
});
|
|
23
|
+
return _jsx(StoreProductsListing, { storeId: storeId, initialData: result ?? undefined });
|
|
29
24
|
}
|