@mohasinac/appkit 4.11.3 → 4.12.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.
Files changed (103) hide show
  1. package/dist/_internal/server/features/checkout/actions.d.ts +36 -3
  2. package/dist/_internal/server/features/checkout/actions.js +122 -44
  3. package/dist/_internal/server/features/orders/adapters.js +13 -0
  4. package/dist/_internal/server/features/products/list-public.d.ts +28 -0
  5. package/dist/_internal/server/features/products/list-public.js +92 -0
  6. package/dist/_internal/server/jobs/core/auctionSettlement.js +5 -2
  7. package/dist/_internal/shared/checkout/lanes.d.ts +20 -0
  8. package/dist/_internal/shared/checkout/lanes.js +28 -0
  9. package/dist/_internal/shared/features/checkout/config.d.ts +4 -0
  10. package/dist/_internal/shared/features/checkout/config.js +8 -0
  11. package/dist/_internal/shared/fees/calculator.d.ts +34 -2
  12. package/dist/_internal/shared/fees/calculator.js +45 -1
  13. package/dist/client.d.ts +7 -1
  14. package/dist/client.js +4 -1
  15. package/dist/constants/api-endpoints.d.ts +6 -0
  16. package/dist/constants/api-endpoints.js +2 -0
  17. package/dist/features/admin/components/AdminAddressesView.js +18 -10
  18. package/dist/features/admin/components/AdminArtView.d.ts +9 -0
  19. package/dist/features/admin/components/AdminArtView.js +11 -35
  20. package/dist/features/admin/components/AdminClassifiedView.d.ts +9 -0
  21. package/dist/features/admin/components/AdminClassifiedView.js +11 -35
  22. package/dist/features/admin/components/AdminDigitalCodesView.d.ts +9 -0
  23. package/dist/features/admin/components/AdminDigitalCodesView.js +11 -42
  24. package/dist/features/admin/components/AdminLiveView.d.ts +9 -0
  25. package/dist/features/admin/components/AdminLiveView.js +11 -41
  26. package/dist/features/admin/components/AdminOrderEditorView.d.ts +8 -1
  27. package/dist/features/admin/components/AdminOrderEditorView.js +4 -3
  28. package/dist/features/admin/components/AdminOrdersView.js +14 -1
  29. package/dist/features/admin/components/AdminPaymentMethodsView.js +15 -10
  30. package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
  31. package/dist/features/admin/components/AdminSiteSettingsView.js +4 -2
  32. package/dist/features/admin/components/AdminStickersView.d.ts +9 -0
  33. package/dist/features/admin/components/AdminStickersView.js +11 -35
  34. package/dist/features/admin/hooks/useAdminListing.js +7 -2
  35. package/dist/features/admin/schemas/firestore.d.ts +5 -0
  36. package/dist/features/admin/schemas/firestore.js +1 -0
  37. package/dist/features/auctions/actions/bid-actions.js +2 -2
  38. package/dist/features/cart/components/CartDrawer.d.ts +9 -1
  39. package/dist/features/cart/components/CartDrawer.js +4 -3
  40. package/dist/features/cart/components/CartPriceBreakdown.d.ts +61 -0
  41. package/dist/features/cart/components/CartPriceBreakdown.js +25 -0
  42. package/dist/features/cart/components/StoreAddonsPicker.d.ts +47 -0
  43. package/dist/features/cart/components/StoreAddonsPicker.js +21 -0
  44. package/dist/features/cart/components/index.d.ts +4 -0
  45. package/dist/features/cart/components/index.js +2 -0
  46. package/dist/features/cart/repository/cart.repository.d.ts +20 -2
  47. package/dist/features/cart/repository/cart.repository.js +49 -0
  48. package/dist/features/cart/schemas/firestore.d.ts +26 -0
  49. package/dist/features/layout/BottomActions.js +37 -4
  50. package/dist/features/layout/BottomActionsContext.d.ts +12 -0
  51. package/dist/features/layout/BottomActionsContext.js +5 -0
  52. package/dist/features/layout/hooks/useBottomActions.d.ts +6 -0
  53. package/dist/features/layout/hooks/useBottomActions.js +11 -1
  54. package/dist/features/orders/components/OrderAddonBadges.d.ts +36 -0
  55. package/dist/features/orders/components/OrderAddonBadges.js +28 -0
  56. package/dist/features/orders/components/index.d.ts +1 -0
  57. package/dist/features/orders/components/index.js +1 -0
  58. package/dist/features/orders/repository/orders.repository.d.ts +32 -0
  59. package/dist/features/orders/repository/orders.repository.js +14 -0
  60. package/dist/features/orders/types/index.d.ts +22 -0
  61. package/dist/features/products/components/ArtStickersListView.js +5 -4
  62. package/dist/features/products/components/PrizeDrawsListingView.js +18 -33
  63. package/dist/features/products/components/ProductsIndexListing.js +87 -11
  64. package/dist/features/products/components/ProductsIndexPageView.js +14 -2
  65. package/dist/features/products/config/listing-type-listing-config.d.ts +31 -0
  66. package/dist/features/products/config/listing-type-listing-config.js +74 -0
  67. package/dist/features/products/hooks/useProducts.js +14 -0
  68. package/dist/features/products/types/index.d.ts +15 -0
  69. package/dist/features/seller/components/SellerOrdersView.js +2 -1
  70. package/dist/features/stores/components/StoreArtStickersPageView.d.ts +21 -0
  71. package/dist/features/stores/components/StoreArtStickersPageView.js +30 -0
  72. package/dist/features/stores/components/StoreAuctionsPageView.d.ts +4 -1
  73. package/dist/features/stores/components/StoreAuctionsPageView.js +17 -17
  74. package/dist/features/stores/components/StoreClassifiedsListing.js +7 -0
  75. package/dist/features/stores/components/StoreClassifiedsPageView.d.ts +4 -1
  76. package/dist/features/stores/components/StoreClassifiedsPageView.js +16 -12
  77. package/dist/features/stores/components/StoreDetailLayoutView.js +4 -3
  78. package/dist/features/stores/components/StoreDigitalCodesListing.js +5 -0
  79. package/dist/features/stores/components/StoreDigitalCodesPageView.d.ts +4 -1
  80. package/dist/features/stores/components/StoreDigitalCodesPageView.js +16 -12
  81. package/dist/features/stores/components/StoreLiveItemsListing.js +7 -0
  82. package/dist/features/stores/components/StoreLiveItemsPageView.d.ts +4 -1
  83. package/dist/features/stores/components/StoreLiveItemsPageView.js +16 -12
  84. package/dist/features/stores/components/StorePreOrdersPageView.d.ts +4 -1
  85. package/dist/features/stores/components/StorePreOrdersPageView.js +17 -17
  86. package/dist/features/stores/components/StorePrizeDrawsPageView.d.ts +4 -8
  87. package/dist/features/stores/components/StorePrizeDrawsPageView.js +17 -22
  88. package/dist/features/stores/components/StoreProductsListing.d.ts +7 -1
  89. package/dist/features/stores/components/StoreProductsListing.js +3 -2
  90. package/dist/features/stores/components/StoreProductsPageView.d.ts +1 -1
  91. package/dist/features/stores/components/StoreProductsPageView.js +16 -21
  92. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +602 -0
  93. package/dist/next/routing/route-map.d.ts +2 -0
  94. package/dist/next/routing/route-map.js +5 -0
  95. package/dist/seed/reviews-seed-data.js +52 -0
  96. package/dist/server-entry.d.ts +1 -0
  97. package/dist/server-entry.js +1 -0
  98. package/dist/styles.css +12 -1
  99. package/dist/tailwind-utilities.css +1 -1
  100. package/dist/ui/components/Checkbox.d.ts +10 -1
  101. package/dist/ui/components/Checkbox.js +14 -2
  102. package/dist/ui/components/Checkbox.style.css +11 -0
  103. package/package.json +1 -1
