@carlonicora/nextjs-jsonapi 5.2.0 → 5.3.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-EGY4ZAAM.js → BlockNoteEditor-UJ6363LC.js} +19 -19
- package/dist/{BlockNoteEditor-EGY4ZAAM.js.map → BlockNoteEditor-UJ6363LC.js.map} +1 -1
- package/dist/{BlockNoteEditor-2QJVK2HH.mjs → BlockNoteEditor-WTSQANKI.mjs} +4 -4
- package/dist/{BlockNoteViewer-I2MMFH3S.js → BlockNoteViewer-EL4JFB6P.js} +3 -3
- package/dist/{BlockNoteViewer-I2MMFH3S.js.map → BlockNoteViewer-EL4JFB6P.js.map} +1 -1
- package/dist/{BlockNoteViewer-6BQXJ4TB.mjs → BlockNoteViewer-JVKWJZ6J.mjs} +2 -2
- package/dist/billing/index.js +441 -441
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-3VEQ5JZJ.js → chunk-3BAM23VA.js} +847 -847
- package/dist/chunk-3BAM23VA.js.map +1 -0
- package/dist/{chunk-JEZQTZQ4.mjs → chunk-6WU74VFU.mjs} +2 -2
- package/dist/{chunk-S5MQDWWC.js → chunk-CRI4T47Y.js} +736 -176
- package/dist/chunk-CRI4T47Y.js.map +1 -0
- package/dist/{chunk-75MLT74B.js → chunk-EO75CV76.js} +8 -8
- package/dist/{chunk-75MLT74B.js.map → chunk-EO75CV76.js.map} +1 -1
- package/dist/{chunk-NPKFMRH5.mjs → chunk-FNTQQFLH.mjs} +2 -2
- package/dist/{chunk-HNOWSFM5.mjs → chunk-JQWI62NV.mjs} +563 -3
- package/dist/chunk-JQWI62NV.mjs.map +1 -0
- package/dist/{chunk-2Z3ZCYXX.mjs → chunk-MIZTWBPX.mjs} +5 -5
- package/dist/chunk-MIZTWBPX.mjs.map +1 -0
- package/dist/{chunk-YMUPTXOT.mjs → chunk-QKZUE5OF.mjs} +2 -2
- package/dist/{chunk-EXICQC4A.js → chunk-QQQE3N2X.js} +3 -3
- package/dist/{chunk-EXICQC4A.js.map → chunk-QQQE3N2X.js.map} +1 -1
- package/dist/{chunk-THKYH65N.js → chunk-XGTQWBDJ.js} +4 -4
- package/dist/{chunk-THKYH65N.js.map → chunk-XGTQWBDJ.js.map} +1 -1
- package/dist/client/index.d.mts +6 -39
- package/dist/client/index.d.ts +6 -39
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.d.ts +2 -2
- 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.d.mts +187 -1
- package/dist/core/index.d.ts +187 -1
- package/dist/core/index.js +30 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +29 -1
- package/dist/email-automation-enrollment.fields-BZvF14qx.d.mts +82 -0
- package/dist/email-automation-enrollment.fields-Cp3VMzFq.d.ts +82 -0
- package/dist/email-automations/index.css +30 -0
- package/dist/email-automations/index.css.map +1 -0
- package/dist/email-automations/index.d.mts +303 -0
- package/dist/email-automations/index.d.ts +303 -0
- package/dist/email-automations/index.js +1705 -0
- package/dist/email-automations/index.js.map +1 -0
- package/dist/email-automations/index.mjs +1705 -0
- package/dist/email-automations/index.mjs.map +1 -0
- 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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +31 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/types-70acd-8C.d.mts +39 -0
- package/dist/types-l8SFleXi.d.ts +39 -0
- package/messages/en.json +117 -0
- package/messages/it.json +117 -0
- package/package.json +11 -1
- package/src/components/forms/FormFieldWrapper.tsx +1 -1
- package/src/components/forms/FormTextarea.tsx +2 -1
- package/src/core/index.ts +8 -0
- package/src/core/registry/ModuleRegistry.ts +5 -0
- package/src/email-automations/index.ts +5 -0
- package/src/features/email-automation/EmailAutomationEnrollmentModule.ts +11 -0
- package/src/features/email-automation/EmailAutomationModule.ts +30 -0
- package/src/features/email-automation/EmailAutomationStepModule.ts +11 -0
- package/src/features/email-automation/EmailAutomationTriggerModule.ts +11 -0
- package/src/features/email-automation/components/__tests__/EmailAutomationEditor.spec.tsx +104 -0
- package/src/features/email-automation/components/canvas/EmailAutomationActiveSwitch.tsx +49 -0
- package/src/features/email-automation/components/canvas/EmailAutomationCanvas.tsx +474 -0
- package/src/features/email-automation/components/canvas/EmailAutomationCanvasInspector.tsx +89 -0
- package/src/features/email-automation/components/canvas/EmailAutomationCanvasTab.tsx +32 -0
- package/src/features/email-automation/components/canvas/__tests__/buildCanvasGraph.spec.ts +67 -0
- package/src/features/email-automation/components/canvas/buildCanvasGraph.ts +141 -0
- package/src/features/email-automation/components/canvas/edges/DelayEdge.tsx +68 -0
- package/src/features/email-automation/components/canvas/nodes/EmailStepNode.tsx +43 -0
- package/src/features/email-automation/components/canvas/nodes/TriggerNode.tsx +23 -0
- package/src/features/email-automation/components/canvas/shared/CanvasToolbar.tsx +53 -0
- package/src/features/email-automation/components/canvas/shared/EmptyCanvas.tsx +11 -0
- package/src/features/email-automation/components/canvas/shared/__tests__/autoLayout.spec.ts +42 -0
- package/src/features/email-automation/components/canvas/shared/__tests__/longPress.spec.ts +51 -0
- package/src/features/email-automation/components/canvas/shared/autoLayout.ts +55 -0
- package/src/features/email-automation/components/canvas/shared/index.ts +4 -0
- package/src/features/email-automation/components/canvas/shared/longPress.ts +57 -0
- package/src/features/email-automation/components/containers/EmailAutomationContainer.tsx +80 -0
- package/src/features/email-automation/components/containers/EmailAutomationsListContainer.tsx +27 -0
- package/src/features/email-automation/components/forms/EmailAutomationEditor.tsx +153 -0
- package/src/features/email-automation/components/forms/EmailStepEditor.tsx +151 -0
- package/src/features/email-automation/components/index.ts +15 -0
- package/src/features/email-automation/components/lists/EmailAutomationRecipientsList.tsx +90 -0
- package/src/features/email-automation/components/lists/EmailAutomationsList.tsx +76 -0
- package/src/features/email-automation/components/unsubscribe/EmailUnsubscribe.tsx +99 -0
- package/src/features/email-automation/components/unsubscribe/__tests__/EmailUnsubscribe.spec.tsx +55 -0
- package/src/features/email-automation/contexts/EmailAutomationContext.tsx +175 -0
- package/src/features/email-automation/data/EmailAutomation.ts +87 -0
- package/src/features/email-automation/data/EmailAutomationEnrollment.ts +105 -0
- package/src/features/email-automation/data/EmailAutomationEnrollmentInterface.ts +18 -0
- package/src/features/email-automation/data/EmailAutomationEnrollmentService.ts +31 -0
- package/src/features/email-automation/data/EmailAutomationInterface.ts +22 -0
- package/src/features/email-automation/data/EmailAutomationService.ts +106 -0
- package/src/features/email-automation/data/EmailAutomationStep.ts +104 -0
- package/src/features/email-automation/data/EmailAutomationStepInterface.ts +23 -0
- package/src/features/email-automation/data/EmailAutomationStepService.ts +80 -0
- package/src/features/email-automation/data/EmailAutomationTrigger.ts +28 -0
- package/src/features/email-automation/data/EmailAutomationTriggerInterface.ts +6 -0
- package/src/features/email-automation/data/__tests__/email-automation-models.spec.ts +103 -0
- package/src/features/email-automation/data/email-automation-enrollment.fields.ts +8 -0
- package/src/features/email-automation/data/email-automation.fields.ts +9 -0
- package/src/features/email-automation/data/index.ts +13 -0
- package/src/features/email-automation/hooks/index.ts +2 -0
- package/src/features/email-automation/hooks/useEmailAutomationEnrollmentTableStructure.tsx +126 -0
- package/src/features/email-automation/hooks/useEmailAutomationTableStructure.tsx +119 -0
- package/src/features/email-automation/index.ts +5 -0
- package/dist/chunk-2Z3ZCYXX.mjs.map +0 -1
- package/dist/chunk-3VEQ5JZJ.js.map +0 -1
- package/dist/chunk-HNOWSFM5.mjs.map +0 -1
- package/dist/chunk-S5MQDWWC.js.map +0 -1
- /package/dist/{BlockNoteEditor-2QJVK2HH.mjs.map → BlockNoteEditor-WTSQANKI.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-6BQXJ4TB.mjs.map → BlockNoteViewer-JVKWJZ6J.mjs.map} +0 -0
- /package/dist/{chunk-JEZQTZQ4.mjs.map → chunk-6WU74VFU.mjs.map} +0 -0
- /package/dist/{chunk-NPKFMRH5.mjs.map → chunk-FNTQQFLH.mjs.map} +0 -0
- /package/dist/{chunk-YMUPTXOT.mjs.map → chunk-QKZUE5OF.mjs.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
percentageDelta,
|
|
4
4
|
seriesColor,
|
|
5
5
|
useUsageFormatters
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-FNTQQFLH.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-MIZTWBPX.mjs";
|
|
37
|
+
import "../../chunk-6WU74VFU.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-JQWI62NV.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 _chunkXGTQWBDJjs = require('../../chunk-XGTQWBDJ.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-CRI4T47Y.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 _chunkXGTQWBDJjs.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 _chunkXGTQWBDJjs.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-QKZUE5OF.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-JQWI62NV.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 _chunk3BAM23VAjs = require('../../chunk-3BAM23VA.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkEO75CV76js = require('../../chunk-EO75CV76.js');
|
|
30
30
|
require('../../chunk-G4JR3SFV.js');
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkCRI4T47Yjs = require('../../chunk-CRI4T47Y.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 = _chunkEO75CV76js._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, _chunk3BAM23VAjs.Sheet, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
80
|
+
_chunk3BAM23VAjs.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, _chunk3BAM23VAjs.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 = _chunk3BAM23VAjs.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, _chunk3BAM23VAjs.SheetHeader, { children: [
|
|
96
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BAM23VAjs.SheetTitle, { children: t("help.askAi.sheet.title") }),
|
|
97
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BAM23VAjs.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, _chunk3BAM23VAjs.AssistantEmptyState, { onSend: send }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
100
100
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
101
|
-
|
|
101
|
+
_chunk3BAM23VAjs.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, _chunk3BAM23VAjs.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 } = _chunk3BAM23VAjs.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, _chunk3BAM23VAjs.Tooltip, { children: [
|
|
126
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3BAM23VAjs.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BAM23VAjs.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, _chunk3BAM23VAjs.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, _chunk3BAM23VAjs.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 } = _chunk3BAM23VAjs.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: _chunk3BAM23VAjs.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.openApp") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/login", className: _chunk3BAM23VAjs.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 = _chunk3BAM23VAjs.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
|
+
_chunkCRI4T47Yjs.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 = _chunk3BAM23VAjs.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, _chunk3BAM23VAjs.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 = _chunk3BAM23VAjs.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
|
+
_chunkCRI4T47Yjs.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
|
+
_chunk3BAM23VAjs.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, _chunk3BAM23VAjs.SheetTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BAM23VAjs.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, _chunk3BAM23VAjs.SheetContent, { side: "end", className: "w-full max-w-md sm:max-w-lg", children: [
|
|
392
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk3BAM23VAjs.SheetHeader, { children: [
|
|
393
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BAM23VAjs.SheetTitle, { children: active ? active.name : t("help.hint.pickArticle") }),
|
|
394
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3BAM23VAjs.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 = _chunk3BAM23VAjs.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
|
+
_chunkCRI4T47Yjs.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
|
+
_chunk3BAM23VAjs.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, _chunk3BAM23VAjs.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-MIZTWBPX.mjs";
|
|
27
27
|
import {
|
|
28
28
|
_getStaticHelpContent
|
|
29
|
-
} from "../../chunk-
|
|
29
|
+
} from "../../chunk-6WU74VFU.mjs";
|
|
30
30
|
import "../../chunk-PW42LRSL.mjs";
|
|
31
31
|
import {
|
|
32
32
|
HowToService
|
|
33
|
-
} from "../../chunk-
|
|
33
|
+
} from "../../chunk-JQWI62NV.mjs";
|
|
34
34
|
import "../../chunk-AUXK7QSA.mjs";
|
|
35
35
|
import "../../chunk-PI56A4DG.mjs";
|
|
36
36
|
import "../../chunk-V5MI7RNB.mjs";
|