@carlonicora/nextjs-jsonapi 6.20.4 → 6.20.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/{BlockNoteEditor-ISF5MDPH.mjs → BlockNoteEditor-H5QBL25M.mjs} +4 -4
- package/dist/{BlockNoteEditor-IXWMZTJS.js → BlockNoteEditor-IRMQQGPS.js} +18 -18
- package/dist/{BlockNoteEditor-IXWMZTJS.js.map → BlockNoteEditor-IRMQQGPS.js.map} +1 -1
- package/dist/{BlockNoteViewer-G3L46SGQ.mjs → BlockNoteViewer-2UDFTXRS.mjs} +2 -2
- package/dist/{BlockNoteViewer-ZFJ3DZXN.js → BlockNoteViewer-4OHBRE4Q.js} +3 -3
- package/dist/{BlockNoteViewer-ZFJ3DZXN.js.map → BlockNoteViewer-4OHBRE4Q.js.map} +1 -1
- package/dist/billing/index.js +467 -467
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-WU3UXTDS.mjs → chunk-4RA5PRXX.mjs} +2 -2
- package/dist/{chunk-SFDOUTEV.js → chunk-54K2CZ2F.js} +4 -4
- package/dist/{chunk-SFDOUTEV.js.map → chunk-54K2CZ2F.js.map} +1 -1
- package/dist/{chunk-2CR7HWVS.js → chunk-BD6ARGGI.js} +3 -3
- package/dist/{chunk-2CR7HWVS.js.map → chunk-BD6ARGGI.js.map} +1 -1
- package/dist/{chunk-4GB35M62.mjs → chunk-DPXOPLQP.mjs} +5 -2
- package/dist/{chunk-4GB35M62.mjs.map → chunk-DPXOPLQP.mjs.map} +1 -1
- package/dist/{chunk-O5MTDTZC.js → chunk-EGTC75OW.js} +730 -730
- package/dist/{chunk-O5MTDTZC.js.map → chunk-EGTC75OW.js.map} +1 -1
- package/dist/{chunk-QSNZ6HPY.mjs → chunk-G2UIQSNJ.mjs} +2 -2
- package/dist/{chunk-4OJFFFUQ.mjs → chunk-RF2PR5G3.mjs} +5 -5
- package/dist/{chunk-CMNJENSJ.js → chunk-ZB6OYIMB.js} +5 -2
- package/dist/chunk-ZB6OYIMB.js.map +1 -0
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.js +4 -4
- package/dist/components/index.mjs +3 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/email-automations/index.js +107 -107
- package/dist/email-automations/index.mjs +3 -3
- package/dist/features/analytics/index.d.mts +1 -1
- package/dist/features/analytics/index.d.ts +1 -1
- package/dist/features/analytics/index.js +116 -116
- package/dist/features/analytics/index.js.map +1 -1
- package/dist/features/analytics/index.mjs +3 -3
- package/dist/features/analytics/index.mjs.map +1 -1
- package/dist/features/analytics/server.js +4 -4
- package/dist/features/analytics/server.mjs +2 -2
- package/dist/features/blog/index.js +129 -129
- package/dist/features/blog/index.mjs +3 -3
- package/dist/features/blog/server.js +7 -7
- package/dist/features/blog/server.mjs +1 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +114 -114
- package/dist/features/tokenusage/index.mjs +3 -3
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/package.json +1 -1
- package/src/features/analytics/analytics.modules.ts +4 -1
- package/src/features/analytics/data/__tests__/AnalyticsService.spec.ts +1 -1
- package/src/features/analytics/data/analytics-event.ts +1 -1
- package/src/features/analytics/data/analytics.types.ts +1 -1
- package/dist/chunk-CMNJENSJ.js.map +0 -1
- /package/dist/{BlockNoteEditor-ISF5MDPH.mjs.map → BlockNoteEditor-H5QBL25M.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-G3L46SGQ.mjs.map → BlockNoteViewer-2UDFTXRS.mjs.map} +0 -0
- /package/dist/{chunk-WU3UXTDS.mjs.map → chunk-4RA5PRXX.mjs.map} +0 -0
- /package/dist/{chunk-QSNZ6HPY.mjs.map → chunk-G2UIQSNJ.mjs.map} +0 -0
- /package/dist/{chunk-4OJFFFUQ.mjs.map → chunk-RF2PR5G3.mjs.map} +0 -0
|
@@ -37,9 +37,9 @@ import {
|
|
|
37
37
|
registerTableGenerator,
|
|
38
38
|
useDataListRetriever,
|
|
39
39
|
usePageUrlGenerator
|
|
40
|
-
} from "../../chunk-
|
|
40
|
+
} from "../../chunk-RF2PR5G3.mjs";
|
|
41
41
|
import "../../chunk-VOXD3ZLY.mjs";
|
|
42
|
-
import "../../chunk-
|
|
42
|
+
import "../../chunk-G2UIQSNJ.mjs";
|
|
43
43
|
import "../../chunk-PW42LRSL.mjs";
|
|
44
44
|
import {
|
|
45
45
|
BLOG_ACTION,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
cn,
|
|
62
62
|
isRemoteImageSrc,
|
|
63
63
|
showToast
|
|
64
|
-
} from "../../chunk-
|
|
64
|
+
} from "../../chunk-DPXOPLQP.mjs";
|
|
65
65
|
import "../../chunk-OY65RYD3.mjs";
|
|
66
66
|
import {
|
|
67
67
|
Modules,
|
|
@@ -7,7 +7,7 @@ require('../../chunk-YUO55Q5A.js');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkZB6OYIMBjs = require('../../chunk-ZB6OYIMB.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -54,7 +54,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, toPublicBlogCategory, "toPublicBlogCategory
|
|
|
54
54
|
|
|
55
55
|
// src/features/blog/server/fetchers.ts
|
|
56
56
|
var BLOG_PAGE_SIZE = 12;
|
|
57
|
-
var publicPostsEndpoint = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => `${
|
|
57
|
+
var publicPostsEndpoint = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => `${_chunkZB6OYIMBjs.BLOG_PUBLIC_PREFIX}/${_chunkYWLSIIE6js.Modules.BlogPost.name}`, "publicPostsEndpoint");
|
|
58
58
|
var asArray = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => Array.isArray(data) ? data : data ? [data] : [], "asArray");
|
|
59
59
|
async function fetchPublicBlogPosts(params) {
|
|
60
60
|
if (params.all) return { posts: await fetchEveryPublicBlogPost(params), hasMore: false };
|
|
@@ -121,7 +121,7 @@ async function fetchRelatedBlogPosts(params) {
|
|
|
121
121
|
const endpoint = new (0, _chunkYWLSIIE6js.EndpointCreator)({
|
|
122
122
|
endpoint: publicPostsEndpoint(),
|
|
123
123
|
id: encodeURIComponent(params.slug),
|
|
124
|
-
childEndpoint:
|
|
124
|
+
childEndpoint: _chunkZB6OYIMBjs.BLOG_ACTION.related
|
|
125
125
|
});
|
|
126
126
|
endpoint.addAdditionalParam("language", params.language);
|
|
127
127
|
const res = await _chunkOQQ7CZWTjs.ServerJsonApiGet.call(void 0, {
|
|
@@ -134,7 +134,7 @@ async function fetchRelatedBlogPosts(params) {
|
|
|
134
134
|
}
|
|
135
135
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchRelatedBlogPosts, "fetchRelatedBlogPosts");
|
|
136
136
|
async function fetchPublicBlogCategories(params) {
|
|
137
|
-
const endpoint = new (0, _chunkYWLSIIE6js.EndpointCreator)({ endpoint: `${
|
|
137
|
+
const endpoint = new (0, _chunkYWLSIIE6js.EndpointCreator)({ endpoint: `${_chunkZB6OYIMBjs.BLOG_PUBLIC_PREFIX}/${_chunkYWLSIIE6js.Modules.BlogCategory.name}` });
|
|
138
138
|
endpoint.addAdditionalParam("language", params.language);
|
|
139
139
|
const res = await _chunkOQQ7CZWTjs.ServerJsonApiGet.call(void 0, {
|
|
140
140
|
classKey: { ..._chunkYWLSIIE6js.Modules.BlogCategory, cache: "minutes" },
|
|
@@ -149,12 +149,12 @@ async function fetchBlogSettings() {
|
|
|
149
149
|
const fallback = { listLayout: "featured" };
|
|
150
150
|
const res = await _chunkOQQ7CZWTjs.ServerJsonApiGet.call(void 0, {
|
|
151
151
|
classKey: { ..._chunkYWLSIIE6js.Modules.BlogSettings, cache: "minutes" },
|
|
152
|
-
endpoint: new (0, _chunkYWLSIIE6js.EndpointCreator)({ endpoint: `${
|
|
152
|
+
endpoint: new (0, _chunkYWLSIIE6js.EndpointCreator)({ endpoint: `${_chunkZB6OYIMBjs.BLOG_PUBLIC_PREFIX}/${_chunkYWLSIIE6js.Modules.BlogSettings.name}` }).generate(),
|
|
153
153
|
language: "en"
|
|
154
154
|
});
|
|
155
155
|
if (!res.ok) return fallback;
|
|
156
156
|
const settings = asArray(res.data)[0];
|
|
157
|
-
if (!settings || !
|
|
157
|
+
if (!settings || !_chunkZB6OYIMBjs.BLOG_LIST_LAYOUTS.includes(settings.listLayout)) return fallback;
|
|
158
158
|
return { listLayout: settings.listLayout };
|
|
159
159
|
}
|
|
160
160
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchBlogSettings, "fetchBlogSettings");
|
|
@@ -167,5 +167,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, fetchBlogSettings, "fetchBlogSettings");
|
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
|
|
170
|
-
exports.BLOG_LIST_LAYOUTS =
|
|
170
|
+
exports.BLOG_LIST_LAYOUTS = _chunkZB6OYIMBjs.BLOG_LIST_LAYOUTS; exports.fetchBlogSettings = fetchBlogSettings; exports.fetchPublicBlogCategories = fetchPublicBlogCategories; exports.fetchPublicBlogPost = fetchPublicBlogPost; exports.fetchPublicBlogPosts = fetchPublicBlogPosts; exports.fetchRelatedBlogPosts = fetchRelatedBlogPosts; exports.toPublicBlogCategory = toPublicBlogCategory; exports.toPublicBlogPost = toPublicBlogPost;
|
|
171
171
|
//# sourceMappingURL=server.js.map
|
|
@@ -23,15 +23,15 @@ var _chunkYBZVWLPHjs = require('../../chunk-YBZVWLPH.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkEGTC75OWjs = require('../../chunk-EGTC75OW.js');
|
|
27
27
|
require('../../chunk-3EPNHTMH.js');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkBD6ARGGIjs = require('../../chunk-BD6ARGGI.js');
|
|
31
31
|
require('../../chunk-G4JR3SFV.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _chunkZB6OYIMBjs = require('../../chunk-ZB6OYIMB.js');
|
|
35
35
|
require('../../chunk-DGN3PR2F.js');
|
|
36
36
|
require('../../chunk-YWLSIIE6.js');
|
|
37
37
|
require('../../chunk-KV4N7DEG.js');
|
|
@@ -48,7 +48,7 @@ var _react = require('react');
|
|
|
48
48
|
var _jsxruntime = require('react/jsx-runtime');
|
|
49
49
|
var HelpContext = _react.createContext.call(void 0, null);
|
|
50
50
|
function HelpProvider({ children }) {
|
|
51
|
-
const cfg =
|
|
51
|
+
const cfg = _chunkBD6ARGGIjs._getStaticHelpContent.call(void 0, );
|
|
52
52
|
if (!cfg) {
|
|
53
53
|
throw new Error(
|
|
54
54
|
"Help content not configured \u2014 call configureJsonApi({ helpContent: {...} }) before importing help components."
|
|
@@ -80,29 +80,29 @@ var _lucidereact = require('lucide-react');
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
function HelpAssistantSheet({ open, onOpenChange }) {
|
|
83
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
84
|
-
|
|
83
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Sheet, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
84
|
+
_chunkEGTC75OWjs.SheetContent,
|
|
85
85
|
{
|
|
86
86
|
side: "end",
|
|
87
87
|
className: "flex w-full flex-col data-[side=right]:sm:max-w-2xl data-[side=right]:lg:max-w-3xl data-[side=left]:sm:max-w-2xl data-[side=left]:lg:max-w-3xl",
|
|
88
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
88
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AssistantProvider, { manageUrl: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAssistantSheetBody, {}) })
|
|
89
89
|
}
|
|
90
90
|
) });
|
|
91
91
|
}
|
|
92
92
|
_chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheet, "HelpAssistantSheet");
|
|
93
93
|
function HelpAssistantSheetBody() {
|
|
94
94
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
95
|
-
const ctx =
|
|
95
|
+
const ctx = _chunkEGTC75OWjs.useAssistantContext.call(void 0, );
|
|
96
96
|
const showThread = !!ctx.assistant || ctx.sending || ctx.messages.length > 0;
|
|
97
97
|
const send = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (content) => ctx.sendMessage(content, { howToMode: true }), "send");
|
|
98
98
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
99
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
100
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
101
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
99
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.SheetHeader, { children: [
|
|
100
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SheetTitle, { children: t("help.askAi.sheet.title") }),
|
|
101
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SheetDescription, { children: t("help.askAi.sheet.subtitle") })
|
|
102
102
|
] }),
|
|
103
|
-
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
103
|
+
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AssistantEmptyState, { onSend: send }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
104
104
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
105
|
-
|
|
105
|
+
_chunkEGTC75OWjs.AssistantThread,
|
|
106
106
|
{
|
|
107
107
|
messages: ctx.messages,
|
|
108
108
|
sending: ctx.sending,
|
|
@@ -112,7 +112,7 @@ function HelpAssistantSheetBody() {
|
|
|
112
112
|
onRetry: ctx.retrySend
|
|
113
113
|
}
|
|
114
114
|
),
|
|
115
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
115
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AssistantComposer, { onSend: send, disabled: ctx.sending })
|
|
116
116
|
] })
|
|
117
117
|
] });
|
|
118
118
|
}
|
|
@@ -122,20 +122,20 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheetBody, "HelpAssistantSheet
|
|
|
122
122
|
|
|
123
123
|
function HelpAskAi() {
|
|
124
124
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
125
|
-
const { currentUser } =
|
|
125
|
+
const { currentUser } = _chunkEGTC75OWjs.useCurrentUserContext.call(void 0, );
|
|
126
126
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
127
127
|
const disabled = !currentUser;
|
|
128
128
|
if (disabled) {
|
|
129
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
130
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
129
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Tooltip, { children: [
|
|
130
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", size: "sm", disabled: true }), children: [
|
|
131
131
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
132
132
|
t("help.askAi.button")
|
|
133
133
|
] }),
|
|
134
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
134
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TooltipContent, { children: t("help.askAi.loginTooltip") })
|
|
135
135
|
] });
|
|
136
136
|
}
|
|
137
137
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
138
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
138
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
|
|
139
139
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
140
140
|
t("help.askAi.button")
|
|
141
141
|
] }),
|
|
@@ -148,7 +148,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAskAi, "HelpAskAi");
|
|
|
148
148
|
|
|
149
149
|
function HelpHeader() {
|
|
150
150
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
151
|
-
const { currentUser } =
|
|
151
|
+
const { currentUser } = _chunkEGTC75OWjs.useCurrentUserContext.call(void 0, );
|
|
152
152
|
const { brand } = useHelp();
|
|
153
153
|
const logo = _optionalChain([brand, 'optionalAccess', _ => _.logo]);
|
|
154
154
|
const label = _nullishCoalesce(_optionalChain([brand, 'optionalAccess', _2 => _2.label]), () => ( t("help.title")));
|
|
@@ -164,7 +164,7 @@ function HelpHeader() {
|
|
|
164
164
|
] }),
|
|
165
165
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 max-md:shrink-0", children: [
|
|
166
166
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAskAi, {}),
|
|
167
|
-
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className:
|
|
167
|
+
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className: _chunkEGTC75OWjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.openApp") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/login", className: _chunkEGTC75OWjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.login") })
|
|
168
168
|
] })
|
|
169
169
|
] });
|
|
170
170
|
}
|
|
@@ -206,12 +206,12 @@ _chunk7QVYU63Ejs.__name.call(void 0, useHelpFilter, "useHelpFilter");
|
|
|
206
206
|
|
|
207
207
|
function HelpSideNav() {
|
|
208
208
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
209
|
-
const generateUrl =
|
|
209
|
+
const generateUrl = _chunkEGTC75OWjs.usePageUrlGenerator.call(void 0, );
|
|
210
210
|
const pathname = _navigation.usePathname.call(void 0, );
|
|
211
211
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
212
212
|
_react.useEffect.call(void 0, () => {
|
|
213
213
|
let active = true;
|
|
214
|
-
|
|
214
|
+
_chunkZB6OYIMBjs.HowToService.findPublished().then((list) => active && setArticles(list)).catch(() => active && setArticles([]));
|
|
215
215
|
return () => {
|
|
216
216
|
active = false;
|
|
217
217
|
};
|
|
@@ -287,7 +287,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpSideNav, "HelpSideNav");
|
|
|
287
287
|
function HelpArticleBody(props) {
|
|
288
288
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
289
289
|
const format = _nextintl.useFormatter.call(void 0, );
|
|
290
|
-
const generateUrl =
|
|
290
|
+
const generateUrl = _chunkEGTC75OWjs.usePageUrlGenerator.call(void 0, );
|
|
291
291
|
const { howToType, title, summary, updatedAt, prev, next, children } = props;
|
|
292
292
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "article", { className: "prose dark:prose-invert max-w-none", children: [
|
|
293
293
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { className: "text-muted-foreground mb-2 text-xs", children: [
|
|
@@ -344,7 +344,7 @@ function HelpTOC({ headings }) {
|
|
|
344
344
|
}, [headings]);
|
|
345
345
|
if (headings.length === 0) return null;
|
|
346
346
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { "aria-label": t("help.toc.title"), className: "hidden lg:block", children: [
|
|
347
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
347
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.MicroLabel, { className: "mb-2", children: t("help.toc.title") }),
|
|
348
348
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "space-y-1 text-sm", children: headings.map((h) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { style: { paddingInlineStart: `${(h.depth - 2) * 0.75}rem` }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
349
349
|
"a",
|
|
350
350
|
{
|
|
@@ -365,13 +365,13 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpTOC, "HelpTOC");
|
|
|
365
365
|
|
|
366
366
|
function HelpHint({ contextKey }) {
|
|
367
367
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
368
|
-
const generateUrl =
|
|
368
|
+
const generateUrl = _chunkEGTC75OWjs.usePageUrlGenerator.call(void 0, );
|
|
369
369
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
370
370
|
const [picked, setPicked] = _react.useState.call(void 0, null);
|
|
371
371
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
372
372
|
_react.useEffect.call(void 0, () => {
|
|
373
373
|
let active2 = true;
|
|
374
|
-
|
|
374
|
+
_chunkZB6OYIMBjs.HowToService.findPublished().then((list) => active2 && setArticles(list)).catch(() => active2 && setArticles([]));
|
|
375
375
|
return () => {
|
|
376
376
|
active2 = false;
|
|
377
377
|
};
|
|
@@ -383,7 +383,7 @@ function HelpHint({ contextKey }) {
|
|
|
383
383
|
if (matches.length === 0) return null;
|
|
384
384
|
const active = _nullishCoalesce(picked, () => ( (matches.length === 1 ? matches[0] : null)));
|
|
385
385
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
386
|
-
|
|
386
|
+
_chunkEGTC75OWjs.Sheet,
|
|
387
387
|
{
|
|
388
388
|
open,
|
|
389
389
|
onOpenChange: (o) => {
|
|
@@ -391,11 +391,11 @@ function HelpHint({ contextKey }) {
|
|
|
391
391
|
if (!o) setPicked(null);
|
|
392
392
|
},
|
|
393
393
|
children: [
|
|
394
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
395
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
396
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
397
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
398
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
394
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SheetTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "ghost", size: "icon-sm", "aria-label": t("help.hint.trigger") }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.HelpCircleIcon, { className: "h-4 w-4" }) }),
|
|
395
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.SheetContent, { side: "end", className: "w-full max-w-md sm:max-w-lg", children: [
|
|
396
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.SheetHeader, { children: [
|
|
397
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SheetTitle, { children: active ? active.name : t("help.hint.pickArticle") }),
|
|
398
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SheetDescription, { children: _nullishCoalesce(_optionalChain([active, 'optionalAccess', _4 => _4.summary]), () => ( "")) })
|
|
399
399
|
] }),
|
|
400
400
|
active ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-4 space-y-3", children: [
|
|
401
401
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: active.summary }),
|
|
@@ -427,18 +427,18 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpHint, "HelpHint");
|
|
|
427
427
|
|
|
428
428
|
function HelpSearchResultRow({ result, onSelect }) {
|
|
429
429
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
430
|
-
const generateUrl =
|
|
430
|
+
const generateUrl = _chunkEGTC75OWjs.usePageUrlGenerator.call(void 0, );
|
|
431
431
|
const [article, setArticle] = _react.useState.call(void 0, null);
|
|
432
432
|
_react.useEffect.call(void 0, () => {
|
|
433
433
|
let active = true;
|
|
434
|
-
|
|
434
|
+
_chunkZB6OYIMBjs.HowToService.findOne({ id: result.id }).then((a) => active && setArticle(a)).catch(() => active && setArticle(null));
|
|
435
435
|
return () => {
|
|
436
436
|
active = false;
|
|
437
437
|
};
|
|
438
438
|
}, [result.id]);
|
|
439
439
|
if (!article) {
|
|
440
440
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
441
|
-
|
|
441
|
+
_chunkEGTC75OWjs.CommandItem,
|
|
442
442
|
{
|
|
443
443
|
value: result.id,
|
|
444
444
|
disabled: true,
|
|
@@ -447,7 +447,7 @@ function HelpSearchResultRow({ result, onSelect }) {
|
|
|
447
447
|
}
|
|
448
448
|
);
|
|
449
449
|
}
|
|
450
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
450
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CommandItem, { value: result.id, onSelect, className: "cursor-pointer p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
451
451
|
_link2.default,
|
|
452
452
|
{
|
|
453
453
|
href: generateUrl({ page: `/help/${article.howToType}/${article.slug}` }),
|
|
@@ -23,15 +23,15 @@ import {
|
|
|
23
23
|
useAssistantContext,
|
|
24
24
|
useCurrentUserContext,
|
|
25
25
|
usePageUrlGenerator
|
|
26
|
-
} from "../../chunk-
|
|
26
|
+
} from "../../chunk-RF2PR5G3.mjs";
|
|
27
27
|
import "../../chunk-VOXD3ZLY.mjs";
|
|
28
28
|
import {
|
|
29
29
|
_getStaticHelpContent
|
|
30
|
-
} from "../../chunk-
|
|
30
|
+
} from "../../chunk-G2UIQSNJ.mjs";
|
|
31
31
|
import "../../chunk-PW42LRSL.mjs";
|
|
32
32
|
import {
|
|
33
33
|
HowToService
|
|
34
|
-
} from "../../chunk-
|
|
34
|
+
} from "../../chunk-DPXOPLQP.mjs";
|
|
35
35
|
import "../../chunk-OY65RYD3.mjs";
|
|
36
36
|
import "../../chunk-JSHLBRFV.mjs";
|
|
37
37
|
import "../../chunk-AUD6ZLBB.mjs";
|