@carlonicora/nextjs-jsonapi 5.1.2 → 5.2.0
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-AZ627NB7.mjs → BlockNoteEditor-2QJVK2HH.mjs} +4 -4
- package/dist/{BlockNoteEditor-OP7LWYOG.js → BlockNoteEditor-EGY4ZAAM.js} +19 -19
- package/dist/{BlockNoteEditor-OP7LWYOG.js.map → BlockNoteEditor-EGY4ZAAM.js.map} +1 -1
- package/dist/{BlockNoteViewer-SUK7OMWH.mjs → BlockNoteViewer-6BQXJ4TB.mjs} +2 -2
- package/dist/{BlockNoteViewer-LK22AE7Z.js → BlockNoteViewer-I2MMFH3S.js} +3 -3
- package/dist/{BlockNoteViewer-LK22AE7Z.js.map → BlockNoteViewer-I2MMFH3S.js.map} +1 -1
- package/dist/auth.interface-CSzJ1oP1.d.ts +64 -0
- package/dist/auth.interface-DD4uQv2K.d.mts +64 -0
- package/dist/billing/index.js +441 -441
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-DYITOVR5.mjs → chunk-2Z3ZCYXX.mjs} +173 -96
- package/dist/chunk-2Z3ZCYXX.mjs.map +1 -0
- package/dist/{chunk-YZN2774P.js → chunk-3VEQ5JZJ.js} +1336 -1259
- package/dist/chunk-3VEQ5JZJ.js.map +1 -0
- package/dist/{chunk-TO6IYGML.js → chunk-75MLT74B.js} +126 -8
- package/dist/chunk-75MLT74B.js.map +1 -0
- package/dist/{chunk-67NJY7SM.js → chunk-EXICQC4A.js} +3 -3
- package/dist/{chunk-67NJY7SM.js.map → chunk-EXICQC4A.js.map} +1 -1
- package/dist/{chunk-OCJEXAGE.mjs → chunk-HNOWSFM5.mjs} +55 -4
- package/dist/chunk-HNOWSFM5.mjs.map +1 -0
- package/dist/{chunk-OKUGTXDN.mjs → chunk-JEZQTZQ4.mjs} +121 -3
- package/dist/chunk-JEZQTZQ4.mjs.map +1 -0
- package/dist/{chunk-KL7CAQP3.mjs → chunk-NPKFMRH5.mjs} +2 -2
- package/dist/{chunk-VVJDWQEI.js → chunk-S5MQDWWC.js} +55 -4
- package/dist/chunk-S5MQDWWC.js.map +1 -0
- package/dist/{chunk-XCHXOCEJ.js → chunk-THKYH65N.js} +4 -4
- package/dist/{chunk-XCHXOCEJ.js.map → chunk-THKYH65N.js.map} +1 -1
- package/dist/{chunk-XLVRAHUK.mjs → chunk-YMUPTXOT.mjs} +2 -2
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +17 -3
- package/dist/components/index.d.ts +17 -3
- package/dist/components/index.js +6 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +5 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +27 -7
- package/dist/core/index.d.ts +27 -7
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/features/analytics/index.js +122 -122
- package/dist/features/analytics/index.mjs +4 -4
- package/dist/features/analytics/server.js +4 -4
- package/dist/features/analytics/server.mjs +2 -2
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +125 -125
- package/dist/features/tokenusage/index.mjs +4 -4
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/{s3.service-C-4YpEMu.d.ts → s3.service-CY-jgOAM.d.ts} +1 -1
- package/dist/{s3.service-dVj-nxMl.d.mts → s3.service-Sri0QP7Z.d.mts} +1 -1
- package/dist/server/index.d.mts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/{waitlist.config-kPfjImle.d.mts → waitlist.config-Cagmgm7-.d.mts} +7 -0
- package/dist/{waitlist.config-kPfjImle.d.ts → waitlist.config-Cagmgm7-.d.ts} +7 -0
- package/messages/en.json +15 -1
- package/messages/it.json +15 -1
- package/package.json +1 -1
- package/scripts/validate-messages.mjs +1 -0
- package/src/components/index.ts +1 -0
- package/src/features/auth/components/buttons/GoogleSignInButton.tsx +8 -4
- package/src/features/auth/components/forms/Register.tsx +20 -8
- package/src/features/auth/data/auth.interface.ts +2 -0
- package/src/features/auth/data/auth.ts +10 -0
- package/src/features/signup-source/SignupSourceCapture.tsx +27 -0
- package/src/features/signup-source/__tests__/signup-source.spec.ts +161 -0
- package/src/features/signup-source/index.ts +9 -0
- package/src/features/signup-source/signup-source.ts +135 -0
- package/src/features/waitlist/components/forms/WaitlistForm.tsx +2 -0
- package/src/features/waitlist/components/forms/WaitlistQuestionnaireRenderer.tsx +15 -13
- package/src/features/waitlist/components/lists/WaitlistList.tsx +60 -22
- package/src/features/waitlist/components/sections/WaitlistHeroSection.tsx +6 -5
- package/src/features/waitlist/config/waitlist.config.ts +23 -0
- package/src/features/waitlist/data/Waitlist.ts +51 -3
- package/src/features/waitlist/data/WaitlistInterface.ts +9 -1
- package/src/features/waitlist/data/WaitlistService.ts +3 -2
- package/src/features/waitlist/data/__tests__/Waitlist.spec.ts +82 -0
- package/src/features/waitlist/data/__tests__/WaitlistService.spec.ts +48 -0
- package/src/features/waitlist/data/waitlist.fields.ts +1 -0
- package/src/features/waitlist/hooks/__tests__/formatSignupSource.spec.ts +24 -0
- package/src/features/waitlist/hooks/formatSignupSource.ts +14 -0
- package/src/features/waitlist/hooks/useWaitlistTableStructure.tsx +26 -14
- package/src/hooks/__tests__/useDataListRetriever.spec.ts +69 -0
- package/src/hooks/__tests__/usePageTracker.spec.tsx +16 -10
- package/src/hooks/useDataListRetriever.ts +6 -2
- package/src/index.ts +3 -0
- package/dist/auth.interface-CeFCz9NU.d.mts +0 -34
- package/dist/auth.interface-D1R7VVky.d.ts +0 -34
- package/dist/chunk-DYITOVR5.mjs.map +0 -1
- package/dist/chunk-OCJEXAGE.mjs.map +0 -1
- package/dist/chunk-OKUGTXDN.mjs.map +0 -1
- package/dist/chunk-TO6IYGML.js.map +0 -1
- package/dist/chunk-VVJDWQEI.js.map +0 -1
- package/dist/chunk-YZN2774P.js.map +0 -1
- /package/dist/{BlockNoteEditor-AZ627NB7.mjs.map → BlockNoteEditor-2QJVK2HH.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-SUK7OMWH.mjs.map → BlockNoteViewer-6BQXJ4TB.mjs.map} +0 -0
- /package/dist/{chunk-KL7CAQP3.mjs.map → chunk-NPKFMRH5.mjs.map} +0 -0
- /package/dist/{chunk-XLVRAHUK.mjs.map → chunk-YMUPTXOT.mjs.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
percentageDelta,
|
|
4
4
|
seriesColor,
|
|
5
5
|
useUsageFormatters
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-NPKFMRH5.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Badge,
|
|
9
9
|
Button,
|
|
@@ -33,8 +33,8 @@ import {
|
|
|
33
33
|
TabsList,
|
|
34
34
|
TabsTrigger,
|
|
35
35
|
usePageUrlGenerator
|
|
36
|
-
} from "../../chunk-
|
|
37
|
-
import "../../chunk-
|
|
36
|
+
} from "../../chunk-2Z3ZCYXX.mjs";
|
|
37
|
+
import "../../chunk-JEZQTZQ4.mjs";
|
|
38
38
|
import "../../chunk-PW42LRSL.mjs";
|
|
39
39
|
import {
|
|
40
40
|
AbstractService,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
Modules,
|
|
49
49
|
analyticsModules,
|
|
50
50
|
cn
|
|
51
|
-
} from "../../chunk-
|
|
51
|
+
} from "../../chunk-HNOWSFM5.mjs";
|
|
52
52
|
import "../../chunk-AUXK7QSA.mjs";
|
|
53
53
|
import "../../chunk-PI56A4DG.mjs";
|
|
54
54
|
import "../../chunk-V5MI7RNB.mjs";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTHKYH65Njs = require('../../chunk-THKYH65N.js');
|
|
4
4
|
require('../../chunk-YUO55Q5A.js');
|
|
5
5
|
require('../../chunk-6TUB7Y6T.js');
|
|
6
6
|
require('../../chunk-IK65TDQH.js');
|
|
7
7
|
require('../../chunk-G4JR3SFV.js');
|
|
8
|
-
require('../../chunk-
|
|
8
|
+
require('../../chunk-S5MQDWWC.js');
|
|
9
9
|
require('../../chunk-LXKSUWAV.js');
|
|
10
10
|
require('../../chunk-JTPRJNT2.js');
|
|
11
11
|
require('../../chunk-GHE4VT2R.js');
|
|
@@ -18,7 +18,7 @@ var _navigation = require('next/navigation');
|
|
|
18
18
|
var _analytics = require('@carlonicora/nextjs-jsonapi/analytics');
|
|
19
19
|
var _jsxruntime = require('react/jsx-runtime');
|
|
20
20
|
async function AnalyticsAdminPage({ adminRoleId, pageUrl, sessionPageUrl, deniedRedirect = "/" }) {
|
|
21
|
-
if (!await
|
|
21
|
+
if (!await _chunkTHKYH65Njs.ServerSession.hasRole(adminRoleId)) {
|
|
22
22
|
_navigation.redirect.call(void 0, deniedRedirect);
|
|
23
23
|
}
|
|
24
24
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _analytics.AnalyticsAdminPageContainer, { pageUrl, sessionPageUrl });
|
|
@@ -30,7 +30,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, AnalyticsAdminPage, "AnalyticsAdminPage");
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
async function AnalyticsJourneyPage({ adminRoleId, sessionId, pageUrl, deniedRedirect = "/" }) {
|
|
33
|
-
if (!await
|
|
33
|
+
if (!await _chunkTHKYH65Njs.ServerSession.hasRole(adminRoleId)) {
|
|
34
34
|
_navigation.redirect.call(void 0, deniedRedirect);
|
|
35
35
|
}
|
|
36
36
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _analytics.AnalyticsJourneyPageContainer, { sessionId, pageUrl });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServerSession
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-YMUPTXOT.mjs";
|
|
4
4
|
import "../../chunk-F5UNXZ3J.mjs";
|
|
5
5
|
import "../../chunk-E2LENTUH.mjs";
|
|
6
6
|
import "../../chunk-T7SAW3UW.mjs";
|
|
7
7
|
import "../../chunk-PW42LRSL.mjs";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-HNOWSFM5.mjs";
|
|
9
9
|
import "../../chunk-AUXK7QSA.mjs";
|
|
10
10
|
import "../../chunk-PI56A4DG.mjs";
|
|
11
11
|
import "../../chunk-V5MI7RNB.mjs";
|
|
@@ -23,14 +23,14 @@ var _chunkYBZVWLPHjs = require('../../chunk-YBZVWLPH.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunk3VEQ5JZJjs = require('../../chunk-3VEQ5JZJ.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunk75MLT74Bjs = require('../../chunk-75MLT74B.js');
|
|
30
30
|
require('../../chunk-G4JR3SFV.js');
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkS5MQDWWCjs = require('../../chunk-S5MQDWWC.js');
|
|
34
34
|
require('../../chunk-LXKSUWAV.js');
|
|
35
35
|
require('../../chunk-JTPRJNT2.js');
|
|
36
36
|
require('../../chunk-GHE4VT2R.js');
|
|
@@ -44,7 +44,7 @@ var _react = require('react');
|
|
|
44
44
|
var _jsxruntime = require('react/jsx-runtime');
|
|
45
45
|
var HelpContext = _react.createContext.call(void 0, null);
|
|
46
46
|
function HelpProvider({ children }) {
|
|
47
|
-
const cfg =
|
|
47
|
+
const cfg = _chunk75MLT74Bjs._getStaticHelpContent.call(void 0, );
|
|
48
48
|
if (!cfg) {
|
|
49
49
|
throw new Error(
|
|
50
50
|
"Help content not configured \u2014 call configureJsonApi({ helpContent: {...} }) before importing help components."
|
|
@@ -76,29 +76,29 @@ var _lucidereact = require('lucide-react');
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
function HelpAssistantSheet({ open, onOpenChange }) {
|
|
79
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
80
|
-
|
|
79
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.Sheet, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
80
|
+
_chunk3VEQ5JZJjs.SheetContent,
|
|
81
81
|
{
|
|
82
82
|
side: "end",
|
|
83
83
|
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",
|
|
84
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
84
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.AssistantProvider, { manageUrl: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAssistantSheetBody, {}) })
|
|
85
85
|
}
|
|
86
86
|
) });
|
|
87
87
|
}
|
|
88
88
|
_chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheet, "HelpAssistantSheet");
|
|
89
89
|
function HelpAssistantSheetBody() {
|
|
90
90
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
91
|
-
const ctx =
|
|
91
|
+
const ctx = _chunk3VEQ5JZJjs.useAssistantContext.call(void 0, );
|
|
92
92
|
const showThread = !!ctx.assistant || ctx.sending || ctx.messages.length > 0;
|
|
93
93
|
const send = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (content) => ctx.sendMessage(content, { howToMode: true }), "send");
|
|
94
94
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
95
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
96
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
97
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
95
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3VEQ5JZJjs.SheetHeader, { children: [
|
|
96
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.SheetTitle, { children: t("help.askAi.sheet.title") }),
|
|
97
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.SheetDescription, { children: t("help.askAi.sheet.subtitle") })
|
|
98
98
|
] }),
|
|
99
|
-
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
99
|
+
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.AssistantEmptyState, { onSend: send }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
100
100
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
101
|
-
|
|
101
|
+
_chunk3VEQ5JZJjs.AssistantThread,
|
|
102
102
|
{
|
|
103
103
|
messages: ctx.messages,
|
|
104
104
|
sending: ctx.sending,
|
|
@@ -108,7 +108,7 @@ function HelpAssistantSheetBody() {
|
|
|
108
108
|
onRetry: ctx.retrySend
|
|
109
109
|
}
|
|
110
110
|
),
|
|
111
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
111
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.AssistantComposer, { onSend: send, disabled: ctx.sending })
|
|
112
112
|
] })
|
|
113
113
|
] });
|
|
114
114
|
}
|
|
@@ -118,20 +118,20 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheetBody, "HelpAssistantSheet
|
|
|
118
118
|
|
|
119
119
|
function HelpAskAi() {
|
|
120
120
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
121
|
-
const { currentUser } =
|
|
121
|
+
const { currentUser } = _chunk3VEQ5JZJjs.useCurrentUserContext.call(void 0, );
|
|
122
122
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
123
123
|
const disabled = !currentUser;
|
|
124
124
|
if (disabled) {
|
|
125
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
126
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
125
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3VEQ5JZJjs.Tooltip, { children: [
|
|
126
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3VEQ5JZJjs.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.Button, { variant: "outline", size: "sm", disabled: true }), children: [
|
|
127
127
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
128
128
|
t("help.askAi.button")
|
|
129
129
|
] }),
|
|
130
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
130
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.TooltipContent, { children: t("help.askAi.loginTooltip") })
|
|
131
131
|
] });
|
|
132
132
|
}
|
|
133
133
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
134
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
134
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3VEQ5JZJjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
|
|
135
135
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
136
136
|
t("help.askAi.button")
|
|
137
137
|
] }),
|
|
@@ -144,7 +144,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAskAi, "HelpAskAi");
|
|
|
144
144
|
|
|
145
145
|
function HelpHeader() {
|
|
146
146
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
147
|
-
const { currentUser } =
|
|
147
|
+
const { currentUser } = _chunk3VEQ5JZJjs.useCurrentUserContext.call(void 0, );
|
|
148
148
|
const { brand } = useHelp();
|
|
149
149
|
const logo = _optionalChain([brand, 'optionalAccess', _ => _.logo]);
|
|
150
150
|
const label = _nullishCoalesce(_optionalChain([brand, 'optionalAccess', _2 => _2.label]), () => ( t("help.title")));
|
|
@@ -160,7 +160,7 @@ function HelpHeader() {
|
|
|
160
160
|
] }),
|
|
161
161
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 max-md:shrink-0", children: [
|
|
162
162
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAskAi, {}),
|
|
163
|
-
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className:
|
|
163
|
+
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className: _chunk3VEQ5JZJjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.openApp") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/login", className: _chunk3VEQ5JZJjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.login") })
|
|
164
164
|
] })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
@@ -202,12 +202,12 @@ _chunk7QVYU63Ejs.__name.call(void 0, useHelpFilter, "useHelpFilter");
|
|
|
202
202
|
|
|
203
203
|
function HelpSideNav() {
|
|
204
204
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
205
|
-
const generateUrl =
|
|
205
|
+
const generateUrl = _chunk3VEQ5JZJjs.usePageUrlGenerator.call(void 0, );
|
|
206
206
|
const pathname = _navigation.usePathname.call(void 0, );
|
|
207
207
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
208
208
|
_react.useEffect.call(void 0, () => {
|
|
209
209
|
let active = true;
|
|
210
|
-
|
|
210
|
+
_chunkS5MQDWWCjs.HowToService.findPublished().then((list) => active && setArticles(list)).catch(() => active && setArticles([]));
|
|
211
211
|
return () => {
|
|
212
212
|
active = false;
|
|
213
213
|
};
|
|
@@ -283,7 +283,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpSideNav, "HelpSideNav");
|
|
|
283
283
|
function HelpArticleBody(props) {
|
|
284
284
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
285
285
|
const format = _nextintl.useFormatter.call(void 0, );
|
|
286
|
-
const generateUrl =
|
|
286
|
+
const generateUrl = _chunk3VEQ5JZJjs.usePageUrlGenerator.call(void 0, );
|
|
287
287
|
const { howToType, title, summary, updatedAt, prev, next, children } = props;
|
|
288
288
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "article", { className: "prose dark:prose-invert max-w-none", children: [
|
|
289
289
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { className: "text-muted-foreground mb-2 text-xs", children: [
|
|
@@ -340,7 +340,7 @@ function HelpTOC({ headings }) {
|
|
|
340
340
|
}, [headings]);
|
|
341
341
|
if (headings.length === 0) return null;
|
|
342
342
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { "aria-label": t("help.toc.title"), className: "hidden lg:block", children: [
|
|
343
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
343
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.MicroLabel, { className: "mb-2", children: t("help.toc.title") }),
|
|
344
344
|
/* @__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,
|
|
345
345
|
"a",
|
|
346
346
|
{
|
|
@@ -361,13 +361,13 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpTOC, "HelpTOC");
|
|
|
361
361
|
|
|
362
362
|
function HelpHint({ contextKey }) {
|
|
363
363
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
364
|
-
const generateUrl =
|
|
364
|
+
const generateUrl = _chunk3VEQ5JZJjs.usePageUrlGenerator.call(void 0, );
|
|
365
365
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
366
366
|
const [picked, setPicked] = _react.useState.call(void 0, null);
|
|
367
367
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
368
368
|
_react.useEffect.call(void 0, () => {
|
|
369
369
|
let active2 = true;
|
|
370
|
-
|
|
370
|
+
_chunkS5MQDWWCjs.HowToService.findPublished().then((list) => active2 && setArticles(list)).catch(() => active2 && setArticles([]));
|
|
371
371
|
return () => {
|
|
372
372
|
active2 = false;
|
|
373
373
|
};
|
|
@@ -379,7 +379,7 @@ function HelpHint({ contextKey }) {
|
|
|
379
379
|
if (matches.length === 0) return null;
|
|
380
380
|
const active = _nullishCoalesce(picked, () => ( (matches.length === 1 ? matches[0] : null)));
|
|
381
381
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
382
|
-
|
|
382
|
+
_chunk3VEQ5JZJjs.Sheet,
|
|
383
383
|
{
|
|
384
384
|
open,
|
|
385
385
|
onOpenChange: (o) => {
|
|
@@ -387,11 +387,11 @@ function HelpHint({ contextKey }) {
|
|
|
387
387
|
if (!o) setPicked(null);
|
|
388
388
|
},
|
|
389
389
|
children: [
|
|
390
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
391
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
392
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
393
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
394
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
390
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.SheetTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.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" }) }),
|
|
391
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3VEQ5JZJjs.SheetContent, { side: "end", className: "w-full max-w-md sm:max-w-lg", children: [
|
|
392
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3VEQ5JZJjs.SheetHeader, { children: [
|
|
393
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.SheetTitle, { children: active ? active.name : t("help.hint.pickArticle") }),
|
|
394
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.SheetDescription, { children: _nullishCoalesce(_optionalChain([active, 'optionalAccess', _4 => _4.summary]), () => ( "")) })
|
|
395
395
|
] }),
|
|
396
396
|
active ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-4 space-y-3", children: [
|
|
397
397
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: active.summary }),
|
|
@@ -423,18 +423,18 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpHint, "HelpHint");
|
|
|
423
423
|
|
|
424
424
|
function HelpSearchResultRow({ result, onSelect }) {
|
|
425
425
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
426
|
-
const generateUrl =
|
|
426
|
+
const generateUrl = _chunk3VEQ5JZJjs.usePageUrlGenerator.call(void 0, );
|
|
427
427
|
const [article, setArticle] = _react.useState.call(void 0, null);
|
|
428
428
|
_react.useEffect.call(void 0, () => {
|
|
429
429
|
let active = true;
|
|
430
|
-
|
|
430
|
+
_chunkS5MQDWWCjs.HowToService.findOne({ id: result.id }).then((a) => active && setArticle(a)).catch(() => active && setArticle(null));
|
|
431
431
|
return () => {
|
|
432
432
|
active = false;
|
|
433
433
|
};
|
|
434
434
|
}, [result.id]);
|
|
435
435
|
if (!article) {
|
|
436
436
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
437
|
-
|
|
437
|
+
_chunk3VEQ5JZJjs.CommandItem,
|
|
438
438
|
{
|
|
439
439
|
value: result.id,
|
|
440
440
|
disabled: true,
|
|
@@ -443,7 +443,7 @@ function HelpSearchResultRow({ result, onSelect }) {
|
|
|
443
443
|
}
|
|
444
444
|
);
|
|
445
445
|
}
|
|
446
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
446
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3VEQ5JZJjs.CommandItem, { value: result.id, onSelect, className: "cursor-pointer p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
447
447
|
_link2.default,
|
|
448
448
|
{
|
|
449
449
|
href: generateUrl({ page: `/help/${article.howToType}/${article.slug}` }),
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
useAssistantContext,
|
|
24
24
|
useCurrentUserContext,
|
|
25
25
|
usePageUrlGenerator
|
|
26
|
-
} from "../../chunk-
|
|
26
|
+
} from "../../chunk-2Z3ZCYXX.mjs";
|
|
27
27
|
import {
|
|
28
28
|
_getStaticHelpContent
|
|
29
|
-
} from "../../chunk-
|
|
29
|
+
} from "../../chunk-JEZQTZQ4.mjs";
|
|
30
30
|
import "../../chunk-PW42LRSL.mjs";
|
|
31
31
|
import {
|
|
32
32
|
HowToService
|
|
33
|
-
} from "../../chunk-
|
|
33
|
+
} from "../../chunk-HNOWSFM5.mjs";
|
|
34
34
|
import "../../chunk-AUXK7QSA.mjs";
|
|
35
35
|
import "../../chunk-PI56A4DG.mjs";
|
|
36
36
|
import "../../chunk-V5MI7RNB.mjs";
|