@carlonicora/nextjs-jsonapi 4.0.6 → 4.0.7
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-JJ3S5COJ.js → BlockNoteEditor-J7EF7BRX.js} +9 -9
- package/dist/{BlockNoteEditor-JJ3S5COJ.js.map → BlockNoteEditor-J7EF7BRX.js.map} +1 -1
- package/dist/{BlockNoteEditor-6CTF5DEV.mjs → BlockNoteEditor-KOHN3SSR.mjs} +2 -2
- package/dist/billing/index.js +335 -335
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-XUUHPYMM.js → chunk-3M7D6NXU.js} +8 -3
- package/dist/chunk-3M7D6NXU.js.map +1 -0
- package/dist/{chunk-Y2AWOWWH.mjs → chunk-3W3VVX2N.mjs} +310 -305
- package/dist/chunk-3W3VVX2N.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/features/analytics/index.js +88 -88
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +75 -75
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/navigations/RecentPagesNavigator.tsx +11 -1
- package/src/components/navigations/__tests__/RecentPagesNavigator.spec.tsx +19 -0
- package/dist/chunk-XUUHPYMM.js.map +0 -1
- package/dist/chunk-Y2AWOWWH.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-6CTF5DEV.mjs.map → BlockNoteEditor-KOHN3SSR.mjs.map} +0 -0
|
@@ -10561,7 +10561,7 @@ import { useRef as useRef18 } from "react";
|
|
|
10561
10561
|
import dynamic from "next/dynamic";
|
|
10562
10562
|
import React18 from "react";
|
|
10563
10563
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
10564
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10564
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-KOHN3SSR.mjs"), {
|
|
10565
10565
|
ssr: false
|
|
10566
10566
|
});
|
|
10567
10567
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -15552,15 +15552,20 @@ import { useAtomValue } from "jotai";
|
|
|
15552
15552
|
import { HistoryIcon } from "lucide-react";
|
|
15553
15553
|
import { useTranslations as useTranslations52 } from "next-intl";
|
|
15554
15554
|
import { usePathname as usePathname3 } from "next/navigation";
|
|
15555
|
+
import { useEffect as useEffect41, useState as useState51 } from "react";
|
|
15555
15556
|
import { jsx as jsx166, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
15556
15557
|
function RecentPagesNavigator() {
|
|
15557
15558
|
const recentPages = useAtomValue(recentPagesAtom);
|
|
15558
15559
|
const t = useTranslations52();
|
|
15559
15560
|
const { isMobile } = useSidebar();
|
|
15560
15561
|
const pathname = usePathname3();
|
|
15562
|
+
const [mounted, setMounted] = useState51(false);
|
|
15563
|
+
useEffect41(() => {
|
|
15564
|
+
setMounted(true);
|
|
15565
|
+
}, []);
|
|
15561
15566
|
const isCurrentPage = /* @__PURE__ */ __name((url) => !!pathname && (pathname === url || pathname.startsWith(`${url}/`)), "isCurrentPage");
|
|
15562
15567
|
const pages = recentPages.filter((page) => !isCurrentPage(page.url));
|
|
15563
|
-
if (pages.length === 0) return null;
|
|
15568
|
+
if (!mounted || pages.length === 0) return null;
|
|
15564
15569
|
return /* @__PURE__ */ jsx166(SidebarMenuItem, { children: /* @__PURE__ */ jsxs91(DropdownMenu, { children: [
|
|
15565
15570
|
/* @__PURE__ */ jsxs91(
|
|
15566
15571
|
DropdownMenuTrigger,
|
|
@@ -15640,14 +15645,14 @@ __name(partitionTabs, "partitionTabs");
|
|
|
15640
15645
|
|
|
15641
15646
|
// src/components/containers/MermaidDiagram.tsx
|
|
15642
15647
|
import { useTheme as useTheme3 } from "next-themes";
|
|
15643
|
-
import { useEffect as
|
|
15648
|
+
import { useEffect as useEffect42, useId as useId4, useState as useState52 } from "react";
|
|
15644
15649
|
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
15645
15650
|
function MermaidDiagram({ chart }) {
|
|
15646
15651
|
const reactId = useId4();
|
|
15647
15652
|
const { resolvedTheme } = useTheme3();
|
|
15648
|
-
const [svg, setSvg] =
|
|
15649
|
-
const [failed, setFailed] =
|
|
15650
|
-
|
|
15653
|
+
const [svg, setSvg] = useState52(void 0);
|
|
15654
|
+
const [failed, setFailed] = useState52(false);
|
|
15655
|
+
useEffect42(() => {
|
|
15651
15656
|
let cancelled = false;
|
|
15652
15657
|
const draw = /* @__PURE__ */ __name(async () => {
|
|
15653
15658
|
try {
|
|
@@ -15709,7 +15714,7 @@ __name(MermaidDiagram, "MermaidDiagram");
|
|
|
15709
15714
|
// src/components/containers/ReactMarkdownContainer.tsx
|
|
15710
15715
|
import { ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
|
|
15711
15716
|
import { useTranslations as useTranslations53 } from "next-intl";
|
|
15712
|
-
import { useEffect as
|
|
15717
|
+
import { useEffect as useEffect43, useRef as useRef28, useState as useState53 } from "react";
|
|
15713
15718
|
import ReactMarkdown from "react-markdown";
|
|
15714
15719
|
import rehypeSlug from "rehype-slug";
|
|
15715
15720
|
import remarkGfm from "remark-gfm";
|
|
@@ -15732,10 +15737,10 @@ function ReactMarkdownContainer({
|
|
|
15732
15737
|
size = "normal"
|
|
15733
15738
|
}) {
|
|
15734
15739
|
const t = useTranslations53("ui.buttons");
|
|
15735
|
-
const [isExpanded, setIsExpanded] =
|
|
15736
|
-
const [showExpandButton, setShowExpandButton] =
|
|
15740
|
+
const [isExpanded, setIsExpanded] = useState53(false);
|
|
15741
|
+
const [showExpandButton, setShowExpandButton] = useState53(false);
|
|
15737
15742
|
const contentRef = useRef28(null);
|
|
15738
|
-
|
|
15743
|
+
useEffect43(() => {
|
|
15739
15744
|
if (collapsible && contentRef.current && !isExpanded) {
|
|
15740
15745
|
const isOverflowing = contentRef.current.scrollHeight > contentRef.current.clientHeight;
|
|
15741
15746
|
setShowExpandButton(isOverflowing);
|
|
@@ -15957,7 +15962,7 @@ __name(RoundPageContainerTitle, "RoundPageContainerTitle");
|
|
|
15957
15962
|
|
|
15958
15963
|
// src/components/containers/RoundPageContainer.tsx
|
|
15959
15964
|
import { useSearchParams } from "next/navigation";
|
|
15960
|
-
import { Fragment as Fragment25, useCallback as useCallback27, useEffect as
|
|
15965
|
+
import { Fragment as Fragment25, useCallback as useCallback27, useEffect as useEffect44, useMemo as useMemo23, useRef as useRef29, useState as useState54 } from "react";
|
|
15961
15966
|
import { Fragment as Fragment26, jsx as jsx171, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
15962
15967
|
var DETAILS_COOKIE_NAME = "round_page_details_state";
|
|
15963
15968
|
var DETAILS_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -15997,22 +16002,22 @@ function RoundPageContainer({
|
|
|
15997
16002
|
const headerLeftContent = useHeaderLeftContent();
|
|
15998
16003
|
const headerLogo = useHeaderLogo();
|
|
15999
16004
|
const headerMobileChildren = useHeaderMobileChildren();
|
|
16000
|
-
const [showDetails, setShowDetailsState] =
|
|
16001
|
-
const [showDetailsMobile, setShowDetailsMobile] =
|
|
16005
|
+
const [showDetails, setShowDetailsState] = useState54(defaultDetailsOpen);
|
|
16006
|
+
const [showDetailsMobile, setShowDetailsMobile] = useState54(false);
|
|
16002
16007
|
const isMobile = useIsMobile();
|
|
16003
16008
|
const hasMobileNavigation = useMobileNavigationItems().length > 0;
|
|
16004
16009
|
const hasSidebar = useOptionalSidebar() !== null;
|
|
16005
|
-
const [mounted, setMounted] =
|
|
16006
|
-
|
|
16010
|
+
const [mounted, setMounted] = useState54(false);
|
|
16011
|
+
useEffect44(() => {
|
|
16007
16012
|
const match = document.cookie.split("; ").find((row) => row.startsWith(`${detailsCookieName}=`));
|
|
16008
16013
|
const stored = match?.split("=")[1];
|
|
16009
16014
|
if (stored === "true") setShowDetailsState(true);
|
|
16010
16015
|
else if (stored === "false") setShowDetailsState(false);
|
|
16011
16016
|
}, []);
|
|
16012
|
-
|
|
16017
|
+
useEffect44(() => {
|
|
16013
16018
|
setMounted(true);
|
|
16014
16019
|
}, []);
|
|
16015
|
-
|
|
16020
|
+
useEffect44(() => {
|
|
16016
16021
|
document.documentElement.dataset.scrollMode = scroll;
|
|
16017
16022
|
}, [scroll]);
|
|
16018
16023
|
const isFixed = scroll === "fixed";
|
|
@@ -16032,9 +16037,9 @@ function RoundPageContainer({
|
|
|
16032
16037
|
const section = searchParams.get("section");
|
|
16033
16038
|
const rewriteUrl = useUrlRewriter();
|
|
16034
16039
|
const initialValue = tabs ? (section && tabs.find((i) => tabValue(i) === section) ? section : null) || tabValue(tabs[0]) : void 0;
|
|
16035
|
-
const [activeTab, setActiveTab] =
|
|
16040
|
+
const [activeTab, setActiveTab] = useState54(initialValue);
|
|
16036
16041
|
const previousSection = useRef29(section);
|
|
16037
|
-
|
|
16042
|
+
useEffect44(() => {
|
|
16038
16043
|
if (tabs && section) {
|
|
16039
16044
|
const tab = tabs.find((i) => tabValue(i) === section);
|
|
16040
16045
|
if (tab) {
|
|
@@ -16441,14 +16446,14 @@ function AllowedUsersDetails({ showTitle, content }) {
|
|
|
16441
16446
|
__name(AllowedUsersDetails, "AllowedUsersDetails");
|
|
16442
16447
|
|
|
16443
16448
|
// src/components/editors/BlockNoteEditorMentionHoverCard.tsx
|
|
16444
|
-
import { useCallback as useCallback28, useEffect as
|
|
16449
|
+
import { useCallback as useCallback28, useEffect as useEffect45, useRef as useRef30, useState as useState55 } from "react";
|
|
16445
16450
|
import { createPortal as createPortal3 } from "react-dom";
|
|
16446
16451
|
import { jsx as jsx174 } from "react/jsx-runtime";
|
|
16447
16452
|
function BlockNoteEditorMentionHoverCard({
|
|
16448
16453
|
containerRef,
|
|
16449
16454
|
mentionResolveFn
|
|
16450
16455
|
}) {
|
|
16451
|
-
const [hovered, setHovered] =
|
|
16456
|
+
const [hovered, setHovered] = useState55(null);
|
|
16452
16457
|
const closeTimeoutRef = useRef30(null);
|
|
16453
16458
|
const scheduleClose = useCallback28(() => {
|
|
16454
16459
|
closeTimeoutRef.current = setTimeout(() => setHovered(null), 200);
|
|
@@ -16459,7 +16464,7 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
16459
16464
|
closeTimeoutRef.current = null;
|
|
16460
16465
|
}
|
|
16461
16466
|
}, []);
|
|
16462
|
-
|
|
16467
|
+
useEffect45(() => {
|
|
16463
16468
|
const container = containerRef.current;
|
|
16464
16469
|
if (!container || !mentionResolveFn) return;
|
|
16465
16470
|
const handleMouseOver = /* @__PURE__ */ __name((e) => {
|
|
@@ -16709,13 +16714,13 @@ var BlockNoteViewerContainer = React29.memo(/* @__PURE__ */ __name(function View
|
|
|
16709
16714
|
}, "ViewerContainer"));
|
|
16710
16715
|
|
|
16711
16716
|
// src/components/pages/PageContainerContentDetails.tsx
|
|
16712
|
-
import { useEffect as
|
|
16717
|
+
import { useEffect as useEffect46, useRef as useRef31, useState as useState56 } from "react";
|
|
16713
16718
|
import { jsx as jsx178, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
16714
16719
|
function PageContainerContentDetails({ items, section, module, id }) {
|
|
16715
16720
|
const rewriteUrl = useUrlRewriter();
|
|
16716
|
-
const [isScrolled, setIsScrolled] =
|
|
16721
|
+
const [isScrolled, setIsScrolled] = useState56(false);
|
|
16717
16722
|
const sentinelRef = useRef31(null);
|
|
16718
|
-
|
|
16723
|
+
useEffect46(() => {
|
|
16719
16724
|
const sentinel = sentinelRef.current;
|
|
16720
16725
|
if (!sentinel) return;
|
|
16721
16726
|
const observer = new IntersectionObserver(
|
|
@@ -16748,13 +16753,13 @@ function PageContainerContentDetails({ items, section, module, id }) {
|
|
|
16748
16753
|
__name(PageContainerContentDetails, "PageContainerContentDetails");
|
|
16749
16754
|
|
|
16750
16755
|
// src/components/pages/PageContentContainer.tsx
|
|
16751
|
-
import { useEffect as
|
|
16756
|
+
import { useEffect as useEffect47, useState as useState57 } from "react";
|
|
16752
16757
|
import { useDefaultLayout } from "react-resizable-panels";
|
|
16753
16758
|
import { jsx as jsx179, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
16754
16759
|
function PageContentContainer({ header, details, footer, content, fullBleed }) {
|
|
16755
|
-
const [mounted, setMounted] =
|
|
16760
|
+
const [mounted, setMounted] = useState57(false);
|
|
16756
16761
|
const isMobile = useIsMobile();
|
|
16757
|
-
|
|
16762
|
+
useEffect47(() => {
|
|
16758
16763
|
setMounted(true);
|
|
16759
16764
|
}, []);
|
|
16760
16765
|
const isReady = mounted;
|
|
@@ -16918,10 +16923,10 @@ var cellUrl = /* @__PURE__ */ __name((params) => {
|
|
|
16918
16923
|
}, "cellUrl");
|
|
16919
16924
|
|
|
16920
16925
|
// src/client/context/JsonApiProvider.tsx
|
|
16921
|
-
import { useEffect as
|
|
16926
|
+
import { useEffect as useEffect48, useMemo as useMemo25 } from "react";
|
|
16922
16927
|
import { jsx as jsx185 } from "react/jsx-runtime";
|
|
16923
16928
|
function JsonApiProvider({ config, children }) {
|
|
16924
|
-
|
|
16929
|
+
useEffect48(() => {
|
|
16925
16930
|
if (config.bootstrapper) {
|
|
16926
16931
|
config.bootstrapper();
|
|
16927
16932
|
}
|
|
@@ -16932,12 +16937,12 @@ function JsonApiProvider({ config, children }) {
|
|
|
16932
16937
|
__name(JsonApiProvider, "JsonApiProvider");
|
|
16933
16938
|
|
|
16934
16939
|
// src/client/hooks/useJsonApiGet.ts
|
|
16935
|
-
import { useState as
|
|
16940
|
+
import { useState as useState58, useEffect as useEffect49, useCallback as useCallback30, useRef as useRef32 } from "react";
|
|
16936
16941
|
function useJsonApiGet(params) {
|
|
16937
|
-
const [data, setData] =
|
|
16938
|
-
const [loading, setLoading] =
|
|
16939
|
-
const [error, setError] =
|
|
16940
|
-
const [response, setResponse] =
|
|
16942
|
+
const [data, setData] = useState58(null);
|
|
16943
|
+
const [loading, setLoading] = useState58(false);
|
|
16944
|
+
const [error, setError] = useState58(null);
|
|
16945
|
+
const [response, setResponse] = useState58(null);
|
|
16941
16946
|
const isMounted = useRef32(true);
|
|
16942
16947
|
const fetchData = useCallback30(async () => {
|
|
16943
16948
|
if (params.options?.enabled === false) return;
|
|
@@ -17010,7 +17015,7 @@ function useJsonApiGet(params) {
|
|
|
17010
17015
|
}
|
|
17011
17016
|
}
|
|
17012
17017
|
}, [response]);
|
|
17013
|
-
|
|
17018
|
+
useEffect49(() => {
|
|
17014
17019
|
isMounted.current = true;
|
|
17015
17020
|
fetchData();
|
|
17016
17021
|
return () => {
|
|
@@ -17032,12 +17037,12 @@ function useJsonApiGet(params) {
|
|
|
17032
17037
|
__name(useJsonApiGet, "useJsonApiGet");
|
|
17033
17038
|
|
|
17034
17039
|
// src/client/hooks/useJsonApiMutation.ts
|
|
17035
|
-
import { useState as
|
|
17040
|
+
import { useState as useState59, useCallback as useCallback31 } from "react";
|
|
17036
17041
|
function useJsonApiMutation(config) {
|
|
17037
|
-
const [data, setData] =
|
|
17038
|
-
const [loading, setLoading] =
|
|
17039
|
-
const [error, setError] =
|
|
17040
|
-
const [response, setResponse] =
|
|
17042
|
+
const [data, setData] = useState59(null);
|
|
17043
|
+
const [loading, setLoading] = useState59(false);
|
|
17044
|
+
const [error, setError] = useState59(null);
|
|
17045
|
+
const [response, setResponse] = useState59(null);
|
|
17041
17046
|
const reset = useCallback31(() => {
|
|
17042
17047
|
setData(null);
|
|
17043
17048
|
setLoading(false);
|
|
@@ -17782,7 +17787,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
17782
17787
|
|
|
17783
17788
|
// src/features/oauth/hooks/useOAuthClients.ts
|
|
17784
17789
|
import { useAtom as useAtom3, useSetAtom } from "jotai";
|
|
17785
|
-
import { useCallback as useCallback32, useEffect as
|
|
17790
|
+
import { useCallback as useCallback32, useEffect as useEffect50 } from "react";
|
|
17786
17791
|
|
|
17787
17792
|
// src/features/oauth/atoms/oauth.atoms.ts
|
|
17788
17793
|
import { atom } from "jotai";
|
|
@@ -17857,7 +17862,7 @@ function useOAuthClients() {
|
|
|
17857
17862
|
setIsLoading(false);
|
|
17858
17863
|
}
|
|
17859
17864
|
}, [setClients, setIsLoading, setError]);
|
|
17860
|
-
|
|
17865
|
+
useEffect50(() => {
|
|
17861
17866
|
fetchClients();
|
|
17862
17867
|
}, [fetchClients]);
|
|
17863
17868
|
const createClient = useCallback32(
|
|
@@ -17897,15 +17902,15 @@ __name(useOAuthClients, "useOAuthClients");
|
|
|
17897
17902
|
|
|
17898
17903
|
// src/features/oauth/hooks/useOAuthClient.ts
|
|
17899
17904
|
import { useAtomValue as useAtomValue2, useSetAtom as useSetAtom2 } from "jotai";
|
|
17900
|
-
import { useCallback as useCallback33, useEffect as
|
|
17905
|
+
import { useCallback as useCallback33, useEffect as useEffect51, useState as useState60 } from "react";
|
|
17901
17906
|
function useOAuthClient(clientId) {
|
|
17902
17907
|
const storedClient = useAtomValue2(oauthClientByIdAtom(clientId));
|
|
17903
17908
|
const updateClientInStore = useSetAtom2(updateOAuthClientAtom);
|
|
17904
17909
|
const removeClientFromStore = useSetAtom2(removeOAuthClientAtom);
|
|
17905
17910
|
const setNewClientSecret = useSetAtom2(setNewClientSecretAtom);
|
|
17906
|
-
const [fetchedClient, setFetchedClient] =
|
|
17907
|
-
const [isLoading, setIsLoading] =
|
|
17908
|
-
const [error, setError] =
|
|
17911
|
+
const [fetchedClient, setFetchedClient] = useState60(null);
|
|
17912
|
+
const [isLoading, setIsLoading] = useState60(false);
|
|
17913
|
+
const [error, setError] = useState60(null);
|
|
17909
17914
|
const client = storedClient || fetchedClient;
|
|
17910
17915
|
const fetchClient = useCallback33(async () => {
|
|
17911
17916
|
if (!clientId) return;
|
|
@@ -17921,7 +17926,7 @@ function useOAuthClient(clientId) {
|
|
|
17921
17926
|
setIsLoading(false);
|
|
17922
17927
|
}
|
|
17923
17928
|
}, [clientId]);
|
|
17924
|
-
|
|
17929
|
+
useEffect51(() => {
|
|
17925
17930
|
if (!storedClient && clientId) {
|
|
17926
17931
|
fetchClient();
|
|
17927
17932
|
}
|
|
@@ -17995,23 +18000,23 @@ function useOAuthClient(clientId) {
|
|
|
17995
18000
|
__name(useOAuthClient, "useOAuthClient");
|
|
17996
18001
|
|
|
17997
18002
|
// src/features/oauth/hooks/useOAuthConsent.ts
|
|
17998
|
-
import { useCallback as useCallback34, useEffect as
|
|
18003
|
+
import { useCallback as useCallback34, useEffect as useEffect52, useState as useState61 } from "react";
|
|
17999
18004
|
function useOAuthConsent(params, options) {
|
|
18000
|
-
const [clientInfo, setClientInfo] =
|
|
18001
|
-
const [isLoading, setIsLoading] =
|
|
18002
|
-
const [error, setError] =
|
|
18003
|
-
const [isSubmitting, setIsSubmitting] =
|
|
18004
|
-
const [companyId, setCompanyId] =
|
|
18005
|
+
const [clientInfo, setClientInfo] = useState61(null);
|
|
18006
|
+
const [isLoading, setIsLoading] = useState61(true);
|
|
18007
|
+
const [error, setError] = useState61(null);
|
|
18008
|
+
const [isSubmitting, setIsSubmitting] = useState61(false);
|
|
18009
|
+
const [companyId, setCompanyId] = useState61(void 0);
|
|
18005
18010
|
const contextCompanyId = useCurrentUserContextOptional()?.company?.id;
|
|
18006
18011
|
const currentCompanyId = options?.defaultCompanyId ?? contextCompanyId;
|
|
18007
|
-
|
|
18012
|
+
useEffect52(() => {
|
|
18008
18013
|
const companies = clientInfo?.companies ?? [];
|
|
18009
18014
|
if (companies.length === 0) return;
|
|
18010
18015
|
if (companyId && companies.some((company) => company.id === companyId)) return;
|
|
18011
18016
|
const current = currentCompanyId ? companies.find((company) => company.id === currentCompanyId) : void 0;
|
|
18012
18017
|
setCompanyId(current?.id ?? companies[0]?.id);
|
|
18013
18018
|
}, [clientInfo, currentCompanyId, companyId]);
|
|
18014
|
-
|
|
18019
|
+
useEffect52(() => {
|
|
18015
18020
|
const fetchInfo = /* @__PURE__ */ __name(async () => {
|
|
18016
18021
|
if (!params.clientId || !params.redirectUri) {
|
|
18017
18022
|
setError(new Error("Missing required authorization parameters"));
|
|
@@ -18092,20 +18097,20 @@ registerTableGenerator("waitlists", useWaitlistTableStructure);
|
|
|
18092
18097
|
import { flexRender, getCoreRowModel, getExpandedRowModel, useReactTable } from "@tanstack/react-table";
|
|
18093
18098
|
import { ChevronLeft, ChevronRight, Loader2 as Loader23 } from "lucide-react";
|
|
18094
18099
|
import { useTranslations as useTranslations62 } from "next-intl";
|
|
18095
|
-
import React31, { memo, useMemo as useMemo34, useState as
|
|
18100
|
+
import React31, { memo, useMemo as useMemo34, useState as useState63 } from "react";
|
|
18096
18101
|
|
|
18097
18102
|
// src/components/tables/ContentTableSearch.tsx
|
|
18098
18103
|
import { RefreshCw, Search, X as X3 } from "lucide-react";
|
|
18099
18104
|
import { useTranslations as useTranslations61 } from "next-intl";
|
|
18100
|
-
import { useCallback as useCallback35, useEffect as
|
|
18105
|
+
import { useCallback as useCallback35, useEffect as useEffect53, useRef as useRef33, useState as useState62 } from "react";
|
|
18101
18106
|
import { jsx as jsx192, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
18102
18107
|
function ContentTableSearch({ data }) {
|
|
18103
18108
|
const t = useTranslations61();
|
|
18104
18109
|
const searchTermRef = useRef33("");
|
|
18105
18110
|
const inputRef = useRef33(null);
|
|
18106
|
-
const [searchTerm, setSearchTerm] =
|
|
18107
|
-
const [isFocused, setIsFocused] =
|
|
18108
|
-
const [isSearching, setIsSearching] =
|
|
18111
|
+
const [searchTerm, setSearchTerm] = useState62("");
|
|
18112
|
+
const [isFocused, setIsFocused] = useState62(false);
|
|
18113
|
+
const [isSearching, setIsSearching] = useState62(false);
|
|
18109
18114
|
const isExpanded = isFocused || searchTerm.length > 0;
|
|
18110
18115
|
const search = useCallback35(
|
|
18111
18116
|
async (searchedTerm) => {
|
|
@@ -18120,7 +18125,7 @@ function ContentTableSearch({ data }) {
|
|
|
18120
18125
|
[searchTermRef, data]
|
|
18121
18126
|
);
|
|
18122
18127
|
const updateSearchTerm = useDebounce2(search, 500);
|
|
18123
|
-
|
|
18128
|
+
useEffect53(() => {
|
|
18124
18129
|
setIsSearching(true);
|
|
18125
18130
|
updateSearchTerm(searchTerm);
|
|
18126
18131
|
}, [updateSearchTerm, searchTerm]);
|
|
@@ -18229,10 +18234,10 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
18229
18234
|
const { data, fields, checkedIds, toggleId, allowSearch, filters: _filters, fullWidth, onRowClick } = props;
|
|
18230
18235
|
const t = useTranslations62();
|
|
18231
18236
|
const isMobile = useIsMobile();
|
|
18232
|
-
const [expanded, setExpanded] =
|
|
18237
|
+
const [expanded, setExpanded] = useState63(
|
|
18233
18238
|
props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
|
|
18234
18239
|
);
|
|
18235
|
-
const [pendingDirection, setPendingDirection] =
|
|
18240
|
+
const [pendingDirection, setPendingDirection] = useState63(null);
|
|
18236
18241
|
React31.useEffect(() => {
|
|
18237
18242
|
if (data.isLoaded) setPendingDirection(null);
|
|
18238
18243
|
}, [data.isLoaded]);
|
|
@@ -18426,13 +18431,13 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
18426
18431
|
}, "ContentListTable"));
|
|
18427
18432
|
|
|
18428
18433
|
// src/components/grids/ContentListGrid.tsx
|
|
18429
|
-
import { useEffect as
|
|
18434
|
+
import { useEffect as useEffect54, useRef as useRef34 } from "react";
|
|
18430
18435
|
import { Fragment as Fragment31, jsx as jsx194, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
18431
18436
|
var DEFAULT_GRID_CLASSES = "grid grid-cols-2 gap-4 p-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5";
|
|
18432
18437
|
function ContentListGrid(props) {
|
|
18433
18438
|
const { data, ItemComponent, allowSearch, fullWidth, gridClassName } = props;
|
|
18434
18439
|
const sentinelRef = useRef34(null);
|
|
18435
|
-
|
|
18440
|
+
useEffect54(() => {
|
|
18436
18441
|
if (!data.next || !sentinelRef.current) return;
|
|
18437
18442
|
const observer = new IntersectionObserver(
|
|
18438
18443
|
(entries) => {
|
|
@@ -18475,15 +18480,15 @@ __name(ContentListGrid, "ContentListGrid");
|
|
|
18475
18480
|
|
|
18476
18481
|
// src/components/fiscal/ItalianFiscalData.tsx
|
|
18477
18482
|
import { useTranslations as useTranslations63 } from "next-intl";
|
|
18478
|
-
import { forwardRef as forwardRef8, useCallback as useCallback36, useImperativeHandle as useImperativeHandle2, useRef as useRef35, useState as
|
|
18483
|
+
import { forwardRef as forwardRef8, useCallback as useCallback36, useImperativeHandle as useImperativeHandle2, useRef as useRef35, useState as useState64 } from "react";
|
|
18479
18484
|
import { z as z4 } from "zod";
|
|
18480
18485
|
import { jsx as jsx195, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
18481
18486
|
var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
|
|
18482
18487
|
const t = useTranslations63();
|
|
18483
18488
|
const initialRef = useRef35(initialData);
|
|
18484
|
-
const [fiscalData, setFiscalData] =
|
|
18489
|
+
const [fiscalData, setFiscalData] = useState64(initialData);
|
|
18485
18490
|
const fiscalDataRef = useRef35(initialData);
|
|
18486
|
-
const [fiscalErrors, setFiscalErrors] =
|
|
18491
|
+
const [fiscalErrors, setFiscalErrors] = useState64({});
|
|
18487
18492
|
const updateFiscalField = useCallback36((key, value) => {
|
|
18488
18493
|
setFiscalData((prev) => {
|
|
18489
18494
|
const next = { ...prev, [key]: value };
|
|
@@ -18676,7 +18681,7 @@ __name(EntitySection, "EntitySection");
|
|
|
18676
18681
|
import Image8 from "next/image";
|
|
18677
18682
|
|
|
18678
18683
|
// src/features/auth/contexts/AuthContext.tsx
|
|
18679
|
-
import { createContext as createContext28, useContext as useContext28, useMemo as useMemo35, useState as
|
|
18684
|
+
import { createContext as createContext28, useContext as useContext28, useMemo as useMemo35, useState as useState66 } from "react";
|
|
18680
18685
|
|
|
18681
18686
|
// src/features/auth/components/forms/Register.tsx
|
|
18682
18687
|
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
|
@@ -18684,7 +18689,7 @@ import { Loader2 as Loader24 } from "lucide-react";
|
|
|
18684
18689
|
import { useTranslations as useTranslations65 } from "next-intl";
|
|
18685
18690
|
import Image7 from "next/image";
|
|
18686
18691
|
import { useSearchParams as useSearchParams2 } from "next/navigation";
|
|
18687
|
-
import { useEffect as
|
|
18692
|
+
import { useEffect as useEffect55, useState as useState65 } from "react";
|
|
18688
18693
|
import { useForm as useForm5 } from "react-hook-form";
|
|
18689
18694
|
import { v4 as v45 } from "uuid";
|
|
18690
18695
|
import { z as z5 } from "zod";
|
|
@@ -18755,14 +18760,14 @@ function Register() {
|
|
|
18755
18760
|
const searchParams = useSearchParams2();
|
|
18756
18761
|
const inviteCode = searchParams.get("invite");
|
|
18757
18762
|
const registrationMode = getRegistrationMode();
|
|
18758
|
-
const [showConfirmation, setShowConfirmation] =
|
|
18759
|
-
const [inviteValidated, setInviteValidated] =
|
|
18760
|
-
const [inviteError, setInviteError] =
|
|
18761
|
-
const [isValidatingInvite, setIsValidatingInvite] =
|
|
18763
|
+
const [showConfirmation, setShowConfirmation] = useState65(false);
|
|
18764
|
+
const [inviteValidated, setInviteValidated] = useState65(false);
|
|
18765
|
+
const [inviteError, setInviteError] = useState65("");
|
|
18766
|
+
const [isValidatingInvite, setIsValidatingInvite] = useState65(
|
|
18762
18767
|
registrationMode === "waitlist" && !!inviteCode
|
|
18763
18768
|
);
|
|
18764
|
-
const [referralCode, setReferralCode2] =
|
|
18765
|
-
|
|
18769
|
+
const [referralCode, setReferralCode2] = useState65(null);
|
|
18770
|
+
useEffect55(() => {
|
|
18766
18771
|
const code = getReferralCode();
|
|
18767
18772
|
setReferralCode2(code);
|
|
18768
18773
|
}, []);
|
|
@@ -18795,7 +18800,7 @@ function Register() {
|
|
|
18795
18800
|
marketingConsent: false
|
|
18796
18801
|
}
|
|
18797
18802
|
});
|
|
18798
|
-
|
|
18803
|
+
useEffect55(() => {
|
|
18799
18804
|
async function validateInvite() {
|
|
18800
18805
|
if (registrationMode !== "waitlist" || !inviteCode) {
|
|
18801
18806
|
return;
|
|
@@ -19032,9 +19037,9 @@ var AuthContextProvider = /* @__PURE__ */ __name(({
|
|
|
19032
19037
|
initialComponentType,
|
|
19033
19038
|
initialParams
|
|
19034
19039
|
}) => {
|
|
19035
|
-
const [componentType, setComponentType] =
|
|
19036
|
-
const [params, setParams] =
|
|
19037
|
-
const [pendingTwoFactor, setPendingTwoFactor] =
|
|
19040
|
+
const [componentType, setComponentType] = useState66(initialComponentType);
|
|
19041
|
+
const [params, setParams] = useState66(initialParams);
|
|
19042
|
+
const [pendingTwoFactor, setPendingTwoFactor] = useState66();
|
|
19038
19043
|
const activeComponent = useMemo35(() => {
|
|
19039
19044
|
if (componentType === void 0) return null;
|
|
19040
19045
|
switch (componentType) {
|
|
@@ -19096,20 +19101,20 @@ __name(InnerAuthContainer, "InnerAuthContainer");
|
|
|
19096
19101
|
// src/features/auth/components/two-factor/TwoFactorSettings.tsx
|
|
19097
19102
|
import { ShieldAlert, ShieldCheck } from "lucide-react";
|
|
19098
19103
|
import { useTranslations as useTranslations72 } from "next-intl";
|
|
19099
|
-
import { useCallback as useCallback37, useEffect as
|
|
19104
|
+
import { useCallback as useCallback37, useEffect as useEffect57, useState as useState74 } from "react";
|
|
19100
19105
|
import { v4 as v48 } from "uuid";
|
|
19101
19106
|
|
|
19102
19107
|
// src/features/auth/components/two-factor/BackupCodesDialog.tsx
|
|
19103
19108
|
import { Copy, Download, RefreshCw as RefreshCw2 } from "lucide-react";
|
|
19104
19109
|
import { useTranslations as useTranslations66 } from "next-intl";
|
|
19105
|
-
import { useState as
|
|
19110
|
+
import { useState as useState67 } from "react";
|
|
19106
19111
|
import { jsx as jsx205, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
19107
19112
|
function BackupCodesDialog({ remainingCodes, onRegenerate, trigger }) {
|
|
19108
19113
|
const t = useTranslations66();
|
|
19109
|
-
const [open, setOpen] =
|
|
19110
|
-
const [codes, setCodes] =
|
|
19111
|
-
const [isLoading, setIsLoading] =
|
|
19112
|
-
const [showCodes, setShowCodes] =
|
|
19114
|
+
const [open, setOpen] = useState67(false);
|
|
19115
|
+
const [codes, setCodes] = useState67([]);
|
|
19116
|
+
const [isLoading, setIsLoading] = useState67(false);
|
|
19117
|
+
const [showCodes, setShowCodes] = useState67(false);
|
|
19113
19118
|
const handleGenerate = /* @__PURE__ */ __name(async () => {
|
|
19114
19119
|
setIsLoading(true);
|
|
19115
19120
|
try {
|
|
@@ -19204,15 +19209,15 @@ __name(BackupCodesDialog, "BackupCodesDialog");
|
|
|
19204
19209
|
|
|
19205
19210
|
// src/features/auth/components/two-factor/DisableTwoFactorDialog.tsx
|
|
19206
19211
|
import { useTranslations as useTranslations67 } from "next-intl";
|
|
19207
|
-
import { useState as
|
|
19212
|
+
import { useState as useState69 } from "react";
|
|
19208
19213
|
|
|
19209
19214
|
// src/features/auth/components/two-factor/TotpInput.tsx
|
|
19210
|
-
import { useEffect as
|
|
19215
|
+
import { useEffect as useEffect56, useRef as useRef36, useState as useState68 } from "react";
|
|
19211
19216
|
import { jsx as jsx206, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
19212
19217
|
function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
19213
|
-
const [digits, setDigits] =
|
|
19218
|
+
const [digits, setDigits] = useState68(["", "", "", "", "", ""]);
|
|
19214
19219
|
const inputRefs = useRef36([]);
|
|
19215
|
-
|
|
19220
|
+
useEffect56(() => {
|
|
19216
19221
|
if (autoFocus && inputRefs.current[0]) {
|
|
19217
19222
|
inputRefs.current[0].focus();
|
|
19218
19223
|
}
|
|
@@ -19274,9 +19279,9 @@ __name(TotpInput, "TotpInput");
|
|
|
19274
19279
|
import { jsx as jsx207, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
19275
19280
|
function DisableTwoFactorDialog({ onSuccess, trigger }) {
|
|
19276
19281
|
const t = useTranslations67();
|
|
19277
|
-
const [open, setOpen] =
|
|
19278
|
-
const [isLoading, setIsLoading] =
|
|
19279
|
-
const [error, setError] =
|
|
19282
|
+
const [open, setOpen] = useState69(false);
|
|
19283
|
+
const [isLoading, setIsLoading] = useState69(false);
|
|
19284
|
+
const [error, setError] = useState69();
|
|
19280
19285
|
const handleVerify = /* @__PURE__ */ __name(async (code) => {
|
|
19281
19286
|
setIsLoading(true);
|
|
19282
19287
|
setError(void 0);
|
|
@@ -19317,15 +19322,15 @@ __name(DisableTwoFactorDialog, "DisableTwoFactorDialog");
|
|
|
19317
19322
|
// src/features/auth/components/two-factor/PasskeyList.tsx
|
|
19318
19323
|
import { Edit, Key, Trash2 } from "lucide-react";
|
|
19319
19324
|
import { useTranslations as useTranslations68 } from "next-intl";
|
|
19320
|
-
import { useState as
|
|
19325
|
+
import { useState as useState70 } from "react";
|
|
19321
19326
|
import { Fragment as Fragment34, jsx as jsx208, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
19322
19327
|
function PasskeyList({ passkeys, onRefresh }) {
|
|
19323
19328
|
const t = useTranslations68();
|
|
19324
19329
|
const locale = useI18nLocale();
|
|
19325
|
-
const [renameDialogOpen, setRenameDialogOpen] =
|
|
19326
|
-
const [selectedPasskey, setSelectedPasskey] =
|
|
19327
|
-
const [newName, setNewName] =
|
|
19328
|
-
const [isLoading, setIsLoading] =
|
|
19330
|
+
const [renameDialogOpen, setRenameDialogOpen] = useState70(false);
|
|
19331
|
+
const [selectedPasskey, setSelectedPasskey] = useState70(null);
|
|
19332
|
+
const [newName, setNewName] = useState70("");
|
|
19333
|
+
const [isLoading, setIsLoading] = useState70(false);
|
|
19329
19334
|
const handleDelete = /* @__PURE__ */ __name(async (passkey) => {
|
|
19330
19335
|
setIsLoading(true);
|
|
19331
19336
|
try {
|
|
@@ -19439,14 +19444,14 @@ __name(PasskeyList, "PasskeyList");
|
|
|
19439
19444
|
// src/features/auth/components/two-factor/PasskeySetupDialog.tsx
|
|
19440
19445
|
import { startRegistration } from "@simplewebauthn/browser";
|
|
19441
19446
|
import { useTranslations as useTranslations69 } from "next-intl";
|
|
19442
|
-
import { useState as
|
|
19447
|
+
import { useState as useState71 } from "react";
|
|
19443
19448
|
import { v4 as v46 } from "uuid";
|
|
19444
19449
|
import { jsx as jsx209, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
19445
19450
|
function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
19446
19451
|
const t = useTranslations69();
|
|
19447
19452
|
const { currentUser } = useCurrentUserContext();
|
|
19448
|
-
const [name, setName] =
|
|
19449
|
-
const [isLoading, setIsLoading] =
|
|
19453
|
+
const [name, setName] = useState71("");
|
|
19454
|
+
const [isLoading, setIsLoading] = useState71(false);
|
|
19450
19455
|
const handleRegister = /* @__PURE__ */ __name(async () => {
|
|
19451
19456
|
if (!name.trim()) return;
|
|
19452
19457
|
setIsLoading(true);
|
|
@@ -19510,12 +19515,12 @@ __name(PasskeySetupDialog, "PasskeySetupDialog");
|
|
|
19510
19515
|
// src/features/auth/components/two-factor/TotpAuthenticatorList.tsx
|
|
19511
19516
|
import { Smartphone, Trash2 as Trash22 } from "lucide-react";
|
|
19512
19517
|
import { useTranslations as useTranslations70 } from "next-intl";
|
|
19513
|
-
import { useState as
|
|
19518
|
+
import { useState as useState72 } from "react";
|
|
19514
19519
|
import { jsx as jsx210, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
19515
19520
|
function TotpAuthenticatorList({ authenticators, onDelete }) {
|
|
19516
19521
|
const t = useTranslations70();
|
|
19517
19522
|
const locale = useI18nLocale();
|
|
19518
|
-
const [deletingId, setDeletingId] =
|
|
19523
|
+
const [deletingId, setDeletingId] = useState72(null);
|
|
19519
19524
|
const handleDelete = /* @__PURE__ */ __name(async (id) => {
|
|
19520
19525
|
setDeletingId(id);
|
|
19521
19526
|
try {
|
|
@@ -19586,19 +19591,19 @@ __name(TotpAuthenticatorList, "TotpAuthenticatorList");
|
|
|
19586
19591
|
// src/features/auth/components/two-factor/TotpSetupDialog.tsx
|
|
19587
19592
|
import { useTranslations as useTranslations71 } from "next-intl";
|
|
19588
19593
|
import { QRCodeSVG } from "qrcode.react";
|
|
19589
|
-
import { useState as
|
|
19594
|
+
import { useState as useState73 } from "react";
|
|
19590
19595
|
import { v4 as v47 } from "uuid";
|
|
19591
19596
|
import { jsx as jsx211, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
19592
19597
|
function TotpSetupDialog({ onSuccess, trigger }) {
|
|
19593
19598
|
const t = useTranslations71();
|
|
19594
19599
|
const { currentUser } = useCurrentUserContext();
|
|
19595
|
-
const [open, setOpen] =
|
|
19596
|
-
const [step, setStep] =
|
|
19597
|
-
const [name, setName] =
|
|
19598
|
-
const [qrCodeUri, setQrCodeUri] =
|
|
19599
|
-
const [authenticatorId, setAuthenticatorId] =
|
|
19600
|
-
const [isLoading, setIsLoading] =
|
|
19601
|
-
const [verifyError, setVerifyError] =
|
|
19600
|
+
const [open, setOpen] = useState73(false);
|
|
19601
|
+
const [step, setStep] = useState73("name");
|
|
19602
|
+
const [name, setName] = useState73("");
|
|
19603
|
+
const [qrCodeUri, setQrCodeUri] = useState73("");
|
|
19604
|
+
const [authenticatorId, setAuthenticatorId] = useState73("");
|
|
19605
|
+
const [isLoading, setIsLoading] = useState73(false);
|
|
19606
|
+
const [verifyError, setVerifyError] = useState73();
|
|
19602
19607
|
const handleStartSetup = /* @__PURE__ */ __name(async () => {
|
|
19603
19608
|
if (!name.trim()) return;
|
|
19604
19609
|
setIsLoading(true);
|
|
@@ -19696,12 +19701,12 @@ __name(TotpSetupDialog, "TotpSetupDialog");
|
|
|
19696
19701
|
import { Fragment as Fragment35, jsx as jsx212, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
19697
19702
|
function TwoFactorSettings() {
|
|
19698
19703
|
const t = useTranslations72();
|
|
19699
|
-
const [status, setStatus] =
|
|
19700
|
-
const [authenticators, setAuthenticators] =
|
|
19701
|
-
const [passkeys, setPasskeys] =
|
|
19702
|
-
const [isLoading, setIsLoading] =
|
|
19703
|
-
const [isEnabling, setIsEnabling] =
|
|
19704
|
-
const [passkeyDialogOpen, setPasskeyDialogOpen] =
|
|
19704
|
+
const [status, setStatus] = useState74(null);
|
|
19705
|
+
const [authenticators, setAuthenticators] = useState74([]);
|
|
19706
|
+
const [passkeys, setPasskeys] = useState74([]);
|
|
19707
|
+
const [isLoading, setIsLoading] = useState74(true);
|
|
19708
|
+
const [isEnabling, setIsEnabling] = useState74(false);
|
|
19709
|
+
const [passkeyDialogOpen, setPasskeyDialogOpen] = useState74(false);
|
|
19705
19710
|
const loadStatus = useCallback37(async () => {
|
|
19706
19711
|
try {
|
|
19707
19712
|
const [statusData, authenticatorsList, passkeysList] = await Promise.all([
|
|
@@ -19718,7 +19723,7 @@ function TwoFactorSettings() {
|
|
|
19718
19723
|
setIsLoading(false);
|
|
19719
19724
|
}
|
|
19720
19725
|
}, [t]);
|
|
19721
|
-
|
|
19726
|
+
useEffect57(() => {
|
|
19722
19727
|
loadStatus();
|
|
19723
19728
|
}, [loadStatus]);
|
|
19724
19729
|
const handleRefresh = /* @__PURE__ */ __name(() => {
|
|
@@ -19908,16 +19913,16 @@ __name(LandingComponent, "LandingComponent");
|
|
|
19908
19913
|
import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
|
|
19909
19914
|
import { useTranslations as useTranslations74 } from "next-intl";
|
|
19910
19915
|
import Image10 from "next/image";
|
|
19911
|
-
import { useEffect as
|
|
19916
|
+
import { useEffect as useEffect58, useState as useState75 } from "react";
|
|
19912
19917
|
import { useForm as useForm6 } from "react-hook-form";
|
|
19913
19918
|
import { z as z6 } from "zod";
|
|
19914
19919
|
import { Fragment as Fragment37, jsx as jsx216, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
19915
19920
|
function AcceptInvitation() {
|
|
19916
19921
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
19917
|
-
const [showConfirmation, setShowConfirmation] =
|
|
19918
|
-
const [error, setError] =
|
|
19922
|
+
const [showConfirmation, setShowConfirmation] = useState75(false);
|
|
19923
|
+
const [error, setError] = useState75(void 0);
|
|
19919
19924
|
const t = useTranslations74();
|
|
19920
|
-
|
|
19925
|
+
useEffect58(() => {
|
|
19921
19926
|
async function validateCode(code) {
|
|
19922
19927
|
try {
|
|
19923
19928
|
const payload = {
|
|
@@ -20010,14 +20015,14 @@ __name(AcceptInvitation, "AcceptInvitation");
|
|
|
20010
20015
|
// src/features/auth/components/forms/ActivateAccount.tsx
|
|
20011
20016
|
import { useTranslations as useTranslations75 } from "next-intl";
|
|
20012
20017
|
import Image11 from "next/image";
|
|
20013
|
-
import { useEffect as
|
|
20018
|
+
import { useEffect as useEffect59, useState as useState76 } from "react";
|
|
20014
20019
|
import { Fragment as Fragment38, jsx as jsx217, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
20015
20020
|
function ActivateAccount() {
|
|
20016
20021
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
20017
|
-
const [showConfirmation, setShowConfirmation] =
|
|
20018
|
-
const [error, setError] =
|
|
20022
|
+
const [showConfirmation, setShowConfirmation] = useState76(false);
|
|
20023
|
+
const [error, setError] = useState76(void 0);
|
|
20019
20024
|
const t = useTranslations75();
|
|
20020
|
-
|
|
20025
|
+
useEffect59(() => {
|
|
20021
20026
|
async function ActivateAccount2(code) {
|
|
20022
20027
|
try {
|
|
20023
20028
|
const payload = {
|
|
@@ -20058,12 +20063,12 @@ function ActivateAccount() {
|
|
|
20058
20063
|
__name(ActivateAccount, "ActivateAccount");
|
|
20059
20064
|
|
|
20060
20065
|
// src/features/auth/components/forms/Cookies.tsx
|
|
20061
|
-
import { useEffect as
|
|
20066
|
+
import { useEffect as useEffect60, useState as useState77 } from "react";
|
|
20062
20067
|
function Cookies({ dehydratedAuth, page }) {
|
|
20063
20068
|
const { setUser } = useCurrentUserContext();
|
|
20064
20069
|
const router = useI18nRouter();
|
|
20065
|
-
const [hasSaved, setHasSaved] =
|
|
20066
|
-
|
|
20070
|
+
const [hasSaved, setHasSaved] = useState77(false);
|
|
20071
|
+
useEffect60(() => {
|
|
20067
20072
|
if (hasSaved) return;
|
|
20068
20073
|
async function saveTokenOnServer() {
|
|
20069
20074
|
await AuthService.saveToken({ dehydratedAuth });
|
|
@@ -20086,14 +20091,14 @@ __name(Cookies, "Cookies");
|
|
|
20086
20091
|
import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
|
|
20087
20092
|
import { useTranslations as useTranslations76 } from "next-intl";
|
|
20088
20093
|
import Image12 from "next/image";
|
|
20089
|
-
import { useState as
|
|
20094
|
+
import { useState as useState78 } from "react";
|
|
20090
20095
|
import { useForm as useForm7 } from "react-hook-form";
|
|
20091
20096
|
import { z as z7 } from "zod";
|
|
20092
20097
|
import { Fragment as Fragment39, jsx as jsx218, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
20093
20098
|
function ForgotPassword() {
|
|
20094
20099
|
const t = useTranslations76();
|
|
20095
20100
|
const { setComponentType } = useAuthContext();
|
|
20096
|
-
const [showConfirmation, setShowConfirmation] =
|
|
20101
|
+
const [showConfirmation, setShowConfirmation] = useState78(false);
|
|
20097
20102
|
const formSchema = z7.object({
|
|
20098
20103
|
email: z7.string().email({
|
|
20099
20104
|
message: t(`common.errors.invalid_email`)
|
|
@@ -20158,7 +20163,7 @@ import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
|
|
|
20158
20163
|
import { useTranslations as useTranslations77 } from "next-intl";
|
|
20159
20164
|
import Image13 from "next/image";
|
|
20160
20165
|
import { useRouter, useSearchParams as useSearchParams3 } from "next/navigation";
|
|
20161
|
-
import { useEffect as
|
|
20166
|
+
import { useEffect as useEffect61, useState as useState79 } from "react";
|
|
20162
20167
|
import { useForm as useForm8 } from "react-hook-form";
|
|
20163
20168
|
import { z as z8 } from "zod";
|
|
20164
20169
|
import { Fragment as Fragment40, jsx as jsx219, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
@@ -20171,8 +20176,8 @@ function Login() {
|
|
|
20171
20176
|
const nativeRouter = useRouter();
|
|
20172
20177
|
const searchParams = useSearchParams3();
|
|
20173
20178
|
const callbackUrl = searchParams.get("callbackUrl");
|
|
20174
|
-
const [referralCode, setReferralCode2] =
|
|
20175
|
-
|
|
20179
|
+
const [referralCode, setReferralCode2] = useState79(null);
|
|
20180
|
+
useEffect61(() => {
|
|
20176
20181
|
const cookies = document.cookie.split("; ");
|
|
20177
20182
|
for (const cookie of cookies) {
|
|
20178
20183
|
const [name, value] = cookie.split("=");
|
|
@@ -20291,7 +20296,7 @@ function Login() {
|
|
|
20291
20296
|
__name(Login, "Login");
|
|
20292
20297
|
|
|
20293
20298
|
// src/features/auth/components/forms/Logout.tsx
|
|
20294
|
-
import { useEffect as
|
|
20299
|
+
import { useEffect as useEffect62 } from "react";
|
|
20295
20300
|
|
|
20296
20301
|
// src/features/auth/utils/clearClientStorage.ts
|
|
20297
20302
|
function clearClientStorage(keys) {
|
|
@@ -20306,7 +20311,7 @@ __name(clearClientStorage, "clearClientStorage");
|
|
|
20306
20311
|
import { Fragment as Fragment41, jsx as jsx220 } from "react/jsx-runtime";
|
|
20307
20312
|
function Logout({ storageKeys }) {
|
|
20308
20313
|
const generateUrl = usePageUrlGenerator();
|
|
20309
|
-
|
|
20314
|
+
useEffect62(() => {
|
|
20310
20315
|
const logOut = /* @__PURE__ */ __name(async () => {
|
|
20311
20316
|
clearClientStorage([CURRENT_USER_STORAGE_KEY, ...storageKeys ?? []]);
|
|
20312
20317
|
await AuthService.logout();
|
|
@@ -20320,7 +20325,7 @@ __name(Logout, "Logout");
|
|
|
20320
20325
|
|
|
20321
20326
|
// src/features/auth/components/forms/RefreshUser.tsx
|
|
20322
20327
|
import { deleteCookie, getCookie as getCookie2 } from "cookies-next";
|
|
20323
|
-
import { useEffect as
|
|
20328
|
+
import { useEffect as useEffect63 } from "react";
|
|
20324
20329
|
function RefreshUser() {
|
|
20325
20330
|
const { setUser } = useCurrentUserContext();
|
|
20326
20331
|
const loadFullUser = /* @__PURE__ */ __name(async () => {
|
|
@@ -20340,7 +20345,7 @@ function RefreshUser() {
|
|
|
20340
20345
|
deleteCookie("reloadData");
|
|
20341
20346
|
}
|
|
20342
20347
|
}, "loadFullUser");
|
|
20343
|
-
|
|
20348
|
+
useEffect63(() => {
|
|
20344
20349
|
const reloadData = getCookie2("reloadData");
|
|
20345
20350
|
if (reloadData !== void 0) loadFullUser();
|
|
20346
20351
|
}, []);
|
|
@@ -20352,16 +20357,16 @@ __name(RefreshUser, "RefreshUser");
|
|
|
20352
20357
|
import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
|
|
20353
20358
|
import { useTranslations as useTranslations78 } from "next-intl";
|
|
20354
20359
|
import Image14 from "next/image";
|
|
20355
|
-
import { useEffect as
|
|
20360
|
+
import { useEffect as useEffect64, useState as useState80 } from "react";
|
|
20356
20361
|
import { useForm as useForm9 } from "react-hook-form";
|
|
20357
20362
|
import { z as z9 } from "zod";
|
|
20358
20363
|
import { Fragment as Fragment42, jsx as jsx221, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
20359
20364
|
function ResetPassword() {
|
|
20360
20365
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
20361
|
-
const [showConfirmation, setShowConfirmation] =
|
|
20362
|
-
const [error, setError] =
|
|
20366
|
+
const [showConfirmation, setShowConfirmation] = useState80(false);
|
|
20367
|
+
const [error, setError] = useState80(void 0);
|
|
20363
20368
|
const t = useTranslations78();
|
|
20364
|
-
|
|
20369
|
+
useEffect64(() => {
|
|
20365
20370
|
async function validateResetPasswordCode(code) {
|
|
20366
20371
|
try {
|
|
20367
20372
|
const payload = {
|
|
@@ -20438,18 +20443,18 @@ __name(ResetPassword, "ResetPassword");
|
|
|
20438
20443
|
// src/features/auth/components/forms/TwoFactorChallenge.tsx
|
|
20439
20444
|
import { useTranslations as useTranslations80 } from "next-intl";
|
|
20440
20445
|
import { useRouter as useRouter2, useSearchParams as useSearchParams4 } from "next/navigation";
|
|
20441
|
-
import { useState as
|
|
20446
|
+
import { useState as useState82 } from "react";
|
|
20442
20447
|
import { v4 as v410 } from "uuid";
|
|
20443
20448
|
|
|
20444
20449
|
// src/features/auth/components/two-factor/PasskeyButton.tsx
|
|
20445
20450
|
import { startAuthentication } from "@simplewebauthn/browser";
|
|
20446
20451
|
import { useTranslations as useTranslations79 } from "next-intl";
|
|
20447
|
-
import { useState as
|
|
20452
|
+
import { useState as useState81 } from "react";
|
|
20448
20453
|
import { v4 as v49 } from "uuid";
|
|
20449
20454
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
20450
20455
|
function PasskeyButton({ pendingToken, onSuccess, onError, disabled = false }) {
|
|
20451
20456
|
const t = useTranslations79();
|
|
20452
|
-
const [isLoading, setIsLoading] =
|
|
20457
|
+
const [isLoading, setIsLoading] = useState81(false);
|
|
20453
20458
|
const handleClick = /* @__PURE__ */ __name(async () => {
|
|
20454
20459
|
setIsLoading(true);
|
|
20455
20460
|
try {
|
|
@@ -20494,10 +20499,10 @@ function TwoFactorChallenge() {
|
|
|
20494
20499
|
const nativeRouter = useRouter2();
|
|
20495
20500
|
const searchParams = useSearchParams4();
|
|
20496
20501
|
const callbackUrl = searchParams.get("callbackUrl");
|
|
20497
|
-
const [isVerifying, setIsVerifying] =
|
|
20498
|
-
const [totpError, setTotpError] =
|
|
20499
|
-
const [backupCode, setBackupCode] =
|
|
20500
|
-
const [backupError, setBackupError] =
|
|
20502
|
+
const [isVerifying, setIsVerifying] = useState82(false);
|
|
20503
|
+
const [totpError, setTotpError] = useState82();
|
|
20504
|
+
const [backupCode, setBackupCode] = useState82("");
|
|
20505
|
+
const [backupError, setBackupError] = useState82();
|
|
20501
20506
|
if (!pendingTwoFactor) {
|
|
20502
20507
|
return null;
|
|
20503
20508
|
}
|
|
@@ -20792,7 +20797,7 @@ var AI_CONNECTIONS_I18N_KEYS = [
|
|
|
20792
20797
|
|
|
20793
20798
|
// src/features/ai-connection/contexts/AiConnectionsContext.tsx
|
|
20794
20799
|
import { useTranslations as useTranslations82 } from "next-intl";
|
|
20795
|
-
import { createContext as createContext29, useCallback as useCallback38, useContext as useContext29, useEffect as
|
|
20800
|
+
import { createContext as createContext29, useCallback as useCallback38, useContext as useContext29, useEffect as useEffect65, useMemo as useMemo36, useState as useState83 } from "react";
|
|
20796
20801
|
import { jsx as jsx225 } from "react/jsx-runtime";
|
|
20797
20802
|
var AI_CONNECTIONS_ADMIN_PAGE_URL = "/administration/ai-connections";
|
|
20798
20803
|
var defaultContextValue3 = {
|
|
@@ -20810,11 +20815,11 @@ var AiConnectionsContext = createContext29(void 0);
|
|
|
20810
20815
|
var AiConnectionsProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
20811
20816
|
const t = useTranslations82();
|
|
20812
20817
|
const generateUrl = usePageUrlGenerator();
|
|
20813
|
-
const [connections, setConnections] =
|
|
20814
|
-
const [providerRegistry, setProviderRegistry] =
|
|
20815
|
-
const [envDefaults, setEnvDefaults] =
|
|
20816
|
-
const [scopeCompanyId, setScopeCompanyId] =
|
|
20817
|
-
const [isLoading, setIsLoading] =
|
|
20818
|
+
const [connections, setConnections] = useState83([]);
|
|
20819
|
+
const [providerRegistry, setProviderRegistry] = useState83({});
|
|
20820
|
+
const [envDefaults, setEnvDefaults] = useState83({});
|
|
20821
|
+
const [scopeCompanyId, setScopeCompanyId] = useState83(null);
|
|
20822
|
+
const [isLoading, setIsLoading] = useState83(true);
|
|
20818
20823
|
const refresh = useCallback38(async () => {
|
|
20819
20824
|
setIsLoading(true);
|
|
20820
20825
|
try {
|
|
@@ -20826,7 +20831,7 @@ var AiConnectionsProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
|
20826
20831
|
setIsLoading(false);
|
|
20827
20832
|
}
|
|
20828
20833
|
}, []);
|
|
20829
|
-
|
|
20834
|
+
useEffect65(() => {
|
|
20830
20835
|
void refresh();
|
|
20831
20836
|
}, [refresh]);
|
|
20832
20837
|
const value = useMemo36(
|
|
@@ -20853,7 +20858,7 @@ var useAiConnections = /* @__PURE__ */ __name(() => useContext29(AiConnectionsCo
|
|
|
20853
20858
|
|
|
20854
20859
|
// src/features/ai-connection/components/containers/AiConnectionsContainer.tsx
|
|
20855
20860
|
import { useTranslations as useTranslations86 } from "next-intl";
|
|
20856
|
-
import { useEffect as
|
|
20861
|
+
import { useEffect as useEffect67, useMemo as useMemo39, useState as useState85 } from "react";
|
|
20857
20862
|
|
|
20858
20863
|
// src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx
|
|
20859
20864
|
import { ChevronDownIcon as ChevronDownIcon10, ChevronUpIcon as ChevronUpIcon3, PlusIcon as PlusIcon2 } from "lucide-react";
|
|
@@ -20863,12 +20868,12 @@ import { useMemo as useMemo38 } from "react";
|
|
|
20863
20868
|
// src/features/ai-connection/components/forms/AiConnectionDeleter.tsx
|
|
20864
20869
|
import { TrashIcon } from "lucide-react";
|
|
20865
20870
|
import { useTranslations as useTranslations83 } from "next-intl";
|
|
20866
|
-
import { useState as
|
|
20871
|
+
import { useState as useState84 } from "react";
|
|
20867
20872
|
import { Fragment as Fragment44, jsx as jsx226, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
20868
20873
|
function AiConnectionDeleter({ connection }) {
|
|
20869
20874
|
const t = useTranslations83();
|
|
20870
20875
|
const { refresh } = useAiConnections();
|
|
20871
|
-
const [open, setOpen] =
|
|
20876
|
+
const [open, setOpen] = useState84(false);
|
|
20872
20877
|
return /* @__PURE__ */ jsxs130(Fragment44, { children: [
|
|
20873
20878
|
/* @__PURE__ */ jsx226(
|
|
20874
20879
|
Button,
|
|
@@ -20909,7 +20914,7 @@ __name(AiConnectionDeleter, "AiConnectionDeleter");
|
|
|
20909
20914
|
// src/features/ai-connection/components/forms/AiConnectionEditor.tsx
|
|
20910
20915
|
import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
|
|
20911
20916
|
import { useTranslations as useTranslations84 } from "next-intl";
|
|
20912
|
-
import { useCallback as useCallback39, useEffect as
|
|
20917
|
+
import { useCallback as useCallback39, useEffect as useEffect66, useMemo as useMemo37 } from "react";
|
|
20913
20918
|
import { useForm as useForm10 } from "react-hook-form";
|
|
20914
20919
|
import { v4 as v411 } from "uuid";
|
|
20915
20920
|
import { z as z10 } from "zod";
|
|
@@ -21006,7 +21011,7 @@ function AiConnectionEditor({
|
|
|
21006
21011
|
resolver: zodResolver10(formSchema),
|
|
21007
21012
|
defaultValues: getDefaultValues()
|
|
21008
21013
|
});
|
|
21009
|
-
|
|
21014
|
+
useEffect66(() => {
|
|
21010
21015
|
if (registryRows.length === 0) return;
|
|
21011
21016
|
const currentProvider = form.getValues("provider");
|
|
21012
21017
|
const provider = currentProvider || connection?.provider || providers[0] || "";
|
|
@@ -21347,8 +21352,8 @@ __name(AiConnectionsContainer, "AiConnectionsContainer");
|
|
|
21347
21352
|
function AiConnectionsBody() {
|
|
21348
21353
|
const t = useTranslations86();
|
|
21349
21354
|
const { scopeCompanyId, setScopeCompanyId } = useAiConnections();
|
|
21350
|
-
const [companies, setCompanies] =
|
|
21351
|
-
|
|
21355
|
+
const [companies, setCompanies] = useState85([]);
|
|
21356
|
+
useEffect67(() => {
|
|
21352
21357
|
let active = true;
|
|
21353
21358
|
CompanyService.findMany({}).then((response) => {
|
|
21354
21359
|
if (active) setCompanies(response ?? []);
|
|
@@ -21465,7 +21470,7 @@ __name(RelevantContentsList, "RelevantContentsList");
|
|
|
21465
21470
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
21466
21471
|
import { ArrowRight, LifeBuoyIcon } from "lucide-react";
|
|
21467
21472
|
import { useTranslations as useTranslations91 } from "next-intl";
|
|
21468
|
-
import { useCallback as useCallback40, useEffect as
|
|
21473
|
+
import { useCallback as useCallback40, useEffect as useEffect68, useMemo as useMemo41, useRef as useRef37, useState as useState86 } from "react";
|
|
21469
21474
|
|
|
21470
21475
|
// src/features/how-to/components/containers/HowToCommandViewer.tsx
|
|
21471
21476
|
import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
|
|
@@ -21591,10 +21596,10 @@ function matchPage(pathname, pattern) {
|
|
|
21591
21596
|
__name(matchPage, "matchPage");
|
|
21592
21597
|
function HowToCommand({ pathname, contextKeys, extraGroups, onStartChat }) {
|
|
21593
21598
|
const t = useTranslations91();
|
|
21594
|
-
const [dialogOpen, setDialogOpen] =
|
|
21595
|
-
const [selectedHowTo, setSelectedHowTo] =
|
|
21599
|
+
const [dialogOpen, setDialogOpen] = useState86(false);
|
|
21600
|
+
const [selectedHowTo, setSelectedHowTo] = useState86(null);
|
|
21596
21601
|
const searchTermRef = useRef37("");
|
|
21597
|
-
const [searchTerm, setSearchTerm] =
|
|
21602
|
+
const [searchTerm, setSearchTerm] = useState86("");
|
|
21598
21603
|
const data = useDataListRetriever({
|
|
21599
21604
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
21600
21605
|
return HowToService.findMany(params);
|
|
@@ -21625,16 +21630,16 @@ function HowToCommand({ pathname, contextKeys, extraGroups, onStartChat }) {
|
|
|
21625
21630
|
[searchTermRef, data]
|
|
21626
21631
|
);
|
|
21627
21632
|
const updateSearchTerm = useDebounce2(search, 500);
|
|
21628
|
-
|
|
21633
|
+
useEffect68(() => {
|
|
21629
21634
|
updateSearchTerm(searchTerm);
|
|
21630
21635
|
}, [updateSearchTerm, searchTerm]);
|
|
21631
|
-
|
|
21636
|
+
useEffect68(() => {
|
|
21632
21637
|
if (!dialogOpen) {
|
|
21633
21638
|
setSearchTerm("");
|
|
21634
21639
|
searchTermRef.current = "";
|
|
21635
21640
|
}
|
|
21636
21641
|
}, [dialogOpen]);
|
|
21637
|
-
|
|
21642
|
+
useEffect68(() => {
|
|
21638
21643
|
const down = /* @__PURE__ */ __name((e) => {
|
|
21639
21644
|
if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
|
|
21640
21645
|
e.preventDefault();
|
|
@@ -21866,11 +21871,11 @@ registerTableGenerator("howtos", useHowToTableStructure);
|
|
|
21866
21871
|
|
|
21867
21872
|
// src/features/how-to/components/forms/HowToReindexButton.tsx
|
|
21868
21873
|
import { useTranslations as useTranslations94 } from "next-intl";
|
|
21869
|
-
import { useState as
|
|
21874
|
+
import { useState as useState87 } from "react";
|
|
21870
21875
|
import { jsx as jsx239 } from "react/jsx-runtime";
|
|
21871
21876
|
function HowToReindexButton({ refresh }) {
|
|
21872
21877
|
const t = useTranslations94();
|
|
21873
|
-
const [isReindexing, setIsReindexing] =
|
|
21878
|
+
const [isReindexing, setIsReindexing] = useState87(false);
|
|
21874
21879
|
const onReindex = /* @__PURE__ */ __name(async () => {
|
|
21875
21880
|
setIsReindexing(true);
|
|
21876
21881
|
try {
|
|
@@ -21929,7 +21934,7 @@ __name(HowToListContainer, "HowToListContainer");
|
|
|
21929
21934
|
// src/features/how-to/components/forms/HowToSelector.tsx
|
|
21930
21935
|
import { CircleX as CircleX3, RefreshCwIcon as RefreshCwIcon4, SearchIcon as SearchIcon7, XIcon as XIcon11 } from "lucide-react";
|
|
21931
21936
|
import { useTranslations as useTranslations96 } from "next-intl";
|
|
21932
|
-
import { useCallback as useCallback41, useEffect as
|
|
21937
|
+
import { useCallback as useCallback41, useEffect as useEffect69, useRef as useRef38, useState as useState88 } from "react";
|
|
21933
21938
|
import { Fragment as Fragment48, jsx as jsx242, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
21934
21939
|
function HowToSelector({
|
|
21935
21940
|
id,
|
|
@@ -21940,10 +21945,10 @@ function HowToSelector({
|
|
|
21940
21945
|
isRequired = false
|
|
21941
21946
|
}) {
|
|
21942
21947
|
const t = useTranslations96();
|
|
21943
|
-
const [open, setOpen] =
|
|
21948
|
+
const [open, setOpen] = useState88(false);
|
|
21944
21949
|
const searchTermRef = useRef38("");
|
|
21945
|
-
const [searchTerm, setSearchTerm] =
|
|
21946
|
-
const [isSearching, setIsSearching] =
|
|
21950
|
+
const [searchTerm, setSearchTerm] = useState88("");
|
|
21951
|
+
const [isSearching, setIsSearching] = useState88(false);
|
|
21947
21952
|
const data = useDataListRetriever({
|
|
21948
21953
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
21949
21954
|
return HowToService.findMany(params);
|
|
@@ -21965,7 +21970,7 @@ function HowToSelector({
|
|
|
21965
21970
|
[searchTermRef, data]
|
|
21966
21971
|
);
|
|
21967
21972
|
const updateSearchTerm = useDebounce2(search, 500);
|
|
21968
|
-
|
|
21973
|
+
useEffect69(() => {
|
|
21969
21974
|
setIsSearching(true);
|
|
21970
21975
|
updateSearchTerm(searchTerm);
|
|
21971
21976
|
}, [updateSearchTerm, searchTerm]);
|
|
@@ -22033,7 +22038,7 @@ __name(HowToSelector, "HowToSelector");
|
|
|
22033
22038
|
|
|
22034
22039
|
// src/features/handbook/components/lists/HandbookContents.tsx
|
|
22035
22040
|
import { useTranslations as useTranslations111 } from "next-intl";
|
|
22036
|
-
import { useCallback as useCallback45, useEffect as
|
|
22041
|
+
import { useCallback as useCallback45, useEffect as useEffect73, useMemo as useMemo48, useState as useState96 } from "react";
|
|
22037
22042
|
|
|
22038
22043
|
// src/features/handbook/contexts/HandbookContext.tsx
|
|
22039
22044
|
import { useTranslations as useTranslations97 } from "next-intl";
|
|
@@ -22088,10 +22093,10 @@ var HandbookProvider = /* @__PURE__ */ __name(({ children, page, section, functi
|
|
|
22088
22093
|
import { MessagesSquareIcon, Sparkles as Sparkles2 } from "lucide-react";
|
|
22089
22094
|
import { useTranslations as useTranslations108 } from "next-intl";
|
|
22090
22095
|
import Link5 from "next/link";
|
|
22091
|
-
import { useCallback as useCallback44, useState as
|
|
22096
|
+
import { useCallback as useCallback44, useState as useState94 } from "react";
|
|
22092
22097
|
|
|
22093
22098
|
// src/features/assistant/components/parts/AssistantComposer.tsx
|
|
22094
|
-
import { useState as
|
|
22099
|
+
import { useState as useState89 } from "react";
|
|
22095
22100
|
import { useTranslations as useTranslations98 } from "next-intl";
|
|
22096
22101
|
import { ArrowUp } from "lucide-react";
|
|
22097
22102
|
import { jsx as jsx244, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
@@ -22105,7 +22110,7 @@ function AssistantComposer({
|
|
|
22105
22110
|
leading
|
|
22106
22111
|
}) {
|
|
22107
22112
|
const t = useTranslations98();
|
|
22108
|
-
const [internal, setInternal] =
|
|
22113
|
+
const [internal, setInternal] = useState89("");
|
|
22109
22114
|
const value = controlled ?? internal;
|
|
22110
22115
|
const setValue = onValueChange ?? setInternal;
|
|
22111
22116
|
const canSend = value.trim().length > 0 && !disabled;
|
|
@@ -22155,7 +22160,7 @@ function AssistantComposer({
|
|
|
22155
22160
|
__name(AssistantComposer, "AssistantComposer");
|
|
22156
22161
|
|
|
22157
22162
|
// src/features/assistant/components/parts/AssistantThread.tsx
|
|
22158
|
-
import { useEffect as
|
|
22163
|
+
import { useEffect as useEffect71, useRef as useRef39 } from "react";
|
|
22159
22164
|
|
|
22160
22165
|
// src/features/assistant-message/components/MessageItem.tsx
|
|
22161
22166
|
import { useTranslations as useTranslations105 } from "next-intl";
|
|
@@ -22165,10 +22170,10 @@ import ReactMarkdown3, { defaultUrlTransform } from "react-markdown";
|
|
|
22165
22170
|
import remarkGfm3 from "remark-gfm";
|
|
22166
22171
|
|
|
22167
22172
|
// src/features/assistant-message/components/parts/MessageSourcesContainer.tsx
|
|
22168
|
-
import { useEffect as
|
|
22173
|
+
import { useEffect as useEffect70, useMemo as useMemo44, useState as useState92 } from "react";
|
|
22169
22174
|
|
|
22170
22175
|
// src/features/assistant-message/components/parts/MessageSourcesPanel.tsx
|
|
22171
|
-
import { useMemo as useMemo43, useState as
|
|
22176
|
+
import { useMemo as useMemo43, useState as useState91 } from "react";
|
|
22172
22177
|
import { useTranslations as useTranslations104 } from "next-intl";
|
|
22173
22178
|
import { ChevronDown as ChevronDown4, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
22174
22179
|
|
|
@@ -22227,7 +22232,7 @@ function ReferencesTab({ references }) {
|
|
|
22227
22232
|
__name(ReferencesTab, "ReferencesTab");
|
|
22228
22233
|
|
|
22229
22234
|
// src/features/assistant-message/components/parts/tabs/CitationsTab.tsx
|
|
22230
|
-
import { Fragment as Fragment49, useState as
|
|
22235
|
+
import { Fragment as Fragment49, useState as useState90 } from "react";
|
|
22231
22236
|
import { useTranslations as useTranslations101 } from "next-intl";
|
|
22232
22237
|
import { ChevronDown as ChevronDown3, HelpCircle } from "lucide-react";
|
|
22233
22238
|
import ReactMarkdown2 from "react-markdown";
|
|
@@ -22268,7 +22273,7 @@ function CitationsTab({ citations, sources }) {
|
|
|
22268
22273
|
const t = useTranslations101();
|
|
22269
22274
|
const entityLabel = useEntityLabel();
|
|
22270
22275
|
const isMobile = useIsMobile();
|
|
22271
|
-
const [expanded, setExpanded] =
|
|
22276
|
+
const [expanded, setExpanded] = useState90(/* @__PURE__ */ new Set());
|
|
22272
22277
|
if (citations.length === 0) return null;
|
|
22273
22278
|
const sorted = [...citations].sort((a, b) => (b.relevance ?? 0) - (a.relevance ?? 0));
|
|
22274
22279
|
const toggle = /* @__PURE__ */ __name((id) => {
|
|
@@ -22535,8 +22540,8 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
22535
22540
|
if (usersCount > 0) visibleTabs.push("users");
|
|
22536
22541
|
const autoOpen = isLatestAssistant && suggestionsCount > 0;
|
|
22537
22542
|
const initialTab = autoOpen ? "suggested" : visibleTabs[0];
|
|
22538
|
-
const [open, setOpen] =
|
|
22539
|
-
const [active, setActive] =
|
|
22543
|
+
const [open, setOpen] = useState91(autoOpen);
|
|
22544
|
+
const [active, setActive] = useState91(initialTab);
|
|
22540
22545
|
if (total === 0) return null;
|
|
22541
22546
|
const panelId = `sources-panel-${message.id}`;
|
|
22542
22547
|
return /* @__PURE__ */ jsxs145("div", { className: "mt-2 w-full min-w-0", children: [
|
|
@@ -22618,8 +22623,8 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
22618
22623
|
}
|
|
22619
22624
|
return parts.sort().join("|");
|
|
22620
22625
|
}, [groups]);
|
|
22621
|
-
const [resolved, setResolved] =
|
|
22622
|
-
|
|
22626
|
+
const [resolved, setResolved] = useState92([]);
|
|
22627
|
+
useEffect70(() => {
|
|
22623
22628
|
if (groups.size === 0) {
|
|
22624
22629
|
setResolved((current) => current.length === 0 ? current : []);
|
|
22625
22630
|
return;
|
|
@@ -22810,7 +22815,7 @@ function AssistantThread({
|
|
|
22810
22815
|
renderMention
|
|
22811
22816
|
}) {
|
|
22812
22817
|
const lastMessageRef = useRef39(null);
|
|
22813
|
-
|
|
22818
|
+
useEffect71(() => {
|
|
22814
22819
|
lastMessageRef.current?.scrollIntoView({ block: "start", behavior: "smooth" });
|
|
22815
22820
|
}, [messages.length, sending]);
|
|
22816
22821
|
return /* @__PURE__ */ jsxs148("div", { className: "flex-1 min-w-0 overflow-x-hidden overflow-y-auto px-6 py-5", children: [
|
|
@@ -22833,7 +22838,7 @@ __name(AssistantThread, "AssistantThread");
|
|
|
22833
22838
|
|
|
22834
22839
|
// src/features/handbook/hooks/useHandbookAsk.ts
|
|
22835
22840
|
import { useTranslations as useTranslations107 } from "next-intl";
|
|
22836
|
-
import { useCallback as useCallback43, useEffect as
|
|
22841
|
+
import { useCallback as useCallback43, useEffect as useEffect72, useState as useState93 } from "react";
|
|
22837
22842
|
import { v4 as v412 } from "uuid";
|
|
22838
22843
|
function withSources(messages, label) {
|
|
22839
22844
|
return messages.map((message) => withSourcesInContent(message, label));
|
|
@@ -22861,12 +22866,12 @@ function useHandbookAsk(params) {
|
|
|
22861
22866
|
const generateUrl = usePageUrlGenerator();
|
|
22862
22867
|
const shouldSyncUrl = params?.syncUrl ?? true;
|
|
22863
22868
|
const handbookThreadId = params?.handbookThreadId;
|
|
22864
|
-
const [threads, setThreads] =
|
|
22865
|
-
const [thread, setThread] =
|
|
22866
|
-
const [messages, setMessages] =
|
|
22867
|
-
const [sending, setSending] =
|
|
22869
|
+
const [threads, setThreads] = useState93([]);
|
|
22870
|
+
const [thread, setThread] = useState93(void 0);
|
|
22871
|
+
const [messages, setMessages] = useState93([]);
|
|
22872
|
+
const [sending, setSending] = useState93(false);
|
|
22868
22873
|
const sourcesLabel = t("handbook.chat.sources");
|
|
22869
|
-
|
|
22874
|
+
useEffect72(() => {
|
|
22870
22875
|
let cancelled = false;
|
|
22871
22876
|
(async () => {
|
|
22872
22877
|
const loaded = await HandbookThreadService.findMany();
|
|
@@ -22876,7 +22881,7 @@ function useHandbookAsk(params) {
|
|
|
22876
22881
|
cancelled = true;
|
|
22877
22882
|
};
|
|
22878
22883
|
}, []);
|
|
22879
|
-
|
|
22884
|
+
useEffect72(() => {
|
|
22880
22885
|
if (!handbookThreadId) return;
|
|
22881
22886
|
let cancelled = false;
|
|
22882
22887
|
(async () => {
|
|
@@ -22969,7 +22974,7 @@ function HandbookAskSheet({ handbookPageId } = {}) {
|
|
|
22969
22974
|
const t = useTranslations108();
|
|
22970
22975
|
const generateUrl = usePageUrlGenerator();
|
|
22971
22976
|
const { threads, thread, messages, sending, ask, selectThread } = useHandbookAsk({ syncUrl: false });
|
|
22972
|
-
const [scoped, setScoped] =
|
|
22977
|
+
const [scoped, setScoped] = useState94(false);
|
|
22973
22978
|
const chatUrl = `${generateUrl({ page: Modules.HandbookPage })}/chat`;
|
|
22974
22979
|
const showThread = !!thread || sending || messages.length > 0;
|
|
22975
22980
|
const send = useCallback44(
|
|
@@ -23030,11 +23035,11 @@ __name(HandbookAskSheet, "HandbookAskSheet");
|
|
|
23030
23035
|
|
|
23031
23036
|
// src/features/handbook/components/forms/HandbookSyncButton.tsx
|
|
23032
23037
|
import { useTranslations as useTranslations109 } from "next-intl";
|
|
23033
|
-
import { useState as
|
|
23038
|
+
import { useState as useState95 } from "react";
|
|
23034
23039
|
import { jsx as jsx258 } from "react/jsx-runtime";
|
|
23035
23040
|
function HandbookSyncButton({ refresh }) {
|
|
23036
23041
|
const t = useTranslations109();
|
|
23037
|
-
const [isSyncing, setIsSyncing] =
|
|
23042
|
+
const [isSyncing, setIsSyncing] = useState95(false);
|
|
23038
23043
|
const onSync = /* @__PURE__ */ __name(async () => {
|
|
23039
23044
|
setIsSyncing(true);
|
|
23040
23045
|
try {
|
|
@@ -23151,11 +23156,11 @@ __name(splitByNesting, "splitByNesting");
|
|
|
23151
23156
|
import { Fragment as Fragment51, jsx as jsx261, jsxs as jsxs152 } from "react/jsx-runtime";
|
|
23152
23157
|
function HandbookContents() {
|
|
23153
23158
|
const t = useTranslations111();
|
|
23154
|
-
const [pages, setPages] =
|
|
23155
|
-
const [sections, setSections] =
|
|
23156
|
-
const [isLoading, setIsLoading] =
|
|
23157
|
-
const [reloadToken, setReloadToken] =
|
|
23158
|
-
|
|
23159
|
+
const [pages, setPages] = useState96([]);
|
|
23160
|
+
const [sections, setSections] = useState96([]);
|
|
23161
|
+
const [isLoading, setIsLoading] = useState96(true);
|
|
23162
|
+
const [reloadToken, setReloadToken] = useState96(0);
|
|
23163
|
+
useEffect73(() => {
|
|
23159
23164
|
let cancelled = false;
|
|
23160
23165
|
const load = /* @__PURE__ */ __name(async () => {
|
|
23161
23166
|
setIsLoading(true);
|
|
@@ -23245,7 +23250,7 @@ __name(HandbookAdminContainer, "HandbookAdminContainer");
|
|
|
23245
23250
|
|
|
23246
23251
|
// src/features/handbook/components/containers/HandbookPageContainer.tsx
|
|
23247
23252
|
import { useTranslations as useTranslations115 } from "next-intl";
|
|
23248
|
-
import { useEffect as
|
|
23253
|
+
import { useEffect as useEffect76, useMemo as useMemo51, useState as useState98 } from "react";
|
|
23249
23254
|
|
|
23250
23255
|
// src/features/handbook/components/details/HandbookPageDetails.tsx
|
|
23251
23256
|
import { jsx as jsx263 } from "react/jsx-runtime";
|
|
@@ -23301,14 +23306,14 @@ __name(HandbookPageNeighbours, "HandbookPageNeighbours");
|
|
|
23301
23306
|
// src/features/handbook/components/details/HandbookPageToc.tsx
|
|
23302
23307
|
import { List } from "lucide-react";
|
|
23303
23308
|
import { useTranslations as useTranslations113 } from "next-intl";
|
|
23304
|
-
import { useCallback as useCallback46, useEffect as
|
|
23309
|
+
import { useCallback as useCallback46, useEffect as useEffect74, useState as useState97 } from "react";
|
|
23305
23310
|
import { jsx as jsx265, jsxs as jsxs154 } from "react/jsx-runtime";
|
|
23306
23311
|
function HandbookPageToc({ containerId }) {
|
|
23307
23312
|
const t = useTranslations113();
|
|
23308
|
-
const [activeId, setActiveId] =
|
|
23309
|
-
const [headings, setHeadings] =
|
|
23310
|
-
const [headingsWithIds, setHeadingsWithIds] =
|
|
23311
|
-
|
|
23313
|
+
const [activeId, setActiveId] = useState97(null);
|
|
23314
|
+
const [headings, setHeadings] = useState97([]);
|
|
23315
|
+
const [headingsWithIds, setHeadingsWithIds] = useState97(/* @__PURE__ */ new Map());
|
|
23316
|
+
useEffect74(() => {
|
|
23312
23317
|
const contentPanel = document.getElementById(containerId);
|
|
23313
23318
|
if (!contentPanel) return;
|
|
23314
23319
|
const collect = /* @__PURE__ */ __name(() => {
|
|
@@ -23332,7 +23337,7 @@ function HandbookPageToc({ containerId }) {
|
|
|
23332
23337
|
observer.observe(contentPanel, { childList: true, subtree: true });
|
|
23333
23338
|
return () => observer.disconnect();
|
|
23334
23339
|
}, [containerId]);
|
|
23335
|
-
|
|
23340
|
+
useEffect74(() => {
|
|
23336
23341
|
if (headingsWithIds.size === 0) return;
|
|
23337
23342
|
const observer = new IntersectionObserver(
|
|
23338
23343
|
(entries) => {
|
|
@@ -23398,7 +23403,7 @@ __name(HandbookPageToc, "HandbookPageToc");
|
|
|
23398
23403
|
// src/features/handbook/components/parts/HandbookPageNavigator.tsx
|
|
23399
23404
|
import { BookOpenIcon } from "lucide-react";
|
|
23400
23405
|
import { useTranslations as useTranslations114 } from "next-intl";
|
|
23401
|
-
import { useEffect as
|
|
23406
|
+
import { useEffect as useEffect75, useMemo as useMemo50, useRef as useRef40 } from "react";
|
|
23402
23407
|
import { jsx as jsx266, jsxs as jsxs155 } from "react/jsx-runtime";
|
|
23403
23408
|
function HandbookPageNavigator({ pages, sections, currentId }) {
|
|
23404
23409
|
const t = useTranslations114();
|
|
@@ -23430,7 +23435,7 @@ function HandbookPageNavigator({ pages, sections, currentId }) {
|
|
|
23430
23435
|
return ordered;
|
|
23431
23436
|
}, [pages, sections, t]);
|
|
23432
23437
|
const currentRef = useRef40(null);
|
|
23433
|
-
|
|
23438
|
+
useEffect75(() => {
|
|
23434
23439
|
const link = currentRef.current;
|
|
23435
23440
|
if (!link) return;
|
|
23436
23441
|
const rail = link.closest(".overflow-y-auto");
|
|
@@ -23472,11 +23477,11 @@ import { jsx as jsx267, jsxs as jsxs156 } from "react/jsx-runtime";
|
|
|
23472
23477
|
var CONTENT_CONTAINER_ID = "handbook-page-content";
|
|
23473
23478
|
function HandbookPageContainer({ handbookPageId }) {
|
|
23474
23479
|
const t = useTranslations115();
|
|
23475
|
-
const [handbookPage, setHandbookPage] =
|
|
23476
|
-
const [pages, setPages] =
|
|
23477
|
-
const [sections, setSections] =
|
|
23478
|
-
const [isLoading, setIsLoading] =
|
|
23479
|
-
|
|
23480
|
+
const [handbookPage, setHandbookPage] = useState98(void 0);
|
|
23481
|
+
const [pages, setPages] = useState98([]);
|
|
23482
|
+
const [sections, setSections] = useState98([]);
|
|
23483
|
+
const [isLoading, setIsLoading] = useState98(true);
|
|
23484
|
+
useEffect76(() => {
|
|
23480
23485
|
let cancelled = false;
|
|
23481
23486
|
const load = /* @__PURE__ */ __name(async () => {
|
|
23482
23487
|
setIsLoading(true);
|
|
@@ -23492,7 +23497,7 @@ function HandbookPageContainer({ handbookPageId }) {
|
|
|
23492
23497
|
cancelled = true;
|
|
23493
23498
|
};
|
|
23494
23499
|
}, [handbookPageId]);
|
|
23495
|
-
|
|
23500
|
+
useEffect76(() => {
|
|
23496
23501
|
let cancelled = false;
|
|
23497
23502
|
const loadPages = /* @__PURE__ */ __name(async () => {
|
|
23498
23503
|
const allPages = await HandbookPageService.findMany({ fetchAll: true });
|
|
@@ -23717,14 +23722,14 @@ __name(EntityMentionLinkView, "EntityMentionLinkView");
|
|
|
23717
23722
|
var EntityMentionLink = /* @__PURE__ */ __name((p) => /* @__PURE__ */ jsx270(EntityMentionLinkView, { ...p }), "EntityMentionLink");
|
|
23718
23723
|
|
|
23719
23724
|
// src/features/assistant/components/parts/AssistantEmptyState.tsx
|
|
23720
|
-
import { useState as
|
|
23725
|
+
import { useState as useState99 } from "react";
|
|
23721
23726
|
import { useTranslations as useTranslations118 } from "next-intl";
|
|
23722
23727
|
import { Sparkles as Sparkles4 } from "lucide-react";
|
|
23723
23728
|
import { jsx as jsx271, jsxs as jsxs159 } from "react/jsx-runtime";
|
|
23724
23729
|
var STARTER_KEYS = ["a", "b", "c", "d"];
|
|
23725
23730
|
function AssistantEmptyState({ onSend, operatorMode = false, onOperatorModeChange, composerLeading }) {
|
|
23726
23731
|
const t = useTranslations118();
|
|
23727
|
-
const [draft, setDraft] =
|
|
23732
|
+
const [draft, setDraft] = useState99("");
|
|
23728
23733
|
return /* @__PURE__ */ jsx271("div", { className: "flex h-full w-full items-center justify-center p-10", children: /* @__PURE__ */ jsxs159("div", { className: "flex w-full max-w-2xl flex-col gap-6", children: [
|
|
23729
23734
|
/* @__PURE__ */ jsxs159("div", { className: "text-center", children: [
|
|
23730
23735
|
/* @__PURE__ */ jsx271("div", { className: "mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-blue-400 to-violet-500 text-white", children: /* @__PURE__ */ jsx271(Sparkles4, { className: "h-5 w-5" }) }),
|
|
@@ -23762,14 +23767,14 @@ function AssistantEmptyState({ onSend, operatorMode = false, onOperatorModeChang
|
|
|
23762
23767
|
__name(AssistantEmptyState, "AssistantEmptyState");
|
|
23763
23768
|
|
|
23764
23769
|
// src/features/assistant/components/parts/AssistantThreadHeader.tsx
|
|
23765
|
-
import { useState as
|
|
23770
|
+
import { useState as useState100 } from "react";
|
|
23766
23771
|
import { useTranslations as useTranslations119 } from "next-intl";
|
|
23767
23772
|
import { jsx as jsx272, jsxs as jsxs160 } from "react/jsx-runtime";
|
|
23768
23773
|
function AssistantThreadHeader({ assistant, onRename, onDelete, renamePlaceholder, deleteConfirmLabel }) {
|
|
23769
23774
|
const t = useTranslations119();
|
|
23770
|
-
const [renameValue, setRenameValue] =
|
|
23771
|
-
const [renameOpen, setRenameOpen] =
|
|
23772
|
-
const [deleteOpen, setDeleteOpen] =
|
|
23775
|
+
const [renameValue, setRenameValue] = useState100(assistant.title);
|
|
23776
|
+
const [renameOpen, setRenameOpen] = useState100(false);
|
|
23777
|
+
const [deleteOpen, setDeleteOpen] = useState100(false);
|
|
23773
23778
|
const handleRename = /* @__PURE__ */ __name(async () => {
|
|
23774
23779
|
const trimmed = renameValue.trim() || assistant.title;
|
|
23775
23780
|
await onRename(trimmed);
|
|
@@ -23921,7 +23926,7 @@ import { useTranslations as useTranslations122 } from "next-intl";
|
|
|
23921
23926
|
// src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx
|
|
23922
23927
|
import { ArrowUp as ArrowUp2 } from "lucide-react";
|
|
23923
23928
|
import { useTranslations as useTranslations121 } from "next-intl";
|
|
23924
|
-
import { useCallback as useCallback47, useId as useId5, useState as
|
|
23929
|
+
import { useCallback as useCallback47, useId as useId5, useState as useState101 } from "react";
|
|
23925
23930
|
import { jsx as jsx274, jsxs as jsxs162 } from "react/jsx-runtime";
|
|
23926
23931
|
function flattenBlocks(blocks) {
|
|
23927
23932
|
const lines = [];
|
|
@@ -23959,9 +23964,9 @@ function AssistantBlockNoteComposer({
|
|
|
23959
23964
|
}) {
|
|
23960
23965
|
const t = useTranslations121();
|
|
23961
23966
|
const editorId = useId5().replace(/[^a-zA-Z0-9]/g, "");
|
|
23962
|
-
const [blocks, setBlocks] =
|
|
23963
|
-
const [isEmpty, setIsEmpty] =
|
|
23964
|
-
const [resetKey, setResetKey] =
|
|
23967
|
+
const [blocks, setBlocks] = useState101([]);
|
|
23968
|
+
const [isEmpty, setIsEmpty] = useState101(true);
|
|
23969
|
+
const [resetKey, setResetKey] = useState101(0);
|
|
23965
23970
|
const canSend = !isEmpty && !disabled;
|
|
23966
23971
|
const submit = useCallback47(async () => {
|
|
23967
23972
|
if (isEmpty || disabled) return;
|
|
@@ -24099,7 +24104,7 @@ __name(AssistantPageContainer, "AssistantPageContainer");
|
|
|
24099
24104
|
// src/features/assistant-action/components/ApprovalActionCard.tsx
|
|
24100
24105
|
import { ShieldAlert as ShieldAlert2 } from "lucide-react";
|
|
24101
24106
|
import { useTranslations as useTranslations123 } from "next-intl";
|
|
24102
|
-
import { Fragment as Fragment57, useEffect as
|
|
24107
|
+
import { Fragment as Fragment57, useEffect as useEffect77, useMemo as useMemo54, useState as useState102 } from "react";
|
|
24103
24108
|
import { jsx as jsx276, jsxs as jsxs164 } from "react/jsx-runtime";
|
|
24104
24109
|
var STATUS_VARIANT = {
|
|
24105
24110
|
pending: "softBlue",
|
|
@@ -24254,14 +24259,14 @@ function parseLegacyProposal(toolArgs) {
|
|
|
24254
24259
|
__name(parseLegacyProposal, "parseLegacyProposal");
|
|
24255
24260
|
function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipKeys }) {
|
|
24256
24261
|
const t = useTranslations123();
|
|
24257
|
-
const [status, setStatus] =
|
|
24258
|
-
const [actionSummary, setActionSummary] =
|
|
24259
|
-
const [toolName, setToolName] =
|
|
24260
|
-
const [toolArgs, setToolArgs] =
|
|
24261
|
-
const [actionProposal, setActionProposal] =
|
|
24262
|
-
const [busy, setBusy] =
|
|
24263
|
-
const [failed, setFailed] =
|
|
24264
|
-
|
|
24262
|
+
const [status, setStatus] = useState102(void 0);
|
|
24263
|
+
const [actionSummary, setActionSummary] = useState102(void 0);
|
|
24264
|
+
const [toolName, setToolName] = useState102(void 0);
|
|
24265
|
+
const [toolArgs, setToolArgs] = useState102(void 0);
|
|
24266
|
+
const [actionProposal, setActionProposal] = useState102(void 0);
|
|
24267
|
+
const [busy, setBusy] = useState102(false);
|
|
24268
|
+
const [failed, setFailed] = useState102(false);
|
|
24269
|
+
useEffect77(() => {
|
|
24265
24270
|
let cancelled = false;
|
|
24266
24271
|
(async () => {
|
|
24267
24272
|
try {
|
|
@@ -24422,7 +24427,7 @@ var NotificationErrorBoundary = class extends Component {
|
|
|
24422
24427
|
|
|
24423
24428
|
// src/features/notification/components/containers/NotificationsListContainer.tsx
|
|
24424
24429
|
import { useSearchParams as useSearchParams5 } from "next/navigation";
|
|
24425
|
-
import { useState as
|
|
24430
|
+
import { useState as useState103 } from "react";
|
|
24426
24431
|
|
|
24427
24432
|
// src/features/notification/components/filters/NotificationViewSwitcher.tsx
|
|
24428
24433
|
import { useTranslations as useTranslations124 } from "next-intl";
|
|
@@ -24452,7 +24457,7 @@ __name(NotificationViewSwitcher, "NotificationViewSwitcher");
|
|
|
24452
24457
|
|
|
24453
24458
|
// src/features/notification/components/lists/NotificationsList.tsx
|
|
24454
24459
|
import { useTranslations as useTranslations126 } from "next-intl";
|
|
24455
|
-
import { useEffect as
|
|
24460
|
+
import { useEffect as useEffect78, useRef as useRef41 } from "react";
|
|
24456
24461
|
|
|
24457
24462
|
// src/features/notification/hooks/useNotificationTableStructure.tsx
|
|
24458
24463
|
import { ArchiveIcon as ArchiveIcon2 } from "lucide-react";
|
|
@@ -24580,7 +24585,7 @@ function NotificationsList({ archived, headerControl, fullWidth }) {
|
|
|
24580
24585
|
retrieverParams: { isArchived: archived }
|
|
24581
24586
|
});
|
|
24582
24587
|
const markedRef = useRef41(/* @__PURE__ */ new Set());
|
|
24583
|
-
|
|
24588
|
+
useEffect78(() => {
|
|
24584
24589
|
if (!data.isLoaded || !data.data) return;
|
|
24585
24590
|
const unreadIds = data.data.filter((notification) => !notification.isRead && !markedRef.current.has(notification.id)).map((notification) => notification.id);
|
|
24586
24591
|
if (unreadIds.length === 0) return;
|
|
@@ -24620,7 +24625,7 @@ function NotificationsListContainerContent() {
|
|
|
24620
24625
|
const searchParams = useSearchParams5();
|
|
24621
24626
|
const { error } = useNotificationContext();
|
|
24622
24627
|
const tabParam = searchParams.get("tab");
|
|
24623
|
-
const [mode, setMode] =
|
|
24628
|
+
const [mode, setMode] = useState103(tabParam === "archived" ? "archived" : "inbox");
|
|
24624
24629
|
if (error) {
|
|
24625
24630
|
return /* @__PURE__ */ jsx282("div", { className: "flex items-center justify-center p-8 text-center", children: /* @__PURE__ */ jsxs167("div", { className: "text-destructive text-xs/relaxed", children: [
|
|
24626
24631
|
/* @__PURE__ */ jsxs167("p", { children: [
|
|
@@ -24660,7 +24665,7 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
24660
24665
|
// src/features/notification/components/modals/NotificationModal.tsx
|
|
24661
24666
|
import { BellIcon as BellIcon2, ExternalLinkIcon } from "lucide-react";
|
|
24662
24667
|
import { useTranslations as useTranslations127 } from "next-intl";
|
|
24663
|
-
import { Fragment as Fragment58, useCallback as useCallback48, useEffect as
|
|
24668
|
+
import { Fragment as Fragment58, useCallback as useCallback48, useEffect as useEffect79, useMemo as useMemo56, useRef as useRef42, useState as useState104 } from "react";
|
|
24664
24669
|
import { jsx as jsx283, jsxs as jsxs168 } from "react/jsx-runtime";
|
|
24665
24670
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
24666
24671
|
const _instanceId = useRef42(Math.random().toString(36).substr(2, 9));
|
|
@@ -24682,7 +24687,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
24682
24687
|
} = useSocketContext();
|
|
24683
24688
|
const t = useTranslations127();
|
|
24684
24689
|
const generateUrl = usePageUrlGenerator();
|
|
24685
|
-
const [newNotifications, setNewNotifications] =
|
|
24690
|
+
const [newNotifications, setNewNotifications] = useState104(false);
|
|
24686
24691
|
const preventAutoClose = useRef42(false);
|
|
24687
24692
|
const circuitBreakerRef = useRef42({
|
|
24688
24693
|
count: 0,
|
|
@@ -24711,7 +24716,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
24711
24716
|
unreadIds: unreadNotifications2.map((notif) => notif.id)
|
|
24712
24717
|
};
|
|
24713
24718
|
}, [notifications]);
|
|
24714
|
-
|
|
24719
|
+
useEffect79(() => {
|
|
24715
24720
|
setNewNotifications(unreadCount > 0);
|
|
24716
24721
|
}, [unreadCount]);
|
|
24717
24722
|
const processSocketNotifications = useCallback48(() => {
|
|
@@ -24756,7 +24761,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
24756
24761
|
generateUrl,
|
|
24757
24762
|
checkCircuitBreaker
|
|
24758
24763
|
]);
|
|
24759
|
-
|
|
24764
|
+
useEffect79(() => {
|
|
24760
24765
|
processSocketNotifications();
|
|
24761
24766
|
}, [processSocketNotifications]);
|
|
24762
24767
|
const handleOpenChange = /* @__PURE__ */ __name((newlyRequestedOpenState) => {
|
|
@@ -24869,7 +24874,7 @@ __name(PushNotificationProvider, "PushNotificationProvider");
|
|
|
24869
24874
|
|
|
24870
24875
|
// src/features/referral/components/ReferralCodeCapture.tsx
|
|
24871
24876
|
import { useSearchParams as useSearchParams6 } from "next/navigation";
|
|
24872
|
-
import { useEffect as
|
|
24877
|
+
import { useEffect as useEffect80 } from "react";
|
|
24873
24878
|
|
|
24874
24879
|
// src/features/referral/utils/referral-cookie.ts
|
|
24875
24880
|
function setReferralCode(code) {
|
|
@@ -24894,7 +24899,7 @@ __name(getReferralCode2, "getReferralCode");
|
|
|
24894
24899
|
// src/features/referral/components/ReferralCodeCapture.tsx
|
|
24895
24900
|
function ReferralCodeCapture() {
|
|
24896
24901
|
const searchParams = useSearchParams6();
|
|
24897
|
-
|
|
24902
|
+
useEffect80(() => {
|
|
24898
24903
|
if (!isReferralEnabled()) {
|
|
24899
24904
|
return;
|
|
24900
24905
|
}
|
|
@@ -24913,14 +24918,14 @@ __name(ReferralCodeCapture, "ReferralCodeCapture");
|
|
|
24913
24918
|
|
|
24914
24919
|
// src/features/referral/components/ReferralWidget.tsx
|
|
24915
24920
|
import { Copy as Copy2, Loader2 as Loader26, Mail, Users } from "lucide-react";
|
|
24916
|
-
import { useCallback as useCallback49, useRef as useRef43, useState as
|
|
24921
|
+
import { useCallback as useCallback49, useRef as useRef43, useState as useState107 } from "react";
|
|
24917
24922
|
|
|
24918
24923
|
// src/features/referral/hooks/useReferralInvite.ts
|
|
24919
|
-
import { useState as
|
|
24924
|
+
import { useState as useState105 } from "react";
|
|
24920
24925
|
function useReferralInvite() {
|
|
24921
|
-
const [sending, setSending] =
|
|
24922
|
-
const [error, setError] =
|
|
24923
|
-
const [success, setSuccess] =
|
|
24926
|
+
const [sending, setSending] = useState105(false);
|
|
24927
|
+
const [error, setError] = useState105(null);
|
|
24928
|
+
const [success, setSuccess] = useState105(false);
|
|
24924
24929
|
const sendInvite = /* @__PURE__ */ __name(async (email) => {
|
|
24925
24930
|
if (!isReferralEnabled()) {
|
|
24926
24931
|
return;
|
|
@@ -24942,12 +24947,12 @@ function useReferralInvite() {
|
|
|
24942
24947
|
__name(useReferralInvite, "useReferralInvite");
|
|
24943
24948
|
|
|
24944
24949
|
// src/features/referral/hooks/useReferralStats.ts
|
|
24945
|
-
import { useEffect as
|
|
24950
|
+
import { useEffect as useEffect81, useState as useState106 } from "react";
|
|
24946
24951
|
function useReferralStats() {
|
|
24947
|
-
const [stats, setStats] =
|
|
24948
|
-
const [loading, setLoading] =
|
|
24949
|
-
const [error, setError] =
|
|
24950
|
-
|
|
24952
|
+
const [stats, setStats] = useState106(null);
|
|
24953
|
+
const [loading, setLoading] = useState106(true);
|
|
24954
|
+
const [error, setError] = useState106(null);
|
|
24955
|
+
useEffect81(() => {
|
|
24951
24956
|
if (!isReferralEnabled()) {
|
|
24952
24957
|
setLoading(false);
|
|
24953
24958
|
return;
|
|
@@ -25017,8 +25022,8 @@ function ReferralWidget({
|
|
|
25017
25022
|
const t = { ...DEFAULT_TRANSLATIONS, ...translations };
|
|
25018
25023
|
const { stats, loading, error } = useReferralStats();
|
|
25019
25024
|
const { sendInvite, sending } = useReferralInvite();
|
|
25020
|
-
const [email, setEmail] =
|
|
25021
|
-
const [copied, setCopied] =
|
|
25025
|
+
const [email, setEmail] = useState107("");
|
|
25026
|
+
const [copied, setCopied] = useState107(false);
|
|
25022
25027
|
const linkInputRef = useRef43(null);
|
|
25023
25028
|
const config = getReferralConfig();
|
|
25024
25029
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
@@ -25231,13 +25236,13 @@ __name(FormRoles, "FormRoles");
|
|
|
25231
25236
|
|
|
25232
25237
|
// src/features/role/components/forms/RemoveUserFromRole.tsx
|
|
25233
25238
|
import { useTranslations as useTranslations130 } from "next-intl";
|
|
25234
|
-
import { useEffect as
|
|
25239
|
+
import { useEffect as useEffect82, useState as useState108 } from "react";
|
|
25235
25240
|
import { Fragment as Fragment61, jsx as jsx290, jsxs as jsxs173 } from "react/jsx-runtime";
|
|
25236
25241
|
function RemoveUserFromRole({ role, user, refresh }) {
|
|
25237
|
-
const [open, setOpen] =
|
|
25238
|
-
const [canRemove, setCanRemove] =
|
|
25242
|
+
const [open, setOpen] = useState108(false);
|
|
25243
|
+
const [canRemove, setCanRemove] = useState108(false);
|
|
25239
25244
|
const t = useTranslations130();
|
|
25240
|
-
|
|
25245
|
+
useEffect82(() => {
|
|
25241
25246
|
async function checkCompanyAdminDeletability() {
|
|
25242
25247
|
const roleUsers = await UserService.findAllUsersByRole({
|
|
25243
25248
|
roleId: role.id
|
|
@@ -25307,13 +25312,13 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
25307
25312
|
// src/features/role/components/forms/UserRoleAdd.tsx
|
|
25308
25313
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
25309
25314
|
import { useTranslations as useTranslations131 } from "next-intl";
|
|
25310
|
-
import { useCallback as useCallback50, useEffect as
|
|
25315
|
+
import { useCallback as useCallback50, useEffect as useEffect83, useRef as useRef44, useState as useState109 } from "react";
|
|
25311
25316
|
import { Fragment as Fragment62, jsx as jsx291, jsxs as jsxs174 } from "react/jsx-runtime";
|
|
25312
25317
|
function UserRoleAdd({ user, refresh }) {
|
|
25313
|
-
const [open, setOpen] =
|
|
25318
|
+
const [open, setOpen] = useState109(false);
|
|
25314
25319
|
const inputRef = useRef44(null);
|
|
25315
|
-
const [searchTerm, setSearchTerm] =
|
|
25316
|
-
const [roles, setRoles] =
|
|
25320
|
+
const [searchTerm, setSearchTerm] = useState109("");
|
|
25321
|
+
const [roles, setRoles] = useState109([]);
|
|
25317
25322
|
const t = useTranslations131();
|
|
25318
25323
|
const addUserToRole = /* @__PURE__ */ __name(async (role) => {
|
|
25319
25324
|
await RoleService.addUserToRole({
|
|
@@ -25349,10 +25354,10 @@ function UserRoleAdd({ user, refresh }) {
|
|
|
25349
25354
|
[searchTerm, user]
|
|
25350
25355
|
);
|
|
25351
25356
|
const updateSearchTerm = useDebounce2(searchRoles, 500);
|
|
25352
|
-
|
|
25357
|
+
useEffect83(() => {
|
|
25353
25358
|
if (open) updateSearchTerm(searchTerm);
|
|
25354
25359
|
}, [open, searchTerm]);
|
|
25355
|
-
|
|
25360
|
+
useEffect83(() => {
|
|
25356
25361
|
if (open) searchRoles("");
|
|
25357
25362
|
}, [open]);
|
|
25358
25363
|
return /* @__PURE__ */ jsxs174(Fragment62, { children: [
|
|
@@ -25619,11 +25624,11 @@ function OAuthScopeSelector({
|
|
|
25619
25624
|
__name(OAuthScopeSelector, "OAuthScopeSelector");
|
|
25620
25625
|
|
|
25621
25626
|
// src/features/oauth/components/OAuthClientSecretDisplay.tsx
|
|
25622
|
-
import { useState as
|
|
25627
|
+
import { useState as useState110, useCallback as useCallback53 } from "react";
|
|
25623
25628
|
import { Copy as Copy3, Check, AlertTriangle } from "lucide-react";
|
|
25624
25629
|
import { jsx as jsx296, jsxs as jsxs177 } from "react/jsx-runtime";
|
|
25625
25630
|
function OAuthClientSecretDisplay({ secret, onDismiss, open, clientName }) {
|
|
25626
|
-
const [copied, setCopied] =
|
|
25631
|
+
const [copied, setCopied] = useState110(false);
|
|
25627
25632
|
const handleCopy = useCallback53(async () => {
|
|
25628
25633
|
try {
|
|
25629
25634
|
await navigator.clipboard.writeText(secret);
|
|
@@ -25816,7 +25821,7 @@ function OAuthClientList({
|
|
|
25816
25821
|
__name(OAuthClientList, "OAuthClientList");
|
|
25817
25822
|
|
|
25818
25823
|
// src/features/oauth/components/OAuthClientForm.tsx
|
|
25819
|
-
import { useState as
|
|
25824
|
+
import { useState as useState111, useCallback as useCallback54 } from "react";
|
|
25820
25825
|
import { jsx as jsx299, jsxs as jsxs180 } from "react/jsx-runtime";
|
|
25821
25826
|
function OAuthClientForm({
|
|
25822
25827
|
client,
|
|
@@ -25827,14 +25832,14 @@ function OAuthClientForm({
|
|
|
25827
25832
|
defaultScopes = []
|
|
25828
25833
|
}) {
|
|
25829
25834
|
const isEditMode = !!client;
|
|
25830
|
-
const [formState, setFormState] =
|
|
25835
|
+
const [formState, setFormState] = useState111({
|
|
25831
25836
|
name: client?.name || "",
|
|
25832
25837
|
description: client?.description || "",
|
|
25833
25838
|
redirectUris: client?.redirectUris?.length ? client.redirectUris : [""],
|
|
25834
25839
|
allowedScopes: client ? client.allowedScopes || [] : defaultScopes,
|
|
25835
25840
|
isConfidential: client?.isConfidential ?? true
|
|
25836
25841
|
});
|
|
25837
|
-
const [errors, setErrors] =
|
|
25842
|
+
const [errors, setErrors] = useState111({});
|
|
25838
25843
|
const validate = useCallback54(() => {
|
|
25839
25844
|
const newErrors = {};
|
|
25840
25845
|
if (!formState.name.trim()) {
|
|
@@ -25958,7 +25963,7 @@ function OAuthClientForm({
|
|
|
25958
25963
|
__name(OAuthClientForm, "OAuthClientForm");
|
|
25959
25964
|
|
|
25960
25965
|
// src/features/oauth/components/OAuthClientDetail.tsx
|
|
25961
|
-
import { useState as
|
|
25966
|
+
import { useState as useState112, useCallback as useCallback55 } from "react";
|
|
25962
25967
|
import { format as format2 } from "date-fns";
|
|
25963
25968
|
import { Copy as Copy4, Check as Check2, RefreshCw as RefreshCw3, Pencil as Pencil2, Trash2 as Trash25, ExternalLink } from "lucide-react";
|
|
25964
25969
|
import { Fragment as Fragment63, jsx as jsx300, jsxs as jsxs181 } from "react/jsx-runtime";
|
|
@@ -25969,11 +25974,11 @@ function OAuthClientDetail({
|
|
|
25969
25974
|
onDelete,
|
|
25970
25975
|
onRegenerateSecret
|
|
25971
25976
|
}) {
|
|
25972
|
-
const [copiedField, setCopiedField] =
|
|
25973
|
-
const [showDeleteConfirm, setShowDeleteConfirm] =
|
|
25974
|
-
const [showRegenerateConfirm, setShowRegenerateConfirm] =
|
|
25975
|
-
const [isDeleting, setIsDeleting] =
|
|
25976
|
-
const [isRegenerating, setIsRegenerating] =
|
|
25977
|
+
const [copiedField, setCopiedField] = useState112(null);
|
|
25978
|
+
const [showDeleteConfirm, setShowDeleteConfirm] = useState112(false);
|
|
25979
|
+
const [showRegenerateConfirm, setShowRegenerateConfirm] = useState112(false);
|
|
25980
|
+
const [isDeleting, setIsDeleting] = useState112(false);
|
|
25981
|
+
const [isRegenerating, setIsRegenerating] = useState112(false);
|
|
25977
25982
|
const copyToClipboard2 = useCallback55(async (text, field) => {
|
|
25978
25983
|
try {
|
|
25979
25984
|
await navigator.clipboard.writeText(text);
|
|
@@ -26284,7 +26289,7 @@ __name(OAuthConsentScreen, "OAuthConsentScreen");
|
|
|
26284
26289
|
import { zodResolver as zodResolver11 } from "@hookform/resolvers/zod";
|
|
26285
26290
|
import { CheckCircle, Mail as Mail2 } from "lucide-react";
|
|
26286
26291
|
import { useTranslations as useTranslations139 } from "next-intl";
|
|
26287
|
-
import { useState as
|
|
26292
|
+
import { useState as useState113 } from "react";
|
|
26288
26293
|
import { useForm as useForm11 } from "react-hook-form";
|
|
26289
26294
|
import { v4 as v413 } from "uuid";
|
|
26290
26295
|
import { z as z11 } from "zod";
|
|
@@ -26385,8 +26390,8 @@ __name(WaitlistQuestionnaireRenderer, "WaitlistQuestionnaireRenderer");
|
|
|
26385
26390
|
import { Fragment as Fragment65, jsx as jsx307, jsxs as jsxs188 } from "react/jsx-runtime";
|
|
26386
26391
|
function WaitlistForm({ onSuccess }) {
|
|
26387
26392
|
const t = useTranslations139();
|
|
26388
|
-
const [isSubmitting, setIsSubmitting] =
|
|
26389
|
-
const [isSuccess, setIsSuccess] =
|
|
26393
|
+
const [isSubmitting, setIsSubmitting] = useState113(false);
|
|
26394
|
+
const [isSuccess, setIsSuccess] = useState113(false);
|
|
26390
26395
|
const config = getWaitlistConfig();
|
|
26391
26396
|
const questionnaireFields = config.questionnaire ?? [];
|
|
26392
26397
|
const questionnaireSchema = questionnaireFields.reduce(
|
|
@@ -26565,13 +26570,13 @@ __name(WaitlistSuccessState, "WaitlistSuccessState");
|
|
|
26565
26570
|
// src/features/waitlist/components/sections/WaitlistConfirmation.tsx
|
|
26566
26571
|
import { CheckCircle as CheckCircle4, Loader2 as Loader28, XCircle as XCircle2 } from "lucide-react";
|
|
26567
26572
|
import { useTranslations as useTranslations141 } from "next-intl";
|
|
26568
|
-
import { useEffect as
|
|
26573
|
+
import { useEffect as useEffect84, useState as useState114 } from "react";
|
|
26569
26574
|
import { jsx as jsx310, jsxs as jsxs191 } from "react/jsx-runtime";
|
|
26570
26575
|
function WaitlistConfirmation({ code }) {
|
|
26571
26576
|
const t = useTranslations141();
|
|
26572
|
-
const [state, setState] =
|
|
26573
|
-
const [errorMessage, setErrorMessage] =
|
|
26574
|
-
|
|
26577
|
+
const [state, setState] = useState114("loading");
|
|
26578
|
+
const [errorMessage, setErrorMessage] = useState114("");
|
|
26579
|
+
useEffect84(() => {
|
|
26575
26580
|
async function confirmEmail() {
|
|
26576
26581
|
try {
|
|
26577
26582
|
await WaitlistService.confirm(code);
|
|
@@ -26610,11 +26615,11 @@ __name(WaitlistConfirmation, "WaitlistConfirmation");
|
|
|
26610
26615
|
// src/features/waitlist/components/lists/WaitlistList.tsx
|
|
26611
26616
|
import { RefreshCw as RefreshCw4 } from "lucide-react";
|
|
26612
26617
|
import { useTranslations as useTranslations142 } from "next-intl";
|
|
26613
|
-
import { useMemo as useMemo58, useState as
|
|
26618
|
+
import { useMemo as useMemo58, useState as useState115 } from "react";
|
|
26614
26619
|
import { jsx as jsx311, jsxs as jsxs192 } from "react/jsx-runtime";
|
|
26615
26620
|
function WaitlistList({ fullWidth } = {}) {
|
|
26616
26621
|
const t = useTranslations142();
|
|
26617
|
-
const [statusFilter, setStatusFilter] =
|
|
26622
|
+
const [statusFilter, setStatusFilter] = useState115("all");
|
|
26618
26623
|
const data = useDataListRetriever({
|
|
26619
26624
|
retriever: /* @__PURE__ */ __name((params) => WaitlistService.findMany(params), "retriever"),
|
|
26620
26625
|
retrieverParams: {},
|
|
@@ -26683,7 +26688,7 @@ __name(WaitlistList, "WaitlistList");
|
|
|
26683
26688
|
// src/features/rbac/components/RbacContainer.tsx
|
|
26684
26689
|
import { Loader2Icon as Loader2Icon4 } from "lucide-react";
|
|
26685
26690
|
import { useTranslations as useTranslations144 } from "next-intl";
|
|
26686
|
-
import { memo as memo2, useCallback as useCallback57, useEffect as
|
|
26691
|
+
import { memo as memo2, useCallback as useCallback57, useEffect as useEffect86, useMemo as useMemo59, useRef as useRef45, useState as useState117 } from "react";
|
|
26687
26692
|
|
|
26688
26693
|
// src/features/rbac/components/RbacPermissionCell.tsx
|
|
26689
26694
|
import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon12 } from "lucide-react";
|
|
@@ -26764,7 +26769,7 @@ __name(RbacPermissionCell, "RbacPermissionCell");
|
|
|
26764
26769
|
import { Popover as PopoverPrimitive2 } from "@base-ui/react/popover";
|
|
26765
26770
|
import { CheckIcon as CheckIcon10, MinusIcon as MinusIcon3, XIcon as XIcon13 } from "lucide-react";
|
|
26766
26771
|
import { useTranslations as useTranslations143 } from "next-intl";
|
|
26767
|
-
import { useCallback as useCallback56, useEffect as
|
|
26772
|
+
import { useCallback as useCallback56, useEffect as useEffect85, useState as useState116 } from "react";
|
|
26768
26773
|
import { Fragment as Fragment66, jsx as jsx313, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
26769
26774
|
function RbacPermissionPicker({
|
|
26770
26775
|
open,
|
|
@@ -26777,8 +26782,8 @@ function RbacPermissionPicker({
|
|
|
26777
26782
|
onClose
|
|
26778
26783
|
}) {
|
|
26779
26784
|
const t = useTranslations143();
|
|
26780
|
-
const [customSegment, setCustomSegment] =
|
|
26781
|
-
|
|
26785
|
+
const [customSegment, setCustomSegment] = useState116("");
|
|
26786
|
+
useEffect85(() => {
|
|
26782
26787
|
if (!open) setCustomSegment("");
|
|
26783
26788
|
}, [open]);
|
|
26784
26789
|
const currentSegments = typeof value === "string" ? value.split("|").filter(Boolean) : [];
|
|
@@ -27026,8 +27031,8 @@ var ModuleEditor = memo2(/* @__PURE__ */ __name(function ModuleEditor2({
|
|
|
27026
27031
|
function RbacContainer() {
|
|
27027
27032
|
const t = useTranslations144();
|
|
27028
27033
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
27029
|
-
const [selectedModuleId, setSelectedModuleId] =
|
|
27030
|
-
const [activePicker, setActivePicker] =
|
|
27034
|
+
const [selectedModuleId, setSelectedModuleId] = useState117(null);
|
|
27035
|
+
const [activePicker, setActivePicker] = useState117(null);
|
|
27031
27036
|
const openPicker = useCallback57((picker) => {
|
|
27032
27037
|
setActivePicker(picker);
|
|
27033
27038
|
}, []);
|
|
@@ -27055,7 +27060,7 @@ function RbacContainer() {
|
|
|
27055
27060
|
}
|
|
27056
27061
|
return Array.from(set).sort();
|
|
27057
27062
|
}, [matrix, roleNames]);
|
|
27058
|
-
|
|
27063
|
+
useEffect86(() => {
|
|
27059
27064
|
if (!selectedModuleId && sortedModuleIds.length > 0) {
|
|
27060
27065
|
setSelectedModuleId(sortedModuleIds[0]);
|
|
27061
27066
|
}
|
|
@@ -27138,7 +27143,7 @@ __name(RbacContainer, "RbacContainer");
|
|
|
27138
27143
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
27139
27144
|
import { Loader2Icon as Loader2Icon5 } from "lucide-react";
|
|
27140
27145
|
import { useTranslations as useTranslations145 } from "next-intl";
|
|
27141
|
-
import { Fragment as Fragment67, memo as memo3, useCallback as useCallback58, useEffect as
|
|
27146
|
+
import { Fragment as Fragment67, memo as memo3, useCallback as useCallback58, useEffect as useEffect87, useMemo as useMemo60, useRef as useRef46, useState as useState118 } from "react";
|
|
27142
27147
|
import { jsx as jsx315, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
27143
27148
|
function findToken2(tokens, action) {
|
|
27144
27149
|
if (!tokens) return void 0;
|
|
@@ -27176,8 +27181,8 @@ var ACTION_LABELS2 = {
|
|
|
27176
27181
|
function RbacByRoleContainer() {
|
|
27177
27182
|
const t = useTranslations145();
|
|
27178
27183
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
27179
|
-
const [selectedRoleId, setSelectedRoleId] =
|
|
27180
|
-
const [activePicker, setActivePicker] =
|
|
27184
|
+
const [selectedRoleId, setSelectedRoleId] = useState118(null);
|
|
27185
|
+
const [activePicker, setActivePicker] = useState118(null);
|
|
27181
27186
|
const openPicker = useCallback58((picker) => {
|
|
27182
27187
|
setActivePicker(picker);
|
|
27183
27188
|
}, []);
|
|
@@ -27196,7 +27201,7 @@ function RbacByRoleContainer() {
|
|
|
27196
27201
|
if (!matrix) return [];
|
|
27197
27202
|
return Object.keys(matrix).sort((a, b) => (moduleNames?.[a] ?? a).localeCompare(moduleNames?.[b] ?? b));
|
|
27198
27203
|
}, [matrix, moduleNames]);
|
|
27199
|
-
|
|
27204
|
+
useEffect87(() => {
|
|
27200
27205
|
if (!selectedRoleId && sortedRoleIds.length > 0) {
|
|
27201
27206
|
setSelectedRoleId(sortedRoleIds[0]);
|
|
27202
27207
|
}
|
|
@@ -27917,4 +27922,4 @@ export {
|
|
|
27917
27922
|
useOAuthClients,
|
|
27918
27923
|
useOAuthClient
|
|
27919
27924
|
};
|
|
27920
|
-
//# sourceMappingURL=chunk-
|
|
27925
|
+
//# sourceMappingURL=chunk-3W3VVX2N.mjs.map
|