@@ -44,6 +44,7 @@ export declare const DEFAULT_ROUTE_MAP: {
44
44
  readonly STORE_CLASSIFIEDS: (storeSlug: string) => string;
45
45
  readonly STORE_DIGITAL_CODES: (storeSlug: string) => string;
46
46
  readonly STORE_LIVE: (storeSlug: string) => string;
47
+ readonly STORE_ART: (storeSlug: string) => string;
47
48
  readonly CATEGORIES: "/categories";
48
49
  readonly CATEGORY_DETAIL: (slug: string) => string;
49
50
  readonly BRANDS: "/brands";
@@ -415,6 +416,7 @@ export declare const ROUTES: {
415
416
  readonly STORE_CLASSIFIEDS: (storeSlug: string) => string;
416
417
  readonly STORE_DIGITAL_CODES: (storeSlug: string) => string;
417
418
  readonly STORE_LIVE: (storeSlug: string) => string;
419
+ readonly STORE_ART: (storeSlug: string) => string;
418
420
  readonly CATEGORIES: "/categories";
419
421
  readonly CATEGORY_DETAIL: (slug: string) => string;
420
422
  readonly BRANDS: "/brands";
@@ -33,6 +33,11 @@ export const DEFAULT_ROUTE_MAP = {
33
33
  STORE_CLASSIFIEDS: (storeSlug) => `/stores/${storeSlug}/classified`,
34
34
  STORE_DIGITAL_CODES: (storeSlug) => `/stores/${storeSlug}/digital-codes`,
35
35
  STORE_LIVE: (storeSlug) => `/stores/${storeSlug}/live`,
36
+ // Combined art + stickers, mirroring the public /art page. The store's
37
+ // "Art & Stickers" tab used to point at STORE_PRODUCTS, which filters to
38
+ // `standard` — so the tab showed a real non-zero count and then landed on
39
+ // a page containing none of those items.
40
+ STORE_ART: (storeSlug) => `/stores/${storeSlug}/art`,
36
41
  CATEGORIES: "/categories",
37
42
  CATEGORY_DETAIL: (slug) => `/categories/${slug}`,
38
43
  BRANDS: "/brands",
@@ -119,4 +119,56 @@ for (let i = 0; i < 65; i++) {
119
119
  updatedAt: daysAgo(daysAgoCreated - 1),
120
120
  });
121
121
  }
122
+ /**
123
+ * A deliberately deep review list on ONE product, so the paginated reviews tab is
124
+ * actually exercisable.
125
+ *
126
+ * The round-robin above spreads 65 reviews across 14 products — 4-5 each, which is
127
+ * below the 10-per-page detail-page size, so pagination could never appear on a product
128
+ * page and the tester checklist cases for it would be untestable. This block pushes
129
+ * "Beyblade Original Dranzer S" to 5 + 14 = 19 approved reviews (2 pages), and spreads
130
+ * ratings across all five stars so the rating filter and the average/distribution
131
+ * summary have something real to act on.
132
+ *
133
+ * Ids and every field are derived from the loop index — no Math.random(), no Date.now()
134
+ * in an id — so `appkit-seed load` stays idempotent (Recurrent Root Cause #25).
135
+ */
136
+ const DEEP_REVIEW_PRODUCT = {
137
+ id: "product-beyblade-original-dranzer-s",
138
+ title: "Beyblade Original Dranzer S",
139
+ store: "store-beyblade-arena",
140
+ };
141
+ for (let i = 0; i < 14; i++) {
142
+ const template = reviewTemplates[i % reviewTemplates.length];
143
+ const buyer = buyers[i % buyers.length];
144
+ // 1..5, cycling — guarantees every star bucket is populated for the rating filter.
145
+ const rating = (i % 5) + 1;
146
+ // Distinct from the main loop's 90-i range so the two sets interleave predictably
147
+ // and "newest first" is verifiable by eye.
148
+ const daysAgoCreated = 28 - i;
149
+ const hasImage = i % 4 === 0;
150
+ _rawReviewsSeedData.push({
151
+ id: `review-dranzer-deep-${i + 1}`,
152
+ productId: DEEP_REVIEW_PRODUCT.id,
153
+ productTitle: DEEP_REVIEW_PRODUCT.title,
154
+ storeId: DEEP_REVIEW_PRODUCT.store,
155
+ userId: buyer.id,
156
+ userName: buyer.name,
157
+ rating,
158
+ title: `${template.title} (${rating}★)`,
159
+ comment: template.comment,
160
+ images: hasImage
161
+ ? [
162
+ seedExtMedia(`https://picsum.photos/seed/review-image-dranzer-deep-${i + 1}/800/800`),
163
+ ]
164
+ : [],
165
+ hasImages: hasImage,
166
+ verified: i % 3 !== 2,
167
+ status: "approved",
168
+ helpfulCount: (i * 3) % 17,
169
+ reportCount: 0,
170
+ createdAt: daysAgo(daysAgoCreated),
171
+ updatedAt: daysAgo(daysAgoCreated),
172
+ });
173
+ }
122
174
  export const reviewsSeedData = _rawReviewsSeedData;
@@ -44,6 +44,7 @@ export { StoreBundlesPageView } from "./features/stores/components/StoreBundlesP
44
44
  export { StoreClassifiedsPageView } from "./features/stores/components/StoreClassifiedsPageView";
45
45
  export { StoreDigitalCodesPageView } from "./features/stores/components/StoreDigitalCodesPageView";
46
46
  export { StoreLiveItemsPageView } from "./features/stores/components/StoreLiveItemsPageView";
47
+ export { StoreArtStickersPageView } from "./features/stores/components/StoreArtStickersPageView";
47
48
  export { getProductForDetail, listSitemapProducts, type SitemapProduct, } from "./_internal/server/features/products/index";
48
49
  export { listPublicProducts, parsePublicProductParams, PUBLIC_PRODUCT_MAX_PAGE_SIZE, type PublicProductListInput, type PublicProductListResult, type PublicProductListOptions, type PublicProductExecutor, type PublicProductQuery, } from "./_internal/server/features/products/index";
49
50
  export { getAuctionForDetail, getProductFeaturesForAuction, } from "./_internal/server/features/auctions/index";
@@ -49,6 +49,7 @@ export { StoreBundlesPageView } from "./features/stores/components/StoreBundlesP
49
49
  export { StoreClassifiedsPageView } from "./features/stores/components/StoreClassifiedsPageView";
50
50
  export { StoreDigitalCodesPageView } from "./features/stores/components/StoreDigitalCodesPageView";
51
51
  export { StoreLiveItemsPageView } from "./features/stores/components/StoreLiveItemsPageView";
52
+ export { StoreArtStickersPageView } from "./features/stores/components/StoreArtStickersPageView";
52
53
  // S2: products data layer — deduped via React.cache()
53
54
  export { getProductForDetail, listSitemapProducts, } from "./_internal/server/features/products/index";
54
55
  export { listPublicProducts, parsePublicProductParams, PUBLIC_PRODUCT_MAX_PAGE_SIZE, } from "./_internal/server/features/products/index";