@burdenoff/microfe-ggnomad 2026.626.1 → 2026.705.1
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/ggnomad/components/LoadMoreButton.js +19 -0
- package/dist/ggnomad/components/LoadMoreButton.js.map +1 -0
- package/dist/ggnomad/components/index.js +1 -0
- package/dist/ggnomad/graphql.js +61 -17
- package/dist/ggnomad/graphql.js.map +1 -1
- package/dist/ggnomad/pages/ActivityDetailsPage.js +55 -53
- package/dist/ggnomad/pages/ActivityDetailsPage.js.map +1 -1
- package/dist/ggnomad/pages/AnalyticsPage.js +82 -35
- package/dist/ggnomad/pages/AnalyticsPage.js.map +1 -1
- package/dist/ggnomad/pages/BookingsPage.js +143 -69
- package/dist/ggnomad/pages/BookingsPage.js.map +1 -1
- package/dist/ggnomad/pages/EntertainmentPage.js +43 -34
- package/dist/ggnomad/pages/EntertainmentPage.js.map +1 -1
- package/dist/ggnomad/pages/EventDetailsPage.js +55 -53
- package/dist/ggnomad/pages/EventDetailsPage.js.map +1 -1
- package/dist/ggnomad/pages/FavoritesPage.js +98 -38
- package/dist/ggnomad/pages/FavoritesPage.js.map +1 -1
- package/dist/ggnomad/pages/HospitalityPage.js +49 -40
- package/dist/ggnomad/pages/HospitalityPage.js.map +1 -1
- package/dist/ggnomad/pages/PropertyDetailsPage.js +60 -58
- package/dist/ggnomad/pages/PropertyDetailsPage.js.map +1 -1
- package/dist/ggnomad/pages/ProviderPage.js +70 -61
- package/dist/ggnomad/pages/ProviderPage.js.map +1 -1
- package/dist/ggnomad/pages/TourDetailsPage.js +55 -53
- package/dist/ggnomad/pages/TourDetailsPage.js.map +1 -1
- package/dist/ggnomad/pages/TourismPage.js +48 -40
- package/dist/ggnomad/pages/TourismPage.js.map +1 -1
- package/dist/ggnomad/utils/notify.js +36 -0
- package/dist/ggnomad/utils/notify.js.map +1 -0
- package/package.json +2 -1
|
@@ -2,77 +2,86 @@ import { GGNOMAD_PROVIDERS_QUERY as e } from "../graphql.js";
|
|
|
2
2
|
import { PageShell as t } from "./PageShell.js";
|
|
3
3
|
import { StatusBadge as n } from "../components/StatusBadge.js";
|
|
4
4
|
import { EntityCard as r } from "../components/EntityCard.js";
|
|
5
|
+
import { LoadMoreButton as i } from "../components/LoadMoreButton.js";
|
|
5
6
|
import "../components/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { useState as a } from "react";
|
|
8
|
+
import { Briefcase as o } from "lucide-react";
|
|
9
|
+
import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { useQuery as c } from "@apollo/client/react";
|
|
11
|
+
import { GlassCard as l, IllustratedEmptyState as u, PagePurpose as d } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
13
|
//#region src/ggnomad/pages/ProviderPage.tsx
|
|
12
|
-
function
|
|
13
|
-
let { t:
|
|
14
|
-
first:
|
|
14
|
+
function m() {
|
|
15
|
+
let { t: m } = s(), [h, g] = a(12), { data: _ } = c(e, { variables: {
|
|
16
|
+
first: h,
|
|
15
17
|
skip: 0
|
|
16
|
-
} }),
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
title:
|
|
19
|
-
titleAccent:
|
|
20
|
-
subtitle:
|
|
21
|
-
children: [/* @__PURE__ */
|
|
22
|
-
icon: /* @__PURE__ */
|
|
23
|
-
children:
|
|
24
|
-
}),
|
|
18
|
+
} }), v = _?.ggnomadProviders ?? [];
|
|
19
|
+
return /* @__PURE__ */ p(t, {
|
|
20
|
+
title: m("ggnomad.provider.title", "Provider Dashboard"),
|
|
21
|
+
titleAccent: m("ggnomad.provider.title.accent", "Provider"),
|
|
22
|
+
subtitle: m("ggnomad.provider.subtitle", "B2B provider operations and onboarding metrics"),
|
|
23
|
+
children: [/* @__PURE__ */ f(d, {
|
|
24
|
+
icon: /* @__PURE__ */ f(o, { className: "size-4" }),
|
|
25
|
+
children: m("ggnomad.provider.purpose", "Track the supply side of the marketplace — the hotels, tour operators and venues that publish inventory. Use it to monitor each provider’s status, listing count, revenue and rating, and to spot who needs onboarding attention.")
|
|
26
|
+
}), v.length === 0 ? /* @__PURE__ */ f(u, {
|
|
25
27
|
illustration: "empty-people",
|
|
26
|
-
title:
|
|
27
|
-
description:
|
|
28
|
-
}) : /* @__PURE__ */
|
|
28
|
+
title: m("ggnomad.provider.emptyTitle", "No providers onboarded"),
|
|
29
|
+
description: m("ggnomad.provider.emptyDescription", "Onboarded B2B providers and their performance will be tracked here.")
|
|
30
|
+
}) : /* @__PURE__ */ p(l, {
|
|
29
31
|
treatment: "glass",
|
|
30
32
|
glow: !0,
|
|
31
33
|
className: "border-border-seam p-5",
|
|
32
|
-
children: [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
children: f("
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
children: f("
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
children: f("
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ f("h2", {
|
|
36
|
+
className: "mb-4 text-lg font-medium tracking-tight text-text-primary",
|
|
37
|
+
children: m("ggnomad.provider.onboardedProviders", "Onboarded providers")
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ f("div", {
|
|
40
|
+
className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-3",
|
|
41
|
+
children: v.map((e) => /* @__PURE__ */ f(r, {
|
|
42
|
+
title: e.name,
|
|
43
|
+
meta: e.type,
|
|
44
|
+
badge: /* @__PURE__ */ f(n, {
|
|
45
|
+
status: e.status,
|
|
46
|
+
live: e.status === "ACTIVE"
|
|
47
|
+
}),
|
|
48
|
+
footer: /* @__PURE__ */ p("dl", {
|
|
49
|
+
className: "grid grid-cols-3 gap-2 text-xs",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
52
|
+
className: "text-text-secondary",
|
|
53
|
+
children: m("ggnomad.provider.listings", "Listings")
|
|
54
|
+
}), /* @__PURE__ */ f("dd", {
|
|
55
|
+
className: "mt-0.5 font-medium tabular-nums text-text-primary",
|
|
56
|
+
children: e.listingCount
|
|
57
|
+
})] }),
|
|
58
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
59
|
+
className: "text-text-secondary",
|
|
60
|
+
children: m("ggnomad.provider.revenue", "Revenue")
|
|
61
|
+
}), /* @__PURE__ */ p("dd", {
|
|
62
|
+
className: "mt-0.5 font-medium tabular-nums text-text-primary",
|
|
63
|
+
children: ["$", Number(e.totalRevenue).toLocaleString()]
|
|
64
|
+
})] }),
|
|
65
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
66
|
+
className: "text-text-secondary",
|
|
67
|
+
children: m("ggnomad.provider.rating", "Rating")
|
|
68
|
+
}), /* @__PURE__ */ f("dd", {
|
|
69
|
+
className: "mt-0.5 font-medium tabular-nums text-text-primary",
|
|
70
|
+
children: e.rating ?? m("ggnomad.provider.noRating", "N/A")
|
|
71
|
+
})] })
|
|
72
|
+
]
|
|
73
|
+
})
|
|
74
|
+
}, e.id))
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ f(i, {
|
|
77
|
+
visible: v.length >= h,
|
|
78
|
+
onLoadMore: () => g((e) => e + 12)
|
|
79
|
+
})
|
|
80
|
+
]
|
|
72
81
|
})]
|
|
73
82
|
});
|
|
74
83
|
}
|
|
75
84
|
//#endregion
|
|
76
|
-
export {
|
|
85
|
+
export { m as ProviderPage };
|
|
77
86
|
|
|
78
87
|
//# sourceMappingURL=ProviderPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderPage.js","names":[],"sources":["../../../src/ggnomad/pages/ProviderPage.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client/react';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { Briefcase } from 'lucide-react';\nimport { GlassCard, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\n\nimport { GGNOMAD_PROVIDERS_QUERY } from '../graphql';\nimport { PageShell } from './PageShell';\nimport { EntityCard, StatusBadge } from '../components';\n\nexport function ProviderPage() {\n const { t } = useI18n();\n const { data } = useQuery(\n GGNOMAD_PROVIDERS_QUERY as TypedDocumentNode<\n {\n ggnomadProviders: Array<{\n id: string;\n name: string;\n type: string;\n status: string;\n listingCount: number;\n totalRevenue: number;\n rating?: number;\n }>;\n },\n { first: number; skip: number }\n >,\n { variables: { first:
|
|
1
|
+
{"version":3,"file":"ProviderPage.js","names":[],"sources":["../../../src/ggnomad/pages/ProviderPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useQuery } from '@apollo/client/react';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { Briefcase } from 'lucide-react';\nimport { GlassCard, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\n\nimport { GGNOMAD_PROVIDERS_QUERY } from '../graphql';\nimport { PageShell } from './PageShell';\nimport { EntityCard, LoadMoreButton, StatusBadge } from '../components';\n\nexport function ProviderPage() {\n const { t } = useI18n();\n const [limit, setLimit] = useState(12);\n const { data } = useQuery(\n GGNOMAD_PROVIDERS_QUERY as TypedDocumentNode<\n {\n ggnomadProviders: Array<{\n id: string;\n name: string;\n type: string;\n status: string;\n listingCount: number;\n totalRevenue: number;\n rating?: number;\n }>;\n },\n { first: number; skip: number }\n >,\n { variables: { first: limit, skip: 0 } }\n );\n const providers = data?.ggnomadProviders ?? [];\n\n return (\n <PageShell\n title={t('ggnomad.provider.title', 'Provider Dashboard')}\n titleAccent={t('ggnomad.provider.title.accent', 'Provider')}\n subtitle={t('ggnomad.provider.subtitle', 'B2B provider operations and onboarding metrics')}\n >\n <PagePurpose icon={<Briefcase className=\"size-4\" />}>\n {t(\n 'ggnomad.provider.purpose',\n 'Track the supply side of the marketplace — the hotels, tour operators and venues that publish inventory. Use it to monitor each provider’s status, listing count, revenue and rating, and to spot who needs onboarding attention.'\n )}\n </PagePurpose>\n\n {providers.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-people\"\n title={t('ggnomad.provider.emptyTitle', 'No providers onboarded')}\n description={t(\n 'ggnomad.provider.emptyDescription',\n 'Onboarded B2B providers and their performance will be tracked here.'\n )}\n />\n ) : (\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam p-5\">\n <h2 className=\"mb-4 text-lg font-medium tracking-tight text-text-primary\">\n {t('ggnomad.provider.onboardedProviders', 'Onboarded providers')}\n </h2>\n <div className=\"grid gap-3 sm:grid-cols-2 xl:grid-cols-3\">\n {providers.map((provider) => (\n <EntityCard\n key={provider.id}\n title={provider.name}\n meta={provider.type}\n badge={<StatusBadge status={provider.status} live={provider.status === 'ACTIVE'} />}\n footer={\n <dl className=\"grid grid-cols-3 gap-2 text-xs\">\n <div>\n <dt className=\"text-text-secondary\">\n {t('ggnomad.provider.listings', 'Listings')}\n </dt>\n <dd className=\"mt-0.5 font-medium tabular-nums text-text-primary\">\n {provider.listingCount}\n </dd>\n </div>\n <div>\n <dt className=\"text-text-secondary\">\n {t('ggnomad.provider.revenue', 'Revenue')}\n </dt>\n <dd className=\"mt-0.5 font-medium tabular-nums text-text-primary\">\n ${Number(provider.totalRevenue).toLocaleString()}\n </dd>\n </div>\n <div>\n <dt className=\"text-text-secondary\">\n {t('ggnomad.provider.rating', 'Rating')}\n </dt>\n <dd className=\"mt-0.5 font-medium tabular-nums text-text-primary\">\n {provider.rating ?? t('ggnomad.provider.noRating', 'N/A')}\n </dd>\n </div>\n </dl>\n }\n />\n ))}\n </div>\n <LoadMoreButton\n visible={providers.length >= limit}\n onLoadMore={() => setLimit((l) => l + 12)}\n />\n </GlassCard>\n )}\n </PageShell>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAWA,SAAgB,IAAe;CAC7B,IAAM,EAAE,SAAM,GAAS,EACjB,CAAC,GAAO,KAAY,EAAS,GAAG,EAChC,EAAE,YAAS,EACf,GAcA,EAAE,WAAW;EAAE,OAAO;EAAO,MAAM;EAAG,EAAE,CACzC,EACK,IAAY,GAAM,oBAAoB,EAAE;AAE9C,QACE,kBAAC,GAAD;EACE,OAAO,EAAE,0BAA0B,qBAAqB;EACxD,aAAa,EAAE,iCAAiC,WAAW;EAC3D,UAAU,EAAE,6BAA6B,iDAAiD;YAH5F,CAKE,kBAAC,GAAD;GAAa,MAAM,kBAAC,GAAD,EAAW,WAAU,UAAW,CAAA;aAChD,EACC,4BACA,oOACD;GACW,CAAA,EAEb,EAAU,WAAW,IACpB,kBAAC,GAAD;GACE,cAAa;GACb,OAAO,EAAE,+BAA+B,yBAAyB;GACjE,aAAa,EACX,qCACA,sEACD;GACD,CAAA,GAEF,kBAAC,GAAD;GAAW,WAAU;GAAQ,MAAA;GAAK,WAAU;aAA5C;IACE,kBAAC,MAAD;KAAI,WAAU;eACX,EAAE,uCAAuC,sBAAsB;KAC7D,CAAA;IACL,kBAAC,OAAD;KAAK,WAAU;eACZ,EAAU,KAAK,MACd,kBAAC,GAAD;MAEE,OAAO,EAAS;MAChB,MAAM,EAAS;MACf,OAAO,kBAAC,GAAD;OAAa,QAAQ,EAAS;OAAQ,MAAM,EAAS,WAAW;OAAY,CAAA;MACnF,QACE,kBAAC,MAAD;OAAI,WAAU;iBAAd;QACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAE,6BAA6B,WAAW;SACxC,CAAA,EACL,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAS;SACP,CAAA,CACD,EAAA,CAAA;QACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAE,4BAA4B,UAAU;SACtC,CAAA,EACL,kBAAC,MAAD;SAAI,WAAU;mBAAd,CAAkE,KAC9D,OAAO,EAAS,aAAa,CAAC,gBAAgB,CAC7C;WACD,EAAA,CAAA;QACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAE,2BAA2B,SAAS;SACpC,CAAA,EACL,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAS,UAAU,EAAE,6BAA6B,MAAM;SACtD,CAAA,CACD,EAAA,CAAA;QACH;;MAEP,EAhCK,EAAS,GAgCd,CACF;KACE,CAAA;IACN,kBAAC,GAAD;KACE,SAAS,EAAU,UAAU;KAC7B,kBAAkB,GAAU,MAAM,IAAI,GAAG;KACzC,CAAA;IACQ;KAEJ"}
|
|
@@ -3,79 +3,81 @@ import { PageShell as t } from "./PageShell.js";
|
|
|
3
3
|
import { SectionCard as n } from "../components/SectionCard.js";
|
|
4
4
|
import { DetailRow as r } from "../components/DetailRow.js";
|
|
5
5
|
import "../components/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import { useGGNomad as i } from "../providers/GGNomadProvider.js";
|
|
7
|
+
import { joinPath as a } from "../utils/navigation.js";
|
|
8
|
+
import { CalendarCheck as o, CheckCircle2 as s, Compass as c } from "lucide-react";
|
|
9
|
+
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { useNavigate as u, useParams as d } from "react-router-dom";
|
|
11
|
+
import { useQuery as f } from "@apollo/client/react";
|
|
12
|
+
import { GlassCard as p, IllustratedEmptyState as m, NextSteps as h, PagePurpose as g } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
12
14
|
//#region src/ggnomad/pages/TourDetailsPage.tsx
|
|
13
|
-
function
|
|
14
|
-
let { t:
|
|
15
|
-
variables: { id:
|
|
16
|
-
skip: !
|
|
17
|
-
}),
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
title:
|
|
20
|
-
subtitle:
|
|
21
|
-
children:
|
|
22
|
-
/* @__PURE__ */ g
|
|
23
|
-
icon: /* @__PURE__ */
|
|
24
|
-
children:
|
|
15
|
+
function b() {
|
|
16
|
+
let { t: b } = l(), x = u(), { basePath: S = "/" } = i(), { id: C = "" } = d(), { data: w } = f(e, {
|
|
17
|
+
variables: { id: C },
|
|
18
|
+
skip: !C
|
|
19
|
+
}), T = w?.ggnomadTour;
|
|
20
|
+
return /* @__PURE__ */ v(t, {
|
|
21
|
+
title: T?.name ?? b("ggnomad.tour.fallbackTitle", "Tour details"),
|
|
22
|
+
subtitle: b("ggnomad.tour.subtitle", "Tour package details and booking context"),
|
|
23
|
+
children: T ? /* @__PURE__ */ y(_, { children: [
|
|
24
|
+
/* @__PURE__ */ v(g, {
|
|
25
|
+
icon: /* @__PURE__ */ v(c, { className: "size-4" }),
|
|
26
|
+
children: b("ggnomad.tour.purpose", "See exactly what this tour involves — duration, difficulty, your guide, price and the highlights you’ll experience — so you can confirm it fits your trip before booking.")
|
|
25
27
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ v(h, {
|
|
27
29
|
storageKey: "ggnomad-tour-detail",
|
|
28
30
|
steps: [{
|
|
29
31
|
id: "book",
|
|
30
|
-
label:
|
|
31
|
-
description:
|
|
32
|
-
icon: /* @__PURE__ */
|
|
33
|
-
onClick: () =>
|
|
32
|
+
label: b("ggnomad.tour.next.book", "Book this tour"),
|
|
33
|
+
description: b("ggnomad.tour.next.bookDesc", "Add it to your itinerary and track it under Bookings."),
|
|
34
|
+
icon: /* @__PURE__ */ v(o, { className: "size-4" }),
|
|
35
|
+
onClick: () => x(a(S, "bookings"))
|
|
34
36
|
}, {
|
|
35
37
|
id: "browse",
|
|
36
|
-
label:
|
|
37
|
-
description:
|
|
38
|
-
icon: /* @__PURE__ */
|
|
39
|
-
onClick: () =>
|
|
38
|
+
label: b("ggnomad.tour.next.browse", "Explore more experiences"),
|
|
39
|
+
description: b("ggnomad.tour.next.browseDesc", "Return to Tourism to compare tours and activities."),
|
|
40
|
+
icon: /* @__PURE__ */ v(c, { className: "size-4" }),
|
|
41
|
+
onClick: () => x(a(S, "tourism"))
|
|
40
42
|
}]
|
|
41
43
|
}),
|
|
42
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ y("div", {
|
|
43
45
|
className: "grid gap-4 lg:grid-cols-2",
|
|
44
|
-
children: [/* @__PURE__ */
|
|
46
|
+
children: [/* @__PURE__ */ y(p, {
|
|
45
47
|
treatment: "glass",
|
|
46
48
|
glow: !0,
|
|
47
49
|
className: "border-border-seam p-5",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
49
51
|
className: "mb-4 text-lg font-medium tracking-tight text-text-primary",
|
|
50
|
-
children:
|
|
51
|
-
}), /* @__PURE__ */
|
|
52
|
+
children: b("ggnomad.tour.details", "Details")
|
|
53
|
+
}), /* @__PURE__ */ y("dl", {
|
|
52
54
|
className: "space-y-2 text-sm",
|
|
53
55
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
label:
|
|
56
|
-
value:
|
|
56
|
+
/* @__PURE__ */ v(r, {
|
|
57
|
+
label: b("ggnomad.tour.duration", "Duration"),
|
|
58
|
+
value: T.duration
|
|
57
59
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
label:
|
|
60
|
-
value:
|
|
60
|
+
/* @__PURE__ */ v(r, {
|
|
61
|
+
label: b("ggnomad.tour.difficulty", "Difficulty"),
|
|
62
|
+
value: T.difficulty ?? b("ggnomad.tour.na", "N/A")
|
|
61
63
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
label:
|
|
64
|
-
value:
|
|
64
|
+
/* @__PURE__ */ v(r, {
|
|
65
|
+
label: b("ggnomad.tour.guide", "Guide"),
|
|
66
|
+
value: T.guideName ?? b("ggnomad.tour.na", "N/A")
|
|
65
67
|
}),
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
label:
|
|
68
|
-
value: `${
|
|
68
|
+
/* @__PURE__ */ v(r, {
|
|
69
|
+
label: b("ggnomad.tour.price", "Price"),
|
|
70
|
+
value: `${T.currency} ${Number(T.price).toFixed(2)}`
|
|
69
71
|
})
|
|
70
72
|
]
|
|
71
73
|
})]
|
|
72
|
-
}), /* @__PURE__ */
|
|
73
|
-
title:
|
|
74
|
-
children: /* @__PURE__ */
|
|
74
|
+
}), /* @__PURE__ */ v(n, {
|
|
75
|
+
title: b("ggnomad.tour.highlights", "Highlights"),
|
|
76
|
+
children: /* @__PURE__ */ v("ul", {
|
|
75
77
|
className: "space-y-2 text-sm",
|
|
76
|
-
children: (
|
|
78
|
+
children: (T.highlights ?? []).map((e) => /* @__PURE__ */ y("li", {
|
|
77
79
|
className: "flex items-start gap-2 text-text-primary",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ v(s, {
|
|
79
81
|
className: "mt-0.5 size-4 flex-shrink-0 text-status-success-text",
|
|
80
82
|
"aria-hidden": "true"
|
|
81
83
|
}), e]
|
|
@@ -83,14 +85,14 @@ function v() {
|
|
|
83
85
|
})
|
|
84
86
|
})]
|
|
85
87
|
})
|
|
86
|
-
] }) : /* @__PURE__ */
|
|
88
|
+
] }) : /* @__PURE__ */ v(m, {
|
|
87
89
|
illustration: "empty-data",
|
|
88
|
-
title:
|
|
89
|
-
description:
|
|
90
|
+
title: b("ggnomad.tour.notFoundTitle", "No tour found"),
|
|
91
|
+
description: b("ggnomad.tour.notFoundDescription", "This tour is unavailable or may have been removed.")
|
|
90
92
|
})
|
|
91
93
|
});
|
|
92
94
|
}
|
|
93
95
|
//#endregion
|
|
94
|
-
export {
|
|
96
|
+
export { b as TourDetailsPage };
|
|
95
97
|
|
|
96
98
|
//# sourceMappingURL=TourDetailsPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourDetailsPage.js","names":[],"sources":["../../../src/ggnomad/pages/TourDetailsPage.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client/react';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { CalendarCheck, CheckCircle2, Compass } from 'lucide-react';\nimport { GlassCard, IllustratedEmptyState, NextSteps, PagePurpose } from '@burdenoff/fe-libs/ui';\n\nimport { GGNOMAD_TOUR_QUERY } from '../graphql';\nimport { PageShell } from './PageShell';\nimport { DetailRow, SectionCard } from '../components';\n\nexport function TourDetailsPage() {\n const { t } = useI18n();\n const navigate = useNavigate();\n const { id = '' } = useParams();\n const { data } = useQuery(\n GGNOMAD_TOUR_QUERY as TypedDocumentNode<\n {\n ggnomadTour: {\n name: string;\n duration: string;\n difficulty?: string;\n guideName?: string;\n currency: string;\n price: number;\n highlights: string[];\n } | null;\n },\n { id: string }\n >,\n { variables: { id }, skip: !id }\n );\n const tour = data?.ggnomadTour;\n\n return (\n <PageShell\n title={tour?.name ?? t('ggnomad.tour.fallbackTitle', 'Tour details')}\n subtitle={t('ggnomad.tour.subtitle', 'Tour package details and booking context')}\n >\n {!tour ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={t('ggnomad.tour.notFoundTitle', 'No tour found')}\n description={t(\n 'ggnomad.tour.notFoundDescription',\n 'This tour is unavailable or may have been removed.'\n )}\n />\n ) : (\n <>\n <PagePurpose icon={<Compass className=\"size-4\" />}>\n {t(\n 'ggnomad.tour.purpose',\n 'See exactly what this tour involves — duration, difficulty, your guide, price and the highlights you’ll experience — so you can confirm it fits your trip before booking.'\n )}\n </PagePurpose>\n\n <NextSteps\n storageKey=\"ggnomad-tour-detail\"\n steps={[\n {\n id: 'book',\n label: t('ggnomad.tour.next.book', 'Book this tour'),\n description: t(\n 'ggnomad.tour.next.bookDesc',\n 'Add it to your itinerary and track it under Bookings.'\n ),\n icon: <CalendarCheck className=\"size-4\" />,\n onClick: () => navigate('
|
|
1
|
+
{"version":3,"file":"TourDetailsPage.js","names":[],"sources":["../../../src/ggnomad/pages/TourDetailsPage.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client/react';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport { CalendarCheck, CheckCircle2, Compass } from 'lucide-react';\nimport { GlassCard, IllustratedEmptyState, NextSteps, PagePurpose } from '@burdenoff/fe-libs/ui';\n\nimport { GGNOMAD_TOUR_QUERY } from '../graphql';\nimport { useGGNomad } from '../providers/GGNomadProvider';\nimport { joinPath } from '../utils/navigation';\nimport { PageShell } from './PageShell';\nimport { DetailRow, SectionCard } from '../components';\n\nexport function TourDetailsPage() {\n const { t } = useI18n();\n const navigate = useNavigate();\n const { basePath = '/' } = useGGNomad();\n const { id = '' } = useParams();\n const { data } = useQuery(\n GGNOMAD_TOUR_QUERY as TypedDocumentNode<\n {\n ggnomadTour: {\n name: string;\n duration: string;\n difficulty?: string;\n guideName?: string;\n currency: string;\n price: number;\n highlights: string[];\n } | null;\n },\n { id: string }\n >,\n { variables: { id }, skip: !id }\n );\n const tour = data?.ggnomadTour;\n\n return (\n <PageShell\n title={tour?.name ?? t('ggnomad.tour.fallbackTitle', 'Tour details')}\n subtitle={t('ggnomad.tour.subtitle', 'Tour package details and booking context')}\n >\n {!tour ? (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={t('ggnomad.tour.notFoundTitle', 'No tour found')}\n description={t(\n 'ggnomad.tour.notFoundDescription',\n 'This tour is unavailable or may have been removed.'\n )}\n />\n ) : (\n <>\n <PagePurpose icon={<Compass className=\"size-4\" />}>\n {t(\n 'ggnomad.tour.purpose',\n 'See exactly what this tour involves — duration, difficulty, your guide, price and the highlights you’ll experience — so you can confirm it fits your trip before booking.'\n )}\n </PagePurpose>\n\n <NextSteps\n storageKey=\"ggnomad-tour-detail\"\n steps={[\n {\n id: 'book',\n label: t('ggnomad.tour.next.book', 'Book this tour'),\n description: t(\n 'ggnomad.tour.next.bookDesc',\n 'Add it to your itinerary and track it under Bookings.'\n ),\n icon: <CalendarCheck className=\"size-4\" />,\n onClick: () => navigate(joinPath(basePath, 'bookings')),\n },\n {\n id: 'browse',\n label: t('ggnomad.tour.next.browse', 'Explore more experiences'),\n description: t(\n 'ggnomad.tour.next.browseDesc',\n 'Return to Tourism to compare tours and activities.'\n ),\n icon: <Compass className=\"size-4\" />,\n onClick: () => navigate(joinPath(basePath, 'tourism')),\n },\n ]}\n />\n\n <div className=\"grid gap-4 lg:grid-cols-2\">\n <GlassCard treatment=\"glass\" glow className=\"border-border-seam p-5\">\n <h2 className=\"mb-4 text-lg font-medium tracking-tight text-text-primary\">\n {t('ggnomad.tour.details', 'Details')}\n </h2>\n <dl className=\"space-y-2 text-sm\">\n <DetailRow label={t('ggnomad.tour.duration', 'Duration')} value={tour.duration} />\n <DetailRow\n label={t('ggnomad.tour.difficulty', 'Difficulty')}\n value={tour.difficulty ?? t('ggnomad.tour.na', 'N/A')}\n />\n <DetailRow\n label={t('ggnomad.tour.guide', 'Guide')}\n value={tour.guideName ?? t('ggnomad.tour.na', 'N/A')}\n />\n <DetailRow\n label={t('ggnomad.tour.price', 'Price')}\n value={`${tour.currency} ${Number(tour.price).toFixed(2)}`}\n />\n </dl>\n </GlassCard>\n <SectionCard title={t('ggnomad.tour.highlights', 'Highlights')}>\n <ul className=\"space-y-2 text-sm\">\n {(tour.highlights ?? []).map((highlight) => (\n <li key={highlight} className=\"flex items-start gap-2 text-text-primary\">\n <CheckCircle2\n className=\"mt-0.5 size-4 flex-shrink-0 text-status-success-text\"\n aria-hidden=\"true\"\n />\n {highlight}\n </li>\n ))}\n </ul>\n </SectionCard>\n </div>\n </>\n )}\n </PageShell>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,SAAgB,IAAkB;CAChC,IAAM,EAAE,SAAM,GAAS,EACjB,IAAW,GAAa,EACxB,EAAE,cAAW,QAAQ,GAAY,EACjC,EAAE,QAAK,OAAO,GAAW,EACzB,EAAE,YAAS,EACf,GAcA;EAAE,WAAW,EAAE,OAAI;EAAE,MAAM,CAAC;EAAI,CACjC,EACK,IAAO,GAAM;AAEnB,QACE,kBAAC,GAAD;EACE,OAAO,GAAM,QAAQ,EAAE,8BAA8B,eAAe;EACpE,UAAU,EAAE,yBAAyB,2CAA2C;YAE9E,IAUA,kBAAA,GAAA,EAAA,UAAA;GACE,kBAAC,GAAD;IAAa,MAAM,kBAAC,GAAD,EAAS,WAAU,UAAW,CAAA;cAC9C,EACC,wBACA,4KACD;IACW,CAAA;GAEd,kBAAC,GAAD;IACE,YAAW;IACX,OAAO,CACL;KACE,IAAI;KACJ,OAAO,EAAE,0BAA0B,iBAAiB;KACpD,aAAa,EACX,8BACA,wDACD;KACD,MAAM,kBAAC,GAAD,EAAe,WAAU,UAAW,CAAA;KAC1C,eAAe,EAAS,EAAS,GAAU,WAAW,CAAC;KACxD,EACD;KACE,IAAI;KACJ,OAAO,EAAE,4BAA4B,2BAA2B;KAChE,aAAa,EACX,gCACA,qDACD;KACD,MAAM,kBAAC,GAAD,EAAS,WAAU,UAAW,CAAA;KACpC,eAAe,EAAS,EAAS,GAAU,UAAU,CAAC;KACvD,CACF;IACD,CAAA;GAEF,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD;KAAW,WAAU;KAAQ,MAAA;KAAK,WAAU;eAA5C,CACE,kBAAC,MAAD;MAAI,WAAU;gBACX,EAAE,wBAAwB,UAAU;MAClC,CAAA,EACL,kBAAC,MAAD;MAAI,WAAU;gBAAd;OACE,kBAAC,GAAD;QAAW,OAAO,EAAE,yBAAyB,WAAW;QAAE,OAAO,EAAK;QAAY,CAAA;OAClF,kBAAC,GAAD;QACE,OAAO,EAAE,2BAA2B,aAAa;QACjD,OAAO,EAAK,cAAc,EAAE,mBAAmB,MAAM;QACrD,CAAA;OACF,kBAAC,GAAD;QACE,OAAO,EAAE,sBAAsB,QAAQ;QACvC,OAAO,EAAK,aAAa,EAAE,mBAAmB,MAAM;QACpD,CAAA;OACF,kBAAC,GAAD;QACE,OAAO,EAAE,sBAAsB,QAAQ;QACvC,OAAO,GAAG,EAAK,SAAS,GAAG,OAAO,EAAK,MAAM,CAAC,QAAQ,EAAE;QACxD,CAAA;OACC;QACK;QACZ,kBAAC,GAAD;KAAa,OAAO,EAAE,2BAA2B,aAAa;eAC5D,kBAAC,MAAD;MAAI,WAAU;iBACV,EAAK,cAAc,EAAE,EAAE,KAAK,MAC5B,kBAAC,MAAD;OAAoB,WAAU;iBAA9B,CACE,kBAAC,GAAD;QACE,WAAU;QACV,eAAY;QACZ,CAAA,EACD,EACE;SANI,EAMJ,CACL;MACC,CAAA;KACO,CAAA,CACV;;GACL,EAAA,CAAA,GA9EH,kBAAC,GAAD;GACE,cAAa;GACb,OAAO,EAAE,8BAA8B,gBAAgB;GACvD,aAAa,EACX,oCACA,qDACD;GACD,CAAA;EAyEM,CAAA"}
|
|
@@ -2,75 +2,83 @@ import { GGNOMAD_ACTIVITIES_QUERY as e, GGNOMAD_TOURS_QUERY as t } from "../grap
|
|
|
2
2
|
import { PageShell as n } from "./PageShell.js";
|
|
3
3
|
import { SectionCard as r } from "../components/SectionCard.js";
|
|
4
4
|
import { EntityCard as i } from "../components/EntityCard.js";
|
|
5
|
+
import { LoadMoreButton as a } from "../components/LoadMoreButton.js";
|
|
5
6
|
import "../components/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { useState as o } from "react";
|
|
8
|
+
import { Compass as s } from "lucide-react";
|
|
9
|
+
import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { useQuery as l } from "@apollo/client/react";
|
|
11
|
+
import { EmphasisPanel as u, IllustratedEmptyState as d, PagePurpose as f } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
13
|
//#region src/ggnomad/pages/TourismPage.tsx
|
|
12
|
-
function
|
|
13
|
-
let { t:
|
|
14
|
-
first:
|
|
14
|
+
function h() {
|
|
15
|
+
let { t: h } = c(), [g, _] = o(12), [v, y] = o(12), { data: b } = l(t, { variables: {
|
|
16
|
+
first: g,
|
|
15
17
|
skip: 0
|
|
16
|
-
} }), { data:
|
|
17
|
-
first:
|
|
18
|
+
} }), { data: x } = l(e, { variables: {
|
|
19
|
+
first: v,
|
|
18
20
|
skip: 0
|
|
19
|
-
} }),
|
|
21
|
+
} }), S = b?.ggnomadTours ?? [], C = x?.ggnomadActivities ?? [], w = (e, t, n) => e.length === 0 ? /* @__PURE__ */ p(d, {
|
|
20
22
|
illustration: "empty-data",
|
|
21
23
|
title: n,
|
|
22
|
-
description:
|
|
23
|
-
}) : /* @__PURE__ */
|
|
24
|
+
description: h("ggnomad.tourism.emptyDescription", "Curated experiences will appear here once published.")
|
|
25
|
+
}) : /* @__PURE__ */ p("div", {
|
|
24
26
|
className: "grid gap-3",
|
|
25
|
-
children: e.map((e) => /* @__PURE__ */
|
|
27
|
+
children: e.map((e) => /* @__PURE__ */ p(i, {
|
|
26
28
|
to: `${t}/${e.id}`,
|
|
27
29
|
title: e.name,
|
|
28
30
|
meta: e.duration,
|
|
29
31
|
price: `${e.currency} ${Number(e.price).toFixed(2)}`
|
|
30
32
|
}, e.id))
|
|
31
33
|
});
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
title:
|
|
34
|
-
titleAccent:
|
|
35
|
-
subtitle:
|
|
34
|
+
return /* @__PURE__ */ m(n, {
|
|
35
|
+
title: h("ggnomad.tourism.title", "Tourism"),
|
|
36
|
+
titleAccent: h("ggnomad.tourism.title.accent", "Tourism"),
|
|
37
|
+
subtitle: h("ggnomad.tourism.subtitle", "Tours and curated activity experiences"),
|
|
36
38
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
icon: /* @__PURE__ */
|
|
39
|
-
children:
|
|
39
|
+
/* @__PURE__ */ p(f, {
|
|
40
|
+
icon: /* @__PURE__ */ p(s, { className: "size-4" }),
|
|
41
|
+
children: h("ggnomad.tourism.purpose", "Plan what you’ll actually do at a destination — guided tours and bookable activities curated by local operators. Open any experience to review duration, price and what’s included, then add it to a booking.")
|
|
40
42
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ m(u, { children: [/* @__PURE__ */ m("div", {
|
|
42
44
|
className: "grid gap-4 sm:grid-cols-2",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
45
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
44
46
|
className: "text-sm text-text-secondary",
|
|
45
|
-
children:
|
|
46
|
-
}), /* @__PURE__ */
|
|
47
|
+
children: h("ggnomad.tourism.tours", "Tours")
|
|
48
|
+
}), /* @__PURE__ */ p("p", {
|
|
47
49
|
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
48
|
-
children:
|
|
49
|
-
})] }), /* @__PURE__ */
|
|
50
|
+
children: S.length
|
|
51
|
+
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
50
52
|
className: "text-sm text-text-secondary",
|
|
51
|
-
children:
|
|
52
|
-
}), /* @__PURE__ */
|
|
53
|
+
children: h("ggnomad.tourism.activities", "Activities")
|
|
54
|
+
}), /* @__PURE__ */ p("p", {
|
|
53
55
|
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
54
|
-
children:
|
|
56
|
+
children: C.length
|
|
55
57
|
})] })]
|
|
56
|
-
}), /* @__PURE__ */
|
|
58
|
+
}), /* @__PURE__ */ p("p", {
|
|
57
59
|
className: "mt-4 text-sm text-text-secondary",
|
|
58
|
-
children:
|
|
60
|
+
children: h("ggnomad.tourism.emphasisNote", "Curated, bookable experiences across your destinations — pick a tour or activity below to see full details.")
|
|
59
61
|
})] }),
|
|
60
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ m("div", {
|
|
61
63
|
className: "grid gap-6 lg:grid-cols-2",
|
|
62
|
-
children: [/* @__PURE__ */
|
|
63
|
-
title:
|
|
64
|
-
children:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
children: [/* @__PURE__ */ m(r, {
|
|
65
|
+
title: h("ggnomad.tourism.tours", "Tours"),
|
|
66
|
+
children: [w(S, "tours", h("ggnomad.tourism.toursEmpty", "No tours yet")), /* @__PURE__ */ p(a, {
|
|
67
|
+
visible: S.length >= g,
|
|
68
|
+
onLoadMore: () => _((e) => e + 12)
|
|
69
|
+
})]
|
|
70
|
+
}), /* @__PURE__ */ m(r, {
|
|
71
|
+
title: h("ggnomad.tourism.activities", "Activities"),
|
|
72
|
+
children: [w(C, "activities", h("ggnomad.tourism.activitiesEmpty", "No activities yet")), /* @__PURE__ */ p(a, {
|
|
73
|
+
visible: C.length >= v,
|
|
74
|
+
onLoadMore: () => y((e) => e + 12)
|
|
75
|
+
})]
|
|
68
76
|
})]
|
|
69
77
|
})
|
|
70
78
|
]
|
|
71
79
|
});
|
|
72
80
|
}
|
|
73
81
|
//#endregion
|
|
74
|
-
export {
|
|
82
|
+
export { h as TourismPage };
|
|
75
83
|
|
|
76
84
|
//# sourceMappingURL=TourismPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TourismPage.js","names":[],"sources":["../../../src/ggnomad/pages/TourismPage.tsx"],"sourcesContent":["import { useQuery } from '@apollo/client/react';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { Compass } from 'lucide-react';\nimport { EmphasisPanel, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\n\nimport { GGNOMAD_ACTIVITIES_QUERY, GGNOMAD_TOURS_QUERY } from '../graphql';\nimport { PageShell } from './PageShell';\nimport { EntityCard, SectionCard } from '../components';\n\ntype TourismItem = {\n id: string;\n name: string;\n duration: string;\n price: number;\n currency: string;\n};\n\nexport function TourismPage() {\n const { t } = useI18n();\n const { data: toursData } = useQuery(\n GGNOMAD_TOURS_QUERY as TypedDocumentNode<\n { ggnomadTours: TourismItem[] },\n { first: number; skip: number }\n >,\n {\n variables: { first:
|
|
1
|
+
{"version":3,"file":"TourismPage.js","names":[],"sources":["../../../src/ggnomad/pages/TourismPage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useQuery } from '@apollo/client/react';\nimport type { TypedDocumentNode } from '@apollo/client';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { Compass } from 'lucide-react';\nimport { EmphasisPanel, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\n\nimport { GGNOMAD_ACTIVITIES_QUERY, GGNOMAD_TOURS_QUERY } from '../graphql';\nimport { PageShell } from './PageShell';\nimport { EntityCard, SectionCard, LoadMoreButton } from '../components';\n\ntype TourismItem = {\n id: string;\n name: string;\n duration: string;\n price: number;\n currency: string;\n};\n\nexport function TourismPage() {\n const { t } = useI18n();\n const [tourLimit, setTourLimit] = useState(12);\n const [activityLimit, setActivityLimit] = useState(12);\n const { data: toursData } = useQuery(\n GGNOMAD_TOURS_QUERY as TypedDocumentNode<\n { ggnomadTours: TourismItem[] },\n { first: number; skip: number }\n >,\n {\n variables: { first: tourLimit, skip: 0 },\n }\n );\n const { data: activitiesData } = useQuery(\n GGNOMAD_ACTIVITIES_QUERY as TypedDocumentNode<\n { ggnomadActivities: TourismItem[] },\n { first: number; skip: number }\n >,\n { variables: { first: activityLimit, skip: 0 } }\n );\n const tours = toursData?.ggnomadTours ?? [];\n const activities = activitiesData?.ggnomadActivities ?? [];\n\n const renderList = (items: TourismItem[], basePath: string, emptyLabel: string) => {\n if (items.length === 0) {\n return (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={emptyLabel}\n description={t(\n 'ggnomad.tourism.emptyDescription',\n 'Curated experiences will appear here once published.'\n )}\n />\n );\n }\n return (\n <div className=\"grid gap-3\">\n {items.map((item) => (\n <EntityCard\n key={item.id}\n to={`${basePath}/${item.id}`}\n title={item.name}\n meta={item.duration}\n price={`${item.currency} ${Number(item.price).toFixed(2)}`}\n />\n ))}\n </div>\n );\n };\n\n return (\n <PageShell\n title={t('ggnomad.tourism.title', 'Tourism')}\n titleAccent={t('ggnomad.tourism.title.accent', 'Tourism')}\n subtitle={t('ggnomad.tourism.subtitle', 'Tours and curated activity experiences')}\n >\n <PagePurpose icon={<Compass className=\"size-4\" />}>\n {t(\n 'ggnomad.tourism.purpose',\n 'Plan what you’ll actually do at a destination — guided tours and bookable activities curated by local operators. Open any experience to review duration, price and what’s included, then add it to a booking.'\n )}\n </PagePurpose>\n\n <EmphasisPanel>\n <div className=\"grid gap-4 sm:grid-cols-2\">\n <div>\n <p className=\"text-sm text-text-secondary\">{t('ggnomad.tourism.tours', 'Tours')}</p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums text-text-primary\">\n {tours.length}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">\n {t('ggnomad.tourism.activities', 'Activities')}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums text-text-primary\">\n {activities.length}\n </p>\n </div>\n </div>\n <p className=\"mt-4 text-sm text-text-secondary\">\n {t(\n 'ggnomad.tourism.emphasisNote',\n 'Curated, bookable experiences across your destinations — pick a tour or activity below to see full details.'\n )}\n </p>\n </EmphasisPanel>\n\n <div className=\"grid gap-6 lg:grid-cols-2\">\n <SectionCard title={t('ggnomad.tourism.tours', 'Tours')}>\n {renderList(tours, 'tours', t('ggnomad.tourism.toursEmpty', 'No tours yet'))}\n <LoadMoreButton visible={tours.length >= tourLimit} onLoadMore={() => setTourLimit((l) => l + 12)} />\n </SectionCard>\n <SectionCard title={t('ggnomad.tourism.activities', 'Activities')}>\n {renderList(\n activities,\n 'activities',\n t('ggnomad.tourism.activitiesEmpty', 'No activities yet')\n )}\n <LoadMoreButton\n visible={activities.length >= activityLimit}\n onLoadMore={() => setActivityLimit((l) => l + 12)}\n />\n </SectionCard>\n </div>\n </PageShell>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAmBA,SAAgB,IAAc;CAC5B,IAAM,EAAE,SAAM,GAAS,EACjB,CAAC,GAAW,KAAgB,EAAS,GAAG,EACxC,CAAC,GAAe,KAAoB,EAAS,GAAG,EAChD,EAAE,MAAM,MAAc,EAC1B,GAIA,EACE,WAAW;EAAE,OAAO;EAAW,MAAM;EAAG,EACzC,CACF,EACK,EAAE,MAAM,MAAmB,EAC/B,GAIA,EAAE,WAAW;EAAE,OAAO;EAAe,MAAM;EAAG,EAAE,CACjD,EACK,IAAQ,GAAW,gBAAgB,EAAE,EACrC,IAAa,GAAgB,qBAAqB,EAAE,EAEpD,KAAc,GAAsB,GAAkB,MACtD,EAAM,WAAW,IAEjB,kBAAC,GAAD;EACE,cAAa;EACb,OAAO;EACP,aAAa,EACX,oCACA,uDACD;EACD,CAAA,GAIJ,kBAAC,OAAD;EAAK,WAAU;YACZ,EAAM,KAAK,MACV,kBAAC,GAAD;GAEE,IAAI,GAAG,EAAS,GAAG,EAAK;GACxB,OAAO,EAAK;GACZ,MAAM,EAAK;GACX,OAAO,GAAG,EAAK,SAAS,GAAG,OAAO,EAAK,MAAM,CAAC,QAAQ,EAAE;GACxD,EALK,EAAK,GAKV,CACF;EACE,CAAA;AAIV,QACE,kBAAC,GAAD;EACE,OAAO,EAAE,yBAAyB,UAAU;EAC5C,aAAa,EAAE,gCAAgC,UAAU;EACzD,UAAU,EAAE,4BAA4B,yCAAyC;YAHnF;GAKE,kBAAC,GAAD;IAAa,MAAM,kBAAC,GAAD,EAAS,WAAU,UAAW,CAAA;cAC9C,EACC,2BACA,gNACD;IACW,CAAA;GAEd,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;KAAG,WAAU;eAA+B,EAAE,yBAAyB,QAAQ;KAAK,CAAA,EACpF,kBAAC,KAAD;KAAG,WAAU;eACV,EAAM;KACL,CAAA,CACA,EAAA,CAAA,EACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;KAAG,WAAU;eACV,EAAE,8BAA8B,aAAa;KAC5C,CAAA,EACJ,kBAAC,KAAD;KAAG,WAAU;eACV,EAAW;KACV,CAAA,CACA,EAAA,CAAA,CACF;OACN,kBAAC,KAAD;IAAG,WAAU;cACV,EACC,gCACA,8GACD;IACC,CAAA,CACU,EAAA,CAAA;GAEhB,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD;KAAa,OAAO,EAAE,yBAAyB,QAAQ;eAAvD,CACG,EAAW,GAAO,SAAS,EAAE,8BAA8B,eAAe,CAAC,EAC5E,kBAAC,GAAD;MAAgB,SAAS,EAAM,UAAU;MAAW,kBAAkB,GAAc,MAAM,IAAI,GAAG;MAAI,CAAA,CACzF;QACd,kBAAC,GAAD;KAAa,OAAO,EAAE,8BAA8B,aAAa;eAAjE,CACG,EACC,GACA,cACA,EAAE,mCAAmC,oBAAoB,CAC1D,EACD,kBAAC,GAAD;MACE,SAAS,EAAW,UAAU;MAC9B,kBAAkB,GAAkB,MAAM,IAAI,GAAG;MACjD,CAAA,CACU;OACV;;GACI"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { toast as e } from "sonner";
|
|
2
|
+
//#region src/ggnomad/utils/notify.ts
|
|
3
|
+
var t = {
|
|
4
|
+
success(t, n) {
|
|
5
|
+
e.success(t, {
|
|
6
|
+
description: n,
|
|
7
|
+
duration: 4e3
|
|
8
|
+
});
|
|
9
|
+
},
|
|
10
|
+
info(t, n) {
|
|
11
|
+
e.info(t, {
|
|
12
|
+
description: n,
|
|
13
|
+
duration: 4e3
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
warning(t, n) {
|
|
17
|
+
e.warning(t, {
|
|
18
|
+
description: n,
|
|
19
|
+
duration: 8e3
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
error(t, n) {
|
|
23
|
+
e.error(t, {
|
|
24
|
+
description: n,
|
|
25
|
+
duration: Infinity,
|
|
26
|
+
closeButton: !0
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
dismiss(t) {
|
|
30
|
+
e.dismiss(t);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { t as notify };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=notify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.js","names":[],"sources":["../../../src/ggnomad/utils/notify.ts"],"sourcesContent":["import { toast } from 'sonner';\n\n/**\n * Module-wide toast API. sonner is a global singleton; the matching <Toaster>\n * is owned by the HOST — the production app shell mounts a single one via\n * AppShellProvider, and the standalone dev harness mounts its own (see\n * GGNomadRoot's `renderToaster`). Every page/component must emit feedback\n * through these helpers instead of hand-rolling fixed-position toast markup.\n *\n * Durations follow the notification spec: success/info auto-dismiss, errors\n * stay until the user dismisses them (sonner renders a close button and\n * announces via aria-live).\n */\nexport const notify = {\n success(message: string, description?: string): void {\n toast.success(message, { description, duration: 4000 });\n },\n info(message: string, description?: string): void {\n toast.info(message, { description, duration: 4000 });\n },\n warning(message: string, description?: string): void {\n toast.warning(message, { description, duration: 8000 });\n },\n error(message: string, description?: string): void {\n toast.error(message, { description, duration: Infinity, closeButton: true });\n },\n dismiss(id?: string | number): void {\n toast.dismiss(id);\n },\n};\n\nexport { toast };\n"],"mappings":";;AAaA,IAAa,IAAS;CACpB,QAAQ,GAAiB,GAA4B;AACnD,IAAM,QAAQ,GAAS;GAAE;GAAa,UAAU;GAAM,CAAC;;CAEzD,KAAK,GAAiB,GAA4B;AAChD,IAAM,KAAK,GAAS;GAAE;GAAa,UAAU;GAAM,CAAC;;CAEtD,QAAQ,GAAiB,GAA4B;AACnD,IAAM,QAAQ,GAAS;GAAE;GAAa,UAAU;GAAM,CAAC;;CAEzD,MAAM,GAAiB,GAA4B;AACjD,IAAM,MAAM,GAAS;GAAE;GAAa,UAAU;GAAU,aAAa;GAAM,CAAC;;CAE9E,QAAQ,GAA4B;AAClC,IAAM,QAAQ,EAAG;;CAEpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-ggnomad",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.705.1",
|
|
4
4
|
"description": "Burdenoff GGNomad Microfrontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
"react-dom": "^19.0.0",
|
|
78
78
|
"react-router-dom": "^7.1.3",
|
|
79
79
|
"recharts": "^2.15.0",
|
|
80
|
+
"sonner": "^2.0.7",
|
|
80
81
|
"tailwind-merge": "^3.4.0",
|
|
81
82
|
"zustand": "^5.0.3"
|
|
82
83
|
},
|