@carlonicora/nextjs-jsonapi 1.110.0 → 1.111.1
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-K7IIWM3S.mjs → BlockNoteEditor-A5LNFWHW.mjs} +2 -2
- package/dist/{BlockNoteEditor-7OKW6HHN.js → BlockNoteEditor-HNQNKCFP.js} +9 -9
- package/dist/{BlockNoteEditor-7OKW6HHN.js.map → BlockNoteEditor-HNQNKCFP.js.map} +1 -1
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-AKXUNE3A.js → chunk-DRJUN4R6.js} +22 -19
- package/dist/chunk-DRJUN4R6.js.map +1 -0
- package/dist/{chunk-TXVVZLUQ.mjs → chunk-LYLGU2BK.mjs} +67 -64
- package/dist/chunk-LYLGU2BK.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/help/index.js +30 -30
- package/dist/features/help/index.mjs +1 -1
- package/dist/scripts/generate-web-module/__tests__/container.spec.d.ts +2 -0
- package/dist/scripts/generate-web-module/__tests__/container.spec.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/container.spec.js +54 -0
- package/dist/scripts/generate-web-module/__tests__/container.spec.js.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/data-service.spec.d.ts +2 -0
- package/dist/scripts/generate-web-module/__tests__/data-service.spec.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/data-service.spec.js +19 -0
- package/dist/scripts/generate-web-module/__tests__/data-service.spec.js.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/editor.spec.d.ts +2 -0
- package/dist/scripts/generate-web-module/__tests__/editor.spec.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/editor.spec.js +35 -0
- package/dist/scripts/generate-web-module/__tests__/editor.spec.js.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/fixtures.d.ts +4 -0
- package/dist/scripts/generate-web-module/__tests__/fixtures.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/fixtures.js +45 -0
- package/dist/scripts/generate-web-module/__tests__/fixtures.js.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/model-interface.spec.d.ts +2 -0
- package/dist/scripts/generate-web-module/__tests__/model-interface.spec.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/model-interface.spec.js +74 -0
- package/dist/scripts/generate-web-module/__tests__/model-interface.spec.js.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/plumbing.spec.d.ts +2 -0
- package/dist/scripts/generate-web-module/__tests__/plumbing.spec.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/plumbing.spec.js +21 -0
- package/dist/scripts/generate-web-module/__tests__/plumbing.spec.js.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/selector.spec.d.ts +2 -0
- package/dist/scripts/generate-web-module/__tests__/selector.spec.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/selector.spec.js +25 -0
- package/dist/scripts/generate-web-module/__tests__/selector.spec.js.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/table-module-list.spec.d.ts +2 -0
- package/dist/scripts/generate-web-module/__tests__/table-module-list.spec.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/__tests__/table-module-list.spec.js +55 -0
- package/dist/scripts/generate-web-module/__tests__/table-module-list.spec.js.map +1 -0
- package/dist/scripts/generate-web-module/generator.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/generator.js +14 -11
- package/dist/scripts/generate-web-module/generator.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/container.template.d.ts +5 -1
- package/dist/scripts/generate-web-module/templates/components/container.template.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/container.template.js +43 -63
- package/dist/scripts/generate-web-module/templates/components/container.template.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/content.template.d.ts +7 -4
- package/dist/scripts/generate-web-module/templates/components/content.template.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/content.template.js +103 -14
- package/dist/scripts/generate-web-module/templates/components/content.template.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/editor.template.d.ts +1 -1
- package/dist/scripts/generate-web-module/templates/components/editor.template.js +139 -150
- package/dist/scripts/generate-web-module/templates/components/editor.template.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/index.d.ts +0 -1
- package/dist/scripts/generate-web-module/templates/components/index.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/index.js +1 -3
- package/dist/scripts/generate-web-module/templates/components/index.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/list-container.template.js +2 -2
- package/dist/scripts/generate-web-module/templates/components/list.template.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/list.template.js +6 -1
- package/dist/scripts/generate-web-module/templates/components/list.template.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/selector.template.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/selector.template.js +48 -52
- package/dist/scripts/generate-web-module/templates/components/selector.template.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/data/interface.template.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/data/interface.template.js +38 -11
- package/dist/scripts/generate-web-module/templates/data/interface.template.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/data/model.template.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/data/model.template.js +83 -26
- package/dist/scripts/generate-web-module/templates/data/model.template.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/data/service.template.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/data/service.template.js +21 -1
- package/dist/scripts/generate-web-module/templates/data/service.template.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/index.d.ts +1 -1
- package/dist/scripts/generate-web-module/templates/index.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/index.js +1 -2
- package/dist/scripts/generate-web-module/templates/index.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/module.template.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/templates/module.template.js +11 -3
- package/dist/scripts/generate-web-module/templates/module.template.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/table-hook.template.js +31 -1
- package/dist/scripts/generate-web-module/templates/table-hook.template.js.map +1 -1
- package/dist/scripts/generate-web-module/transformers/import-resolver.d.ts +0 -1
- package/dist/scripts/generate-web-module/transformers/import-resolver.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/transformers/import-resolver.js +0 -1
- package/dist/scripts/generate-web-module/transformers/import-resolver.js.map +1 -1
- package/dist/scripts/generate-web-module/transformers/relationship-key.d.ts +5 -0
- package/dist/scripts/generate-web-module/transformers/relationship-key.d.ts.map +1 -0
- package/dist/scripts/generate-web-module/transformers/relationship-key.js +21 -0
- package/dist/scripts/generate-web-module/transformers/relationship-key.js.map +1 -0
- package/dist/scripts/generate-web-module/transformers/relationship-resolver.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/transformers/relationship-resolver.js +2 -0
- package/dist/scripts/generate-web-module/transformers/relationship-resolver.js.map +1 -1
- package/dist/scripts/generate-web-module/types/json-schema.interface.d.ts +21 -0
- package/dist/scripts/generate-web-module/types/json-schema.interface.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/types/template-data.interface.d.ts +17 -0
- package/dist/scripts/generate-web-module/types/template-data.interface.d.ts.map +1 -1
- package/package.json +1 -1
- package/scripts/generate-web-module/__tests__/container.spec.ts +58 -0
- package/scripts/generate-web-module/__tests__/data-service.spec.ts +18 -0
- package/scripts/generate-web-module/__tests__/editor.spec.ts +36 -0
- package/scripts/generate-web-module/__tests__/fixtures.ts +43 -0
- package/scripts/generate-web-module/__tests__/model-interface.spec.ts +77 -0
- package/scripts/generate-web-module/__tests__/plumbing.spec.ts +21 -0
- package/scripts/generate-web-module/__tests__/selector.spec.ts +24 -0
- package/scripts/generate-web-module/__tests__/table-module-list.spec.ts +59 -0
- package/scripts/generate-web-module/generator.ts +14 -13
- package/scripts/generate-web-module/templates/components/container.template.ts +51 -66
- package/scripts/generate-web-module/templates/components/content.template.ts +107 -15
- package/scripts/generate-web-module/templates/components/editor.template.ts +140 -152
- package/scripts/generate-web-module/templates/components/index.ts +0 -1
- package/scripts/generate-web-module/templates/components/list-container.template.ts +2 -2
- package/scripts/generate-web-module/templates/components/list.template.ts +6 -1
- package/scripts/generate-web-module/templates/components/selector.template.ts +48 -52
- package/scripts/generate-web-module/templates/data/interface.template.ts +44 -12
- package/scripts/generate-web-module/templates/data/model.template.ts +88 -28
- package/scripts/generate-web-module/templates/data/service.template.ts +23 -1
- package/scripts/generate-web-module/templates/index.ts +0 -1
- package/scripts/generate-web-module/templates/module.template.ts +13 -3
- package/scripts/generate-web-module/templates/table-hook.template.ts +31 -2
- package/scripts/generate-web-module/transformers/import-resolver.ts +0 -2
- package/scripts/generate-web-module/transformers/relationship-key.ts +18 -0
- package/scripts/generate-web-module/transformers/relationship-resolver.ts +2 -0
- package/scripts/generate-web-module/types/json-schema.interface.ts +9 -0
- package/scripts/generate-web-module/types/template-data.interface.ts +7 -0
- package/src/features/notification/components/modals/NotificationModal.tsx +2 -5
- package/src/features/notification/contexts/NotificationContext.tsx +29 -13
- package/src/features/notification/contexts/__tests__/NotificationContext.spec.tsx +70 -0
- package/dist/chunk-AKXUNE3A.js.map +0 -1
- package/dist/chunk-TXVVZLUQ.mjs.map +0 -1
- package/dist/scripts/generate-web-module/templates/components/details.template.d.ts +0 -14
- package/dist/scripts/generate-web-module/templates/components/details.template.d.ts.map +0 -1
- package/dist/scripts/generate-web-module/templates/components/details.template.js +0 -112
- package/dist/scripts/generate-web-module/templates/components/details.template.js.map +0 -1
- package/scripts/generate-web-module/templates/components/details.template.ts +0 -116
- /package/dist/{BlockNoteEditor-K7IIWM3S.mjs.map → BlockNoteEditor-A5LNFWHW.mjs.map} +0 -0
|
@@ -9592,7 +9592,7 @@ import { useRef as useRef15 } from "react";
|
|
|
9592
9592
|
import dynamic from "next/dynamic";
|
|
9593
9593
|
import React15 from "react";
|
|
9594
9594
|
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
9595
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
9595
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-A5LNFWHW.mjs"), {
|
|
9596
9596
|
ssr: false
|
|
9597
9597
|
});
|
|
9598
9598
|
var BlockNoteEditorContainer = React15.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -12168,7 +12168,7 @@ var useCompanyContext = /* @__PURE__ */ __name(() => {
|
|
|
12168
12168
|
|
|
12169
12169
|
// src/features/notification/contexts/NotificationContext.tsx
|
|
12170
12170
|
import { useTranslations as useTranslations39 } from "next-intl";
|
|
12171
|
-
import { createContext as createContext10, useCallback as useCallback20, useContext as useContext11, useEffect as useEffect31, useState as useState35 } from "react";
|
|
12171
|
+
import { createContext as createContext10, useCallback as useCallback20, useContext as useContext11, useEffect as useEffect31, useRef as useRef20, useState as useState35 } from "react";
|
|
12172
12172
|
|
|
12173
12173
|
// src/features/notification/components/notifications/Notification.tsx
|
|
12174
12174
|
import { useTranslations as useTranslations38 } from "next-intl";
|
|
@@ -12243,6 +12243,7 @@ var NotificationContextProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
|
12243
12243
|
const [error, setError] = useState35(null);
|
|
12244
12244
|
const [lastLoaded, setLastLoaded] = useState35(0);
|
|
12245
12245
|
const [hasInitiallyLoaded, setHasInitiallyLoaded] = useState35(false);
|
|
12246
|
+
const inFlightRef = useRef20(null);
|
|
12246
12247
|
const { currentUser } = useCurrentUserContext();
|
|
12247
12248
|
const shouldRefresh = Date.now() - lastLoaded > 5 * 60 * 1e3;
|
|
12248
12249
|
const addNotification = useCallback20((notification) => {
|
|
@@ -12261,18 +12262,24 @@ var NotificationContextProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
|
12261
12262
|
});
|
|
12262
12263
|
}, []);
|
|
12263
12264
|
const loadNotifications = useCallback20(async () => {
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12265
|
+
if (inFlightRef.current) return inFlightRef.current;
|
|
12266
|
+
const request = (async () => {
|
|
12267
|
+
setIsLoading(true);
|
|
12268
|
+
setError(null);
|
|
12269
|
+
try {
|
|
12270
|
+
const fetchedNotifications = await NotificationService.findMany({});
|
|
12271
|
+
setNotifications(fetchedNotifications);
|
|
12272
|
+
setLastLoaded(Date.now());
|
|
12273
|
+
} catch (error2) {
|
|
12274
|
+
const errorMessage = error2 instanceof Error ? error2.message : "Failed to load notifications";
|
|
12275
|
+
setError(errorMessage);
|
|
12276
|
+
} finally {
|
|
12277
|
+
setIsLoading(false);
|
|
12278
|
+
inFlightRef.current = null;
|
|
12279
|
+
}
|
|
12280
|
+
})();
|
|
12281
|
+
inFlightRef.current = request;
|
|
12282
|
+
return request;
|
|
12276
12283
|
}, []);
|
|
12277
12284
|
useEffect31(() => {
|
|
12278
12285
|
if (hasInitiallyLoaded || !currentUser) return;
|
|
@@ -12362,7 +12369,7 @@ var useNotificationContext = /* @__PURE__ */ __name(() => {
|
|
|
12362
12369
|
}, "useNotificationContext");
|
|
12363
12370
|
|
|
12364
12371
|
// src/features/onboarding/contexts/OnboardingContext.tsx
|
|
12365
|
-
import { createContext as createContext11, useCallback as useCallback21, useContext as useContext12, useEffect as useEffect32, useRef as
|
|
12372
|
+
import { createContext as createContext11, useCallback as useCallback21, useContext as useContext12, useEffect as useEffect32, useRef as useRef21, useState as useState36 } from "react";
|
|
12366
12373
|
import { createRoot } from "react-dom/client";
|
|
12367
12374
|
import Shepherd from "shepherd.js";
|
|
12368
12375
|
import "shepherd.js/dist/css/shepherd.css";
|
|
@@ -12433,8 +12440,8 @@ function OnboardingProvider({
|
|
|
12433
12440
|
const [activeTourId, setActiveTourId] = useState36(null);
|
|
12434
12441
|
const [currentStepIndex, setCurrentStepIndex] = useState36(0);
|
|
12435
12442
|
const [totalSteps, setTotalSteps] = useState36(0);
|
|
12436
|
-
const tourRef =
|
|
12437
|
-
const rootsRef =
|
|
12443
|
+
const tourRef = useRef21(null);
|
|
12444
|
+
const rootsRef = useRef21(/* @__PURE__ */ new Map());
|
|
12438
12445
|
const cleanupRoots = useCallback21(() => {
|
|
12439
12446
|
rootsRef.current.forEach((root) => {
|
|
12440
12447
|
try {
|
|
@@ -12686,7 +12693,7 @@ __name(HowToDeleter, "HowToDeleter");
|
|
|
12686
12693
|
import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
|
|
12687
12694
|
import { PlusIcon, SearchIcon as SearchIcon5, XIcon as XIcon9 } from "lucide-react";
|
|
12688
12695
|
import { useTranslations as useTranslations43 } from "next-intl";
|
|
12689
|
-
import { useCallback as useCallback22, useEffect as useEffect33, useMemo as useMemo16, useRef as
|
|
12696
|
+
import { useCallback as useCallback22, useEffect as useEffect33, useMemo as useMemo16, useRef as useRef22, useState as useState38 } from "react";
|
|
12690
12697
|
import { useForm as useForm4 } from "react-hook-form";
|
|
12691
12698
|
import { v4 as v43 } from "uuid";
|
|
12692
12699
|
import { z as z3 } from "zod";
|
|
@@ -12843,7 +12850,7 @@ function HowToEditorInternal({
|
|
|
12843
12850
|
resolver: zodResolver4(formSchema),
|
|
12844
12851
|
defaultValues: getDefaultValues()
|
|
12845
12852
|
});
|
|
12846
|
-
const initialRelatedIds =
|
|
12853
|
+
const initialRelatedIds = useRef22([]);
|
|
12847
12854
|
useEffect33(() => {
|
|
12848
12855
|
if (!howTo?.howToType || !howTo?.slug) return;
|
|
12849
12856
|
let active = true;
|
|
@@ -13523,7 +13530,7 @@ __name(useHeaderLeftContent, "useHeaderLeftContent");
|
|
|
13523
13530
|
// src/components/EditableAvatar.tsx
|
|
13524
13531
|
import { PencilIcon as PencilIcon3, Trash2Icon as Trash2Icon3 } from "lucide-react";
|
|
13525
13532
|
import { useTranslations as useTranslations48 } from "next-intl";
|
|
13526
|
-
import { useCallback as useCallback25, useRef as
|
|
13533
|
+
import { useCallback as useCallback25, useRef as useRef23, useState as useState42 } from "react";
|
|
13527
13534
|
import { jsx as jsx138, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
13528
13535
|
function EditableAvatar({
|
|
13529
13536
|
entityId,
|
|
@@ -13537,7 +13544,7 @@ function EditableAvatar({
|
|
|
13537
13544
|
}) {
|
|
13538
13545
|
const { company } = useCurrentUserContext();
|
|
13539
13546
|
const t = useTranslations48();
|
|
13540
|
-
const fileInputRef =
|
|
13547
|
+
const fileInputRef = useRef23(null);
|
|
13541
13548
|
const [optimisticImage, setOptimisticImage] = useState42(null);
|
|
13542
13549
|
const [isUploading, setIsUploading] = useState42(false);
|
|
13543
13550
|
const displayImage = optimisticImage ?? image;
|
|
@@ -13885,7 +13892,7 @@ __name(PageContainer, "PageContainer");
|
|
|
13885
13892
|
// src/components/containers/ReactMarkdownContainer.tsx
|
|
13886
13893
|
import { ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
|
|
13887
13894
|
import { useTranslations as useTranslations51 } from "next-intl";
|
|
13888
|
-
import { useEffect as useEffect38, useRef as
|
|
13895
|
+
import { useEffect as useEffect38, useRef as useRef24, useState as useState46 } from "react";
|
|
13889
13896
|
import ReactMarkdown from "react-markdown";
|
|
13890
13897
|
import remarkGfm from "remark-gfm";
|
|
13891
13898
|
import { jsx as jsx147, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
@@ -13898,7 +13905,7 @@ function ReactMarkdownContainer({
|
|
|
13898
13905
|
const t = useTranslations51("ui.buttons");
|
|
13899
13906
|
const [isExpanded, setIsExpanded] = useState46(false);
|
|
13900
13907
|
const [showExpandButton, setShowExpandButton] = useState46(false);
|
|
13901
|
-
const contentRef =
|
|
13908
|
+
const contentRef = useRef24(null);
|
|
13902
13909
|
useEffect38(() => {
|
|
13903
13910
|
if (collapsible && contentRef.current && !isExpanded) {
|
|
13904
13911
|
const isOverflowing = contentRef.current.scrollHeight > contentRef.current.clientHeight;
|
|
@@ -14225,7 +14232,7 @@ function AllowedUsersDetails({ showTitle, content }) {
|
|
|
14225
14232
|
__name(AllowedUsersDetails, "AllowedUsersDetails");
|
|
14226
14233
|
|
|
14227
14234
|
// src/components/editors/BlockNoteEditorMentionHoverCard.tsx
|
|
14228
|
-
import { useCallback as useCallback27, useEffect as useEffect40, useRef as
|
|
14235
|
+
import { useCallback as useCallback27, useEffect as useEffect40, useRef as useRef25, useState as useState48 } from "react";
|
|
14229
14236
|
import { createPortal as createPortal3 } from "react-dom";
|
|
14230
14237
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
14231
14238
|
function BlockNoteEditorMentionHoverCard({
|
|
@@ -14233,7 +14240,7 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
14233
14240
|
mentionResolveFn
|
|
14234
14241
|
}) {
|
|
14235
14242
|
const [hovered, setHovered] = useState48(null);
|
|
14236
|
-
const closeTimeoutRef =
|
|
14243
|
+
const closeTimeoutRef = useRef25(null);
|
|
14237
14244
|
const scheduleClose = useCallback27(() => {
|
|
14238
14245
|
closeTimeoutRef.current = setTimeout(() => setHovered(null), 200);
|
|
14239
14246
|
}, []);
|
|
@@ -14490,12 +14497,12 @@ var BlockNoteViewerContainer = React24.memo(/* @__PURE__ */ __name(function View
|
|
|
14490
14497
|
}, "ViewerContainer"));
|
|
14491
14498
|
|
|
14492
14499
|
// src/components/pages/PageContainerContentDetails.tsx
|
|
14493
|
-
import { useEffect as useEffect41, useRef as
|
|
14500
|
+
import { useEffect as useEffect41, useRef as useRef26, useState as useState49 } from "react";
|
|
14494
14501
|
import { jsx as jsx156, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
14495
14502
|
function PageContainerContentDetails({ items, section, module, id }) {
|
|
14496
14503
|
const rewriteUrl = useUrlRewriter();
|
|
14497
14504
|
const [isScrolled, setIsScrolled] = useState49(false);
|
|
14498
|
-
const sentinelRef =
|
|
14505
|
+
const sentinelRef = useRef26(null);
|
|
14499
14506
|
useEffect41(() => {
|
|
14500
14507
|
const sentinel = sentinelRef.current;
|
|
14501
14508
|
if (!sentinel) return;
|
|
@@ -14702,13 +14709,13 @@ function JsonApiProvider({ config, children }) {
|
|
|
14702
14709
|
__name(JsonApiProvider, "JsonApiProvider");
|
|
14703
14710
|
|
|
14704
14711
|
// src/client/hooks/useJsonApiGet.ts
|
|
14705
|
-
import { useState as useState51, useEffect as useEffect44, useCallback as useCallback29, useRef as
|
|
14712
|
+
import { useState as useState51, useEffect as useEffect44, useCallback as useCallback29, useRef as useRef27 } from "react";
|
|
14706
14713
|
function useJsonApiGet(params) {
|
|
14707
14714
|
const [data, setData] = useState51(null);
|
|
14708
14715
|
const [loading, setLoading] = useState51(false);
|
|
14709
14716
|
const [error, setError] = useState51(null);
|
|
14710
14717
|
const [response, setResponse] = useState51(null);
|
|
14711
|
-
const isMounted =
|
|
14718
|
+
const isMounted = useRef27(true);
|
|
14712
14719
|
const fetchData = useCallback29(async () => {
|
|
14713
14720
|
if (params.options?.enabled === false) return;
|
|
14714
14721
|
setLoading(true);
|
|
@@ -15510,12 +15517,12 @@ import React26, { memo, useMemo as useMemo26, useState as useState56 } from "rea
|
|
|
15510
15517
|
// src/components/tables/ContentTableSearch.tsx
|
|
15511
15518
|
import { RefreshCw, Search, X as X3 } from "lucide-react";
|
|
15512
15519
|
import { useTranslations as useTranslations56 } from "next-intl";
|
|
15513
|
-
import { useCallback as useCallback34, useEffect as useEffect48, useRef as
|
|
15520
|
+
import { useCallback as useCallback34, useEffect as useEffect48, useRef as useRef28, useState as useState55 } from "react";
|
|
15514
15521
|
import { jsx as jsx167, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
15515
15522
|
function ContentTableSearch({ data }) {
|
|
15516
15523
|
const t = useTranslations56();
|
|
15517
|
-
const searchTermRef =
|
|
15518
|
-
const inputRef =
|
|
15524
|
+
const searchTermRef = useRef28("");
|
|
15525
|
+
const inputRef = useRef28(null);
|
|
15519
15526
|
const [searchTerm, setSearchTerm] = useState55("");
|
|
15520
15527
|
const [isFocused, setIsFocused] = useState55(false);
|
|
15521
15528
|
const [isSearching, setIsSearching] = useState55(false);
|
|
@@ -15759,12 +15766,12 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
15759
15766
|
}, "ContentListTable"));
|
|
15760
15767
|
|
|
15761
15768
|
// src/components/grids/ContentListGrid.tsx
|
|
15762
|
-
import { useEffect as useEffect49, useRef as
|
|
15769
|
+
import { useEffect as useEffect49, useRef as useRef29 } from "react";
|
|
15763
15770
|
import { Fragment as Fragment27, jsx as jsx169, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
15764
15771
|
var DEFAULT_GRID_CLASSES = "grid grid-cols-2 gap-4 p-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5";
|
|
15765
15772
|
function ContentListGrid(props) {
|
|
15766
15773
|
const { data, ItemComponent, allowSearch, fullWidth, gridClassName } = props;
|
|
15767
|
-
const sentinelRef =
|
|
15774
|
+
const sentinelRef = useRef29(null);
|
|
15768
15775
|
useEffect49(() => {
|
|
15769
15776
|
if (!data.next || !sentinelRef.current) return;
|
|
15770
15777
|
const observer = new IntersectionObserver(
|
|
@@ -15859,14 +15866,14 @@ __name(validateItalianTaxCode, "validateItalianTaxCode");
|
|
|
15859
15866
|
|
|
15860
15867
|
// src/components/fiscal/ItalianFiscalData.tsx
|
|
15861
15868
|
import { useTranslations as useTranslations57 } from "next-intl";
|
|
15862
|
-
import { forwardRef as forwardRef8, useCallback as useCallback35, useImperativeHandle as useImperativeHandle2, useRef as
|
|
15869
|
+
import { forwardRef as forwardRef8, useCallback as useCallback35, useImperativeHandle as useImperativeHandle2, useRef as useRef30, useState as useState57 } from "react";
|
|
15863
15870
|
import { z as z4 } from "zod";
|
|
15864
15871
|
import { jsx as jsx170, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
15865
15872
|
var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
|
|
15866
15873
|
const t = useTranslations57();
|
|
15867
|
-
const initialRef =
|
|
15874
|
+
const initialRef = useRef30(initialData);
|
|
15868
15875
|
const [fiscalData, setFiscalData] = useState57(initialData);
|
|
15869
|
-
const fiscalDataRef =
|
|
15876
|
+
const fiscalDataRef = useRef30(initialData);
|
|
15870
15877
|
const [fiscalErrors, setFiscalErrors] = useState57({});
|
|
15871
15878
|
const updateFiscalField = useCallback35((key, value) => {
|
|
15872
15879
|
setFiscalData((prev) => {
|
|
@@ -16503,11 +16510,11 @@ import { useTranslations as useTranslations61 } from "next-intl";
|
|
|
16503
16510
|
import { useState as useState62 } from "react";
|
|
16504
16511
|
|
|
16505
16512
|
// src/features/auth/components/two-factor/TotpInput.tsx
|
|
16506
|
-
import { useEffect as useEffect51, useRef as
|
|
16513
|
+
import { useEffect as useEffect51, useRef as useRef31, useState as useState61 } from "react";
|
|
16507
16514
|
import { jsx as jsx176, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
16508
16515
|
function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
16509
16516
|
const [digits, setDigits] = useState61(["", "", "", "", "", ""]);
|
|
16510
|
-
const inputRefs =
|
|
16517
|
+
const inputRefs = useRef31([]);
|
|
16511
16518
|
useEffect51(() => {
|
|
16512
16519
|
if (autoFocus && inputRefs.current[0]) {
|
|
16513
16520
|
inputRefs.current[0].focus();
|
|
@@ -17996,7 +18003,7 @@ __name(RelevantContentsList, "RelevantContentsList");
|
|
|
17996
18003
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
17997
18004
|
import { ArrowRight, LifeBuoyIcon } from "lucide-react";
|
|
17998
18005
|
import { useTranslations as useTranslations79 } from "next-intl";
|
|
17999
|
-
import { useCallback as useCallback37, useEffect as useEffect60, useMemo as useMemo29, useRef as
|
|
18006
|
+
import { useCallback as useCallback37, useEffect as useEffect60, useMemo as useMemo29, useRef as useRef32, useState as useState76 } from "react";
|
|
18000
18007
|
|
|
18001
18008
|
// src/features/how-to/components/containers/HowToCommandViewer.tsx
|
|
18002
18009
|
import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
|
|
@@ -18124,7 +18131,7 @@ function HowToCommand({ pathname, extraGroups, onStartChat }) {
|
|
|
18124
18131
|
const t = useTranslations79();
|
|
18125
18132
|
const [dialogOpen, setDialogOpen] = useState76(false);
|
|
18126
18133
|
const [selectedHowTo, setSelectedHowTo] = useState76(null);
|
|
18127
|
-
const searchTermRef =
|
|
18134
|
+
const searchTermRef = useRef32("");
|
|
18128
18135
|
const [searchTerm, setSearchTerm] = useState76("");
|
|
18129
18136
|
const data = useDataListRetriever({
|
|
18130
18137
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
@@ -18434,7 +18441,7 @@ __name(HowToListContainer, "HowToListContainer");
|
|
|
18434
18441
|
// src/features/how-to/components/forms/HowToSelector.tsx
|
|
18435
18442
|
import { CircleX as CircleX2, RefreshCwIcon as RefreshCwIcon3, SearchIcon as SearchIcon6, XIcon as XIcon10 } from "lucide-react";
|
|
18436
18443
|
import { useTranslations as useTranslations83 } from "next-intl";
|
|
18437
|
-
import { useCallback as useCallback38, useEffect as useEffect61, useRef as
|
|
18444
|
+
import { useCallback as useCallback38, useEffect as useEffect61, useRef as useRef33, useState as useState77 } from "react";
|
|
18438
18445
|
import { Fragment as Fragment42, jsx as jsx205, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
18439
18446
|
function HowToSelector({
|
|
18440
18447
|
id,
|
|
@@ -18446,7 +18453,7 @@ function HowToSelector({
|
|
|
18446
18453
|
}) {
|
|
18447
18454
|
const t = useTranslations83();
|
|
18448
18455
|
const [open, setOpen] = useState77(false);
|
|
18449
|
-
const searchTermRef =
|
|
18456
|
+
const searchTermRef = useRef33("");
|
|
18450
18457
|
const [searchTerm, setSearchTerm] = useState77("");
|
|
18451
18458
|
const [isSearching, setIsSearching] = useState77(false);
|
|
18452
18459
|
const data = useDataListRetriever({
|
|
@@ -18740,7 +18747,7 @@ function AssistantThreadHeader({ assistant, onRename, onDelete }) {
|
|
|
18740
18747
|
__name(AssistantThreadHeader, "AssistantThreadHeader");
|
|
18741
18748
|
|
|
18742
18749
|
// src/features/assistant/components/parts/AssistantThread.tsx
|
|
18743
|
-
import { useEffect as useEffect63, useRef as
|
|
18750
|
+
import { useEffect as useEffect63, useRef as useRef34 } from "react";
|
|
18744
18751
|
|
|
18745
18752
|
// src/features/assistant-message/components/MessageItem.tsx
|
|
18746
18753
|
import { useTranslations as useTranslations93 } from "next-intl";
|
|
@@ -19300,7 +19307,7 @@ __name(AssistantStatusLine, "AssistantStatusLine");
|
|
|
19300
19307
|
// src/features/assistant/components/parts/AssistantThread.tsx
|
|
19301
19308
|
import { jsx as jsx221, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
19302
19309
|
function AssistantThread({ messages, sending, status, onSelectFollowUp, failedMessageIds, onRetry }) {
|
|
19303
|
-
const endRef =
|
|
19310
|
+
const endRef = useRef34(null);
|
|
19304
19311
|
useEffect63(() => {
|
|
19305
19312
|
endRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
19306
19313
|
}, [messages.length, sending]);
|
|
@@ -19494,10 +19501,10 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
19494
19501
|
// src/features/notification/components/modals/NotificationModal.tsx
|
|
19495
19502
|
import { BellIcon } from "lucide-react";
|
|
19496
19503
|
import { useTranslations as useTranslations97 } from "next-intl";
|
|
19497
|
-
import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect64, useMemo as useMemo33, useRef as
|
|
19504
|
+
import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect64, useMemo as useMemo33, useRef as useRef35, useState as useState84 } from "react";
|
|
19498
19505
|
import { jsx as jsx226, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
19499
19506
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
19500
|
-
const _instanceId =
|
|
19507
|
+
const _instanceId = useRef35(Math.random().toString(36).substr(2, 9));
|
|
19501
19508
|
const {
|
|
19502
19509
|
notifications,
|
|
19503
19510
|
addNotification,
|
|
@@ -19507,8 +19514,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
19507
19514
|
isLoading,
|
|
19508
19515
|
error,
|
|
19509
19516
|
loadNotifications,
|
|
19510
|
-
shouldRefresh
|
|
19511
|
-
lastLoaded
|
|
19517
|
+
shouldRefresh
|
|
19512
19518
|
} = useNotificationContext();
|
|
19513
19519
|
const {
|
|
19514
19520
|
socketNotifications,
|
|
@@ -19518,8 +19524,8 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
19518
19524
|
const t = useTranslations97();
|
|
19519
19525
|
const generateUrl = usePageUrlGenerator();
|
|
19520
19526
|
const [newNotifications, setNewNotifications] = useState84(false);
|
|
19521
|
-
const preventAutoClose =
|
|
19522
|
-
const circuitBreakerRef =
|
|
19527
|
+
const preventAutoClose = useRef35(false);
|
|
19528
|
+
const circuitBreakerRef = useRef35({
|
|
19523
19529
|
count: 0,
|
|
19524
19530
|
resetTime: 0,
|
|
19525
19531
|
isOpen: false
|
|
@@ -19549,10 +19555,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
19549
19555
|
useEffect64(() => {
|
|
19550
19556
|
setNewNotifications(unreadCount > 0);
|
|
19551
19557
|
}, [unreadCount]);
|
|
19552
|
-
|
|
19553
|
-
if (lastLoaded === 0) loadNotifications();
|
|
19554
|
-
}, [lastLoaded, loadNotifications]);
|
|
19555
|
-
const processSocketNotificationsRef = useRef34(null);
|
|
19558
|
+
const processSocketNotificationsRef = useRef35(null);
|
|
19556
19559
|
const processSocketNotifications = useCallback39(() => {
|
|
19557
19560
|
if (socketNotifications.length === 0) {
|
|
19558
19561
|
return;
|
|
@@ -19713,7 +19716,7 @@ __name(ReferralCodeCapture, "ReferralCodeCapture");
|
|
|
19713
19716
|
|
|
19714
19717
|
// src/features/referral/components/ReferralWidget.tsx
|
|
19715
19718
|
import { Copy as Copy2, Loader2 as Loader25, Mail, Users } from "lucide-react";
|
|
19716
|
-
import { useCallback as useCallback40, useRef as
|
|
19719
|
+
import { useCallback as useCallback40, useRef as useRef36, useState as useState87 } from "react";
|
|
19717
19720
|
|
|
19718
19721
|
// src/features/referral/hooks/useReferralInvite.ts
|
|
19719
19722
|
import { useState as useState85 } from "react";
|
|
@@ -19819,7 +19822,7 @@ function ReferralWidget({
|
|
|
19819
19822
|
const { sendInvite, sending } = useReferralInvite();
|
|
19820
19823
|
const [email, setEmail] = useState87("");
|
|
19821
19824
|
const [copied, setCopied] = useState87(false);
|
|
19822
|
-
const linkInputRef =
|
|
19825
|
+
const linkInputRef = useRef36(null);
|
|
19823
19826
|
const config = getReferralConfig();
|
|
19824
19827
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
19825
19828
|
const referralUrl = stats?.referralCode ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
|
|
@@ -20107,11 +20110,11 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
20107
20110
|
// src/features/role/components/forms/UserRoleAdd.tsx
|
|
20108
20111
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
20109
20112
|
import { useTranslations as useTranslations101 } from "next-intl";
|
|
20110
|
-
import { useCallback as useCallback41, useEffect as useEffect68, useRef as
|
|
20113
|
+
import { useCallback as useCallback41, useEffect as useEffect68, useRef as useRef37, useState as useState89 } from "react";
|
|
20111
20114
|
import { Fragment as Fragment51, jsx as jsx234, jsxs as jsxs145 } from "react/jsx-runtime";
|
|
20112
20115
|
function UserRoleAdd({ user, refresh }) {
|
|
20113
20116
|
const [open, setOpen] = useState89(false);
|
|
20114
|
-
const inputRef =
|
|
20117
|
+
const inputRef = useRef37(null);
|
|
20115
20118
|
const [searchTerm, setSearchTerm] = useState89("");
|
|
20116
20119
|
const [roles, setRoles] = useState89([]);
|
|
20117
20120
|
const t = useTranslations101();
|
|
@@ -21531,7 +21534,7 @@ __name(WaitlistList, "WaitlistList");
|
|
|
21531
21534
|
// src/features/rbac/components/RbacContainer.tsx
|
|
21532
21535
|
import { Loader2Icon as Loader2Icon3 } from "lucide-react";
|
|
21533
21536
|
import { useTranslations as useTranslations110 } from "next-intl";
|
|
21534
|
-
import { memo as memo2, useCallback as useCallback49, useEffect as useEffect72, useMemo as useMemo34, useRef as
|
|
21537
|
+
import { memo as memo2, useCallback as useCallback49, useEffect as useEffect72, useMemo as useMemo34, useRef as useRef38, useState as useState97 } from "react";
|
|
21535
21538
|
|
|
21536
21539
|
// src/features/rbac/components/RbacPermissionCell.tsx
|
|
21537
21540
|
import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon11 } from "lucide-react";
|
|
@@ -21800,7 +21803,7 @@ var CellButton = memo2(/* @__PURE__ */ __name(function CellButton2({
|
|
|
21800
21803
|
isRoleColumn,
|
|
21801
21804
|
onOpen
|
|
21802
21805
|
}) {
|
|
21803
|
-
const ref =
|
|
21806
|
+
const ref = useRef38(null);
|
|
21804
21807
|
const value = cellValue(tokens, action);
|
|
21805
21808
|
const handleClick = useCallback49(() => {
|
|
21806
21809
|
if (!ref.current) return;
|
|
@@ -21986,7 +21989,7 @@ __name(RbacContainer, "RbacContainer");
|
|
|
21986
21989
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
21987
21990
|
import { Loader2Icon as Loader2Icon4 } from "lucide-react";
|
|
21988
21991
|
import { useTranslations as useTranslations111 } from "next-intl";
|
|
21989
|
-
import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect73, useMemo as useMemo35, useRef as
|
|
21992
|
+
import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect73, useMemo as useMemo35, useRef as useRef39, useState as useState98 } from "react";
|
|
21990
21993
|
import { jsx as jsx258, jsxs as jsxs167 } from "react/jsx-runtime";
|
|
21991
21994
|
function findToken2(tokens, action) {
|
|
21992
21995
|
if (!tokens) return void 0;
|
|
@@ -22007,7 +22010,7 @@ var CellButton3 = memo3(/* @__PURE__ */ __name(function CellButton4({
|
|
|
22007
22010
|
isRoleColumn,
|
|
22008
22011
|
onOpen
|
|
22009
22012
|
}) {
|
|
22010
|
-
const ref =
|
|
22013
|
+
const ref = useRef39(null);
|
|
22011
22014
|
const value = cellValue2(tokens, action);
|
|
22012
22015
|
const handleClick = useCallback50(() => {
|
|
22013
22016
|
if (!ref.current) return;
|
|
@@ -22681,4 +22684,4 @@ export {
|
|
|
22681
22684
|
useOAuthClients,
|
|
22682
22685
|
useOAuthClient
|
|
22683
22686
|
};
|
|
22684
|
-
//# sourceMappingURL=chunk-
|
|
22687
|
+
//# sourceMappingURL=chunk-LYLGU2BK.mjs.map
|