@mohasinac/appkit 3.3.3 → 3.3.5
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/client/features/lottery/LotteryAdminSlotView.js +1 -1
- package/dist/_internal/client/features/lottery/LotteryDetailView.js +2 -1
- package/dist/_internal/client/features/lottery/PrizeDrawLotteryDetailView.js +2 -1
- package/dist/_internal/server/features/auth/permissions.js +4 -3
- package/dist/_internal/server/features/cart/actions.js +1 -1
- package/dist/_internal/server/features/lottery/data.d.ts +2 -3
- package/dist/_internal/server/features/products/actions.js +1 -1
- package/dist/features/about/components/AboutView.js +1 -1
- package/dist/features/about/components/PolicyPageView.js +1 -1
- package/dist/features/about/components/TrackOrderView.js +1 -1
- package/dist/features/account/components/AddressesIndexListing.js +1 -1
- package/dist/features/admin/components/AdminBlogEditorView.js +1 -1
- package/dist/features/admin/components/AdminCarouselEditorView.js +2 -1
- package/dist/features/admin/components/AdminCarouselView.js +1 -1
- package/dist/features/admin/components/AdminNavEditorView.js +2 -1
- package/dist/features/admin/components/AdminProductsView.js +2 -2
- package/dist/features/admin/components/AdminSectionsView.js +11 -7
- package/dist/features/admin/components/AdminSiteSettingsView.js +2 -1
- package/dist/features/admin/components/DrawerFormFooter.js +2 -2
- package/dist/features/admin/components/QuickEditMenu.js +1 -1
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +1 -1
- package/dist/features/admin/components/sections/adminSectionsTypes.js +3 -2
- package/dist/features/admin/constants/filter-tabs.js +11 -0
- package/dist/features/auctions/columns/index.js +1 -1
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
- package/dist/features/auctions/schemas/index.d.ts +2 -2
- package/dist/features/auth/hooks/useRBAC.js +6 -1
- package/dist/features/blog/columns/index.js +1 -1
- package/dist/features/cart/components/CartDrawer.js +2 -2
- package/dist/features/categories/components/BrandDetailPageView.js +1 -1
- package/dist/features/categories/components/BreadcrumbTrail.js +2 -1
- package/dist/features/categories/schemas/firestore.d.ts +1 -1
- package/dist/features/contact/email.js +0 -1
- package/dist/features/events/components/EventBanner.js +2 -1
- package/dist/features/events/components/EventLeaderboard.js +1 -1
- package/dist/features/faq/components/FAQCategorySidebar.js +2 -1
- package/dist/features/forms/Slider.js +5 -2
- package/dist/features/forms/Toggle.js +4 -1
- package/dist/features/homepage/components/AdSlot.js +2 -2
- package/dist/features/homepage/components/BeforeAfterCard.js +1 -1
- package/dist/features/homepage/components/CTABannerSection.js +2 -1
- package/dist/features/homepage/components/CharacterHotspot.js +2 -1
- package/dist/features/homepage/components/FAQSection.js +1 -1
- package/dist/features/homepage/components/FeaturedBundlesSection.js +1 -1
- package/dist/features/homepage/components/HowItWorksInfoView.js +1 -1
- package/dist/features/homepage/components/HowItWorksSection.js +1 -1
- package/dist/features/homepage/components/NewsletterBanner.js +1 -1
- package/dist/features/homepage/components/SecurityHighlightsSection.js +1 -1
- package/dist/features/homepage/components/SiteFeaturesSection.js +1 -1
- package/dist/features/homepage/components/TrustFeaturesSection.js +1 -1
- package/dist/features/homepage/components/TrustIndicatorsSection.js +1 -1
- package/dist/features/layout/BottomActions.js +29 -2
- package/dist/features/layout/BottomActionsContext.d.ts +36 -0
- package/dist/features/layout/BottomActionsContext.js +36 -0
- package/dist/features/orders/components/MarketplaceOrderCard.js +2 -2
- package/dist/features/orders/schemas/index.d.ts +2 -2
- package/dist/features/payments/schemas/index.d.ts +4 -4
- package/dist/features/products/components/BidHistory.js +1 -1
- package/dist/features/products/components/MarketplaceBundleCard.js +1 -1
- package/dist/features/products/components/ProductGalleryClient.js +1 -1
- package/dist/features/products/components/ShowGroupSection.js +1 -1
- package/dist/features/products/components/SublistingCarouselSection.js +1 -1
- package/dist/features/products/repository/products.repository.js +1 -1
- package/dist/features/products/schemas/product-features.validators.d.ts +6 -6
- package/dist/features/promotions/repository/claimed-coupons.repository.js +1 -1
- package/dist/features/reviews/columns/index.js +1 -1
- package/dist/features/scams/components/ScamAwarenessModal.js +1 -1
- package/dist/features/search/components/Search.js +1 -1
- package/dist/features/search/schemas/index.d.ts +2 -2
- package/dist/features/seller/actions/seller-actions.d.ts +2 -2
- package/dist/features/seller/components/SellerCouponEditorView.js +1 -1
- package/dist/features/seller/components/SellerGoogleReviewsView.js +1 -1
- package/dist/features/seller/components/SellerOrdersView.js +4 -1
- package/dist/features/seller/components/SellerPayoutMethodsView.js +1 -1
- package/dist/features/seller/components/SellerProductsView.js +35 -31
- package/dist/features/seller/components/SellerReviewsView.js +1 -1
- package/dist/features/seller/schemas/index.d.ts +2 -2
- package/dist/features/shell/QuickFormDrawer.js +1 -1
- package/dist/features/stores/columns/index.js +1 -1
- package/dist/features/stores/components/StoresIndexListing.js +20 -15
- package/dist/features/wishlist/actions/wishlist-actions.js +1 -1
- package/dist/next/ErrorBoundary.js +2 -1
- package/dist/next/components/NotFoundView.js +17 -0
- package/dist/next/components/UnauthorizedView.js +13 -0
- package/dist/schemas/registry.d.ts +93 -94
- package/dist/schemas/webhooks/razorpay.d.ts +86 -86
- package/dist/seed/carousel-slides-seed-data.js +3 -2
- package/dist/seed/defaults/homepage-sections.js +2 -1
- package/dist/seed/factories/carousel.factory.js +2 -1
- package/dist/seed/homepage-sections-seed-data.js +4 -3
- package/dist/seed/notifications-seed-data.js +2 -1
- package/dist/seed/site-settings-seed-data.js +3 -2
- package/dist/seo/metadata.js +2 -1
- package/dist/ui/columns/column-renderers.js +1 -1
- package/dist/ui/components/Accordion.js +10 -6
- package/dist/ui/components/ListingLayout.js +6 -2
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* @tag sideEffects:none
|
|
14
14
|
*/
|
|
15
15
|
import { seedExtMedia } from "./_helpers/media";
|
|
16
|
+
import { ROUTES } from "../next/routing/route-map";
|
|
16
17
|
const NOW = new Date();
|
|
17
18
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
18
19
|
const _rawSlides = [
|
|
@@ -41,7 +42,7 @@ const _rawSlides = [
|
|
|
41
42
|
url: seedExtMedia("https://images.ygoprodeck.com/images/cards/cropped/89631139.jpg"),
|
|
42
43
|
dimOverlay: { enabled: true, opacity: 0.4 },
|
|
43
44
|
},
|
|
44
|
-
link: { url:
|
|
45
|
+
link: { url: String(ROUTES.PUBLIC.AUCTIONS), openInNewTab: false },
|
|
45
46
|
settings: { autoplayDelayMs: 5000, height: "tall" },
|
|
46
47
|
createdBy: "user-admin-letitrip",
|
|
47
48
|
createdAt: daysAgo(55),
|
|
@@ -57,7 +58,7 @@ const _rawSlides = [
|
|
|
57
58
|
url: seedExtMedia("https://images.ygoprodeck.com/images/cards/cropped/33396948.jpg"),
|
|
58
59
|
dimOverlay: { enabled: true, opacity: 0.45 },
|
|
59
60
|
},
|
|
60
|
-
link: { url:
|
|
61
|
+
link: { url: `${String(ROUTES.PUBLIC.PRODUCTS)}?q=exodia`, openInNewTab: false },
|
|
61
62
|
settings: { autoplayDelayMs: 5000, height: "tall" },
|
|
62
63
|
createdBy: "user-admin-letitrip",
|
|
63
64
|
createdAt: daysAgo(50),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// appkit/src/seed/defaults/homepage-sections.ts
|
|
2
2
|
import { makeHomepageSection, } from "../factories/homepage-section.factory";
|
|
3
|
+
import { ROUTES } from "../../next/routing/route-map";
|
|
3
4
|
export const DEFAULT_HOMEPAGE_SECTIONS = [
|
|
4
5
|
makeHomepageSection("hero", {
|
|
5
6
|
id: "section-hero",
|
|
@@ -8,7 +9,7 @@ export const DEFAULT_HOMEPAGE_SECTIONS = [
|
|
|
8
9
|
title: "Welcome to Our Store",
|
|
9
10
|
subtitle: "Discover the best products at unbeatable prices.",
|
|
10
11
|
ctaLabel: "Shop Now",
|
|
11
|
-
ctaUrl:
|
|
12
|
+
ctaUrl: String(ROUTES.PUBLIC.PRODUCTS),
|
|
12
13
|
backgroundImage: "",
|
|
13
14
|
},
|
|
14
15
|
}),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// appkit/src/seed/factories/carousel.factory.ts
|
|
2
|
+
import { ROUTES } from "../../next/routing/route-map";
|
|
2
3
|
let _seq = 1;
|
|
3
4
|
export function makeCarouselSlide(overrides = {}) {
|
|
4
5
|
const n = _seq++;
|
|
@@ -8,7 +9,7 @@ export function makeCarouselSlide(overrides = {}) {
|
|
|
8
9
|
title: overrides.title ?? `Slide ${n}`,
|
|
9
10
|
subtitle: overrides.subtitle ?? "",
|
|
10
11
|
ctaLabel: overrides.ctaLabel ?? "Shop Now",
|
|
11
|
-
ctaUrl: overrides.ctaUrl ??
|
|
12
|
+
ctaUrl: overrides.ctaUrl ?? String(ROUTES.PUBLIC.PRODUCTS),
|
|
12
13
|
sortOrder: overrides.sortOrder ?? n,
|
|
13
14
|
isActive: overrides.isActive ?? true,
|
|
14
15
|
...overrides,
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* @tag sideEffects:none
|
|
14
14
|
*/
|
|
15
15
|
import { seedExtMedia } from "./_helpers/media";
|
|
16
|
+
import { ROUTES } from "../next/routing/route-map";
|
|
16
17
|
const NOW = new Date();
|
|
17
18
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
18
19
|
export const homepageSectionsSeedData = [
|
|
@@ -27,7 +28,7 @@ export const homepageSectionsSeedData = [
|
|
|
27
28
|
description: "Buy, sell, and auction collectibles from verified sellers across India. Pokémon, Yu-Gi-Oh!, Hot Wheels, Gundam, Beyblade, Funko Pop, and thousands more — all with secure escrow payments and authenticity guarantees.",
|
|
28
29
|
showCTA: true,
|
|
29
30
|
ctaText: "Start Shopping",
|
|
30
|
-
ctaLink:
|
|
31
|
+
ctaLink: String(ROUTES.PUBLIC.PRODUCTS),
|
|
31
32
|
},
|
|
32
33
|
createdAt: daysAgo(90),
|
|
33
34
|
updatedAt: daysAgo(2),
|
|
@@ -172,7 +173,7 @@ export const homepageSectionsSeedData = [
|
|
|
172
173
|
description: "The ultimate Yu-Gi-Oh! flex. Find every Exodia printing on LetItRip.",
|
|
173
174
|
},
|
|
174
175
|
buttons: [
|
|
175
|
-
{ text: "Shop Exodia", link:
|
|
176
|
+
{ text: "Shop Exodia", link: `${String(ROUTES.PUBLIC.PRODUCTS)}?q=exodia`, variant: "primary" },
|
|
176
177
|
{ text: "Exodia Guide", link: "/blog/complete-exodia-guide", variant: "outline" },
|
|
177
178
|
],
|
|
178
179
|
clickable: false,
|
|
@@ -315,7 +316,7 @@ export const homepageSectionsSeedData = [
|
|
|
315
316
|
placeholder: "Enter your email address",
|
|
316
317
|
buttonText: "Subscribe",
|
|
317
318
|
privacyText: "We respect your privacy. Unsubscribe anytime.",
|
|
318
|
-
privacyLink:
|
|
319
|
+
privacyLink: String(ROUTES.PUBLIC.PRIVACY),
|
|
319
320
|
},
|
|
320
321
|
createdAt: daysAgo(90),
|
|
321
322
|
updatedAt: daysAgo(12),
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* @tag sideEffects:none
|
|
14
14
|
*/
|
|
15
15
|
import { NOTIFICATION_FIELDS } from "../features/admin/schemas";
|
|
16
|
+
import { ROUTES } from "../next/routing/route-map";
|
|
16
17
|
const NOW = new Date();
|
|
17
18
|
const hoursAgo = (n) => new Date(NOW.getTime() - n * 3600000);
|
|
18
19
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
@@ -132,7 +133,7 @@ export const notificationsSeedData = [
|
|
|
132
133
|
priority: "normal",
|
|
133
134
|
title: "Welcome to LetItRip, Yugi!",
|
|
134
135
|
message: "Your account is ready. Start browsing verified Yu-Gi-Oh! cards from sellers across India.",
|
|
135
|
-
actionUrl:
|
|
136
|
+
actionUrl: String(ROUTES.PUBLIC.PRODUCTS),
|
|
136
137
|
actionLabel: "Start Shopping",
|
|
137
138
|
isRead: true,
|
|
138
139
|
readAt: daysAgo(30),
|
|
@@ -16,6 +16,7 @@ import { getDefaultPhonePrefix, getSeedLocale } from "./seed-market-config";
|
|
|
16
16
|
const _phonePrefix = getDefaultPhonePrefix();
|
|
17
17
|
const _locale = getSeedLocale();
|
|
18
18
|
import { seedExtMedia } from "./_helpers/media";
|
|
19
|
+
import { ROUTES } from "../next/routing/route-map";
|
|
19
20
|
const NOW = new Date();
|
|
20
21
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
21
22
|
const adPlacementsSeed = [
|
|
@@ -335,7 +336,7 @@ export const siteSettingsSeedData = {
|
|
|
335
336
|
body: "PSA 10 Blue-Eyes and Dark Magician auctions ending this week.",
|
|
336
337
|
imageUrl: seedExtMedia("https://images.ygoprodeck.com/images/cards/cropped/46986414.jpg"),
|
|
337
338
|
ctaLabel: "View Auctions",
|
|
338
|
-
ctaHref:
|
|
339
|
+
ctaHref: String(ROUTES.PUBLIC.AUCTIONS),
|
|
339
340
|
},
|
|
340
341
|
},
|
|
341
342
|
{
|
|
@@ -356,7 +357,7 @@ export const siteSettingsSeedData = {
|
|
|
356
357
|
body: "All 5 Forbidden One pieces available — LOB to modern reprints.",
|
|
357
358
|
imageUrl: seedExtMedia("https://images.ygoprodeck.com/images/cards/cropped/33396948.jpg"),
|
|
358
359
|
ctaLabel: "Browse Exodia",
|
|
359
|
-
ctaHref:
|
|
360
|
+
ctaHref: `${String(ROUTES.PUBLIC.PRODUCTS)}?q=exodia`,
|
|
360
361
|
},
|
|
361
362
|
},
|
|
362
363
|
],
|
package/dist/seo/metadata.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ROUTES } from "../next/routing/route-map";
|
|
1
2
|
export const SEO_CONFIG = {
|
|
2
3
|
siteName: "App",
|
|
3
4
|
siteUrl: process.env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000",
|
|
@@ -151,7 +152,7 @@ export function generateSearchMetadata(q, category, seoConfig = SEO_CONFIG) {
|
|
|
151
152
|
"search",
|
|
152
153
|
seoConfig.siteName,
|
|
153
154
|
],
|
|
154
|
-
path: q ?
|
|
155
|
+
path: q ? `${String(ROUTES.PUBLIC.SEARCH)}?q=${encodeURIComponent(q)}` : String(ROUTES.PUBLIC.SEARCH),
|
|
155
156
|
noIndex: true,
|
|
156
157
|
}, seoConfig);
|
|
157
158
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For JSX renderers (badge, thumbnail, action buttons) see `column-renderers.tsx`.
|
|
8
8
|
*/
|
|
9
9
|
import { formatCurrency } from "../../utils/number.formatter";
|
|
10
|
-
import { getDefaultCurrency
|
|
10
|
+
import { getDefaultCurrency } from "../../core/baseline-resolver";
|
|
11
11
|
/** Render a boolean as "Yes" / "No" (or custom labels). */
|
|
12
12
|
export function renderBoolean(value, opts) {
|
|
13
13
|
const trueLabel = opts?.trueLabel ?? "Yes";
|
|
@@ -15,6 +15,16 @@ function renderLegacyAccordion({ title, children, open, className = "", titleCla
|
|
|
15
15
|
return (_jsxs("details", { open: open, className: `appkit-accordion appkit-accordion--legacy ${className}`, children: [_jsxs("summary", { className: `appkit-accordion__summary ${titleClassName}`, children: [title, _jsx("span", { className: "appkit-accordion__chevron", "aria-hidden": "true", children: "\u25BE" })] }), _jsx("div", { className: `appkit-accordion__content ${contentClassName}`, "data-section": "accordion-div-447", children: children })] }));
|
|
16
16
|
}
|
|
17
17
|
export function Accordion({ title, children, open = false, className = "", titleClassName = "", contentClassName = "", type = "single", defaultValue, value, onChange, }) {
|
|
18
|
+
// useMemo/useState must run unconditionally on every render — they were
|
|
19
|
+
// previously declared after the legacy-mode early return below, which
|
|
20
|
+
// skipped both hook calls whenever `title` was passed, violating the
|
|
21
|
+
// Rules of Hooks. Their result is simply unused in legacy mode.
|
|
22
|
+
const initialOpen = useMemo(() => {
|
|
23
|
+
if (value !== undefined)
|
|
24
|
+
return toArray(value);
|
|
25
|
+
return toArray(defaultValue);
|
|
26
|
+
}, [defaultValue, value]);
|
|
27
|
+
const [internalOpenValues, setInternalOpenValues] = useState(initialOpen);
|
|
18
28
|
// Backward-compatible simple details mode.
|
|
19
29
|
if (title !== undefined) {
|
|
20
30
|
return renderLegacyAccordion({
|
|
@@ -26,12 +36,6 @@ export function Accordion({ title, children, open = false, className = "", title
|
|
|
26
36
|
contentClassName,
|
|
27
37
|
});
|
|
28
38
|
}
|
|
29
|
-
const initialOpen = useMemo(() => {
|
|
30
|
-
if (value !== undefined)
|
|
31
|
-
return toArray(value);
|
|
32
|
-
return toArray(defaultValue);
|
|
33
|
-
}, [defaultValue, value]);
|
|
34
|
-
const [internalOpenValues, setInternalOpenValues] = useState(initialOpen);
|
|
35
39
|
const activeOpenValues = value !== undefined ? toArray(value) : internalOpenValues;
|
|
36
40
|
const toggle = (itemValue) => {
|
|
37
41
|
const nextOpenValues = type === "single"
|
|
@@ -36,6 +36,12 @@ const DEFAULT_LABELS = {
|
|
|
36
36
|
filterActiveCount: (count) => `${count} active`,
|
|
37
37
|
};
|
|
38
38
|
export function ListingLayout({ headerSlot, statusTabsSlot, filterContent, filterActiveCount = 0, onFilterApply, onFilterClear, filterTitle, activeFiltersSlot, resultCountSlot, searchSlot, sortSlot, viewToggleSlot, actionsSlot, selectedCount = 0, onClearSelection, bulkActionItems, toolbarPaginationSlot, paginationSlot, children, isDashboard, defaultSidebarOpen = false, filterPendingCount, className = "", loading = false, errorSlot, labels, portal, overlays, detailView, }) {
|
|
39
|
+
// useState must run unconditionally on every render — these were
|
|
40
|
+
// previously declared after the detail-view early return below, which
|
|
41
|
+
// skipped both hook calls whenever `detailView` was passed, violating the
|
|
42
|
+
// Rules of Hooks.
|
|
43
|
+
const [sidebarOpen, setSidebarOpen] = useState(defaultSidebarOpen);
|
|
44
|
+
const [mobileFilterOpen, setMobileFilterOpen] = useState(false);
|
|
39
45
|
// Detail view short-circuit (folded from ListingViewShell)
|
|
40
46
|
if (detailView) {
|
|
41
47
|
return _jsx(_Fragment, { children: detailView });
|
|
@@ -43,8 +49,6 @@ export function ListingLayout({ headerSlot, statusTabsSlot, filterContent, filte
|
|
|
43
49
|
// Portal-derived isDashboard default (folded from ListingViewShell)
|
|
44
50
|
const effectiveIsDashboard = isDashboard ?? (portal === "admin" || portal === "seller");
|
|
45
51
|
const l = { ...DEFAULT_LABELS, ...labels };
|
|
46
|
-
const [sidebarOpen, setSidebarOpen] = useState(defaultSidebarOpen);
|
|
47
|
-
const [mobileFilterOpen, setMobileFilterOpen] = useState(false);
|
|
48
52
|
const hasFilter = Boolean(filterContent);
|
|
49
53
|
const panelTitle = filterTitle ?? l.filtersTitle;
|
|
50
54
|
const handleMobileApply = () => {
|