@carlonicora/nextjs-jsonapi 6.29.0 → 6.29.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-KGCHQQVY.js → BlockNoteEditor-K4HWQLPJ.js} +15 -15
- package/dist/{BlockNoteEditor-KGCHQQVY.js.map → BlockNoteEditor-K4HWQLPJ.js.map} +1 -1
- package/dist/{BlockNoteEditor-BHCNJ2JA.mjs → BlockNoteEditor-TDX2RC7I.mjs} +2 -2
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-UQFDOZVF.mjs → chunk-OVSR72CZ.mjs} +378 -377
- package/dist/chunk-OVSR72CZ.mjs.map +1 -0
- package/dist/{chunk-WXTEAATG.js → chunk-QI4SCGPB.js} +4 -3
- package/dist/chunk-QI4SCGPB.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/forms/EditorSheet.d.ts.map +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/email-automations/index.js +78 -78
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +107 -107
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/blog/index.js +93 -93
- package/dist/features/blog/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +102 -102
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/forms/EditorSheet.tsx +7 -2
- package/src/components/forms/__tests__/EditorSheet.spec.tsx +36 -0
- package/dist/chunk-UQFDOZVF.mjs.map +0 -1
- package/dist/chunk-WXTEAATG.js.map +0 -1
- /package/dist/{BlockNoteEditor-BHCNJ2JA.mjs.map → BlockNoteEditor-TDX2RC7I.mjs.map} +0 -0
|
@@ -6767,7 +6767,7 @@ __name(useHeaderLogo, "useHeaderLogo");
|
|
|
6767
6767
|
|
|
6768
6768
|
// src/components/navigations/Breadcrumb.tsx
|
|
6769
6769
|
import { useTranslations as useTranslations57 } from "next-intl";
|
|
6770
|
-
import { Fragment as Fragment23, useState as
|
|
6770
|
+
import { Fragment as Fragment23, useState as useState50 } from "react";
|
|
6771
6771
|
import { ChevronDownIcon as ChevronDownIcon8 } from "lucide-react";
|
|
6772
6772
|
|
|
6773
6773
|
// src/hooks/TableGeneratorRegistry.ts
|
|
@@ -7926,7 +7926,7 @@ var useAdministrationContext = /* @__PURE__ */ __name(() => {
|
|
|
7926
7926
|
|
|
7927
7927
|
// src/features/company/contexts/CompanyContext.tsx
|
|
7928
7928
|
import { useTranslations as useTranslations47 } from "next-intl";
|
|
7929
|
-
import { Fragment as Fragment21, createContext as createContext17, useContext as useContext18, useState as
|
|
7929
|
+
import { Fragment as Fragment21, createContext as createContext17, useContext as useContext18, useState as useState39 } from "react";
|
|
7930
7930
|
|
|
7931
7931
|
// src/features/user/contexts/CurrentUserContext.tsx
|
|
7932
7932
|
import { getCookie } from "cookies-next";
|
|
@@ -8187,7 +8187,7 @@ __name(useCurrentUserContextOptional, "useCurrentUserContextOptional");
|
|
|
8187
8187
|
|
|
8188
8188
|
// src/features/user/contexts/UserContext.tsx
|
|
8189
8189
|
import { useTranslations as useTranslations28 } from "next-intl";
|
|
8190
|
-
import { createContext as createContext16, useContext as useContext17, useState as
|
|
8190
|
+
import { createContext as createContext16, useContext as useContext17, useState as useState36 } from "react";
|
|
8191
8191
|
|
|
8192
8192
|
// src/features/account-deletion/components/AccountDeletionAdminTrigger.tsx
|
|
8193
8193
|
import { LoaderCircleIcon, UserXIcon } from "lucide-react";
|
|
@@ -9213,7 +9213,7 @@ __name(UserResentInvitationEmail, "UserResentInvitationEmail");
|
|
|
9213
9213
|
// src/features/user/components/forms/UserSelector.tsx
|
|
9214
9214
|
import { CircleX as CircleX2, RefreshCwIcon as RefreshCwIcon3, SearchIcon as SearchIcon5, XIcon as XIcon9 } from "lucide-react";
|
|
9215
9215
|
import { useTranslations as useTranslations27 } from "next-intl";
|
|
9216
|
-
import { useCallback as useCallback21, useEffect as useEffect26, useRef as useRef21, useState as
|
|
9216
|
+
import { useCallback as useCallback21, useEffect as useEffect26, useRef as useRef21, useState as useState35 } from "react";
|
|
9217
9217
|
|
|
9218
9218
|
// src/components/typography/SectionHeader.tsx
|
|
9219
9219
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
@@ -10009,7 +10009,7 @@ __name(DateRangeSelector, "DateRangeSelector");
|
|
|
10009
10009
|
|
|
10010
10010
|
// src/components/forms/EditorSheet.tsx
|
|
10011
10011
|
import { useTranslations as useTranslations19 } from "next-intl";
|
|
10012
|
-
import { isValidElement as isValidElement2, useCallback as useCallback17, useEffect as useEffect19, useRef as useRef15 } from "react";
|
|
10012
|
+
import { isValidElement as isValidElement2, useCallback as useCallback17, useEffect as useEffect19, useRef as useRef15, useState as useState25 } from "react";
|
|
10013
10013
|
import { PencilIcon as PencilIcon3 } from "lucide-react";
|
|
10014
10014
|
|
|
10015
10015
|
// src/components/forms/useEditorDialog.ts
|
|
@@ -10194,7 +10194,8 @@ function EditorSheet({
|
|
|
10194
10194
|
{ dialogOpen, onDialogOpenChange, forceShow }
|
|
10195
10195
|
);
|
|
10196
10196
|
const hasBeenOpen = useRef15(false);
|
|
10197
|
-
const
|
|
10197
|
+
const [mountFingerprint] = useState25(() => isEdit ? JSON.stringify(onReset()) : void 0);
|
|
10198
|
+
const seeded = useRef15(mountFingerprint);
|
|
10198
10199
|
useEffect19(() => {
|
|
10199
10200
|
if (open) {
|
|
10200
10201
|
hasBeenOpen.current = true;
|
|
@@ -10349,7 +10350,7 @@ function EditorSheet({
|
|
|
10349
10350
|
__name(EditorSheet, "EditorSheet");
|
|
10350
10351
|
|
|
10351
10352
|
// src/components/forms/EntitySelector.tsx
|
|
10352
|
-
import { useCallback as useCallback18, useEffect as useEffect20, useRef as useRef16, useState as
|
|
10353
|
+
import { useCallback as useCallback18, useEffect as useEffect20, useRef as useRef16, useState as useState26 } from "react";
|
|
10353
10354
|
import { CircleX, Plus, RefreshCwIcon, SearchIcon as SearchIcon3, XIcon as XIcon6 } from "lucide-react";
|
|
10354
10355
|
import { useTranslations as useTranslations20 } from "next-intl";
|
|
10355
10356
|
import { jsx as jsx89, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
@@ -10380,12 +10381,12 @@ function EntitySelector({
|
|
|
10380
10381
|
}) {
|
|
10381
10382
|
const t = useTranslations20();
|
|
10382
10383
|
const placeholder = placeholderProp ?? t("ui.search.placeholder_global");
|
|
10383
|
-
const [open, setOpen] =
|
|
10384
|
+
const [open, setOpen] = useState26(false);
|
|
10384
10385
|
const searchTermRef = useRef16("");
|
|
10385
|
-
const [searchTerm, setSearchTerm] =
|
|
10386
|
-
const [isSearching, setIsSearching] =
|
|
10387
|
-
const [isCreating, setIsCreating] =
|
|
10388
|
-
const [selectedEntity, setSelectedEntity] =
|
|
10386
|
+
const [searchTerm, setSearchTerm] = useState26("");
|
|
10387
|
+
const [isSearching, setIsSearching] = useState26(false);
|
|
10388
|
+
const [isCreating, setIsCreating] = useState26(false);
|
|
10389
|
+
const [selectedEntity, setSelectedEntity] = useState26(void 0);
|
|
10389
10390
|
const watchedValue = shouldUseFormWatch ? form.watch(id) : void 0;
|
|
10390
10391
|
const data = useDataListRetriever({
|
|
10391
10392
|
retriever: /* @__PURE__ */ __name((params) => retriever(params), "retriever"),
|
|
@@ -10549,7 +10550,7 @@ import {
|
|
|
10549
10550
|
useEffect as useEffect21,
|
|
10550
10551
|
useMemo as useMemo13,
|
|
10551
10552
|
useRef as useRef17,
|
|
10552
|
-
useState as
|
|
10553
|
+
useState as useState27
|
|
10553
10554
|
} from "react";
|
|
10554
10555
|
import {
|
|
10555
10556
|
ErrorCode,
|
|
@@ -10577,9 +10578,9 @@ var FileUploader = forwardRef6(
|
|
|
10577
10578
|
onFilesRejected,
|
|
10578
10579
|
...props
|
|
10579
10580
|
}, ref) => {
|
|
10580
|
-
const [isFileTooBig, setIsFileTooBig] =
|
|
10581
|
-
const [isLOF, setIsLOF] =
|
|
10582
|
-
const [activeIndex, setActiveIndex] =
|
|
10581
|
+
const [isFileTooBig, setIsFileTooBig] = useState27(false);
|
|
10582
|
+
const [isLOF, setIsLOF] = useState27(false);
|
|
10583
|
+
const [activeIndex, setActiveIndex] = useState27(-1);
|
|
10583
10584
|
const { maxFiles = 1, maxSize = 4 * 1024 * 1024, multiple = true } = dropzoneOptions;
|
|
10584
10585
|
const t = useTranslations21();
|
|
10585
10586
|
const reSelectAll = maxFiles === 1 ? true : reSelect;
|
|
@@ -10876,7 +10877,7 @@ import { useRef as useRef18 } from "react";
|
|
|
10876
10877
|
import dynamic from "next/dynamic";
|
|
10877
10878
|
import React18 from "react";
|
|
10878
10879
|
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
10879
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10880
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-TDX2RC7I.mjs"), {
|
|
10880
10881
|
ssr: false
|
|
10881
10882
|
});
|
|
10882
10883
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -11019,7 +11020,7 @@ __name(FormCheckbox, "FormCheckbox");
|
|
|
11019
11020
|
// src/components/forms/FormDate.tsx
|
|
11020
11021
|
import { isValid as isValid2, parse as parse2 } from "date-fns";
|
|
11021
11022
|
import { Calendar as CalendarIcon3, CircleXIcon as CircleXIcon2 } from "lucide-react";
|
|
11022
|
-
import { useMemo as useMemo14, useState as
|
|
11023
|
+
import { useMemo as useMemo14, useState as useState28 } from "react";
|
|
11023
11024
|
import { jsx as jsx94, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
11024
11025
|
function FormDate({
|
|
11025
11026
|
form,
|
|
@@ -11037,8 +11038,8 @@ function FormDate({
|
|
|
11037
11038
|
const { locale } = useDateLocale();
|
|
11038
11039
|
const dateFnsLocale = useI18nDateFnsLocale();
|
|
11039
11040
|
const weekStartsOn = dateFnsLocale?.options?.weekStartsOn ?? 1;
|
|
11040
|
-
const [open, setOpen] =
|
|
11041
|
-
const [displayMonth, setDisplayMonth] =
|
|
11041
|
+
const [open, setOpen] = useState28(false);
|
|
11042
|
+
const [displayMonth, setDisplayMonth] = useState28(() => {
|
|
11042
11043
|
const currentValue = form.getValues(id);
|
|
11043
11044
|
return currentValue || defaultMonth || /* @__PURE__ */ new Date();
|
|
11044
11045
|
});
|
|
@@ -11065,7 +11066,7 @@ function FormDate({
|
|
|
11065
11066
|
return part.value;
|
|
11066
11067
|
}).join("");
|
|
11067
11068
|
}, [dateFormatter]);
|
|
11068
|
-
const [inputValue, setInputValue] =
|
|
11069
|
+
const [inputValue, setInputValue] = useState28(() => {
|
|
11069
11070
|
const currentValue = form.getValues(id);
|
|
11070
11071
|
return currentValue ? formatDate3(currentValue) : "";
|
|
11071
11072
|
});
|
|
@@ -11161,7 +11162,7 @@ __name(FormDate, "FormDate");
|
|
|
11161
11162
|
|
|
11162
11163
|
// src/components/forms/FormDateTime.tsx
|
|
11163
11164
|
import { Calendar as CalendarIcon4, CircleXIcon as CircleXIcon3 } from "lucide-react";
|
|
11164
|
-
import { useMemo as useMemo15, useState as
|
|
11165
|
+
import { useMemo as useMemo15, useState as useState29 } from "react";
|
|
11165
11166
|
|
|
11166
11167
|
// src/components/forms/time-cycle.ts
|
|
11167
11168
|
function to24Hour(hour12, period) {
|
|
@@ -11210,20 +11211,20 @@ function FormDateTime({
|
|
|
11210
11211
|
reference,
|
|
11211
11212
|
markedDate
|
|
11212
11213
|
}) {
|
|
11213
|
-
const [open, setOpen] =
|
|
11214
|
+
const [open, setOpen] = useState29(false);
|
|
11214
11215
|
const t = useI18nTranslations();
|
|
11215
11216
|
const { format, locale, twelveHourClock } = useDateFormatter();
|
|
11216
11217
|
const dateFnsLocale = useI18nDateFnsLocale();
|
|
11217
11218
|
const weekStartsOn = dateFnsLocale?.options?.weekStartsOn ?? 1;
|
|
11218
|
-
const [displayMonth, setDisplayMonth] =
|
|
11219
|
+
const [displayMonth, setDisplayMonth] = useState29(() => {
|
|
11219
11220
|
const currentValue = form.getValues(id);
|
|
11220
11221
|
return currentValue || defaultMonth || reference?.date || /* @__PURE__ */ new Date();
|
|
11221
11222
|
});
|
|
11222
11223
|
const formatDateTime = /* @__PURE__ */ __name((date) => format(date, "dateTimeLong"), "formatDateTime");
|
|
11223
11224
|
const periodLabels = useMemo15(() => dayPeriodLabels(locale), [locale]);
|
|
11224
11225
|
const initialTime = reference ? snapToFiveMinutes(reference.date) : /* @__PURE__ */ new Date();
|
|
11225
|
-
const [selectedHours, setSelectedHours] =
|
|
11226
|
-
const [selectedMinutes, setSelectedMinutes] =
|
|
11226
|
+
const [selectedHours, setSelectedHours] = useState29(initialTime.getHours());
|
|
11227
|
+
const [selectedMinutes, setSelectedMinutes] = useState29(roundToNearestFiveMinutes(initialTime.getMinutes()));
|
|
11227
11228
|
const dayModifiers = {
|
|
11228
11229
|
...reference ? { reference: reference.date } : {},
|
|
11229
11230
|
...markedDate ? { marked: markedDate } : {}
|
|
@@ -11654,7 +11655,7 @@ function FormPassword({
|
|
|
11654
11655
|
__name(FormPassword, "FormPassword");
|
|
11655
11656
|
|
|
11656
11657
|
// src/components/forms/FormPlaceAutocomplete.tsx
|
|
11657
|
-
import { useEffect as useEffect22, useRef as useRef19, useState as
|
|
11658
|
+
import { useEffect as useEffect22, useRef as useRef19, useState as useState31 } from "react";
|
|
11658
11659
|
import { jsx as jsx100, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
11659
11660
|
function FormPlaceAutocomplete({
|
|
11660
11661
|
form,
|
|
@@ -11670,12 +11671,12 @@ function FormPlaceAutocomplete({
|
|
|
11670
11671
|
includeTypes,
|
|
11671
11672
|
languageCode = "en"
|
|
11672
11673
|
}) {
|
|
11673
|
-
const [inputValue, setInputValue] =
|
|
11674
|
-
const [suggestions, setSuggestions] =
|
|
11675
|
-
const [isLoading, setIsLoading] =
|
|
11676
|
-
const [showSuggestions, setShowSuggestions] =
|
|
11677
|
-
const [loadError, setLoadError] =
|
|
11678
|
-
const [apiKey, setApiKey] =
|
|
11674
|
+
const [inputValue, setInputValue] = useState31("");
|
|
11675
|
+
const [suggestions, setSuggestions] = useState31([]);
|
|
11676
|
+
const [isLoading, setIsLoading] = useState31(false);
|
|
11677
|
+
const [showSuggestions, setShowSuggestions] = useState31(false);
|
|
11678
|
+
const [loadError, setLoadError] = useState31(false);
|
|
11679
|
+
const [apiKey, setApiKey] = useState31(null);
|
|
11679
11680
|
const debounceRef = useRef19(null);
|
|
11680
11681
|
const containerRef = useRef19(null);
|
|
11681
11682
|
useEffect22(() => {
|
|
@@ -12042,7 +12043,7 @@ __name(GdprConsentCheckbox, "GdprConsentCheckbox");
|
|
|
12042
12043
|
import { FileIcon, FileImageIcon, FileSpreadsheetIcon, FileTextIcon, UploadIcon as UploadIcon2, XIcon as XIcon7 } from "lucide-react";
|
|
12043
12044
|
import { useTranslations as useTranslations24 } from "next-intl";
|
|
12044
12045
|
import Image3 from "next/image";
|
|
12045
|
-
import { useEffect as useEffect23, useState as
|
|
12046
|
+
import { useEffect as useEffect23, useState as useState32 } from "react";
|
|
12046
12047
|
import { jsx as jsx106, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
12047
12048
|
var dropzone = {
|
|
12048
12049
|
maxSize: 100 * 1024 * 1024,
|
|
@@ -12085,7 +12086,7 @@ function MultiFileUploader({ files, setFiles, multiple = false, className }) {
|
|
|
12085
12086
|
__name(MultiFileUploader, "MultiFileUploader");
|
|
12086
12087
|
var FilePreviewItem = /* @__PURE__ */ __name(({ file, onRemoveClick }) => {
|
|
12087
12088
|
const t = useTranslations24();
|
|
12088
|
-
const [objectUrl, setObjectUrl] =
|
|
12089
|
+
const [objectUrl, setObjectUrl] = useState32(null);
|
|
12089
12090
|
useEffect23(() => {
|
|
12090
12091
|
if (file.type.startsWith("image/")) {
|
|
12091
12092
|
const url = URL.createObjectURL(file);
|
|
@@ -12196,14 +12197,14 @@ __name(UserAvatarList, "UserAvatarList");
|
|
|
12196
12197
|
// src/features/user/components/widgets/UserSearchPopover.tsx
|
|
12197
12198
|
import { RefreshCwIcon as RefreshCwIcon2, SearchIcon as SearchIcon4, XIcon as XIcon8 } from "lucide-react";
|
|
12198
12199
|
import { useTranslations as useTranslations26 } from "next-intl";
|
|
12199
|
-
import { useEffect as useEffect25, useState as
|
|
12200
|
+
import { useEffect as useEffect25, useState as useState34 } from "react";
|
|
12200
12201
|
|
|
12201
12202
|
// src/features/user/hooks/useUserSearch.ts
|
|
12202
|
-
import { useCallback as useCallback20, useEffect as useEffect24, useRef as useRef20, useState as
|
|
12203
|
+
import { useCallback as useCallback20, useEffect as useEffect24, useRef as useRef20, useState as useState33 } from "react";
|
|
12203
12204
|
var useUserSearch = /* @__PURE__ */ __name(() => {
|
|
12204
|
-
const [users, setUsers] =
|
|
12205
|
-
const [searchQuery, setSearchQuery] =
|
|
12206
|
-
const [isLoading, setIsLoading] =
|
|
12205
|
+
const [users, setUsers] = useState33([]);
|
|
12206
|
+
const [searchQuery, setSearchQuery] = useState33("");
|
|
12207
|
+
const [isLoading, setIsLoading] = useState33(false);
|
|
12207
12208
|
const searchQueryRef = useRef20("");
|
|
12208
12209
|
const loadUsers = useCallback20(
|
|
12209
12210
|
async (search) => {
|
|
@@ -12360,7 +12361,7 @@ var useUserTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
12360
12361
|
import { jsx as jsx110, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
12361
12362
|
var UserSearchPopover = /* @__PURE__ */ __name(({ children, onSelect, align = "start", className }) => {
|
|
12362
12363
|
const t = useTranslations26();
|
|
12363
|
-
const [isOpen, setIsOpen] =
|
|
12364
|
+
const [isOpen, setIsOpen] = useState34(false);
|
|
12364
12365
|
const { users, searchQuery, setSearchQuery, isLoading, loadUsers, clearSearch } = useUserSearch();
|
|
12365
12366
|
useEffect25(() => {
|
|
12366
12367
|
if (isOpen && users.length === 0 && !searchQuery) {
|
|
@@ -12420,10 +12421,10 @@ var UserSearchPopover = /* @__PURE__ */ __name(({ children, onSelect, align = "s
|
|
|
12420
12421
|
import { Fragment as Fragment13, jsx as jsx111, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
12421
12422
|
function UserSelector({ id, form, label, placeholder, onChange, isRequired = false }) {
|
|
12422
12423
|
const t = useTranslations27();
|
|
12423
|
-
const [open, setOpen] =
|
|
12424
|
+
const [open, setOpen] = useState35(false);
|
|
12424
12425
|
const searchTermRef = useRef21("");
|
|
12425
|
-
const [searchTerm, setSearchTerm] =
|
|
12426
|
-
const [isSearching, setIsSearching] =
|
|
12426
|
+
const [searchTerm, setSearchTerm] = useState35("");
|
|
12427
|
+
const [isSearching, setIsSearching] = useState35(false);
|
|
12427
12428
|
const data = useDataListRetriever({
|
|
12428
12429
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
12429
12430
|
return UserService.findMany(params);
|
|
@@ -12529,7 +12530,7 @@ var UserProvider = /* @__PURE__ */ __name(({ children, dehydratedUser }) => {
|
|
|
12529
12530
|
const generateUrl = usePageUrlGenerator();
|
|
12530
12531
|
const { hasPermissionToModule, hasRole } = useCurrentUserContext();
|
|
12531
12532
|
const t = useTranslations28();
|
|
12532
|
-
const [user, setUser] =
|
|
12533
|
+
const [user, setUser] = useState36(
|
|
12533
12534
|
dehydratedUser ? rehydrate(Modules.User, dehydratedUser) : void 0
|
|
12534
12535
|
);
|
|
12535
12536
|
const breadcrumb = /* @__PURE__ */ __name(() => {
|
|
@@ -13313,7 +13314,7 @@ import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
|
|
|
13313
13314
|
import { UploadIcon as UploadIcon3 } from "lucide-react";
|
|
13314
13315
|
import { useTranslations as useTranslations43 } from "next-intl";
|
|
13315
13316
|
import Image6 from "next/image";
|
|
13316
|
-
import { useCallback as useCallback22, useEffect as useEffect28, useMemo as useMemo17, useRef as useRef22, useState as
|
|
13317
|
+
import { useCallback as useCallback22, useEffect as useEffect28, useMemo as useMemo17, useRef as useRef22, useState as useState37 } from "react";
|
|
13317
13318
|
import { useForm as useForm2 } from "react-hook-form";
|
|
13318
13319
|
import { v4 as v42 } from "uuid";
|
|
13319
13320
|
import { z as z2 } from "zod";
|
|
@@ -13330,10 +13331,10 @@ function CompanyEditorInternal({
|
|
|
13330
13331
|
}) {
|
|
13331
13332
|
const { hasRole, setUser } = useCurrentUserContext();
|
|
13332
13333
|
const router = useI18nRouter();
|
|
13333
|
-
const [features, setFeatures] =
|
|
13334
|
-
const [file, setFile] =
|
|
13335
|
-
const [files, setFiles] =
|
|
13336
|
-
const [contentType, setContentType] =
|
|
13334
|
+
const [features, setFeatures] = useState37([]);
|
|
13335
|
+
const [file, setFile] = useState37(null);
|
|
13336
|
+
const [files, setFiles] = useState37(null);
|
|
13337
|
+
const [contentType, setContentType] = useState37(null);
|
|
13337
13338
|
const t = useTranslations43();
|
|
13338
13339
|
const fiscalRef = useRef22(null);
|
|
13339
13340
|
const addressComponentsRef = useRef22({});
|
|
@@ -13626,15 +13627,15 @@ __name(CompanyConfigurationEditor, "CompanyConfigurationEditor");
|
|
|
13626
13627
|
// src/features/company/components/forms/CompanyDeleter.tsx
|
|
13627
13628
|
import { LoaderCircleIcon as LoaderCircleIcon3, Trash2Icon as Trash2Icon3 } from "lucide-react";
|
|
13628
13629
|
import { useTranslations as useTranslations46 } from "next-intl";
|
|
13629
|
-
import { useState as
|
|
13630
|
+
import { useState as useState38 } from "react";
|
|
13630
13631
|
import { Fragment as Fragment20, jsx as jsx142, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
13631
13632
|
function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 }) {
|
|
13632
13633
|
const t = useTranslations46();
|
|
13633
13634
|
const generateUrl = usePageUrlGenerator();
|
|
13634
|
-
const [open, setOpen] =
|
|
13635
|
-
const [finalWarningOpen, setFinalWarningOpen] =
|
|
13636
|
-
const [isDeleting, setIsDeleting] =
|
|
13637
|
-
const [companyName, setCompanyName] =
|
|
13635
|
+
const [open, setOpen] = useState38(false);
|
|
13636
|
+
const [finalWarningOpen, setFinalWarningOpen] = useState38(false);
|
|
13637
|
+
const [isDeleting, setIsDeleting] = useState38(false);
|
|
13638
|
+
const [companyName, setCompanyName] = useState38("");
|
|
13638
13639
|
const handleProceedToFinalWarning = /* @__PURE__ */ __name(() => {
|
|
13639
13640
|
setOpen(false);
|
|
13640
13641
|
setFinalWarningOpen(true);
|
|
@@ -13774,7 +13775,7 @@ var CompanyProvider = /* @__PURE__ */ __name(({ children, dehydratedCompany, con
|
|
|
13774
13775
|
const generateUrl = usePageUrlGenerator();
|
|
13775
13776
|
const t = useTranslations47();
|
|
13776
13777
|
const { hasPermissionToModule, hasRole } = useCurrentUserContext();
|
|
13777
|
-
const [company, setCompany] =
|
|
13778
|
+
const [company, setCompany] = useState39(
|
|
13778
13779
|
dehydratedCompany ? rehydrate(Modules.Company, dehydratedCompany) : void 0
|
|
13779
13780
|
);
|
|
13780
13781
|
const breadcrumb = /* @__PURE__ */ __name(() => {
|
|
@@ -13823,11 +13824,11 @@ var useCompanyContext = /* @__PURE__ */ __name(() => {
|
|
|
13823
13824
|
|
|
13824
13825
|
// src/features/notification/contexts/NotificationContext.tsx
|
|
13825
13826
|
import { useTranslations as useTranslations49 } from "next-intl";
|
|
13826
|
-
import { createContext as createContext18, useCallback as useCallback23, useContext as useContext19, useEffect as useEffect30, useRef as useRef23, useState as
|
|
13827
|
+
import { createContext as createContext18, useCallback as useCallback23, useContext as useContext19, useEffect as useEffect30, useRef as useRef23, useState as useState41 } from "react";
|
|
13827
13828
|
|
|
13828
13829
|
// src/features/notification/components/notifications/Notification.tsx
|
|
13829
13830
|
import { useTranslations as useTranslations48 } from "next-intl";
|
|
13830
|
-
import { Suspense, useEffect as useEffect29, useState as
|
|
13831
|
+
import { Suspense, useEffect as useEffect29, useState as useState40 } from "react";
|
|
13831
13832
|
|
|
13832
13833
|
// src/features/notification/components/notifications/NotificationIcon.tsx
|
|
13833
13834
|
import { ArchiveIcon, AudioLinesIcon, BellIcon } from "lucide-react";
|
|
@@ -13903,7 +13904,7 @@ function NotificationMenuItemTime({ date }) {
|
|
|
13903
13904
|
__name(NotificationMenuItemTime, "NotificationMenuItemTime");
|
|
13904
13905
|
function NotificationMenuItem({ notification, closePopover }) {
|
|
13905
13906
|
const generateUrl = usePageUrlGenerator();
|
|
13906
|
-
const [isRead, setIsRead] =
|
|
13907
|
+
const [isRead, setIsRead] = useState40(false);
|
|
13907
13908
|
const t = useTranslations48();
|
|
13908
13909
|
useEffect29(() => {
|
|
13909
13910
|
setIsRead(notification.isRead);
|
|
@@ -13947,11 +13948,11 @@ var NotificationContextProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
|
13947
13948
|
const tRef = useRef23(t);
|
|
13948
13949
|
tRef.current = t;
|
|
13949
13950
|
const router = useI18nRouter();
|
|
13950
|
-
const [notifications, setNotifications] =
|
|
13951
|
-
const [isLoading, setIsLoading] =
|
|
13952
|
-
const [error, setError] =
|
|
13953
|
-
const [lastLoaded, setLastLoaded] =
|
|
13954
|
-
const [hasInitiallyLoaded, setHasInitiallyLoaded] =
|
|
13951
|
+
const [notifications, setNotifications] = useState41([]);
|
|
13952
|
+
const [isLoading, setIsLoading] = useState41(false);
|
|
13953
|
+
const [error, setError] = useState41(null);
|
|
13954
|
+
const [lastLoaded, setLastLoaded] = useState41(0);
|
|
13955
|
+
const [hasInitiallyLoaded, setHasInitiallyLoaded] = useState41(false);
|
|
13955
13956
|
const inFlightRef = useRef23(null);
|
|
13956
13957
|
const { currentUser } = useCurrentUserContext();
|
|
13957
13958
|
const shouldRefresh = lastLoaded === 0 || Date.now() - lastLoaded > 5 * 60 * 1e3;
|
|
@@ -14078,7 +14079,7 @@ var useNotificationContext = /* @__PURE__ */ __name(() => {
|
|
|
14078
14079
|
}, "useNotificationContext");
|
|
14079
14080
|
|
|
14080
14081
|
// src/features/onboarding/contexts/OnboardingContext.tsx
|
|
14081
|
-
import { createContext as createContext19, useCallback as useCallback24, useContext as useContext20, useEffect as useEffect31, useRef as useRef24, useState as
|
|
14082
|
+
import { createContext as createContext19, useCallback as useCallback24, useContext as useContext20, useEffect as useEffect31, useRef as useRef24, useState as useState42 } from "react";
|
|
14082
14083
|
import { flushSync } from "react-dom";
|
|
14083
14084
|
import { createRoot } from "react-dom/client";
|
|
14084
14085
|
import { driver } from "driver.js";
|
|
@@ -14152,10 +14153,10 @@ function OnboardingProvider({
|
|
|
14152
14153
|
zIndex: _zIndex = 9999,
|
|
14153
14154
|
onTourEnd
|
|
14154
14155
|
}) {
|
|
14155
|
-
const [isTourActive, setIsTourActive] =
|
|
14156
|
-
const [activeTourId, setActiveTourId] =
|
|
14157
|
-
const [currentStepIndex, setCurrentStepIndex] =
|
|
14158
|
-
const [totalSteps, setTotalSteps] =
|
|
14156
|
+
const [isTourActive, setIsTourActive] = useState42(false);
|
|
14157
|
+
const [activeTourId, setActiveTourId] = useState42(null);
|
|
14158
|
+
const [currentStepIndex, setCurrentStepIndex] = useState42(0);
|
|
14159
|
+
const [totalSteps, setTotalSteps] = useState42(0);
|
|
14159
14160
|
const driverRef = useRef24(null);
|
|
14160
14161
|
const rootsRef = useRef24(/* @__PURE__ */ new Map());
|
|
14161
14162
|
const endReasonRef = useRef24("dismissed");
|
|
@@ -14322,13 +14323,13 @@ __name(useOnboarding, "useOnboarding");
|
|
|
14322
14323
|
|
|
14323
14324
|
// src/features/role/contexts/RoleContext.tsx
|
|
14324
14325
|
import { useTranslations as useTranslations50 } from "next-intl";
|
|
14325
|
-
import { createContext as createContext20, useContext as useContext21, useState as
|
|
14326
|
+
import { createContext as createContext20, useContext as useContext21, useState as useState43 } from "react";
|
|
14326
14327
|
import { jsx as jsx149 } from "react/jsx-runtime";
|
|
14327
14328
|
var RoleContext = createContext20(void 0);
|
|
14328
14329
|
var RoleProvider = /* @__PURE__ */ __name(({ children, dehydratedRole }) => {
|
|
14329
14330
|
const generateUrl = usePageUrlGenerator();
|
|
14330
14331
|
const t = useTranslations50();
|
|
14331
|
-
const [role, setRole] =
|
|
14332
|
+
const [role, setRole] = useState43(
|
|
14332
14333
|
dehydratedRole ? rehydrate(Modules.Role, dehydratedRole) : void 0
|
|
14333
14334
|
);
|
|
14334
14335
|
const breadcrumb = /* @__PURE__ */ __name(() => {
|
|
@@ -14398,7 +14399,7 @@ __name(HowToDeleter, "HowToDeleter");
|
|
|
14398
14399
|
import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
|
|
14399
14400
|
import { PlusIcon, SearchIcon as SearchIcon6, XIcon as XIcon10 } from "lucide-react";
|
|
14400
14401
|
import { useTranslations as useTranslations52 } from "next-intl";
|
|
14401
|
-
import { useCallback as useCallback25, useEffect as useEffect32, useMemo as useMemo18, useRef as useRef25, useState as
|
|
14402
|
+
import { useCallback as useCallback25, useEffect as useEffect32, useMemo as useMemo18, useRef as useRef25, useState as useState44 } from "react";
|
|
14402
14403
|
import { useForm as useForm4 } from "react-hook-form";
|
|
14403
14404
|
import { v4 as v43 } from "uuid";
|
|
14404
14405
|
import { z as z3 } from "zod";
|
|
@@ -14447,8 +14448,8 @@ function PageSelector({
|
|
|
14447
14448
|
onSelect,
|
|
14448
14449
|
onRemove
|
|
14449
14450
|
}) {
|
|
14450
|
-
const [open, setOpen] =
|
|
14451
|
-
const [search, setSearch] =
|
|
14451
|
+
const [open, setOpen] = useState44(false);
|
|
14452
|
+
const [search, setSearch] = useState44("");
|
|
14452
14453
|
const selectedLabel = value ? allPageUrls.find((opt) => opt.id === value) : void 0;
|
|
14453
14454
|
const filteredOptions = useMemo18(() => {
|
|
14454
14455
|
const available = allPageUrls.filter((opt) => opt.id === value || !selectedPages.includes(opt.id));
|
|
@@ -14760,13 +14761,13 @@ __name(HowToEditor, "HowToEditor");
|
|
|
14760
14761
|
|
|
14761
14762
|
// src/features/how-to/contexts/HowToContext.tsx
|
|
14762
14763
|
import { useTranslations as useTranslations53 } from "next-intl";
|
|
14763
|
-
import { createContext as createContext21, useContext as useContext22, useState as
|
|
14764
|
+
import { createContext as createContext21, useContext as useContext22, useState as useState45 } from "react";
|
|
14764
14765
|
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
14765
14766
|
var HowToContext = createContext21(void 0);
|
|
14766
14767
|
var HowToProvider = /* @__PURE__ */ __name(({ children, dehydratedHowTo }) => {
|
|
14767
14768
|
const generateUrl = usePageUrlGenerator();
|
|
14768
14769
|
const t = useTranslations53();
|
|
14769
|
-
const [howTo, setHowTo] =
|
|
14770
|
+
const [howTo, setHowTo] = useState45(
|
|
14770
14771
|
dehydratedHowTo ? rehydrate(Modules.HowTo, dehydratedHowTo) : void 0
|
|
14771
14772
|
);
|
|
14772
14773
|
const reloadHowTo = /* @__PURE__ */ __name(async () => {
|
|
@@ -14825,7 +14826,7 @@ var useHowToContext = /* @__PURE__ */ __name(() => {
|
|
|
14825
14826
|
// src/features/rbac/contexts/RbacContext.tsx
|
|
14826
14827
|
import { DownloadIcon, Loader2Icon as Loader2Icon3 } from "lucide-react";
|
|
14827
14828
|
import { useTranslations as useTranslations54 } from "next-intl";
|
|
14828
|
-
import { createContext as createContext22, useCallback as useCallback26, useContext as useContext23, useEffect as useEffect33, useMemo as useMemo19, useState as
|
|
14829
|
+
import { createContext as createContext22, useCallback as useCallback26, useContext as useContext23, useEffect as useEffect33, useMemo as useMemo19, useState as useState46 } from "react";
|
|
14829
14830
|
import { jsx as jsx154, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
14830
14831
|
var DEFAULT_OUTPUT_PATH = "apps/api/src/rbac/permissions.ts";
|
|
14831
14832
|
function upsertToken(tokens, action, scope) {
|
|
@@ -14847,11 +14848,11 @@ var RbacProvider = /* @__PURE__ */ __name(({
|
|
|
14847
14848
|
outputPath = DEFAULT_OUTPUT_PATH
|
|
14848
14849
|
}) => {
|
|
14849
14850
|
const t = useTranslations54();
|
|
14850
|
-
const [matrix, setMatrix] =
|
|
14851
|
-
const [modulePaths, setModulePaths] =
|
|
14852
|
-
const [loading, setLoading] =
|
|
14853
|
-
const [error, setError] =
|
|
14854
|
-
const [saving, setSaving] =
|
|
14851
|
+
const [matrix, setMatrix] = useState46(null);
|
|
14852
|
+
const [modulePaths, setModulePaths] = useState46({});
|
|
14853
|
+
const [loading, setLoading] = useState46(true);
|
|
14854
|
+
const [error, setError] = useState46(null);
|
|
14855
|
+
const [saving, setSaving] = useState46(false);
|
|
14855
14856
|
useEffect33(() => {
|
|
14856
14857
|
let cancelled = false;
|
|
14857
14858
|
setLoading(true);
|
|
@@ -14957,7 +14958,7 @@ var useRbacContext = /* @__PURE__ */ __name(() => {
|
|
|
14957
14958
|
// src/features/assistant/contexts/AssistantContext.tsx
|
|
14958
14959
|
import { PlusCircleIcon as PlusCircleIcon2 } from "lucide-react";
|
|
14959
14960
|
import { useTranslations as useTranslations55 } from "next-intl";
|
|
14960
|
-
import { createContext as createContext23, useCallback as useCallback27, useContext as useContext24, useEffect as useEffect34, useMemo as useMemo20, useState as
|
|
14961
|
+
import { createContext as createContext23, useCallback as useCallback27, useContext as useContext24, useEffect as useEffect34, useMemo as useMemo20, useState as useState47 } from "react";
|
|
14961
14962
|
import { jsx as jsx155, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
14962
14963
|
var AssistantContext = createContext23(void 0);
|
|
14963
14964
|
function stripOptimistic(list) {
|
|
@@ -14996,21 +14997,21 @@ function AssistantProvider({
|
|
|
14996
14997
|
(id) => threadUrl ? threadUrl(id) : id ? `/assistants/${id}` : "/assistants",
|
|
14997
14998
|
[threadUrl]
|
|
14998
14999
|
);
|
|
14999
|
-
const [assistant, setAssistant] =
|
|
15000
|
+
const [assistant, setAssistant] = useState47(
|
|
15000
15001
|
() => dehydratedAssistant ? rehydrate(Modules.Assistant, dehydratedAssistant) : void 0
|
|
15001
15002
|
);
|
|
15002
|
-
const [messages, setMessages] =
|
|
15003
|
+
const [messages, setMessages] = useState47(
|
|
15003
15004
|
() => dehydratedMessages ? rehydrateList(Modules.AssistantMessage, dehydratedMessages) : []
|
|
15004
15005
|
);
|
|
15005
|
-
const [threads, setThreads] =
|
|
15006
|
-
const [threadsLoading, setThreadsLoading] =
|
|
15007
|
-
const [sending, setSending] =
|
|
15008
|
-
const [status, setStatus] =
|
|
15009
|
-
const [failedMessageIds, setFailedMessageIds] =
|
|
15010
|
-
const [operatorMode, setOperatorMode] =
|
|
15006
|
+
const [threads, setThreads] = useState47([]);
|
|
15007
|
+
const [threadsLoading, setThreadsLoading] = useState47(true);
|
|
15008
|
+
const [sending, setSending] = useState47(false);
|
|
15009
|
+
const [status, setStatus] = useState47(void 0);
|
|
15010
|
+
const [failedMessageIds, setFailedMessageIds] = useState47(() => /* @__PURE__ */ new Set());
|
|
15011
|
+
const [operatorMode, setOperatorMode] = useState47(
|
|
15011
15012
|
() => dehydratedAssistant?.jsonApi?.attributes?.engine === "operator"
|
|
15012
15013
|
);
|
|
15013
|
-
const [pendingScope, setPendingScope] =
|
|
15014
|
+
const [pendingScope, setPendingScope] = useState47(scope);
|
|
15014
15015
|
const { socket } = useSocketContext();
|
|
15015
15016
|
const sendMessage = useCallback27(
|
|
15016
15017
|
async (content, opts) => {
|
|
@@ -15554,15 +15555,15 @@ __name(usePushNotifications, "usePushNotifications");
|
|
|
15554
15555
|
var usePushNotifications_default = usePushNotifications;
|
|
15555
15556
|
|
|
15556
15557
|
// src/hooks/useSocket.ts
|
|
15557
|
-
import { useEffect as useEffect39, useRef as useRef27, useState as
|
|
15558
|
+
import { useEffect as useEffect39, useRef as useRef27, useState as useState49 } from "react";
|
|
15558
15559
|
import io from "socket.io-client";
|
|
15559
15560
|
function useSocket({ token, paused = false }) {
|
|
15560
15561
|
const _errorCount = useRef27(0);
|
|
15561
15562
|
const shouldConnect = useRef27(true);
|
|
15562
|
-
const [socket, setSocket] =
|
|
15563
|
-
const [isConnected, setIsConnected] =
|
|
15564
|
-
const [messages, setMessages] =
|
|
15565
|
-
const [socketNotifications, setSocketNotifications] =
|
|
15563
|
+
const [socket, setSocket] = useState49(null);
|
|
15564
|
+
const [isConnected, setIsConnected] = useState49(false);
|
|
15565
|
+
const [messages, setMessages] = useState49([]);
|
|
15566
|
+
const [socketNotifications, setSocketNotifications] = useState49([]);
|
|
15566
15567
|
const socketRef = useRef27(null);
|
|
15567
15568
|
useEffect39(() => {
|
|
15568
15569
|
if (!token) return;
|
|
@@ -15728,7 +15729,7 @@ function BreadcrumbDesktop({
|
|
|
15728
15729
|
showRoot
|
|
15729
15730
|
}) {
|
|
15730
15731
|
const t = useTranslations57();
|
|
15731
|
-
const [open, setOpen] =
|
|
15732
|
+
const [open, setOpen] = useState50(false);
|
|
15732
15733
|
return /* @__PURE__ */ jsx161(Breadcrumb, { children: /* @__PURE__ */ jsxs87(BreadcrumbList, { children: [
|
|
15733
15734
|
showRoot && /* @__PURE__ */ jsxs87(Fragment24, { children: [
|
|
15734
15735
|
/* @__PURE__ */ jsx161(BreadcrumbItem, { children: /* @__PURE__ */ jsx161(Link, { href: generateUrl({ page: `/` }), children: rootLabel }) }),
|
|
@@ -15759,7 +15760,7 @@ function BreadcrumbMobile({
|
|
|
15759
15760
|
rootLabel,
|
|
15760
15761
|
showRoot
|
|
15761
15762
|
}) {
|
|
15762
|
-
const [open, setOpen] =
|
|
15763
|
+
const [open, setOpen] = useState50(false);
|
|
15763
15764
|
const lastItem = items[items.length - 1];
|
|
15764
15765
|
const allItems = showRoot ? [{ name: rootLabel, href: generateUrl({ page: `/` }) }, ...items] : items;
|
|
15765
15766
|
if (!lastItem && items.length === 0) {
|
|
@@ -15817,7 +15818,7 @@ function BreadcrumbNavigation({ items, rootLabel, showRoot = true }) {
|
|
|
15817
15818
|
__name(BreadcrumbNavigation, "BreadcrumbNavigation");
|
|
15818
15819
|
|
|
15819
15820
|
// src/components/navigations/ContentTitle.tsx
|
|
15820
|
-
import { useEffect as useEffect40, useState as
|
|
15821
|
+
import { useEffect as useEffect40, useState as useState51 } from "react";
|
|
15821
15822
|
import { jsx as jsx162, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
15822
15823
|
function ContentTitle({
|
|
15823
15824
|
module,
|
|
@@ -15829,8 +15830,8 @@ function ContentTitle({
|
|
|
15829
15830
|
headingLevel
|
|
15830
15831
|
}) {
|
|
15831
15832
|
const ElementTag = headingLevel === 1 ? "h1" : headingLevel === 2 ? "h2" : "div";
|
|
15832
|
-
const [clientFunctions, setClientFunctions] =
|
|
15833
|
-
const [isClient, setIsClient] =
|
|
15833
|
+
const [clientFunctions, setClientFunctions] = useState51(null);
|
|
15834
|
+
const [isClient, setIsClient] = useState51(false);
|
|
15834
15835
|
useEffect40(() => {
|
|
15835
15836
|
setIsClient(true);
|
|
15836
15837
|
setClientFunctions(functions);
|
|
@@ -15995,12 +15996,12 @@ __name(ModeToggleSwitch, "ModeToggleSwitch");
|
|
|
15995
15996
|
|
|
15996
15997
|
// src/components/navigations/PageSection.tsx
|
|
15997
15998
|
import { ChevronDownIcon as ChevronDownIcon9, ChevronRightIcon as ChevronRightIcon6 } from "lucide-react";
|
|
15998
|
-
import { useEffect as useEffect41, useState as
|
|
15999
|
+
import { useEffect as useEffect41, useState as useState52 } from "react";
|
|
15999
16000
|
import { v4 as v44 } from "uuid";
|
|
16000
16001
|
import { jsx as jsx166, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
16001
16002
|
function PageSection({ children, title, options, open, small, onToggle }) {
|
|
16002
|
-
const [isOpen, setIsOpen] =
|
|
16003
|
-
const [shouldRender, setShouldRender] =
|
|
16003
|
+
const [isOpen, setIsOpen] = useState52(open ?? true);
|
|
16004
|
+
const [shouldRender, setShouldRender] = useState52(open ?? true);
|
|
16004
16005
|
useEffect41(() => {
|
|
16005
16006
|
if (onToggle) {
|
|
16006
16007
|
onToggle(isOpen);
|
|
@@ -16046,14 +16047,14 @@ import { useAtomValue } from "jotai";
|
|
|
16046
16047
|
import { HistoryIcon } from "lucide-react";
|
|
16047
16048
|
import { useTranslations as useTranslations60 } from "next-intl";
|
|
16048
16049
|
import { usePathname as usePathname3 } from "next/navigation";
|
|
16049
|
-
import { useEffect as useEffect42, useState as
|
|
16050
|
+
import { useEffect as useEffect42, useState as useState53 } from "react";
|
|
16050
16051
|
import { jsx as jsx167, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
16051
16052
|
function RecentPagesNavigator() {
|
|
16052
16053
|
const recentPages = useAtomValue(recentPagesAtom);
|
|
16053
16054
|
const t = useTranslations60();
|
|
16054
16055
|
const { isMobile } = useSidebar();
|
|
16055
16056
|
const pathname = usePathname3();
|
|
16056
|
-
const [mounted, setMounted] =
|
|
16057
|
+
const [mounted, setMounted] = useState53(false);
|
|
16057
16058
|
useEffect42(() => {
|
|
16058
16059
|
setMounted(true);
|
|
16059
16060
|
}, []);
|
|
@@ -16139,13 +16140,13 @@ __name(partitionTabs, "partitionTabs");
|
|
|
16139
16140
|
|
|
16140
16141
|
// src/components/containers/MermaidDiagram.tsx
|
|
16141
16142
|
import { useTheme as useTheme3 } from "next-themes";
|
|
16142
|
-
import { useEffect as useEffect43, useId as useId4, useState as
|
|
16143
|
+
import { useEffect as useEffect43, useId as useId4, useState as useState54 } from "react";
|
|
16143
16144
|
import { jsx as jsx169 } from "react/jsx-runtime";
|
|
16144
16145
|
function MermaidDiagram({ chart }) {
|
|
16145
16146
|
const reactId = useId4();
|
|
16146
16147
|
const { resolvedTheme } = useTheme3();
|
|
16147
|
-
const [svg, setSvg] =
|
|
16148
|
-
const [failed, setFailed] =
|
|
16148
|
+
const [svg, setSvg] = useState54(void 0);
|
|
16149
|
+
const [failed, setFailed] = useState54(false);
|
|
16149
16150
|
useEffect43(() => {
|
|
16150
16151
|
let cancelled = false;
|
|
16151
16152
|
const draw = /* @__PURE__ */ __name(async () => {
|
|
@@ -16208,7 +16209,7 @@ __name(MermaidDiagram, "MermaidDiagram");
|
|
|
16208
16209
|
// src/components/containers/ReactMarkdownContainer.tsx
|
|
16209
16210
|
import { ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
|
|
16210
16211
|
import { useTranslations as useTranslations61 } from "next-intl";
|
|
16211
|
-
import { useEffect as useEffect44, useRef as useRef28, useState as
|
|
16212
|
+
import { useEffect as useEffect44, useRef as useRef28, useState as useState55 } from "react";
|
|
16212
16213
|
import ReactMarkdown from "react-markdown";
|
|
16213
16214
|
import rehypeSlug from "rehype-slug";
|
|
16214
16215
|
import remarkGfm from "remark-gfm";
|
|
@@ -16231,8 +16232,8 @@ function ReactMarkdownContainer({
|
|
|
16231
16232
|
size = "normal"
|
|
16232
16233
|
}) {
|
|
16233
16234
|
const t = useTranslations61("ui.buttons");
|
|
16234
|
-
const [isExpanded, setIsExpanded] =
|
|
16235
|
-
const [showExpandButton, setShowExpandButton] =
|
|
16235
|
+
const [isExpanded, setIsExpanded] = useState55(false);
|
|
16236
|
+
const [showExpandButton, setShowExpandButton] = useState55(false);
|
|
16236
16237
|
const contentRef = useRef28(null);
|
|
16237
16238
|
useEffect44(() => {
|
|
16238
16239
|
if (collapsible && contentRef.current && !isExpanded) {
|
|
@@ -16473,7 +16474,7 @@ __name(RoundPageContainerTitle, "RoundPageContainerTitle");
|
|
|
16473
16474
|
// src/components/containers/RoundPageContainer.tsx
|
|
16474
16475
|
import { useTranslations as useTranslations63 } from "next-intl";
|
|
16475
16476
|
import { useSearchParams } from "next/navigation";
|
|
16476
|
-
import { Fragment as Fragment27, useCallback as useCallback28, useEffect as useEffect45, useMemo as useMemo23, useRef as useRef29, useState as
|
|
16477
|
+
import { Fragment as Fragment27, useCallback as useCallback28, useEffect as useEffect45, useMemo as useMemo23, useRef as useRef29, useState as useState56 } from "react";
|
|
16477
16478
|
import { Fragment as Fragment28, jsx as jsx172, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
16478
16479
|
var DETAILS_COOKIE_NAME = "round_page_details_state";
|
|
16479
16480
|
var DETAILS_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -16515,12 +16516,12 @@ function RoundPageContainer({
|
|
|
16515
16516
|
const headerLeftContent = useHeaderLeftContent();
|
|
16516
16517
|
const headerLogo = useHeaderLogo();
|
|
16517
16518
|
const headerMobileChildren = useHeaderMobileChildren();
|
|
16518
|
-
const [showDetails, setShowDetailsState] =
|
|
16519
|
-
const [showDetailsMobile, setShowDetailsMobile] =
|
|
16519
|
+
const [showDetails, setShowDetailsState] = useState56(defaultDetailsOpen);
|
|
16520
|
+
const [showDetailsMobile, setShowDetailsMobile] = useState56(false);
|
|
16520
16521
|
const isMobile = useIsMobile();
|
|
16521
16522
|
const hasMobileNavigation = useMobileNavigationItems().length > 0;
|
|
16522
16523
|
const hasSidebar = useOptionalSidebar() !== null;
|
|
16523
|
-
const [mounted, setMounted] =
|
|
16524
|
+
const [mounted, setMounted] = useState56(false);
|
|
16524
16525
|
const cardRef = useRef29(null);
|
|
16525
16526
|
useEffect45(() => {
|
|
16526
16527
|
if (!mounted) return;
|
|
@@ -16560,7 +16561,7 @@ function RoundPageContainer({
|
|
|
16560
16561
|
const section = searchParams.get("section");
|
|
16561
16562
|
const rewriteUrl = useUrlRewriter();
|
|
16562
16563
|
const initialValue = tabs ? (section && tabs.find((i) => tabValue(i) === section) ? section : null) || tabValue(tabs[0]) : void 0;
|
|
16563
|
-
const [activeTab, setActiveTab] =
|
|
16564
|
+
const [activeTab, setActiveTab] = useState56(initialValue);
|
|
16564
16565
|
const previousSection = useRef29(section);
|
|
16565
16566
|
useEffect45(() => {
|
|
16566
16567
|
if (tabs && section) {
|
|
@@ -16991,14 +16992,14 @@ function AllowedUsersDetails({ showTitle, content }) {
|
|
|
16991
16992
|
__name(AllowedUsersDetails, "AllowedUsersDetails");
|
|
16992
16993
|
|
|
16993
16994
|
// src/components/editors/BlockNoteEditorMentionHoverCard.tsx
|
|
16994
|
-
import { useCallback as useCallback29, useEffect as useEffect46, useRef as useRef30, useState as
|
|
16995
|
+
import { useCallback as useCallback29, useEffect as useEffect46, useRef as useRef30, useState as useState57 } from "react";
|
|
16995
16996
|
import { createPortal as createPortal3 } from "react-dom";
|
|
16996
16997
|
import { jsx as jsx175 } from "react/jsx-runtime";
|
|
16997
16998
|
function BlockNoteEditorMentionHoverCard({
|
|
16998
16999
|
containerRef,
|
|
16999
17000
|
mentionResolveFn
|
|
17000
17001
|
}) {
|
|
17001
|
-
const [hovered, setHovered] =
|
|
17002
|
+
const [hovered, setHovered] = useState57(null);
|
|
17002
17003
|
const closeTimeoutRef = useRef30(null);
|
|
17003
17004
|
const scheduleClose = useCallback29(() => {
|
|
17004
17005
|
closeTimeoutRef.current = setTimeout(() => setHovered(null), 200);
|
|
@@ -17317,14 +17318,14 @@ var BlockNoteViewerContainer = React29.memo(/* @__PURE__ */ __name(function View
|
|
|
17317
17318
|
|
|
17318
17319
|
// src/components/viewers/BlockNoteStaticViewer.tsx
|
|
17319
17320
|
import { useTheme as useTheme4 } from "next-themes";
|
|
17320
|
-
import { useEffect as useEffect47, useState as
|
|
17321
|
+
import { useEffect as useEffect47, useState as useState58 } from "react";
|
|
17321
17322
|
import { jsx as jsx179 } from "react/jsx-runtime";
|
|
17322
17323
|
function BlockNoteStaticViewer({
|
|
17323
17324
|
html,
|
|
17324
17325
|
size,
|
|
17325
17326
|
className
|
|
17326
17327
|
}) {
|
|
17327
|
-
const [mounted, setMounted] =
|
|
17328
|
+
const [mounted, setMounted] = useState58(false);
|
|
17328
17329
|
const { resolvedTheme } = useTheme4();
|
|
17329
17330
|
useEffect47(() => {
|
|
17330
17331
|
setMounted(true);
|
|
@@ -17349,11 +17350,11 @@ function BlockNoteStaticViewer({
|
|
|
17349
17350
|
__name(BlockNoteStaticViewer, "BlockNoteStaticViewer");
|
|
17350
17351
|
|
|
17351
17352
|
// src/components/pages/PageContainerContentDetails.tsx
|
|
17352
|
-
import { useEffect as useEffect48, useRef as useRef31, useState as
|
|
17353
|
+
import { useEffect as useEffect48, useRef as useRef31, useState as useState59 } from "react";
|
|
17353
17354
|
import { jsx as jsx180, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
17354
17355
|
function PageContainerContentDetails({ items, section, module, id }) {
|
|
17355
17356
|
const rewriteUrl = useUrlRewriter();
|
|
17356
|
-
const [isScrolled, setIsScrolled] =
|
|
17357
|
+
const [isScrolled, setIsScrolled] = useState59(false);
|
|
17357
17358
|
const sentinelRef = useRef31(null);
|
|
17358
17359
|
useEffect48(() => {
|
|
17359
17360
|
const sentinel = sentinelRef.current;
|
|
@@ -17388,11 +17389,11 @@ function PageContainerContentDetails({ items, section, module, id }) {
|
|
|
17388
17389
|
__name(PageContainerContentDetails, "PageContainerContentDetails");
|
|
17389
17390
|
|
|
17390
17391
|
// src/components/pages/PageContentContainer.tsx
|
|
17391
|
-
import { useEffect as useEffect49, useState as
|
|
17392
|
+
import { useEffect as useEffect49, useState as useState60 } from "react";
|
|
17392
17393
|
import { useDefaultLayout } from "react-resizable-panels";
|
|
17393
17394
|
import { jsx as jsx181, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
17394
17395
|
function PageContentContainer({ header, details, footer, content, fullBleed }) {
|
|
17395
|
-
const [mounted, setMounted] =
|
|
17396
|
+
const [mounted, setMounted] = useState60(false);
|
|
17396
17397
|
const isMobile = useIsMobile();
|
|
17397
17398
|
useEffect49(() => {
|
|
17398
17399
|
setMounted(true);
|
|
@@ -17580,12 +17581,12 @@ function JsonApiProvider({ config, children }) {
|
|
|
17580
17581
|
__name(JsonApiProvider, "JsonApiProvider");
|
|
17581
17582
|
|
|
17582
17583
|
// src/client/hooks/useJsonApiGet.ts
|
|
17583
|
-
import { useState as
|
|
17584
|
+
import { useState as useState61, useEffect as useEffect51, useCallback as useCallback31, useRef as useRef32 } from "react";
|
|
17584
17585
|
function useJsonApiGet(params) {
|
|
17585
|
-
const [data, setData] =
|
|
17586
|
-
const [loading, setLoading] =
|
|
17587
|
-
const [error, setError] =
|
|
17588
|
-
const [response, setResponse] =
|
|
17586
|
+
const [data, setData] = useState61(null);
|
|
17587
|
+
const [loading, setLoading] = useState61(false);
|
|
17588
|
+
const [error, setError] = useState61(null);
|
|
17589
|
+
const [response, setResponse] = useState61(null);
|
|
17589
17590
|
const isMounted = useRef32(true);
|
|
17590
17591
|
const fetchData = useCallback31(async () => {
|
|
17591
17592
|
if (params.options?.enabled === false) return;
|
|
@@ -17680,12 +17681,12 @@ function useJsonApiGet(params) {
|
|
|
17680
17681
|
__name(useJsonApiGet, "useJsonApiGet");
|
|
17681
17682
|
|
|
17682
17683
|
// src/client/hooks/useJsonApiMutation.ts
|
|
17683
|
-
import { useState as
|
|
17684
|
+
import { useState as useState62, useCallback as useCallback32 } from "react";
|
|
17684
17685
|
function useJsonApiMutation(config) {
|
|
17685
|
-
const [data, setData] =
|
|
17686
|
-
const [loading, setLoading] =
|
|
17687
|
-
const [error, setError] =
|
|
17688
|
-
const [response, setResponse] =
|
|
17686
|
+
const [data, setData] = useState62(null);
|
|
17687
|
+
const [loading, setLoading] = useState62(false);
|
|
17688
|
+
const [error, setError] = useState62(null);
|
|
17689
|
+
const [response, setResponse] = useState62(null);
|
|
17689
17690
|
const reset = useCallback32(() => {
|
|
17690
17691
|
setData(null);
|
|
17691
17692
|
setLoading(false);
|
|
@@ -18312,21 +18313,21 @@ registerTableGenerator("stripe-coupons", useStripeCouponTableStructure);
|
|
|
18312
18313
|
|
|
18313
18314
|
// src/features/billing/stripe-coupon/hooks/useStripeCouponCodeTableStructure.tsx
|
|
18314
18315
|
import { useTranslations as useTranslations77 } from "next-intl";
|
|
18315
|
-
import { useMemo as useMemo36, useState as
|
|
18316
|
+
import { useMemo as useMemo36, useState as useState68 } from "react";
|
|
18316
18317
|
|
|
18317
18318
|
// src/features/billing/contexts/CouponContext.tsx
|
|
18318
18319
|
import { useTranslations as useTranslations75 } from "next-intl";
|
|
18319
|
-
import { createContext as createContext28, useCallback as useCallback34, useContext as useContext28, useMemo as useMemo35, useState as
|
|
18320
|
+
import { createContext as createContext28, useCallback as useCallback34, useContext as useContext28, useMemo as useMemo35, useState as useState66 } from "react";
|
|
18320
18321
|
|
|
18321
18322
|
// src/features/billing/stripe-coupon/components/forms/CouponRefresher.tsx
|
|
18322
18323
|
import { RefreshCwIcon as RefreshCwIcon4 } from "lucide-react";
|
|
18323
18324
|
import { useTranslations as useTranslations72 } from "next-intl";
|
|
18324
|
-
import { useState as
|
|
18325
|
+
import { useState as useState63 } from "react";
|
|
18325
18326
|
import { jsx as jsx193, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
18326
18327
|
function CouponRefresher({ coupon }) {
|
|
18327
18328
|
const t = useTranslations72();
|
|
18328
18329
|
const { refreshCounts } = useCouponContext();
|
|
18329
|
-
const [pending, setPending] =
|
|
18330
|
+
const [pending, setPending] = useState63(false);
|
|
18330
18331
|
return /* @__PURE__ */ jsxs103(
|
|
18331
18332
|
Button,
|
|
18332
18333
|
{
|
|
@@ -18355,7 +18356,7 @@ __name(CouponRefresher, "CouponRefresher");
|
|
|
18355
18356
|
// src/features/billing/stripe-coupon/components/forms/CouponEditor.tsx
|
|
18356
18357
|
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
|
18357
18358
|
import { useTranslations as useTranslations74 } from "next-intl";
|
|
18358
|
-
import { useCallback as useCallback33, useMemo as useMemo34, useState as
|
|
18359
|
+
import { useCallback as useCallback33, useMemo as useMemo34, useState as useState65 } from "react";
|
|
18359
18360
|
import { useForm as useForm5 } from "react-hook-form";
|
|
18360
18361
|
import { v4 as v45 } from "uuid";
|
|
18361
18362
|
import { z as z5 } from "zod";
|
|
@@ -18368,7 +18369,7 @@ __name(couponPageModule, "couponPageModule");
|
|
|
18368
18369
|
|
|
18369
18370
|
// src/features/billing/stripe-coupon/components/forms/CouponCodeFields.tsx
|
|
18370
18371
|
import { useTranslations as useTranslations73 } from "next-intl";
|
|
18371
|
-
import { useState as
|
|
18372
|
+
import { useState as useState64 } from "react";
|
|
18372
18373
|
import { z as z4 } from "zod";
|
|
18373
18374
|
import { jsx as jsx194, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
18374
18375
|
var rawNumber = /* @__PURE__ */ __name(() => z4.union([z4.string(), z4.number()]).nullish(), "rawNumber");
|
|
@@ -18452,7 +18453,7 @@ var couponCurrencyOptions = [
|
|
|
18452
18453
|
];
|
|
18453
18454
|
function CouponCodeFields({ form, prefix = "" }) {
|
|
18454
18455
|
const t = useTranslations73();
|
|
18455
|
-
const [now] =
|
|
18456
|
+
const [now] = useState64(() => /* @__PURE__ */ new Date());
|
|
18456
18457
|
return /* @__PURE__ */ jsxs104("div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
18457
18458
|
/* @__PURE__ */ jsx194(
|
|
18458
18459
|
FormInput,
|
|
@@ -18714,7 +18715,7 @@ function CouponCreateEditor({
|
|
|
18714
18715
|
const t = useTranslations74();
|
|
18715
18716
|
const router = useI18nRouter();
|
|
18716
18717
|
const { createCoupon } = useCouponContext();
|
|
18717
|
-
const [now] =
|
|
18718
|
+
const [now] = useState65(() => /* @__PURE__ */ new Date());
|
|
18718
18719
|
const formSchema = useMemo34(() => couponCreateSchema(t), [t]);
|
|
18719
18720
|
const getDefaultValues = useCallback33(
|
|
18720
18721
|
() => ({
|
|
@@ -18925,10 +18926,10 @@ var CouponProvider = /* @__PURE__ */ __name(({ children, dehydratedCoupon, publi
|
|
|
18925
18926
|
const t = useTranslations75();
|
|
18926
18927
|
const generateUrl = usePageUrlGenerator();
|
|
18927
18928
|
const { hasRole } = useCurrentUserContext();
|
|
18928
|
-
const [coupon, setCoupon] =
|
|
18929
|
+
const [coupon, setCoupon] = useState66(
|
|
18929
18930
|
dehydratedCoupon ? rehydrate(Modules.StripeCoupon, dehydratedCoupon) : void 0
|
|
18930
18931
|
);
|
|
18931
|
-
const [catalogueVersion, setCatalogueVersion] =
|
|
18932
|
+
const [catalogueVersion, setCatalogueVersion] = useState66(0);
|
|
18932
18933
|
const refreshCatalogue = useCallback34(() => setCatalogueVersion((value2) => value2 + 1), []);
|
|
18933
18934
|
const reloadCoupon = useCallback34(async () => {
|
|
18934
18935
|
if (!coupon?.id) return;
|
|
@@ -19036,13 +19037,13 @@ var useCouponContext = /* @__PURE__ */ __name(() => useContext28(CouponContext)
|
|
|
19036
19037
|
// src/features/billing/stripe-coupon/components/widgets/CouponCodeActions.tsx
|
|
19037
19038
|
import { PowerIcon, RotateCcwIcon } from "lucide-react";
|
|
19038
19039
|
import { useTranslations as useTranslations76 } from "next-intl";
|
|
19039
|
-
import { useState as
|
|
19040
|
+
import { useState as useState67 } from "react";
|
|
19040
19041
|
import { jsx as jsx197, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
19041
19042
|
function CouponCodeActions({ code, status }) {
|
|
19042
19043
|
const t = useTranslations76();
|
|
19043
19044
|
const { updateCodeFlags } = useCouponContext();
|
|
19044
|
-
const [open, setOpen] =
|
|
19045
|
-
const [pending, setPending] =
|
|
19045
|
+
const [open, setOpen] = useState67(false);
|
|
19046
|
+
const [pending, setPending] = useState67(false);
|
|
19046
19047
|
const isDead = status === "expired" || status === "used_up";
|
|
19047
19048
|
const isInactive = !code.active;
|
|
19048
19049
|
const scope = isInactive ? "reactivate" : "deactivate";
|
|
@@ -19114,7 +19115,7 @@ var useStripeCouponCodeTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
19114
19115
|
const t = useTranslations77();
|
|
19115
19116
|
const fmt = useBillingFormatOptions();
|
|
19116
19117
|
const { coupon } = useCouponContext();
|
|
19117
|
-
const [now] =
|
|
19118
|
+
const [now] = useState68(() => /* @__PURE__ */ new Date());
|
|
19118
19119
|
const tableData = useMemo36(() => {
|
|
19119
19120
|
return params.data.map((code) => {
|
|
19120
19121
|
const entry = { jsonApiData: code };
|
|
@@ -19567,7 +19568,7 @@ __name(useOAuthClients, "useOAuthClients");
|
|
|
19567
19568
|
// src/features/oauth/hooks/useOAuthClient.ts
|
|
19568
19569
|
import { useTranslations as useTranslations81 } from "next-intl";
|
|
19569
19570
|
import { useAtomValue as useAtomValue2, useSetAtom as useSetAtom2 } from "jotai";
|
|
19570
|
-
import { useCallback as useCallback36, useEffect as useEffect53, useRef as useRef34, useState as
|
|
19571
|
+
import { useCallback as useCallback36, useEffect as useEffect53, useRef as useRef34, useState as useState69 } from "react";
|
|
19571
19572
|
function useOAuthClient(clientId) {
|
|
19572
19573
|
const storedClient = useAtomValue2(oauthClientByIdAtom(clientId));
|
|
19573
19574
|
const updateClientInStore = useSetAtom2(updateOAuthClientAtom);
|
|
@@ -19576,9 +19577,9 @@ function useOAuthClient(clientId) {
|
|
|
19576
19577
|
const t = useTranslations81();
|
|
19577
19578
|
const tRef = useRef34(t);
|
|
19578
19579
|
tRef.current = t;
|
|
19579
|
-
const [fetchedClient, setFetchedClient] =
|
|
19580
|
-
const [isLoading, setIsLoading] =
|
|
19581
|
-
const [error, setError] =
|
|
19580
|
+
const [fetchedClient, setFetchedClient] = useState69(null);
|
|
19581
|
+
const [isLoading, setIsLoading] = useState69(false);
|
|
19582
|
+
const [error, setError] = useState69(null);
|
|
19582
19583
|
const client = storedClient || fetchedClient;
|
|
19583
19584
|
const fetchClient = useCallback36(async () => {
|
|
19584
19585
|
if (!clientId) return;
|
|
@@ -19669,13 +19670,13 @@ __name(useOAuthClient, "useOAuthClient");
|
|
|
19669
19670
|
|
|
19670
19671
|
// src/features/oauth/hooks/useOAuthConsent.ts
|
|
19671
19672
|
import { useTranslations as useTranslations82 } from "next-intl";
|
|
19672
|
-
import { useCallback as useCallback37, useEffect as useEffect54, useRef as useRef35, useState as
|
|
19673
|
+
import { useCallback as useCallback37, useEffect as useEffect54, useRef as useRef35, useState as useState70 } from "react";
|
|
19673
19674
|
function useOAuthConsent(params, options) {
|
|
19674
|
-
const [clientInfo, setClientInfo] =
|
|
19675
|
-
const [isLoading, setIsLoading] =
|
|
19676
|
-
const [error, setError] =
|
|
19677
|
-
const [isSubmitting, setIsSubmitting] =
|
|
19678
|
-
const [companyId, setCompanyId] =
|
|
19675
|
+
const [clientInfo, setClientInfo] = useState70(null);
|
|
19676
|
+
const [isLoading, setIsLoading] = useState70(true);
|
|
19677
|
+
const [error, setError] = useState70(null);
|
|
19678
|
+
const [isSubmitting, setIsSubmitting] = useState70(false);
|
|
19679
|
+
const [companyId, setCompanyId] = useState70(void 0);
|
|
19679
19680
|
const contextCompanyId = useCurrentUserContextOptional()?.company?.id;
|
|
19680
19681
|
const currentCompanyId = options?.defaultCompanyId ?? contextCompanyId;
|
|
19681
19682
|
const t = useTranslations82();
|
|
@@ -19793,20 +19794,20 @@ registerTableGenerator("waitlists", useWaitlistTableStructure);
|
|
|
19793
19794
|
import { flexRender, getCoreRowModel, getExpandedRowModel, useReactTable } from "@tanstack/react-table";
|
|
19794
19795
|
import { ChevronLeft, ChevronRight, Loader2 as Loader23 } from "lucide-react";
|
|
19795
19796
|
import { useTranslations as useTranslations85 } from "next-intl";
|
|
19796
|
-
import React31, { memo, useMemo as useMemo39, useState as
|
|
19797
|
+
import React31, { memo, useMemo as useMemo39, useState as useState72 } from "react";
|
|
19797
19798
|
|
|
19798
19799
|
// src/components/tables/ContentTableSearch.tsx
|
|
19799
19800
|
import { RefreshCw, Search, X as X3 } from "lucide-react";
|
|
19800
19801
|
import { useTranslations as useTranslations84 } from "next-intl";
|
|
19801
|
-
import { useCallback as useCallback39, useEffect as useEffect55, useRef as useRef36, useState as
|
|
19802
|
+
import { useCallback as useCallback39, useEffect as useEffect55, useRef as useRef36, useState as useState71 } from "react";
|
|
19802
19803
|
import { jsx as jsx201, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
19803
19804
|
function ContentTableSearch({ data }) {
|
|
19804
19805
|
const t = useTranslations84();
|
|
19805
19806
|
const searchTermRef = useRef36("");
|
|
19806
19807
|
const inputRef = useRef36(null);
|
|
19807
|
-
const [searchTerm, setSearchTerm] =
|
|
19808
|
-
const [isFocused, setIsFocused] =
|
|
19809
|
-
const [isSearching, setIsSearching] =
|
|
19808
|
+
const [searchTerm, setSearchTerm] = useState71("");
|
|
19809
|
+
const [isFocused, setIsFocused] = useState71(false);
|
|
19810
|
+
const [isSearching, setIsSearching] = useState71(false);
|
|
19810
19811
|
const isExpanded = isFocused || searchTerm.length > 0;
|
|
19811
19812
|
const search = useCallback39(
|
|
19812
19813
|
async (searchedTerm) => {
|
|
@@ -19930,10 +19931,10 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
19930
19931
|
const { data, fields, checkedIds, toggleId, allowSearch, filters: _filters, fullWidth, onRowClick } = props;
|
|
19931
19932
|
const t = useTranslations85();
|
|
19932
19933
|
const isMobile = useIsMobile();
|
|
19933
|
-
const [expanded, setExpanded] =
|
|
19934
|
+
const [expanded, setExpanded] = useState72(
|
|
19934
19935
|
props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
|
|
19935
19936
|
);
|
|
19936
|
-
const [pendingDirection, setPendingDirection] =
|
|
19937
|
+
const [pendingDirection, setPendingDirection] = useState72(null);
|
|
19937
19938
|
React31.useEffect(() => {
|
|
19938
19939
|
if (data.isLoaded) setPendingDirection(null);
|
|
19939
19940
|
}, [data.isLoaded]);
|
|
@@ -20182,15 +20183,15 @@ __name(ContentListGrid, "ContentListGrid");
|
|
|
20182
20183
|
|
|
20183
20184
|
// src/components/fiscal/ItalianFiscalData.tsx
|
|
20184
20185
|
import { useTranslations as useTranslations86 } from "next-intl";
|
|
20185
|
-
import { forwardRef as forwardRef8, useCallback as useCallback40, useImperativeHandle as useImperativeHandle2, useRef as useRef38, useState as
|
|
20186
|
+
import { forwardRef as forwardRef8, useCallback as useCallback40, useImperativeHandle as useImperativeHandle2, useRef as useRef38, useState as useState73 } from "react";
|
|
20186
20187
|
import { z as z6 } from "zod";
|
|
20187
20188
|
import { jsx as jsx204, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
20188
20189
|
var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
|
|
20189
20190
|
const t = useTranslations86();
|
|
20190
20191
|
const initialRef = useRef38(initialData);
|
|
20191
|
-
const [fiscalData, setFiscalData] =
|
|
20192
|
+
const [fiscalData, setFiscalData] = useState73(initialData);
|
|
20192
20193
|
const fiscalDataRef = useRef38(initialData);
|
|
20193
|
-
const [fiscalErrors, setFiscalErrors] =
|
|
20194
|
+
const [fiscalErrors, setFiscalErrors] = useState73({});
|
|
20194
20195
|
const updateFiscalField = useCallback40((key, value) => {
|
|
20195
20196
|
setFiscalData((prev) => {
|
|
20196
20197
|
const next = { ...prev, [key]: value };
|
|
@@ -20382,11 +20383,11 @@ __name(EntitySection, "EntitySection");
|
|
|
20382
20383
|
// src/features/account-deletion/components/AccountDeletionCancelledNotice.tsx
|
|
20383
20384
|
import { XIcon as XIcon11 } from "lucide-react";
|
|
20384
20385
|
import { useTranslations as useTranslations87 } from "next-intl";
|
|
20385
|
-
import { useEffect as useEffect57, useState as
|
|
20386
|
+
import { useEffect as useEffect57, useState as useState74 } from "react";
|
|
20386
20387
|
import { jsx as jsx210, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
20387
20388
|
function AccountDeletionCancelledNotice({ choosePlanHref }) {
|
|
20388
20389
|
const t = useTranslations87();
|
|
20389
|
-
const [visible, setVisible] =
|
|
20390
|
+
const [visible, setVisible] = useState74(false);
|
|
20390
20391
|
useEffect57(() => {
|
|
20391
20392
|
if (consumeAccountDeletionCancelled()) setVisible(true);
|
|
20392
20393
|
}, []);
|
|
@@ -20405,11 +20406,11 @@ __name(AccountDeletionCancelledNotice, "AccountDeletionCancelledNotice");
|
|
|
20405
20406
|
// src/features/account-deletion/components/AccountDeletionKeepContainer.tsx
|
|
20406
20407
|
import { CheckCircle, Loader2 as Loader24, XCircle as XCircle2 } from "lucide-react";
|
|
20407
20408
|
import { useTranslations as useTranslations88 } from "next-intl";
|
|
20408
|
-
import { useEffect as useEffect58, useRef as useRef39, useState as
|
|
20409
|
+
import { useEffect as useEffect58, useRef as useRef39, useState as useState75 } from "react";
|
|
20409
20410
|
import { jsx as jsx211, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
20410
20411
|
function AccountDeletionKeepContainer({ token }) {
|
|
20411
20412
|
const t = useTranslations88();
|
|
20412
|
-
const [state, setState] =
|
|
20413
|
+
const [state, setState] = useState75(token ? "loading" : "failure");
|
|
20413
20414
|
const called = useRef39(false);
|
|
20414
20415
|
useEffect58(() => {
|
|
20415
20416
|
if (!token || called.current) return;
|
|
@@ -20442,7 +20443,7 @@ __name(AccountDeletionKeepContainer, "AccountDeletionKeepContainer");
|
|
|
20442
20443
|
import Image8 from "next/image";
|
|
20443
20444
|
|
|
20444
20445
|
// src/features/auth/contexts/AuthContext.tsx
|
|
20445
|
-
import { createContext as createContext29, useContext as useContext29, useMemo as useMemo40, useState as
|
|
20446
|
+
import { createContext as createContext29, useContext as useContext29, useMemo as useMemo40, useState as useState77 } from "react";
|
|
20446
20447
|
|
|
20447
20448
|
// src/features/auth/components/forms/Register.tsx
|
|
20448
20449
|
import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
|
|
@@ -20450,7 +20451,7 @@ import { Loader2 as Loader25 } from "lucide-react";
|
|
|
20450
20451
|
import { useTranslations as useTranslations90 } from "next-intl";
|
|
20451
20452
|
import Image7 from "next/image";
|
|
20452
20453
|
import { useSearchParams as useSearchParams2 } from "next/navigation";
|
|
20453
|
-
import { useEffect as useEffect59, useState as
|
|
20454
|
+
import { useEffect as useEffect59, useState as useState76 } from "react";
|
|
20454
20455
|
import { useForm as useForm6 } from "react-hook-form";
|
|
20455
20456
|
import { v4 as v46 } from "uuid";
|
|
20456
20457
|
import { z as z7 } from "zod";
|
|
@@ -20522,14 +20523,14 @@ function Register() {
|
|
|
20522
20523
|
const searchParams = useSearchParams2();
|
|
20523
20524
|
const inviteCode = searchParams.get("invite");
|
|
20524
20525
|
const registrationMode = getRegistrationMode();
|
|
20525
|
-
const [showConfirmation, setShowConfirmation] =
|
|
20526
|
-
const [inviteValidated, setInviteValidated] =
|
|
20527
|
-
const [inviteError, setInviteError] =
|
|
20528
|
-
const [isValidatingInvite, setIsValidatingInvite] =
|
|
20526
|
+
const [showConfirmation, setShowConfirmation] = useState76(false);
|
|
20527
|
+
const [inviteValidated, setInviteValidated] = useState76(false);
|
|
20528
|
+
const [inviteError, setInviteError] = useState76("");
|
|
20529
|
+
const [isValidatingInvite, setIsValidatingInvite] = useState76(
|
|
20529
20530
|
registrationMode === "waitlist" && !!inviteCode
|
|
20530
20531
|
);
|
|
20531
|
-
const [referralCode, setReferralCode2] =
|
|
20532
|
-
const [signupSource, setSignupSource] =
|
|
20532
|
+
const [referralCode, setReferralCode2] = useState76(null);
|
|
20533
|
+
const [signupSource, setSignupSource] = useState76(void 0);
|
|
20533
20534
|
useEffect59(() => {
|
|
20534
20535
|
const code = getReferralCode();
|
|
20535
20536
|
setReferralCode2(code);
|
|
@@ -20804,9 +20805,9 @@ var AuthContextProvider = /* @__PURE__ */ __name(({
|
|
|
20804
20805
|
initialComponentType,
|
|
20805
20806
|
initialParams
|
|
20806
20807
|
}) => {
|
|
20807
|
-
const [componentType, setComponentType] =
|
|
20808
|
-
const [params, setParams] =
|
|
20809
|
-
const [pendingTwoFactor, setPendingTwoFactor] =
|
|
20808
|
+
const [componentType, setComponentType] = useState77(initialComponentType);
|
|
20809
|
+
const [params, setParams] = useState77(initialParams);
|
|
20810
|
+
const [pendingTwoFactor, setPendingTwoFactor] = useState77();
|
|
20810
20811
|
const activeComponent = useMemo40(() => {
|
|
20811
20812
|
if (componentType === void 0) return null;
|
|
20812
20813
|
switch (componentType) {
|
|
@@ -20868,20 +20869,20 @@ __name(InnerAuthContainer, "InnerAuthContainer");
|
|
|
20868
20869
|
// src/features/auth/components/two-factor/TwoFactorSettings.tsx
|
|
20869
20870
|
import { ShieldAlert, ShieldCheck } from "lucide-react";
|
|
20870
20871
|
import { useTranslations as useTranslations97 } from "next-intl";
|
|
20871
|
-
import { useCallback as useCallback41, useEffect as useEffect61, useState as
|
|
20872
|
+
import { useCallback as useCallback41, useEffect as useEffect61, useState as useState85 } from "react";
|
|
20872
20873
|
import { v4 as v49 } from "uuid";
|
|
20873
20874
|
|
|
20874
20875
|
// src/features/auth/components/two-factor/BackupCodesDialog.tsx
|
|
20875
20876
|
import { Copy, Download, RefreshCw as RefreshCw2 } from "lucide-react";
|
|
20876
20877
|
import { useTranslations as useTranslations91 } from "next-intl";
|
|
20877
|
-
import { useState as
|
|
20878
|
+
import { useState as useState78 } from "react";
|
|
20878
20879
|
import { jsx as jsx216, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
20879
20880
|
function BackupCodesDialog({ remainingCodes, onRegenerate, trigger }) {
|
|
20880
20881
|
const t = useTranslations91();
|
|
20881
|
-
const [open, setOpen] =
|
|
20882
|
-
const [codes, setCodes] =
|
|
20883
|
-
const [isLoading, setIsLoading] =
|
|
20884
|
-
const [showCodes, setShowCodes] =
|
|
20882
|
+
const [open, setOpen] = useState78(false);
|
|
20883
|
+
const [codes, setCodes] = useState78([]);
|
|
20884
|
+
const [isLoading, setIsLoading] = useState78(false);
|
|
20885
|
+
const [showCodes, setShowCodes] = useState78(false);
|
|
20885
20886
|
const handleGenerate = /* @__PURE__ */ __name(async () => {
|
|
20886
20887
|
setIsLoading(true);
|
|
20887
20888
|
try {
|
|
@@ -20976,13 +20977,13 @@ __name(BackupCodesDialog, "BackupCodesDialog");
|
|
|
20976
20977
|
|
|
20977
20978
|
// src/features/auth/components/two-factor/DisableTwoFactorDialog.tsx
|
|
20978
20979
|
import { useTranslations as useTranslations92 } from "next-intl";
|
|
20979
|
-
import { useState as
|
|
20980
|
+
import { useState as useState80 } from "react";
|
|
20980
20981
|
|
|
20981
20982
|
// src/features/auth/components/two-factor/TotpInput.tsx
|
|
20982
|
-
import { useEffect as useEffect60, useRef as useRef40, useState as
|
|
20983
|
+
import { useEffect as useEffect60, useRef as useRef40, useState as useState79 } from "react";
|
|
20983
20984
|
import { jsx as jsx217, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
20984
20985
|
function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
20985
|
-
const [digits, setDigits] =
|
|
20986
|
+
const [digits, setDigits] = useState79(["", "", "", "", "", ""]);
|
|
20986
20987
|
const inputRefs = useRef40([]);
|
|
20987
20988
|
useEffect60(() => {
|
|
20988
20989
|
if (autoFocus && inputRefs.current[0]) {
|
|
@@ -21046,9 +21047,9 @@ __name(TotpInput, "TotpInput");
|
|
|
21046
21047
|
import { jsx as jsx218, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
21047
21048
|
function DisableTwoFactorDialog({ onSuccess, trigger }) {
|
|
21048
21049
|
const t = useTranslations92();
|
|
21049
|
-
const [open, setOpen] =
|
|
21050
|
-
const [isLoading, setIsLoading] =
|
|
21051
|
-
const [error, setError] =
|
|
21050
|
+
const [open, setOpen] = useState80(false);
|
|
21051
|
+
const [isLoading, setIsLoading] = useState80(false);
|
|
21052
|
+
const [error, setError] = useState80();
|
|
21052
21053
|
const handleVerify = /* @__PURE__ */ __name(async (code) => {
|
|
21053
21054
|
setIsLoading(true);
|
|
21054
21055
|
setError(void 0);
|
|
@@ -21089,15 +21090,15 @@ __name(DisableTwoFactorDialog, "DisableTwoFactorDialog");
|
|
|
21089
21090
|
// src/features/auth/components/two-factor/PasskeyList.tsx
|
|
21090
21091
|
import { Edit, Key, Trash2 } from "lucide-react";
|
|
21091
21092
|
import { useTranslations as useTranslations93 } from "next-intl";
|
|
21092
|
-
import { useState as
|
|
21093
|
+
import { useState as useState81 } from "react";
|
|
21093
21094
|
import { Fragment as Fragment36, jsx as jsx219, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
21094
21095
|
function PasskeyList({ passkeys, onRefresh }) {
|
|
21095
21096
|
const t = useTranslations93();
|
|
21096
21097
|
const dates = useDateFormatter();
|
|
21097
|
-
const [renameDialogOpen, setRenameDialogOpen] =
|
|
21098
|
-
const [selectedPasskey, setSelectedPasskey] =
|
|
21099
|
-
const [newName, setNewName] =
|
|
21100
|
-
const [isLoading, setIsLoading] =
|
|
21098
|
+
const [renameDialogOpen, setRenameDialogOpen] = useState81(false);
|
|
21099
|
+
const [selectedPasskey, setSelectedPasskey] = useState81(null);
|
|
21100
|
+
const [newName, setNewName] = useState81("");
|
|
21101
|
+
const [isLoading, setIsLoading] = useState81(false);
|
|
21101
21102
|
const handleDelete = /* @__PURE__ */ __name(async (passkey) => {
|
|
21102
21103
|
setIsLoading(true);
|
|
21103
21104
|
try {
|
|
@@ -21211,14 +21212,14 @@ __name(PasskeyList, "PasskeyList");
|
|
|
21211
21212
|
// src/features/auth/components/two-factor/PasskeySetupDialog.tsx
|
|
21212
21213
|
import { startRegistration } from "@simplewebauthn/browser";
|
|
21213
21214
|
import { useTranslations as useTranslations94 } from "next-intl";
|
|
21214
|
-
import { useState as
|
|
21215
|
+
import { useState as useState82 } from "react";
|
|
21215
21216
|
import { v4 as v47 } from "uuid";
|
|
21216
21217
|
import { jsx as jsx220, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
21217
21218
|
function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
21218
21219
|
const t = useTranslations94();
|
|
21219
21220
|
const { currentUser } = useCurrentUserContext();
|
|
21220
|
-
const [name, setName] =
|
|
21221
|
-
const [isLoading, setIsLoading] =
|
|
21221
|
+
const [name, setName] = useState82("");
|
|
21222
|
+
const [isLoading, setIsLoading] = useState82(false);
|
|
21222
21223
|
const handleRegister = /* @__PURE__ */ __name(async () => {
|
|
21223
21224
|
if (!name.trim()) return;
|
|
21224
21225
|
setIsLoading(true);
|
|
@@ -21282,12 +21283,12 @@ __name(PasskeySetupDialog, "PasskeySetupDialog");
|
|
|
21282
21283
|
// src/features/auth/components/two-factor/TotpAuthenticatorList.tsx
|
|
21283
21284
|
import { Smartphone, Trash2 as Trash22 } from "lucide-react";
|
|
21284
21285
|
import { useTranslations as useTranslations95 } from "next-intl";
|
|
21285
|
-
import { useState as
|
|
21286
|
+
import { useState as useState83 } from "react";
|
|
21286
21287
|
import { jsx as jsx221, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
21287
21288
|
function TotpAuthenticatorList({ authenticators, onDelete }) {
|
|
21288
21289
|
const t = useTranslations95();
|
|
21289
21290
|
const dates = useDateFormatter();
|
|
21290
|
-
const [deletingId, setDeletingId] =
|
|
21291
|
+
const [deletingId, setDeletingId] = useState83(null);
|
|
21291
21292
|
const handleDelete = /* @__PURE__ */ __name(async (id) => {
|
|
21292
21293
|
setDeletingId(id);
|
|
21293
21294
|
try {
|
|
@@ -21358,19 +21359,19 @@ __name(TotpAuthenticatorList, "TotpAuthenticatorList");
|
|
|
21358
21359
|
// src/features/auth/components/two-factor/TotpSetupDialog.tsx
|
|
21359
21360
|
import { useTranslations as useTranslations96 } from "next-intl";
|
|
21360
21361
|
import { QRCodeSVG } from "qrcode.react";
|
|
21361
|
-
import { useState as
|
|
21362
|
+
import { useState as useState84 } from "react";
|
|
21362
21363
|
import { v4 as v48 } from "uuid";
|
|
21363
21364
|
import { jsx as jsx222, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
21364
21365
|
function TotpSetupDialog({ onSuccess, trigger }) {
|
|
21365
21366
|
const t = useTranslations96();
|
|
21366
21367
|
const { currentUser } = useCurrentUserContext();
|
|
21367
|
-
const [open, setOpen] =
|
|
21368
|
-
const [step, setStep] =
|
|
21369
|
-
const [name, setName] =
|
|
21370
|
-
const [qrCodeUri, setQrCodeUri] =
|
|
21371
|
-
const [authenticatorId, setAuthenticatorId] =
|
|
21372
|
-
const [isLoading, setIsLoading] =
|
|
21373
|
-
const [verifyError, setVerifyError] =
|
|
21368
|
+
const [open, setOpen] = useState84(false);
|
|
21369
|
+
const [step, setStep] = useState84("name");
|
|
21370
|
+
const [name, setName] = useState84("");
|
|
21371
|
+
const [qrCodeUri, setQrCodeUri] = useState84("");
|
|
21372
|
+
const [authenticatorId, setAuthenticatorId] = useState84("");
|
|
21373
|
+
const [isLoading, setIsLoading] = useState84(false);
|
|
21374
|
+
const [verifyError, setVerifyError] = useState84();
|
|
21374
21375
|
const handleStartSetup = /* @__PURE__ */ __name(async () => {
|
|
21375
21376
|
if (!name.trim()) return;
|
|
21376
21377
|
setIsLoading(true);
|
|
@@ -21468,12 +21469,12 @@ __name(TotpSetupDialog, "TotpSetupDialog");
|
|
|
21468
21469
|
import { Fragment as Fragment37, jsx as jsx223, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
21469
21470
|
function TwoFactorSettings() {
|
|
21470
21471
|
const t = useTranslations97();
|
|
21471
|
-
const [status, setStatus] =
|
|
21472
|
-
const [authenticators, setAuthenticators] =
|
|
21473
|
-
const [passkeys, setPasskeys] =
|
|
21474
|
-
const [isLoading, setIsLoading] =
|
|
21475
|
-
const [isEnabling, setIsEnabling] =
|
|
21476
|
-
const [passkeyDialogOpen, setPasskeyDialogOpen] =
|
|
21472
|
+
const [status, setStatus] = useState85(null);
|
|
21473
|
+
const [authenticators, setAuthenticators] = useState85([]);
|
|
21474
|
+
const [passkeys, setPasskeys] = useState85([]);
|
|
21475
|
+
const [isLoading, setIsLoading] = useState85(true);
|
|
21476
|
+
const [isEnabling, setIsEnabling] = useState85(false);
|
|
21477
|
+
const [passkeyDialogOpen, setPasskeyDialogOpen] = useState85(false);
|
|
21477
21478
|
const loadStatus = useCallback41(async () => {
|
|
21478
21479
|
try {
|
|
21479
21480
|
const [statusData, authenticatorsList, passkeysList] = await Promise.all([
|
|
@@ -21684,14 +21685,14 @@ __name(LandingComponent, "LandingComponent");
|
|
|
21684
21685
|
import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
|
|
21685
21686
|
import { useTranslations as useTranslations100 } from "next-intl";
|
|
21686
21687
|
import Image10 from "next/image";
|
|
21687
|
-
import { useEffect as useEffect62, useState as
|
|
21688
|
+
import { useEffect as useEffect62, useState as useState86 } from "react";
|
|
21688
21689
|
import { useForm as useForm7 } from "react-hook-form";
|
|
21689
21690
|
import { z as z8 } from "zod";
|
|
21690
21691
|
import { Fragment as Fragment39, jsx as jsx227, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
21691
21692
|
function AcceptInvitation() {
|
|
21692
21693
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
21693
|
-
const [showConfirmation, setShowConfirmation] =
|
|
21694
|
-
const [error, setError] =
|
|
21694
|
+
const [showConfirmation, setShowConfirmation] = useState86(false);
|
|
21695
|
+
const [error, setError] = useState86(void 0);
|
|
21695
21696
|
const t = useTranslations100();
|
|
21696
21697
|
useEffect62(() => {
|
|
21697
21698
|
async function validateCode(code) {
|
|
@@ -21786,12 +21787,12 @@ __name(AcceptInvitation, "AcceptInvitation");
|
|
|
21786
21787
|
// src/features/auth/components/forms/ActivateAccount.tsx
|
|
21787
21788
|
import { useTranslations as useTranslations101 } from "next-intl";
|
|
21788
21789
|
import Image11 from "next/image";
|
|
21789
|
-
import { useEffect as useEffect63, useState as
|
|
21790
|
+
import { useEffect as useEffect63, useState as useState87 } from "react";
|
|
21790
21791
|
import { Fragment as Fragment40, jsx as jsx228, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
21791
21792
|
function ActivateAccount() {
|
|
21792
21793
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
21793
|
-
const [showConfirmation, setShowConfirmation] =
|
|
21794
|
-
const [error, setError] =
|
|
21794
|
+
const [showConfirmation, setShowConfirmation] = useState87(false);
|
|
21795
|
+
const [error, setError] = useState87(void 0);
|
|
21795
21796
|
const t = useTranslations101();
|
|
21796
21797
|
useEffect63(() => {
|
|
21797
21798
|
async function ActivateAccount2(code) {
|
|
@@ -21834,11 +21835,11 @@ function ActivateAccount() {
|
|
|
21834
21835
|
__name(ActivateAccount, "ActivateAccount");
|
|
21835
21836
|
|
|
21836
21837
|
// src/features/auth/components/forms/Cookies.tsx
|
|
21837
|
-
import { useEffect as useEffect64, useState as
|
|
21838
|
+
import { useEffect as useEffect64, useState as useState88 } from "react";
|
|
21838
21839
|
function Cookies({ dehydratedAuth, page }) {
|
|
21839
21840
|
const { setUser } = useCurrentUserContext();
|
|
21840
21841
|
const router = useI18nRouter();
|
|
21841
|
-
const [hasSaved, setHasSaved] =
|
|
21842
|
+
const [hasSaved, setHasSaved] = useState88(false);
|
|
21842
21843
|
useEffect64(() => {
|
|
21843
21844
|
if (hasSaved) return;
|
|
21844
21845
|
async function saveTokenOnServer() {
|
|
@@ -21863,14 +21864,14 @@ __name(Cookies, "Cookies");
|
|
|
21863
21864
|
import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
|
|
21864
21865
|
import { useTranslations as useTranslations102 } from "next-intl";
|
|
21865
21866
|
import Image12 from "next/image";
|
|
21866
|
-
import { useState as
|
|
21867
|
+
import { useState as useState89 } from "react";
|
|
21867
21868
|
import { useForm as useForm8 } from "react-hook-form";
|
|
21868
21869
|
import { z as z9 } from "zod";
|
|
21869
21870
|
import { Fragment as Fragment41, jsx as jsx229, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
21870
21871
|
function ForgotPassword() {
|
|
21871
21872
|
const t = useTranslations102();
|
|
21872
21873
|
const { setComponentType } = useAuthContext();
|
|
21873
|
-
const [showConfirmation, setShowConfirmation] =
|
|
21874
|
+
const [showConfirmation, setShowConfirmation] = useState89(false);
|
|
21874
21875
|
const formSchema = z9.object({
|
|
21875
21876
|
email: z9.string().email({
|
|
21876
21877
|
message: t(`common.errors.invalid_email`)
|
|
@@ -21935,7 +21936,7 @@ import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
|
|
|
21935
21936
|
import { useTranslations as useTranslations103 } from "next-intl";
|
|
21936
21937
|
import Image13 from "next/image";
|
|
21937
21938
|
import { useRouter, useSearchParams as useSearchParams3 } from "next/navigation";
|
|
21938
|
-
import { useEffect as useEffect65, useState as
|
|
21939
|
+
import { useEffect as useEffect65, useState as useState90 } from "react";
|
|
21939
21940
|
import { useForm as useForm9 } from "react-hook-form";
|
|
21940
21941
|
import { z as z10 } from "zod";
|
|
21941
21942
|
import { Fragment as Fragment42, jsx as jsx230, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
@@ -21948,7 +21949,7 @@ function Login() {
|
|
|
21948
21949
|
const nativeRouter = useRouter();
|
|
21949
21950
|
const searchParams = useSearchParams3();
|
|
21950
21951
|
const callbackUrl = searchParams.get("callbackUrl");
|
|
21951
|
-
const [referralCode, setReferralCode2] =
|
|
21952
|
+
const [referralCode, setReferralCode2] = useState90(null);
|
|
21952
21953
|
useEffect65(() => {
|
|
21953
21954
|
const cookies = document.cookie.split("; ");
|
|
21954
21955
|
for (const cookie of cookies) {
|
|
@@ -22130,14 +22131,14 @@ __name(RefreshUser, "RefreshUser");
|
|
|
22130
22131
|
import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
|
|
22131
22132
|
import { useTranslations as useTranslations104 } from "next-intl";
|
|
22132
22133
|
import Image14 from "next/image";
|
|
22133
|
-
import { useEffect as useEffect68, useState as
|
|
22134
|
+
import { useEffect as useEffect68, useState as useState91 } from "react";
|
|
22134
22135
|
import { useForm as useForm10 } from "react-hook-form";
|
|
22135
22136
|
import { z as z11 } from "zod";
|
|
22136
22137
|
import { Fragment as Fragment44, jsx as jsx232, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
22137
22138
|
function ResetPassword() {
|
|
22138
22139
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
22139
|
-
const [showConfirmation, setShowConfirmation] =
|
|
22140
|
-
const [error, setError] =
|
|
22140
|
+
const [showConfirmation, setShowConfirmation] = useState91(false);
|
|
22141
|
+
const [error, setError] = useState91(void 0);
|
|
22141
22142
|
const t = useTranslations104();
|
|
22142
22143
|
useEffect68(() => {
|
|
22143
22144
|
async function validateResetPasswordCode(code) {
|
|
@@ -22216,18 +22217,18 @@ __name(ResetPassword, "ResetPassword");
|
|
|
22216
22217
|
// src/features/auth/components/forms/TwoFactorChallenge.tsx
|
|
22217
22218
|
import { useTranslations as useTranslations106 } from "next-intl";
|
|
22218
22219
|
import { useRouter as useRouter2, useSearchParams as useSearchParams4 } from "next/navigation";
|
|
22219
|
-
import { useState as
|
|
22220
|
+
import { useState as useState93 } from "react";
|
|
22220
22221
|
import { v4 as v411 } from "uuid";
|
|
22221
22222
|
|
|
22222
22223
|
// src/features/auth/components/two-factor/PasskeyButton.tsx
|
|
22223
22224
|
import { startAuthentication } from "@simplewebauthn/browser";
|
|
22224
22225
|
import { useTranslations as useTranslations105 } from "next-intl";
|
|
22225
|
-
import { useState as
|
|
22226
|
+
import { useState as useState92 } from "react";
|
|
22226
22227
|
import { v4 as v410 } from "uuid";
|
|
22227
22228
|
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
22228
22229
|
function PasskeyButton({ pendingToken, onSuccess, onError, disabled = false }) {
|
|
22229
22230
|
const t = useTranslations105();
|
|
22230
|
-
const [isLoading, setIsLoading] =
|
|
22231
|
+
const [isLoading, setIsLoading] = useState92(false);
|
|
22231
22232
|
const handleClick = /* @__PURE__ */ __name(async () => {
|
|
22232
22233
|
setIsLoading(true);
|
|
22233
22234
|
try {
|
|
@@ -22272,10 +22273,10 @@ function TwoFactorChallenge() {
|
|
|
22272
22273
|
const nativeRouter = useRouter2();
|
|
22273
22274
|
const searchParams = useSearchParams4();
|
|
22274
22275
|
const callbackUrl = searchParams.get("callbackUrl");
|
|
22275
|
-
const [isVerifying, setIsVerifying] =
|
|
22276
|
-
const [totpError, setTotpError] =
|
|
22277
|
-
const [backupCode, setBackupCode] =
|
|
22278
|
-
const [backupError, setBackupError] =
|
|
22276
|
+
const [isVerifying, setIsVerifying] = useState93(false);
|
|
22277
|
+
const [totpError, setTotpError] = useState93();
|
|
22278
|
+
const [backupCode, setBackupCode] = useState93("");
|
|
22279
|
+
const [backupError, setBackupError] = useState93();
|
|
22279
22280
|
if (!pendingTwoFactor) {
|
|
22280
22281
|
return null;
|
|
22281
22282
|
}
|
|
@@ -22582,7 +22583,7 @@ var AI_CONNECTIONS_I18N_KEYS = [
|
|
|
22582
22583
|
|
|
22583
22584
|
// src/features/ai-connection/contexts/AiConnectionsContext.tsx
|
|
22584
22585
|
import { useTranslations as useTranslations108 } from "next-intl";
|
|
22585
|
-
import { createContext as createContext30, useCallback as useCallback42, useContext as useContext30, useEffect as useEffect69, useMemo as useMemo41, useState as
|
|
22586
|
+
import { createContext as createContext30, useCallback as useCallback42, useContext as useContext30, useEffect as useEffect69, useMemo as useMemo41, useState as useState94 } from "react";
|
|
22586
22587
|
import { jsx as jsx236 } from "react/jsx-runtime";
|
|
22587
22588
|
var defaultContextValue4 = {
|
|
22588
22589
|
connections: [],
|
|
@@ -22598,11 +22599,11 @@ var defaultContextValue4 = {
|
|
|
22598
22599
|
var AiConnectionsContext = createContext30(void 0);
|
|
22599
22600
|
var AiConnectionsProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
22600
22601
|
const t = useTranslations108();
|
|
22601
|
-
const [connections, setConnections] =
|
|
22602
|
-
const [providerRegistry, setProviderRegistry] =
|
|
22603
|
-
const [envDefaults, setEnvDefaults] =
|
|
22604
|
-
const [scopeCompanyId, setScopeCompanyId] =
|
|
22605
|
-
const [isLoading, setIsLoading] =
|
|
22602
|
+
const [connections, setConnections] = useState94([]);
|
|
22603
|
+
const [providerRegistry, setProviderRegistry] = useState94({});
|
|
22604
|
+
const [envDefaults, setEnvDefaults] = useState94({});
|
|
22605
|
+
const [scopeCompanyId, setScopeCompanyId] = useState94(null);
|
|
22606
|
+
const [isLoading, setIsLoading] = useState94(true);
|
|
22606
22607
|
const refresh = useCallback42(async () => {
|
|
22607
22608
|
setIsLoading(true);
|
|
22608
22609
|
try {
|
|
@@ -22636,7 +22637,7 @@ var useAiConnections = /* @__PURE__ */ __name(() => useContext30(AiConnectionsCo
|
|
|
22636
22637
|
|
|
22637
22638
|
// src/features/ai-connection/components/containers/AiConnectionsContainer.tsx
|
|
22638
22639
|
import { useTranslations as useTranslations112 } from "next-intl";
|
|
22639
|
-
import { useEffect as useEffect71, useMemo as useMemo44, useState as
|
|
22640
|
+
import { useEffect as useEffect71, useMemo as useMemo44, useState as useState96 } from "react";
|
|
22640
22641
|
|
|
22641
22642
|
// src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx
|
|
22642
22643
|
import { ChevronDownIcon as ChevronDownIcon10, ChevronUpIcon as ChevronUpIcon3, PlusIcon as PlusIcon2 } from "lucide-react";
|
|
@@ -22646,12 +22647,12 @@ import { useMemo as useMemo43 } from "react";
|
|
|
22646
22647
|
// src/features/ai-connection/components/forms/AiConnectionDeleter.tsx
|
|
22647
22648
|
import { TrashIcon } from "lucide-react";
|
|
22648
22649
|
import { useTranslations as useTranslations109 } from "next-intl";
|
|
22649
|
-
import { useState as
|
|
22650
|
+
import { useState as useState95 } from "react";
|
|
22650
22651
|
import { Fragment as Fragment46, jsx as jsx237, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
22651
22652
|
function AiConnectionDeleter({ connection }) {
|
|
22652
22653
|
const t = useTranslations109();
|
|
22653
22654
|
const { refresh } = useAiConnections();
|
|
22654
|
-
const [open, setOpen] =
|
|
22655
|
+
const [open, setOpen] = useState95(false);
|
|
22655
22656
|
return /* @__PURE__ */ jsxs137(Fragment46, { children: [
|
|
22656
22657
|
/* @__PURE__ */ jsx237(
|
|
22657
22658
|
Button,
|
|
@@ -23130,7 +23131,7 @@ __name(AiConnectionsContainer, "AiConnectionsContainer");
|
|
|
23130
23131
|
function AiConnectionsBody() {
|
|
23131
23132
|
const t = useTranslations112();
|
|
23132
23133
|
const { scopeCompanyId, setScopeCompanyId } = useAiConnections();
|
|
23133
|
-
const [companies, setCompanies] =
|
|
23134
|
+
const [companies, setCompanies] = useState96([]);
|
|
23134
23135
|
useEffect71(() => {
|
|
23135
23136
|
let active = true;
|
|
23136
23137
|
CompanyService.findMany({}).then((response) => {
|
|
@@ -23173,7 +23174,7 @@ __name(AiConnectionsBody, "AiConnectionsBody");
|
|
|
23173
23174
|
// src/features/billing/components/widgets/CreditWarningBanner.tsx
|
|
23174
23175
|
import { XIcon as XIcon12 } from "lucide-react";
|
|
23175
23176
|
import { useTranslations as useTranslations113 } from "next-intl";
|
|
23176
|
-
import { useState as
|
|
23177
|
+
import { useState as useState97 } from "react";
|
|
23177
23178
|
import { jsx as jsx241, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
23178
23179
|
function CreditWarningBanner({
|
|
23179
23180
|
canManageBilling,
|
|
@@ -23183,7 +23184,7 @@ function CreditWarningBanner({
|
|
|
23183
23184
|
}) {
|
|
23184
23185
|
const t = useTranslations113();
|
|
23185
23186
|
const { company, refreshUser } = useCurrentUserContext();
|
|
23186
|
-
const [dismissing, setDismissing] =
|
|
23187
|
+
const [dismissing, setDismissing] = useState97(false);
|
|
23187
23188
|
if (!company || !canManageBilling || !isCreditWarningActive(company, thresholdPercent)) return null;
|
|
23188
23189
|
const offer = company.creditWarningOffer;
|
|
23189
23190
|
const handleDismiss = /* @__PURE__ */ __name(async () => {
|
|
@@ -23573,18 +23574,18 @@ __name(EmailBlastsListContainer, "EmailBlastsListContainer");
|
|
|
23573
23574
|
// src/features/email-blast/components/containers/EmailBlastContainer.tsx
|
|
23574
23575
|
import { LoaderCircleIcon as LoaderCircleIcon5, MailCheckIcon } from "lucide-react";
|
|
23575
23576
|
import { useTranslations as useTranslations122 } from "next-intl";
|
|
23576
|
-
import { useCallback as useCallback45, useEffect as useEffect73, useState as
|
|
23577
|
+
import { useCallback as useCallback45, useEffect as useEffect73, useState as useState99 } from "react";
|
|
23577
23578
|
|
|
23578
23579
|
// src/features/email-blast/components/forms/EmailBlastSendDialog.tsx
|
|
23579
23580
|
import { LoaderCircleIcon as LoaderCircleIcon4, SendIcon as SendIcon2 } from "lucide-react";
|
|
23580
23581
|
import { useTranslations as useTranslations121 } from "next-intl";
|
|
23581
|
-
import { useEffect as useEffect72, useState as
|
|
23582
|
+
import { useEffect as useEffect72, useState as useState98 } from "react";
|
|
23582
23583
|
import { Fragment as Fragment49, jsx as jsx249, jsxs as jsxs144 } from "react/jsx-runtime";
|
|
23583
23584
|
function EmailBlastSendDialog({ blast, onSuccess }) {
|
|
23584
23585
|
const t = useTranslations121();
|
|
23585
|
-
const [open, setOpen] =
|
|
23586
|
-
const [count, setCount] =
|
|
23587
|
-
const [isSending, setIsSending] =
|
|
23586
|
+
const [open, setOpen] = useState98(false);
|
|
23587
|
+
const [count, setCount] = useState98(void 0);
|
|
23588
|
+
const [isSending, setIsSending] = useState98(false);
|
|
23588
23589
|
useEffect72(() => {
|
|
23589
23590
|
if (!open) return;
|
|
23590
23591
|
let cancelled = false;
|
|
@@ -23643,7 +23644,7 @@ var STATUS_VARIANTS2 = {
|
|
|
23643
23644
|
};
|
|
23644
23645
|
function EmailBlastSendTestButton({ blast }) {
|
|
23645
23646
|
const t = useTranslations122();
|
|
23646
|
-
const [isSending, setIsSending] =
|
|
23647
|
+
const [isSending, setIsSending] = useState99(false);
|
|
23647
23648
|
const handleClick = /* @__PURE__ */ __name(async () => {
|
|
23648
23649
|
setIsSending(true);
|
|
23649
23650
|
try {
|
|
@@ -23665,7 +23666,7 @@ function EmailBlastContainer({ blastId }) {
|
|
|
23665
23666
|
const t = useTranslations122();
|
|
23666
23667
|
const dates = useDateFormatter();
|
|
23667
23668
|
const generateUrl = usePageUrlGenerator();
|
|
23668
|
-
const [blast, setBlast] =
|
|
23669
|
+
const [blast, setBlast] = useState99(void 0);
|
|
23669
23670
|
const reload = useCallback45(async () => {
|
|
23670
23671
|
setBlast(await EmailBlastService.findOne({ id: blastId }));
|
|
23671
23672
|
}, [blastId]);
|
|
@@ -23760,7 +23761,7 @@ __name(EmailBlastContainer, "EmailBlastContainer");
|
|
|
23760
23761
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
23761
23762
|
import { ArrowRight, LifeBuoyIcon } from "lucide-react";
|
|
23762
23763
|
import { useTranslations as useTranslations124 } from "next-intl";
|
|
23763
|
-
import { useCallback as useCallback46, useEffect as useEffect74, useMemo as useMemo48, useRef as useRef41, useState as
|
|
23764
|
+
import { useCallback as useCallback46, useEffect as useEffect74, useMemo as useMemo48, useRef as useRef41, useState as useState100 } from "react";
|
|
23764
23765
|
|
|
23765
23766
|
// src/features/how-to/components/containers/HowToCommandViewer.tsx
|
|
23766
23767
|
import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
|
|
@@ -23886,10 +23887,10 @@ function matchPage(pathname, pattern) {
|
|
|
23886
23887
|
__name(matchPage, "matchPage");
|
|
23887
23888
|
function HowToCommand({ pathname, contextKeys, extraGroups, onStartChat }) {
|
|
23888
23889
|
const t = useTranslations124();
|
|
23889
|
-
const [dialogOpen, setDialogOpen] =
|
|
23890
|
-
const [selectedHowTo, setSelectedHowTo] =
|
|
23890
|
+
const [dialogOpen, setDialogOpen] = useState100(false);
|
|
23891
|
+
const [selectedHowTo, setSelectedHowTo] = useState100(null);
|
|
23891
23892
|
const searchTermRef = useRef41("");
|
|
23892
|
-
const [searchTerm, setSearchTerm] =
|
|
23893
|
+
const [searchTerm, setSearchTerm] = useState100("");
|
|
23893
23894
|
const data = useDataListRetriever({
|
|
23894
23895
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
23895
23896
|
return HowToService.findMany(params);
|
|
@@ -24179,11 +24180,11 @@ registerTableGenerator("howtos", useHowToTableStructure);
|
|
|
24179
24180
|
|
|
24180
24181
|
// src/features/how-to/components/forms/HowToReindexButton.tsx
|
|
24181
24182
|
import { useTranslations as useTranslations127 } from "next-intl";
|
|
24182
|
-
import { useState as
|
|
24183
|
+
import { useState as useState101 } from "react";
|
|
24183
24184
|
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
24184
24185
|
function HowToReindexButton({ refresh }) {
|
|
24185
24186
|
const t = useTranslations127();
|
|
24186
|
-
const [isReindexing, setIsReindexing] =
|
|
24187
|
+
const [isReindexing, setIsReindexing] = useState101(false);
|
|
24187
24188
|
const onReindex = /* @__PURE__ */ __name(async () => {
|
|
24188
24189
|
setIsReindexing(true);
|
|
24189
24190
|
try {
|
|
@@ -24242,7 +24243,7 @@ __name(HowToListContainer, "HowToListContainer");
|
|
|
24242
24243
|
// src/features/how-to/components/forms/HowToSelector.tsx
|
|
24243
24244
|
import { CircleX as CircleX3, RefreshCwIcon as RefreshCwIcon5, SearchIcon as SearchIcon7, XIcon as XIcon13 } from "lucide-react";
|
|
24244
24245
|
import { useTranslations as useTranslations129 } from "next-intl";
|
|
24245
|
-
import { useCallback as useCallback47, useEffect as useEffect75, useRef as useRef42, useState as
|
|
24246
|
+
import { useCallback as useCallback47, useEffect as useEffect75, useRef as useRef42, useState as useState102 } from "react";
|
|
24246
24247
|
import { Fragment as Fragment52, jsx as jsx260, jsxs as jsxs149 } from "react/jsx-runtime";
|
|
24247
24248
|
function HowToSelector({
|
|
24248
24249
|
id,
|
|
@@ -24253,10 +24254,10 @@ function HowToSelector({
|
|
|
24253
24254
|
isRequired = false
|
|
24254
24255
|
}) {
|
|
24255
24256
|
const t = useTranslations129();
|
|
24256
|
-
const [open, setOpen] =
|
|
24257
|
+
const [open, setOpen] = useState102(false);
|
|
24257
24258
|
const searchTermRef = useRef42("");
|
|
24258
|
-
const [searchTerm, setSearchTerm] =
|
|
24259
|
-
const [isSearching, setIsSearching] =
|
|
24259
|
+
const [searchTerm, setSearchTerm] = useState102("");
|
|
24260
|
+
const [isSearching, setIsSearching] = useState102(false);
|
|
24260
24261
|
const data = useDataListRetriever({
|
|
24261
24262
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
24262
24263
|
return HowToService.findMany(params);
|
|
@@ -24347,7 +24348,7 @@ __name(HowToSelector, "HowToSelector");
|
|
|
24347
24348
|
|
|
24348
24349
|
// src/features/handbook/components/lists/HandbookContents.tsx
|
|
24349
24350
|
import { useTranslations as useTranslations145 } from "next-intl";
|
|
24350
|
-
import { useCallback as useCallback51, useEffect as useEffect79, useMemo as useMemo55, useState as
|
|
24351
|
+
import { useCallback as useCallback51, useEffect as useEffect79, useMemo as useMemo55, useState as useState110 } from "react";
|
|
24351
24352
|
|
|
24352
24353
|
// src/features/handbook/contexts/HandbookContext.tsx
|
|
24353
24354
|
import { useTranslations as useTranslations130 } from "next-intl";
|
|
@@ -24402,10 +24403,10 @@ var HandbookProvider = /* @__PURE__ */ __name(({ children, page, section, functi
|
|
|
24402
24403
|
import { MessagesSquareIcon, Sparkles as Sparkles2 } from "lucide-react";
|
|
24403
24404
|
import { useTranslations as useTranslations142 } from "next-intl";
|
|
24404
24405
|
import Link5 from "next/link";
|
|
24405
|
-
import { useCallback as useCallback50, useState as
|
|
24406
|
+
import { useCallback as useCallback50, useState as useState108 } from "react";
|
|
24406
24407
|
|
|
24407
24408
|
// src/features/assistant/components/parts/AssistantComposer.tsx
|
|
24408
|
-
import { useState as
|
|
24409
|
+
import { useState as useState103 } from "react";
|
|
24409
24410
|
import { useTranslations as useTranslations131 } from "next-intl";
|
|
24410
24411
|
import { ArrowUp } from "lucide-react";
|
|
24411
24412
|
import { jsx as jsx262, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
@@ -24419,7 +24420,7 @@ function AssistantComposer({
|
|
|
24419
24420
|
leading
|
|
24420
24421
|
}) {
|
|
24421
24422
|
const t = useTranslations131();
|
|
24422
|
-
const [internal, setInternal] =
|
|
24423
|
+
const [internal, setInternal] = useState103("");
|
|
24423
24424
|
const value = controlled ?? internal;
|
|
24424
24425
|
const setValue = onValueChange ?? setInternal;
|
|
24425
24426
|
const canSend = value.trim().length > 0 && !disabled;
|
|
@@ -24479,10 +24480,10 @@ import ReactMarkdown3, { defaultUrlTransform } from "react-markdown";
|
|
|
24479
24480
|
import remarkGfm3 from "remark-gfm";
|
|
24480
24481
|
|
|
24481
24482
|
// src/features/assistant-message/components/parts/MessageSourcesContainer.tsx
|
|
24482
|
-
import { useEffect as useEffect76, useMemo as useMemo51, useState as
|
|
24483
|
+
import { useEffect as useEffect76, useMemo as useMemo51, useState as useState106 } from "react";
|
|
24483
24484
|
|
|
24484
24485
|
// src/features/assistant-message/components/parts/MessageSourcesPanel.tsx
|
|
24485
|
-
import { useMemo as useMemo50, useState as
|
|
24486
|
+
import { useMemo as useMemo50, useState as useState105 } from "react";
|
|
24486
24487
|
import { useTranslations as useTranslations138 } from "next-intl";
|
|
24487
24488
|
import { ChevronDown as ChevronDown4, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
24488
24489
|
|
|
@@ -24541,7 +24542,7 @@ function ReferencesTab({ references }) {
|
|
|
24541
24542
|
__name(ReferencesTab, "ReferencesTab");
|
|
24542
24543
|
|
|
24543
24544
|
// src/features/assistant-message/components/parts/tabs/CitationsTab.tsx
|
|
24544
|
-
import { Fragment as Fragment53, useState as
|
|
24545
|
+
import { Fragment as Fragment53, useState as useState104 } from "react";
|
|
24545
24546
|
import { useTranslations as useTranslations135 } from "next-intl";
|
|
24546
24547
|
import { ChevronDown as ChevronDown3, HelpCircle } from "lucide-react";
|
|
24547
24548
|
import ReactMarkdown2 from "react-markdown";
|
|
@@ -24584,7 +24585,7 @@ function CitationsTab({ citations, sources }) {
|
|
|
24584
24585
|
const t = useTranslations135();
|
|
24585
24586
|
const entityLabel = useEntityLabel();
|
|
24586
24587
|
const isMobile = useIsMobile();
|
|
24587
|
-
const [expanded, setExpanded] =
|
|
24588
|
+
const [expanded, setExpanded] = useState104(/* @__PURE__ */ new Set());
|
|
24588
24589
|
if (citations.length === 0) return null;
|
|
24589
24590
|
const sorted = [...citations].sort((a, b) => (b.relevance ?? 0) - (a.relevance ?? 0));
|
|
24590
24591
|
const toggle = /* @__PURE__ */ __name((id) => {
|
|
@@ -24852,8 +24853,8 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
24852
24853
|
if (usersCount > 0) visibleTabs.push("users");
|
|
24853
24854
|
const autoOpen = isLatestAssistant && suggestionsCount > 0;
|
|
24854
24855
|
const initialTab = autoOpen ? "suggested" : visibleTabs[0];
|
|
24855
|
-
const [open, setOpen] =
|
|
24856
|
-
const [active, setActive] =
|
|
24856
|
+
const [open, setOpen] = useState105(autoOpen);
|
|
24857
|
+
const [active, setActive] = useState105(initialTab);
|
|
24857
24858
|
if (total === 0) return null;
|
|
24858
24859
|
const panelId = `sources-panel-${message.id}`;
|
|
24859
24860
|
return /* @__PURE__ */ jsxs156("div", { className: "mt-2 w-full min-w-0", children: [
|
|
@@ -24935,7 +24936,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
24935
24936
|
}
|
|
24936
24937
|
return parts.sort().join("|");
|
|
24937
24938
|
}, [groups]);
|
|
24938
|
-
const [resolved, setResolved] =
|
|
24939
|
+
const [resolved, setResolved] = useState106([]);
|
|
24939
24940
|
useEffect76(() => {
|
|
24940
24941
|
if (groups.size === 0) {
|
|
24941
24942
|
setResolved((current) => current.length === 0 ? current : []);
|
|
@@ -25150,7 +25151,7 @@ __name(AssistantThread, "AssistantThread");
|
|
|
25150
25151
|
|
|
25151
25152
|
// src/features/handbook/hooks/useHandbookAsk.ts
|
|
25152
25153
|
import { useTranslations as useTranslations141 } from "next-intl";
|
|
25153
|
-
import { useCallback as useCallback49, useEffect as useEffect78, useState as
|
|
25154
|
+
import { useCallback as useCallback49, useEffect as useEffect78, useState as useState107 } from "react";
|
|
25154
25155
|
import { v4 as v414 } from "uuid";
|
|
25155
25156
|
function withSources(messages, label) {
|
|
25156
25157
|
return messages.map((message) => withSourcesInContent(message, label));
|
|
@@ -25178,10 +25179,10 @@ function useHandbookAsk(params) {
|
|
|
25178
25179
|
const generateUrl = usePageUrlGenerator();
|
|
25179
25180
|
const shouldSyncUrl = params?.syncUrl ?? true;
|
|
25180
25181
|
const handbookThreadId = params?.handbookThreadId;
|
|
25181
|
-
const [threads, setThreads] =
|
|
25182
|
-
const [thread, setThread] =
|
|
25183
|
-
const [messages, setMessages] =
|
|
25184
|
-
const [sending, setSending] =
|
|
25182
|
+
const [threads, setThreads] = useState107([]);
|
|
25183
|
+
const [thread, setThread] = useState107(void 0);
|
|
25184
|
+
const [messages, setMessages] = useState107([]);
|
|
25185
|
+
const [sending, setSending] = useState107(false);
|
|
25185
25186
|
const sourcesLabel = t("handbook.chat.sources");
|
|
25186
25187
|
useEffect78(() => {
|
|
25187
25188
|
let cancelled = false;
|
|
@@ -25286,7 +25287,7 @@ function HandbookAskSheet({ handbookPageId } = {}) {
|
|
|
25286
25287
|
const t = useTranslations142();
|
|
25287
25288
|
const generateUrl = usePageUrlGenerator();
|
|
25288
25289
|
const { threads, thread, messages, sending, ask, selectThread } = useHandbookAsk({ syncUrl: false });
|
|
25289
|
-
const [scoped, setScoped] =
|
|
25290
|
+
const [scoped, setScoped] = useState108(false);
|
|
25290
25291
|
const chatUrl = `${generateUrl({ page: Modules.HandbookPage })}/chat`;
|
|
25291
25292
|
const showThread = !!thread || sending || messages.length > 0;
|
|
25292
25293
|
const send = useCallback50(
|
|
@@ -25347,11 +25348,11 @@ __name(HandbookAskSheet, "HandbookAskSheet");
|
|
|
25347
25348
|
|
|
25348
25349
|
// src/features/handbook/components/forms/HandbookSyncButton.tsx
|
|
25349
25350
|
import { useTranslations as useTranslations143 } from "next-intl";
|
|
25350
|
-
import { useState as
|
|
25351
|
+
import { useState as useState109 } from "react";
|
|
25351
25352
|
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
25352
25353
|
function HandbookSyncButton({ refresh }) {
|
|
25353
25354
|
const t = useTranslations143();
|
|
25354
|
-
const [isSyncing, setIsSyncing] =
|
|
25355
|
+
const [isSyncing, setIsSyncing] = useState109(false);
|
|
25355
25356
|
const onSync = /* @__PURE__ */ __name(async () => {
|
|
25356
25357
|
setIsSyncing(true);
|
|
25357
25358
|
try {
|
|
@@ -25468,10 +25469,10 @@ __name(splitByNesting, "splitByNesting");
|
|
|
25468
25469
|
import { Fragment as Fragment55, jsx as jsx279, jsxs as jsxs163 } from "react/jsx-runtime";
|
|
25469
25470
|
function HandbookContents() {
|
|
25470
25471
|
const t = useTranslations145();
|
|
25471
|
-
const [pages, setPages] =
|
|
25472
|
-
const [sections, setSections] =
|
|
25473
|
-
const [isLoading, setIsLoading] =
|
|
25474
|
-
const [reloadToken, setReloadToken] =
|
|
25472
|
+
const [pages, setPages] = useState110([]);
|
|
25473
|
+
const [sections, setSections] = useState110([]);
|
|
25474
|
+
const [isLoading, setIsLoading] = useState110(true);
|
|
25475
|
+
const [reloadToken, setReloadToken] = useState110(0);
|
|
25475
25476
|
useEffect79(() => {
|
|
25476
25477
|
let cancelled = false;
|
|
25477
25478
|
const load = /* @__PURE__ */ __name(async () => {
|
|
@@ -25562,7 +25563,7 @@ __name(HandbookAdminContainer, "HandbookAdminContainer");
|
|
|
25562
25563
|
|
|
25563
25564
|
// src/features/handbook/components/containers/HandbookPageContainer.tsx
|
|
25564
25565
|
import { useTranslations as useTranslations149 } from "next-intl";
|
|
25565
|
-
import { useEffect as useEffect82, useMemo as useMemo58, useState as
|
|
25566
|
+
import { useEffect as useEffect82, useMemo as useMemo58, useState as useState112 } from "react";
|
|
25566
25567
|
|
|
25567
25568
|
// src/features/handbook/components/details/HandbookPageDetails.tsx
|
|
25568
25569
|
import { jsx as jsx281 } from "react/jsx-runtime";
|
|
@@ -25618,13 +25619,13 @@ __name(HandbookPageNeighbours, "HandbookPageNeighbours");
|
|
|
25618
25619
|
// src/features/handbook/components/details/HandbookPageToc.tsx
|
|
25619
25620
|
import { List } from "lucide-react";
|
|
25620
25621
|
import { useTranslations as useTranslations147 } from "next-intl";
|
|
25621
|
-
import { useCallback as useCallback52, useEffect as useEffect80, useState as
|
|
25622
|
+
import { useCallback as useCallback52, useEffect as useEffect80, useState as useState111 } from "react";
|
|
25622
25623
|
import { jsx as jsx283, jsxs as jsxs165 } from "react/jsx-runtime";
|
|
25623
25624
|
function HandbookPageToc({ containerId }) {
|
|
25624
25625
|
const t = useTranslations147();
|
|
25625
|
-
const [activeId, setActiveId] =
|
|
25626
|
-
const [headings, setHeadings] =
|
|
25627
|
-
const [headingsWithIds, setHeadingsWithIds] =
|
|
25626
|
+
const [activeId, setActiveId] = useState111(null);
|
|
25627
|
+
const [headings, setHeadings] = useState111([]);
|
|
25628
|
+
const [headingsWithIds, setHeadingsWithIds] = useState111(/* @__PURE__ */ new Map());
|
|
25628
25629
|
useEffect80(() => {
|
|
25629
25630
|
const contentPanel = document.getElementById(containerId);
|
|
25630
25631
|
if (!contentPanel) return;
|
|
@@ -25789,10 +25790,10 @@ import { jsx as jsx285, jsxs as jsxs167 } from "react/jsx-runtime";
|
|
|
25789
25790
|
var CONTENT_CONTAINER_ID = "handbook-page-content";
|
|
25790
25791
|
function HandbookPageContainer({ handbookPageId }) {
|
|
25791
25792
|
const t = useTranslations149();
|
|
25792
|
-
const [handbookPage, setHandbookPage] =
|
|
25793
|
-
const [pages, setPages] =
|
|
25794
|
-
const [sections, setSections] =
|
|
25795
|
-
const [isLoading, setIsLoading] =
|
|
25793
|
+
const [handbookPage, setHandbookPage] = useState112(void 0);
|
|
25794
|
+
const [pages, setPages] = useState112([]);
|
|
25795
|
+
const [sections, setSections] = useState112([]);
|
|
25796
|
+
const [isLoading, setIsLoading] = useState112(true);
|
|
25796
25797
|
useEffect82(() => {
|
|
25797
25798
|
let cancelled = false;
|
|
25798
25799
|
const load = /* @__PURE__ */ __name(async () => {
|
|
@@ -26034,14 +26035,14 @@ __name(EntityMentionLinkView, "EntityMentionLinkView");
|
|
|
26034
26035
|
var EntityMentionLink = /* @__PURE__ */ __name((p) => /* @__PURE__ */ jsx288(EntityMentionLinkView, { ...p }), "EntityMentionLink");
|
|
26035
26036
|
|
|
26036
26037
|
// src/features/assistant/components/parts/AssistantEmptyState.tsx
|
|
26037
|
-
import { useState as
|
|
26038
|
+
import { useState as useState113 } from "react";
|
|
26038
26039
|
import { useTranslations as useTranslations152 } from "next-intl";
|
|
26039
26040
|
import { Sparkles as Sparkles4 } from "lucide-react";
|
|
26040
26041
|
import { jsx as jsx289, jsxs as jsxs170 } from "react/jsx-runtime";
|
|
26041
26042
|
var STARTER_KEYS = ["a", "b", "c", "d"];
|
|
26042
26043
|
function AssistantEmptyState({ onSend, operatorMode = false, onOperatorModeChange, composerLeading }) {
|
|
26043
26044
|
const t = useTranslations152();
|
|
26044
|
-
const [draft, setDraft] =
|
|
26045
|
+
const [draft, setDraft] = useState113("");
|
|
26045
26046
|
return /* @__PURE__ */ jsx289("div", { className: "flex h-full w-full items-center justify-center p-10", children: /* @__PURE__ */ jsxs170("div", { className: "flex w-full max-w-2xl flex-col gap-6", children: [
|
|
26046
26047
|
/* @__PURE__ */ jsxs170("div", { className: "text-center", children: [
|
|
26047
26048
|
/* @__PURE__ */ jsx289("div", { className: "mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-blue-400 to-violet-500 text-white", children: /* @__PURE__ */ jsx289(Sparkles4, { className: "h-5 w-5" }) }),
|
|
@@ -26079,14 +26080,14 @@ function AssistantEmptyState({ onSend, operatorMode = false, onOperatorModeChang
|
|
|
26079
26080
|
__name(AssistantEmptyState, "AssistantEmptyState");
|
|
26080
26081
|
|
|
26081
26082
|
// src/features/assistant/components/parts/AssistantThreadHeader.tsx
|
|
26082
|
-
import { useState as
|
|
26083
|
+
import { useState as useState114 } from "react";
|
|
26083
26084
|
import { useTranslations as useTranslations153 } from "next-intl";
|
|
26084
26085
|
import { jsx as jsx290, jsxs as jsxs171 } from "react/jsx-runtime";
|
|
26085
26086
|
function AssistantThreadHeader({ assistant, onRename, onDelete, renamePlaceholder, deleteConfirmLabel }) {
|
|
26086
26087
|
const t = useTranslations153();
|
|
26087
|
-
const [renameValue, setRenameValue] =
|
|
26088
|
-
const [renameOpen, setRenameOpen] =
|
|
26089
|
-
const [deleteOpen, setDeleteOpen] =
|
|
26088
|
+
const [renameValue, setRenameValue] = useState114(assistant.title);
|
|
26089
|
+
const [renameOpen, setRenameOpen] = useState114(false);
|
|
26090
|
+
const [deleteOpen, setDeleteOpen] = useState114(false);
|
|
26090
26091
|
const handleRename = /* @__PURE__ */ __name(async () => {
|
|
26091
26092
|
const trimmed = renameValue.trim() || assistant.title;
|
|
26092
26093
|
await onRename(trimmed);
|
|
@@ -26238,7 +26239,7 @@ import { useTranslations as useTranslations156 } from "next-intl";
|
|
|
26238
26239
|
// src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx
|
|
26239
26240
|
import { ArrowUp as ArrowUp2 } from "lucide-react";
|
|
26240
26241
|
import { useTranslations as useTranslations155 } from "next-intl";
|
|
26241
|
-
import { useCallback as useCallback53, useId as useId5, useState as
|
|
26242
|
+
import { useCallback as useCallback53, useId as useId5, useState as useState115 } from "react";
|
|
26242
26243
|
import { jsx as jsx292, jsxs as jsxs173 } from "react/jsx-runtime";
|
|
26243
26244
|
function flattenBlocks(blocks) {
|
|
26244
26245
|
const lines = [];
|
|
@@ -26276,9 +26277,9 @@ function AssistantBlockNoteComposer({
|
|
|
26276
26277
|
}) {
|
|
26277
26278
|
const t = useTranslations155();
|
|
26278
26279
|
const editorId = useId5().replace(/[^a-zA-Z0-9]/g, "");
|
|
26279
|
-
const [blocks, setBlocks] =
|
|
26280
|
-
const [isEmpty, setIsEmpty] =
|
|
26281
|
-
const [resetKey, setResetKey] =
|
|
26280
|
+
const [blocks, setBlocks] = useState115([]);
|
|
26281
|
+
const [isEmpty, setIsEmpty] = useState115(true);
|
|
26282
|
+
const [resetKey, setResetKey] = useState115(0);
|
|
26282
26283
|
const canSend = !isEmpty && !disabled;
|
|
26283
26284
|
const submit = useCallback53(async () => {
|
|
26284
26285
|
if (isEmpty || disabled) return;
|
|
@@ -26417,7 +26418,7 @@ __name(AssistantPageContainer, "AssistantPageContainer");
|
|
|
26417
26418
|
// src/features/assistant-action/components/ApprovalActionCard.tsx
|
|
26418
26419
|
import { ShieldAlert as ShieldAlert2 } from "lucide-react";
|
|
26419
26420
|
import { useTranslations as useTranslations157 } from "next-intl";
|
|
26420
|
-
import { Fragment as Fragment61, useEffect as useEffect83, useMemo as useMemo61, useState as
|
|
26421
|
+
import { Fragment as Fragment61, useEffect as useEffect83, useMemo as useMemo61, useState as useState116 } from "react";
|
|
26421
26422
|
import { jsx as jsx294, jsxs as jsxs175 } from "react/jsx-runtime";
|
|
26422
26423
|
var STATUS_VARIANT2 = {
|
|
26423
26424
|
pending: "softBlue",
|
|
@@ -26609,13 +26610,13 @@ function parseLegacyProposal(toolArgs) {
|
|
|
26609
26610
|
__name(parseLegacyProposal, "parseLegacyProposal");
|
|
26610
26611
|
function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipKeys }) {
|
|
26611
26612
|
const t = useTranslations157();
|
|
26612
|
-
const [status, setStatus] =
|
|
26613
|
-
const [actionSummary, setActionSummary] =
|
|
26614
|
-
const [toolName, setToolName] =
|
|
26615
|
-
const [toolArgs, setToolArgs] =
|
|
26616
|
-
const [actionProposal, setActionProposal] =
|
|
26617
|
-
const [busy, setBusy] =
|
|
26618
|
-
const [failed, setFailed] =
|
|
26613
|
+
const [status, setStatus] = useState116(void 0);
|
|
26614
|
+
const [actionSummary, setActionSummary] = useState116(void 0);
|
|
26615
|
+
const [toolName, setToolName] = useState116(void 0);
|
|
26616
|
+
const [toolArgs, setToolArgs] = useState116(void 0);
|
|
26617
|
+
const [actionProposal, setActionProposal] = useState116(void 0);
|
|
26618
|
+
const [busy, setBusy] = useState116(false);
|
|
26619
|
+
const [failed, setFailed] = useState116(false);
|
|
26619
26620
|
useEffect83(() => {
|
|
26620
26621
|
let cancelled = false;
|
|
26621
26622
|
(async () => {
|
|
@@ -26786,7 +26787,7 @@ var NotificationErrorBoundary = class extends Component {
|
|
|
26786
26787
|
// src/features/notification/components/containers/NotificationsListContainer.tsx
|
|
26787
26788
|
import { useTranslations as useTranslations162 } from "next-intl";
|
|
26788
26789
|
import { useSearchParams as useSearchParams5 } from "next/navigation";
|
|
26789
|
-
import { useState as
|
|
26790
|
+
import { useState as useState117 } from "react";
|
|
26790
26791
|
|
|
26791
26792
|
// src/features/notification/components/filters/NotificationViewSwitcher.tsx
|
|
26792
26793
|
import { useTranslations as useTranslations159 } from "next-intl";
|
|
@@ -26987,7 +26988,7 @@ function NotificationsListContainerContent() {
|
|
|
26987
26988
|
const searchParams = useSearchParams5();
|
|
26988
26989
|
const { error } = useNotificationContext();
|
|
26989
26990
|
const tabParam = searchParams.get("tab");
|
|
26990
|
-
const [mode, setMode] =
|
|
26991
|
+
const [mode, setMode] = useState117(tabParam === "archived" ? "archived" : "inbox");
|
|
26991
26992
|
if (error) {
|
|
26992
26993
|
return /* @__PURE__ */ jsx300("div", { className: "flex items-center justify-center p-8 text-center", children: /* @__PURE__ */ jsxs178("div", { className: "text-destructive text-xs/relaxed", children: [
|
|
26993
26994
|
/* @__PURE__ */ jsx300("p", { children: t("notification.ui.list.error_loading", { error }) }),
|
|
@@ -27024,7 +27025,7 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
27024
27025
|
// src/features/notification/components/modals/NotificationModal.tsx
|
|
27025
27026
|
import { BellIcon as BellIcon2, ExternalLinkIcon } from "lucide-react";
|
|
27026
27027
|
import { useTranslations as useTranslations163 } from "next-intl";
|
|
27027
|
-
import { Fragment as Fragment62, useCallback as useCallback54, useEffect as useEffect85, useMemo as useMemo63, useRef as useRef46, useState as
|
|
27028
|
+
import { Fragment as Fragment62, useCallback as useCallback54, useEffect as useEffect85, useMemo as useMemo63, useRef as useRef46, useState as useState118 } from "react";
|
|
27028
27029
|
import { jsx as jsx301, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
27029
27030
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
27030
27031
|
const _instanceId = useRef46(Math.random().toString(36).substr(2, 9));
|
|
@@ -27046,7 +27047,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
27046
27047
|
} = useSocketContext();
|
|
27047
27048
|
const t = useTranslations163();
|
|
27048
27049
|
const generateUrl = usePageUrlGenerator();
|
|
27049
|
-
const [newNotifications, setNewNotifications] =
|
|
27050
|
+
const [newNotifications, setNewNotifications] = useState118(false);
|
|
27050
27051
|
const preventAutoClose = useRef46(false);
|
|
27051
27052
|
const circuitBreakerRef = useRef46({
|
|
27052
27053
|
count: 0,
|
|
@@ -27288,14 +27289,14 @@ import { useTranslations as useTranslations165 } from "next-intl";
|
|
|
27288
27289
|
// src/features/referral/components/ReferralWidget.tsx
|
|
27289
27290
|
import { Copy as Copy2, Loader2 as Loader27, Mail, Users } from "lucide-react";
|
|
27290
27291
|
import { useTranslations as useTranslations164 } from "next-intl";
|
|
27291
|
-
import { useCallback as useCallback55, useRef as useRef47, useState as
|
|
27292
|
+
import { useCallback as useCallback55, useRef as useRef47, useState as useState121 } from "react";
|
|
27292
27293
|
|
|
27293
27294
|
// src/features/referral/hooks/useReferralInvite.ts
|
|
27294
|
-
import { useState as
|
|
27295
|
+
import { useState as useState119 } from "react";
|
|
27295
27296
|
function useReferralInvite() {
|
|
27296
|
-
const [sending, setSending] =
|
|
27297
|
-
const [error, setError] =
|
|
27298
|
-
const [success, setSuccess] =
|
|
27297
|
+
const [sending, setSending] = useState119(false);
|
|
27298
|
+
const [error, setError] = useState119(null);
|
|
27299
|
+
const [success, setSuccess] = useState119(false);
|
|
27299
27300
|
const sendInvite = /* @__PURE__ */ __name(async (email) => {
|
|
27300
27301
|
if (!isReferralEnabled()) {
|
|
27301
27302
|
return;
|
|
@@ -27318,11 +27319,11 @@ function useReferralInvite() {
|
|
|
27318
27319
|
__name(useReferralInvite, "useReferralInvite");
|
|
27319
27320
|
|
|
27320
27321
|
// src/features/referral/hooks/useReferralStats.ts
|
|
27321
|
-
import { useEffect as useEffect87, useState as
|
|
27322
|
+
import { useEffect as useEffect87, useState as useState120 } from "react";
|
|
27322
27323
|
function useReferralStats() {
|
|
27323
|
-
const [stats, setStats] =
|
|
27324
|
-
const [loading, setLoading] =
|
|
27325
|
-
const [error, setError] =
|
|
27324
|
+
const [stats, setStats] = useState120(null);
|
|
27325
|
+
const [loading, setLoading] = useState120(true);
|
|
27326
|
+
const [error, setError] = useState120(null);
|
|
27326
27327
|
useEffect87(() => {
|
|
27327
27328
|
if (!isReferralEnabled()) {
|
|
27328
27329
|
setLoading(false);
|
|
@@ -27399,8 +27400,8 @@ function ReferralWidget({
|
|
|
27399
27400
|
};
|
|
27400
27401
|
const { stats, loading, error } = useReferralStats();
|
|
27401
27402
|
const { sendInvite, sending } = useReferralInvite();
|
|
27402
|
-
const [email, setEmail] =
|
|
27403
|
-
const [copied, setCopied] =
|
|
27403
|
+
const [email, setEmail] = useState121("");
|
|
27404
|
+
const [copied, setCopied] = useState121(false);
|
|
27404
27405
|
const linkInputRef = useRef47(null);
|
|
27405
27406
|
const config = getReferralConfig();
|
|
27406
27407
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
@@ -27565,7 +27566,7 @@ __name(ReferralDialog, "ReferralDialog");
|
|
|
27565
27566
|
// src/features/referral/components/containers/ReferralsAdminContainer.tsx
|
|
27566
27567
|
import { CopyIcon as CopyIcon3 } from "lucide-react";
|
|
27567
27568
|
import { useTranslations as useTranslations170 } from "next-intl";
|
|
27568
|
-
import { useEffect as useEffect88, useMemo as useMemo67, useRef as useRef48, useState as
|
|
27569
|
+
import { useEffect as useEffect88, useMemo as useMemo67, useRef as useRef48, useState as useState122 } from "react";
|
|
27569
27570
|
|
|
27570
27571
|
// src/features/referral/hooks/useReferralAdminReferralTableStructure.tsx
|
|
27571
27572
|
import { useTranslations as useTranslations166 } from "next-intl";
|
|
@@ -28096,9 +28097,9 @@ function useRefetchOnChange(retriever, key, value) {
|
|
|
28096
28097
|
__name(useRefetchOnChange, "useRefetchOnChange");
|
|
28097
28098
|
function ReferralsAdminContainer() {
|
|
28098
28099
|
const t = useTranslations170();
|
|
28099
|
-
const [period, setPeriod] =
|
|
28100
|
-
const [sort, setSort] =
|
|
28101
|
-
const [summary, setSummary] =
|
|
28100
|
+
const [period, setPeriod] = useState122("30d");
|
|
28101
|
+
const [sort, setSort] = useState122("paying");
|
|
28102
|
+
const [summary, setSummary] = useState122([]);
|
|
28102
28103
|
useEffect88(() => {
|
|
28103
28104
|
let cancelled = false;
|
|
28104
28105
|
ReferralAdminService.getSummary({ period }).then((rows) => {
|
|
@@ -28277,11 +28278,11 @@ __name(FormRoles, "FormRoles");
|
|
|
28277
28278
|
|
|
28278
28279
|
// src/features/role/components/forms/RemoveUserFromRole.tsx
|
|
28279
28280
|
import { useTranslations as useTranslations173 } from "next-intl";
|
|
28280
|
-
import { useEffect as useEffect90, useState as
|
|
28281
|
+
import { useEffect as useEffect90, useState as useState123 } from "react";
|
|
28281
28282
|
import { Fragment as Fragment65, jsx as jsx313, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
28282
28283
|
function RemoveUserFromRole({ role, user, refresh }) {
|
|
28283
|
-
const [open, setOpen] =
|
|
28284
|
-
const [canRemove, setCanRemove] =
|
|
28284
|
+
const [open, setOpen] = useState123(false);
|
|
28285
|
+
const [canRemove, setCanRemove] = useState123(false);
|
|
28285
28286
|
const t = useTranslations173();
|
|
28286
28287
|
useEffect90(() => {
|
|
28287
28288
|
async function checkCompanyAdminDeletability() {
|
|
@@ -28353,13 +28354,13 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
28353
28354
|
// src/features/role/components/forms/UserRoleAdd.tsx
|
|
28354
28355
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
28355
28356
|
import { useTranslations as useTranslations174 } from "next-intl";
|
|
28356
|
-
import { useCallback as useCallback56, useEffect as useEffect91, useRef as useRef49, useState as
|
|
28357
|
+
import { useCallback as useCallback56, useEffect as useEffect91, useRef as useRef49, useState as useState124 } from "react";
|
|
28357
28358
|
import { Fragment as Fragment66, jsx as jsx314, jsxs as jsxs190 } from "react/jsx-runtime";
|
|
28358
28359
|
function UserRoleAdd({ user, refresh }) {
|
|
28359
|
-
const [open, setOpen] =
|
|
28360
|
+
const [open, setOpen] = useState124(false);
|
|
28360
28361
|
const inputRef = useRef49(null);
|
|
28361
|
-
const [searchTerm, setSearchTerm] =
|
|
28362
|
-
const [roles, setRoles] =
|
|
28362
|
+
const [searchTerm, setSearchTerm] = useState124("");
|
|
28363
|
+
const [roles, setRoles] = useState124([]);
|
|
28363
28364
|
const t = useTranslations174();
|
|
28364
28365
|
const addUserToRole = /* @__PURE__ */ __name(async (role) => {
|
|
28365
28366
|
await RoleService.addUserToRole({
|
|
@@ -28674,12 +28675,12 @@ __name(OAuthScopeSelector, "OAuthScopeSelector");
|
|
|
28674
28675
|
|
|
28675
28676
|
// src/features/oauth/components/OAuthClientSecretDisplay.tsx
|
|
28676
28677
|
import { useTranslations as useTranslations179 } from "next-intl";
|
|
28677
|
-
import { useState as
|
|
28678
|
+
import { useState as useState125, useCallback as useCallback59 } from "react";
|
|
28678
28679
|
import { Copy as Copy3, Check, AlertTriangle } from "lucide-react";
|
|
28679
28680
|
import { jsx as jsx319, jsxs as jsxs193 } from "react/jsx-runtime";
|
|
28680
28681
|
function OAuthClientSecretDisplay({ secret, onDismiss, open, clientName }) {
|
|
28681
28682
|
const t = useTranslations179();
|
|
28682
|
-
const [copied, setCopied] =
|
|
28683
|
+
const [copied, setCopied] = useState125(false);
|
|
28683
28684
|
const handleCopy = useCallback59(async () => {
|
|
28684
28685
|
try {
|
|
28685
28686
|
await navigator.clipboard.writeText(secret);
|
|
@@ -28877,7 +28878,7 @@ __name(OAuthClientList, "OAuthClientList");
|
|
|
28877
28878
|
|
|
28878
28879
|
// src/features/oauth/components/OAuthClientForm.tsx
|
|
28879
28880
|
import { useTranslations as useTranslations182 } from "next-intl";
|
|
28880
|
-
import { useState as
|
|
28881
|
+
import { useState as useState126, useCallback as useCallback60 } from "react";
|
|
28881
28882
|
import { jsx as jsx322, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
28882
28883
|
function OAuthClientForm({
|
|
28883
28884
|
client,
|
|
@@ -28889,14 +28890,14 @@ function OAuthClientForm({
|
|
|
28889
28890
|
}) {
|
|
28890
28891
|
const t = useTranslations182();
|
|
28891
28892
|
const isEditMode = !!client;
|
|
28892
|
-
const [formState, setFormState] =
|
|
28893
|
+
const [formState, setFormState] = useState126({
|
|
28893
28894
|
name: client?.name || "",
|
|
28894
28895
|
description: client?.description || "",
|
|
28895
28896
|
redirectUris: client?.redirectUris?.length ? client.redirectUris : [""],
|
|
28896
28897
|
allowedScopes: client ? client.allowedScopes || [] : defaultScopes,
|
|
28897
28898
|
isConfidential: client?.isConfidential ?? true
|
|
28898
28899
|
});
|
|
28899
|
-
const [errors, setErrors] =
|
|
28900
|
+
const [errors, setErrors] = useState126({});
|
|
28900
28901
|
const validate = useCallback60(() => {
|
|
28901
28902
|
const newErrors = {};
|
|
28902
28903
|
if (!formState.name.trim()) {
|
|
@@ -29024,7 +29025,7 @@ __name(OAuthClientForm, "OAuthClientForm");
|
|
|
29024
29025
|
|
|
29025
29026
|
// src/features/oauth/components/OAuthClientDetail.tsx
|
|
29026
29027
|
import { useTranslations as useTranslations183 } from "next-intl";
|
|
29027
|
-
import { useState as
|
|
29028
|
+
import { useState as useState127, useCallback as useCallback61 } from "react";
|
|
29028
29029
|
import { Copy as Copy4, Check as Check2, RefreshCw as RefreshCw3, Pencil as Pencil2, Trash2 as Trash25, ExternalLink } from "lucide-react";
|
|
29029
29030
|
import { Fragment as Fragment67, jsx as jsx323, jsxs as jsxs197 } from "react/jsx-runtime";
|
|
29030
29031
|
function OAuthClientDetail({
|
|
@@ -29037,11 +29038,11 @@ function OAuthClientDetail({
|
|
|
29037
29038
|
const t = useTranslations183();
|
|
29038
29039
|
const { format } = useDateFormatter();
|
|
29039
29040
|
const scopeText = useOAuthScopeText();
|
|
29040
|
-
const [copiedField, setCopiedField] =
|
|
29041
|
-
const [showDeleteConfirm, setShowDeleteConfirm] =
|
|
29042
|
-
const [showRegenerateConfirm, setShowRegenerateConfirm] =
|
|
29043
|
-
const [isDeleting, setIsDeleting] =
|
|
29044
|
-
const [isRegenerating, setIsRegenerating] =
|
|
29041
|
+
const [copiedField, setCopiedField] = useState127(null);
|
|
29042
|
+
const [showDeleteConfirm, setShowDeleteConfirm] = useState127(false);
|
|
29043
|
+
const [showRegenerateConfirm, setShowRegenerateConfirm] = useState127(false);
|
|
29044
|
+
const [isDeleting, setIsDeleting] = useState127(false);
|
|
29045
|
+
const [isRegenerating, setIsRegenerating] = useState127(false);
|
|
29045
29046
|
const copyToClipboard2 = useCallback61(async (text, field) => {
|
|
29046
29047
|
try {
|
|
29047
29048
|
await navigator.clipboard.writeText(text);
|
|
@@ -29346,7 +29347,7 @@ __name(OAuthConsentScreen, "OAuthConsentScreen");
|
|
|
29346
29347
|
import { zodResolver as zodResolver13 } from "@hookform/resolvers/zod";
|
|
29347
29348
|
import { CheckCircle as CheckCircle2, Mail as Mail2 } from "lucide-react";
|
|
29348
29349
|
import { useTranslations as useTranslations189 } from "next-intl";
|
|
29349
|
-
import { useState as
|
|
29350
|
+
import { useState as useState128 } from "react";
|
|
29350
29351
|
import { useForm as useForm13 } from "react-hook-form";
|
|
29351
29352
|
import { v4 as v415 } from "uuid";
|
|
29352
29353
|
import { z as z14 } from "zod";
|
|
@@ -29448,8 +29449,8 @@ __name(WaitlistQuestionnaireRenderer, "WaitlistQuestionnaireRenderer");
|
|
|
29448
29449
|
import { Fragment as Fragment69, jsx as jsx330, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
29449
29450
|
function WaitlistForm({ onSuccess }) {
|
|
29450
29451
|
const t = useTranslations189();
|
|
29451
|
-
const [isSubmitting, setIsSubmitting] =
|
|
29452
|
-
const [isSuccess, setIsSuccess] =
|
|
29452
|
+
const [isSubmitting, setIsSubmitting] = useState128(false);
|
|
29453
|
+
const [isSuccess, setIsSuccess] = useState128(false);
|
|
29453
29454
|
const config = getWaitlistConfig();
|
|
29454
29455
|
const questionnaireFields = config.questionnaire ?? [];
|
|
29455
29456
|
const questionnaireSchema = questionnaireFields.reduce(
|
|
@@ -29630,12 +29631,12 @@ __name(WaitlistSuccessState, "WaitlistSuccessState");
|
|
|
29630
29631
|
// src/features/waitlist/components/sections/WaitlistConfirmation.tsx
|
|
29631
29632
|
import { CheckCircle as CheckCircle5, Loader2 as Loader29, XCircle as XCircle3 } from "lucide-react";
|
|
29632
29633
|
import { useTranslations as useTranslations191 } from "next-intl";
|
|
29633
|
-
import { useEffect as useEffect92, useState as
|
|
29634
|
+
import { useEffect as useEffect92, useState as useState129 } from "react";
|
|
29634
29635
|
import { jsx as jsx333, jsxs as jsxs207 } from "react/jsx-runtime";
|
|
29635
29636
|
function WaitlistConfirmation({ code }) {
|
|
29636
29637
|
const t = useTranslations191();
|
|
29637
|
-
const [state, setState] =
|
|
29638
|
-
const [errorMessage, setErrorMessage] =
|
|
29638
|
+
const [state, setState] = useState129("loading");
|
|
29639
|
+
const [errorMessage, setErrorMessage] = useState129("");
|
|
29639
29640
|
useEffect92(() => {
|
|
29640
29641
|
async function confirmEmail() {
|
|
29641
29642
|
try {
|
|
@@ -29675,12 +29676,12 @@ __name(WaitlistConfirmation, "WaitlistConfirmation");
|
|
|
29675
29676
|
// src/features/waitlist/components/lists/WaitlistList.tsx
|
|
29676
29677
|
import { RefreshCw as RefreshCw4 } from "lucide-react";
|
|
29677
29678
|
import { useTranslations as useTranslations192 } from "next-intl";
|
|
29678
|
-
import { useCallback as useCallback62, useEffect as useEffect93, useMemo as useMemo69, useState as
|
|
29679
|
+
import { useCallback as useCallback62, useEffect as useEffect93, useMemo as useMemo69, useState as useState130 } from "react";
|
|
29679
29680
|
import { jsx as jsx334, jsxs as jsxs208 } from "react/jsx-runtime";
|
|
29680
29681
|
function WaitlistList({ fullWidth } = {}) {
|
|
29681
29682
|
const t = useTranslations192();
|
|
29682
|
-
const [statusFilter, setStatusFilter] =
|
|
29683
|
-
const [stats, setStats] =
|
|
29683
|
+
const [statusFilter, setStatusFilter] = useState130("all");
|
|
29684
|
+
const [stats, setStats] = useState130(void 0);
|
|
29684
29685
|
const data = useDataListRetriever({
|
|
29685
29686
|
retriever: /* @__PURE__ */ __name((params) => WaitlistService.findMany(params), "retriever"),
|
|
29686
29687
|
retrieverParams: {},
|
|
@@ -29777,7 +29778,7 @@ __name(WaitlistList, "WaitlistList");
|
|
|
29777
29778
|
// src/features/rbac/components/RbacContainer.tsx
|
|
29778
29779
|
import { Loader2Icon as Loader2Icon4 } from "lucide-react";
|
|
29779
29780
|
import { useTranslations as useTranslations194 } from "next-intl";
|
|
29780
|
-
import { memo as memo2, useCallback as useCallback64, useEffect as useEffect95, useMemo as useMemo70, useRef as useRef50, useState as
|
|
29781
|
+
import { memo as memo2, useCallback as useCallback64, useEffect as useEffect95, useMemo as useMemo70, useRef as useRef50, useState as useState132 } from "react";
|
|
29781
29782
|
|
|
29782
29783
|
// src/features/rbac/components/RbacPermissionCell.tsx
|
|
29783
29784
|
import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon14 } from "lucide-react";
|
|
@@ -29858,7 +29859,7 @@ __name(RbacPermissionCell, "RbacPermissionCell");
|
|
|
29858
29859
|
import { Popover as PopoverPrimitive2 } from "@base-ui/react/popover";
|
|
29859
29860
|
import { CheckIcon as CheckIcon10, MinusIcon as MinusIcon3, XIcon as XIcon15 } from "lucide-react";
|
|
29860
29861
|
import { useTranslations as useTranslations193 } from "next-intl";
|
|
29861
|
-
import { useCallback as useCallback63, useEffect as useEffect94, useState as
|
|
29862
|
+
import { useCallback as useCallback63, useEffect as useEffect94, useState as useState131 } from "react";
|
|
29862
29863
|
import { Fragment as Fragment70, jsx as jsx336, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
29863
29864
|
function RbacPermissionPicker({
|
|
29864
29865
|
open,
|
|
@@ -29871,7 +29872,7 @@ function RbacPermissionPicker({
|
|
|
29871
29872
|
onClose
|
|
29872
29873
|
}) {
|
|
29873
29874
|
const t = useTranslations193();
|
|
29874
|
-
const [customSegment, setCustomSegment] =
|
|
29875
|
+
const [customSegment, setCustomSegment] = useState131("");
|
|
29875
29876
|
useEffect94(() => {
|
|
29876
29877
|
if (!open) setCustomSegment("");
|
|
29877
29878
|
}, [open]);
|
|
@@ -30120,8 +30121,8 @@ var ModuleEditor = memo2(/* @__PURE__ */ __name(function ModuleEditor2({
|
|
|
30120
30121
|
function RbacContainer() {
|
|
30121
30122
|
const t = useTranslations194();
|
|
30122
30123
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
30123
|
-
const [selectedModuleId, setSelectedModuleId] =
|
|
30124
|
-
const [activePicker, setActivePicker] =
|
|
30124
|
+
const [selectedModuleId, setSelectedModuleId] = useState132(null);
|
|
30125
|
+
const [activePicker, setActivePicker] = useState132(null);
|
|
30125
30126
|
const openPicker = useCallback64((picker) => {
|
|
30126
30127
|
setActivePicker(picker);
|
|
30127
30128
|
}, []);
|
|
@@ -30232,7 +30233,7 @@ __name(RbacContainer, "RbacContainer");
|
|
|
30232
30233
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
30233
30234
|
import { Loader2Icon as Loader2Icon5 } from "lucide-react";
|
|
30234
30235
|
import { useTranslations as useTranslations195 } from "next-intl";
|
|
30235
|
-
import { Fragment as Fragment71, memo as memo3, useCallback as useCallback65, useEffect as useEffect96, useMemo as useMemo71, useRef as useRef51, useState as
|
|
30236
|
+
import { Fragment as Fragment71, memo as memo3, useCallback as useCallback65, useEffect as useEffect96, useMemo as useMemo71, useRef as useRef51, useState as useState133 } from "react";
|
|
30236
30237
|
import { jsx as jsx338, jsxs as jsxs212 } from "react/jsx-runtime";
|
|
30237
30238
|
function findToken2(tokens, action) {
|
|
30238
30239
|
if (!tokens) return void 0;
|
|
@@ -30270,8 +30271,8 @@ var ACTION_LABEL_KEYS2 = {
|
|
|
30270
30271
|
function RbacByRoleContainer() {
|
|
30271
30272
|
const t = useTranslations195();
|
|
30272
30273
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
30273
|
-
const [selectedRoleId, setSelectedRoleId] =
|
|
30274
|
-
const [activePicker, setActivePicker] =
|
|
30274
|
+
const [selectedRoleId, setSelectedRoleId] = useState133(null);
|
|
30275
|
+
const [activePicker, setActivePicker] = useState133(null);
|
|
30275
30276
|
const openPicker = useCallback65((picker) => {
|
|
30276
30277
|
setActivePicker(picker);
|
|
30277
30278
|
}, []);
|
|
@@ -31062,4 +31063,4 @@ export {
|
|
|
31062
31063
|
useOAuthClients,
|
|
31063
31064
|
useOAuthClient
|
|
31064
31065
|
};
|
|
31065
|
-
//# sourceMappingURL=chunk-
|
|
31066
|
+
//# sourceMappingURL=chunk-OVSR72CZ.mjs.map
|