@carlonicora/nextjs-jsonapi 3.26.0 → 3.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-AXYVDDXM.mjs → BlockNoteEditor-5MF2AH2U.mjs} +2 -2
- package/dist/{BlockNoteEditor-4EIKMNY3.js → BlockNoteEditor-LP65KUXI.js} +9 -9
- package/dist/{BlockNoteEditor-4EIKMNY3.js.map → BlockNoteEditor-LP65KUXI.js.map} +1 -1
- package/dist/billing/index.js +335 -335
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-QWZAGQWJ.mjs → chunk-SVJ6UZPA.mjs} +59 -54
- package/dist/chunk-SVJ6UZPA.mjs.map +1 -0
- package/dist/{chunk-ABVTYQIJ.js → chunk-ZEEOY45J.js} +20 -15
- package/dist/chunk-ZEEOY45J.js.map +1 -0
- package/dist/client/index.d.mts +2 -0
- package/dist/client/index.d.ts +2 -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 +2 -2
- package/scripts/dev-watch.mjs +125 -0
- package/src/components/containers/PageContainer.tsx +3 -1
- package/src/components/containers/RoundPageContainer.tsx +14 -3
- package/src/components/forms/FormBlockNote.tsx +8 -2
- package/src/components/forms/FormCheckbox.tsx +1 -4
- package/src/components/navigations/Header.tsx +3 -1
- package/src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx +3 -1
- package/src/features/assistant/components/parts/AssistantComposer.tsx +3 -1
- package/src/features/assistant-message/components/parts/tabs/CitationsTab.tsx +3 -1
- package/src/hooks/url.rewriter.ts +5 -1
- package/src/shadcnui/ui/command.tsx +4 -1
- package/src/shadcnui/ui/table.tsx +1 -1
- package/dist/chunk-ABVTYQIJ.js.map +0 -1
- package/dist/chunk-QWZAGQWJ.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-AXYVDDXM.mjs.map → BlockNoteEditor-5MF2AH2U.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -1933,7 +1933,10 @@ function CommandList({ className, ...props }) {
|
|
|
1933
1933
|
CommandPrimitive.List,
|
|
1934
1934
|
{
|
|
1935
1935
|
"data-slot": "command-list",
|
|
1936
|
-
className: cn(
|
|
1936
|
+
className: cn(
|
|
1937
|
+
"no-scrollbar max-h-72 max-md:min-h-0 scroll-py-1 outline-none overflow-x-hidden overflow-y-auto",
|
|
1938
|
+
className
|
|
1939
|
+
),
|
|
1937
1940
|
...props
|
|
1938
1941
|
}
|
|
1939
1942
|
);
|
|
@@ -4536,7 +4539,7 @@ function TableCell({ className, ...props }) {
|
|
|
4536
4539
|
"td",
|
|
4537
4540
|
{
|
|
4538
4541
|
"data-slot": "table-cell",
|
|
4539
|
-
className: cn("p-2 align-middle whitespace-nowrap
|
|
4542
|
+
className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0", className),
|
|
4540
4543
|
...props
|
|
4541
4544
|
}
|
|
4542
4545
|
);
|
|
@@ -6643,7 +6646,9 @@ function useUrlRewriter() {
|
|
|
6643
6646
|
const generateUrl = usePageUrlGenerator();
|
|
6644
6647
|
return useCallback7(
|
|
6645
6648
|
(params) => {
|
|
6646
|
-
window.history.replaceState
|
|
6649
|
+
const write = params.mode === "push" ? window.history.pushState : window.history.replaceState;
|
|
6650
|
+
write.call(
|
|
6651
|
+
window.history,
|
|
6647
6652
|
null,
|
|
6648
6653
|
"",
|
|
6649
6654
|
generateUrl({
|
|
@@ -10432,7 +10437,7 @@ import { useRef as useRef17 } from "react";
|
|
|
10432
10437
|
import dynamic from "next/dynamic";
|
|
10433
10438
|
import React18 from "react";
|
|
10434
10439
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
10435
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10440
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-5MF2AH2U.mjs"), {
|
|
10436
10441
|
ssr: false
|
|
10437
10442
|
});
|
|
10438
10443
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -10549,14 +10554,7 @@ function FormCheckbox({ form, id, name, labelBefore, description, isRequired })
|
|
|
10549
10554
|
const simpleLabel = /* @__PURE__ */ __name(() => {
|
|
10550
10555
|
return (
|
|
10551
10556
|
// Phone: the label fills the row and is 40px tall, so the whole row toggles the box.
|
|
10552
|
-
/* @__PURE__ */ jsx92(
|
|
10553
|
-
FieldLabel,
|
|
10554
|
-
{
|
|
10555
|
-
htmlFor: id,
|
|
10556
|
-
className: `font-normal ${labelBefore ? "" : "ms-3"} max-md:min-h-10 max-md:flex-1`,
|
|
10557
|
-
children: name
|
|
10558
|
-
}
|
|
10559
|
-
)
|
|
10557
|
+
/* @__PURE__ */ jsx92(FieldLabel, { htmlFor: id, className: `font-normal ${labelBefore ? "" : "ms-3"} max-md:min-h-10 max-md:flex-1`, children: name })
|
|
10560
10558
|
);
|
|
10561
10559
|
}, "simpleLabel");
|
|
10562
10560
|
const label = /* @__PURE__ */ __name(() => {
|
|
@@ -15813,7 +15811,7 @@ __name(RoundPageContainerTitle, "RoundPageContainerTitle");
|
|
|
15813
15811
|
|
|
15814
15812
|
// src/components/containers/RoundPageContainer.tsx
|
|
15815
15813
|
import { useSearchParams } from "next/navigation";
|
|
15816
|
-
import { Fragment as Fragment25, useCallback as useCallback27, useEffect as useEffect42, useMemo as useMemo22, useState as useState52 } from "react";
|
|
15814
|
+
import { Fragment as Fragment25, useCallback as useCallback27, useEffect as useEffect42, useMemo as useMemo22, useRef as useRef28, useState as useState52 } from "react";
|
|
15817
15815
|
import { Fragment as Fragment26, jsx as jsx170, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
15818
15816
|
var DETAILS_COOKIE_NAME = "round_page_details_state";
|
|
15819
15817
|
var DETAILS_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -15889,13 +15887,17 @@ function RoundPageContainer({
|
|
|
15889
15887
|
const rewriteUrl = useUrlRewriter();
|
|
15890
15888
|
const initialValue = tabs ? (section && tabs.find((i) => tabValue(i) === section) ? section : null) || tabValue(tabs[0]) : void 0;
|
|
15891
15889
|
const [activeTab, setActiveTab] = useState52(initialValue);
|
|
15890
|
+
const previousSection = useRef28(section);
|
|
15892
15891
|
useEffect42(() => {
|
|
15893
15892
|
if (tabs && section) {
|
|
15894
15893
|
const tab = tabs.find((i) => tabValue(i) === section);
|
|
15895
15894
|
if (tab) {
|
|
15896
15895
|
setActiveTab(section);
|
|
15897
15896
|
}
|
|
15897
|
+
} else if (tabs && !section && previousSection.current) {
|
|
15898
|
+
setActiveTab(tabValue(tabs[0]));
|
|
15898
15899
|
}
|
|
15900
|
+
previousSection.current = section;
|
|
15899
15901
|
}, [section, tabs]);
|
|
15900
15902
|
const handleTabChange = useCallback27(
|
|
15901
15903
|
(key) => {
|
|
@@ -15903,7 +15905,7 @@ function RoundPageContainer({
|
|
|
15903
15905
|
if (module && id) {
|
|
15904
15906
|
rewriteUrl({ page: module, id, additionalParameters: { section: key } });
|
|
15905
15907
|
} else {
|
|
15906
|
-
rewriteUrl({ page: window.location.pathname, additionalParameters: { section: key } });
|
|
15908
|
+
rewriteUrl({ page: window.location.pathname, additionalParameters: { section: key }, mode: "push" });
|
|
15907
15909
|
}
|
|
15908
15910
|
onSectionChange?.(key);
|
|
15909
15911
|
},
|
|
@@ -16074,7 +16076,10 @@ function RoundPageContainer({
|
|
|
16074
16076
|
/* @__PURE__ */ jsx170(
|
|
16075
16077
|
"div",
|
|
16076
16078
|
{
|
|
16077
|
-
className: cn(
|
|
16079
|
+
className: cn(
|
|
16080
|
+
`min-w-0 grow`,
|
|
16081
|
+
activeFillHeight ? cn(`flex flex-col`, innerClip) : cn(innerScrollY, `p-4`)
|
|
16082
|
+
),
|
|
16078
16083
|
children: /* @__PURE__ */ jsxs95(
|
|
16079
16084
|
"div",
|
|
16080
16085
|
{
|
|
@@ -16290,7 +16295,7 @@ function AllowedUsersDetails({ showTitle, content }) {
|
|
|
16290
16295
|
__name(AllowedUsersDetails, "AllowedUsersDetails");
|
|
16291
16296
|
|
|
16292
16297
|
// src/components/editors/BlockNoteEditorMentionHoverCard.tsx
|
|
16293
|
-
import { useCallback as useCallback28, useEffect as useEffect43, useRef as
|
|
16298
|
+
import { useCallback as useCallback28, useEffect as useEffect43, useRef as useRef29, useState as useState53 } from "react";
|
|
16294
16299
|
import { createPortal as createPortal3 } from "react-dom";
|
|
16295
16300
|
import { jsx as jsx173 } from "react/jsx-runtime";
|
|
16296
16301
|
function BlockNoteEditorMentionHoverCard({
|
|
@@ -16298,7 +16303,7 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
16298
16303
|
mentionResolveFn
|
|
16299
16304
|
}) {
|
|
16300
16305
|
const [hovered, setHovered] = useState53(null);
|
|
16301
|
-
const closeTimeoutRef =
|
|
16306
|
+
const closeTimeoutRef = useRef29(null);
|
|
16302
16307
|
const scheduleClose = useCallback28(() => {
|
|
16303
16308
|
closeTimeoutRef.current = setTimeout(() => setHovered(null), 200);
|
|
16304
16309
|
}, []);
|
|
@@ -16558,12 +16563,12 @@ var BlockNoteViewerContainer = React29.memo(/* @__PURE__ */ __name(function View
|
|
|
16558
16563
|
}, "ViewerContainer"));
|
|
16559
16564
|
|
|
16560
16565
|
// src/components/pages/PageContainerContentDetails.tsx
|
|
16561
|
-
import { useEffect as useEffect44, useRef as
|
|
16566
|
+
import { useEffect as useEffect44, useRef as useRef30, useState as useState54 } from "react";
|
|
16562
16567
|
import { jsx as jsx177, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
16563
16568
|
function PageContainerContentDetails({ items, section, module, id }) {
|
|
16564
16569
|
const rewriteUrl = useUrlRewriter();
|
|
16565
16570
|
const [isScrolled, setIsScrolled] = useState54(false);
|
|
16566
|
-
const sentinelRef =
|
|
16571
|
+
const sentinelRef = useRef30(null);
|
|
16567
16572
|
useEffect44(() => {
|
|
16568
16573
|
const sentinel = sentinelRef.current;
|
|
16569
16574
|
if (!sentinel) return;
|
|
@@ -16771,13 +16776,13 @@ function JsonApiProvider({ config, children }) {
|
|
|
16771
16776
|
__name(JsonApiProvider, "JsonApiProvider");
|
|
16772
16777
|
|
|
16773
16778
|
// src/client/hooks/useJsonApiGet.ts
|
|
16774
|
-
import { useState as useState56, useEffect as useEffect47, useCallback as useCallback30, useRef as
|
|
16779
|
+
import { useState as useState56, useEffect as useEffect47, useCallback as useCallback30, useRef as useRef31 } from "react";
|
|
16775
16780
|
function useJsonApiGet(params) {
|
|
16776
16781
|
const [data, setData] = useState56(null);
|
|
16777
16782
|
const [loading, setLoading] = useState56(false);
|
|
16778
16783
|
const [error, setError] = useState56(null);
|
|
16779
16784
|
const [response, setResponse] = useState56(null);
|
|
16780
|
-
const isMounted =
|
|
16785
|
+
const isMounted = useRef31(true);
|
|
16781
16786
|
const fetchData = useCallback30(async () => {
|
|
16782
16787
|
if (params.options?.enabled === false) return;
|
|
16783
16788
|
setLoading(true);
|
|
@@ -17934,12 +17939,12 @@ import React31, { memo, useMemo as useMemo33, useState as useState61 } from "rea
|
|
|
17934
17939
|
// src/components/tables/ContentTableSearch.tsx
|
|
17935
17940
|
import { RefreshCw, Search, X as X3 } from "lucide-react";
|
|
17936
17941
|
import { useTranslations as useTranslations61 } from "next-intl";
|
|
17937
|
-
import { useCallback as useCallback35, useEffect as useEffect51, useRef as
|
|
17942
|
+
import { useCallback as useCallback35, useEffect as useEffect51, useRef as useRef32, useState as useState60 } from "react";
|
|
17938
17943
|
import { jsx as jsx191, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
17939
17944
|
function ContentTableSearch({ data }) {
|
|
17940
17945
|
const t = useTranslations61();
|
|
17941
|
-
const searchTermRef =
|
|
17942
|
-
const inputRef =
|
|
17946
|
+
const searchTermRef = useRef32("");
|
|
17947
|
+
const inputRef = useRef32(null);
|
|
17943
17948
|
const [searchTerm, setSearchTerm] = useState60("");
|
|
17944
17949
|
const [isFocused, setIsFocused] = useState60(false);
|
|
17945
17950
|
const [isSearching, setIsSearching] = useState60(false);
|
|
@@ -18263,12 +18268,12 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
18263
18268
|
}, "ContentListTable"));
|
|
18264
18269
|
|
|
18265
18270
|
// src/components/grids/ContentListGrid.tsx
|
|
18266
|
-
import { useEffect as useEffect52, useRef as
|
|
18271
|
+
import { useEffect as useEffect52, useRef as useRef33 } from "react";
|
|
18267
18272
|
import { Fragment as Fragment31, jsx as jsx193, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
18268
18273
|
var DEFAULT_GRID_CLASSES = "grid grid-cols-2 gap-4 p-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5";
|
|
18269
18274
|
function ContentListGrid(props) {
|
|
18270
18275
|
const { data, ItemComponent, allowSearch, fullWidth, gridClassName } = props;
|
|
18271
|
-
const sentinelRef =
|
|
18276
|
+
const sentinelRef = useRef33(null);
|
|
18272
18277
|
useEffect52(() => {
|
|
18273
18278
|
if (!data.next || !sentinelRef.current) return;
|
|
18274
18279
|
const observer = new IntersectionObserver(
|
|
@@ -18312,14 +18317,14 @@ __name(ContentListGrid, "ContentListGrid");
|
|
|
18312
18317
|
|
|
18313
18318
|
// src/components/fiscal/ItalianFiscalData.tsx
|
|
18314
18319
|
import { useTranslations as useTranslations63 } from "next-intl";
|
|
18315
|
-
import { forwardRef as forwardRef8, useCallback as useCallback36, useImperativeHandle as useImperativeHandle2, useRef as
|
|
18320
|
+
import { forwardRef as forwardRef8, useCallback as useCallback36, useImperativeHandle as useImperativeHandle2, useRef as useRef34, useState as useState62 } from "react";
|
|
18316
18321
|
import { z as z4 } from "zod";
|
|
18317
18322
|
import { jsx as jsx194, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
18318
18323
|
var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
|
|
18319
18324
|
const t = useTranslations63();
|
|
18320
|
-
const initialRef =
|
|
18325
|
+
const initialRef = useRef34(initialData);
|
|
18321
18326
|
const [fiscalData, setFiscalData] = useState62(initialData);
|
|
18322
|
-
const fiscalDataRef =
|
|
18327
|
+
const fiscalDataRef = useRef34(initialData);
|
|
18323
18328
|
const [fiscalErrors, setFiscalErrors] = useState62({});
|
|
18324
18329
|
const updateFiscalField = useCallback36((key, value) => {
|
|
18325
18330
|
setFiscalData((prev) => {
|
|
@@ -19044,11 +19049,11 @@ import { useTranslations as useTranslations67 } from "next-intl";
|
|
|
19044
19049
|
import { useState as useState67 } from "react";
|
|
19045
19050
|
|
|
19046
19051
|
// src/features/auth/components/two-factor/TotpInput.tsx
|
|
19047
|
-
import { useEffect as useEffect54, useRef as
|
|
19052
|
+
import { useEffect as useEffect54, useRef as useRef35, useState as useState66 } from "react";
|
|
19048
19053
|
import { jsx as jsx205, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
19049
19054
|
function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
19050
19055
|
const [digits, setDigits] = useState66(["", "", "", "", "", ""]);
|
|
19051
|
-
const inputRefs =
|
|
19056
|
+
const inputRefs = useRef35([]);
|
|
19052
19057
|
useEffect54(() => {
|
|
19053
19058
|
if (autoFocus && inputRefs.current[0]) {
|
|
19054
19059
|
inputRefs.current[0].focus();
|
|
@@ -21300,7 +21305,7 @@ __name(RelevantContentsList, "RelevantContentsList");
|
|
|
21300
21305
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
21301
21306
|
import { ArrowRight, LifeBuoyIcon } from "lucide-react";
|
|
21302
21307
|
import { useTranslations as useTranslations91 } from "next-intl";
|
|
21303
|
-
import { useCallback as useCallback40, useEffect as useEffect66, useMemo as useMemo40, useRef as
|
|
21308
|
+
import { useCallback as useCallback40, useEffect as useEffect66, useMemo as useMemo40, useRef as useRef36, useState as useState84 } from "react";
|
|
21304
21309
|
|
|
21305
21310
|
// src/features/how-to/components/containers/HowToCommandViewer.tsx
|
|
21306
21311
|
import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
|
|
@@ -21428,7 +21433,7 @@ function HowToCommand({ pathname, contextKeys, extraGroups, onStartChat }) {
|
|
|
21428
21433
|
const t = useTranslations91();
|
|
21429
21434
|
const [dialogOpen, setDialogOpen] = useState84(false);
|
|
21430
21435
|
const [selectedHowTo, setSelectedHowTo] = useState84(null);
|
|
21431
|
-
const searchTermRef =
|
|
21436
|
+
const searchTermRef = useRef36("");
|
|
21432
21437
|
const [searchTerm, setSearchTerm] = useState84("");
|
|
21433
21438
|
const data = useDataListRetriever({
|
|
21434
21439
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
@@ -21764,7 +21769,7 @@ __name(HowToListContainer, "HowToListContainer");
|
|
|
21764
21769
|
// src/features/how-to/components/forms/HowToSelector.tsx
|
|
21765
21770
|
import { CircleX as CircleX3, RefreshCwIcon as RefreshCwIcon4, SearchIcon as SearchIcon7, XIcon as XIcon11 } from "lucide-react";
|
|
21766
21771
|
import { useTranslations as useTranslations96 } from "next-intl";
|
|
21767
|
-
import { useCallback as useCallback41, useEffect as useEffect67, useRef as
|
|
21772
|
+
import { useCallback as useCallback41, useEffect as useEffect67, useRef as useRef37, useState as useState86 } from "react";
|
|
21768
21773
|
import { Fragment as Fragment48, jsx as jsx241, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
21769
21774
|
function HowToSelector({
|
|
21770
21775
|
id,
|
|
@@ -21776,7 +21781,7 @@ function HowToSelector({
|
|
|
21776
21781
|
}) {
|
|
21777
21782
|
const t = useTranslations96();
|
|
21778
21783
|
const [open, setOpen] = useState86(false);
|
|
21779
|
-
const searchTermRef =
|
|
21784
|
+
const searchTermRef = useRef37("");
|
|
21780
21785
|
const [searchTerm, setSearchTerm] = useState86("");
|
|
21781
21786
|
const [isSearching, setIsSearching] = useState86(false);
|
|
21782
21787
|
const data = useDataListRetriever({
|
|
@@ -21990,7 +21995,7 @@ function AssistantComposer({
|
|
|
21990
21995
|
__name(AssistantComposer, "AssistantComposer");
|
|
21991
21996
|
|
|
21992
21997
|
// src/features/assistant/components/parts/AssistantThread.tsx
|
|
21993
|
-
import { useEffect as useEffect69, useRef as
|
|
21998
|
+
import { useEffect as useEffect69, useRef as useRef38 } from "react";
|
|
21994
21999
|
|
|
21995
22000
|
// src/features/assistant-message/components/MessageItem.tsx
|
|
21996
22001
|
import { useTranslations as useTranslations105 } from "next-intl";
|
|
@@ -22644,7 +22649,7 @@ function AssistantThread({
|
|
|
22644
22649
|
renderApprovalAction,
|
|
22645
22650
|
renderMention
|
|
22646
22651
|
}) {
|
|
22647
|
-
const lastMessageRef =
|
|
22652
|
+
const lastMessageRef = useRef38(null);
|
|
22648
22653
|
useEffect69(() => {
|
|
22649
22654
|
lastMessageRef.current?.scrollIntoView({ block: "start", behavior: "smooth" });
|
|
22650
22655
|
}, [messages.length, sending]);
|
|
@@ -23233,7 +23238,7 @@ __name(HandbookPageToc, "HandbookPageToc");
|
|
|
23233
23238
|
// src/features/handbook/components/parts/HandbookPageNavigator.tsx
|
|
23234
23239
|
import { BookOpenIcon } from "lucide-react";
|
|
23235
23240
|
import { useTranslations as useTranslations114 } from "next-intl";
|
|
23236
|
-
import { useEffect as useEffect73, useMemo as useMemo49, useRef as
|
|
23241
|
+
import { useEffect as useEffect73, useMemo as useMemo49, useRef as useRef39 } from "react";
|
|
23237
23242
|
import { jsx as jsx265, jsxs as jsxs155 } from "react/jsx-runtime";
|
|
23238
23243
|
function HandbookPageNavigator({ pages, sections, currentId }) {
|
|
23239
23244
|
const t = useTranslations114();
|
|
@@ -23264,7 +23269,7 @@ function HandbookPageNavigator({ pages, sections, currentId }) {
|
|
|
23264
23269
|
});
|
|
23265
23270
|
return ordered;
|
|
23266
23271
|
}, [pages, sections, t]);
|
|
23267
|
-
const currentRef =
|
|
23272
|
+
const currentRef = useRef39(null);
|
|
23268
23273
|
useEffect73(() => {
|
|
23269
23274
|
const link = currentRef.current;
|
|
23270
23275
|
if (!link) return;
|
|
@@ -24287,7 +24292,7 @@ __name(NotificationViewSwitcher, "NotificationViewSwitcher");
|
|
|
24287
24292
|
|
|
24288
24293
|
// src/features/notification/components/lists/NotificationsList.tsx
|
|
24289
24294
|
import { useTranslations as useTranslations126 } from "next-intl";
|
|
24290
|
-
import { useEffect as useEffect76, useRef as
|
|
24295
|
+
import { useEffect as useEffect76, useRef as useRef40 } from "react";
|
|
24291
24296
|
|
|
24292
24297
|
// src/features/notification/hooks/useNotificationTableStructure.tsx
|
|
24293
24298
|
import { ArchiveIcon } from "lucide-react";
|
|
@@ -24414,7 +24419,7 @@ function NotificationsList({ archived, headerControl, fullWidth }) {
|
|
|
24414
24419
|
retriever: /* @__PURE__ */ __name((params) => NotificationService.findMany(params), "retriever"),
|
|
24415
24420
|
retrieverParams: { isArchived: archived }
|
|
24416
24421
|
});
|
|
24417
|
-
const markedRef =
|
|
24422
|
+
const markedRef = useRef40(/* @__PURE__ */ new Set());
|
|
24418
24423
|
useEffect76(() => {
|
|
24419
24424
|
if (!data.isLoaded || !data.data) return;
|
|
24420
24425
|
const unreadIds = data.data.filter((notification) => !notification.isRead && !markedRef.current.has(notification.id)).map((notification) => notification.id);
|
|
@@ -24495,10 +24500,10 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
24495
24500
|
// src/features/notification/components/modals/NotificationModal.tsx
|
|
24496
24501
|
import { BellIcon as BellIcon2, ExternalLinkIcon } from "lucide-react";
|
|
24497
24502
|
import { useTranslations as useTranslations127 } from "next-intl";
|
|
24498
|
-
import { Fragment as Fragment58, useCallback as useCallback48, useEffect as useEffect77, useMemo as useMemo55, useRef as
|
|
24503
|
+
import { Fragment as Fragment58, useCallback as useCallback48, useEffect as useEffect77, useMemo as useMemo55, useRef as useRef41, useState as useState102 } from "react";
|
|
24499
24504
|
import { jsx as jsx282, jsxs as jsxs168 } from "react/jsx-runtime";
|
|
24500
24505
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
24501
|
-
const _instanceId =
|
|
24506
|
+
const _instanceId = useRef41(Math.random().toString(36).substr(2, 9));
|
|
24502
24507
|
const {
|
|
24503
24508
|
notifications,
|
|
24504
24509
|
addNotification,
|
|
@@ -24518,8 +24523,8 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
24518
24523
|
const t = useTranslations127();
|
|
24519
24524
|
const generateUrl = usePageUrlGenerator();
|
|
24520
24525
|
const [newNotifications, setNewNotifications] = useState102(false);
|
|
24521
|
-
const preventAutoClose =
|
|
24522
|
-
const circuitBreakerRef =
|
|
24526
|
+
const preventAutoClose = useRef41(false);
|
|
24527
|
+
const circuitBreakerRef = useRef41({
|
|
24523
24528
|
count: 0,
|
|
24524
24529
|
resetTime: 0,
|
|
24525
24530
|
isOpen: false
|
|
@@ -24748,7 +24753,7 @@ __name(ReferralCodeCapture, "ReferralCodeCapture");
|
|
|
24748
24753
|
|
|
24749
24754
|
// src/features/referral/components/ReferralWidget.tsx
|
|
24750
24755
|
import { Copy as Copy2, Loader2 as Loader26, Mail, Users } from "lucide-react";
|
|
24751
|
-
import { useCallback as useCallback49, useRef as
|
|
24756
|
+
import { useCallback as useCallback49, useRef as useRef42, useState as useState105 } from "react";
|
|
24752
24757
|
|
|
24753
24758
|
// src/features/referral/hooks/useReferralInvite.ts
|
|
24754
24759
|
import { useState as useState103 } from "react";
|
|
@@ -24854,7 +24859,7 @@ function ReferralWidget({
|
|
|
24854
24859
|
const { sendInvite, sending } = useReferralInvite();
|
|
24855
24860
|
const [email, setEmail] = useState105("");
|
|
24856
24861
|
const [copied, setCopied] = useState105(false);
|
|
24857
|
-
const linkInputRef =
|
|
24862
|
+
const linkInputRef = useRef42(null);
|
|
24858
24863
|
const config = getReferralConfig();
|
|
24859
24864
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
24860
24865
|
const referralUrl = stats?.referralCode ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
|
|
@@ -25142,11 +25147,11 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
25142
25147
|
// src/features/role/components/forms/UserRoleAdd.tsx
|
|
25143
25148
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
25144
25149
|
import { useTranslations as useTranslations131 } from "next-intl";
|
|
25145
|
-
import { useCallback as useCallback50, useEffect as useEffect81, useRef as
|
|
25150
|
+
import { useCallback as useCallback50, useEffect as useEffect81, useRef as useRef43, useState as useState107 } from "react";
|
|
25146
25151
|
import { Fragment as Fragment62, jsx as jsx290, jsxs as jsxs174 } from "react/jsx-runtime";
|
|
25147
25152
|
function UserRoleAdd({ user, refresh }) {
|
|
25148
25153
|
const [open, setOpen] = useState107(false);
|
|
25149
|
-
const inputRef =
|
|
25154
|
+
const inputRef = useRef43(null);
|
|
25150
25155
|
const [searchTerm, setSearchTerm] = useState107("");
|
|
25151
25156
|
const [roles, setRoles] = useState107([]);
|
|
25152
25157
|
const t = useTranslations131();
|
|
@@ -26518,7 +26523,7 @@ __name(WaitlistList, "WaitlistList");
|
|
|
26518
26523
|
// src/features/rbac/components/RbacContainer.tsx
|
|
26519
26524
|
import { Loader2Icon as Loader2Icon4 } from "lucide-react";
|
|
26520
26525
|
import { useTranslations as useTranslations144 } from "next-intl";
|
|
26521
|
-
import { memo as memo2, useCallback as useCallback57, useEffect as useEffect84, useMemo as useMemo58, useRef as
|
|
26526
|
+
import { memo as memo2, useCallback as useCallback57, useEffect as useEffect84, useMemo as useMemo58, useRef as useRef44, useState as useState115 } from "react";
|
|
26522
26527
|
|
|
26523
26528
|
// src/features/rbac/components/RbacPermissionCell.tsx
|
|
26524
26529
|
import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon12 } from "lucide-react";
|
|
@@ -26787,7 +26792,7 @@ var CellButton = memo2(/* @__PURE__ */ __name(function CellButton2({
|
|
|
26787
26792
|
isRoleColumn,
|
|
26788
26793
|
onOpen
|
|
26789
26794
|
}) {
|
|
26790
|
-
const ref =
|
|
26795
|
+
const ref = useRef44(null);
|
|
26791
26796
|
const value = cellValue(tokens, action);
|
|
26792
26797
|
const handleClick = useCallback57(() => {
|
|
26793
26798
|
if (!ref.current) return;
|
|
@@ -26973,7 +26978,7 @@ __name(RbacContainer, "RbacContainer");
|
|
|
26973
26978
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
26974
26979
|
import { Loader2Icon as Loader2Icon5 } from "lucide-react";
|
|
26975
26980
|
import { useTranslations as useTranslations145 } from "next-intl";
|
|
26976
|
-
import { Fragment as Fragment67, memo as memo3, useCallback as useCallback58, useEffect as useEffect85, useMemo as useMemo59, useRef as
|
|
26981
|
+
import { Fragment as Fragment67, memo as memo3, useCallback as useCallback58, useEffect as useEffect85, useMemo as useMemo59, useRef as useRef45, useState as useState116 } from "react";
|
|
26977
26982
|
import { jsx as jsx314, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
26978
26983
|
function findToken2(tokens, action) {
|
|
26979
26984
|
if (!tokens) return void 0;
|
|
@@ -26994,7 +26999,7 @@ var CellButton3 = memo3(/* @__PURE__ */ __name(function CellButton4({
|
|
|
26994
26999
|
isRoleColumn,
|
|
26995
27000
|
onOpen
|
|
26996
27001
|
}) {
|
|
26997
|
-
const ref =
|
|
27002
|
+
const ref = useRef45(null);
|
|
26998
27003
|
const value = cellValue2(tokens, action);
|
|
26999
27004
|
const handleClick = useCallback58(() => {
|
|
27000
27005
|
if (!ref.current) return;
|
|
@@ -27749,4 +27754,4 @@ export {
|
|
|
27749
27754
|
useOAuthClients,
|
|
27750
27755
|
useOAuthClient
|
|
27751
27756
|
};
|
|
27752
|
-
//# sourceMappingURL=chunk-
|
|
27757
|
+
//# sourceMappingURL=chunk-SVJ6UZPA.mjs.map
|