@carlonicora/nextjs-jsonapi 1.92.0 → 1.92.2
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-GSASQXY2.js → BlockNoteEditor-6OL2A7U4.js} +15 -9
- package/dist/BlockNoteEditor-6OL2A7U4.js.map +1 -0
- package/dist/{BlockNoteEditor-O2MMPJGR.mjs → BlockNoteEditor-C33MRSMX.mjs} +8 -2
- package/dist/BlockNoteEditor-C33MRSMX.mjs.map +1 -0
- package/dist/billing/index.js +299 -299
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-2KX3OXHE.js → chunk-7V4W4CYS.js} +37 -25
- package/dist/chunk-7V4W4CYS.js.map +1 -0
- package/dist/{chunk-QO267HMI.mjs → chunk-TGZDQSDU.mjs} +95 -83
- package/dist/chunk-TGZDQSDU.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/package.json +1 -1
- package/src/components/editors/BlockNoteEditor.tsx +15 -0
- package/src/components/forms/FormBlockNote.tsx +34 -21
- package/dist/BlockNoteEditor-GSASQXY2.js.map +0 -1
- package/dist/BlockNoteEditor-O2MMPJGR.mjs.map +0 -1
- package/dist/chunk-2KX3OXHE.js.map +0 -1
- package/dist/chunk-QO267HMI.mjs.map +0 -1
|
@@ -8191,7 +8191,7 @@ __name(UserResentInvitationEmail, "UserResentInvitationEmail");
|
|
|
8191
8191
|
// src/features/user/components/forms/UserSelector.tsx
|
|
8192
8192
|
import { CircleX, RefreshCwIcon as RefreshCwIcon2, SearchIcon as SearchIcon4, XIcon as XIcon8 } from "lucide-react";
|
|
8193
8193
|
import { useTranslations as useTranslations19 } from "next-intl";
|
|
8194
|
-
import { useCallback as useCallback18, useEffect as useEffect27, useRef as
|
|
8194
|
+
import { useCallback as useCallback18, useEffect as useEffect27, useRef as useRef18, useState as useState28 } from "react";
|
|
8195
8195
|
|
|
8196
8196
|
// src/components/forms/CommonAssociationForm.tsx
|
|
8197
8197
|
import { useTranslations as useTranslations8 } from "next-intl";
|
|
@@ -9207,11 +9207,14 @@ function FormCheckbox({ form, id, name, labelBefore, description, isRequired })
|
|
|
9207
9207
|
}
|
|
9208
9208
|
__name(FormCheckbox, "FormCheckbox");
|
|
9209
9209
|
|
|
9210
|
+
// src/components/forms/FormBlockNote.tsx
|
|
9211
|
+
import { useRef as useRef15 } from "react";
|
|
9212
|
+
|
|
9210
9213
|
// src/components/editors/BlockNoteEditorContainer.tsx
|
|
9211
9214
|
import dynamic from "next/dynamic";
|
|
9212
9215
|
import React14 from "react";
|
|
9213
9216
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
9214
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
9217
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-C33MRSMX.mjs"), {
|
|
9215
9218
|
ssr: false
|
|
9216
9219
|
});
|
|
9217
9220
|
var BlockNoteEditorContainer = React14.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -9239,6 +9242,8 @@ function FormBlockNote({
|
|
|
9239
9242
|
mentionSearchParams,
|
|
9240
9243
|
mentionResolveFn
|
|
9241
9244
|
}) {
|
|
9245
|
+
const initialContentRef = useRef15(null);
|
|
9246
|
+
const lastEditorContentRef = useRef15(void 0);
|
|
9242
9247
|
return /* @__PURE__ */ jsx74(
|
|
9243
9248
|
"div",
|
|
9244
9249
|
{
|
|
@@ -9256,27 +9261,34 @@ function FormBlockNote({
|
|
|
9256
9261
|
isRequired,
|
|
9257
9262
|
description,
|
|
9258
9263
|
testId,
|
|
9259
|
-
children: (field) =>
|
|
9260
|
-
|
|
9261
|
-
{
|
|
9262
|
-
|
|
9263
|
-
type,
|
|
9264
|
-
initialContent: field.value,
|
|
9265
|
-
onChange: (content, isEmpty) => {
|
|
9266
|
-
field.onChange(content);
|
|
9267
|
-
onEmptyChange?.(isEmpty);
|
|
9268
|
-
},
|
|
9269
|
-
placeholder,
|
|
9270
|
-
bordered: true,
|
|
9271
|
-
inlineContentSpecs,
|
|
9272
|
-
renderOverlays,
|
|
9273
|
-
enableMentions,
|
|
9274
|
-
mentionSearchFn,
|
|
9275
|
-
mentionSearchParams,
|
|
9276
|
-
mentionResolveFn,
|
|
9277
|
-
className: cn(stretch && "min-h-0 flex-1")
|
|
9264
|
+
children: (field) => {
|
|
9265
|
+
const isInternalChange = lastEditorContentRef.current !== void 0 && field.value === lastEditorContentRef.current;
|
|
9266
|
+
if (!isInternalChange) {
|
|
9267
|
+
initialContentRef.current = field.value;
|
|
9278
9268
|
}
|
|
9279
|
-
|
|
9269
|
+
return /* @__PURE__ */ jsx74(
|
|
9270
|
+
BlockNoteEditorContainer,
|
|
9271
|
+
{
|
|
9272
|
+
id: form.getValues("id"),
|
|
9273
|
+
type,
|
|
9274
|
+
initialContent: initialContentRef.current,
|
|
9275
|
+
onChange: (content, isEmpty) => {
|
|
9276
|
+
lastEditorContentRef.current = content;
|
|
9277
|
+
field.onChange(content);
|
|
9278
|
+
onEmptyChange?.(isEmpty);
|
|
9279
|
+
},
|
|
9280
|
+
placeholder,
|
|
9281
|
+
bordered: true,
|
|
9282
|
+
inlineContentSpecs,
|
|
9283
|
+
renderOverlays,
|
|
9284
|
+
enableMentions,
|
|
9285
|
+
mentionSearchFn,
|
|
9286
|
+
mentionSearchParams,
|
|
9287
|
+
mentionResolveFn,
|
|
9288
|
+
className: cn(stretch && "min-h-0 flex-1")
|
|
9289
|
+
}
|
|
9290
|
+
);
|
|
9291
|
+
}
|
|
9280
9292
|
}
|
|
9281
9293
|
)
|
|
9282
9294
|
}
|
|
@@ -9661,13 +9673,13 @@ function FormInput({
|
|
|
9661
9673
|
__name(FormInput, "FormInput");
|
|
9662
9674
|
|
|
9663
9675
|
// src/components/forms/PasswordInput.tsx
|
|
9664
|
-
import * as
|
|
9676
|
+
import * as React16 from "react";
|
|
9665
9677
|
import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
9666
9678
|
import { useTranslations as useTranslations16 } from "next-intl";
|
|
9667
9679
|
import { jsx as jsx78, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9668
|
-
var PasswordInput =
|
|
9680
|
+
var PasswordInput = React16.forwardRef(
|
|
9669
9681
|
({ className, type: _type, ...props }, ref) => {
|
|
9670
|
-
const [showPassword, setShowPassword] =
|
|
9682
|
+
const [showPassword, setShowPassword] = React16.useState(false);
|
|
9671
9683
|
const disabled = props.value === "" || props.value === void 0 || props.disabled;
|
|
9672
9684
|
const t = useTranslations16();
|
|
9673
9685
|
return /* @__PURE__ */ jsxs47("div", { className: "relative", children: [
|
|
@@ -9727,7 +9739,7 @@ function FormPassword({
|
|
|
9727
9739
|
__name(FormPassword, "FormPassword");
|
|
9728
9740
|
|
|
9729
9741
|
// src/components/forms/FormPlaceAutocomplete.tsx
|
|
9730
|
-
import { useEffect as useEffect23, useRef as
|
|
9742
|
+
import { useEffect as useEffect23, useRef as useRef16, useState as useState24 } from "react";
|
|
9731
9743
|
import { jsx as jsx80, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
9732
9744
|
function FormPlaceAutocomplete({
|
|
9733
9745
|
form,
|
|
@@ -9747,8 +9759,8 @@ function FormPlaceAutocomplete({
|
|
|
9747
9759
|
const [showSuggestions, setShowSuggestions] = useState24(false);
|
|
9748
9760
|
const [loadError, setLoadError] = useState24(false);
|
|
9749
9761
|
const [apiKey, setApiKey] = useState24(null);
|
|
9750
|
-
const debounceRef =
|
|
9751
|
-
const containerRef =
|
|
9762
|
+
const debounceRef = useRef16(null);
|
|
9763
|
+
const containerRef = useRef16(null);
|
|
9752
9764
|
useEffect23(() => {
|
|
9753
9765
|
const key = process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY;
|
|
9754
9766
|
if (!key) {
|
|
@@ -10209,12 +10221,12 @@ import { useTranslations as useTranslations18 } from "next-intl";
|
|
|
10209
10221
|
import { useEffect as useEffect26, useState as useState27 } from "react";
|
|
10210
10222
|
|
|
10211
10223
|
// src/features/user/hooks/useUserSearch.ts
|
|
10212
|
-
import { useCallback as useCallback17, useEffect as useEffect25, useRef as
|
|
10224
|
+
import { useCallback as useCallback17, useEffect as useEffect25, useRef as useRef17, useState as useState26 } from "react";
|
|
10213
10225
|
var useUserSearch = /* @__PURE__ */ __name(() => {
|
|
10214
10226
|
const [users, setUsers] = useState26([]);
|
|
10215
10227
|
const [searchQuery, setSearchQuery] = useState26("");
|
|
10216
10228
|
const [isLoading, setIsLoading] = useState26(false);
|
|
10217
|
-
const searchQueryRef =
|
|
10229
|
+
const searchQueryRef = useRef17("");
|
|
10218
10230
|
const loadUsers = useCallback17(
|
|
10219
10231
|
async (search) => {
|
|
10220
10232
|
try {
|
|
@@ -10415,7 +10427,7 @@ import { Fragment as Fragment12, jsx as jsx92, jsxs as jsxs58 } from "react/jsx-
|
|
|
10415
10427
|
function UserSelector({ id, form, label, placeholder, onChange, isRequired = false }) {
|
|
10416
10428
|
const t = useTranslations19();
|
|
10417
10429
|
const [open, setOpen] = useState28(false);
|
|
10418
|
-
const searchTermRef =
|
|
10430
|
+
const searchTermRef = useRef18("");
|
|
10419
10431
|
const [searchTerm, setSearchTerm] = useState28("");
|
|
10420
10432
|
const [isSearching, setIsSearching] = useState28(false);
|
|
10421
10433
|
const data = useDataListRetriever({
|
|
@@ -10889,13 +10901,13 @@ function RoleUsersList({ role }) {
|
|
|
10889
10901
|
__name(RoleUsersList, "RoleUsersList");
|
|
10890
10902
|
|
|
10891
10903
|
// src/features/user/components/lists/UserListInAdd.tsx
|
|
10892
|
-
import
|
|
10904
|
+
import React17 from "react";
|
|
10893
10905
|
import { Fragment as Fragment15, jsx as jsx107, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
10894
10906
|
function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
10895
10907
|
return /* @__PURE__ */ jsx107(Fragment15, { children: data.data !== void 0 && data.data.filter(
|
|
10896
10908
|
(user) => existingUsers && !existingUsers.find((existingUser) => existingUser.id === user.id)
|
|
10897
10909
|
).map((user) => {
|
|
10898
|
-
return /* @__PURE__ */ jsx107(
|
|
10910
|
+
return /* @__PURE__ */ jsx107(React17.Fragment, { children: /* @__PURE__ */ jsx107(
|
|
10899
10911
|
CommandItem,
|
|
10900
10912
|
{
|
|
10901
10913
|
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
@@ -11430,7 +11442,7 @@ import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
|
|
|
11430
11442
|
import { UploadIcon as UploadIcon3 } from "lucide-react";
|
|
11431
11443
|
import { useTranslations as useTranslations35 } from "next-intl";
|
|
11432
11444
|
import Image6 from "next/image";
|
|
11433
|
-
import { useCallback as useCallback19, useEffect as useEffect29, useMemo as useMemo15, useRef as
|
|
11445
|
+
import { useCallback as useCallback19, useEffect as useEffect29, useMemo as useMemo15, useRef as useRef19, useState as useState31 } from "react";
|
|
11434
11446
|
import { useForm as useForm3 } from "react-hook-form";
|
|
11435
11447
|
import { v4 as v42 } from "uuid";
|
|
11436
11448
|
import { z as z2 } from "zod";
|
|
@@ -11452,8 +11464,8 @@ function CompanyEditorInternal({
|
|
|
11452
11464
|
const [files, setFiles] = useState31(null);
|
|
11453
11465
|
const [contentType, setContentType] = useState31(null);
|
|
11454
11466
|
const t = useTranslations35();
|
|
11455
|
-
const fiscalRef =
|
|
11456
|
-
const addressComponentsRef =
|
|
11467
|
+
const fiscalRef = useRef19(null);
|
|
11468
|
+
const addressComponentsRef = useRef19({});
|
|
11457
11469
|
const canAccessFeatures = hasRole(getRoleId().Administrator) || hasRole(getRoleId().CompanyAdministrator) && process.env.NEXT_PUBLIC_PRIVATE_INSTALLATION?.toLowerCase() === "true";
|
|
11458
11470
|
const handleDialogOpenChange = useCallback19(
|
|
11459
11471
|
(open) => {
|
|
@@ -11912,7 +11924,7 @@ var useNotificationContext = /* @__PURE__ */ __name(() => {
|
|
|
11912
11924
|
}, "useNotificationContext");
|
|
11913
11925
|
|
|
11914
11926
|
// src/features/onboarding/contexts/OnboardingContext.tsx
|
|
11915
|
-
import { createContext as createContext11, useCallback as useCallback21, useContext as useContext12, useEffect as useEffect32, useRef as
|
|
11927
|
+
import { createContext as createContext11, useCallback as useCallback21, useContext as useContext12, useEffect as useEffect32, useRef as useRef20, useState as useState35 } from "react";
|
|
11916
11928
|
import { createRoot } from "react-dom/client";
|
|
11917
11929
|
import Shepherd from "shepherd.js";
|
|
11918
11930
|
import "shepherd.js/dist/css/shepherd.css";
|
|
@@ -11983,8 +11995,8 @@ function OnboardingProvider({
|
|
|
11983
11995
|
const [activeTourId, setActiveTourId] = useState35(null);
|
|
11984
11996
|
const [currentStepIndex, setCurrentStepIndex] = useState35(0);
|
|
11985
11997
|
const [totalSteps, setTotalSteps] = useState35(0);
|
|
11986
|
-
const tourRef =
|
|
11987
|
-
const rootsRef =
|
|
11998
|
+
const tourRef = useRef20(null);
|
|
11999
|
+
const rootsRef = useRef20(/* @__PURE__ */ new Map());
|
|
11988
12000
|
const cleanupRoots = useCallback21(() => {
|
|
11989
12001
|
rootsRef.current.forEach((root) => {
|
|
11990
12002
|
try {
|
|
@@ -12918,7 +12930,7 @@ __name(useHeaderLeftContent, "useHeaderLeftContent");
|
|
|
12918
12930
|
// src/components/EditableAvatar.tsx
|
|
12919
12931
|
import { PencilIcon as PencilIcon3, Trash2Icon as Trash2Icon3 } from "lucide-react";
|
|
12920
12932
|
import { useTranslations as useTranslations47 } from "next-intl";
|
|
12921
|
-
import { useCallback as useCallback25, useRef as
|
|
12933
|
+
import { useCallback as useCallback25, useRef as useRef21, useState as useState41 } from "react";
|
|
12922
12934
|
import { jsx as jsx136, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
12923
12935
|
function EditableAvatar({
|
|
12924
12936
|
entityId,
|
|
@@ -12932,7 +12944,7 @@ function EditableAvatar({
|
|
|
12932
12944
|
}) {
|
|
12933
12945
|
const { company } = useCurrentUserContext();
|
|
12934
12946
|
const t = useTranslations47();
|
|
12935
|
-
const fileInputRef =
|
|
12947
|
+
const fileInputRef = useRef21(null);
|
|
12936
12948
|
const [optimisticImage, setOptimisticImage] = useState41(null);
|
|
12937
12949
|
const [isUploading, setIsUploading] = useState41(false);
|
|
12938
12950
|
const displayImage = optimisticImage ?? image;
|
|
@@ -13280,7 +13292,7 @@ __name(PageContainer, "PageContainer");
|
|
|
13280
13292
|
// src/components/containers/ReactMarkdownContainer.tsx
|
|
13281
13293
|
import { ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
|
|
13282
13294
|
import { useTranslations as useTranslations50 } from "next-intl";
|
|
13283
|
-
import { useEffect as useEffect37, useRef as
|
|
13295
|
+
import { useEffect as useEffect37, useRef as useRef22, useState as useState45 } from "react";
|
|
13284
13296
|
import ReactMarkdown from "react-markdown";
|
|
13285
13297
|
import remarkGfm from "remark-gfm";
|
|
13286
13298
|
import { jsx as jsx145, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
@@ -13293,7 +13305,7 @@ function ReactMarkdownContainer({
|
|
|
13293
13305
|
const t = useTranslations50("ui.buttons");
|
|
13294
13306
|
const [isExpanded, setIsExpanded] = useState45(false);
|
|
13295
13307
|
const [showExpandButton, setShowExpandButton] = useState45(false);
|
|
13296
|
-
const contentRef =
|
|
13308
|
+
const contentRef = useRef22(null);
|
|
13297
13309
|
useEffect37(() => {
|
|
13298
13310
|
if (collapsible && contentRef.current && !isExpanded) {
|
|
13299
13311
|
const isOverflowing = contentRef.current.scrollHeight > contentRef.current.clientHeight;
|
|
@@ -13616,7 +13628,7 @@ function AllowedUsersDetails({ showTitle, content }) {
|
|
|
13616
13628
|
__name(AllowedUsersDetails, "AllowedUsersDetails");
|
|
13617
13629
|
|
|
13618
13630
|
// src/components/editors/BlockNoteEditorMentionHoverCard.tsx
|
|
13619
|
-
import { useCallback as useCallback27, useEffect as useEffect39, useRef as
|
|
13631
|
+
import { useCallback as useCallback27, useEffect as useEffect39, useRef as useRef23, useState as useState47 } from "react";
|
|
13620
13632
|
import { createPortal as createPortal3 } from "react-dom";
|
|
13621
13633
|
import { jsx as jsx150 } from "react/jsx-runtime";
|
|
13622
13634
|
function BlockNoteEditorMentionHoverCard({
|
|
@@ -13624,7 +13636,7 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
13624
13636
|
mentionResolveFn
|
|
13625
13637
|
}) {
|
|
13626
13638
|
const [hovered, setHovered] = useState47(null);
|
|
13627
|
-
const closeTimeoutRef =
|
|
13639
|
+
const closeTimeoutRef = useRef23(null);
|
|
13628
13640
|
const scheduleClose = useCallback27(() => {
|
|
13629
13641
|
closeTimeoutRef.current = setTimeout(() => setHovered(null), 200);
|
|
13630
13642
|
}, []);
|
|
@@ -13693,7 +13705,7 @@ __name(BlockNoteEditorMentionHoverCard, "BlockNoteEditorMentionHoverCard");
|
|
|
13693
13705
|
// src/components/editors/BlockNoteEditorMentionInlineContent.tsx
|
|
13694
13706
|
import { createReactInlineContentSpec } from "@blocknote/react";
|
|
13695
13707
|
import Link3 from "next/link";
|
|
13696
|
-
import
|
|
13708
|
+
import React21 from "react";
|
|
13697
13709
|
import { jsx as jsx151, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
13698
13710
|
var mentionDataAttrs = /* @__PURE__ */ __name((p) => ({
|
|
13699
13711
|
"data-mention-id": p.id,
|
|
@@ -13701,7 +13713,7 @@ var mentionDataAttrs = /* @__PURE__ */ __name((p) => ({
|
|
|
13701
13713
|
"data-mention-alias": p.alias
|
|
13702
13714
|
}), "mentionDataAttrs");
|
|
13703
13715
|
var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableMention) => {
|
|
13704
|
-
const Mention =
|
|
13716
|
+
const Mention = React21.memo(/* @__PURE__ */ __name(function Mention2(props) {
|
|
13705
13717
|
if (disableMention) {
|
|
13706
13718
|
const resolved2 = resolveFn?.(props.id, props.entityType, props.alias);
|
|
13707
13719
|
return /* @__PURE__ */ jsxs90(Link3, { href: resolved2?.url ?? "#", className: "text-primary", children: [
|
|
@@ -13747,7 +13759,7 @@ var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableM
|
|
|
13747
13759
|
// src/components/editors/BlockNoteEditorSuggestionMenuController.tsx
|
|
13748
13760
|
import { SuggestionMenuController } from "@blocknote/react";
|
|
13749
13761
|
import { autoUpdate, flip, shift } from "@floating-ui/react";
|
|
13750
|
-
import { useCallback as useCallback28, useRef as
|
|
13762
|
+
import { useCallback as useCallback28, useRef as useRef24 } from "react";
|
|
13751
13763
|
import { jsx as jsx152 } from "react/jsx-runtime";
|
|
13752
13764
|
var DEBOUNCE_MS = 300;
|
|
13753
13765
|
function BlockNoteEditorMentionSuggestionMenu({
|
|
@@ -13755,7 +13767,7 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
13755
13767
|
mentionSearchFn,
|
|
13756
13768
|
mentionSearchParams
|
|
13757
13769
|
}) {
|
|
13758
|
-
const lastQueryRef =
|
|
13770
|
+
const lastQueryRef = useRef24("");
|
|
13759
13771
|
const getItems = useCallback28(
|
|
13760
13772
|
async (query) => {
|
|
13761
13773
|
lastQueryRef.current = query;
|
|
@@ -13808,12 +13820,12 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
13808
13820
|
__name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMenu");
|
|
13809
13821
|
|
|
13810
13822
|
// src/components/pages/PageContainerContentDetails.tsx
|
|
13811
|
-
import { useEffect as useEffect40, useRef as
|
|
13823
|
+
import { useEffect as useEffect40, useRef as useRef25, useState as useState48 } from "react";
|
|
13812
13824
|
import { jsx as jsx153, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
13813
13825
|
function PageContainerContentDetails({ items, section, module, id }) {
|
|
13814
13826
|
const rewriteUrl = useUrlRewriter();
|
|
13815
13827
|
const [isScrolled, setIsScrolled] = useState48(false);
|
|
13816
|
-
const sentinelRef =
|
|
13828
|
+
const sentinelRef = useRef25(null);
|
|
13817
13829
|
useEffect40(() => {
|
|
13818
13830
|
const sentinel = sentinelRef.current;
|
|
13819
13831
|
if (!sentinel) return;
|
|
@@ -14020,13 +14032,13 @@ function JsonApiProvider({ config, children }) {
|
|
|
14020
14032
|
__name(JsonApiProvider, "JsonApiProvider");
|
|
14021
14033
|
|
|
14022
14034
|
// src/client/hooks/useJsonApiGet.ts
|
|
14023
|
-
import { useState as useState50, useEffect as useEffect43, useCallback as useCallback29, useRef as
|
|
14035
|
+
import { useState as useState50, useEffect as useEffect43, useCallback as useCallback29, useRef as useRef26 } from "react";
|
|
14024
14036
|
function useJsonApiGet(params) {
|
|
14025
14037
|
const [data, setData] = useState50(null);
|
|
14026
14038
|
const [loading, setLoading] = useState50(false);
|
|
14027
14039
|
const [error, setError] = useState50(null);
|
|
14028
14040
|
const [response, setResponse] = useState50(null);
|
|
14029
|
-
const isMounted =
|
|
14041
|
+
const isMounted = useRef26(true);
|
|
14030
14042
|
const fetchData = useCallback29(async () => {
|
|
14031
14043
|
if (params.options?.enabled === false) return;
|
|
14032
14044
|
setLoading(true);
|
|
@@ -14828,12 +14840,12 @@ import { memo, useMemo as useMemo25, useState as useState55 } from "react";
|
|
|
14828
14840
|
// src/components/tables/ContentTableSearch.tsx
|
|
14829
14841
|
import { RefreshCw, Search, X as X3 } from "lucide-react";
|
|
14830
14842
|
import { useTranslations as useTranslations55 } from "next-intl";
|
|
14831
|
-
import { useCallback as useCallback34, useEffect as useEffect47, useRef as
|
|
14843
|
+
import { useCallback as useCallback34, useEffect as useEffect47, useRef as useRef27, useState as useState54 } from "react";
|
|
14832
14844
|
import { jsx as jsx164, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
14833
14845
|
function ContentTableSearch({ data }) {
|
|
14834
14846
|
const t = useTranslations55();
|
|
14835
|
-
const searchTermRef =
|
|
14836
|
-
const inputRef =
|
|
14847
|
+
const searchTermRef = useRef27("");
|
|
14848
|
+
const inputRef = useRef27(null);
|
|
14837
14849
|
const [searchTerm, setSearchTerm] = useState54("");
|
|
14838
14850
|
const [isFocused, setIsFocused] = useState54(false);
|
|
14839
14851
|
const [isSearching, setIsSearching] = useState54(false);
|
|
@@ -15033,12 +15045,12 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
15033
15045
|
}, "ContentListTable"));
|
|
15034
15046
|
|
|
15035
15047
|
// src/components/grids/ContentListGrid.tsx
|
|
15036
|
-
import { useEffect as useEffect48, useRef as
|
|
15048
|
+
import { useEffect as useEffect48, useRef as useRef28 } from "react";
|
|
15037
15049
|
import { Fragment as Fragment27, jsx as jsx166, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
15038
15050
|
var DEFAULT_GRID_CLASSES = "grid grid-cols-2 gap-4 p-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5";
|
|
15039
15051
|
function ContentListGrid(props) {
|
|
15040
15052
|
const { data, ItemComponent, allowSearch, fullWidth, gridClassName } = props;
|
|
15041
|
-
const sentinelRef =
|
|
15053
|
+
const sentinelRef = useRef28(null);
|
|
15042
15054
|
useEffect48(() => {
|
|
15043
15055
|
if (!data.next || !sentinelRef.current) return;
|
|
15044
15056
|
const observer = new IntersectionObserver(
|
|
@@ -15133,14 +15145,14 @@ __name(validateItalianTaxCode, "validateItalianTaxCode");
|
|
|
15133
15145
|
|
|
15134
15146
|
// src/components/fiscal/ItalianFiscalData.tsx
|
|
15135
15147
|
import { useTranslations as useTranslations56 } from "next-intl";
|
|
15136
|
-
import { forwardRef as forwardRef8, useCallback as useCallback35, useImperativeHandle as useImperativeHandle2, useRef as
|
|
15148
|
+
import { forwardRef as forwardRef8, useCallback as useCallback35, useImperativeHandle as useImperativeHandle2, useRef as useRef29, useState as useState56 } from "react";
|
|
15137
15149
|
import { z as z4 } from "zod";
|
|
15138
15150
|
import { jsx as jsx167, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
15139
15151
|
var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
|
|
15140
15152
|
const t = useTranslations56();
|
|
15141
|
-
const initialRef =
|
|
15153
|
+
const initialRef = useRef29(initialData);
|
|
15142
15154
|
const [fiscalData, setFiscalData] = useState56(initialData);
|
|
15143
|
-
const fiscalDataRef =
|
|
15155
|
+
const fiscalDataRef = useRef29(initialData);
|
|
15144
15156
|
const [fiscalErrors, setFiscalErrors] = useState56({});
|
|
15145
15157
|
const updateFiscalField = useCallback35((key, value) => {
|
|
15146
15158
|
setFiscalData((prev) => {
|
|
@@ -15777,11 +15789,11 @@ import { useTranslations as useTranslations60 } from "next-intl";
|
|
|
15777
15789
|
import { useState as useState61 } from "react";
|
|
15778
15790
|
|
|
15779
15791
|
// src/features/auth/components/two-factor/TotpInput.tsx
|
|
15780
|
-
import { useEffect as useEffect50, useRef as
|
|
15792
|
+
import { useEffect as useEffect50, useRef as useRef30, useState as useState60 } from "react";
|
|
15781
15793
|
import { jsx as jsx173, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
15782
15794
|
function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
15783
15795
|
const [digits, setDigits] = useState60(["", "", "", "", "", ""]);
|
|
15784
|
-
const inputRefs =
|
|
15796
|
+
const inputRefs = useRef30([]);
|
|
15785
15797
|
useEffect50(() => {
|
|
15786
15798
|
if (autoFocus && inputRefs.current[0]) {
|
|
15787
15799
|
inputRefs.current[0].focus();
|
|
@@ -17270,7 +17282,7 @@ __name(RelevantContentsList, "RelevantContentsList");
|
|
|
17270
17282
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
17271
17283
|
import { ArrowRight, LifeBuoyIcon } from "lucide-react";
|
|
17272
17284
|
import { useTranslations as useTranslations78 } from "next-intl";
|
|
17273
|
-
import { useCallback as useCallback37, useEffect as useEffect59, useMemo as useMemo28, useRef as
|
|
17285
|
+
import { useCallback as useCallback37, useEffect as useEffect59, useMemo as useMemo28, useRef as useRef31, useState as useState75 } from "react";
|
|
17274
17286
|
|
|
17275
17287
|
// src/features/how-to/components/containers/HowToCommandViewer.tsx
|
|
17276
17288
|
import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
|
|
@@ -17398,7 +17410,7 @@ function HowToCommand({ pathname, extraGroups, onStartChat }) {
|
|
|
17398
17410
|
const t = useTranslations78();
|
|
17399
17411
|
const [dialogOpen, setDialogOpen] = useState75(false);
|
|
17400
17412
|
const [selectedHowTo, setSelectedHowTo] = useState75(null);
|
|
17401
|
-
const searchTermRef =
|
|
17413
|
+
const searchTermRef = useRef31("");
|
|
17402
17414
|
const [searchTerm, setSearchTerm] = useState75("");
|
|
17403
17415
|
const data = useDataListRetriever({
|
|
17404
17416
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
@@ -17740,7 +17752,7 @@ __name(HowToMultiSelector, "HowToMultiSelector");
|
|
|
17740
17752
|
// src/features/how-to/components/forms/HowToSelector.tsx
|
|
17741
17753
|
import { CircleX as CircleX2, RefreshCwIcon as RefreshCwIcon3, SearchIcon as SearchIcon6, XIcon as XIcon10 } from "lucide-react";
|
|
17742
17754
|
import { useTranslations as useTranslations83 } from "next-intl";
|
|
17743
|
-
import { useCallback as useCallback38, useEffect as useEffect60, useRef as
|
|
17755
|
+
import { useCallback as useCallback38, useEffect as useEffect60, useRef as useRef32, useState as useState76 } from "react";
|
|
17744
17756
|
import { Fragment as Fragment42, jsx as jsx203, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
17745
17757
|
function HowToSelector({
|
|
17746
17758
|
id,
|
|
@@ -17752,7 +17764,7 @@ function HowToSelector({
|
|
|
17752
17764
|
}) {
|
|
17753
17765
|
const t = useTranslations83();
|
|
17754
17766
|
const [open, setOpen] = useState76(false);
|
|
17755
|
-
const searchTermRef =
|
|
17767
|
+
const searchTermRef = useRef32("");
|
|
17756
17768
|
const [searchTerm, setSearchTerm] = useState76("");
|
|
17757
17769
|
const [isSearching, setIsSearching] = useState76(false);
|
|
17758
17770
|
const data = useDataListRetriever({
|
|
@@ -18046,7 +18058,7 @@ function AssistantThreadHeader({ assistant, onRename, onDelete }) {
|
|
|
18046
18058
|
__name(AssistantThreadHeader, "AssistantThreadHeader");
|
|
18047
18059
|
|
|
18048
18060
|
// src/features/assistant/components/parts/AssistantThread.tsx
|
|
18049
|
-
import { useEffect as useEffect62, useRef as
|
|
18061
|
+
import { useEffect as useEffect62, useRef as useRef33 } from "react";
|
|
18050
18062
|
|
|
18051
18063
|
// src/features/assistant-message/components/MessageItem.tsx
|
|
18052
18064
|
import { useTranslations as useTranslations93 } from "next-intl";
|
|
@@ -18600,7 +18612,7 @@ __name(AssistantStatusLine, "AssistantStatusLine");
|
|
|
18600
18612
|
// src/features/assistant/components/parts/AssistantThread.tsx
|
|
18601
18613
|
import { jsx as jsx219, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
18602
18614
|
function AssistantThread({ messages, sending, status, onSelectFollowUp, failedMessageIds, onRetry }) {
|
|
18603
|
-
const endRef =
|
|
18615
|
+
const endRef = useRef33(null);
|
|
18604
18616
|
useEffect62(() => {
|
|
18605
18617
|
endRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
18606
18618
|
}, [messages.length, sending]);
|
|
@@ -18794,10 +18806,10 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
18794
18806
|
// src/features/notification/components/modals/NotificationModal.tsx
|
|
18795
18807
|
import { BellIcon } from "lucide-react";
|
|
18796
18808
|
import { useTranslations as useTranslations97 } from "next-intl";
|
|
18797
|
-
import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect63, useMemo as useMemo32, useRef as
|
|
18809
|
+
import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect63, useMemo as useMemo32, useRef as useRef34, useState as useState83 } from "react";
|
|
18798
18810
|
import { jsx as jsx224, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
18799
18811
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
18800
|
-
const _instanceId =
|
|
18812
|
+
const _instanceId = useRef34(Math.random().toString(36).substr(2, 9));
|
|
18801
18813
|
const {
|
|
18802
18814
|
notifications,
|
|
18803
18815
|
addNotification,
|
|
@@ -18818,8 +18830,8 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
18818
18830
|
const t = useTranslations97();
|
|
18819
18831
|
const generateUrl = usePageUrlGenerator();
|
|
18820
18832
|
const [newNotifications, setNewNotifications] = useState83(false);
|
|
18821
|
-
const preventAutoClose =
|
|
18822
|
-
const circuitBreakerRef =
|
|
18833
|
+
const preventAutoClose = useRef34(false);
|
|
18834
|
+
const circuitBreakerRef = useRef34({
|
|
18823
18835
|
count: 0,
|
|
18824
18836
|
resetTime: 0,
|
|
18825
18837
|
isOpen: false
|
|
@@ -18852,7 +18864,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
18852
18864
|
useEffect63(() => {
|
|
18853
18865
|
if (lastLoaded === 0) loadNotifications();
|
|
18854
18866
|
}, [lastLoaded, loadNotifications]);
|
|
18855
|
-
const processSocketNotificationsRef =
|
|
18867
|
+
const processSocketNotificationsRef = useRef34(null);
|
|
18856
18868
|
const processSocketNotifications = useCallback39(() => {
|
|
18857
18869
|
if (socketNotifications.length === 0) {
|
|
18858
18870
|
return;
|
|
@@ -19013,7 +19025,7 @@ __name(ReferralCodeCapture, "ReferralCodeCapture");
|
|
|
19013
19025
|
|
|
19014
19026
|
// src/features/referral/components/ReferralWidget.tsx
|
|
19015
19027
|
import { Copy as Copy2, Loader2 as Loader25, Mail, Users } from "lucide-react";
|
|
19016
|
-
import { useCallback as useCallback40, useRef as
|
|
19028
|
+
import { useCallback as useCallback40, useRef as useRef35, useState as useState86 } from "react";
|
|
19017
19029
|
|
|
19018
19030
|
// src/features/referral/hooks/useReferralInvite.ts
|
|
19019
19031
|
import { useState as useState84 } from "react";
|
|
@@ -19119,7 +19131,7 @@ function ReferralWidget({
|
|
|
19119
19131
|
const { sendInvite, sending } = useReferralInvite();
|
|
19120
19132
|
const [email, setEmail] = useState86("");
|
|
19121
19133
|
const [copied, setCopied] = useState86(false);
|
|
19122
|
-
const linkInputRef =
|
|
19134
|
+
const linkInputRef = useRef35(null);
|
|
19123
19135
|
const config = getReferralConfig();
|
|
19124
19136
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
19125
19137
|
const referralUrl = stats?.referralCode ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
|
|
@@ -19407,11 +19419,11 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
19407
19419
|
// src/features/role/components/forms/UserRoleAdd.tsx
|
|
19408
19420
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
19409
19421
|
import { useTranslations as useTranslations101 } from "next-intl";
|
|
19410
|
-
import { useCallback as useCallback41, useEffect as useEffect67, useRef as
|
|
19422
|
+
import { useCallback as useCallback41, useEffect as useEffect67, useRef as useRef36, useState as useState88 } from "react";
|
|
19411
19423
|
import { Fragment as Fragment51, jsx as jsx232, jsxs as jsxs144 } from "react/jsx-runtime";
|
|
19412
19424
|
function UserRoleAdd({ user, refresh }) {
|
|
19413
19425
|
const [open, setOpen] = useState88(false);
|
|
19414
|
-
const inputRef =
|
|
19426
|
+
const inputRef = useRef36(null);
|
|
19415
19427
|
const [searchTerm, setSearchTerm] = useState88("");
|
|
19416
19428
|
const [roles, setRoles] = useState88([]);
|
|
19417
19429
|
const t = useTranslations101();
|
|
@@ -20831,7 +20843,7 @@ __name(WaitlistList, "WaitlistList");
|
|
|
20831
20843
|
// src/features/rbac/components/RbacContainer.tsx
|
|
20832
20844
|
import { Loader2Icon as Loader2Icon3 } from "lucide-react";
|
|
20833
20845
|
import { useTranslations as useTranslations110 } from "next-intl";
|
|
20834
|
-
import { memo as memo2, useCallback as useCallback49, useEffect as useEffect71, useMemo as useMemo33, useRef as
|
|
20846
|
+
import { memo as memo2, useCallback as useCallback49, useEffect as useEffect71, useMemo as useMemo33, useRef as useRef37, useState as useState96 } from "react";
|
|
20835
20847
|
|
|
20836
20848
|
// src/features/rbac/components/RbacPermissionCell.tsx
|
|
20837
20849
|
import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon11 } from "lucide-react";
|
|
@@ -21100,7 +21112,7 @@ var CellButton = memo2(/* @__PURE__ */ __name(function CellButton2({
|
|
|
21100
21112
|
isRoleColumn,
|
|
21101
21113
|
onOpen
|
|
21102
21114
|
}) {
|
|
21103
|
-
const ref =
|
|
21115
|
+
const ref = useRef37(null);
|
|
21104
21116
|
const value = cellValue(tokens, action);
|
|
21105
21117
|
const handleClick = useCallback49(() => {
|
|
21106
21118
|
if (!ref.current) return;
|
|
@@ -21286,7 +21298,7 @@ __name(RbacContainer, "RbacContainer");
|
|
|
21286
21298
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
21287
21299
|
import { Loader2Icon as Loader2Icon4 } from "lucide-react";
|
|
21288
21300
|
import { useTranslations as useTranslations111 } from "next-intl";
|
|
21289
|
-
import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect72, useMemo as useMemo34, useRef as
|
|
21301
|
+
import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect72, useMemo as useMemo34, useRef as useRef38, useState as useState97 } from "react";
|
|
21290
21302
|
import { jsx as jsx256, jsxs as jsxs166 } from "react/jsx-runtime";
|
|
21291
21303
|
function findToken2(tokens, action) {
|
|
21292
21304
|
if (!tokens) return void 0;
|
|
@@ -21307,7 +21319,7 @@ var CellButton3 = memo3(/* @__PURE__ */ __name(function CellButton4({
|
|
|
21307
21319
|
isRoleColumn,
|
|
21308
21320
|
onOpen
|
|
21309
21321
|
}) {
|
|
21310
|
-
const ref =
|
|
21322
|
+
const ref = useRef38(null);
|
|
21311
21323
|
const value = cellValue2(tokens, action);
|
|
21312
21324
|
const handleClick = useCallback50(() => {
|
|
21313
21325
|
if (!ref.current) return;
|
|
@@ -21972,4 +21984,4 @@ export {
|
|
|
21972
21984
|
useOAuthClients,
|
|
21973
21985
|
useOAuthClient
|
|
21974
21986
|
};
|
|
21975
|
-
//# sourceMappingURL=chunk-
|
|
21987
|
+
//# sourceMappingURL=chunk-TGZDQSDU.mjs.map
|