@mohasinac/appkit 2.7.50 → 2.7.52

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 (143) hide show
  1. package/dist/_internal/server/jobs/core/__tests__/couponExpiry.test.d.ts +1 -0
  2. package/dist/_internal/server/jobs/core/__tests__/couponExpiry.test.js +65 -0
  3. package/dist/_internal/server/jobs/core/__tests__/listingProcessor.test.d.ts +1 -0
  4. package/dist/_internal/server/jobs/core/__tests__/listingProcessor.test.js +163 -0
  5. package/dist/_internal/server/jobs/core/__tests__/mediaTmpCleanup.test.d.ts +1 -0
  6. package/dist/_internal/server/jobs/core/__tests__/mediaTmpCleanup.test.js +115 -0
  7. package/dist/_internal/server/jobs/core/__tests__/pendingOrderTimeout.test.d.ts +1 -0
  8. package/dist/_internal/server/jobs/core/__tests__/pendingOrderTimeout.test.js +96 -0
  9. package/dist/client.d.ts +29 -6
  10. package/dist/client.js +16 -4
  11. package/dist/constants/api-endpoints.d.ts +42 -0
  12. package/dist/constants/api-endpoints.js +14 -0
  13. package/dist/features/_guide-cls.d.ts +13 -0
  14. package/dist/features/_guide-cls.js +14 -0
  15. package/dist/features/about/components/HelpPageView.js +29 -26
  16. package/dist/features/account/components/BuyerAccountGuideView.d.ts +1 -0
  17. package/dist/features/account/components/BuyerAccountGuideView.js +39 -0
  18. package/dist/features/account/components/BuyerAuctionsGuideView.d.ts +1 -0
  19. package/dist/features/account/components/BuyerAuctionsGuideView.js +38 -0
  20. package/dist/features/account/components/BuyerOrdersGuideView.d.ts +1 -0
  21. package/dist/features/account/components/BuyerOrdersGuideView.js +48 -0
  22. package/dist/features/account/components/BuyerShoppingGuideView.d.ts +1 -0
  23. package/dist/features/account/components/BuyerShoppingGuideView.js +38 -0
  24. package/dist/features/admin/components/AdminAnalyticsGuideView.d.ts +1 -0
  25. package/dist/features/admin/components/AdminAnalyticsGuideView.js +24 -0
  26. package/dist/features/admin/components/AdminBlogEditorView.js +100 -77
  27. package/dist/features/admin/components/AdminBundleEditorView.js +20 -14
  28. package/dist/features/admin/components/AdminBundlesView.d.ts +1 -3
  29. package/dist/features/admin/components/AdminBundlesView.js +173 -52
  30. package/dist/features/admin/components/AdminCatalogGuideView.d.ts +1 -0
  31. package/dist/features/admin/components/AdminCatalogGuideView.js +28 -0
  32. package/dist/features/admin/components/AdminContentGuideView.d.ts +1 -0
  33. package/dist/features/admin/components/AdminContentGuideView.js +36 -0
  34. package/dist/features/admin/components/AdminCouponEditorView.js +1 -1
  35. package/dist/features/admin/components/AdminGuideHubView.d.ts +5 -0
  36. package/dist/features/admin/components/AdminGuideHubView.js +79 -0
  37. package/dist/features/admin/components/AdminOrdersGuideView.d.ts +1 -0
  38. package/dist/features/admin/components/AdminOrdersGuideView.js +44 -0
  39. package/dist/features/admin/components/AdminProductsView.js +8 -3
  40. package/dist/features/admin/components/AdminSiteConfigGuideView.d.ts +1 -0
  41. package/dist/features/admin/components/AdminSiteConfigGuideView.js +21 -0
  42. package/dist/features/admin/components/AdminStoresGuideView.d.ts +1 -0
  43. package/dist/features/admin/components/AdminStoresGuideView.js +32 -0
  44. package/dist/features/admin/components/AdminTeamGuideView.d.ts +1 -0
  45. package/dist/features/admin/components/AdminTeamGuideView.js +33 -0
  46. package/dist/features/admin/components/AdminTrustGuideView.d.ts +1 -0
  47. package/dist/features/admin/components/AdminTrustGuideView.js +40 -0
  48. package/dist/features/admin/components/AdminUsersGuideView.d.ts +1 -0
  49. package/dist/features/admin/components/AdminUsersGuideView.js +38 -0
  50. package/dist/features/categories/components/CategoryBundlesListing.js +3 -33
  51. package/dist/features/categories/components/index.d.ts +0 -2
  52. package/dist/features/categories/components/index.js +0 -1
  53. package/dist/features/events/components/AdminEventEditorView.js +223 -269
  54. package/dist/features/grouped/repository/grouped-listings.repository.d.ts +9 -0
  55. package/dist/features/grouped/repository/grouped-listings.repository.js +12 -0
  56. package/dist/features/media/upload/MediaUploadField.js +1 -1
  57. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +3 -1
  58. package/dist/features/products/components/AuctionsIndexListing.js +3 -1
  59. package/dist/features/products/components/MarketplaceBundleCard.d.ts +21 -0
  60. package/dist/features/products/components/MarketplaceBundleCard.js +56 -0
  61. package/dist/features/products/components/ProductsIndexListing.js +3 -1
  62. package/dist/features/products/components/index.d.ts +2 -4
  63. package/dist/features/products/components/index.js +1 -2
  64. package/dist/features/promotions/schemas/firestore.js +1 -1
  65. package/dist/features/reviews/components/index.d.ts +0 -2
  66. package/dist/features/reviews/components/index.js +0 -1
  67. package/dist/features/seller/components/BrandInlineSelect.js +23 -3
  68. package/dist/features/seller/components/CategoryInlineSelect.js +20 -3
  69. package/dist/features/seller/components/SellerAnalyticsAlertsView.d.ts +6 -0
  70. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +124 -0
  71. package/dist/features/seller/components/SellerAnalyticsView.d.ts +2 -0
  72. package/dist/features/seller/components/SellerAnalyticsView.js +17 -9
  73. package/dist/features/seller/components/SellerBundlesView.d.ts +5 -0
  74. package/dist/features/seller/components/SellerBundlesView.js +104 -0
  75. package/dist/features/seller/components/SellerClassifiedView.d.ts +5 -0
  76. package/dist/features/seller/components/SellerClassifiedView.js +113 -0
  77. package/dist/features/seller/components/SellerDashboardView.js +19 -7
  78. package/dist/features/seller/components/SellerDigitalCodesView.d.ts +5 -0
  79. package/dist/features/seller/components/SellerDigitalCodesView.js +115 -0
  80. package/dist/features/seller/components/SellerGoogleReviewsView.d.ts +14 -0
  81. package/dist/features/seller/components/SellerGoogleReviewsView.js +95 -0
  82. package/dist/features/seller/components/SellerGroupedListingsView.d.ts +6 -0
  83. package/dist/features/seller/components/SellerGroupedListingsView.js +112 -0
  84. package/dist/features/seller/components/SellerLiveView.d.ts +5 -0
  85. package/dist/features/seller/components/SellerLiveView.js +113 -0
  86. package/dist/features/seller/components/SellerOrdersView.js +18 -2
  87. package/dist/features/seller/components/SellerPayoutMethodsView.d.ts +7 -0
  88. package/dist/features/seller/components/SellerPayoutMethodsView.js +120 -0
  89. package/dist/features/seller/components/SellerPayoutSettingsView.js +50 -12
  90. package/dist/features/seller/components/SellerProductShell.d.ts +1 -1
  91. package/dist/features/seller/components/SellerProductShell.js +9 -7
  92. package/dist/features/seller/components/SellerProductsFilterDrawer.js +3 -1
  93. package/dist/features/seller/components/SellerProductsView.js +48 -54
  94. package/dist/features/seller/components/SellerShippingConfigsView.d.ts +7 -0
  95. package/dist/features/seller/components/SellerShippingConfigsView.js +149 -0
  96. package/dist/features/seller/components/SellerShippingView.js +37 -10
  97. package/dist/features/seller/components/SellerStoreCategoriesView.d.ts +9 -0
  98. package/dist/features/seller/components/SellerStoreCategoriesView.js +122 -0
  99. package/dist/features/seller/components/SellerStorefrontView.d.ts +0 -7
  100. package/dist/features/seller/components/SellerStorefrontView.js +26 -29
  101. package/dist/features/seller/components/SellerTemplatesView.d.ts +10 -0
  102. package/dist/features/seller/components/SellerTemplatesView.js +265 -0
  103. package/dist/features/seller/components/index.d.ts +26 -0
  104. package/dist/features/seller/components/index.js +13 -0
  105. package/dist/features/stores/api/[storeSlug]/reviews/route.js +49 -7
  106. package/dist/features/stores/components/StoreCapabilitiesGuideView.d.ts +3 -0
  107. package/dist/features/stores/components/StoreCapabilitiesGuideView.js +101 -0
  108. package/dist/features/stores/components/StoreFinanceGuideView.d.ts +3 -0
  109. package/dist/features/stores/components/StoreFinanceGuideView.js +79 -0
  110. package/dist/features/stores/components/StoreGuideHubView.d.ts +5 -0
  111. package/dist/features/stores/components/StoreGuideHubView.js +89 -0
  112. package/dist/features/stores/components/StoreListingsGuideView.d.ts +3 -0
  113. package/dist/features/stores/components/StoreListingsGuideView.js +151 -0
  114. package/dist/features/stores/components/StoreOrdersGuideView.d.ts +3 -0
  115. package/dist/features/stores/components/StoreOrdersGuideView.js +122 -0
  116. package/dist/features/stores/components/StoreReviewsListing.js +100 -23
  117. package/dist/features/stores/components/StoreSettingsGuideView.d.ts +3 -0
  118. package/dist/features/stores/components/StoreSettingsGuideView.js +56 -0
  119. package/dist/features/stores/components/index.d.ts +12 -1
  120. package/dist/features/stores/components/index.js +6 -1
  121. package/dist/features/stores/hooks/useStores.d.ts +5 -0
  122. package/dist/features/stores/hooks/useStores.js +10 -0
  123. package/dist/features/stores/manifest.js +1 -1
  124. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +13 -2
  125. package/dist/index.d.ts +54 -9
  126. package/dist/index.js +58 -15
  127. package/dist/next/routing/route-map.d.ts +55 -0
  128. package/dist/next/routing/route-map.js +25 -0
  129. package/dist/providers/db-firebase/__tests__/filter-aliases.test.d.ts +1 -0
  130. package/dist/providers/db-firebase/__tests__/filter-aliases.test.js +93 -0
  131. package/dist/providers/db-firebase/sieve.d.ts +49 -0
  132. package/dist/providers/db-firebase/sieve.js +61 -8
  133. package/dist/repositories/index.d.ts +1 -0
  134. package/dist/repositories/index.js +2 -0
  135. package/dist/tailwind-utilities.css +1 -1
  136. package/dist/ui/components/ListingToolbar.d.ts +8 -1
  137. package/dist/ui/components/ListingToolbar.js +4 -2
  138. package/dist/ui/components/__tests__/BulkActionBar.test.d.ts +1 -0
  139. package/dist/ui/components/__tests__/BulkActionBar.test.js +96 -0
  140. package/dist/ui/components/__tests__/ListingToolbar.test.d.ts +1 -0
  141. package/dist/ui/components/__tests__/ListingToolbar.test.js +125 -0
  142. package/dist/ui/index.d.ts +1 -1
  143. package/package.json +8 -2
