@carlonicora/nextjs-jsonapi 5.1.3 → 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-KO6YFNIU.js → BlockNoteEditor-UJ6363LC.js} +19 -19
- package/dist/{BlockNoteEditor-KO6YFNIU.js.map → BlockNoteEditor-UJ6363LC.js.map} +1 -1
- package/dist/{BlockNoteEditor-66FJUDL4.mjs → BlockNoteEditor-WTSQANKI.mjs} +4 -4
- package/dist/{BlockNoteViewer-LK22AE7Z.js → BlockNoteViewer-EL4JFB6P.js} +3 -3
- package/dist/{BlockNoteViewer-LK22AE7Z.js.map → BlockNoteViewer-EL4JFB6P.js.map} +1 -1
- package/dist/{BlockNoteViewer-SUK7OMWH.mjs → BlockNoteViewer-JVKWJZ6J.mjs} +2 -2
- 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-SZQNUGDG.js → chunk-3BAM23VA.js} +1005 -929
- package/dist/chunk-3BAM23VA.js.map +1 -0
- package/dist/{chunk-OKUGTXDN.mjs → chunk-6WU74VFU.mjs} +121 -3
- package/dist/chunk-6WU74VFU.mjs.map +1 -0
- package/dist/{chunk-VVJDWQEI.js → chunk-CRI4T47Y.js} +790 -179
- package/dist/chunk-CRI4T47Y.js.map +1 -0
- package/dist/{chunk-TO6IYGML.js → chunk-EO75CV76.js} +126 -8
- package/dist/chunk-EO75CV76.js.map +1 -0
- package/dist/{chunk-KL7CAQP3.mjs → chunk-FNTQQFLH.mjs} +2 -2
- package/dist/{chunk-OCJEXAGE.mjs → chunk-JQWI62NV.mjs} +617 -6
- package/dist/chunk-JQWI62NV.mjs.map +1 -0
- package/dist/{chunk-5JADF7ZA.mjs → chunk-MIZTWBPX.mjs} +171 -95
- package/dist/chunk-MIZTWBPX.mjs.map +1 -0
- package/dist/{chunk-XLVRAHUK.mjs → chunk-QKZUE5OF.mjs} +2 -2
- package/dist/{chunk-67NJY7SM.js → chunk-QQQE3N2X.js} +3 -3
- package/dist/{chunk-67NJY7SM.js.map → chunk-QQQE3N2X.js.map} +1 -1
- package/dist/{chunk-XCHXOCEJ.js → chunk-XGTQWBDJ.js} +4 -4
- package/dist/{chunk-XCHXOCEJ.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 +19 -5
- package/dist/components/index.d.ts +19 -5
- 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 +214 -8
- package/dist/core/index.d.ts +214 -8
- 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 +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +41 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -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/types-70acd-8C.d.mts +39 -0
- package/dist/types-l8SFleXi.d.ts +39 -0
- 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 +132 -1
- package/messages/it.json +132 -1
- package/package.json +11 -1
- package/scripts/validate-messages.mjs +1 -0
- package/src/components/forms/FormFieldWrapper.tsx +1 -1
- package/src/components/forms/FormTextarea.tsx +2 -1
- package/src/components/index.ts +1 -0
- 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/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/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/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__/usePageTracker.spec.tsx +16 -10
- 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-5JADF7ZA.mjs.map +0 -1
- package/dist/chunk-OCJEXAGE.mjs.map +0 -1
- package/dist/chunk-OKUGTXDN.mjs.map +0 -1
- package/dist/chunk-SZQNUGDG.js.map +0 -1
- package/dist/chunk-TO6IYGML.js.map +0 -1
- package/dist/chunk-VVJDWQEI.js.map +0 -1
- /package/dist/{BlockNoteEditor-66FJUDL4.mjs.map → BlockNoteEditor-WTSQANKI.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-SUK7OMWH.mjs.map → BlockNoteViewer-JVKWJZ6J.mjs.map} +0 -0
- /package/dist/{chunk-KL7CAQP3.mjs.map → chunk-FNTQQFLH.mjs.map} +0 -0
- /package/dist/{chunk-XLVRAHUK.mjs.map → chunk-QKZUE5OF.mjs.map} +0 -0
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ACTION_TYPES,
|
|
3
3
|
RbacService,
|
|
4
|
+
SIGNUP_SOURCE_FIELDS,
|
|
5
|
+
captureSignupSource,
|
|
4
6
|
getPublicApiUrl,
|
|
5
7
|
getReferralConfig,
|
|
6
8
|
getRegistrationMode,
|
|
9
|
+
getSignupSource,
|
|
7
10
|
getStripePublishableKey,
|
|
8
11
|
getTrackablePages,
|
|
9
12
|
getWaitlistConfig,
|
|
@@ -11,8 +14,9 @@ import {
|
|
|
11
14
|
isGoogleAuthEnabled,
|
|
12
15
|
isInternalAuthEnabled,
|
|
13
16
|
isReferralEnabled,
|
|
14
|
-
isRegistrationAllowed
|
|
15
|
-
|
|
17
|
+
isRegistrationAllowed,
|
|
18
|
+
useWaitlistText
|
|
19
|
+
} from "./chunk-6WU74VFU.mjs";
|
|
16
20
|
import {
|
|
17
21
|
getRoleId,
|
|
18
22
|
isRolesConfigured
|
|
@@ -84,7 +88,7 @@ import {
|
|
|
84
88
|
useIsMobile,
|
|
85
89
|
validateItalianTaxCode,
|
|
86
90
|
validatePartitaIva
|
|
87
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-JQWI62NV.mjs";
|
|
88
92
|
import {
|
|
89
93
|
ENV
|
|
90
94
|
} from "./chunk-V5MI7RNB.mjs";
|
|
@@ -10684,7 +10688,7 @@ import { useRef as useRef18 } from "react";
|
|
|
10684
10688
|
import dynamic from "next/dynamic";
|
|
10685
10689
|
import React18 from "react";
|
|
10686
10690
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
10687
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10691
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-WTSQANKI.mjs"), {
|
|
10688
10692
|
ssr: false
|
|
10689
10693
|
});
|
|
10690
10694
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -16882,7 +16886,7 @@ __name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMe
|
|
|
16882
16886
|
import dynamic2 from "next/dynamic";
|
|
16883
16887
|
import React29 from "react";
|
|
16884
16888
|
import { jsx as jsx177 } from "react/jsx-runtime";
|
|
16885
|
-
var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-
|
|
16889
|
+
var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-JVKWJZ6J.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
|
|
16886
16890
|
var BlockNoteViewerContainer = React29.memo(/* @__PURE__ */ __name(function ViewerContainer(props) {
|
|
16887
16891
|
return /* @__PURE__ */ jsx177(BlockNoteViewer, { ...props });
|
|
16888
16892
|
}, "ViewerContainer"));
|
|
@@ -17818,16 +17822,19 @@ registerTableGenerator("stripe-products", useStripeProductTableStructure);
|
|
|
17818
17822
|
import { Send } from "lucide-react";
|
|
17819
17823
|
import { useTranslations as useTranslations70 } from "next-intl";
|
|
17820
17824
|
import { useMemo as useMemo33 } from "react";
|
|
17821
|
-
|
|
17822
|
-
|
|
17823
|
-
|
|
17824
|
-
|
|
17825
|
-
|
|
17826
|
-
|
|
17827
|
-
|
|
17828
|
-
|
|
17825
|
+
|
|
17826
|
+
// src/features/waitlist/hooks/formatSignupSource.ts
|
|
17827
|
+
function formatSignupSource(entry) {
|
|
17828
|
+
if (entry.sourceRef) return entry.sourceRef;
|
|
17829
|
+
if (entry.sourceUtmSource)
|
|
17830
|
+
return entry.sourceUtmCampaign ? `${entry.sourceUtmSource} / ${entry.sourceUtmCampaign}` : entry.sourceUtmSource;
|
|
17831
|
+
if (entry.sourceReferrer) return entry.sourceReferrer;
|
|
17832
|
+
return void 0;
|
|
17829
17833
|
}
|
|
17830
|
-
__name(
|
|
17834
|
+
__name(formatSignupSource, "formatSignupSource");
|
|
17835
|
+
|
|
17836
|
+
// src/features/waitlist/hooks/useWaitlistTableStructure.tsx
|
|
17837
|
+
import { jsx as jsx190, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
17831
17838
|
var useWaitlistTableStructure = /* @__PURE__ */ __name((params) => {
|
|
17832
17839
|
const t = useTranslations70();
|
|
17833
17840
|
const locale = useI18nLocale();
|
|
@@ -17881,12 +17888,27 @@ var useWaitlistTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
17881
17888
|
enableSorting: false,
|
|
17882
17889
|
enableHiding: false
|
|
17883
17890
|
}),
|
|
17891
|
+
["source" /* source */]: () => ({
|
|
17892
|
+
id: "source",
|
|
17893
|
+
header: t("waitlist.admin.columns.source"),
|
|
17894
|
+
cell: /* @__PURE__ */ __name(({ row }) => {
|
|
17895
|
+
const entry = row.original.jsonApiData;
|
|
17896
|
+
const details = SIGNUP_SOURCE_FIELDS.filter((field) => !!entry[field]).map((field) => `${t(`waitlist.admin.source.fields.${field}`)}: ${entry[field]}`).join("\n");
|
|
17897
|
+
const source = formatSignupSource(entry);
|
|
17898
|
+
if (!source) {
|
|
17899
|
+
return /* @__PURE__ */ jsx190("span", { className: "text-muted-foreground", title: details || void 0, children: t("waitlist.admin.source.direct") });
|
|
17900
|
+
}
|
|
17901
|
+
return /* @__PURE__ */ jsx190("span", { title: details, children: source });
|
|
17902
|
+
}, "cell"),
|
|
17903
|
+
enableSorting: false,
|
|
17904
|
+
enableHiding: false
|
|
17905
|
+
}),
|
|
17884
17906
|
["questionnaire" /* questionnaire */]: () => ({
|
|
17885
17907
|
id: "questionnaire",
|
|
17886
17908
|
accessorKey: "questionnaire",
|
|
17887
17909
|
header: t("waitlist.admin.columns.questionnaire"),
|
|
17888
17910
|
cell: /* @__PURE__ */ __name(({ row }) => {
|
|
17889
|
-
const questionnaire =
|
|
17911
|
+
const questionnaire = row.original.jsonApiData.questionnaire;
|
|
17890
17912
|
if (!questionnaire || Object.keys(questionnaire).length === 0) {
|
|
17891
17913
|
return /* @__PURE__ */ jsx190("span", { className: "text-muted-foreground", children: "-" });
|
|
17892
17914
|
}
|
|
@@ -19040,11 +19062,12 @@ function clearReferralCode() {
|
|
|
19040
19062
|
document.cookie = `${REFERRAL_COOKIE_NAME}=; path=/; max-age=0; SameSite=Lax`;
|
|
19041
19063
|
}
|
|
19042
19064
|
__name(clearReferralCode, "clearReferralCode");
|
|
19043
|
-
function buildOAuthQueryParams(inviteCode, referralCode) {
|
|
19044
|
-
const params =
|
|
19045
|
-
if (inviteCode) params.
|
|
19046
|
-
if (referralCode) params.
|
|
19047
|
-
|
|
19065
|
+
function buildOAuthQueryParams(inviteCode, referralCode, source) {
|
|
19066
|
+
const params = [];
|
|
19067
|
+
if (inviteCode) params.push(`invite=${encodeURIComponent(inviteCode)}`);
|
|
19068
|
+
if (referralCode) params.push(`referral=${encodeURIComponent(referralCode)}`);
|
|
19069
|
+
if (source) params.push(`source=${encodeURIComponent(JSON.stringify(source))}`);
|
|
19070
|
+
return params.length ? `?${params.join("&")}` : "";
|
|
19048
19071
|
}
|
|
19049
19072
|
__name(buildOAuthQueryParams, "buildOAuthQueryParams");
|
|
19050
19073
|
function Register() {
|
|
@@ -19060,9 +19083,11 @@ function Register() {
|
|
|
19060
19083
|
registrationMode === "waitlist" && !!inviteCode
|
|
19061
19084
|
);
|
|
19062
19085
|
const [referralCode, setReferralCode2] = useState65(null);
|
|
19086
|
+
const [signupSource, setSignupSource] = useState65(void 0);
|
|
19063
19087
|
useEffect55(() => {
|
|
19064
19088
|
const code = getReferralCode();
|
|
19065
19089
|
setReferralCode2(code);
|
|
19090
|
+
setSignupSource(getSignupSource());
|
|
19066
19091
|
}, []);
|
|
19067
19092
|
const formSchema = z5.object({
|
|
19068
19093
|
company: z5.string().min(1, {
|
|
@@ -19129,7 +19154,8 @@ function Register() {
|
|
|
19129
19154
|
marketingConsent: values.marketingConsent ?? false,
|
|
19130
19155
|
marketingConsentAt: values.marketingConsent ? (/* @__PURE__ */ new Date()).toISOString() : null,
|
|
19131
19156
|
inviteCode: inviteCode ?? void 0,
|
|
19132
|
-
referralCode: referralCode ?? void 0
|
|
19157
|
+
referralCode: referralCode ?? void 0,
|
|
19158
|
+
source: getSignupSource()
|
|
19133
19159
|
};
|
|
19134
19160
|
await AuthService.register(payload);
|
|
19135
19161
|
clearReferralCode();
|
|
@@ -19214,7 +19240,9 @@ function Register() {
|
|
|
19214
19240
|
form,
|
|
19215
19241
|
id: "email",
|
|
19216
19242
|
name: t(`common.fields.email.label`),
|
|
19217
|
-
placeholder: t(`common.fields.email.placeholder`)
|
|
19243
|
+
placeholder: t(`common.fields.email.placeholder`),
|
|
19244
|
+
disabled: inviteValidated,
|
|
19245
|
+
description: inviteValidated ? t("waitlist.invite.email_locked_hint") : void 0
|
|
19218
19246
|
}
|
|
19219
19247
|
),
|
|
19220
19248
|
/* @__PURE__ */ jsx202(
|
|
@@ -19238,7 +19266,7 @@ function Register() {
|
|
|
19238
19266
|
isGoogleAuthEnabled() && /* @__PURE__ */ jsx202(
|
|
19239
19267
|
Link,
|
|
19240
19268
|
{
|
|
19241
|
-
href: `${getPublicApiUrl()}auth/google${buildOAuthQueryParams(inviteCode, referralCode)}`,
|
|
19269
|
+
href: `${getPublicApiUrl()}auth/google${buildOAuthQueryParams(inviteCode, referralCode, signupSource)}`,
|
|
19242
19270
|
className: "flex w-full",
|
|
19243
19271
|
children: /* @__PURE__ */ jsxs112(
|
|
19244
19272
|
Button,
|
|
@@ -19286,7 +19314,7 @@ function Register() {
|
|
|
19286
19314
|
isDiscordAuthEnabled() && /* @__PURE__ */ jsx202(
|
|
19287
19315
|
Link,
|
|
19288
19316
|
{
|
|
19289
|
-
href: `${getPublicApiUrl()}auth/discord${buildOAuthQueryParams(inviteCode, referralCode)}`,
|
|
19317
|
+
href: `${getPublicApiUrl()}auth/discord${buildOAuthQueryParams(inviteCode, referralCode, signupSource)}`,
|
|
19290
19318
|
className: "flex w-full",
|
|
19291
19319
|
children: /* @__PURE__ */ jsxs112(Button, { className: "w-full", variant: "outline", type: "button", children: [
|
|
19292
19320
|
/* @__PURE__ */ jsx202("svg", { className: "me-2 h-5 w-5", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx202("path", { d: "M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z" }) }),
|
|
@@ -20117,15 +20145,17 @@ import Image9 from "next/image";
|
|
|
20117
20145
|
// src/features/auth/components/buttons/GoogleSignInButton.tsx
|
|
20118
20146
|
import { useTranslations as useTranslations88 } from "next-intl";
|
|
20119
20147
|
import { jsx as jsx214, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
20120
|
-
function GoogleSignInButton({ referralCode }) {
|
|
20148
|
+
function GoogleSignInButton({ referralCode, source }) {
|
|
20121
20149
|
const t = useTranslations88();
|
|
20122
20150
|
if (!isGoogleAuthEnabled()) {
|
|
20123
20151
|
return null;
|
|
20124
20152
|
}
|
|
20125
20153
|
const buildGoogleOAuthUrl = /* @__PURE__ */ __name(() => {
|
|
20126
20154
|
const baseUrl = `${getPublicApiUrl()}auth/google`;
|
|
20127
|
-
|
|
20128
|
-
|
|
20155
|
+
const params = [];
|
|
20156
|
+
if (referralCode) params.push(`referral=${encodeURIComponent(referralCode)}`);
|
|
20157
|
+
if (source) params.push(`source=${encodeURIComponent(JSON.stringify(source))}`);
|
|
20158
|
+
return params.length ? `${baseUrl}?${params.join("&")}` : baseUrl;
|
|
20129
20159
|
}, "buildGoogleOAuthUrl");
|
|
20130
20160
|
return /* @__PURE__ */ jsx214(Link, { href: buildGoogleOAuthUrl(), className: "flex w-full justify-end", children: /* @__PURE__ */ jsxs121(
|
|
20131
20161
|
Button,
|
|
@@ -25538,6 +25568,19 @@ function ReferralDialog({
|
|
|
25538
25568
|
}
|
|
25539
25569
|
__name(ReferralDialog, "ReferralDialog");
|
|
25540
25570
|
|
|
25571
|
+
// src/features/signup-source/SignupSourceCapture.tsx
|
|
25572
|
+
import { usePathname as usePathname4, useSearchParams as useSearchParams7 } from "next/navigation";
|
|
25573
|
+
import { useEffect as useEffect82 } from "react";
|
|
25574
|
+
function SignupSourceCapture({ persist }) {
|
|
25575
|
+
const searchParams = useSearchParams7();
|
|
25576
|
+
const pathname = usePathname4();
|
|
25577
|
+
useEffect82(() => {
|
|
25578
|
+
captureSignupSource({ persist });
|
|
25579
|
+
}, [pathname, searchParams, persist]);
|
|
25580
|
+
return null;
|
|
25581
|
+
}
|
|
25582
|
+
__name(SignupSourceCapture, "SignupSourceCapture");
|
|
25583
|
+
|
|
25541
25584
|
// src/features/role/components/details/RoleDetails.tsx
|
|
25542
25585
|
import { useTranslations as useTranslations147 } from "next-intl";
|
|
25543
25586
|
import { jsx as jsx287 } from "react/jsx-runtime";
|
|
@@ -25598,13 +25641,13 @@ __name(FormRoles, "FormRoles");
|
|
|
25598
25641
|
|
|
25599
25642
|
// src/features/role/components/forms/RemoveUserFromRole.tsx
|
|
25600
25643
|
import { useTranslations as useTranslations149 } from "next-intl";
|
|
25601
|
-
import { useEffect as
|
|
25644
|
+
import { useEffect as useEffect83, useState as useState108 } from "react";
|
|
25602
25645
|
import { Fragment as Fragment61, jsx as jsx290, jsxs as jsxs173 } from "react/jsx-runtime";
|
|
25603
25646
|
function RemoveUserFromRole({ role, user, refresh }) {
|
|
25604
25647
|
const [open, setOpen] = useState108(false);
|
|
25605
25648
|
const [canRemove, setCanRemove] = useState108(false);
|
|
25606
25649
|
const t = useTranslations149();
|
|
25607
|
-
|
|
25650
|
+
useEffect83(() => {
|
|
25608
25651
|
async function checkCompanyAdminDeletability() {
|
|
25609
25652
|
const roleUsers = await UserService.findAllUsersByRole({
|
|
25610
25653
|
roleId: role.id
|
|
@@ -25674,7 +25717,7 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
25674
25717
|
// src/features/role/components/forms/UserRoleAdd.tsx
|
|
25675
25718
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
25676
25719
|
import { useTranslations as useTranslations150 } from "next-intl";
|
|
25677
|
-
import { useCallback as useCallback52, useEffect as
|
|
25720
|
+
import { useCallback as useCallback52, useEffect as useEffect84, useRef as useRef47, useState as useState109 } from "react";
|
|
25678
25721
|
import { Fragment as Fragment62, jsx as jsx291, jsxs as jsxs174 } from "react/jsx-runtime";
|
|
25679
25722
|
function UserRoleAdd({ user, refresh }) {
|
|
25680
25723
|
const [open, setOpen] = useState109(false);
|
|
@@ -25716,10 +25759,10 @@ function UserRoleAdd({ user, refresh }) {
|
|
|
25716
25759
|
[searchTerm, user]
|
|
25717
25760
|
);
|
|
25718
25761
|
const updateSearchTerm = useDebounce2(searchRoles, 500);
|
|
25719
|
-
|
|
25762
|
+
useEffect84(() => {
|
|
25720
25763
|
if (open) updateSearchTerm(searchTerm);
|
|
25721
25764
|
}, [open, searchTerm]);
|
|
25722
|
-
|
|
25765
|
+
useEffect84(() => {
|
|
25723
25766
|
if (open) searchRoles("");
|
|
25724
25767
|
}, [open]);
|
|
25725
25768
|
return /* @__PURE__ */ jsxs174(Fragment62, { children: [
|
|
@@ -26679,6 +26722,7 @@ function WaitlistQuestionnaireRenderer({
|
|
|
26679
26722
|
fields,
|
|
26680
26723
|
fieldPrefix = "questionnaire"
|
|
26681
26724
|
}) {
|
|
26725
|
+
const text = useWaitlistText();
|
|
26682
26726
|
if (!fields || fields.length === 0) {
|
|
26683
26727
|
return null;
|
|
26684
26728
|
}
|
|
@@ -26691,8 +26735,8 @@ function WaitlistQuestionnaireRenderer({
|
|
|
26691
26735
|
{
|
|
26692
26736
|
form,
|
|
26693
26737
|
id: fieldId,
|
|
26694
|
-
name: field.label,
|
|
26695
|
-
placeholder: field.placeholder,
|
|
26738
|
+
name: text(field.label) ?? field.label,
|
|
26739
|
+
placeholder: text(field.placeholder),
|
|
26696
26740
|
isRequired: field.required
|
|
26697
26741
|
},
|
|
26698
26742
|
field.id
|
|
@@ -26703,8 +26747,8 @@ function WaitlistQuestionnaireRenderer({
|
|
|
26703
26747
|
{
|
|
26704
26748
|
form,
|
|
26705
26749
|
id: fieldId,
|
|
26706
|
-
name: field.label,
|
|
26707
|
-
placeholder: field.placeholder,
|
|
26750
|
+
name: text(field.label) ?? field.label,
|
|
26751
|
+
placeholder: text(field.placeholder),
|
|
26708
26752
|
className: "min-h-24"
|
|
26709
26753
|
},
|
|
26710
26754
|
field.id
|
|
@@ -26718,10 +26762,10 @@ function WaitlistQuestionnaireRenderer({
|
|
|
26718
26762
|
{
|
|
26719
26763
|
form,
|
|
26720
26764
|
id: fieldId,
|
|
26721
|
-
name: field.label,
|
|
26765
|
+
name: text(field.label) ?? field.label,
|
|
26722
26766
|
values: field.options.map((opt) => ({
|
|
26723
26767
|
id: opt.value,
|
|
26724
|
-
text: opt.label
|
|
26768
|
+
text: text(opt.label) ?? opt.label
|
|
26725
26769
|
}))
|
|
26726
26770
|
},
|
|
26727
26771
|
field.id
|
|
@@ -26733,8 +26777,8 @@ function WaitlistQuestionnaireRenderer({
|
|
|
26733
26777
|
{
|
|
26734
26778
|
form,
|
|
26735
26779
|
id: fieldId,
|
|
26736
|
-
name: field.label,
|
|
26737
|
-
description: field.description,
|
|
26780
|
+
name: text(field.label) ?? field.label,
|
|
26781
|
+
description: text(field.description),
|
|
26738
26782
|
isRequired: field.required
|
|
26739
26783
|
},
|
|
26740
26784
|
field.id
|
|
@@ -26742,17 +26786,17 @@ function WaitlistQuestionnaireRenderer({
|
|
|
26742
26786
|
}
|
|
26743
26787
|
return /* @__PURE__ */ jsxs187("div", { className: "space-y-2", children: [
|
|
26744
26788
|
/* @__PURE__ */ jsxs187("span", { className: "text-sm font-medium", children: [
|
|
26745
|
-
field.label,
|
|
26789
|
+
text(field.label) ?? field.label,
|
|
26746
26790
|
field.required && /* @__PURE__ */ jsx306("span", { className: "ms-1 text-destructive", children: "*" })
|
|
26747
26791
|
] }),
|
|
26748
|
-
field.description && /* @__PURE__ */ jsx306("p", { className: "text-muted-foreground text-xs", children: field.description }),
|
|
26792
|
+
field.description && /* @__PURE__ */ jsx306("p", { className: "text-muted-foreground text-xs", children: text(field.description) }),
|
|
26749
26793
|
/* @__PURE__ */ jsx306("div", { className: "space-y-2", children: field.options.map((option) => /* @__PURE__ */ jsx306(
|
|
26750
26794
|
FormCheckbox,
|
|
26751
26795
|
{
|
|
26752
26796
|
form,
|
|
26753
26797
|
id: `${fieldId}.${option.value}`,
|
|
26754
|
-
name: option.label,
|
|
26755
|
-
description: option.description
|
|
26798
|
+
name: text(option.label) ?? option.label,
|
|
26799
|
+
description: text(option.description)
|
|
26756
26800
|
},
|
|
26757
26801
|
option.value
|
|
26758
26802
|
)) })
|
|
@@ -26843,7 +26887,8 @@ function WaitlistForm({ onSuccess }) {
|
|
|
26843
26887
|
gdprConsentAt: now,
|
|
26844
26888
|
marketingConsent: values.marketingConsent ?? false,
|
|
26845
26889
|
marketingConsentAt: values.marketingConsent ? now : void 0,
|
|
26846
|
-
questionnaire: values.questionnaire
|
|
26890
|
+
questionnaire: values.questionnaire,
|
|
26891
|
+
source: getSignupSource()
|
|
26847
26892
|
});
|
|
26848
26893
|
setIsSuccess(true);
|
|
26849
26894
|
onSuccess?.();
|
|
@@ -26913,16 +26958,17 @@ import { CheckCircle as CheckCircle2 } from "lucide-react";
|
|
|
26913
26958
|
import { jsx as jsx308, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
26914
26959
|
function WaitlistHeroSection() {
|
|
26915
26960
|
const config = getWaitlistConfig();
|
|
26961
|
+
const text = useWaitlistText();
|
|
26916
26962
|
return /* @__PURE__ */ jsx308("section", { className: "relative overflow-hidden py-16 md:py-24", children: /* @__PURE__ */ jsx308("div", { className: "container mx-auto px-4", children: /* @__PURE__ */ jsxs189("div", { className: "grid gap-12 lg:grid-cols-2 lg:items-center", children: [
|
|
26917
26963
|
/* @__PURE__ */ jsxs189("div", { className: "space-y-8", children: [
|
|
26918
26964
|
/* @__PURE__ */ jsxs189("div", { className: "space-y-4", children: [
|
|
26919
|
-
config.heroTitle && /* @__PURE__ */ jsx308("h1", { className: "text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl", children: config.heroTitle }),
|
|
26920
|
-
config.heroSubtitle && /* @__PURE__ */ jsx308("p", { className: "text-muted-foreground text-xl md:text-2xl", children: config.heroSubtitle }),
|
|
26921
|
-
config.heroDescription && /* @__PURE__ */ jsx308("p", { className: "text-muted-foreground", children: config.heroDescription })
|
|
26965
|
+
config.heroTitle && /* @__PURE__ */ jsx308("h1", { className: "text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl", children: text(config.heroTitle) }),
|
|
26966
|
+
config.heroSubtitle && /* @__PURE__ */ jsx308("p", { className: "text-muted-foreground text-xl md:text-2xl", children: text(config.heroSubtitle) }),
|
|
26967
|
+
config.heroDescription && /* @__PURE__ */ jsx308("p", { className: "text-muted-foreground", children: text(config.heroDescription) })
|
|
26922
26968
|
] }),
|
|
26923
26969
|
config.benefits && config.benefits.length > 0 && /* @__PURE__ */ jsx308("ul", { className: "space-y-3", children: config.benefits.map((benefit, index) => /* @__PURE__ */ jsxs189("li", { className: "flex items-start gap-3", children: [
|
|
26924
26970
|
/* @__PURE__ */ jsx308(CheckCircle2, { className: "text-primary mt-0.5 h-5 w-5 shrink-0" }),
|
|
26925
|
-
/* @__PURE__ */ jsx308("span", { children: benefit })
|
|
26971
|
+
/* @__PURE__ */ jsx308("span", { children: text(benefit) })
|
|
26926
26972
|
] }, index)) })
|
|
26927
26973
|
] }),
|
|
26928
26974
|
/* @__PURE__ */ jsx308("div", { className: "lg:pl-8", children: /* @__PURE__ */ jsx308("div", { className: "bg-card rounded-lg border p-6 shadow-lg md:p-8", children: /* @__PURE__ */ jsx308(WaitlistForm, {}) }) })
|
|
@@ -26948,13 +26994,13 @@ __name(WaitlistSuccessState, "WaitlistSuccessState");
|
|
|
26948
26994
|
// src/features/waitlist/components/sections/WaitlistConfirmation.tsx
|
|
26949
26995
|
import { CheckCircle as CheckCircle4, Loader2 as Loader28, XCircle as XCircle2 } from "lucide-react";
|
|
26950
26996
|
import { useTranslations as useTranslations167 } from "next-intl";
|
|
26951
|
-
import { useEffect as
|
|
26997
|
+
import { useEffect as useEffect85, useState as useState114 } from "react";
|
|
26952
26998
|
import { jsx as jsx310, jsxs as jsxs191 } from "react/jsx-runtime";
|
|
26953
26999
|
function WaitlistConfirmation({ code }) {
|
|
26954
27000
|
const t = useTranslations167();
|
|
26955
27001
|
const [state, setState] = useState114("loading");
|
|
26956
27002
|
const [errorMessage, setErrorMessage] = useState114("");
|
|
26957
|
-
|
|
27003
|
+
useEffect85(() => {
|
|
26958
27004
|
async function confirmEmail() {
|
|
26959
27005
|
try {
|
|
26960
27006
|
await WaitlistService.confirm(code);
|
|
@@ -26993,21 +27039,36 @@ __name(WaitlistConfirmation, "WaitlistConfirmation");
|
|
|
26993
27039
|
// src/features/waitlist/components/lists/WaitlistList.tsx
|
|
26994
27040
|
import { RefreshCw as RefreshCw4 } from "lucide-react";
|
|
26995
27041
|
import { useTranslations as useTranslations168 } from "next-intl";
|
|
26996
|
-
import { useMemo as useMemo59, useState as useState115 } from "react";
|
|
27042
|
+
import { useCallback as useCallback58, useEffect as useEffect86, useMemo as useMemo59, useState as useState115 } from "react";
|
|
26997
27043
|
import { jsx as jsx311, jsxs as jsxs192 } from "react/jsx-runtime";
|
|
26998
27044
|
function WaitlistList({ fullWidth } = {}) {
|
|
26999
27045
|
const t = useTranslations168();
|
|
27000
27046
|
const [statusFilter, setStatusFilter] = useState115("all");
|
|
27047
|
+
const [stats, setStats] = useState115(void 0);
|
|
27001
27048
|
const data = useDataListRetriever({
|
|
27002
27049
|
retriever: /* @__PURE__ */ __name((params) => WaitlistService.findMany(params), "retriever"),
|
|
27003
27050
|
retrieverParams: {},
|
|
27004
27051
|
module: Modules.Waitlist
|
|
27005
27052
|
});
|
|
27053
|
+
const loadStats = useCallback58(async () => {
|
|
27054
|
+
try {
|
|
27055
|
+
setStats(await WaitlistService.getStats());
|
|
27056
|
+
} catch (error) {
|
|
27057
|
+
errorToast({ title: t("common.errors.error"), error });
|
|
27058
|
+
}
|
|
27059
|
+
}, [t]);
|
|
27060
|
+
useEffect86(() => {
|
|
27061
|
+
void loadStats();
|
|
27062
|
+
}, [loadStats]);
|
|
27063
|
+
const refresh = /* @__PURE__ */ __name(() => {
|
|
27064
|
+
void data.refresh();
|
|
27065
|
+
void loadStats();
|
|
27066
|
+
}, "refresh");
|
|
27006
27067
|
const handleInvite = /* @__PURE__ */ __name(async (entry) => {
|
|
27007
27068
|
try {
|
|
27008
27069
|
await WaitlistService.invite(entry.id);
|
|
27009
27070
|
showToast(t("waitlist.admin.invite_sent", { email: entry.email }));
|
|
27010
|
-
|
|
27071
|
+
refresh();
|
|
27011
27072
|
} catch (error) {
|
|
27012
27073
|
errorToast({ title: t("common.errors.error"), error });
|
|
27013
27074
|
}
|
|
@@ -27038,35 +27099,49 @@ function WaitlistList({ fullWidth } = {}) {
|
|
|
27038
27099
|
/* @__PURE__ */ jsx311(SelectItem, { value: "registered", children: t("waitlist.admin.status.registered") })
|
|
27039
27100
|
] })
|
|
27040
27101
|
] }),
|
|
27041
|
-
/* @__PURE__ */ jsx311(Button, { variant: "outline", size: "icon", onClick:
|
|
27102
|
+
/* @__PURE__ */ jsx311(Button, { variant: "outline", size: "icon", onClick: refresh, disabled: !data.isLoaded, children: /* @__PURE__ */ jsx311(RefreshCw4, { className: `h-4 w-4 ${!data.isLoaded ? "animate-spin" : ""}` }) })
|
|
27103
|
+
] });
|
|
27104
|
+
const totals = [
|
|
27105
|
+
{ key: "total", label: t("waitlist.admin.total"), value: stats?.total },
|
|
27106
|
+
{ key: "pending", label: t("waitlist.admin.status.pending"), value: stats?.pending },
|
|
27107
|
+
{ key: "confirmed", label: t("waitlist.admin.status.confirmed"), value: stats?.confirmed },
|
|
27108
|
+
{ key: "invited", label: t("waitlist.admin.status.invited"), value: stats?.invited },
|
|
27109
|
+
{ key: "registered", label: t("waitlist.admin.status.registered"), value: stats?.registered }
|
|
27110
|
+
];
|
|
27111
|
+
return /* @__PURE__ */ jsxs192("div", { className: "flex flex-col gap-4", children: [
|
|
27112
|
+
/* @__PURE__ */ jsx311("dl", { className: "grid grid-cols-5 divide-x divide-border rounded-md border", "data-testid": "waitlist-totals", children: totals.map((total) => /* @__PURE__ */ jsxs192("div", { className: "flex flex-col-reverse items-center gap-1 p-3", children: [
|
|
27113
|
+
/* @__PURE__ */ jsx311("dt", { className: "text-muted-foreground text-xs", children: total.label }),
|
|
27114
|
+
/* @__PURE__ */ jsx311("dd", { className: "text-primary text-xl font-semibold tabular-nums", children: total.value ?? "-" })
|
|
27115
|
+
] }, total.key)) }),
|
|
27116
|
+
/* @__PURE__ */ jsx311(
|
|
27117
|
+
ContentListTable,
|
|
27118
|
+
{
|
|
27119
|
+
data,
|
|
27120
|
+
fields: [
|
|
27121
|
+
"email" /* email */,
|
|
27122
|
+
"status" /* status */,
|
|
27123
|
+
"createdAt" /* createdAt */,
|
|
27124
|
+
"source" /* source */,
|
|
27125
|
+
"questionnaire" /* questionnaire */,
|
|
27126
|
+
"actions" /* actions */
|
|
27127
|
+
],
|
|
27128
|
+
tableGeneratorType: Modules.Waitlist,
|
|
27129
|
+
title: t("waitlist.admin.title"),
|
|
27130
|
+
filters,
|
|
27131
|
+
allowSearch: false,
|
|
27132
|
+
context: { onInvite: handleInvite },
|
|
27133
|
+
fullWidth,
|
|
27134
|
+
emptyState: t("waitlist.admin.empty")
|
|
27135
|
+
}
|
|
27136
|
+
)
|
|
27042
27137
|
] });
|
|
27043
|
-
return /* @__PURE__ */ jsx311(
|
|
27044
|
-
ContentListTable,
|
|
27045
|
-
{
|
|
27046
|
-
data,
|
|
27047
|
-
fields: [
|
|
27048
|
-
"email" /* email */,
|
|
27049
|
-
"status" /* status */,
|
|
27050
|
-
"createdAt" /* createdAt */,
|
|
27051
|
-
"questionnaire" /* questionnaire */,
|
|
27052
|
-
"actions" /* actions */
|
|
27053
|
-
],
|
|
27054
|
-
tableGeneratorType: Modules.Waitlist,
|
|
27055
|
-
title: t("waitlist.admin.title"),
|
|
27056
|
-
filters,
|
|
27057
|
-
allowSearch: false,
|
|
27058
|
-
context: { onInvite: handleInvite },
|
|
27059
|
-
fullWidth,
|
|
27060
|
-
emptyState: t("waitlist.admin.empty")
|
|
27061
|
-
}
|
|
27062
|
-
);
|
|
27063
27138
|
}
|
|
27064
27139
|
__name(WaitlistList, "WaitlistList");
|
|
27065
27140
|
|
|
27066
27141
|
// src/features/rbac/components/RbacContainer.tsx
|
|
27067
27142
|
import { Loader2Icon as Loader2Icon4 } from "lucide-react";
|
|
27068
27143
|
import { useTranslations as useTranslations170 } from "next-intl";
|
|
27069
|
-
import { memo as memo2, useCallback as
|
|
27144
|
+
import { memo as memo2, useCallback as useCallback60, useEffect as useEffect88, useMemo as useMemo60, useRef as useRef48, useState as useState117 } from "react";
|
|
27070
27145
|
|
|
27071
27146
|
// src/features/rbac/components/RbacPermissionCell.tsx
|
|
27072
27147
|
import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon12 } from "lucide-react";
|
|
@@ -27147,7 +27222,7 @@ __name(RbacPermissionCell, "RbacPermissionCell");
|
|
|
27147
27222
|
import { Popover as PopoverPrimitive2 } from "@base-ui/react/popover";
|
|
27148
27223
|
import { CheckIcon as CheckIcon10, MinusIcon as MinusIcon3, XIcon as XIcon13 } from "lucide-react";
|
|
27149
27224
|
import { useTranslations as useTranslations169 } from "next-intl";
|
|
27150
|
-
import { useCallback as
|
|
27225
|
+
import { useCallback as useCallback59, useEffect as useEffect87, useState as useState116 } from "react";
|
|
27151
27226
|
import { Fragment as Fragment66, jsx as jsx313, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
27152
27227
|
function RbacPermissionPicker({
|
|
27153
27228
|
open,
|
|
@@ -27161,11 +27236,11 @@ function RbacPermissionPicker({
|
|
|
27161
27236
|
}) {
|
|
27162
27237
|
const t = useTranslations169();
|
|
27163
27238
|
const [customSegment, setCustomSegment] = useState116("");
|
|
27164
|
-
|
|
27239
|
+
useEffect87(() => {
|
|
27165
27240
|
if (!open) setCustomSegment("");
|
|
27166
27241
|
}, [open]);
|
|
27167
27242
|
const currentSegments = typeof value === "string" ? value.split("|").filter(Boolean) : [];
|
|
27168
|
-
const toggleSegment =
|
|
27243
|
+
const toggleSegment = useCallback59(
|
|
27169
27244
|
(segment) => {
|
|
27170
27245
|
const next = currentSegments.includes(segment) ? currentSegments.filter((s) => s !== segment) : [...currentSegments, segment];
|
|
27171
27246
|
if (next.length === 0) onSetValue(false);
|
|
@@ -27173,7 +27248,7 @@ function RbacPermissionPicker({
|
|
|
27173
27248
|
},
|
|
27174
27249
|
[currentSegments, onSetValue]
|
|
27175
27250
|
);
|
|
27176
|
-
const addCustomSegment =
|
|
27251
|
+
const addCustomSegment = useCallback59(() => {
|
|
27177
27252
|
const segment = customSegment.trim();
|
|
27178
27253
|
if (!segment) return;
|
|
27179
27254
|
if (!currentSegments.includes(segment)) {
|
|
@@ -27337,7 +27412,7 @@ var CellButton = memo2(/* @__PURE__ */ __name(function CellButton2({
|
|
|
27337
27412
|
}) {
|
|
27338
27413
|
const ref = useRef48(null);
|
|
27339
27414
|
const value = cellValue(tokens, action);
|
|
27340
|
-
const handleClick =
|
|
27415
|
+
const handleClick = useCallback60(() => {
|
|
27341
27416
|
if (!ref.current) return;
|
|
27342
27417
|
onOpen({ moduleId, rowKey, action, isRoleColumn, anchor: ref.current });
|
|
27343
27418
|
}, [onOpen, moduleId, rowKey, action, isRoleColumn]);
|
|
@@ -27411,13 +27486,13 @@ function RbacContainer() {
|
|
|
27411
27486
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
27412
27487
|
const [selectedModuleId, setSelectedModuleId] = useState117(null);
|
|
27413
27488
|
const [activePicker, setActivePicker] = useState117(null);
|
|
27414
|
-
const openPicker =
|
|
27489
|
+
const openPicker = useCallback60((picker) => {
|
|
27415
27490
|
setActivePicker(picker);
|
|
27416
27491
|
}, []);
|
|
27417
|
-
const closePicker =
|
|
27492
|
+
const closePicker = useCallback60(() => {
|
|
27418
27493
|
setActivePicker(null);
|
|
27419
27494
|
}, []);
|
|
27420
|
-
const handleSelectModule =
|
|
27495
|
+
const handleSelectModule = useCallback60((id) => {
|
|
27421
27496
|
setSelectedModuleId(id);
|
|
27422
27497
|
setActivePicker(null);
|
|
27423
27498
|
}, []);
|
|
@@ -27438,7 +27513,7 @@ function RbacContainer() {
|
|
|
27438
27513
|
}
|
|
27439
27514
|
return Array.from(set).sort();
|
|
27440
27515
|
}, [matrix, roleNames]);
|
|
27441
|
-
|
|
27516
|
+
useEffect88(() => {
|
|
27442
27517
|
if (!selectedModuleId && sortedModuleIds.length > 0) {
|
|
27443
27518
|
setSelectedModuleId(sortedModuleIds[0]);
|
|
27444
27519
|
}
|
|
@@ -27454,14 +27529,14 @@ function RbacContainer() {
|
|
|
27454
27529
|
if (!activePicker) return [];
|
|
27455
27530
|
return modulePaths[activePicker.moduleId] ?? [];
|
|
27456
27531
|
}, [activePicker, modulePaths]);
|
|
27457
|
-
const handleSetValue =
|
|
27532
|
+
const handleSetValue = useCallback60(
|
|
27458
27533
|
(value) => {
|
|
27459
27534
|
if (!activePicker) return;
|
|
27460
27535
|
updateCell(activePicker.moduleId, activePicker.rowKey, activePicker.action, value);
|
|
27461
27536
|
},
|
|
27462
27537
|
[activePicker, updateCell]
|
|
27463
27538
|
);
|
|
27464
|
-
const handleClear =
|
|
27539
|
+
const handleClear = useCallback60(() => {
|
|
27465
27540
|
if (!activePicker || !activePicker.isRoleColumn) return;
|
|
27466
27541
|
clearCell(activePicker.moduleId, activePicker.rowKey, activePicker.action);
|
|
27467
27542
|
}, [activePicker, clearCell]);
|
|
@@ -27521,7 +27596,7 @@ __name(RbacContainer, "RbacContainer");
|
|
|
27521
27596
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
27522
27597
|
import { Loader2Icon as Loader2Icon5 } from "lucide-react";
|
|
27523
27598
|
import { useTranslations as useTranslations171 } from "next-intl";
|
|
27524
|
-
import { Fragment as Fragment67, memo as memo3, useCallback as
|
|
27599
|
+
import { Fragment as Fragment67, memo as memo3, useCallback as useCallback61, useEffect as useEffect89, useMemo as useMemo61, useRef as useRef49, useState as useState118 } from "react";
|
|
27525
27600
|
import { jsx as jsx315, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
27526
27601
|
function findToken2(tokens, action) {
|
|
27527
27602
|
if (!tokens) return void 0;
|
|
@@ -27544,7 +27619,7 @@ var CellButton3 = memo3(/* @__PURE__ */ __name(function CellButton4({
|
|
|
27544
27619
|
}) {
|
|
27545
27620
|
const ref = useRef49(null);
|
|
27546
27621
|
const value = cellValue2(tokens, action);
|
|
27547
|
-
const handleClick =
|
|
27622
|
+
const handleClick = useCallback61(() => {
|
|
27548
27623
|
if (!ref.current) return;
|
|
27549
27624
|
onOpen({ moduleId, rowKey, action, isRoleColumn, anchor: ref.current });
|
|
27550
27625
|
}, [onOpen, moduleId, rowKey, action, isRoleColumn]);
|
|
@@ -27561,13 +27636,13 @@ function RbacByRoleContainer() {
|
|
|
27561
27636
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
27562
27637
|
const [selectedRoleId, setSelectedRoleId] = useState118(null);
|
|
27563
27638
|
const [activePicker, setActivePicker] = useState118(null);
|
|
27564
|
-
const openPicker =
|
|
27639
|
+
const openPicker = useCallback61((picker) => {
|
|
27565
27640
|
setActivePicker(picker);
|
|
27566
27641
|
}, []);
|
|
27567
|
-
const closePicker =
|
|
27642
|
+
const closePicker = useCallback61(() => {
|
|
27568
27643
|
setActivePicker(null);
|
|
27569
27644
|
}, []);
|
|
27570
|
-
const handleSelectRole =
|
|
27645
|
+
const handleSelectRole = useCallback61((id) => {
|
|
27571
27646
|
setSelectedRoleId(id);
|
|
27572
27647
|
setActivePicker(null);
|
|
27573
27648
|
}, []);
|
|
@@ -27579,7 +27654,7 @@ function RbacByRoleContainer() {
|
|
|
27579
27654
|
if (!matrix) return [];
|
|
27580
27655
|
return Object.keys(matrix).sort((a, b) => (moduleNames?.[a] ?? a).localeCompare(moduleNames?.[b] ?? b));
|
|
27581
27656
|
}, [matrix, moduleNames]);
|
|
27582
|
-
|
|
27657
|
+
useEffect89(() => {
|
|
27583
27658
|
if (!selectedRoleId && sortedRoleIds.length > 0) {
|
|
27584
27659
|
setSelectedRoleId(sortedRoleIds[0]);
|
|
27585
27660
|
}
|
|
@@ -27595,14 +27670,14 @@ function RbacByRoleContainer() {
|
|
|
27595
27670
|
if (!activePicker) return [];
|
|
27596
27671
|
return modulePaths[activePicker.moduleId] ?? [];
|
|
27597
27672
|
}, [activePicker, modulePaths]);
|
|
27598
|
-
const handleSetValue =
|
|
27673
|
+
const handleSetValue = useCallback61(
|
|
27599
27674
|
(value) => {
|
|
27600
27675
|
if (!activePicker) return;
|
|
27601
27676
|
updateCell(activePicker.moduleId, activePicker.rowKey, activePicker.action, value);
|
|
27602
27677
|
},
|
|
27603
27678
|
[activePicker, updateCell]
|
|
27604
27679
|
);
|
|
27605
|
-
const handleClear =
|
|
27680
|
+
const handleClear = useCallback61(() => {
|
|
27606
27681
|
if (!activePicker || !activePicker.isRoleColumn) return;
|
|
27607
27682
|
clearCell(activePicker.moduleId, activePicker.rowKey, activePicker.action);
|
|
27608
27683
|
}, [activePicker, clearCell]);
|
|
@@ -28236,6 +28311,7 @@ export {
|
|
|
28236
28311
|
ReferralCodeCapture,
|
|
28237
28312
|
ReferralWidget,
|
|
28238
28313
|
ReferralDialog,
|
|
28314
|
+
SignupSourceCapture,
|
|
28239
28315
|
RoleProvider,
|
|
28240
28316
|
useRoleContext,
|
|
28241
28317
|
RoleDetails,
|
|
@@ -28306,4 +28382,4 @@ export {
|
|
|
28306
28382
|
useOAuthClients,
|
|
28307
28383
|
useOAuthClient
|
|
28308
28384
|
};
|
|
28309
|
-
//# sourceMappingURL=chunk-
|
|
28385
|
+
//# sourceMappingURL=chunk-MIZTWBPX.mjs.map
|