@mohasinac/appkit 2.7.46 → 2.7.47

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.
Files changed (69) hide show
  1. package/dist/constants/field-names.d.ts +1 -0
  2. package/dist/constants/field-names.js +1 -0
  3. package/dist/core/unit-of-work.js +3 -4
  4. package/dist/features/auth/actions/profile-actions.js +4 -1
  5. package/dist/features/auth/repository/user.repository.d.ts +1 -0
  6. package/dist/features/auth/repository/user.repository.js +3 -0
  7. package/dist/features/blog/api/route.js +3 -0
  8. package/dist/features/blog/components/BlogIndexListing.js +2 -0
  9. package/dist/features/blog/components/BlogPostView.js +2 -1
  10. package/dist/features/categories/api/route.js +1 -1
  11. package/dist/features/categories/components/BundleDetailView.js +5 -3
  12. package/dist/features/categories/components/CategoryBundlesListing.js +77 -41
  13. package/dist/features/categories/components/CategoryDetailPageView.js +12 -9
  14. package/dist/features/categories/components/CategoryProductsListing.js +3 -5
  15. package/dist/features/classified/components/ClassifiedIndexListing.js +3 -4
  16. package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +3 -4
  17. package/dist/features/events/actions/event-actions.d.ts +2 -3
  18. package/dist/features/events/actions/event-actions.js +3 -5
  19. package/dist/features/events/api/route.js +7 -7
  20. package/dist/features/events/components/AdminEventEditorView.js +80 -6
  21. package/dist/features/events/components/AdminEventEntriesView.js +33 -4
  22. package/dist/features/events/components/EventFilters.d.ts +3 -0
  23. package/dist/features/events/components/EventFilters.js +1 -0
  24. package/dist/features/events/components/EventLeaderboard.js +1 -1
  25. package/dist/features/events/components/EventsIndexListing.js +10 -7
  26. package/dist/features/events/repository/event-entry.repository.d.ts +2 -2
  27. package/dist/features/events/repository/event-entry.repository.js +32 -7
  28. package/dist/features/events/types/index.d.ts +3 -1
  29. package/dist/features/homepage/components/BrandsSection.js +2 -2
  30. package/dist/features/homepage/components/CustomCardsSection.js +1 -1
  31. package/dist/features/homepage/components/CustomerReviewsSection.js +1 -1
  32. package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
  33. package/dist/features/homepage/components/SectionCarousel.js +1 -1
  34. package/dist/features/homepage/components/ShopByCategorySection.js +1 -1
  35. package/dist/features/live/components/LiveItemsIndexListing.js +3 -4
  36. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +3 -4
  37. package/dist/features/products/components/AuctionsIndexListing.js +3 -4
  38. package/dist/features/products/components/PrizeDrawsIndexListing.js +3 -8
  39. package/dist/features/products/components/ProductDetailPageView.js +17 -2
  40. package/dist/features/products/components/ProductsIndexListing.js +10 -6
  41. package/dist/features/products/schemas/firestore.d.ts +2 -0
  42. package/dist/features/reviews/actions/review-actions.js +2 -0
  43. package/dist/features/reviews/components/ReviewDetailShell.js +3 -2
  44. package/dist/features/reviews/components/ReviewFilters.js +1 -1
  45. package/dist/features/reviews/components/ReviewsIndexListing.js +9 -2
  46. package/dist/features/reviews/hooks/useReviews.js +2 -0
  47. package/dist/features/reviews/schemas/firestore.d.ts +4 -0
  48. package/dist/features/reviews/types/index.d.ts +3 -0
  49. package/dist/features/scams/components/ScamRegistryView.js +41 -8
  50. package/dist/features/stores/components/InteractiveStoreCard.js +1 -1
  51. package/dist/features/stores/components/StoreAuctionsListing.js +3 -4
  52. package/dist/features/stores/components/StoreDetailLayoutView.js +13 -5
  53. package/dist/features/stores/components/StorePreOrdersListing.js +3 -4
  54. package/dist/features/stores/components/StoreProductsListing.js +3 -4
  55. package/dist/index.d.ts +1 -0
  56. package/dist/providers/db-firebase/helpers.d.ts +4 -6
  57. package/dist/providers/db-firebase/helpers.js +18 -5
  58. package/dist/providers/db-firebase/sieve.js +26 -1
  59. package/dist/react/hooks/usePendingFilters.d.ts +2 -0
  60. package/dist/react/hooks/usePendingFilters.js +9 -0
  61. package/dist/react/hooks/usePendingTable.d.ts +5 -0
  62. package/dist/react/hooks/usePendingTable.js +1 -0
  63. package/dist/seed/homepage-sections-seed-data.js +2 -2
  64. package/dist/seed/products-standard-seed-data.js +1 -0
  65. package/dist/tailwind-utilities.css +1 -1
  66. package/dist/ui/components/Drawer.style.css +13 -0
  67. package/dist/ui/components/FilterDrawer.d.ts +4 -2
  68. package/dist/ui/components/FilterDrawer.js +2 -2
  69. package/package.json +1 -1