@@ -0,0 +1,122 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowLeft } from "lucide-react";
3
+ import { Accordion, Alert, Div, Heading, Section, Text } from "../../../ui";
4
+ import { ROUTES } from "../../../next/routing/route-map";
5
+ const SUBHEADING = "mb-1 font-semibold text-[var(--appkit-color-text)]";
6
+ const LIST_DISC = "list-disc leading-relaxed";
7
+ const SECTION_BODY = "space-y-4 text-sm text-[var(--appkit-color-text-muted)]";
8
+ // -- Section wrapper -----------------------------------------------------------
9
+ function GuideSection({ title, children, }) {
10
+ return (_jsxs(Section, { className: "rounded-xl border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] p-6 shadow-sm", children: [_jsx(Heading, { level: 2, className: "mb-4 text-lg font-semibold text-[var(--appkit-color-text)]", children: title }), children] }));
11
+ }
12
+ // -- Section 1: Order lifecycle ------------------------------------------------
13
+ const STATUS_LIFECYCLE = `
14
+ PENDING ──► PROCESSING ──► SHIPPED ──► DELIVERED
15
+ │ │ │
16
+ └──► CANCELLED │ └──► RETURN_REQUESTED ──► REFUNDED
17
+
18
+ └──► CANCELLED
19
+ `;
20
+ const STATUS_ROWS = [
21
+ {
22
+ status: "PENDING",
23
+ meaning: "Order placed, payment received — awaiting your action.",
24
+ action: 'Confirm stock availability, then click "Mark Processing".',
25
+ },
26
+ {
27
+ status: "PROCESSING",
28
+ meaning: "You have accepted and are preparing the item for dispatch.",
29
+ action: 'Package the item. Enter tracking number + carrier, then click "Mark Shipped".',
30
+ },
31
+ {
32
+ status: "SHIPPED",
33
+ meaning: "Item is with the courier. Buyer can track delivery.",
34
+ action: "Monitor tracking. No action required unless there is a problem.",
35
+ },
36
+ {
37
+ status: "DELIVERED",
38
+ meaning: "Courier confirms delivery. Buyer has their item.",
39
+ action: "Payout is queued for the next settlement cycle.",
40
+ },
41
+ {
42
+ status: "CANCELLED",
43
+ meaning: "Order was cancelled before shipping (by buyer or seller).",
44
+ action: "Refund is automatic via Razorpay (3–7 business days).",
45
+ },
46
+ {
47
+ status: "RETURN_REQUESTED",
48
+ meaning: "Buyer raised a return within the return window.",
49
+ action: "Accept (triggers refund) or reject (triggers dispute SLA). See Section 5.",
50
+ },
51
+ {
52
+ status: "REFUNDED",
53
+ meaning: "Refund processed — order permanently closed.",
54
+ action: "No further action. Payout for this order is withheld.",
55
+ },
56
+ ];
57
+ function OrderLifecycle() {
58
+ return (_jsxs(Div, { className: "space-y-4", children: [_jsx(Div, { className: "rounded-lg border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-subtle,var(--appkit-color-border))/20] p-4 font-mono text-xs text-[var(--appkit-color-text-muted)] overflow-x-auto whitespace-pre", children: STATUS_LIFECYCLE }), _jsx(Div, { className: "space-y-2", children: STATUS_ROWS.map(({ status, meaning, action }) => (_jsxs(Div, { className: "rounded-lg border border-[var(--appkit-color-border)] p-3 text-sm", children: [_jsxs(Div, { className: "flex items-center gap-2 mb-1", children: [_jsx(Text, { className: "font-mono font-semibold text-[var(--appkit-color-text)] w-28 shrink-0", children: status }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: meaning })] }), _jsxs(Text, { className: "pl-30 text-[var(--appkit-color-text-muted)] italic text-xs", children: ["\u2192 ", action] })] }, status))) })] }));
59
+ }
60
+ // -- Section 2: Processing an order -------------------------------------------
61
+ const PROCESSING_STEPS = [
62
+ "Open the order from your Orders dashboard — click the order ID to view the detail page.",
63
+ "Verify the item is in stock and matches the listing (condition, edition, grade).",
64
+ 'Click "Mark Processing" — this starts the fulfilment SLA clock and notifies the buyer.',
65
+ "Package the item securely. Use appropriate padding for cards and fragile collectibles.",
66
+ "Enter the tracking number and select the carrier in the Shipping tab of the order detail.",
67
+ 'Click "Mark Shipped" — the buyer receives a notification with the tracking number immediately.',
68
+ "Share any additional tracking link in the order notes if the carrier app is easier to use.",
69
+ ];
70
+ function ProcessingWalkthrough() {
71
+ return (_jsx("ol", { className: "space-y-3 pl-5", children: PROCESSING_STEPS.map((step, i) => (_jsx("li", { className: "list-decimal text-sm text-[var(--appkit-color-text-muted)] leading-relaxed", children: step }, i))) }));
72
+ }
73
+ // -- Section 3: Supported carriers --------------------------------------------
74
+ const CARRIERS = [
75
+ { name: "Delhivery", sla: "2–5 business days (most metros next-day)" },
76
+ { name: "Blue Dart", sla: "1–3 business days — premium, reliable for high-value items" },
77
+ { name: "India Post Speed Post", sla: "3–7 business days — widest PIN coverage" },
78
+ { name: "DTDC", sla: "2–5 business days" },
79
+ { name: "Ekart (Flipkart)", sla: "2–4 business days" },
80
+ { name: "XpressBees", sla: "2–4 business days — strong in Tier 2/3 cities" },
81
+ { name: "Shadowfax", sla: "1–3 business days — good for urban same-day" },
82
+ ];
83
+ function CarriersSection() {
84
+ return (_jsxs(Div, { className: "space-y-3", children: [_jsx(Text, { className: "text-sm text-[var(--appkit-color-text-muted)]", children: "Any carrier is accepted \u2014 enter the tracking number manually in the order detail. Buyers receive the tracking number as entered; they look it up on the carrier's website." }), _jsx(Div, { className: "overflow-x-auto -mx-6", children: _jsxs("table", { className: "min-w-full text-sm", children: [_jsx("thead", { children: _jsxs("tr", { className: "border-b border-[var(--appkit-color-border)]", children: [_jsx("th", { className: "px-6 py-3 text-left font-semibold text-[var(--appkit-color-text)]", children: "Carrier" }), _jsx("th", { className: "px-6 py-3 text-left font-semibold text-[var(--appkit-color-text)]", children: "Typical SLA" })] }) }), _jsx("tbody", { className: "divide-y divide-[var(--appkit-color-border)]", children: CARRIERS.map(({ name, sla }) => (_jsxs("tr", { children: [_jsx("td", { className: "px-6 py-3 font-medium text-[var(--appkit-color-text)]", children: name }), _jsx("td", { className: "px-6 py-3 text-[var(--appkit-color-text-muted)]", children: sla })] }, name))) })] }) }), _jsx(Alert, { variant: "info", title: "Tip: insurance for high-value shipments", children: "For items above \u20B95,000, consider using a carrier that offers shipment insurance (Blue Dart, Delhivery Premium). Document the item with photos before sealing the package \u2014 this is your evidence if a damage claim arises." })] }));
85
+ }
86
+ // -- Section 4: Cancellations -------------------------------------------------
87
+ function CancellationsSection() {
88
+ return (_jsxs(Div, { className: SECTION_BODY, children: [_jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Who can cancel" }), _jsxs("ul", { className: "space-y-1 pl-5", children: [_jsxs("li", { className: LIST_DISC, children: [_jsx("strong", { className: "text-[var(--appkit-color-text)]", children: "Buyer" }), " \u2014 can self-cancel any time before the order reaches SHIPPED status."] }), _jsxs("li", { className: LIST_DISC, children: [_jsx("strong", { className: "text-[var(--appkit-color-text)]", children: "Seller (you)" }), " \u2014 can cancel any time before SHIPPED (e.g. item found damaged during packaging)."] }), _jsxs("li", { className: LIST_DISC, children: [_jsx("strong", { className: "text-[var(--appkit-color-text)]", children: "LetItRip admin" }), " \u2014 can force-cancel at any status for policy violations or unresolved disputes."] })] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Refund timeline" }), _jsxs(Text, { className: "leading-relaxed", children: ["Cancellation triggers an automatic Razorpay refund. Funds typically reach the buyer in", _jsx("strong", { className: "text-[var(--appkit-color-text)]", children: " 3\u20137 business days" }), " depending on the payment method (UPI is usually 1\u20132 business days)."] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Already shipped?" }), _jsx(Text, { className: "leading-relaxed", children: "If you have already dispatched the item but the order is still PROCESSING (tracking not yet entered), enter the tracking number and mark it SHIPPED first \u2014 then contact the buyer via order notes. Do not cancel after shipping; work with the buyer to return the item through the normal return flow." })] }), _jsx(Alert, { variant: "warning", title: "Repeated cancellations affect your rating", children: "Cancelling more than 5% of your orders per month will reduce your store rating and may result in listing restrictions. Only cancel if you genuinely cannot fulfil \u2014 never as a price-change workaround." })] }));
89
+ }
90
+ // -- Section 5: Return requests -----------------------------------------------
91
+ function ReturnsSection() {
92
+ return (_jsxs(Div, { className: SECTION_BODY, children: [_jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "When a buyer can raise a return" }), _jsxs(Text, { className: "leading-relaxed", children: ["Buyers can open a return request within the ", _jsx("strong", { className: "text-[var(--appkit-color-text)]", children: "return window" }), " after the order is marked DELIVERED. The default return window is 7 days. Stores with the ", _jsx("code", { className: "text-xs bg-[var(--appkit-color-border)] px-1 rounded", children: "extended_return_window" }), " capability can offer 30 days."] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "What you see" }), _jsxs("ul", { className: "space-y-1 pl-5", children: [_jsx("li", { className: LIST_DISC, children: "The buyer's reason for return (pre-defined category + optional description)." }), _jsx("li", { className: LIST_DISC, children: "Photos of the item as received." }), _jsx("li", { className: LIST_DISC, children: "A 3-day SLA to respond before LetItRip mediates." })] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Accepting a return" }), _jsx(Text, { className: "leading-relaxed", children: "Click \"Accept return\" in the order detail. The buyer will receive a return shipping label or instructions. Once the item is received by you and you confirm it, the refund is triggered automatically via Razorpay. The payout for this order is withheld." })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Rejecting a return" }), _jsx(Text, { className: "leading-relaxed", children: "You can reject a return request with a reason. If the buyer disagrees, they can escalate to LetItRip support. LetItRip will mediate \u2014 if the evidence supports the buyer, the return will be approved regardless of your rejection. Unjustified rejections count against your seller rating." })] })] }));
93
+ }
94
+ // -- Section 6: Auction orders ------------------------------------------------
95
+ function AuctionOrdersSection() {
96
+ return (_jsxs(Div, { className: SECTION_BODY, children: [_jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Payment window" }), _jsxs(Text, { className: "leading-relaxed", children: ["Auction winners have ", _jsx("strong", { className: "text-[var(--appkit-color-text)]", children: "48 hours" }), " from auction end to complete payment. You will receive a notification when the auction closes and again when the winner pays."] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "If the winner does not pay" }), _jsxs("ul", { className: "space-y-1 pl-5", children: [_jsx("li", { className: LIST_DISC, children: "The order is automatically cancelled after 48 hours." }), _jsx("li", { className: LIST_DISC, children: "You are notified. The winner may receive a bid restriction on their account." }), _jsx("li", { className: LIST_DISC, children: "If \"offer to next bidder\" is enabled in your auction settings, the next-highest bidder is contacted automatically." }), _jsx("li", { className: LIST_DISC, children: "You can re-list the item immediately." })] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Fulfilment after payment" }), _jsx(Text, { className: "leading-relaxed", children: "Once the auction order is paid, it enters PENDING status \u2014 the same fulfilment flow as a standard order applies. Process and ship within your stated dispatch time." })] }), _jsx(Alert, { variant: "info", title: "Auction orders cannot be cancelled by the buyer", children: "Unlike standard orders, auction orders cannot be self-cancelled by the buyer after payment. If a buyer requests a cancel, it requires seller approval. Treat winning bids as binding commitments." })] }));
97
+ }
98
+ // -- Section 7: Common questions (FAQ collapsibles) ----------------------------
99
+ const FAQS = [
100
+ {
101
+ q: "What if the buyer claims non-delivery but tracking shows delivered?",
102
+ a: "Do not cancel immediately. Ask the buyer to check with neighbours and at the nearest post office or courier depot. If after 5 days the parcel is still missing, contact the carrier to file a trace. If the trace confirms loss, you may need to refund — document everything and contact LetItRip support if needed.",
103
+ },
104
+ {
105
+ q: "Can I cancel an order after I've already shipped it?",
106
+ a: "No — once the order is marked SHIPPED, you cannot cancel it. If you shipped the wrong item or need to resolve an issue, use the order notes to communicate with the buyer and initiate a return via normal channels after delivery.",
107
+ },
108
+ {
109
+ q: "What if I run out of stock on a pre-order?",
110
+ a: "You must notify the buyer immediately via order notes and initiate cancellation from the order detail page. Refund is automatic. Repeated pre-order cancellations due to stock issues may result in the pre-order listing capability being reviewed.",
111
+ },
112
+ {
113
+ q: "How do I handle a partial order if I sold multiple items?",
114
+ a: "Currently each product listing creates a separate order. If you sold a bundle, the bundle order must be fulfilled as a single shipment. If one item in a bundle is unavailable, contact the buyer and LetItRip support — partial fulfilment is not supported in the standard flow.",
115
+ },
116
+ ];
117
+ function CommonFAQs() {
118
+ return (_jsx(Div, { className: "space-y-3", children: FAQS.map(({ q, a }) => (_jsx(Accordion, { title: q, children: _jsx(Text, { className: "text-sm text-[var(--appkit-color-text-muted)] leading-relaxed", children: a }) }, q))) }));
119
+ }
120
+ export function StoreOrdersGuideView(_props) {
121
+ return (_jsxs(Div, { className: "space-y-6 pb-10", children: [_jsxs("a", { href: String(ROUTES.STORE.GUIDE), className: "inline-flex items-center gap-1.5 text-sm text-[var(--appkit-color-text-muted)] hover:text-[var(--appkit-color-text)] transition-colors", children: [_jsx(ArrowLeft, { className: "h-4 w-4" }), "Back to Seller Guide"] }), _jsxs(Div, { children: [_jsx(Heading, { level: 1, className: "text-2xl font-bold text-[var(--appkit-color-text)]", children: "Orders & Fulfilment Guide" }), _jsx(Text, { className: "mt-1 text-sm text-[var(--appkit-color-text-muted)]", children: "Processing orders, shipping, cancellations, returns, and auction orders." })] }), _jsx(GuideSection, { title: "1. Order lifecycle", children: _jsx(OrderLifecycle, {}) }), _jsx(GuideSection, { title: "2. Processing an order", children: _jsx(ProcessingWalkthrough, {}) }), _jsx(GuideSection, { title: "3. Supported carriers", children: _jsx(CarriersSection, {}) }), _jsx(GuideSection, { title: "4. Cancellations", children: _jsx(CancellationsSection, {}) }), _jsx(GuideSection, { title: "5. Return requests", children: _jsx(ReturnsSection, {}) }), _jsx(GuideSection, { title: "6. Auction orders", children: _jsx(AuctionOrdersSection, {}) }), _jsx(GuideSection, { title: "7. Common questions", children: _jsx(CommonFAQs, {}) })] }));
122
+ }
@@ -1,29 +1,106 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { useState } from "react";
4
- import { useStoreReviews } from "../hooks/useStores";
5
- import { Container, Grid, Pagination, Row, Section, Span, Stack, Text, } from "../../../ui";
3
+ import { useState, useCallback, useMemo } from "react";
4
+ import { X } from "lucide-react";
5
+ import { useUrlTable } from "../../../react/hooks/useUrlTable";
6
+ import { ListingToolbar, Pagination, Row, Span, Text } from "../../../ui";
6
7
  import { ReviewCard } from "../../reviews/components/ReviewsList";
7
- const STAR_OPTIONS = [
8
- { value: 0, label: "All Ratings" },
9
- { value: 5, label: "5 " },
10
- { value: 4, label: "4 ★" },
11
- { value: 3, label: "3 ★" },
12
- { value: 2, label: "2 ★" },
13
- { value: 1, label: "1 ★" },
14
- ];
8
+ import { ReviewFilters, REVIEW_PUBLIC_SORT_OPTIONS } from "../../reviews/components/ReviewFilters";
9
+ import { useStoreReviews } from "../hooks/useStores";
10
+ import { TABLE_KEYS, VIEW_MODE } from "../../../constants/table-keys";
11
+ import { sortBy } from "../../../constants/sort";
12
+ import { REVIEW_FIELDS } from "../../../constants/field-names";
15
13
  const PAGE_SIZE = 12;
14
+ const DEFAULT_SORT = sortBy(REVIEW_FIELDS.CREATED_AT);
15
+ const FILTER_KEYS = ["rating", TABLE_KEYS.DATE_FROM, TABLE_KEYS.DATE_TO, "hasImages"];
16
+ const SORT_OPTION_LABELS = {
17
+ sortNewest: "Newest First",
18
+ sortOldest: "Oldest First",
19
+ sortHighestRated: "Highest Rated",
20
+ sortLowestRated: "Lowest Rated",
21
+ };
16
22
  export function StoreReviewsListing({ storeSlug }) {
17
- const [ratingFilter, setRatingFilter] = useState(0);
18
- const [page, setPage] = useState(1);
19
- const { reviews, averageRating, totalReviews, totalPages, isLoading } = useStoreReviews(storeSlug, { rating: ratingFilter || undefined, page, pageSize: PAGE_SIZE });
20
- const paginated = reviews;
21
- return (_jsx(Section, { children: _jsxs(Container, { size: "xl", children: [totalReviews > 0 && (_jsxs(Row, { align: "center", gap: "sm", className: "mb-6", children: [_jsx(Span, { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-100", children: averageRating.toFixed(1) }), _jsxs(Span, { className: "text-zinc-500 text-sm", children: ["/ 5 \u00B7 ", totalReviews, " reviews"] })] })), _jsx(Row, { gap: "xs", className: "mb-6 flex-wrap", children: STAR_OPTIONS.map((opt) => (_jsx("button", { type: "button", onClick: () => { setRatingFilter(opt.value); setPage(1); }, className: [
22
- "rounded-full border px-3 py-1 text-sm font-medium transition-colors",
23
- ratingFilter === opt.value
24
- ? "border-primary bg-primary/10 text-primary"
25
- : "border-zinc-200 text-zinc-600 hover:bg-zinc-50 dark:border-zinc-700 dark:text-zinc-300",
26
- ].join(" "), children: opt.label }, opt.value))) }), isLoading ? (_jsx(Stack, { align: "center", gap: "3", className: "justify-center py-12", children: _jsx(Text, { className: "text-zinc-500", children: "Loading reviews..." }) })) : paginated.length === 0 ? (_jsxs(Stack, { align: "center", gap: "3", className: "justify-center py-24 text-center", children: [_jsx(Text, { className: "text-xl font-medium text-zinc-900 dark:text-zinc-50", children: "No reviews yet" }), _jsx(Text, { className: "text-sm text-zinc-500", children: ratingFilter > 0
27
- ? `No ${ratingFilter}-star reviews yet.`
28
- : "Be the first to review this store by purchasing a product." })] })) : (_jsxs(_Fragment, { children: [_jsx(Grid, { cols: 3, gap: "md", children: paginated.map((review) => (_jsx(ReviewCard, { review: review, context: "store" }, review.id))) }), totalPages > 1 && (_jsx(Row, { className: "mt-8 justify-center", children: _jsx(Pagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage }) }))] }))] }) }));
23
+ const table = useUrlTable({ defaults: { pageSize: String(PAGE_SIZE), sort: DEFAULT_SORT } });
24
+ const [searchInput, setSearchInput] = useState(table.get(TABLE_KEYS.QUERY) || "");
25
+ const [filterOpen, setFilterOpen] = useState(false);
26
+ const [view, setView] = useState(table.get(TABLE_KEYS.VIEW) || VIEW_MODE.GRID);
27
+ const handleViewToggle = (next) => {
28
+ if (next === VIEW_MODE.TABLE)
29
+ return;
30
+ setView(next);
31
+ table.set(TABLE_KEYS.VIEW, next);
32
+ };
33
+ const sort = table.get(TABLE_KEYS.SORT) || DEFAULT_SORT;
34
+ const currentPage = table.getNumber(TABLE_KEYS.PAGE, 1);
35
+ const [pendingFilters, setPendingFilters] = useState(() => Object.fromEntries(FILTER_KEYS.map((k) => [k, table.get(k)])));
36
+ const pendingTable = useMemo(() => ({
37
+ get: (key) => pendingFilters[key] ?? "",
38
+ getNumber: (key, fallback = 0) => {
39
+ const v = pendingFilters[key];
40
+ if (!v)
41
+ return fallback;
42
+ const n = Number(v);
43
+ return isNaN(n) ? fallback : n;
44
+ },
45
+ set: (key, value) => setPendingFilters((p) => ({ ...p, [key]: value })),
46
+ setMany: (updates) => setPendingFilters((p) => ({ ...p, ...updates })),
47
+ clear: (keys) => {
48
+ const ks = keys ?? FILTER_KEYS;
49
+ setPendingFilters((p) => ({
50
+ ...p,
51
+ ...Object.fromEntries(ks.map((k) => [k, ""])),
52
+ }));
53
+ },
54
+ setPage: (_) => { },
55
+ setPageSize: (_) => { },
56
+ setSort: (_) => { },
57
+ buildSieveParams: () => "",
58
+ buildSearchParams: () => "",
59
+ params: new URLSearchParams(),
60
+ }), [pendingFilters]);
61
+ const openFilters = useCallback(() => {
62
+ setPendingFilters(Object.fromEntries(FILTER_KEYS.map((k) => [k, table.get(k)])));
63
+ setFilterOpen(true);
64
+ }, [table]);
65
+ const applyFilters = useCallback(() => {
66
+ const updates = { page: "1" };
67
+ for (const k of FILTER_KEYS)
68
+ updates[k] = pendingFilters[k] ?? "";
69
+ table.setMany(updates);
70
+ setFilterOpen(false);
71
+ }, [pendingFilters, table]);
72
+ const clearFilters = useCallback(() => {
73
+ setPendingFilters(Object.fromEntries(FILTER_KEYS.map((k) => [k, ""])));
74
+ }, []);
75
+ const resetAll = useCallback(() => {
76
+ const updates = { [TABLE_KEYS.QUERY]: "", [TABLE_KEYS.SORT]: "" };
77
+ for (const k of FILTER_KEYS)
78
+ updates[k] = "";
79
+ table.setMany(updates);
80
+ setSearchInput("");
81
+ }, [table]);
82
+ const commitSearch = useCallback(() => {
83
+ table.set(TABLE_KEYS.QUERY, searchInput.trim());
84
+ }, [searchInput, table]);
85
+ const ratingRaw = table.get("rating");
86
+ const ratingNum = ratingRaw ? Number(ratingRaw.split("|")[0]) : undefined;
87
+ const activeFilterCount = FILTER_KEYS.filter((k) => !!table.get(k)).length;
88
+ const hasActiveState = !!table.get(TABLE_KEYS.QUERY) ||
89
+ table.get(TABLE_KEYS.SORT) !== DEFAULT_SORT ||
90
+ activeFilterCount > 0;
91
+ const { reviews, averageRating, totalReviews, totalPages, isLoading } = useStoreReviews(storeSlug, {
92
+ rating: ratingNum,
93
+ page: currentPage,
94
+ pageSize: PAGE_SIZE,
95
+ sort,
96
+ q: table.get(TABLE_KEYS.QUERY) || undefined,
97
+ dateFrom: table.get(TABLE_KEYS.DATE_FROM) || undefined,
98
+ dateTo: table.get(TABLE_KEYS.DATE_TO) || undefined,
99
+ hasImages: table.get("hasImages") === "true" ? true : undefined,
100
+ });
101
+ const sortOptions = REVIEW_PUBLIC_SORT_OPTIONS.map((opt) => ({
102
+ value: opt.value,
103
+ label: SORT_OPTION_LABELS[opt.key] ?? opt.key,
104
+ }));
105
+ return (_jsxs("div", { className: "min-h-screen", children: [totalReviews > 0 && (_jsxs(Row, { align: "center", gap: "sm", className: "px-4 py-3 border-b border-zinc-200 dark:border-slate-700", children: [_jsx(Span, { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-100", children: averageRating.toFixed(1) }), _jsxs(Span, { className: "text-zinc-500 text-sm", children: ["/ 5 \u00B7 ", totalReviews, " reviews"] })] })), _jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search reviews...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: sort, sortOptions: sortOptions, onSortChange: (v) => { table.set(TABLE_KEYS.SORT, v); }, view: view, onViewChange: handleViewToggle, onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx("div", { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 flex justify-center bg-white/95 dark:bg-slate-900/95 backdrop-blur-sm border-b border-zinc-200 dark:border-slate-700 px-3 py-1.5", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx("div", { className: "py-6 px-4", children: isLoading ? (_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: Array.from({ length: 6 }).map((_, i) => (_jsx("div", { className: "rounded-xl border border-zinc-100 dark:border-slate-700 overflow-hidden animate-pulse", children: _jsxs("div", { className: "p-4 space-y-3", children: [_jsx("div", { className: "h-4 bg-zinc-200 dark:bg-slate-700 rounded w-3/4" }), _jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-full" }), _jsx("div", { className: "h-3 bg-zinc-200 dark:bg-slate-700 rounded w-2/3" })] }) }, i))) })) : reviews.length === 0 ? (_jsx(Text, { className: "py-12 text-center text-sm text-zinc-500 dark:text-zinc-400", children: "No reviews found." })) : view === "list" ? (_jsx("div", { className: "flex flex-col divide-y divide-zinc-100 dark:divide-zinc-800 rounded-xl border border-zinc-100 dark:border-zinc-800", children: reviews.map((review) => (_jsx(ReviewCard, { review: review, context: "store" }, review.id))) })) : (_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: reviews.map((review) => (_jsx(ReviewCard, { review: review, context: "store" }, review.id))) })) }), filterOpen && (_jsxs(_Fragment, { children: [_jsx("div", { className: "fixed inset-0 z-40 bg-black/40", "aria-hidden": "true", onClick: () => setFilterOpen(false) }), _jsxs("div", { className: "fixed inset-y-0 left-0 z-50 flex w-80 flex-col bg-white dark:bg-slate-900 shadow-2xl", children: [_jsxs("div", { className: "flex items-center justify-between border-b border-zinc-200 dark:border-slate-700 px-4 py-3.5", children: [_jsx("span", { className: "flex items-center gap-2 text-base font-semibold text-zinc-900 dark:text-zinc-100", children: "Filters" }), _jsxs("div", { className: "flex items-center gap-2", children: [activeFilterCount > 0 && (_jsx("button", { type: "button", onClick: clearFilters, className: "text-xs text-zinc-500 hover:text-rose-500 dark:text-zinc-400 transition-colors", children: "Clear all" })), _jsx("button", { type: "button", onClick: () => setFilterOpen(false), "aria-label": "Close filters", className: "rounded-lg p-1.5 text-zinc-500 hover:bg-zinc-100 dark:hover:bg-slate-800 transition-colors", children: _jsx(X, { className: "h-5 w-5" }) })] })] }), _jsx("div", { className: "flex-1 overflow-y-auto px-4 py-4", children: _jsx(ReviewFilters, { table: pendingTable, variant: "public" }) }), _jsx("div", { className: "border-t border-zinc-200 dark:border-slate-700 px-4 py-3.5", children: _jsxs("button", { type: "button", onClick: applyFilters, className: "w-full rounded-lg bg-primary py-2.5 text-sm font-semibold text-white hover:bg-primary-600 transition-colors active:scale-[0.98]", children: ["Apply Filters", activeFilterCount > 0 ? ` (${activeFilterCount})` : ""] }) })] })] }))] }));
29
106
  }
@@ -0,0 +1,3 @@
1
+ export interface StoreSettingsGuideViewProps {
2
+ }
3
+ export declare function StoreSettingsGuideView(_props: StoreSettingsGuideViewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,56 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowLeft } from "lucide-react";
3
+ import { Alert, Div, Heading, Section, Text } from "../../../ui";
4
+ import { ROUTES } from "../../../next/routing/route-map";
5
+ const SUBHEADING = "mb-1 font-semibold text-[var(--appkit-color-text)]";
6
+ const LIST_DISC = "list-disc leading-relaxed";
7
+ const SECTION_BODY = "space-y-4 text-sm text-[var(--appkit-color-text-muted)]";
8
+ // -- Section wrapper -----------------------------------------------------------
9
+ function GuideSection({ title, children, }) {
10
+ return (_jsxs(Section, { className: "rounded-xl border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] p-6 shadow-sm", children: [_jsx(Heading, { level: 2, className: "mb-4 text-lg font-semibold text-[var(--appkit-color-text)]", children: title }), children] }));
11
+ }
12
+ // -- Section 1: Store profile -------------------------------------------------
13
+ function StoreProfileSection() {
14
+ return (_jsxs(Div, { className: SECTION_BODY, children: [_jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Store name & description" }), _jsx(Text, { className: "leading-relaxed", children: "Your store name appears in search results, listing cards, order emails, and the store profile page. Choose a name that clearly describes your niche \u2014 buyers search by seller name. The description appears on your profile page below your banner \u2014 include your niche, location, and turnaround time (e.g. \"Graded Pok\u00E9mon TCG from Mumbai \u00B7 ships within 2 business days\")." })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Logo (storeLogoURL)" }), _jsxs("ul", { className: "space-y-1 pl-5", children: [_jsx("li", { className: LIST_DISC, children: "Minimum size: 200 \u00D7 200 px. Recommended: 400 \u00D7 400 px." }), _jsx("li", { className: LIST_DISC, children: "Displayed as a circle avatar on your profile page and in order confirmation emails." }), _jsx("li", { className: LIST_DISC, children: "Format: PNG with transparent background looks best." })] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Banner (storeBannerURL)" }), _jsxs("ul", { className: "space-y-1 pl-5", children: [_jsx("li", { className: LIST_DISC, children: "Minimum size: 1200 \u00D7 300 px. Recommended: 1600 \u00D7 400 px." }), _jsx("li", { className: LIST_DISC, children: "Displayed at the top of your store profile page." }), _jsx("li", { className: LIST_DISC, children: "Avoid putting critical text near the edges \u2014 it may be cropped on mobile." })] })] }), _jsx(Alert, { variant: "info", title: "Profile completeness affects discoverability", children: "Stores with a logo, banner, description, and at least one published listing appear higher in the Stores directory. The Getting Started checklist on your Guide Hub shows which steps remain." })] }));
15
+ }
16
+ // -- Section 2: Shipping configuration ----------------------------------------
17
+ function ShippingSection() {
18
+ return (_jsxs(Div, { className: SECTION_BODY, children: [_jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Flat-rate shipping" }), _jsx(Text, { className: "leading-relaxed", children: "Set a single shipping charge that applies to all orders from your store. This is the simplest option \u2014 buyers see one consistent shipping cost at checkout." })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Free shipping threshold" }), _jsx(Text, { className: "leading-relaxed", children: "Set a minimum order value above which shipping is free. For example, \"Free shipping on orders above \u20B9500\" appears on your store profile and listing cards \u2014 it is a strong conversion driver. Configure this in Settings \u2192 Shipping \u2192 Free Shipping Threshold." })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Per-item overrides" }), _jsx(Text, { className: "leading-relaxed", children: "Individual listings can override the store shipping charge using the Shipping tab in the product form. Use this for oversized or fragile items that cost more to ship." })] })] }));
19
+ }
20
+ // -- Section 3: Return policy -------------------------------------------------
21
+ function ReturnPolicySection() {
22
+ return (_jsxs(Div, { className: SECTION_BODY, children: [_jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Store-level return window" }), _jsxs(Text, { className: "leading-relaxed", children: ["The default return window is ", _jsx("strong", { className: "text-[var(--appkit-color-text)]", children: "7 days" }), " from the DELIVERED date. Stores with the", _jsx("code", { className: "text-xs bg-[var(--appkit-color-border)] px-1 rounded mx-1", children: "extended_return_window" }), "capability can offer 30 days. The return window is displayed on every product detail page in the Returns tab."] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Non-returnable categories" }), _jsxs("ul", { className: "space-y-1 pl-5", children: [_jsx("li", { className: LIST_DISC, children: "Opened card packs (boosters, elite trainer boxes)." }), _jsx("li", { className: LIST_DISC, children: "Cracked or opened graded slabs \u2014 unless the defect was documented before shipping." }), _jsx("li", { className: LIST_DISC, children: "Items explicitly marked \"Final Sale\" in the listing." })] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "What buyers see" }), _jsx(Text, { className: "leading-relaxed", children: "Buyers see the return window and non-returnable note in the product detail page Returns tab before purchasing. This cannot be suppressed \u2014 it is platform policy to always show return terms." })] })] }));
23
+ }
24
+ // -- Section 4: Vacation mode -------------------------------------------------
25
+ function VacationModeSection() {
26
+ return (_jsxs(Div, { className: SECTION_BODY, children: [_jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "What vacation mode does" }), _jsxs("ul", { className: "space-y-1 pl-5", children: [_jsx("li", { className: LIST_DISC, children: "All your published listings are hidden from search results and browse pages." }), _jsx("li", { className: LIST_DISC, children: "Your store profile page shows a \"On Vacation\" banner." }), _jsx("li", { className: LIST_DISC, children: "Buyers cannot add your items to cart or checkout while on vacation." }), _jsx("li", { className: LIST_DISC, children: "Existing orders that were placed before vacation mode must still be fulfilled." })] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "How to enable" }), _jsx(Text, { className: "leading-relaxed", children: "Go to your Store Dashboard \u2192 Settings \u2192 Storefront tab. Toggle \"Vacation mode\" on. Your listings re-appear instantly when you toggle it off." })] }), _jsx(Alert, { variant: "warning", title: "Ongoing orders are not paused", children: "Enabling vacation mode does not pause or cancel any existing orders. You are still responsible for fulfilling orders placed before vacation mode was enabled." })] }));
27
+ }
28
+ // -- Section 5: WhatsApp integration ------------------------------------------
29
+ function WhatsAppSection() {
30
+ return (_jsxs(Div, { className: SECTION_BODY, children: [_jsxs(Text, { className: "leading-relaxed", children: ["The WhatsApp integration allows your customers to contact you via WhatsApp from your store profile and lets you sync your product catalog to your WhatsApp Business Catalog (requires the", _jsx("code", { className: "text-xs bg-[var(--appkit-color-border)] px-1 rounded mx-1", children: "whatsapp_catalog_sync" }), " capability)."] }), _jsxs(Text, { className: "leading-relaxed", children: ["Full settings and the catalog sync toggle are at", " ", _jsx("a", { href: String(ROUTES.STORE.WHATSAPP), className: "underline text-[var(--appkit-color-primary)] hover:opacity-80", children: "Settings \u2192 WhatsApp" }), ". See the WhatsApp settings page for step-by-step setup instructions."] })] }));
31
+ }
32
+ // -- Section 6: Visibility states ---------------------------------------------
33
+ function VisibilityStatesSection() {
34
+ const STATES = [
35
+ {
36
+ state: "Published",
37
+ note: "Your store and listings are fully visible in search, browse, and featured sections.",
38
+ },
39
+ {
40
+ state: "Vacation mode",
41
+ note: "Listings hidden from search. Profile shows vacation banner. Managed by you in Settings.",
42
+ },
43
+ {
44
+ state: "Hidden (per-listing)",
45
+ note: "Individual listings set to DRAFT or ARCHIVED are not visible but your store profile remains accessible via direct link.",
46
+ },
47
+ {
48
+ state: "Suspended",
49
+ note: "Admin action. All listings hidden. Store profile shows 'Unavailable' banner. Contact support@letitrip.in to resolve.",
50
+ },
51
+ ];
52
+ return (_jsx(Div, { className: "space-y-3", children: STATES.map(({ state, note }) => (_jsxs(Div, { className: "flex gap-3 text-sm", children: [_jsx(Text, { className: "shrink-0 w-32 font-semibold text-[var(--appkit-color-text)]", children: state }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] leading-relaxed", children: note })] }, state))) }));
53
+ }
54
+ export function StoreSettingsGuideView(_props) {
55
+ return (_jsxs(Div, { className: "space-y-6 pb-10", children: [_jsxs("a", { href: String(ROUTES.STORE.GUIDE), className: "inline-flex items-center gap-1.5 text-sm text-[var(--appkit-color-text-muted)] hover:text-[var(--appkit-color-text)] transition-colors", children: [_jsx(ArrowLeft, { className: "h-4 w-4" }), "Back to Seller Guide"] }), _jsxs(Div, { children: [_jsx(Heading, { level: 1, className: "text-2xl font-bold text-[var(--appkit-color-text)]", children: "Settings Guide" }), _jsx(Text, { className: "mt-1 text-sm text-[var(--appkit-color-text-muted)]", children: "Store profile, shipping, returns, vacation mode, WhatsApp, and visibility." })] }), _jsx(GuideSection, { title: "1. Store profile", children: _jsx(StoreProfileSection, {}) }), _jsx(GuideSection, { title: "2. Shipping configuration", children: _jsx(ShippingSection, {}) }), _jsx(GuideSection, { title: "3. Return policy", children: _jsx(ReturnPolicySection, {}) }), _jsx(GuideSection, { title: "4. Vacation mode", children: _jsx(VacationModeSection, {}) }), _jsx(GuideSection, { title: "5. WhatsApp integration", children: _jsx(WhatsAppSection, {}) }), _jsx(GuideSection, { title: "6. Visibility states", children: _jsx(VisibilityStatesSection, {}) })] }));
56
+ }
@@ -1,7 +1,6 @@
1
1
  export { StoreHeader } from "./StoreHeader";
2
2
  export { StoreAddressSelectorCreate } from "./StoreAddressSelectorCreate";
3
3
  export type { StoreAddressSelectorCreateProps, StoreAddressSelectorCreateLabels, } from "./StoreAddressSelectorCreate";
4
- export { StoresListView } from "./StoresListView";
5
4
  export { StoreNavTabs } from "./StoreNavTabs";
6
5
  export type { StoreNavTabsProps, StoreTab } from "./StoreNavTabs";
7
6
  export { StoreAboutView } from "./StoreAboutView";
@@ -27,3 +26,15 @@ export type { StorePreOrdersListingProps } from "./StorePreOrdersListing";
27
26
  export type { StorePreOrdersPageViewProps } from "./StorePreOrdersPageView";
28
27
  export type { StorePrizeDrawsPageViewProps } from "./StorePrizeDrawsPageView";
29
28
  export type { StoreBundlesPageViewProps } from "./StoreBundlesPageView";
29
+ export { StoreGuideHubView } from "./StoreGuideHubView";
30
+ export type { StoreGuideHubViewProps } from "./StoreGuideHubView";
31
+ export { StoreListingsGuideView } from "./StoreListingsGuideView";
32
+ export type { StoreListingsGuideViewProps } from "./StoreListingsGuideView";
33
+ export { StoreOrdersGuideView } from "./StoreOrdersGuideView";
34
+ export type { StoreOrdersGuideViewProps } from "./StoreOrdersGuideView";
35
+ export { StoreFinanceGuideView } from "./StoreFinanceGuideView";
36
+ export type { StoreFinanceGuideViewProps } from "./StoreFinanceGuideView";
37
+ export { StoreCapabilitiesGuideView } from "./StoreCapabilitiesGuideView";
38
+ export type { StoreCapabilitiesGuideViewProps } from "./StoreCapabilitiesGuideView";
39
+ export { StoreSettingsGuideView } from "./StoreSettingsGuideView";
40
+ export type { StoreSettingsGuideViewProps } from "./StoreSettingsGuideView";
@@ -1,6 +1,5 @@
1
1
  export { StoreHeader } from "./StoreHeader";
2
2
  export { StoreAddressSelectorCreate } from "./StoreAddressSelectorCreate";
3
- export { StoresListView } from "./StoresListView";
4
3
  export { StoreNavTabs } from "./StoreNavTabs";
5
4
  export { StoreAboutView } from "./StoreAboutView";
6
5
  export { StoreProductsView } from "./StoreProductsView";
@@ -12,3 +11,9 @@ export { StoreProductsListing } from "./StoreProductsListing";
12
11
  export { StoreAuctionsListing } from "./StoreAuctionsListing";
13
12
  export { StoreReviewsListing } from "./StoreReviewsListing";
14
13
  export { StorePreOrdersListing } from "./StorePreOrdersListing";
14
+ export { StoreGuideHubView } from "./StoreGuideHubView";
15
+ export { StoreListingsGuideView } from "./StoreListingsGuideView";
16
+ export { StoreOrdersGuideView } from "./StoreOrdersGuideView";
17
+ export { StoreFinanceGuideView } from "./StoreFinanceGuideView";
18
+ export { StoreCapabilitiesGuideView } from "./StoreCapabilitiesGuideView";
19
+ export { StoreSettingsGuideView } from "./StoreSettingsGuideView";
@@ -49,6 +49,11 @@ export declare function useStoreReviews(storeSlug: string, params?: {
49
49
  rating?: number;
50
50
  page?: number;
51
51
  pageSize?: number;
52
+ sort?: string;
53
+ q?: string;
54
+ dateFrom?: string;
55
+ dateTo?: string;
56
+ hasImages?: boolean;
52
57
  }, opts?: {
53
58
  enabled?: boolean;
54
59
  endpoint?: string;
@@ -88,6 +88,16 @@ export function useStoreReviews(storeSlug, params, opts) {
88
88
  sp.set("page", String(params.page));
89
89
  if (params?.pageSize)
90
90
  sp.set("pageSize", String(params.pageSize));
91
+ if (params?.sort)
92
+ sp.set("sort", params.sort);
93
+ if (params?.q)
94
+ sp.set("q", params.q);
95
+ if (params?.dateFrom)
96
+ sp.set("dateFrom", params.dateFrom);
97
+ if (params?.dateTo)
98
+ sp.set("dateTo", params.dateTo);
99
+ if (params?.hasImages)
100
+ sp.set("hasImages", "true");
91
101
  const qs = sp.toString();
92
102
  const baseEndpoint = opts?.endpoint ?? STORE_ENDPOINTS.REVIEWS(storeSlug);
93
103
  const endpoint = qs ? `${baseEndpoint}?${qs}` : baseEndpoint;
@@ -3,7 +3,7 @@ export const manifest = {
3
3
  i18nNamespace: "stores",
4
4
  envKeys: [],
5
5
  routes: [
6
- { segment: "[locale]/stores", exports: { default: "StoresListView" } },
6
+ { segment: "[locale]/stores", exports: { default: "StoresIndexPageView" } },
7
7
  {
8
8
  segment: "[locale]/stores/[storeSlug]",
9
9
  exports: { default: "StoreStorefrontView" },
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import React from "react";
4
4
  const CLS_SECTION_CARD = "border border-zinc-200 dark:border-zinc-700 rounded-xl p-5";
5
5
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
6
- import { Alert, Button, Form, FormActions, Heading, Input, Section, Text, Toggle, useToast } from "../../../ui";
6
+ import { Alert, Button, Div, Form, FormActions, Heading, Input, Section, Text, Toggle, useToast } from "../../../ui";
7
7
  import { apiClient } from "../../../http";
8
8
  import { WHATSAPP_SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
9
9
  import { buildPurchaseAnnouncementMessage } from "../helpers/whatsapp";
@@ -52,6 +52,15 @@ const STATUS_COLOR = {
52
52
  failed: "bg-red-100 text-red-800 dark:bg-red-900/40 dark:text-red-300",
53
53
  };
54
54
  // ---------------------------------------------------------------------------
55
+ // Sample catalog items for preview
56
+ // ---------------------------------------------------------------------------
57
+ const SAMPLE_CATALOG_ITEMS = [
58
+ { id: "1", emoji: "🃏", name: "Charizard PSA 9 Base Set", price: "₹4,500" },
59
+ { id: "2", emoji: "🚗", name: "Hot Wheels Redline Vintage", price: "₹1,200" },
60
+ { id: "3", emoji: "🤖", name: "Gundam HG RX-78-2 1/144", price: "₹2,800" },
61
+ { id: "4", emoji: "🪀", name: "Beyblade Burst Storm Pegasus", price: "₹650" },
62
+ ];
63
+ // ---------------------------------------------------------------------------
55
64
  // Main component
56
65
  // ---------------------------------------------------------------------------
57
66
  export function SellerWhatsAppSettingsView({ hasCapability }) {
@@ -140,5 +149,7 @@ export function SellerWhatsAppSettingsView({ hasCapability }) {
140
149
  additionalItemCount: 2,
141
150
  totalAmount: 450000,
142
151
  orderId: "order-3-20260510-a1b2c3",
143
- }) })] })] }));
152
+ }) })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsx(Heading, { level: 2, className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100 mb-2", children: "Catalog Preview" }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 mb-4", children: "This is how your products appear in the WhatsApp Catalog when a buyer taps \"View Catalog\" in the chat. Only published standard products are included." }), _jsxs("div", { className: "border border-zinc-200 dark:border-zinc-700 rounded-xl overflow-hidden bg-[#ECE5DD] dark:bg-zinc-800 p-3", children: [_jsxs("div", { className: "flex items-center gap-2 mb-3", children: [_jsx("div", { className: "w-8 h-8 rounded-full bg-[#25D366] flex items-center justify-center", children: _jsx("span", { className: "text-white text-xs font-bold", children: "W" }) }), _jsxs(Div, { children: [_jsx(Text, { className: "text-xs font-semibold text-zinc-900 dark:text-zinc-100", children: cfg?.connected ? "Your Store" : "Store Name" }), _jsx(Text, { className: "text-[10px] text-zinc-500 dark:text-zinc-400", children: "WhatsApp Business" })] })] }), _jsx("div", { className: "grid grid-cols-2 gap-2", children: SAMPLE_CATALOG_ITEMS.map((item) => (_jsxs("div", { className: "bg-white dark:bg-zinc-900 rounded-lg overflow-hidden shadow-sm", children: [_jsx("div", { className: "aspect-square bg-zinc-100 dark:bg-zinc-800 flex items-center justify-center", children: _jsx("span", { className: "text-2xl", children: item.emoji }) }), _jsxs("div", { className: "p-2", children: [_jsx(Text, { className: "text-xs font-medium text-zinc-900 dark:text-zinc-100 line-clamp-2 leading-tight", children: item.name }), _jsx(Text, { className: "text-xs text-[#25D366] font-semibold mt-0.5", children: item.price })] })] }, item.id))) }), _jsx("div", { className: "mt-3 text-center", children: _jsx(Text, { className: "text-[10px] text-zinc-500 dark:text-zinc-400", children: cfg?.lastSyncCount
153
+ ? `${cfg.lastSyncCount} products synced to catalog`
154
+ : "Sync your products to populate the catalog" }) })] }), !cfg?.connected && (_jsx(Text, { className: "text-xs text-amber-600 dark:text-amber-400 mt-2", children: "Connect your WhatsApp Business account above to enable the catalog." }))] })] }));
144
155
  }