@myrjfa/ui 2.1.5 → 2.1.7
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/dashboard/data-table.d.ts.map +1 -1
- package/dist/dashboard/data-table.js +6 -4
- package/dist/main/footer.d.ts.map +1 -1
- package/dist/main/footer.js +5 -8
- package/dist/main/navbar.d.ts.map +1 -1
- package/dist/main/navbar.js +10 -13
- package/dist/misc/button.d.ts +1 -1
- package/dist/misc/datepicker.js +1 -1
- package/dist/misc/filterBar.d.ts.map +1 -1
- package/dist/misc/filterBar.js +3 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/dashboard/data-table.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,GAAG,EAAqB,MAAM,OAAO,CAAC;AAYtD,MAAM,WAAW,MAAM,CAAC,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC,CAAC;IACrB,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,cAAc,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;CACrC;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EACjE,IAAI,EACJ,OAAO,EACP,OAAO,EACP,UAAU,EACV,WAAW,GACd,EAAE,cAAc,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"data-table.d.ts","sourceRoot":"","sources":["../../src/dashboard/data-table.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,GAAG,EAAqB,MAAM,OAAO,CAAC;AAYtD,MAAM,WAAW,MAAM,CAAC,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC,CAAC;IACrB,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,cAAc,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;CACrC;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,EACjE,IAAI,EACJ,OAAO,EACP,OAAO,EACP,UAAU,EACV,WAAW,GACd,EAAE,cAAc,CAAC,CAAC,CAAC,2CAwNnB"}
|
|
@@ -39,15 +39,17 @@ export function DataTable({ data, columns, actions, onRowClick, getRowClass, })
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
return (_jsxs("div", { className: "w-full", children: [_jsx("div", { className: "p-2", children: _jsx(Input, { placeholder: "Search...", className: "mb-4 max-w-sm", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value) }) }), _jsx("div", { className: "hidden lg:block overflow-auto", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [columns.map((column) => (_jsx(TableHead, { className: "cursor-pointer select-none", onClick: () => column.sortable && toggleSort(column.accessorKey), children: _jsxs("div", { className: "flex items-center gap-1", children: [column.header, column.sortable && (sortColumn === column.accessorKey ? (sortDirection === 'asc' ? (_jsx(ChevronUp, { className: "w-4 h-4 text-black" })) : (_jsx(ChevronDown, { className: "w-4 h-4 text-black" }))) : (_jsxs("div", { className: "flex flex-col text-gray-400 leading-none", children: [_jsx(ChevronUp, { className: "w-3 h-3 -mb-1" }), _jsx(ChevronDown, { className: "w-3 h-3" })] })))] }) }, column.accessorKey))), actions && _jsx(TableHead, { children: "Actions" })] }) }), _jsx(TableBody, { children: sortedData.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: columns.length + (actions ? 1 : 0), className: "h-40 text-center text-gray-500", children: _jsxs("div", { className: "flex flex-col items-center justify-center gap-2", children: [_jsx(Inbox, { className: "w-8 h-8 text-gray-400" }), _jsx("span", { className: "text-base font-medium", children: "No data available" })] }) }) })) : (sortedData.map((item, index) => {
|
|
42
|
-
const
|
|
43
|
-
|
|
42
|
+
const id = item.slug || item._id || String(index);
|
|
43
|
+
const key = `${id}-${index}`;
|
|
44
|
+
return (_jsxs(TableRow, { onClick: () => onRowClick && onRowClick(id), className: `${onRowClick ? 'hover:bg-accent cursor-pointer' : ''} ${getRowClass ? getRowClass(item) : ''}`, children: [columns.map((column) => (_jsx(TableCell, { children: column.cell
|
|
44
45
|
? column.cell(item)
|
|
45
46
|
: item[column.accessorKey] }, column.accessorKey))), actions && (_jsx(TableCell, { onClick: (e) => e.stopPropagation(), children: actions(item) }))] }, key));
|
|
46
47
|
})) })] }) }), _jsx("div", { className: "lg:hidden", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsx(TableRow, { children: columns.slice(1).map((column) => (_jsx(TableHead, { className: "cursor-pointer select-none", onClick: () => column.sortable && toggleSort(column.accessorKey), children: _jsxs("div", { className: "flex items-center gap-1", children: [column.header, column.sortable && (sortColumn === column.accessorKey ? (sortDirection === 'asc' ? (_jsx(ChevronUp, { className: "w-4 h-4 text-black" })) : (_jsx(ChevronDown, { className: "w-4 h-4 text-black" }))) : (_jsxs("div", { className: "flex flex-col text-gray-400 leading-none", children: [_jsx(ChevronUp, { className: "w-3 h-3 -mb-1" }), _jsx(ChevronDown, { className: "w-3 h-3" })] })))] }) }, column.accessorKey))) }) }), _jsx(TableBody, { children: sortedData.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: columns.length + (actions ? 1 : 0), className: "h-40 text-center text-gray-500", children: _jsxs("div", { className: "flex flex-col items-center justify-center gap-2", children: [_jsx(Inbox, { className: "w-8 h-8 text-gray-400" }), _jsx("span", { className: "text-base font-medium", children: "No data available" })] }) }) })) : (sortedData.map((item, index) => {
|
|
47
|
-
const
|
|
48
|
+
const id = item.slug || item._id || String(index);
|
|
49
|
+
const key = `${id}-${index}`;
|
|
48
50
|
return (_jsxs(React.Fragment, { children: [_jsx(TableRow, { className: "bg-gray-100", children: _jsx(TableCell, { colSpan: columns.length - 1, className: "py-3", children: _jsx("div", { className: "font-semibold text-gray-900", children: columns[0].cell
|
|
49
51
|
? columns[0].cell(item)
|
|
50
|
-
: item[columns[0].accessorKey] }) }) }), _jsx(TableRow, { onClick: () => onRowClick && onRowClick(
|
|
52
|
+
: item[columns[0].accessorKey] }) }) }), _jsx(TableRow, { onClick: () => onRowClick && onRowClick(id), className: `${onRowClick ? 'hover:bg-accent cursor-pointer' : ''} ${getRowClass ? getRowClass(item) : ''}`, children: columns.slice(1).map((column) => (_jsx(TableCell, { children: column.cell
|
|
51
53
|
? column.cell(item)
|
|
52
54
|
: item[column.accessorKey] }, column.accessorKey))) }), actions && (_jsx(TableRow, { className: "bg-gray-30", children: _jsx(TableCell, { colSpan: columns.length - 1, className: "py-3", onClick: (e) => e.stopPropagation(), children: actions(item) }) }))] }, key));
|
|
53
55
|
})) })] }) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../src/main/footer.tsx"],"names":[],"mappings":"AAOA,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../src/main/footer.tsx"],"names":[],"mappings":"AAOA,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AA2CD,QAAA,MAAM,MAAM,GAAI,UAAkB,WAAW,4CAkF5C,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,eAAe,MAAM,CAAC"}
|
package/dist/main/footer.js
CHANGED
|
@@ -22,18 +22,14 @@ const footerItems = [
|
|
|
22
22
|
"Adventures": "/adventures",
|
|
23
23
|
"Rentals": "/rentals",
|
|
24
24
|
"Events": "/events",
|
|
25
|
-
// "Local Guides": "/guides",
|
|
26
25
|
"Packages": "/packages",
|
|
27
|
-
|
|
26
|
+
"Explore Places": "/places",
|
|
28
27
|
},
|
|
29
28
|
},
|
|
30
29
|
{
|
|
31
|
-
title: "
|
|
30
|
+
title: "Services",
|
|
32
31
|
fields: {
|
|
33
|
-
"
|
|
34
|
-
"Internships": "/opportunities?type=internship",
|
|
35
|
-
"Jobs": "/opportunities?type=job",
|
|
36
|
-
"Freelancing": "/opportunities?type=freelance",
|
|
32
|
+
"Opportunities": "/opportunities",
|
|
37
33
|
"Find Companions": "/find-companion",
|
|
38
34
|
"Plan a Trip ✨": "/plan",
|
|
39
35
|
"Blogs": "/blogs",
|
|
@@ -56,7 +52,8 @@ const Footer = ({ dark = false }) => {
|
|
|
56
52
|
const iconColor = dark
|
|
57
53
|
? "text-muted hover:text-white"
|
|
58
54
|
: "text-muted-foreground hover:text-foreground";
|
|
59
|
-
|
|
55
|
+
const currentYear = new Date().getUTCFullYear();
|
|
56
|
+
return (_jsxs("footer", { className: "h-full md:-mt-20", children: [_jsx("div", { className: "w-full px-6 my-5 md:translate-y-5/8 md:px-12 md:mb-5", children: _jsx(Card, { className: "relative bg-muted p-6 rounded-lg shadow-md mx-auto w-4/5 flex flex-col md:flex-row items-center justify-between gap-6 md:p-10", children: _jsxs("div", { className: "flex-1 text-center md:text-left", children: [_jsx("h3", { className: "text-2xl font-bold text-foreground", children: "Subscribe Newsletter" }), _jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "Get inspired! Receive travel discounts, tips, and behind-the-scenes stories." }), _jsx(NewsletterSubscribe, {})] }) }) }), _jsxs("div", { className: `w-full border-t ${theme} pb-10 pt-10 sm:pt-30 md:pt-30`, children: [_jsxs("div", { className: "container mx-auto px-6 md:px-12 grid grid-cols-2 gap-10 md:grid-cols-6", children: [_jsxs("div", { className: "col-span-2", children: [_jsx("div", { className: "text-2xl font-semibold mb-2", children: "TrippEaze" }), _jsx("p", { className: "text-sm mb-4 leading-relaxed", children: "Your trusted travel partner for seamless adventures, stays, experiences, and opportunities across India." }), _jsxs("div", { className: "flex gap-4 flex-wrap", children: [_jsx("a", { href: "https://www.instagram.com/trippeaze/", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:instagram", className: "w-5 h-5" }) }), _jsx("a", { href: "https://wa.me/918482944029", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:whatsapp", className: "w-5 h-5" }) }), _jsx("a", { href: "https://www.youtube.com/@TrippEaze", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:youtube", className: "w-5 h-5" }) }), _jsx("a", { href: "https://www.facebook.com/profile.php?id=61576541488437", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:facebook", className: "w-5 h-5" }) }), _jsx("a", { href: "https://www.linkedin.com/company/trippeaze", target: "_blank", rel: "noopener noreferrer", className: `transition-colors ${iconColor}`, children: _jsx(Icon, { icon: "mdi:linkedin", className: "w-5 h-5" }) }), _jsx("a", { href: "mailto:contact@trippeaze.com", className: `transition-colors ${iconColor}`, children: _jsx(Mail, { className: "w-5 h-5" }) })] })] }), footerItems.map((section) => (_jsxs("div", { children: [_jsx("h4", { className: `text-sm font-bold uppercase tracking-widest ${iconColor} mb-3`, children: section.title }), _jsx("nav", { className: "flex flex-col gap-2 text-sm", children: Object.entries(section.fields).map(([label, href]) => (_jsx(Link, { href: href, className: "hover:text-foreground transition-colors", children: label }, label))) })] }, section.title)))] }), _jsxs("div", { className: "w-full mt-10", children: [_jsx(Separator, {}), _jsxs("p", { suppressHydrationWarning: true, className: "text-xs text-muted-foreground text-center mt-4", children: ["\u00A9 ", currentYear, " TrippEaze. All rights reserved. Made with \u2764\uFE0F in India."] })] })] })] }));
|
|
60
57
|
};
|
|
61
58
|
export { Footer };
|
|
62
59
|
export default Footer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../src/main/navbar.tsx"],"names":[],"mappings":"AAoBA,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAY,EAAE,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../src/main/navbar.tsx"],"names":[],"mappings":"AAoBA,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,MAAM,CAAC,EAAE,IAAY,EAAE,EAAE,WAAW,2CAgYnD;AAED,eAAe,MAAM,CAAC"}
|
package/dist/main/navbar.js
CHANGED
|
@@ -6,7 +6,7 @@ import { logoutUser } from "@myrjfa/state/dist/lib/actions/auth";
|
|
|
6
6
|
import { isLoggedInAtom, userAtom, userLoadingAtom } from "@myrjfa/state/dist/lib/userAtom";
|
|
7
7
|
import { opportunityTypeOptions } from "@myrjfa/state/dist/lib/models/opportunities/opportunity";
|
|
8
8
|
import { useAtom, useAtomValue } from "jotai";
|
|
9
|
-
import { ChevronDown, Globe, Heart, LayoutDashboardIcon, Store, Target, Luggage, Compass, Mountain, Users, Sparkles, BedDouble, Ticket, Car } from "lucide-react";
|
|
9
|
+
import { ChevronDown, Globe, Heart, LayoutDashboardIcon, Store, Target, Luggage, Compass, Mountain, Users, Sparkles, BedDouble, Ticket, Car, Package } from "lucide-react";
|
|
10
10
|
import Link from "next/link";
|
|
11
11
|
import { useRouter, usePathname } from "next/navigation";
|
|
12
12
|
import { useEffect, useState } from "react";
|
|
@@ -28,16 +28,14 @@ export function Navbar({ dark = false }) {
|
|
|
28
28
|
const [scrolled, setScrolled] = useState(false);
|
|
29
29
|
useEffect(() => {
|
|
30
30
|
const handleScroll = () => {
|
|
31
|
-
|
|
32
|
-
if (isScrolled !== scrolled) {
|
|
33
|
-
setScrolled(isScrolled);
|
|
34
|
-
}
|
|
31
|
+
setScrolled(window.scrollY > 10);
|
|
35
32
|
};
|
|
36
|
-
|
|
33
|
+
handleScroll();
|
|
34
|
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
37
35
|
return () => {
|
|
38
36
|
window.removeEventListener("scroll", handleScroll);
|
|
39
37
|
};
|
|
40
|
-
}, [
|
|
38
|
+
}, []);
|
|
41
39
|
if (loading)
|
|
42
40
|
return _jsx("div", { className: "w-full h-screen flex items-center justify-center", children: "Loading..." });
|
|
43
41
|
const logout = async () => {
|
|
@@ -54,19 +52,18 @@ export function Navbar({ dark = false }) {
|
|
|
54
52
|
};
|
|
55
53
|
const darkHeroPaths = ['/stays', '/events', '/adventures', '/rentals'];
|
|
56
54
|
const isDarkHeroPage = darkHeroPaths.includes(pathname || '');
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
const navbarBg = isScrolled
|
|
55
|
+
const effectiveDark = (isDarkHeroPage && !scrolled) ? true : dark;
|
|
56
|
+
const navbarBg = scrolled
|
|
60
57
|
? effectiveDark
|
|
61
58
|
? "bg-foreground/50 backdrop-blur-md"
|
|
62
59
|
: "bg-background/90 backdrop-blur-md"
|
|
63
60
|
: "bg-transparent";
|
|
64
|
-
const navbarBorder =
|
|
61
|
+
const navbarBorder = scrolled ? "border-b border-border/30 shadow-lg" : "";
|
|
65
62
|
const textColor = effectiveDark ? "text-white" : "text-foreground";
|
|
66
63
|
const navItemColor = effectiveDark
|
|
67
64
|
? "text-white/90 hover:text-white"
|
|
68
65
|
: "text-muted-foreground hover:text-foreground";
|
|
69
|
-
return (_jsx("header", { className: `fixed top-0 left-0 z-[100] mx-auto transition-all duration-300 w-full ${navbarBg} ${textColor} ${navbarBorder}`, children: _jsxs("div", { className: "mx-auto flex items-center justify-between gap-10 py-4 px-4 lg:px-8", children: [_jsxs(Link, { href: "/", className: "flex items-center gap-3", children: [_jsxs(Avatar, { className: "ml-2 -mr-4.5", children: [_jsx(AvatarImage, { src: "/images/logoicon.webp" }), _jsxs(AvatarFallback, { children: [(currentUser === null || currentUser === void 0 ? void 0 : currentUser.firstName.charAt(0)) || "D", (currentUser === null || currentUser === void 0 ? void 0 : currentUser.lastName.charAt(0)) || "P"] })] }), _jsx("span", { className: "font-heading text-xl font-bold", children: "rippeaze" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("nav", { className: "hidden md:flex items-center gap-10 justify-end", children: [_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { className: `flex items-center gap-1 text-sm font-medium cursor-pointer ${navItemColor}`, children: [_jsx(Target, { className: "h-5 w-5" }), _jsx("span", { children: "Opportunities" }), _jsx(ChevronDown, { className: "h-4 w-4" })] }) }), _jsx(PopoverContent, { className: "w-56 p-2 mt-3 bg-white rounded-lg shadow-lg border", align: "start", sideOffset: 5, children: _jsx("div", { className: "flex flex-col", children: opportunityTypeOptions.map((opt) => (_jsxs(Link, { href: `/opportunities?type=${opt.value}`, className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-md flex flex-col", children: [_jsx("span", { className: "font-medium", children: opt.label }), _jsx("span", { className: "text-xs text-gray-500", children: opt.description })] }, opt.value))) }) })] }), _jsx(
|
|
66
|
+
return (_jsx("header", { className: `fixed top-0 left-0 z-[100] mx-auto transition-all duration-300 w-full ${navbarBg} ${textColor} ${navbarBorder}`, children: _jsxs("div", { className: "mx-auto flex items-center justify-between gap-10 py-4 px-4 lg:px-8", children: [_jsxs(Link, { href: "/", className: "flex items-center gap-3", children: [_jsxs(Avatar, { className: "ml-2 -mr-4.5", children: [_jsx(AvatarImage, { src: "/images/logoicon.webp" }), _jsxs(AvatarFallback, { children: [(currentUser === null || currentUser === void 0 ? void 0 : currentUser.firstName.charAt(0)) || "D", (currentUser === null || currentUser === void 0 ? void 0 : currentUser.lastName.charAt(0)) || "P"] })] }), _jsx("span", { className: "font-heading text-xl font-bold", children: "rippeaze" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("nav", { className: "hidden md:flex items-center gap-10 justify-end", children: [_jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { className: `flex items-center gap-1 text-sm font-medium cursor-pointer ${navItemColor}`, children: [_jsx(Target, { className: "h-5 w-5" }), _jsx("span", { children: "Opportunities" }), _jsx(ChevronDown, { className: "h-4 w-4" })] }) }), _jsx(PopoverContent, { className: "w-56 p-2 mt-3 bg-white rounded-lg shadow-lg border", align: "start", sideOffset: 5, children: _jsx("div", { className: "flex flex-col", children: opportunityTypeOptions.map((opt) => (_jsxs(Link, { href: `/opportunities?type=${opt.value}`, className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-md flex flex-col", children: [_jsx("span", { className: "font-medium", children: opt.label }), _jsx("span", { className: "text-xs text-gray-500", children: opt.description })] }, opt.value))) }) })] }), _jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { className: `flex items-center gap-1 text-sm font-medium cursor-pointer ${navItemColor}`, children: [_jsx(Luggage, { className: "h-5 w-5" }), _jsx("span", { children: "Tours" }), _jsx(ChevronDown, { className: "h-4 w-4" })] }) }), _jsx(PopoverContent, { className: "w-64 p-2 mt-3 bg-white rounded-xl shadow-xl border", align: "start", sideOffset: 5, children: _jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("p", { className: "text-[10px] font-black uppercase tracking-widest text-gray-400 px-3 pt-1 pb-0.5", children: "Book an Experience" }), _jsxs(Link, { href: "/packages", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Package, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Packages" }), _jsx("p", { className: "text-xs text-gray-400", children: "Curated all-inclusive tours" })] })] }), _jsxs(Link, { href: "/adventures", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Mountain, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Adventures" }), _jsx("p", { className: "text-xs text-gray-400", children: "Treks, rafting & thrills" })] })] }), _jsxs(Link, { href: "/stays", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(BedDouble, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Stays" }), _jsx("p", { className: "text-xs text-gray-400", children: "Hotels, hostels & homestays" })] })] }), _jsxs(Link, { href: "/rentals", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Car, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Rentals" }), _jsx("p", { className: "text-xs text-gray-400", children: "Bikes, cars & gear" })] })] }), _jsxs(Link, { href: "/plan", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Sparkles, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Plan a Trip" }), _jsx("p", { className: "text-xs text-gray-400", children: "AI-powered itinerary builder" })] })] })] }) })] }), _jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { className: `flex items-center gap-1 text-sm font-medium cursor-pointer ${navItemColor}`, children: [_jsx(Compass, { className: "h-5 w-5" }), _jsx("span", { children: "Explore" }), _jsx(ChevronDown, { className: "h-4 w-4" })] }) }), _jsx(PopoverContent, { className: "w-64 p-2 mt-3 bg-white rounded-xl shadow-xl border", align: "start", sideOffset: 5, children: _jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("p", { className: "text-[10px] font-black uppercase tracking-widest text-gray-400 px-3 pt-1 pb-0.5", children: "Discover" }), _jsxs(Link, { href: "/events", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Ticket, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Events" }), _jsx("p", { className: "text-xs text-gray-400", children: "Festivals, workshops & more" })] })] }), _jsxs(Link, { href: "/blogs", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Globe, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Blogs" }), _jsx("p", { className: "text-xs text-gray-400", children: "Travel stories & guides" })] })] }), _jsx("p", { className: "text-[10px] font-black uppercase tracking-widest text-gray-400 px-3 pt-2 pb-0.5", children: "Community" }), _jsxs(Link, { href: "/find-companion", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Users, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Find Companions" }), _jsx("p", { className: "text-xs text-gray-400", children: "Connect with travel buddies" })] })] }), _jsx("p", { className: "text-[10px] font-black uppercase tracking-widest text-gray-400 px-3 pt-2 pb-0.5", children: "Destinations" }), _jsxs(Link, { href: "/places", className: "px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-lg flex items-center gap-3", children: [_jsx(Globe, { className: "h-4 w-4 text-primary flex-shrink-0" }), _jsxs("div", { children: [_jsx("p", { className: "font-semibold", children: "Explore Places" }), _jsx("p", { className: "text-xs text-gray-400", children: "Countries, cities & landmarks" })] })] })] }) })] }), currentUser ? _jsx(NavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Become a Partner", href: "/contact", className: navItemColor })
|
|
70
67
|
: _jsx(NavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Register as Business", href: "/auth/register?role=host", className: navItemColor }), isLoggedIn && _jsx(NotificationBell, { navItemColor: navItemColor, userId: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) !== "host" ? currentUser === null || currentUser === void 0 ? void 0 : currentUser.id : undefined, hostId: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === "host" ? currentUser === null || currentUser === void 0 ? void 0 : currentUser.id : undefined })] }), _jsx("div", { className: "hidden md:flex items-center gap-2", children: _jsxs(Popover, { children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(Button, { variant: "link", className: "flex w-full gap-1 cursor-pointer", children: _jsxs(Avatar, { className: "ml-5 mr-4.5", children: [_jsx(AvatarImage, { src: (_a = currentUser === null || currentUser === void 0 ? void 0 : currentUser.profilePic) !== null && _a !== void 0 ? _a : "/images/profile_placeholder.webp" }), _jsxs(AvatarFallback, { children: [(currentUser === null || currentUser === void 0 ? void 0 : currentUser.firstName.charAt(0)) || "D", (currentUser === null || currentUser === void 0 ? void 0 : currentUser.lastName.charAt(0)) || "P"] })] }) }) }), _jsx(PopoverContent, { className: `w-full p-0 mt-3 bg-${dark ? "primary" : "white"} rounded-lg shadow-lg`, align: "end", sideOffset: 5, children: _jsxs("div", { className: "py-2 w-full", children: [_jsxs("div", { className: "px-4 py-3 border-b w-full", children: [_jsx("p", { className: "text-sm font-medium", children: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.username) || "Guest" }), _jsx("p", { className: "text-xs text-gray-500", children: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.email) || "user@example.com" })] }), _jsxs("div", { className: "flex flex-col", children: [isLoggedIn ?
|
|
71
68
|
_jsxs(Link, { href: `/profile/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) || "user"}/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.username) || "Guest"}`, className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2", children: [_jsxs(Avatar, { className: "w-4 h-4", children: [_jsx(AvatarImage, { src: (_b = currentUser === null || currentUser === void 0 ? void 0 : currentUser.profilePic) !== null && _b !== void 0 ? _b : "/images/profile_placeholder.webp" }), _jsx(AvatarFallback, { children: "U" })] }), "Profile"] }) :
|
|
72
69
|
_jsxs(Button, { variant: "ghost", onClick: () => router.push('/auth/login?role=user'), className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2 justify-start", children: [_jsxs(Avatar, { className: "w-4 h-4", children: [_jsx(AvatarImage, { src: "/images/profile_placeholder.webp" }), _jsx(AvatarFallback, { children: "U" })] }), "Login As Volunteer"] }), isLoggedIn && _jsxs(Link, { href: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === 'host' || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === 'admin' ? `/dashboard/host/overview` : `/overview/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) || 'user'}`, className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2", children: [_jsx(LayoutDashboardIcon, { className: "h-4 w-4" }), "Dashboard"] }), isLoggedIn && ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === "user" || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) == null) &&
|
|
@@ -84,7 +81,7 @@ export function Navbar({ dark = false }) {
|
|
|
84
81
|
router.push('/auth/login?role=host');
|
|
85
82
|
}, className: "w-full py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 flex items-center gap-2 justify-start", children: [_jsxs(Avatar, { className: "w-4 h-4", children: [_jsx(AvatarImage, { src: "/images/profile_placeholder.webp" }), _jsx(AvatarFallback, { children: "H" })] }), "Login As Business"] }), _jsx(Separator, { className: "my-1" }), isLoggedIn && _jsx(Button, { variant: "outline", className: "py-2 mx-2 text-sm text-gray-700 hover:bg-gray-100 justify-center cursor-pointer", onClick: () => {
|
|
86
83
|
logout();
|
|
87
|
-
}, children: "Sign out" })] })] }) })] }) })] }), _jsx(MobileNavbar, { children: _jsx("div", { className: `rounded-b-lg py-4 px-4 shadow-xl ${"bg-background"} ${textColor}`, children: _jsxs("nav", { className: "flex flex-col gap-1 pt-2", children: [_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 py-2 px-2 text-muted-foreground", children: [_jsx(Target, { className: "h-5 w-5" }), _jsx("span", { className: "text-sm font-medium", children: "Opportunities" })] }), _jsx("div", { className: "pl-8 flex flex-col gap-1", children: opportunityTypeOptions.map((opt) => (_jsx(Link, { href: `/opportunities?type=${opt.value}`, className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: opt.label }, opt.value))) })] }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 py-2 px-2 text-muted-foreground", children: [_jsx(
|
|
84
|
+
}, children: "Sign out" })] })] }) })] }) })] }), _jsx(MobileNavbar, { children: _jsx("div", { className: `rounded-b-lg py-4 px-4 shadow-xl ${"bg-background"} ${textColor}`, children: _jsxs("nav", { className: "flex flex-col gap-1 pt-2", children: [_jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 py-2 px-2 text-muted-foreground", children: [_jsx(Target, { className: "h-5 w-5" }), _jsx("span", { className: "text-sm font-medium", children: "Opportunities" })] }), _jsx("div", { className: "pl-8 flex flex-col gap-1", children: opportunityTypeOptions.map((opt) => (_jsx(Link, { href: `/opportunities?type=${opt.value}`, className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: opt.label }, opt.value))) })] }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 py-2 px-2 text-muted-foreground", children: [_jsx(Luggage, { className: "h-5 w-5" }), _jsx("span", { className: "text-sm font-medium", children: "Tours" })] }), _jsxs("div", { className: "pl-8 flex flex-col gap-1", children: [_jsx(Link, { href: "/packages", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Packages" }), _jsx(Link, { href: "/adventures", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Adventures" }), _jsx(Link, { href: "/stays", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Stays" }), _jsx(Link, { href: "/rentals", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Rentals" }), _jsx(Link, { href: "/plan", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Plan a Trip \u2728" })] })] }), _jsxs("div", { className: "flex flex-col", children: [_jsxs("div", { className: "flex items-center gap-2 py-2 px-2 text-muted-foreground", children: [_jsx(Compass, { className: "h-5 w-5" }), _jsx("span", { className: "text-sm font-medium", children: "Explore" })] }), _jsxs("div", { className: "pl-8 flex flex-col gap-1", children: [_jsx(Link, { href: "/events", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Events" }), _jsx(Link, { href: "/blogs", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Blogs" }), _jsx(Link, { href: "/find-companion", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Find Companions" }), _jsx(Link, { href: "/places", className: "py-1.5 px-2 text-sm text-gray-600 hover:text-foreground hover:bg-gray-100 rounded", children: "Explore Places" })] })] }), currentUser ? _jsx(MobileNavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Become a Partner", href: "/contact" }) :
|
|
88
85
|
_jsx(MobileNavItem, { icon: _jsx(Store, { className: "h-5 w-5" }), label: "Register as Business", href: "/auth/register?role=host" }), isLoggedIn && _jsx(MobileNotificationBell, {}), isLoggedIn && _jsx(MobileNavItem, { icon: _jsx(LayoutDashboardIcon, { className: "h-5 w-5" }), label: "Dashboard", href: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === 'host' || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === 'admin' ? `/dashboard/host/overview` : `/overview/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) || 'user'}`, className: "md:hidden" }), isLoggedIn && ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === "user" || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) == null) &&
|
|
89
86
|
_jsx(MobileNavItem, { icon: _jsx(Luggage, { className: "h-5 w-5" }), label: "My Bookings", href: "/overview/user#bookings", className: "md:hidden" }), isLoggedIn && ((currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) === "user" || (currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) == null) &&
|
|
90
87
|
_jsx(MobileNavItem, { icon: _jsx(Heart, { className: "h-5 w-5" }), label: "Favourites", href: "/opportunities/favourites", className: "md:hidden" }), isLoggedIn ? _jsxs(Link, { href: `/profile/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.role) || "user"}/${(currentUser === null || currentUser === void 0 ? void 0 : currentUser.username) || "Guest"}`, className: "flex w-full gap-1 cursor-pointer my-2", children: [_jsxs(Avatar, { className: "w-5 h-5 ml-2", children: [_jsx(AvatarImage, { src: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.profilePic) || "/images/profile_placeholder.webp" }), _jsx(AvatarFallback, { children: "DP" })] }), _jsx(Label, { htmlFor: "username", className: "cursor-pointer text-muted-foreground hover:text-foreground", children: (currentUser === null || currentUser === void 0 ? void 0 : currentUser.username) || "Guest" })] }) :
|
package/dist/misc/button.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
declare const buttonVariants: (props?: ({
|
|
3
3
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
4
|
-
size?: "
|
|
4
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
7
7
|
asChild?: boolean;
|
package/dist/misc/datepicker.js
CHANGED
|
@@ -184,7 +184,7 @@ export function DatePicker({ field, minDate = new Date("1900-01-01"), maxDate =
|
|
|
184
184
|
}
|
|
185
185
|
};
|
|
186
186
|
const hasValue = field.value instanceof Date;
|
|
187
|
-
const displayDate = hasValue ? format(field.value, "d MMM") : null;
|
|
187
|
+
const displayDate = hasValue ? format(field.value, "d MMM yyyy") : null;
|
|
188
188
|
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", className: cn(
|
|
189
189
|
// base
|
|
190
190
|
"group relative w-full rounded-2xl p-3 flex items-center justify-between text-left outline-none cursor-pointer",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterBar.d.ts","sourceRoot":"","sources":["../../src/misc/filterBar.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK1C,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC1C,QAAQ,EAAE,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrD,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,CAAC,EAAE,SAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAE5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAErC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAEzE,eAAe,CAAC,EAAE,MAAM,SAAS,CAAC;IAElC,UAAU,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC;IAEhC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACvC;
|
|
1
|
+
{"version":3,"file":"filterBar.d.ts","sourceRoot":"","sources":["../../src/misc/filterBar.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK1C,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC1C,QAAQ,EAAE,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrD,WAAW,EAAE,MAAM,CAAC;IAEpB,OAAO,CAAC,EAAE,SAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAE5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAErC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAEzE,eAAe,CAAC,EAAE,MAAM,SAAS,CAAC;IAElC,UAAU,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC;IAEhC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACvC;AAgfD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,cAAc,2CAMhE"}
|
package/dist/misc/filterBar.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { retrieveCity, retrieveState } from "@myrjfa/state";
|
|
3
|
+
import { retrieveCity, retrieveState, INDIAN_CITIES } from "@myrjfa/state";
|
|
4
4
|
import { Search, SearchIcon, SlidersHorizontal, X } from "lucide-react";
|
|
5
5
|
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
|
6
6
|
import { Suspense, useEffect, useState } from "react";
|
|
@@ -107,7 +107,8 @@ function FilterBarComponent({ tiles, filterConfig = defaultFilterOptions }) {
|
|
|
107
107
|
return opt.options.map(o => o.label);
|
|
108
108
|
}
|
|
109
109
|
if (opt.deriveFromTiles === 'location') {
|
|
110
|
-
|
|
110
|
+
const tileLocations = (tiles !== null && tiles !== void 0 ? tiles : []).map(tile => [retrieveState((tile === null || tile === void 0 ? void 0 : tile.location) || ''), retrieveCity((tile === null || tile === void 0 ? void 0 : tile.location) || '')]).flat().filter(Boolean);
|
|
111
|
+
return Array.from(new Set([...tileLocations, ...INDIAN_CITIES]));
|
|
111
112
|
}
|
|
112
113
|
if (opt.deriveFromTiles === 'skills') {
|
|
113
114
|
return Array.from(new Set((tiles !== null && tiles !== void 0 ? tiles : []).flatMap(tile => tile.skills || [])));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myrjfa/ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"react-dom": "^19.0.0",
|
|
73
73
|
"typescript": "^5.0.0",
|
|
74
74
|
"zod": "^3.24.2",
|
|
75
|
-
"@myrjfa/state": "2.1.
|
|
75
|
+
"@myrjfa/state": "2.1.6"
|
|
76
76
|
},
|
|
77
77
|
"repository": {
|
|
78
78
|
"type": "git",
|