@mohasinac/appkit 4.11.2 → 4.11.3
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/checkout/actions.d.ts +4 -0
- package/dist/_internal/server/features/checkout/actions.js +111 -4
- package/dist/_internal/server/features/checkout/data.d.ts +10 -0
- package/dist/_internal/server/features/orders/adapters.js +7 -0
- package/dist/_internal/server/features/products/data.d.ts +12 -3
- package/dist/_internal/server/features/products/data.js +55 -4
- package/dist/_internal/server/features/products/index.d.ts +1 -1
- package/dist/_internal/server/features/products/index.js +1 -1
- package/dist/_internal/server/features/products/list-public.d.ts +19 -0
- package/dist/_internal/server/features/products/list-public.js +39 -6
- package/dist/_internal/server/features/reviews/data.d.ts +1 -1
- package/dist/_internal/server/features/reviews/data.js +3 -2
- package/dist/_internal/server/features/tester/visibility.js +3 -3
- package/dist/_internal/server/jobs/core/testerSandboxCleanup.d.ts +1 -1
- package/dist/_internal/server/jobs/core/testerSandboxCleanup.js +4 -1
- package/dist/_internal/server/jobs/core/testerSandboxRefresh.js +2 -0
- package/dist/_internal/server/jobs/handlers/_helpers.js +4 -1
- package/dist/_internal/shared/features/promotions/schema.d.ts +0 -16
- package/dist/_internal/shared/features/promotions/schema.js +0 -2
- package/dist/_internal/shared/features/reviews/config.d.ts +8 -1
- package/dist/_internal/shared/features/reviews/config.js +8 -1
- package/dist/_internal/shared/listing-types/_registry.d.ts +88 -1
- package/dist/_internal/shared/listing-types/_registry.js +63 -1
- package/dist/_internal/shared/listing-types/art/config.d.ts +59 -0
- package/dist/_internal/shared/listing-types/art/config.js +12 -0
- package/dist/_internal/shared/listing-types/auction/config.d.ts +53 -0
- package/dist/_internal/shared/listing-types/auction/config.js +17 -0
- package/dist/_internal/shared/listing-types/classified/config.d.ts +59 -0
- package/dist/_internal/shared/listing-types/classified/config.js +14 -0
- package/dist/_internal/shared/listing-types/digital-code/config.d.ts +59 -0
- package/dist/_internal/shared/listing-types/digital-code/config.js +12 -0
- package/dist/_internal/shared/listing-types/live/config.d.ts +59 -0
- package/dist/_internal/shared/listing-types/live/config.js +14 -0
- package/dist/_internal/shared/listing-types/pre-order/config.d.ts +110 -0
- package/dist/_internal/shared/listing-types/pre-order/config.js +14 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +44 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.js +10 -0
- package/dist/_internal/shared/listing-types/standard/config.d.ts +59 -0
- package/dist/_internal/shared/listing-types/standard/config.js +9 -0
- package/dist/_internal/shared/listing-types/stickers/config.d.ts +59 -0
- package/dist/_internal/shared/listing-types/stickers/config.js +12 -0
- package/dist/client.d.ts +5 -1
- package/dist/client.js +4 -1
- package/dist/constants/field-names.d.ts +12 -0
- package/dist/constants/field-names.js +12 -0
- package/dist/constants/table-keys.d.ts +2 -0
- package/dist/constants/table-keys.js +2 -0
- package/dist/features/account/components/UserOrdersView.js +27 -5
- package/dist/features/admin/components/AdminAddressesView.js +3 -1
- package/dist/features/admin/components/AdminCouponEditorView.js +1 -4
- package/dist/features/admin/components/AdminPaymentMethodsView.js +3 -1
- package/dist/features/admin/components/AdminProductsView.js +34 -18
- package/dist/features/admin/constants/filter-tabs.d.ts +26 -9
- package/dist/features/admin/constants/filter-tabs.js +22 -9
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
- package/dist/features/auctions/components/AuctionBottomActions.js +1 -0
- package/dist/features/auctions/components/AuctionDetailPageView.js +13 -11
- package/dist/features/cart/schemas/firestore.d.ts +0 -2
- package/dist/features/categories/components/BrandDetailTabs.js +31 -11
- package/dist/features/categories/components/CategoryDetailTabs.js +27 -7
- package/dist/features/categories/components/CategoryProductsListing.d.ts +9 -1
- package/dist/features/categories/components/CategoryProductsListing.js +5 -2
- package/dist/features/classified/components/ClassifiedDetailPageView.js +2 -1
- package/dist/features/contact/email.js +5 -1
- package/dist/features/digital-codes/components/DigitalCodeDetailPageView.js +17 -16
- package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
- package/dist/features/homepage/components/SectionCarousel.js +1 -1
- package/dist/features/homepage/components/ShopByCategorySection.js +1 -1
- package/dist/features/layout/AppLayoutShell.js +9 -2
- package/dist/features/layout/BottomActions.js +26 -3
- package/dist/features/layout/BottomActionsContext.d.ts +14 -0
- package/dist/features/layout/BottomActionsContext.js +13 -1
- package/dist/features/layout/hooks/useBottomActions.d.ts +6 -1
- package/dist/features/layout/hooks/useBottomActions.js +4 -1
- package/dist/features/layout/index.d.ts +1 -1
- package/dist/features/live/components/LiveItemDetailPageView.js +7 -6
- package/dist/features/orders/repository/orders.repository.d.ts +4 -0
- package/dist/features/orders/repository/orders.repository.js +4 -0
- package/dist/features/orders/types/index.d.ts +16 -0
- package/dist/features/pre-orders/components/PreOrderBottomActions.d.ts +1 -1
- package/dist/features/pre-orders/components/PreOrderBottomActions.js +3 -19
- package/dist/features/products/components/AuctionsIndexListing.js +1 -2
- package/dist/features/products/components/ListingBottomActions.d.ts +28 -0
- package/dist/features/products/components/ListingBottomActions.js +25 -0
- package/dist/features/products/components/PrizeDrawBottomActions.d.ts +1 -1
- package/dist/features/products/components/PrizeDrawBottomActions.js +3 -21
- package/dist/features/products/components/ProductDetailActions.js +4 -0
- package/dist/features/products/components/ProductDetailPageView.js +7 -7
- package/dist/features/products/constants/listing-tabs.d.ts +43 -198
- package/dist/features/products/constants/listing-tabs.js +71 -58
- package/dist/features/products/constants/sieve.d.ts +104 -1
- package/dist/features/products/constants/sieve.js +27 -7
- package/dist/features/products/repository/products.repository.d.ts +45 -1
- package/dist/features/products/repository/products.repository.js +26 -3
- package/dist/features/products/utils/listing-badge-variant.d.ts +20 -1
- package/dist/features/products/utils/listing-badge-variant.js +26 -1
- package/dist/features/products/utils/listing-type.d.ts +24 -0
- package/dist/features/products/utils/listing-type.js +48 -0
- package/dist/features/promotions/actions/coupon-actions.d.ts +7 -0
- package/dist/features/promotions/actions/coupon-actions.js +12 -1
- package/dist/features/promotions/actions/coupon-stacking.d.ts +24 -0
- package/dist/features/promotions/actions/coupon-stacking.js +21 -0
- package/dist/features/promotions/actions/index.d.ts +1 -0
- package/dist/features/promotions/actions/index.js +1 -0
- package/dist/features/promotions/actions/seller-coupon-actions.d.ts +0 -1
- package/dist/features/promotions/actions/seller-coupon-actions.js +0 -1
- package/dist/features/promotions/components/CouponHelpDetails.d.ts +20 -0
- package/dist/features/promotions/components/CouponHelpDetails.js +17 -0
- package/dist/features/promotions/components/CouponsIndexListing.js +2 -1
- package/dist/features/promotions/components/index.d.ts +2 -0
- package/dist/features/promotions/components/index.js +1 -0
- package/dist/features/promotions/constants/coupon-help.d.ts +27 -0
- package/dist/features/promotions/constants/coupon-help.js +42 -0
- package/dist/features/promotions/repository/coupons.repository.d.ts +10 -1
- package/dist/features/promotions/repository/coupons.repository.js +22 -8
- package/dist/features/promotions/schemas/firestore.d.ts +0 -1
- package/dist/features/promotions/schemas/firestore.js +1 -1
- package/dist/features/promotions/schemas/index.d.ts +0 -20
- package/dist/features/promotions/schemas/index.js +0 -1
- package/dist/features/reviews/actions/review-actions.js +5 -1
- package/dist/features/reviews/components/ReviewDetailPageView.js +2 -1
- package/dist/features/reviews/components/ReviewFilters.d.ts +7 -1
- package/dist/features/reviews/components/ReviewFilters.js +4 -3
- package/dist/features/reviews/components/ReviewsIndexListing.d.ts +6 -0
- package/dist/features/reviews/components/ReviewsIndexListing.js +9 -109
- package/dist/features/reviews/components/ReviewsListingPanel.d.ts +41 -0
- package/dist/features/reviews/components/ReviewsListingPanel.js +226 -0
- package/dist/features/reviews/components/index.d.ts +2 -0
- package/dist/features/reviews/components/index.js +1 -0
- package/dist/features/reviews/hooks/useReviews.d.ts +8 -0
- package/dist/features/reviews/hooks/useReviews.js +14 -6
- package/dist/features/reviews/repository/reviews.repository.d.ts +29 -1
- package/dist/features/reviews/repository/reviews.repository.js +77 -41
- package/dist/features/reviews/types/index.d.ts +8 -1
- package/dist/features/seller/components/SellerProductsCards.js +2 -2
- package/dist/features/seller/components/SellerProductsView.js +21 -18
- package/dist/features/stores/actions/store-query-actions.js +1 -1
- package/dist/features/stores/components/StoreAuctionsListing.js +5 -11
- package/dist/features/stores/components/StorePreOrdersListing.js +6 -11
- package/dist/features/stores/components/StoreReviewsListing.d.ts +4 -0
- package/dist/features/stores/components/StoreReviewsListing.js +7 -108
- package/dist/features/stores/schemas/index.d.ts +2 -2
- package/dist/features/tester/seed-data/coupons-tester-seed-data.js +3 -3
- package/dist/features/tester/seed-data/index.d.ts +1 -0
- package/dist/features/tester/seed-data/index.js +1 -0
- package/dist/features/tester/seed-data/offers-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/offers-tester-seed-data.js +61 -0
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +337 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +11 -2
- package/dist/react/hooks/useListingTypeFlags.d.ts +12 -19
- package/dist/react/hooks/useListingTypeFlags.js +4 -9
- package/dist/schemas/registry.d.ts +0 -12
- package/dist/seed/claimed-coupons-seed-data.js +3 -3
- package/dist/seed/coupons-seed-data.js +29 -10
- package/dist/seed/faq-seed-data.js +2 -2
- package/dist/seed/manifest.js +2 -2
- package/dist/styles.css +44 -39
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/FilterChipGroup.d.ts +21 -3
- package/dist/ui/components/FilterChipGroup.js +33 -4
- package/dist/ui/components/HorizontalScroller.d.ts +1 -2
- package/dist/ui/components/HorizontalScroller.js +9 -5
- package/dist/ui/components/HorizontalScroller.style.css +43 -38
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
|
|
2
2
|
import { ROUTES } from "../../../../next/routing/route-map";
|
|
3
|
+
import { TABLE_KEYS } from "../../../../constants/table-keys";
|
|
4
|
+
import { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
|
|
3
5
|
export const LISTING_TYPE = "digital-code";
|
|
4
6
|
export const capability = LISTING_TYPE_CAPABILITIES["digital-code"];
|
|
5
7
|
export const config = {
|
|
@@ -11,4 +13,14 @@ export const config = {
|
|
|
11
13
|
priceLabel: "Price per Code (₹)",
|
|
12
14
|
typeLabel: "Digital Code",
|
|
13
15
|
showsStockQuantity: false,
|
|
16
|
+
tabSlug: "digital-codes",
|
|
17
|
+
pluralLabel: "Digital Codes",
|
|
18
|
+
chipLabel: "Digital Codes",
|
|
19
|
+
browseRoute: String(ROUTES.PUBLIC.DIGITAL_CODES),
|
|
20
|
+
// "Sold out" for a code pool means codesAvailable hit 0, which the
|
|
21
|
+
// stockQuantity>0 predicate mirrors on this collection.
|
|
22
|
+
hideDefault: "sold",
|
|
23
|
+
sortOptions: STANDARD_SORT_OPTIONS,
|
|
24
|
+
publicSortOptions: STANDARD_PUBLIC_SORT_OPTIONS,
|
|
25
|
+
extraFacetKeys: [TABLE_KEYS.DELIVERY_METHOD],
|
|
14
26
|
};
|
|
@@ -12,4 +12,63 @@ export declare const config: {
|
|
|
12
12
|
priceLabel: string;
|
|
13
13
|
typeLabel: string;
|
|
14
14
|
showsStockQuantity: boolean;
|
|
15
|
+
tabSlug: string;
|
|
16
|
+
pluralLabel: string;
|
|
17
|
+
chipLabel: string;
|
|
18
|
+
browseRoute: string;
|
|
19
|
+
hideDefault: "sold";
|
|
20
|
+
sortOptions: readonly [{
|
|
21
|
+
readonly value: string;
|
|
22
|
+
readonly label: "Newest First";
|
|
23
|
+
}, {
|
|
24
|
+
readonly value: string;
|
|
25
|
+
readonly label: "Oldest First";
|
|
26
|
+
}, {
|
|
27
|
+
readonly value: string;
|
|
28
|
+
readonly label: "Price: Low to High";
|
|
29
|
+
}, {
|
|
30
|
+
readonly value: string;
|
|
31
|
+
readonly label: "Price: High to Low";
|
|
32
|
+
}, {
|
|
33
|
+
readonly value: string;
|
|
34
|
+
readonly label: "Name: A–Z";
|
|
35
|
+
}, {
|
|
36
|
+
readonly value: string;
|
|
37
|
+
readonly label: "Name: Z–A";
|
|
38
|
+
}, {
|
|
39
|
+
readonly value: string;
|
|
40
|
+
readonly label: "Featured First";
|
|
41
|
+
}, {
|
|
42
|
+
readonly value: string;
|
|
43
|
+
readonly label: "Promoted First";
|
|
44
|
+
}, {
|
|
45
|
+
readonly value: string;
|
|
46
|
+
readonly label: "Recently Updated";
|
|
47
|
+
}, {
|
|
48
|
+
readonly value: string;
|
|
49
|
+
readonly label: "Most Viewed";
|
|
50
|
+
}];
|
|
51
|
+
publicSortOptions: readonly [{
|
|
52
|
+
readonly value: string;
|
|
53
|
+
readonly label: "Newest First";
|
|
54
|
+
}, {
|
|
55
|
+
readonly value: string;
|
|
56
|
+
readonly label: "Oldest First";
|
|
57
|
+
}, {
|
|
58
|
+
readonly value: string;
|
|
59
|
+
readonly label: "Price: Low to High";
|
|
60
|
+
}, {
|
|
61
|
+
readonly value: string;
|
|
62
|
+
readonly label: "Price: High to Low";
|
|
63
|
+
}, {
|
|
64
|
+
readonly value: string;
|
|
65
|
+
readonly label: "Name: A–Z";
|
|
66
|
+
}, {
|
|
67
|
+
readonly value: string;
|
|
68
|
+
readonly label: "Name: Z–A";
|
|
69
|
+
}, {
|
|
70
|
+
readonly value: string;
|
|
71
|
+
readonly label: "Most Viewed";
|
|
72
|
+
}];
|
|
73
|
+
extraFacetKeys: readonly string[];
|
|
15
74
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
|
|
2
2
|
import { ROUTES } from "../../../../next/routing/route-map";
|
|
3
|
+
import { TABLE_KEYS } from "../../../../constants/table-keys";
|
|
4
|
+
import { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
|
|
3
5
|
export const LISTING_TYPE = "live";
|
|
4
6
|
export const capability = LISTING_TYPE_CAPABILITIES.live;
|
|
5
7
|
export const config = {
|
|
@@ -11,4 +13,16 @@ export const config = {
|
|
|
11
13
|
priceLabel: "Price (₹)",
|
|
12
14
|
typeLabel: "Live Item",
|
|
13
15
|
showsStockQuantity: true,
|
|
16
|
+
tabSlug: "live",
|
|
17
|
+
pluralLabel: "Live Items",
|
|
18
|
+
chipLabel: "Live Items",
|
|
19
|
+
browseRoute: String(ROUTES.PUBLIC.LIVE),
|
|
20
|
+
hideDefault: "sold",
|
|
21
|
+
sortOptions: STANDARD_SORT_OPTIONS,
|
|
22
|
+
publicSortOptions: STANDARD_PUBLIC_SORT_OPTIONS,
|
|
23
|
+
extraFacetKeys: [
|
|
24
|
+
TABLE_KEYS.SPECIES,
|
|
25
|
+
TABLE_KEYS.LIVE_SEX,
|
|
26
|
+
TABLE_KEYS.JURISDICTION,
|
|
27
|
+
],
|
|
14
28
|
};
|
|
@@ -12,4 +12,114 @@ export declare const config: {
|
|
|
12
12
|
priceLabel: string;
|
|
13
13
|
typeLabel: string;
|
|
14
14
|
showsStockQuantity: boolean;
|
|
15
|
+
tabSlug: string;
|
|
16
|
+
pluralLabel: string;
|
|
17
|
+
chipLabel: string;
|
|
18
|
+
browseRoute: string;
|
|
19
|
+
hideDefault: "closed";
|
|
20
|
+
sortOptions: readonly [{
|
|
21
|
+
readonly value: string;
|
|
22
|
+
readonly label: "Earliest Delivery";
|
|
23
|
+
}, {
|
|
24
|
+
readonly value: string;
|
|
25
|
+
readonly label: "Latest Delivery";
|
|
26
|
+
}, ...({
|
|
27
|
+
readonly value: string;
|
|
28
|
+
readonly label: "Newest First";
|
|
29
|
+
} | {
|
|
30
|
+
readonly value: string;
|
|
31
|
+
readonly label: "Oldest First";
|
|
32
|
+
})[], {
|
|
33
|
+
readonly value: string;
|
|
34
|
+
readonly label: "Price: Low to High";
|
|
35
|
+
}, {
|
|
36
|
+
readonly value: string;
|
|
37
|
+
readonly label: "Price: High to Low";
|
|
38
|
+
}, {
|
|
39
|
+
readonly value: string;
|
|
40
|
+
readonly label: "Fewest Slots Left";
|
|
41
|
+
}, {
|
|
42
|
+
readonly value: string;
|
|
43
|
+
readonly label: "Lowest Deposit First";
|
|
44
|
+
}];
|
|
45
|
+
publicSortOptions: readonly [{
|
|
46
|
+
readonly value: string;
|
|
47
|
+
readonly label: "Earliest Delivery";
|
|
48
|
+
}, {
|
|
49
|
+
readonly value: string;
|
|
50
|
+
readonly label: "Latest Delivery";
|
|
51
|
+
}, {
|
|
52
|
+
readonly value: string;
|
|
53
|
+
readonly label: "Newest First";
|
|
54
|
+
} | {
|
|
55
|
+
readonly value: string;
|
|
56
|
+
readonly label: "Oldest First";
|
|
57
|
+
} | {
|
|
58
|
+
readonly value: string;
|
|
59
|
+
readonly label: "Price: Low to High";
|
|
60
|
+
} | {
|
|
61
|
+
readonly value: string;
|
|
62
|
+
readonly label: "Price: High to Low";
|
|
63
|
+
} | {
|
|
64
|
+
readonly value: string;
|
|
65
|
+
readonly label: "Fewest Slots Left";
|
|
66
|
+
} | {
|
|
67
|
+
readonly value: string;
|
|
68
|
+
readonly label: "Lowest Deposit First";
|
|
69
|
+
}, {
|
|
70
|
+
readonly value: string;
|
|
71
|
+
readonly label: "Newest First";
|
|
72
|
+
} | {
|
|
73
|
+
readonly value: string;
|
|
74
|
+
readonly label: "Oldest First";
|
|
75
|
+
} | {
|
|
76
|
+
readonly value: string;
|
|
77
|
+
readonly label: "Price: Low to High";
|
|
78
|
+
} | {
|
|
79
|
+
readonly value: string;
|
|
80
|
+
readonly label: "Price: High to Low";
|
|
81
|
+
} | {
|
|
82
|
+
readonly value: string;
|
|
83
|
+
readonly label: "Fewest Slots Left";
|
|
84
|
+
} | {
|
|
85
|
+
readonly value: string;
|
|
86
|
+
readonly label: "Lowest Deposit First";
|
|
87
|
+
}, {
|
|
88
|
+
readonly value: string;
|
|
89
|
+
readonly label: "Newest First";
|
|
90
|
+
} | {
|
|
91
|
+
readonly value: string;
|
|
92
|
+
readonly label: "Oldest First";
|
|
93
|
+
} | {
|
|
94
|
+
readonly value: string;
|
|
95
|
+
readonly label: "Price: Low to High";
|
|
96
|
+
} | {
|
|
97
|
+
readonly value: string;
|
|
98
|
+
readonly label: "Price: High to Low";
|
|
99
|
+
} | {
|
|
100
|
+
readonly value: string;
|
|
101
|
+
readonly label: "Fewest Slots Left";
|
|
102
|
+
} | {
|
|
103
|
+
readonly value: string;
|
|
104
|
+
readonly label: "Lowest Deposit First";
|
|
105
|
+
}, {
|
|
106
|
+
readonly value: string;
|
|
107
|
+
readonly label: "Newest First";
|
|
108
|
+
} | {
|
|
109
|
+
readonly value: string;
|
|
110
|
+
readonly label: "Oldest First";
|
|
111
|
+
} | {
|
|
112
|
+
readonly value: string;
|
|
113
|
+
readonly label: "Price: Low to High";
|
|
114
|
+
} | {
|
|
115
|
+
readonly value: string;
|
|
116
|
+
readonly label: "Price: High to Low";
|
|
117
|
+
} | {
|
|
118
|
+
readonly value: string;
|
|
119
|
+
readonly label: "Fewest Slots Left";
|
|
120
|
+
} | {
|
|
121
|
+
readonly value: string;
|
|
122
|
+
readonly label: "Lowest Deposit First";
|
|
123
|
+
}];
|
|
124
|
+
extraFacetKeys: readonly string[];
|
|
15
125
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
|
|
2
2
|
import { ROUTES } from "../../../../next/routing/route-map";
|
|
3
|
+
import { TABLE_KEYS } from "../../../../constants/table-keys";
|
|
4
|
+
import { PREORDER_SORT_OPTIONS, PREORDER_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
|
|
3
5
|
export const LISTING_TYPE = "pre-order";
|
|
4
6
|
export const capability = LISTING_TYPE_CAPABILITIES["pre-order"];
|
|
5
7
|
export const config = {
|
|
@@ -11,4 +13,16 @@ export const config = {
|
|
|
11
13
|
priceLabel: "Pre-Order Price (₹)",
|
|
12
14
|
typeLabel: "Pre-Order",
|
|
13
15
|
showsStockQuantity: false,
|
|
16
|
+
tabSlug: "pre-orders",
|
|
17
|
+
pluralLabel: "Pre-Orders",
|
|
18
|
+
chipLabel: "Pre-Orders",
|
|
19
|
+
browseRoute: String(ROUTES.PUBLIC.PRE_ORDERS),
|
|
20
|
+
hideDefault: "closed",
|
|
21
|
+
sortOptions: PREORDER_SORT_OPTIONS,
|
|
22
|
+
publicSortOptions: PREORDER_PUBLIC_SORT_OPTIONS,
|
|
23
|
+
extraFacetKeys: [
|
|
24
|
+
TABLE_KEYS.PREORDER_STATUS,
|
|
25
|
+
TABLE_KEYS.DATE_FROM,
|
|
26
|
+
TABLE_KEYS.DATE_TO,
|
|
27
|
+
],
|
|
14
28
|
};
|
|
@@ -12,4 +12,48 @@ export declare const config: {
|
|
|
12
12
|
priceLabel: string;
|
|
13
13
|
typeLabel: string;
|
|
14
14
|
showsStockQuantity: boolean;
|
|
15
|
+
tabSlug: string;
|
|
16
|
+
pluralLabel: string;
|
|
17
|
+
chipLabel: string;
|
|
18
|
+
browseRoute: string;
|
|
19
|
+
hideDefault: "closed";
|
|
20
|
+
sortOptions: readonly [{
|
|
21
|
+
readonly value: string;
|
|
22
|
+
readonly label: "Newest First";
|
|
23
|
+
}, {
|
|
24
|
+
readonly value: string;
|
|
25
|
+
readonly label: "Oldest First";
|
|
26
|
+
}, {
|
|
27
|
+
readonly value: string;
|
|
28
|
+
readonly label: "Reveal: Soonest";
|
|
29
|
+
}, {
|
|
30
|
+
readonly value: string;
|
|
31
|
+
readonly label: "Reveal: Furthest";
|
|
32
|
+
}, {
|
|
33
|
+
readonly value: string;
|
|
34
|
+
readonly label: "Entry: Low to High";
|
|
35
|
+
}, {
|
|
36
|
+
readonly value: string;
|
|
37
|
+
readonly label: "Entry: High to Low";
|
|
38
|
+
}];
|
|
39
|
+
publicSortOptions: readonly [{
|
|
40
|
+
readonly value: string;
|
|
41
|
+
readonly label: "Newest First";
|
|
42
|
+
}, {
|
|
43
|
+
readonly value: string;
|
|
44
|
+
readonly label: "Oldest First";
|
|
45
|
+
}, {
|
|
46
|
+
readonly value: string;
|
|
47
|
+
readonly label: "Reveal: Soonest";
|
|
48
|
+
}, {
|
|
49
|
+
readonly value: string;
|
|
50
|
+
readonly label: "Reveal: Furthest";
|
|
51
|
+
}, {
|
|
52
|
+
readonly value: string;
|
|
53
|
+
readonly label: "Entry: Low to High";
|
|
54
|
+
}, {
|
|
55
|
+
readonly value: string;
|
|
56
|
+
readonly label: "Entry: High to Low";
|
|
57
|
+
}];
|
|
58
|
+
extraFacetKeys: readonly string[];
|
|
15
59
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
|
|
2
2
|
import { ROUTES } from "../../../../next/routing/route-map";
|
|
3
|
+
import { TABLE_KEYS } from "../../../../constants/table-keys";
|
|
4
|
+
import { PRIZE_DRAW_SORT_OPTIONS, PRIZE_DRAW_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
|
|
3
5
|
export const LISTING_TYPE = "prize-draw";
|
|
4
6
|
export const capability = LISTING_TYPE_CAPABILITIES["prize-draw"];
|
|
5
7
|
export const config = {
|
|
@@ -11,4 +13,12 @@ export const config = {
|
|
|
11
13
|
priceLabel: "Price (₹)",
|
|
12
14
|
typeLabel: "Prize Draw",
|
|
13
15
|
showsStockQuantity: false,
|
|
16
|
+
tabSlug: "prize-draws",
|
|
17
|
+
pluralLabel: "Prize Draws",
|
|
18
|
+
chipLabel: "Prize Draws",
|
|
19
|
+
browseRoute: String(ROUTES.PUBLIC.PRIZE_DRAWS),
|
|
20
|
+
hideDefault: "closed",
|
|
21
|
+
sortOptions: PRIZE_DRAW_SORT_OPTIONS,
|
|
22
|
+
publicSortOptions: PRIZE_DRAW_PUBLIC_SORT_OPTIONS,
|
|
23
|
+
extraFacetKeys: [TABLE_KEYS.PRIZE_REVEAL_STATUS],
|
|
14
24
|
};
|
|
@@ -12,4 +12,63 @@ export declare const config: {
|
|
|
12
12
|
priceLabel: string;
|
|
13
13
|
typeLabel: string;
|
|
14
14
|
showsStockQuantity: boolean;
|
|
15
|
+
tabSlug: string;
|
|
16
|
+
pluralLabel: string;
|
|
17
|
+
chipLabel: string;
|
|
18
|
+
browseRoute: string;
|
|
19
|
+
hideDefault: "sold";
|
|
20
|
+
sortOptions: readonly [{
|
|
21
|
+
readonly value: string;
|
|
22
|
+
readonly label: "Newest First";
|
|
23
|
+
}, {
|
|
24
|
+
readonly value: string;
|
|
25
|
+
readonly label: "Oldest First";
|
|
26
|
+
}, {
|
|
27
|
+
readonly value: string;
|
|
28
|
+
readonly label: "Price: Low to High";
|
|
29
|
+
}, {
|
|
30
|
+
readonly value: string;
|
|
31
|
+
readonly label: "Price: High to Low";
|
|
32
|
+
}, {
|
|
33
|
+
readonly value: string;
|
|
34
|
+
readonly label: "Name: A–Z";
|
|
35
|
+
}, {
|
|
36
|
+
readonly value: string;
|
|
37
|
+
readonly label: "Name: Z–A";
|
|
38
|
+
}, {
|
|
39
|
+
readonly value: string;
|
|
40
|
+
readonly label: "Featured First";
|
|
41
|
+
}, {
|
|
42
|
+
readonly value: string;
|
|
43
|
+
readonly label: "Promoted First";
|
|
44
|
+
}, {
|
|
45
|
+
readonly value: string;
|
|
46
|
+
readonly label: "Recently Updated";
|
|
47
|
+
}, {
|
|
48
|
+
readonly value: string;
|
|
49
|
+
readonly label: "Most Viewed";
|
|
50
|
+
}];
|
|
51
|
+
publicSortOptions: readonly [{
|
|
52
|
+
readonly value: string;
|
|
53
|
+
readonly label: "Newest First";
|
|
54
|
+
}, {
|
|
55
|
+
readonly value: string;
|
|
56
|
+
readonly label: "Oldest First";
|
|
57
|
+
}, {
|
|
58
|
+
readonly value: string;
|
|
59
|
+
readonly label: "Price: Low to High";
|
|
60
|
+
}, {
|
|
61
|
+
readonly value: string;
|
|
62
|
+
readonly label: "Price: High to Low";
|
|
63
|
+
}, {
|
|
64
|
+
readonly value: string;
|
|
65
|
+
readonly label: "Name: A–Z";
|
|
66
|
+
}, {
|
|
67
|
+
readonly value: string;
|
|
68
|
+
readonly label: "Name: Z–A";
|
|
69
|
+
}, {
|
|
70
|
+
readonly value: string;
|
|
71
|
+
readonly label: "Most Viewed";
|
|
72
|
+
}];
|
|
73
|
+
extraFacetKeys: readonly string[];
|
|
15
74
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
|
|
2
2
|
import { ROUTES } from "../../../../next/routing/route-map";
|
|
3
|
+
import { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
|
|
3
4
|
export const LISTING_TYPE = "standard";
|
|
4
5
|
export const capability = LISTING_TYPE_CAPABILITIES.standard;
|
|
5
6
|
export const config = {
|
|
@@ -11,4 +12,12 @@ export const config = {
|
|
|
11
12
|
priceLabel: "Price (₹)",
|
|
12
13
|
typeLabel: "Product",
|
|
13
14
|
showsStockQuantity: true,
|
|
15
|
+
tabSlug: "products",
|
|
16
|
+
pluralLabel: "Products",
|
|
17
|
+
chipLabel: "Standard",
|
|
18
|
+
browseRoute: String(ROUTES.PUBLIC.PRODUCTS),
|
|
19
|
+
hideDefault: "sold",
|
|
20
|
+
sortOptions: STANDARD_SORT_OPTIONS,
|
|
21
|
+
publicSortOptions: STANDARD_PUBLIC_SORT_OPTIONS,
|
|
22
|
+
extraFacetKeys: [],
|
|
14
23
|
};
|
|
@@ -12,4 +12,63 @@ export declare const config: {
|
|
|
12
12
|
priceLabel: string;
|
|
13
13
|
typeLabel: string;
|
|
14
14
|
showsStockQuantity: boolean;
|
|
15
|
+
tabSlug: string;
|
|
16
|
+
pluralLabel: string;
|
|
17
|
+
chipLabel: string;
|
|
18
|
+
browseRoute: string;
|
|
19
|
+
hideDefault: "sold";
|
|
20
|
+
sortOptions: readonly [{
|
|
21
|
+
readonly value: string;
|
|
22
|
+
readonly label: "Newest First";
|
|
23
|
+
}, {
|
|
24
|
+
readonly value: string;
|
|
25
|
+
readonly label: "Oldest First";
|
|
26
|
+
}, {
|
|
27
|
+
readonly value: string;
|
|
28
|
+
readonly label: "Price: Low to High";
|
|
29
|
+
}, {
|
|
30
|
+
readonly value: string;
|
|
31
|
+
readonly label: "Price: High to Low";
|
|
32
|
+
}, {
|
|
33
|
+
readonly value: string;
|
|
34
|
+
readonly label: "Name: A–Z";
|
|
35
|
+
}, {
|
|
36
|
+
readonly value: string;
|
|
37
|
+
readonly label: "Name: Z–A";
|
|
38
|
+
}, {
|
|
39
|
+
readonly value: string;
|
|
40
|
+
readonly label: "Featured First";
|
|
41
|
+
}, {
|
|
42
|
+
readonly value: string;
|
|
43
|
+
readonly label: "Promoted First";
|
|
44
|
+
}, {
|
|
45
|
+
readonly value: string;
|
|
46
|
+
readonly label: "Recently Updated";
|
|
47
|
+
}, {
|
|
48
|
+
readonly value: string;
|
|
49
|
+
readonly label: "Most Viewed";
|
|
50
|
+
}];
|
|
51
|
+
publicSortOptions: readonly [{
|
|
52
|
+
readonly value: string;
|
|
53
|
+
readonly label: "Newest First";
|
|
54
|
+
}, {
|
|
55
|
+
readonly value: string;
|
|
56
|
+
readonly label: "Oldest First";
|
|
57
|
+
}, {
|
|
58
|
+
readonly value: string;
|
|
59
|
+
readonly label: "Price: Low to High";
|
|
60
|
+
}, {
|
|
61
|
+
readonly value: string;
|
|
62
|
+
readonly label: "Price: High to Low";
|
|
63
|
+
}, {
|
|
64
|
+
readonly value: string;
|
|
65
|
+
readonly label: "Name: A–Z";
|
|
66
|
+
}, {
|
|
67
|
+
readonly value: string;
|
|
68
|
+
readonly label: "Name: Z–A";
|
|
69
|
+
}, {
|
|
70
|
+
readonly value: string;
|
|
71
|
+
readonly label: "Most Viewed";
|
|
72
|
+
}];
|
|
73
|
+
extraFacetKeys: readonly string[];
|
|
15
74
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
|
|
2
2
|
import { ROUTES } from "../../../../next/routing/route-map";
|
|
3
|
+
import { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
|
|
3
4
|
export const LISTING_TYPE = "stickers";
|
|
4
5
|
export const capability = LISTING_TYPE_CAPABILITIES.stickers;
|
|
5
6
|
export const config = {
|
|
@@ -11,4 +12,15 @@ export const config = {
|
|
|
11
12
|
priceLabel: "Price (₹)",
|
|
12
13
|
typeLabel: "Stickers",
|
|
13
14
|
showsStockQuantity: true,
|
|
15
|
+
tabSlug: "stickers",
|
|
16
|
+
pluralLabel: "Stickers",
|
|
17
|
+
chipLabel: "Stickers",
|
|
18
|
+
// Stickers share the combined `/art` browse page with art prints — they
|
|
19
|
+
// have no page of their own, which is why this points at ART rather than
|
|
20
|
+
// a `/stickers` route that does not exist.
|
|
21
|
+
browseRoute: String(ROUTES.PUBLIC.ART),
|
|
22
|
+
hideDefault: "sold",
|
|
23
|
+
sortOptions: STANDARD_SORT_OPTIONS,
|
|
24
|
+
publicSortOptions: STANDARD_PUBLIC_SORT_OPTIONS,
|
|
25
|
+
extraFacetKeys: [],
|
|
14
26
|
};
|
package/dist/client.d.ts
CHANGED
|
@@ -188,6 +188,8 @@ export { UserSidebar } from "./features/account/components/UserSidebar";
|
|
|
188
188
|
export type { UserSidebarProps, UserNavItem, UserNavGroup } from "./features/account/components/UserSidebar";
|
|
189
189
|
export { CouponsIndexListing } from "./features/promotions/components/CouponsIndexListing";
|
|
190
190
|
export type { CouponsIndexListingProps } from "./features/promotions/components/CouponsIndexListing";
|
|
191
|
+
export { CouponHelpDetails } from "./features/promotions/components/CouponHelpDetails";
|
|
192
|
+
export type { CouponHelpDetailsProps } from "./features/promotions/components/CouponHelpDetails";
|
|
191
193
|
export { NotificationBell } from "./features/account/components/NotificationBell";
|
|
192
194
|
export { NotificationPreferencesPanel } from "./features/account/components/NotificationPreferencesPanel";
|
|
193
195
|
export type { NotificationPreferencesPanelProps } from "./features/account/components/NotificationPreferencesPanel";
|
|
@@ -245,7 +247,9 @@ export type { MarketplaceBundleCardProps, MarketplaceBundleCardData, Marketplace
|
|
|
245
247
|
export { CompareOverlay } from "./features/products/components/CompareOverlay";
|
|
246
248
|
export type { CompareOverlayProps, CompareOverlayLabels, CompareProductLike, } from "./features/products/components/CompareOverlay";
|
|
247
249
|
export { COMPARE_MAX_ITEMS } from "./features/products/constants/action-defs";
|
|
248
|
-
export { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, AUCTION_SORT_OPTIONS, AUCTION_PUBLIC_SORT_OPTIONS, PREORDER_SORT_OPTIONS, BUNDLE_SORT_OPTIONS, PRIZE_DRAW_SORT_OPTIONS,
|
|
250
|
+
export { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, AUCTION_SORT_OPTIONS, AUCTION_PUBLIC_SORT_OPTIONS, PREORDER_SORT_OPTIONS, PREORDER_PUBLIC_SORT_OPTIONS, BUNDLE_SORT_OPTIONS, PRIZE_DRAW_SORT_OPTIONS, PRIZE_DRAW_PUBLIC_SORT_OPTIONS, } from "./features/products/constants/sieve";
|
|
251
|
+
export { sortOptionsFor, commonSortOptionsFor, hideDefaultsFor, } from "./_internal/shared/listing-types/_registry";
|
|
252
|
+
export type { ListingHideDefault } from "./_internal/shared/listing-types/_registry";
|
|
249
253
|
export type { SortOption } from "./features/products/constants/sieve";
|
|
250
254
|
export { MessagesView } from "./features/account/components/MessagesView";
|
|
251
255
|
export type { MessagesViewProps, MessagesViewLabels } from "./features/account/components/MessagesView";
|
package/dist/client.js
CHANGED
|
@@ -228,6 +228,7 @@ export { TourProvider, useTour } from "./_internal/client/features/tour/TourProv
|
|
|
228
228
|
export { apiClient, ApiClientError } from "./http/index";
|
|
229
229
|
export { UserSidebar } from "./features/account/components/UserSidebar";
|
|
230
230
|
export { CouponsIndexListing } from "./features/promotions/components/CouponsIndexListing";
|
|
231
|
+
export { CouponHelpDetails } from "./features/promotions/components/CouponHelpDetails";
|
|
231
232
|
export { NotificationBell } from "./features/account/components/NotificationBell";
|
|
232
233
|
export { NotificationPreferencesPanel } from "./features/account/components/NotificationPreferencesPanel";
|
|
233
234
|
export { LinkedAccountsSection } from "./features/account/components/LinkedAccountsSection";
|
|
@@ -261,7 +262,9 @@ export { InteractiveProductCard } from "./features/products/index";
|
|
|
261
262
|
export { MarketplaceBundleCard } from "./features/products/components/MarketplaceBundleCard";
|
|
262
263
|
export { CompareOverlay } from "./features/products/components/CompareOverlay";
|
|
263
264
|
export { COMPARE_MAX_ITEMS } from "./features/products/constants/action-defs";
|
|
264
|
-
export { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, AUCTION_SORT_OPTIONS, AUCTION_PUBLIC_SORT_OPTIONS, PREORDER_SORT_OPTIONS, BUNDLE_SORT_OPTIONS, PRIZE_DRAW_SORT_OPTIONS,
|
|
265
|
+
export { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, AUCTION_SORT_OPTIONS, AUCTION_PUBLIC_SORT_OPTIONS, PREORDER_SORT_OPTIONS, PREORDER_PUBLIC_SORT_OPTIONS, BUNDLE_SORT_OPTIONS, PRIZE_DRAW_SORT_OPTIONS, PRIZE_DRAW_PUBLIC_SORT_OPTIONS, } from "./features/products/constants/sieve";
|
|
266
|
+
// Derived from the listing-type plugin registry — see the note in index.ts.
|
|
267
|
+
export { sortOptionsFor, commonSortOptionsFor, hideDefaultsFor, } from "./_internal/shared/listing-types/_registry";
|
|
265
268
|
// Messages — RTDB-pinged Firestore conversations (D5 + VC7)
|
|
266
269
|
export { MessagesView } from "./features/account/components/MessagesView";
|
|
267
270
|
export { ChatList } from "./features/account/components/ChatList";
|
|
@@ -75,7 +75,19 @@ export declare const PRODUCT_FIELDS: {
|
|
|
75
75
|
readonly PRIZE_CURRENT_ENTRIES: "prizeCurrentEntries";
|
|
76
76
|
readonly PRIZE_MAX_ENTRIES: "prizeMaxEntries";
|
|
77
77
|
readonly PRIZE_DRAW_MODE: "prizeDrawMode";
|
|
78
|
+
readonly PRICE_PER_ENTRY: "pricePerEntry";
|
|
78
79
|
readonly IS_PART_OF_BUNDLE: "isPartOfBundle";
|
|
80
|
+
readonly IS_ON_SALE: "isOnSale";
|
|
81
|
+
readonly IS_TEST_DATA: "isTestData";
|
|
82
|
+
readonly BIDS_HAVE_STARTED: "bidsHaveStarted";
|
|
83
|
+
readonly PRE_ORDER_CLOSED: "preOrderClosed";
|
|
84
|
+
/**
|
|
85
|
+
* The Firestore field. NOTE the `Id` suffix: the URL/table key is
|
|
86
|
+
* `sublistingCategory` (TABLE_KEYS.SUBLISTING_CATEGORY) but the stored field
|
|
87
|
+
* is `sublistingCategoryId`. Emitting the table key as a filter field name
|
|
88
|
+
* matches zero documents — always map across via this constant.
|
|
89
|
+
*/
|
|
90
|
+
readonly SUBLISTING_CATEGORY_ID: "sublistingCategoryId";
|
|
79
91
|
readonly SEARCH_TOKENS: "searchTokens";
|
|
80
92
|
readonly CREATED_AT: "createdAt";
|
|
81
93
|
readonly UPDATED_AT: "updatedAt";
|
|
@@ -80,7 +80,19 @@ export const PRODUCT_FIELDS = {
|
|
|
80
80
|
PRIZE_CURRENT_ENTRIES: "prizeCurrentEntries",
|
|
81
81
|
PRIZE_MAX_ENTRIES: "prizeMaxEntries",
|
|
82
82
|
PRIZE_DRAW_MODE: "prizeDrawMode",
|
|
83
|
+
PRICE_PER_ENTRY: "pricePerEntry",
|
|
83
84
|
IS_PART_OF_BUNDLE: "isPartOfBundle",
|
|
85
|
+
IS_ON_SALE: "isOnSale",
|
|
86
|
+
IS_TEST_DATA: "isTestData",
|
|
87
|
+
BIDS_HAVE_STARTED: "bidsHaveStarted",
|
|
88
|
+
PRE_ORDER_CLOSED: "preOrderClosed",
|
|
89
|
+
/**
|
|
90
|
+
* The Firestore field. NOTE the `Id` suffix: the URL/table key is
|
|
91
|
+
* `sublistingCategory` (TABLE_KEYS.SUBLISTING_CATEGORY) but the stored field
|
|
92
|
+
* is `sublistingCategoryId`. Emitting the table key as a filter field name
|
|
93
|
+
* matches zero documents — always map across via this constant.
|
|
94
|
+
*/
|
|
95
|
+
SUBLISTING_CATEGORY_ID: "sublistingCategoryId",
|
|
84
96
|
SEARCH_TOKENS: "searchTokens",
|
|
85
97
|
CREATED_AT: "createdAt",
|
|
86
98
|
UPDATED_AT: "updatedAt",
|
|
@@ -47,6 +47,8 @@ export declare const TABLE_KEYS: {
|
|
|
47
47
|
readonly DELIVERY_METHOD: "deliveryMethod";
|
|
48
48
|
readonly SPECIES: "species";
|
|
49
49
|
readonly JURISDICTION: "jurisdiction";
|
|
50
|
+
readonly LIVE_SEX: "liveSex";
|
|
51
|
+
readonly LIVE_TRANSPORT_METHOD: "liveTransportMethod";
|
|
50
52
|
};
|
|
51
53
|
export type TableKey = (typeof TABLE_KEYS)[keyof typeof TABLE_KEYS];
|
|
52
54
|
export declare const VIEW_MODE: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx,
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { sortBy, sieveFilter, SIEVE_OP } from "../../../utils/sieve-builder";
|
|
4
4
|
import { ACCOUNT_ENDPOINTS } from "../../../constants/api-endpoints";
|
|
5
5
|
import { ROUTES } from "../../../constants/index";
|
|
6
6
|
import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
|
|
7
|
-
import { Button, Div, Grid, Stack, Text, TextLink } from "../../../ui";
|
|
7
|
+
import { Button, Div, FilterChipGroup, Grid, Stack, Text, TextLink } from "../../../ui";
|
|
8
8
|
import { PaginatedSelect } from "../../../ui/components/PaginatedSelect";
|
|
9
9
|
import { DataListingView } from "../../admin/components/DataListingView";
|
|
10
10
|
import { OrderCard } from "../../orders/components/OrdersList";
|
|
@@ -16,6 +16,23 @@ const SORT_OPTIONS = [
|
|
|
16
16
|
{ value: sortBy("totalPrice", "DESC"), label: "Highest total" },
|
|
17
17
|
{ value: sortBy("totalPrice", "ASC"), label: "Lowest total" },
|
|
18
18
|
];
|
|
19
|
+
/**
|
|
20
|
+
* Lane tabs — the same auction > offer > standard split the cart and checkout
|
|
21
|
+
* use, viewed after the fact. Every `id` is EXACTLY a stored
|
|
22
|
+
* `OrderDocument.orderType` value (or "" for All): a tab id that doesn't
|
|
23
|
+
* match a real stored value returns zero rows forever with no error anywhere
|
|
24
|
+
* (CLAUDE.md Root Cause #33).
|
|
25
|
+
*
|
|
26
|
+
* "standard" is filtered in memory server-side, because orders written before
|
|
27
|
+
* `orderType` existed have no such field and a Firestore `==` would exclude
|
|
28
|
+
* every one of them.
|
|
29
|
+
*/
|
|
30
|
+
const ORDER_LANE_TABS = [
|
|
31
|
+
{ id: "", label: "All" },
|
|
32
|
+
{ id: "standard", label: "Normal" },
|
|
33
|
+
{ id: "auction", label: "Auction wins" },
|
|
34
|
+
{ id: "offer", label: "Offer wins" },
|
|
35
|
+
];
|
|
19
36
|
const STATUS_OPTIONS = [
|
|
20
37
|
{ value: "pending", label: "Pending" },
|
|
21
38
|
{ value: "processing", label: "Processing" },
|
|
@@ -31,7 +48,7 @@ export function UserOrdersView({ onOrderClick }) {
|
|
|
31
48
|
title: "My Orders",
|
|
32
49
|
searchPlaceholder: "Search by order id…",
|
|
33
50
|
emptyLabel: "You haven't placed any orders yet.",
|
|
34
|
-
filterKeys: ["status"],
|
|
51
|
+
filterKeys: ["status", "orderType"],
|
|
35
52
|
defaultSort: sortBy("createdAt", "DESC"),
|
|
36
53
|
queryKey: ["user", "orders", "listing"],
|
|
37
54
|
endpoint: ACCOUNT_ENDPOINTS.ORDERS,
|
|
@@ -39,8 +56,13 @@ export function UserOrdersView({ onOrderClick }) {
|
|
|
39
56
|
hideTableView: true,
|
|
40
57
|
mapRows: (response) => response.items ?? [],
|
|
41
58
|
getTotal: (response, rows) => response.total ?? rows.length,
|
|
42
|
-
buildFilters: (state) =>
|
|
43
|
-
|
|
59
|
+
buildFilters: (state) => [
|
|
60
|
+
state.status ? sieveFilter("status", SIEVE_OP.EQ, state.status) : null,
|
|
61
|
+
state.orderType ? sieveFilter("orderType", SIEVE_OP.EQ, state.orderType) : null,
|
|
62
|
+
]
|
|
63
|
+
.filter(Boolean)
|
|
64
|
+
.join(",") || undefined,
|
|
65
|
+
renderFilterPanel: ({ pendingFilters, setPendingFilters }) => (_jsxs(Stack, { gap: "md", children: [_jsx(FilterChipGroup, { label: "Type", tabs: ORDER_LANE_TABS, value: pendingFilters.orderType ?? "", onChange: (id) => setPendingFilters((prev) => ({ ...prev, orderType: id })) }), _jsx(Div, { children: _jsx(PaginatedSelect, { value: pendingFilters.status || null, onChange: (v) => setPendingFilters((p) => ({ ...p, status: v ?? "" })), options: STATUS_OPTIONS, placeholder: "All statuses", ariaLabel: "Filter by order status" }) })] })),
|
|
44
66
|
renderCards: (rows, _view, _selection, isLoading) => {
|
|
45
67
|
if (isLoading) {
|
|
46
68
|
return (_jsx(Stack, { gap: "md", children: Array.from({ length: 3 }).map((_, i) => (_jsx(Div, { className: "h-24 animate-pulse border border-[var(--appkit-color-border)]", rounded: "xl" }, i))) }));
|