@@ -25,6 +25,8 @@ export interface UsePendingFiltersReturn {
25
25
  reset: () => void;
26
26
  /** Clear all keys in both pending state and the URL */
27
27
  clear: () => void;
28
+ /** Clear filter keys + extra URL keys in a single router.replace — avoids the double-replace race */
29
+ clearAll: (extras?: Record<string, string>) => void;
28
30
  }
29
31
  /**
30
32
  * usePendingFilters
@@ -65,6 +65,14 @@ export function usePendingFilters({ table, keys, }) {
65
65
  updates[k] = "";
66
66
  table.setMany(updates);
67
67
  }, [keys, table]);
68
+ const clearAll = useCallback((extras) => {
69
+ const empty = Object.fromEntries(keys.map((k) => [k, []]));
70
+ setPending(empty);
71
+ const updates = { page: "1", ...extras };
72
+ for (const k of keys)
73
+ updates[k] = "";
74
+ table.setMany(updates);
75
+ }, [keys, table]);
68
76
  return {
69
77
  pending,
70
78
  applied,
@@ -75,5 +83,6 @@ export function usePendingFilters({ table, keys, }) {
75
83
  apply,
76
84
  reset,
77
85
  clear,
86
+ clearAll,
78
87
  };
79
88
  }
@@ -17,6 +17,11 @@ export interface UsePendingTableReturn {
17
17
  onFilterApply: () => void;
18
18
  /** Clear all filter keys from pending state and URL */
19
19
  onFilterClear: () => void;
20
+ /**
21
+ * Clear filter keys + extra URL keys in a SINGLE router.replace.
22
+ * Use this in resetAll handlers to avoid the double-replace race condition.
23
+ */
24
+ onResetAll: (extras?: Record<string, string>) => void;
20
25
  /**
21
26
  * Revert pending state to the current URL values without clearing them.
22
27
  * Call this when opening a filter drawer to ensure it shows the last
@@ -40,6 +40,7 @@ export function usePendingTable(table, keys) {
40
40
  filterActiveCount: filters.appliedCount,
41
41
  onFilterApply: filters.apply,
42
42
  onFilterClear: filters.clear,
43
+ onResetAll: filters.clearAll,
43
44
  onFilterReset: filters.reset,
44
45
  };
45
46
  }
@@ -327,9 +327,9 @@ export const homepageSectionsSeedData = [
327
327
  /** Which tabs to surface in display order (leave empty [] to auto-derive from categories) */
328
328
  visibleTabs: ["general", "orders_payment", "shipping_delivery", "returns_refunds"],
329
329
  /** Allow multiple accordion panels open at once */
330
- allowMultipleOpen: false,
330
+ allowMultipleOpen: true,
331
331
  /** Number of items expanded on first render (0 = all closed) */
332
- defaultOpenCount: 1,
332
+ defaultOpenCount: 100,
333
333
  categories: ["general", "orders_payment", "shipping_delivery", "returns_refunds", "product_information"],
334
334
  },
335
335
  createdAt: daysAgo(90),
@@ -4134,6 +4134,7 @@ export const productsStandardSeedData = [
4134
4134
  ..._rawProductsStandardSeedData.map((p) => ({
4135
4135
  ...p,
4136
4136
  listingType: "standard",
4137
+ isPartOfBundle: Array.isArray(p.partOfBundleIds) && p.partOfBundleIds.length > 0,
4137
4138
  })),
4138
4139
  // ── SB-UNI-M classified seed (OLX-style meetup) ──────────────────────────
4139
4140
  {