@carlonicora/nextjs-jsonapi 1.92.2 → 1.94.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-6OL2A7U4.js → BlockNoteEditor-H2TGXJBO.js} +16 -11
- package/dist/BlockNoteEditor-H2TGXJBO.js.map +1 -0
- package/dist/{BlockNoteEditor-C33MRSMX.mjs → BlockNoteEditor-S62X5HSE.mjs} +10 -5
- package/dist/BlockNoteEditor-S62X5HSE.mjs.map +1 -0
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-7V4W4CYS.js → chunk-6QASYUDS.js} +47 -46
- package/dist/chunk-6QASYUDS.js.map +1 -0
- package/dist/{chunk-TGZDQSDU.mjs → chunk-PNQDUCEN.mjs} +72 -71
- package/dist/chunk-PNQDUCEN.mjs.map +1 -0
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +6 -2
- package/dist/components/index.d.ts +6 -2
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/{content.fields-Ck5lkQ5d.d.mts → content.fields-hzZvhlBd.d.mts} +2 -0
- package/dist/{content.fields-Ck5lkQ5d.d.ts → content.fields-hzZvhlBd.d.ts} +2 -0
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/editors/BlockNoteEditor.tsx +9 -1
- package/src/components/editors/BlockNoteEditorSuggestionMenuController.tsx +23 -38
- package/src/components/forms/FormBlockNote.tsx +4 -0
- package/src/hooks/useCustomD3Graph.tsx +31 -2
- package/src/interfaces/d3.node.interface.ts +2 -0
- package/dist/BlockNoteEditor-6OL2A7U4.js.map +0 -1
- package/dist/BlockNoteEditor-C33MRSMX.mjs.map +0 -1
- package/dist/chunk-7V4W4CYS.js.map +0 -1
- package/dist/chunk-TGZDQSDU.mjs.map +0 -1
|
@@ -6688,7 +6688,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6688
6688
|
}
|
|
6689
6689
|
});
|
|
6690
6690
|
const link = graphGroup.append("g").attr("stroke", "#999").attr("stroke-opacity", 0.6).selectAll("line").data(visibleLinks).join("line").attr("x1", (d) => d.source.x || 0).attr("y1", (d) => d.source.y || 0).attr("x2", (d) => d.target.x || 0).attr("y2", (d) => d.target.y || 0).attr("stroke-width", 1.5);
|
|
6691
|
-
const node = graphGroup.append("g").selectAll("g").data(visibleNodes).join("g").attr("class", "node-group").attr("cursor", "pointer").attr("transform", (d) => `translate(${d.x || 0}, ${d.y || 0})`).call(
|
|
6691
|
+
const node = graphGroup.append("g").selectAll("g").data(visibleNodes).join("g").attr("class", "node-group").attr("data-id", (d) => d.id).attr("cursor", "pointer").attr("transform", (d) => `translate(${d.x || 0}, ${d.y || 0})`).call(
|
|
6692
6692
|
d3.drag().subject(function(d) {
|
|
6693
6693
|
return d;
|
|
6694
6694
|
}).on("start", function(event, d) {
|
|
@@ -6749,7 +6749,15 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6749
6749
|
onNodeClick(d.id);
|
|
6750
6750
|
});
|
|
6751
6751
|
node.each(function(d) {
|
|
6752
|
-
if (d.
|
|
6752
|
+
if (d.imageUrl) {
|
|
6753
|
+
const clipId = `clip-${d.id}`;
|
|
6754
|
+
const defs = d3.select(this).append("defs");
|
|
6755
|
+
defs.append("clipPath").attr("id", clipId).append("circle").attr("r", nodeRadius);
|
|
6756
|
+
d3.select(this).append("image").attr("href", d.imageUrl).attr("x", -nodeRadius).attr("y", -nodeRadius).attr("width", nodeRadius * 2).attr("height", nodeRadius * 2).attr("preserveAspectRatio", "xMidYMid slice").attr("clip-path", `url(#${clipId})`).style("pointer-events", "all").on("click", (event) => {
|
|
6757
|
+
event.stopPropagation();
|
|
6758
|
+
onNodeClick(d.id);
|
|
6759
|
+
});
|
|
6760
|
+
} else if (d.icon) {
|
|
6753
6761
|
const Icon = d.icon;
|
|
6754
6762
|
const iconSvg = renderToStaticMarkup(/* @__PURE__ */ jsx49(Icon, { size: nodeRadius / 2, color: "white" }));
|
|
6755
6763
|
const _iconGroup = d3.select(this).append("g").html(iconSvg).attr("transform", `translate(${-nodeRadius / 4}, ${-nodeRadius / 4})`).style("pointer-events", "all").on("click", (event) => {
|
|
@@ -6777,7 +6785,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
6777
6785
|
textElement.append("tspan").attr("x", 0).attr("dy", index === 0 ? `${startY}em` : `${lineHeight}em`).text(word);
|
|
6778
6786
|
});
|
|
6779
6787
|
} else {
|
|
6780
|
-
textElement.attr("dy", -nodeRadius - 5).attr("fill", "currentColor").text(d.name);
|
|
6788
|
+
textElement.attr("dy", -nodeRadius - 5).attr("fill", "currentColor").attr("font-size", d.bold ? 16 : 12).attr("font-weight", d.bold ? 700 : null).text(d.name);
|
|
6781
6789
|
}
|
|
6782
6790
|
});
|
|
6783
6791
|
return () => {
|
|
@@ -9214,7 +9222,7 @@ import { useRef as useRef15 } from "react";
|
|
|
9214
9222
|
import dynamic from "next/dynamic";
|
|
9215
9223
|
import React14 from "react";
|
|
9216
9224
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
9217
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
9225
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-S62X5HSE.mjs"), {
|
|
9218
9226
|
ssr: false
|
|
9219
9227
|
});
|
|
9220
9228
|
var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -9240,7 +9248,8 @@ function FormBlockNote({
|
|
|
9240
9248
|
enableMentions,
|
|
9241
9249
|
mentionSearchFn,
|
|
9242
9250
|
mentionSearchParams,
|
|
9243
|
-
mentionResolveFn
|
|
9251
|
+
mentionResolveFn,
|
|
9252
|
+
suggestionMenuComponent
|
|
9244
9253
|
}) {
|
|
9245
9254
|
const initialContentRef = useRef15(null);
|
|
9246
9255
|
const lastEditorContentRef = useRef15(void 0);
|
|
@@ -9285,6 +9294,7 @@ function FormBlockNote({
|
|
|
9285
9294
|
mentionSearchFn,
|
|
9286
9295
|
mentionSearchParams,
|
|
9287
9296
|
mentionResolveFn,
|
|
9297
|
+
suggestionMenuComponent,
|
|
9288
9298
|
className: cn(stretch && "min-h-0 flex-1")
|
|
9289
9299
|
}
|
|
9290
9300
|
);
|
|
@@ -13759,45 +13769,35 @@ var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableM
|
|
|
13759
13769
|
// src/components/editors/BlockNoteEditorSuggestionMenuController.tsx
|
|
13760
13770
|
import { SuggestionMenuController } from "@blocknote/react";
|
|
13761
13771
|
import { autoUpdate, flip, shift } from "@floating-ui/react";
|
|
13762
|
-
import { useCallback as useCallback28
|
|
13772
|
+
import { useCallback as useCallback28 } from "react";
|
|
13763
13773
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
13764
|
-
var DEBOUNCE_MS = 300;
|
|
13765
13774
|
function BlockNoteEditorMentionSuggestionMenu({
|
|
13766
13775
|
editor,
|
|
13767
13776
|
mentionSearchFn,
|
|
13768
|
-
mentionSearchParams
|
|
13777
|
+
mentionSearchParams,
|
|
13778
|
+
suggestionMenuComponent
|
|
13769
13779
|
}) {
|
|
13770
|
-
const lastQueryRef = useRef24("");
|
|
13771
13780
|
const getItems = useCallback28(
|
|
13772
13781
|
async (query) => {
|
|
13773
|
-
|
|
13774
|
-
|
|
13775
|
-
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13786
|
-
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
|
|
13792
|
-
}
|
|
13793
|
-
},
|
|
13794
|
-
" "
|
|
13795
|
-
]);
|
|
13796
|
-
}, "onItemClick")
|
|
13797
|
-
}));
|
|
13798
|
-
} catch {
|
|
13799
|
-
return [];
|
|
13800
|
-
}
|
|
13782
|
+
const results = await mentionSearchFn(query, mentionSearchParams);
|
|
13783
|
+
return results.map((item) => ({
|
|
13784
|
+
title: item.name,
|
|
13785
|
+
subtext: item.entityType,
|
|
13786
|
+
icon: item.icon,
|
|
13787
|
+
onItemClick: /* @__PURE__ */ __name(() => {
|
|
13788
|
+
editor.insertInlineContent([
|
|
13789
|
+
{
|
|
13790
|
+
type: "mention",
|
|
13791
|
+
props: {
|
|
13792
|
+
alias: item.name,
|
|
13793
|
+
id: item.id,
|
|
13794
|
+
entityType: item.entityType
|
|
13795
|
+
}
|
|
13796
|
+
},
|
|
13797
|
+
" "
|
|
13798
|
+
]);
|
|
13799
|
+
}, "onItemClick")
|
|
13800
|
+
}));
|
|
13801
13801
|
},
|
|
13802
13802
|
[editor, mentionSearchFn, mentionSearchParams]
|
|
13803
13803
|
);
|
|
@@ -13806,6 +13806,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
13806
13806
|
{
|
|
13807
13807
|
triggerCharacter: "@",
|
|
13808
13808
|
getItems,
|
|
13809
|
+
suggestionMenuComponent,
|
|
13809
13810
|
floatingUIOptions: {
|
|
13810
13811
|
useFloatingOptions: {
|
|
13811
13812
|
strategy: "fixed",
|
|
@@ -13820,12 +13821,12 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
13820
13821
|
__name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMenu");
|
|
13821
13822
|
|
|
13822
13823
|
// src/components/pages/PageContainerContentDetails.tsx
|
|
13823
|
-
import { useEffect as useEffect40, useRef as
|
|
13824
|
+
import { useEffect as useEffect40, useRef as useRef24, useState as useState48 } from "react";
|
|
13824
13825
|
import { jsx as jsx153, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
13825
13826
|
function PageContainerContentDetails({ items, section, module, id }) {
|
|
13826
13827
|
const rewriteUrl = useUrlRewriter();
|
|
13827
13828
|
const [isScrolled, setIsScrolled] = useState48(false);
|
|
13828
|
-
const sentinelRef =
|
|
13829
|
+
const sentinelRef = useRef24(null);
|
|
13829
13830
|
useEffect40(() => {
|
|
13830
13831
|
const sentinel = sentinelRef.current;
|
|
13831
13832
|
if (!sentinel) return;
|
|
@@ -14032,13 +14033,13 @@ function JsonApiProvider({ config, children }) {
|
|
|
14032
14033
|
__name(JsonApiProvider, "JsonApiProvider");
|
|
14033
14034
|
|
|
14034
14035
|
// src/client/hooks/useJsonApiGet.ts
|
|
14035
|
-
import { useState as useState50, useEffect as useEffect43, useCallback as useCallback29, useRef as
|
|
14036
|
+
import { useState as useState50, useEffect as useEffect43, useCallback as useCallback29, useRef as useRef25 } from "react";
|
|
14036
14037
|
function useJsonApiGet(params) {
|
|
14037
14038
|
const [data, setData] = useState50(null);
|
|
14038
14039
|
const [loading, setLoading] = useState50(false);
|
|
14039
14040
|
const [error, setError] = useState50(null);
|
|
14040
14041
|
const [response, setResponse] = useState50(null);
|
|
14041
|
-
const isMounted =
|
|
14042
|
+
const isMounted = useRef25(true);
|
|
14042
14043
|
const fetchData = useCallback29(async () => {
|
|
14043
14044
|
if (params.options?.enabled === false) return;
|
|
14044
14045
|
setLoading(true);
|
|
@@ -14840,12 +14841,12 @@ import { memo, useMemo as useMemo25, useState as useState55 } from "react";
|
|
|
14840
14841
|
// src/components/tables/ContentTableSearch.tsx
|
|
14841
14842
|
import { RefreshCw, Search, X as X3 } from "lucide-react";
|
|
14842
14843
|
import { useTranslations as useTranslations55 } from "next-intl";
|
|
14843
|
-
import { useCallback as useCallback34, useEffect as useEffect47, useRef as
|
|
14844
|
+
import { useCallback as useCallback34, useEffect as useEffect47, useRef as useRef26, useState as useState54 } from "react";
|
|
14844
14845
|
import { jsx as jsx164, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
14845
14846
|
function ContentTableSearch({ data }) {
|
|
14846
14847
|
const t = useTranslations55();
|
|
14847
|
-
const searchTermRef =
|
|
14848
|
-
const inputRef =
|
|
14848
|
+
const searchTermRef = useRef26("");
|
|
14849
|
+
const inputRef = useRef26(null);
|
|
14849
14850
|
const [searchTerm, setSearchTerm] = useState54("");
|
|
14850
14851
|
const [isFocused, setIsFocused] = useState54(false);
|
|
14851
14852
|
const [isSearching, setIsSearching] = useState54(false);
|
|
@@ -15045,12 +15046,12 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
15045
15046
|
}, "ContentListTable"));
|
|
15046
15047
|
|
|
15047
15048
|
// src/components/grids/ContentListGrid.tsx
|
|
15048
|
-
import { useEffect as useEffect48, useRef as
|
|
15049
|
+
import { useEffect as useEffect48, useRef as useRef27 } from "react";
|
|
15049
15050
|
import { Fragment as Fragment27, jsx as jsx166, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
15050
15051
|
var DEFAULT_GRID_CLASSES = "grid grid-cols-2 gap-4 p-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5";
|
|
15051
15052
|
function ContentListGrid(props) {
|
|
15052
15053
|
const { data, ItemComponent, allowSearch, fullWidth, gridClassName } = props;
|
|
15053
|
-
const sentinelRef =
|
|
15054
|
+
const sentinelRef = useRef27(null);
|
|
15054
15055
|
useEffect48(() => {
|
|
15055
15056
|
if (!data.next || !sentinelRef.current) return;
|
|
15056
15057
|
const observer = new IntersectionObserver(
|
|
@@ -15145,14 +15146,14 @@ __name(validateItalianTaxCode, "validateItalianTaxCode");
|
|
|
15145
15146
|
|
|
15146
15147
|
// src/components/fiscal/ItalianFiscalData.tsx
|
|
15147
15148
|
import { useTranslations as useTranslations56 } from "next-intl";
|
|
15148
|
-
import { forwardRef as forwardRef8, useCallback as useCallback35, useImperativeHandle as useImperativeHandle2, useRef as
|
|
15149
|
+
import { forwardRef as forwardRef8, useCallback as useCallback35, useImperativeHandle as useImperativeHandle2, useRef as useRef28, useState as useState56 } from "react";
|
|
15149
15150
|
import { z as z4 } from "zod";
|
|
15150
15151
|
import { jsx as jsx167, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
15151
15152
|
var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
|
|
15152
15153
|
const t = useTranslations56();
|
|
15153
|
-
const initialRef =
|
|
15154
|
+
const initialRef = useRef28(initialData);
|
|
15154
15155
|
const [fiscalData, setFiscalData] = useState56(initialData);
|
|
15155
|
-
const fiscalDataRef =
|
|
15156
|
+
const fiscalDataRef = useRef28(initialData);
|
|
15156
15157
|
const [fiscalErrors, setFiscalErrors] = useState56({});
|
|
15157
15158
|
const updateFiscalField = useCallback35((key, value) => {
|
|
15158
15159
|
setFiscalData((prev) => {
|
|
@@ -15789,11 +15790,11 @@ import { useTranslations as useTranslations60 } from "next-intl";
|
|
|
15789
15790
|
import { useState as useState61 } from "react";
|
|
15790
15791
|
|
|
15791
15792
|
// src/features/auth/components/two-factor/TotpInput.tsx
|
|
15792
|
-
import { useEffect as useEffect50, useRef as
|
|
15793
|
+
import { useEffect as useEffect50, useRef as useRef29, useState as useState60 } from "react";
|
|
15793
15794
|
import { jsx as jsx173, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
15794
15795
|
function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
15795
15796
|
const [digits, setDigits] = useState60(["", "", "", "", "", ""]);
|
|
15796
|
-
const inputRefs =
|
|
15797
|
+
const inputRefs = useRef29([]);
|
|
15797
15798
|
useEffect50(() => {
|
|
15798
15799
|
if (autoFocus && inputRefs.current[0]) {
|
|
15799
15800
|
inputRefs.current[0].focus();
|
|
@@ -17282,7 +17283,7 @@ __name(RelevantContentsList, "RelevantContentsList");
|
|
|
17282
17283
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
17283
17284
|
import { ArrowRight, LifeBuoyIcon } from "lucide-react";
|
|
17284
17285
|
import { useTranslations as useTranslations78 } from "next-intl";
|
|
17285
|
-
import { useCallback as useCallback37, useEffect as useEffect59, useMemo as useMemo28, useRef as
|
|
17286
|
+
import { useCallback as useCallback37, useEffect as useEffect59, useMemo as useMemo28, useRef as useRef30, useState as useState75 } from "react";
|
|
17286
17287
|
|
|
17287
17288
|
// src/features/how-to/components/containers/HowToCommandViewer.tsx
|
|
17288
17289
|
import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
|
|
@@ -17410,7 +17411,7 @@ function HowToCommand({ pathname, extraGroups, onStartChat }) {
|
|
|
17410
17411
|
const t = useTranslations78();
|
|
17411
17412
|
const [dialogOpen, setDialogOpen] = useState75(false);
|
|
17412
17413
|
const [selectedHowTo, setSelectedHowTo] = useState75(null);
|
|
17413
|
-
const searchTermRef =
|
|
17414
|
+
const searchTermRef = useRef30("");
|
|
17414
17415
|
const [searchTerm, setSearchTerm] = useState75("");
|
|
17415
17416
|
const data = useDataListRetriever({
|
|
17416
17417
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
@@ -17752,7 +17753,7 @@ __name(HowToMultiSelector, "HowToMultiSelector");
|
|
|
17752
17753
|
// src/features/how-to/components/forms/HowToSelector.tsx
|
|
17753
17754
|
import { CircleX as CircleX2, RefreshCwIcon as RefreshCwIcon3, SearchIcon as SearchIcon6, XIcon as XIcon10 } from "lucide-react";
|
|
17754
17755
|
import { useTranslations as useTranslations83 } from "next-intl";
|
|
17755
|
-
import { useCallback as useCallback38, useEffect as useEffect60, useRef as
|
|
17756
|
+
import { useCallback as useCallback38, useEffect as useEffect60, useRef as useRef31, useState as useState76 } from "react";
|
|
17756
17757
|
import { Fragment as Fragment42, jsx as jsx203, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
17757
17758
|
function HowToSelector({
|
|
17758
17759
|
id,
|
|
@@ -17764,7 +17765,7 @@ function HowToSelector({
|
|
|
17764
17765
|
}) {
|
|
17765
17766
|
const t = useTranslations83();
|
|
17766
17767
|
const [open, setOpen] = useState76(false);
|
|
17767
|
-
const searchTermRef =
|
|
17768
|
+
const searchTermRef = useRef31("");
|
|
17768
17769
|
const [searchTerm, setSearchTerm] = useState76("");
|
|
17769
17770
|
const [isSearching, setIsSearching] = useState76(false);
|
|
17770
17771
|
const data = useDataListRetriever({
|
|
@@ -18058,7 +18059,7 @@ function AssistantThreadHeader({ assistant, onRename, onDelete }) {
|
|
|
18058
18059
|
__name(AssistantThreadHeader, "AssistantThreadHeader");
|
|
18059
18060
|
|
|
18060
18061
|
// src/features/assistant/components/parts/AssistantThread.tsx
|
|
18061
|
-
import { useEffect as useEffect62, useRef as
|
|
18062
|
+
import { useEffect as useEffect62, useRef as useRef32 } from "react";
|
|
18062
18063
|
|
|
18063
18064
|
// src/features/assistant-message/components/MessageItem.tsx
|
|
18064
18065
|
import { useTranslations as useTranslations93 } from "next-intl";
|
|
@@ -18612,7 +18613,7 @@ __name(AssistantStatusLine, "AssistantStatusLine");
|
|
|
18612
18613
|
// src/features/assistant/components/parts/AssistantThread.tsx
|
|
18613
18614
|
import { jsx as jsx219, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
18614
18615
|
function AssistantThread({ messages, sending, status, onSelectFollowUp, failedMessageIds, onRetry }) {
|
|
18615
|
-
const endRef =
|
|
18616
|
+
const endRef = useRef32(null);
|
|
18616
18617
|
useEffect62(() => {
|
|
18617
18618
|
endRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
18618
18619
|
}, [messages.length, sending]);
|
|
@@ -18806,10 +18807,10 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
18806
18807
|
// src/features/notification/components/modals/NotificationModal.tsx
|
|
18807
18808
|
import { BellIcon } from "lucide-react";
|
|
18808
18809
|
import { useTranslations as useTranslations97 } from "next-intl";
|
|
18809
|
-
import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect63, useMemo as useMemo32, useRef as
|
|
18810
|
+
import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect63, useMemo as useMemo32, useRef as useRef33, useState as useState83 } from "react";
|
|
18810
18811
|
import { jsx as jsx224, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
18811
18812
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
18812
|
-
const _instanceId =
|
|
18813
|
+
const _instanceId = useRef33(Math.random().toString(36).substr(2, 9));
|
|
18813
18814
|
const {
|
|
18814
18815
|
notifications,
|
|
18815
18816
|
addNotification,
|
|
@@ -18830,8 +18831,8 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
18830
18831
|
const t = useTranslations97();
|
|
18831
18832
|
const generateUrl = usePageUrlGenerator();
|
|
18832
18833
|
const [newNotifications, setNewNotifications] = useState83(false);
|
|
18833
|
-
const preventAutoClose =
|
|
18834
|
-
const circuitBreakerRef =
|
|
18834
|
+
const preventAutoClose = useRef33(false);
|
|
18835
|
+
const circuitBreakerRef = useRef33({
|
|
18835
18836
|
count: 0,
|
|
18836
18837
|
resetTime: 0,
|
|
18837
18838
|
isOpen: false
|
|
@@ -18864,7 +18865,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
18864
18865
|
useEffect63(() => {
|
|
18865
18866
|
if (lastLoaded === 0) loadNotifications();
|
|
18866
18867
|
}, [lastLoaded, loadNotifications]);
|
|
18867
|
-
const processSocketNotificationsRef =
|
|
18868
|
+
const processSocketNotificationsRef = useRef33(null);
|
|
18868
18869
|
const processSocketNotifications = useCallback39(() => {
|
|
18869
18870
|
if (socketNotifications.length === 0) {
|
|
18870
18871
|
return;
|
|
@@ -19025,7 +19026,7 @@ __name(ReferralCodeCapture, "ReferralCodeCapture");
|
|
|
19025
19026
|
|
|
19026
19027
|
// src/features/referral/components/ReferralWidget.tsx
|
|
19027
19028
|
import { Copy as Copy2, Loader2 as Loader25, Mail, Users } from "lucide-react";
|
|
19028
|
-
import { useCallback as useCallback40, useRef as
|
|
19029
|
+
import { useCallback as useCallback40, useRef as useRef34, useState as useState86 } from "react";
|
|
19029
19030
|
|
|
19030
19031
|
// src/features/referral/hooks/useReferralInvite.ts
|
|
19031
19032
|
import { useState as useState84 } from "react";
|
|
@@ -19131,7 +19132,7 @@ function ReferralWidget({
|
|
|
19131
19132
|
const { sendInvite, sending } = useReferralInvite();
|
|
19132
19133
|
const [email, setEmail] = useState86("");
|
|
19133
19134
|
const [copied, setCopied] = useState86(false);
|
|
19134
|
-
const linkInputRef =
|
|
19135
|
+
const linkInputRef = useRef34(null);
|
|
19135
19136
|
const config = getReferralConfig();
|
|
19136
19137
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
19137
19138
|
const referralUrl = stats?.referralCode ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
|
|
@@ -19419,11 +19420,11 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
19419
19420
|
// src/features/role/components/forms/UserRoleAdd.tsx
|
|
19420
19421
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
19421
19422
|
import { useTranslations as useTranslations101 } from "next-intl";
|
|
19422
|
-
import { useCallback as useCallback41, useEffect as useEffect67, useRef as
|
|
19423
|
+
import { useCallback as useCallback41, useEffect as useEffect67, useRef as useRef35, useState as useState88 } from "react";
|
|
19423
19424
|
import { Fragment as Fragment51, jsx as jsx232, jsxs as jsxs144 } from "react/jsx-runtime";
|
|
19424
19425
|
function UserRoleAdd({ user, refresh }) {
|
|
19425
19426
|
const [open, setOpen] = useState88(false);
|
|
19426
|
-
const inputRef =
|
|
19427
|
+
const inputRef = useRef35(null);
|
|
19427
19428
|
const [searchTerm, setSearchTerm] = useState88("");
|
|
19428
19429
|
const [roles, setRoles] = useState88([]);
|
|
19429
19430
|
const t = useTranslations101();
|
|
@@ -20843,7 +20844,7 @@ __name(WaitlistList, "WaitlistList");
|
|
|
20843
20844
|
// src/features/rbac/components/RbacContainer.tsx
|
|
20844
20845
|
import { Loader2Icon as Loader2Icon3 } from "lucide-react";
|
|
20845
20846
|
import { useTranslations as useTranslations110 } from "next-intl";
|
|
20846
|
-
import { memo as memo2, useCallback as useCallback49, useEffect as useEffect71, useMemo as useMemo33, useRef as
|
|
20847
|
+
import { memo as memo2, useCallback as useCallback49, useEffect as useEffect71, useMemo as useMemo33, useRef as useRef36, useState as useState96 } from "react";
|
|
20847
20848
|
|
|
20848
20849
|
// src/features/rbac/components/RbacPermissionCell.tsx
|
|
20849
20850
|
import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon11 } from "lucide-react";
|
|
@@ -21112,7 +21113,7 @@ var CellButton = memo2(/* @__PURE__ */ __name(function CellButton2({
|
|
|
21112
21113
|
isRoleColumn,
|
|
21113
21114
|
onOpen
|
|
21114
21115
|
}) {
|
|
21115
|
-
const ref =
|
|
21116
|
+
const ref = useRef36(null);
|
|
21116
21117
|
const value = cellValue(tokens, action);
|
|
21117
21118
|
const handleClick = useCallback49(() => {
|
|
21118
21119
|
if (!ref.current) return;
|
|
@@ -21298,7 +21299,7 @@ __name(RbacContainer, "RbacContainer");
|
|
|
21298
21299
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
21299
21300
|
import { Loader2Icon as Loader2Icon4 } from "lucide-react";
|
|
21300
21301
|
import { useTranslations as useTranslations111 } from "next-intl";
|
|
21301
|
-
import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect72, useMemo as useMemo34, useRef as
|
|
21302
|
+
import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect72, useMemo as useMemo34, useRef as useRef37, useState as useState97 } from "react";
|
|
21302
21303
|
import { jsx as jsx256, jsxs as jsxs166 } from "react/jsx-runtime";
|
|
21303
21304
|
function findToken2(tokens, action) {
|
|
21304
21305
|
if (!tokens) return void 0;
|
|
@@ -21319,7 +21320,7 @@ var CellButton3 = memo3(/* @__PURE__ */ __name(function CellButton4({
|
|
|
21319
21320
|
isRoleColumn,
|
|
21320
21321
|
onOpen
|
|
21321
21322
|
}) {
|
|
21322
|
-
const ref =
|
|
21323
|
+
const ref = useRef37(null);
|
|
21323
21324
|
const value = cellValue2(tokens, action);
|
|
21324
21325
|
const handleClick = useCallback50(() => {
|
|
21325
21326
|
if (!ref.current) return;
|
|
@@ -21984,4 +21985,4 @@ export {
|
|
|
21984
21985
|
useOAuthClients,
|
|
21985
21986
|
useOAuthClient
|
|
21986
21987
|
};
|
|
21987
|
-
//# sourceMappingURL=chunk-
|
|
21988
|
+
//# sourceMappingURL=chunk-PNQDUCEN.mjs.map
|