@carlonicora/nextjs-jsonapi 6.28.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-SWDRMNLT.js → BlockNoteEditor-K4HWQLPJ.js} +21 -73
- package/dist/BlockNoteEditor-K4HWQLPJ.js.map +1 -0
- package/dist/{BlockNoteEditor-2LO34HXR.mjs → BlockNoteEditor-TDX2RC7I.mjs} +8 -60
- package/dist/BlockNoteEditor-TDX2RC7I.mjs.map +1 -0
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-NV3NNNS6.mjs → chunk-OVSR72CZ.mjs} +442 -380
- package/dist/chunk-OVSR72CZ.mjs.map +1 -0
- package/dist/{chunk-6RWEYSYE.js → chunk-QI4SCGPB.js} +69 -7
- 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/editors/BlockNoteEditorMentionHoverCard.d.ts.map +1 -1
- package/dist/components/editors/BlockNoteEditorMentionInlineContent.d.ts +2 -0
- package/dist/components/editors/BlockNoteEditorMentionInlineContent.d.ts.map +1 -1
- package/dist/components/editors/index.d.ts +1 -0
- package/dist/components/editors/index.d.ts.map +1 -1
- package/dist/components/forms/EditorSheet.d.ts.map +1 -1
- package/dist/components/index.js +4 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -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/editors/BlockNoteEditorMentionHoverCard.tsx +8 -1
- package/src/components/editors/BlockNoteEditorMentionInlineContent.tsx +3 -1
- package/src/components/editors/__tests__/BlockNoteEditorMentionHoverCard.spec.tsx +42 -0
- package/src/components/editors/__tests__/BlockNoteEditorMentionInlineContent.spec.ts +30 -2
- package/src/components/editors/__tests__/blocknote-editor-options.spec.ts +8 -0
- package/src/components/editors/index.ts +1 -0
- package/src/components/forms/EditorSheet.tsx +7 -2
- package/src/components/forms/__tests__/EditorSheet.spec.tsx +36 -0
- package/dist/BlockNoteEditor-2LO34HXR.mjs.map +0 -1
- package/dist/BlockNoteEditor-SWDRMNLT.js.map +0 -1
- package/dist/chunk-6RWEYSYE.js.map +0 -1
- package/dist/chunk-NV3NNNS6.mjs.map +0 -1
|
@@ -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);
|
|
@@ -17055,9 +17056,10 @@ function BlockNoteEditorMentionHoverCard({
|
|
|
17055
17056
|
top: rect.bottom + 4,
|
|
17056
17057
|
// rtl-ok: viewport-anchored floating position
|
|
17057
17058
|
left: rect.left,
|
|
17058
|
-
zIndex: 50
|
|
17059
|
+
zIndex: 50,
|
|
17060
|
+
...resolved.hoverFrameless ? { maxHeight: Math.max(240, window.innerHeight - rect.bottom - 12), overflowY: "auto" } : {}
|
|
17059
17061
|
},
|
|
17060
|
-
className: "bg-popover text-popover-foreground rounded-lg border p-2.5 text-xs shadow-md animate-in fade-in-0 zoom-in-95 duration-100",
|
|
17062
|
+
className: resolved.hoverFrameless ? "animate-in fade-in-0 zoom-in-95 duration-100" : "bg-popover text-popover-foreground rounded-lg border p-2.5 text-xs shadow-md animate-in fade-in-0 zoom-in-95 duration-100",
|
|
17061
17063
|
children: /* @__PURE__ */ jsx175(ContentComponent, { id: hovered.id, entityType: hovered.entityType, alias: hovered.alias })
|
|
17062
17064
|
}
|
|
17063
17065
|
),
|
|
@@ -17095,7 +17097,7 @@ var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableM
|
|
|
17095
17097
|
const displayName = nameResolver?.(props.id, props.entityType, props.alias) ?? props.alias;
|
|
17096
17098
|
if (disableMention) {
|
|
17097
17099
|
const resolved2 = resolveFn?.(props.id, props.entityType, displayName);
|
|
17098
|
-
return /* @__PURE__ */ jsxs99(Link3, { href: resolved2?.url ?? "#", className: "text-primary", children: [
|
|
17100
|
+
return /* @__PURE__ */ jsxs99(Link3, { href: resolved2?.url ?? "#", className: "text-primary", "data-mention-link": "", children: [
|
|
17099
17101
|
"@",
|
|
17100
17102
|
displayName
|
|
17101
17103
|
] });
|
|
@@ -17249,6 +17251,62 @@ function BlockNoteEditorMentionSuggestionMenu({
|
|
|
17249
17251
|
}
|
|
17250
17252
|
__name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMenu");
|
|
17251
17253
|
|
|
17254
|
+
// src/components/editors/blockNoteEditorOptions.ts
|
|
17255
|
+
import * as coreLocales from "@blocknote/core/locales";
|
|
17256
|
+
import { withCollaboration } from "@blocknote/core/yjs";
|
|
17257
|
+
function buildBlockNoteEditorOptions(params) {
|
|
17258
|
+
const { aiExtension, coreDictionary, aiDictionary, collaboration } = params;
|
|
17259
|
+
const options = {
|
|
17260
|
+
placeholders: {
|
|
17261
|
+
emptyDocument: params.placeholder
|
|
17262
|
+
},
|
|
17263
|
+
schema: params.schema,
|
|
17264
|
+
uploadFile: params.disableUploads ? void 0 : params.uploadFile,
|
|
17265
|
+
extensions: aiExtension ? [aiExtension] : void 0,
|
|
17266
|
+
dictionary: aiExtension ? { ...coreDictionary, ai: aiDictionary } : coreDictionary === coreLocales.en ? void 0 : coreDictionary
|
|
17267
|
+
};
|
|
17268
|
+
if (collaboration) return withCollaboration({ ...options, collaboration });
|
|
17269
|
+
return { ...options, initialContent: params.initialContent };
|
|
17270
|
+
}
|
|
17271
|
+
__name(buildBlockNoteEditorOptions, "buildBlockNoteEditorOptions");
|
|
17272
|
+
function resolveEditable(params) {
|
|
17273
|
+
return params.editable !== void 0 ? params.editable : params.onChange !== void 0;
|
|
17274
|
+
}
|
|
17275
|
+
__name(resolveEditable, "resolveEditable");
|
|
17276
|
+
function isBlockEmpty(block) {
|
|
17277
|
+
if (!block || typeof block !== "object") return true;
|
|
17278
|
+
if (block.type !== "paragraph") return false;
|
|
17279
|
+
if (Array.isArray(block.children) && block.children.length > 0 && !isDocumentEmpty(block.children)) {
|
|
17280
|
+
return false;
|
|
17281
|
+
}
|
|
17282
|
+
if (Array.isArray(block.content)) {
|
|
17283
|
+
for (const inline of block.content) {
|
|
17284
|
+
if (typeof inline === "string") {
|
|
17285
|
+
if (inline.trim()) return false;
|
|
17286
|
+
} else if (inline && typeof inline === "object") {
|
|
17287
|
+
if (inline.type !== "text") return false;
|
|
17288
|
+
if (typeof inline.text === "string" && inline.text.trim()) return false;
|
|
17289
|
+
}
|
|
17290
|
+
}
|
|
17291
|
+
} else if (typeof block.content === "string" && block.content.trim()) {
|
|
17292
|
+
return false;
|
|
17293
|
+
}
|
|
17294
|
+
return true;
|
|
17295
|
+
}
|
|
17296
|
+
__name(isBlockEmpty, "isBlockEmpty");
|
|
17297
|
+
function isDocumentEmpty(blocks) {
|
|
17298
|
+
if (!Array.isArray(blocks) || blocks.length === 0) return true;
|
|
17299
|
+
return blocks.every(isBlockEmpty);
|
|
17300
|
+
}
|
|
17301
|
+
__name(isDocumentEmpty, "isDocumentEmpty");
|
|
17302
|
+
function removeTrailingEmptyBlocks(blocks) {
|
|
17303
|
+
if (!blocks || blocks.length === 0) return blocks;
|
|
17304
|
+
const result = [...blocks];
|
|
17305
|
+
while (result.length > 1 && isBlockEmpty(result[result.length - 1])) result.pop();
|
|
17306
|
+
return result;
|
|
17307
|
+
}
|
|
17308
|
+
__name(removeTrailingEmptyBlocks, "removeTrailingEmptyBlocks");
|
|
17309
|
+
|
|
17252
17310
|
// src/components/viewers/BlockNoteViewerContainer.tsx
|
|
17253
17311
|
import dynamic2 from "next/dynamic";
|
|
17254
17312
|
import React29 from "react";
|
|
@@ -17260,14 +17318,14 @@ var BlockNoteViewerContainer = React29.memo(/* @__PURE__ */ __name(function View
|
|
|
17260
17318
|
|
|
17261
17319
|
// src/components/viewers/BlockNoteStaticViewer.tsx
|
|
17262
17320
|
import { useTheme as useTheme4 } from "next-themes";
|
|
17263
|
-
import { useEffect as useEffect47, useState as
|
|
17321
|
+
import { useEffect as useEffect47, useState as useState58 } from "react";
|
|
17264
17322
|
import { jsx as jsx179 } from "react/jsx-runtime";
|
|
17265
17323
|
function BlockNoteStaticViewer({
|
|
17266
17324
|
html,
|
|
17267
17325
|
size,
|
|
17268
17326
|
className
|
|
17269
17327
|
}) {
|
|
17270
|
-
const [mounted, setMounted] =
|
|
17328
|
+
const [mounted, setMounted] = useState58(false);
|
|
17271
17329
|
const { resolvedTheme } = useTheme4();
|
|
17272
17330
|
useEffect47(() => {
|
|
17273
17331
|
setMounted(true);
|
|
@@ -17292,11 +17350,11 @@ function BlockNoteStaticViewer({
|
|
|
17292
17350
|
__name(BlockNoteStaticViewer, "BlockNoteStaticViewer");
|
|
17293
17351
|
|
|
17294
17352
|
// src/components/pages/PageContainerContentDetails.tsx
|
|
17295
|
-
import { useEffect as useEffect48, useRef as useRef31, useState as
|
|
17353
|
+
import { useEffect as useEffect48, useRef as useRef31, useState as useState59 } from "react";
|
|
17296
17354
|
import { jsx as jsx180, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
17297
17355
|
function PageContainerContentDetails({ items, section, module, id }) {
|
|
17298
17356
|
const rewriteUrl = useUrlRewriter();
|
|
17299
|
-
const [isScrolled, setIsScrolled] =
|
|
17357
|
+
const [isScrolled, setIsScrolled] = useState59(false);
|
|
17300
17358
|
const sentinelRef = useRef31(null);
|
|
17301
17359
|
useEffect48(() => {
|
|
17302
17360
|
const sentinel = sentinelRef.current;
|
|
@@ -17331,11 +17389,11 @@ function PageContainerContentDetails({ items, section, module, id }) {
|
|
|
17331
17389
|
__name(PageContainerContentDetails, "PageContainerContentDetails");
|
|
17332
17390
|
|
|
17333
17391
|
// src/components/pages/PageContentContainer.tsx
|
|
17334
|
-
import { useEffect as useEffect49, useState as
|
|
17392
|
+
import { useEffect as useEffect49, useState as useState60 } from "react";
|
|
17335
17393
|
import { useDefaultLayout } from "react-resizable-panels";
|
|
17336
17394
|
import { jsx as jsx181, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
17337
17395
|
function PageContentContainer({ header, details, footer, content, fullBleed }) {
|
|
17338
|
-
const [mounted, setMounted] =
|
|
17396
|
+
const [mounted, setMounted] = useState60(false);
|
|
17339
17397
|
const isMobile = useIsMobile();
|
|
17340
17398
|
useEffect49(() => {
|
|
17341
17399
|
setMounted(true);
|
|
@@ -17523,12 +17581,12 @@ function JsonApiProvider({ config, children }) {
|
|
|
17523
17581
|
__name(JsonApiProvider, "JsonApiProvider");
|
|
17524
17582
|
|
|
17525
17583
|
// src/client/hooks/useJsonApiGet.ts
|
|
17526
|
-
import { useState as
|
|
17584
|
+
import { useState as useState61, useEffect as useEffect51, useCallback as useCallback31, useRef as useRef32 } from "react";
|
|
17527
17585
|
function useJsonApiGet(params) {
|
|
17528
|
-
const [data, setData] =
|
|
17529
|
-
const [loading, setLoading] =
|
|
17530
|
-
const [error, setError] =
|
|
17531
|
-
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);
|
|
17532
17590
|
const isMounted = useRef32(true);
|
|
17533
17591
|
const fetchData = useCallback31(async () => {
|
|
17534
17592
|
if (params.options?.enabled === false) return;
|
|
@@ -17623,12 +17681,12 @@ function useJsonApiGet(params) {
|
|
|
17623
17681
|
__name(useJsonApiGet, "useJsonApiGet");
|
|
17624
17682
|
|
|
17625
17683
|
// src/client/hooks/useJsonApiMutation.ts
|
|
17626
|
-
import { useState as
|
|
17684
|
+
import { useState as useState62, useCallback as useCallback32 } from "react";
|
|
17627
17685
|
function useJsonApiMutation(config) {
|
|
17628
|
-
const [data, setData] =
|
|
17629
|
-
const [loading, setLoading] =
|
|
17630
|
-
const [error, setError] =
|
|
17631
|
-
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);
|
|
17632
17690
|
const reset = useCallback32(() => {
|
|
17633
17691
|
setData(null);
|
|
17634
17692
|
setLoading(false);
|
|
@@ -18255,21 +18313,21 @@ registerTableGenerator("stripe-coupons", useStripeCouponTableStructure);
|
|
|
18255
18313
|
|
|
18256
18314
|
// src/features/billing/stripe-coupon/hooks/useStripeCouponCodeTableStructure.tsx
|
|
18257
18315
|
import { useTranslations as useTranslations77 } from "next-intl";
|
|
18258
|
-
import { useMemo as useMemo36, useState as
|
|
18316
|
+
import { useMemo as useMemo36, useState as useState68 } from "react";
|
|
18259
18317
|
|
|
18260
18318
|
// src/features/billing/contexts/CouponContext.tsx
|
|
18261
18319
|
import { useTranslations as useTranslations75 } from "next-intl";
|
|
18262
|
-
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";
|
|
18263
18321
|
|
|
18264
18322
|
// src/features/billing/stripe-coupon/components/forms/CouponRefresher.tsx
|
|
18265
18323
|
import { RefreshCwIcon as RefreshCwIcon4 } from "lucide-react";
|
|
18266
18324
|
import { useTranslations as useTranslations72 } from "next-intl";
|
|
18267
|
-
import { useState as
|
|
18325
|
+
import { useState as useState63 } from "react";
|
|
18268
18326
|
import { jsx as jsx193, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
18269
18327
|
function CouponRefresher({ coupon }) {
|
|
18270
18328
|
const t = useTranslations72();
|
|
18271
18329
|
const { refreshCounts } = useCouponContext();
|
|
18272
|
-
const [pending, setPending] =
|
|
18330
|
+
const [pending, setPending] = useState63(false);
|
|
18273
18331
|
return /* @__PURE__ */ jsxs103(
|
|
18274
18332
|
Button,
|
|
18275
18333
|
{
|
|
@@ -18298,7 +18356,7 @@ __name(CouponRefresher, "CouponRefresher");
|
|
|
18298
18356
|
// src/features/billing/stripe-coupon/components/forms/CouponEditor.tsx
|
|
18299
18357
|
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
|
18300
18358
|
import { useTranslations as useTranslations74 } from "next-intl";
|
|
18301
|
-
import { useCallback as useCallback33, useMemo as useMemo34, useState as
|
|
18359
|
+
import { useCallback as useCallback33, useMemo as useMemo34, useState as useState65 } from "react";
|
|
18302
18360
|
import { useForm as useForm5 } from "react-hook-form";
|
|
18303
18361
|
import { v4 as v45 } from "uuid";
|
|
18304
18362
|
import { z as z5 } from "zod";
|
|
@@ -18311,7 +18369,7 @@ __name(couponPageModule, "couponPageModule");
|
|
|
18311
18369
|
|
|
18312
18370
|
// src/features/billing/stripe-coupon/components/forms/CouponCodeFields.tsx
|
|
18313
18371
|
import { useTranslations as useTranslations73 } from "next-intl";
|
|
18314
|
-
import { useState as
|
|
18372
|
+
import { useState as useState64 } from "react";
|
|
18315
18373
|
import { z as z4 } from "zod";
|
|
18316
18374
|
import { jsx as jsx194, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
18317
18375
|
var rawNumber = /* @__PURE__ */ __name(() => z4.union([z4.string(), z4.number()]).nullish(), "rawNumber");
|
|
@@ -18395,7 +18453,7 @@ var couponCurrencyOptions = [
|
|
|
18395
18453
|
];
|
|
18396
18454
|
function CouponCodeFields({ form, prefix = "" }) {
|
|
18397
18455
|
const t = useTranslations73();
|
|
18398
|
-
const [now] =
|
|
18456
|
+
const [now] = useState64(() => /* @__PURE__ */ new Date());
|
|
18399
18457
|
return /* @__PURE__ */ jsxs104("div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
18400
18458
|
/* @__PURE__ */ jsx194(
|
|
18401
18459
|
FormInput,
|
|
@@ -18657,7 +18715,7 @@ function CouponCreateEditor({
|
|
|
18657
18715
|
const t = useTranslations74();
|
|
18658
18716
|
const router = useI18nRouter();
|
|
18659
18717
|
const { createCoupon } = useCouponContext();
|
|
18660
|
-
const [now] =
|
|
18718
|
+
const [now] = useState65(() => /* @__PURE__ */ new Date());
|
|
18661
18719
|
const formSchema = useMemo34(() => couponCreateSchema(t), [t]);
|
|
18662
18720
|
const getDefaultValues = useCallback33(
|
|
18663
18721
|
() => ({
|
|
@@ -18868,10 +18926,10 @@ var CouponProvider = /* @__PURE__ */ __name(({ children, dehydratedCoupon, publi
|
|
|
18868
18926
|
const t = useTranslations75();
|
|
18869
18927
|
const generateUrl = usePageUrlGenerator();
|
|
18870
18928
|
const { hasRole } = useCurrentUserContext();
|
|
18871
|
-
const [coupon, setCoupon] =
|
|
18929
|
+
const [coupon, setCoupon] = useState66(
|
|
18872
18930
|
dehydratedCoupon ? rehydrate(Modules.StripeCoupon, dehydratedCoupon) : void 0
|
|
18873
18931
|
);
|
|
18874
|
-
const [catalogueVersion, setCatalogueVersion] =
|
|
18932
|
+
const [catalogueVersion, setCatalogueVersion] = useState66(0);
|
|
18875
18933
|
const refreshCatalogue = useCallback34(() => setCatalogueVersion((value2) => value2 + 1), []);
|
|
18876
18934
|
const reloadCoupon = useCallback34(async () => {
|
|
18877
18935
|
if (!coupon?.id) return;
|
|
@@ -18979,13 +19037,13 @@ var useCouponContext = /* @__PURE__ */ __name(() => useContext28(CouponContext)
|
|
|
18979
19037
|
// src/features/billing/stripe-coupon/components/widgets/CouponCodeActions.tsx
|
|
18980
19038
|
import { PowerIcon, RotateCcwIcon } from "lucide-react";
|
|
18981
19039
|
import { useTranslations as useTranslations76 } from "next-intl";
|
|
18982
|
-
import { useState as
|
|
19040
|
+
import { useState as useState67 } from "react";
|
|
18983
19041
|
import { jsx as jsx197, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
18984
19042
|
function CouponCodeActions({ code, status }) {
|
|
18985
19043
|
const t = useTranslations76();
|
|
18986
19044
|
const { updateCodeFlags } = useCouponContext();
|
|
18987
|
-
const [open, setOpen] =
|
|
18988
|
-
const [pending, setPending] =
|
|
19045
|
+
const [open, setOpen] = useState67(false);
|
|
19046
|
+
const [pending, setPending] = useState67(false);
|
|
18989
19047
|
const isDead = status === "expired" || status === "used_up";
|
|
18990
19048
|
const isInactive = !code.active;
|
|
18991
19049
|
const scope = isInactive ? "reactivate" : "deactivate";
|
|
@@ -19057,7 +19115,7 @@ var useStripeCouponCodeTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
19057
19115
|
const t = useTranslations77();
|
|
19058
19116
|
const fmt = useBillingFormatOptions();
|
|
19059
19117
|
const { coupon } = useCouponContext();
|
|
19060
|
-
const [now] =
|
|
19118
|
+
const [now] = useState68(() => /* @__PURE__ */ new Date());
|
|
19061
19119
|
const tableData = useMemo36(() => {
|
|
19062
19120
|
return params.data.map((code) => {
|
|
19063
19121
|
const entry = { jsonApiData: code };
|
|
@@ -19510,7 +19568,7 @@ __name(useOAuthClients, "useOAuthClients");
|
|
|
19510
19568
|
// src/features/oauth/hooks/useOAuthClient.ts
|
|
19511
19569
|
import { useTranslations as useTranslations81 } from "next-intl";
|
|
19512
19570
|
import { useAtomValue as useAtomValue2, useSetAtom as useSetAtom2 } from "jotai";
|
|
19513
|
-
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";
|
|
19514
19572
|
function useOAuthClient(clientId) {
|
|
19515
19573
|
const storedClient = useAtomValue2(oauthClientByIdAtom(clientId));
|
|
19516
19574
|
const updateClientInStore = useSetAtom2(updateOAuthClientAtom);
|
|
@@ -19519,9 +19577,9 @@ function useOAuthClient(clientId) {
|
|
|
19519
19577
|
const t = useTranslations81();
|
|
19520
19578
|
const tRef = useRef34(t);
|
|
19521
19579
|
tRef.current = t;
|
|
19522
|
-
const [fetchedClient, setFetchedClient] =
|
|
19523
|
-
const [isLoading, setIsLoading] =
|
|
19524
|
-
const [error, setError] =
|
|
19580
|
+
const [fetchedClient, setFetchedClient] = useState69(null);
|
|
19581
|
+
const [isLoading, setIsLoading] = useState69(false);
|
|
19582
|
+
const [error, setError] = useState69(null);
|
|
19525
19583
|
const client = storedClient || fetchedClient;
|
|
19526
19584
|
const fetchClient = useCallback36(async () => {
|
|
19527
19585
|
if (!clientId) return;
|
|
@@ -19612,13 +19670,13 @@ __name(useOAuthClient, "useOAuthClient");
|
|
|
19612
19670
|
|
|
19613
19671
|
// src/features/oauth/hooks/useOAuthConsent.ts
|
|
19614
19672
|
import { useTranslations as useTranslations82 } from "next-intl";
|
|
19615
|
-
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";
|
|
19616
19674
|
function useOAuthConsent(params, options) {
|
|
19617
|
-
const [clientInfo, setClientInfo] =
|
|
19618
|
-
const [isLoading, setIsLoading] =
|
|
19619
|
-
const [error, setError] =
|
|
19620
|
-
const [isSubmitting, setIsSubmitting] =
|
|
19621
|
-
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);
|
|
19622
19680
|
const contextCompanyId = useCurrentUserContextOptional()?.company?.id;
|
|
19623
19681
|
const currentCompanyId = options?.defaultCompanyId ?? contextCompanyId;
|
|
19624
19682
|
const t = useTranslations82();
|
|
@@ -19736,20 +19794,20 @@ registerTableGenerator("waitlists", useWaitlistTableStructure);
|
|
|
19736
19794
|
import { flexRender, getCoreRowModel, getExpandedRowModel, useReactTable } from "@tanstack/react-table";
|
|
19737
19795
|
import { ChevronLeft, ChevronRight, Loader2 as Loader23 } from "lucide-react";
|
|
19738
19796
|
import { useTranslations as useTranslations85 } from "next-intl";
|
|
19739
|
-
import React31, { memo, useMemo as useMemo39, useState as
|
|
19797
|
+
import React31, { memo, useMemo as useMemo39, useState as useState72 } from "react";
|
|
19740
19798
|
|
|
19741
19799
|
// src/components/tables/ContentTableSearch.tsx
|
|
19742
19800
|
import { RefreshCw, Search, X as X3 } from "lucide-react";
|
|
19743
19801
|
import { useTranslations as useTranslations84 } from "next-intl";
|
|
19744
|
-
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";
|
|
19745
19803
|
import { jsx as jsx201, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
19746
19804
|
function ContentTableSearch({ data }) {
|
|
19747
19805
|
const t = useTranslations84();
|
|
19748
19806
|
const searchTermRef = useRef36("");
|
|
19749
19807
|
const inputRef = useRef36(null);
|
|
19750
|
-
const [searchTerm, setSearchTerm] =
|
|
19751
|
-
const [isFocused, setIsFocused] =
|
|
19752
|
-
const [isSearching, setIsSearching] =
|
|
19808
|
+
const [searchTerm, setSearchTerm] = useState71("");
|
|
19809
|
+
const [isFocused, setIsFocused] = useState71(false);
|
|
19810
|
+
const [isSearching, setIsSearching] = useState71(false);
|
|
19753
19811
|
const isExpanded = isFocused || searchTerm.length > 0;
|
|
19754
19812
|
const search = useCallback39(
|
|
19755
19813
|
async (searchedTerm) => {
|
|
@@ -19873,10 +19931,10 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
19873
19931
|
const { data, fields, checkedIds, toggleId, allowSearch, filters: _filters, fullWidth, onRowClick } = props;
|
|
19874
19932
|
const t = useTranslations85();
|
|
19875
19933
|
const isMobile = useIsMobile();
|
|
19876
|
-
const [expanded, setExpanded] =
|
|
19934
|
+
const [expanded, setExpanded] = useState72(
|
|
19877
19935
|
props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
|
|
19878
19936
|
);
|
|
19879
|
-
const [pendingDirection, setPendingDirection] =
|
|
19937
|
+
const [pendingDirection, setPendingDirection] = useState72(null);
|
|
19880
19938
|
React31.useEffect(() => {
|
|
19881
19939
|
if (data.isLoaded) setPendingDirection(null);
|
|
19882
19940
|
}, [data.isLoaded]);
|
|
@@ -20125,15 +20183,15 @@ __name(ContentListGrid, "ContentListGrid");
|
|
|
20125
20183
|
|
|
20126
20184
|
// src/components/fiscal/ItalianFiscalData.tsx
|
|
20127
20185
|
import { useTranslations as useTranslations86 } from "next-intl";
|
|
20128
|
-
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";
|
|
20129
20187
|
import { z as z6 } from "zod";
|
|
20130
20188
|
import { jsx as jsx204, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
20131
20189
|
var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
|
|
20132
20190
|
const t = useTranslations86();
|
|
20133
20191
|
const initialRef = useRef38(initialData);
|
|
20134
|
-
const [fiscalData, setFiscalData] =
|
|
20192
|
+
const [fiscalData, setFiscalData] = useState73(initialData);
|
|
20135
20193
|
const fiscalDataRef = useRef38(initialData);
|
|
20136
|
-
const [fiscalErrors, setFiscalErrors] =
|
|
20194
|
+
const [fiscalErrors, setFiscalErrors] = useState73({});
|
|
20137
20195
|
const updateFiscalField = useCallback40((key, value) => {
|
|
20138
20196
|
setFiscalData((prev) => {
|
|
20139
20197
|
const next = { ...prev, [key]: value };
|
|
@@ -20325,11 +20383,11 @@ __name(EntitySection, "EntitySection");
|
|
|
20325
20383
|
// src/features/account-deletion/components/AccountDeletionCancelledNotice.tsx
|
|
20326
20384
|
import { XIcon as XIcon11 } from "lucide-react";
|
|
20327
20385
|
import { useTranslations as useTranslations87 } from "next-intl";
|
|
20328
|
-
import { useEffect as useEffect57, useState as
|
|
20386
|
+
import { useEffect as useEffect57, useState as useState74 } from "react";
|
|
20329
20387
|
import { jsx as jsx210, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
20330
20388
|
function AccountDeletionCancelledNotice({ choosePlanHref }) {
|
|
20331
20389
|
const t = useTranslations87();
|
|
20332
|
-
const [visible, setVisible] =
|
|
20390
|
+
const [visible, setVisible] = useState74(false);
|
|
20333
20391
|
useEffect57(() => {
|
|
20334
20392
|
if (consumeAccountDeletionCancelled()) setVisible(true);
|
|
20335
20393
|
}, []);
|
|
@@ -20348,11 +20406,11 @@ __name(AccountDeletionCancelledNotice, "AccountDeletionCancelledNotice");
|
|
|
20348
20406
|
// src/features/account-deletion/components/AccountDeletionKeepContainer.tsx
|
|
20349
20407
|
import { CheckCircle, Loader2 as Loader24, XCircle as XCircle2 } from "lucide-react";
|
|
20350
20408
|
import { useTranslations as useTranslations88 } from "next-intl";
|
|
20351
|
-
import { useEffect as useEffect58, useRef as useRef39, useState as
|
|
20409
|
+
import { useEffect as useEffect58, useRef as useRef39, useState as useState75 } from "react";
|
|
20352
20410
|
import { jsx as jsx211, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
20353
20411
|
function AccountDeletionKeepContainer({ token }) {
|
|
20354
20412
|
const t = useTranslations88();
|
|
20355
|
-
const [state, setState] =
|
|
20413
|
+
const [state, setState] = useState75(token ? "loading" : "failure");
|
|
20356
20414
|
const called = useRef39(false);
|
|
20357
20415
|
useEffect58(() => {
|
|
20358
20416
|
if (!token || called.current) return;
|
|
@@ -20385,7 +20443,7 @@ __name(AccountDeletionKeepContainer, "AccountDeletionKeepContainer");
|
|
|
20385
20443
|
import Image8 from "next/image";
|
|
20386
20444
|
|
|
20387
20445
|
// src/features/auth/contexts/AuthContext.tsx
|
|
20388
|
-
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";
|
|
20389
20447
|
|
|
20390
20448
|
// src/features/auth/components/forms/Register.tsx
|
|
20391
20449
|
import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
|
|
@@ -20393,7 +20451,7 @@ import { Loader2 as Loader25 } from "lucide-react";
|
|
|
20393
20451
|
import { useTranslations as useTranslations90 } from "next-intl";
|
|
20394
20452
|
import Image7 from "next/image";
|
|
20395
20453
|
import { useSearchParams as useSearchParams2 } from "next/navigation";
|
|
20396
|
-
import { useEffect as useEffect59, useState as
|
|
20454
|
+
import { useEffect as useEffect59, useState as useState76 } from "react";
|
|
20397
20455
|
import { useForm as useForm6 } from "react-hook-form";
|
|
20398
20456
|
import { v4 as v46 } from "uuid";
|
|
20399
20457
|
import { z as z7 } from "zod";
|
|
@@ -20465,14 +20523,14 @@ function Register() {
|
|
|
20465
20523
|
const searchParams = useSearchParams2();
|
|
20466
20524
|
const inviteCode = searchParams.get("invite");
|
|
20467
20525
|
const registrationMode = getRegistrationMode();
|
|
20468
|
-
const [showConfirmation, setShowConfirmation] =
|
|
20469
|
-
const [inviteValidated, setInviteValidated] =
|
|
20470
|
-
const [inviteError, setInviteError] =
|
|
20471
|
-
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(
|
|
20472
20530
|
registrationMode === "waitlist" && !!inviteCode
|
|
20473
20531
|
);
|
|
20474
|
-
const [referralCode, setReferralCode2] =
|
|
20475
|
-
const [signupSource, setSignupSource] =
|
|
20532
|
+
const [referralCode, setReferralCode2] = useState76(null);
|
|
20533
|
+
const [signupSource, setSignupSource] = useState76(void 0);
|
|
20476
20534
|
useEffect59(() => {
|
|
20477
20535
|
const code = getReferralCode();
|
|
20478
20536
|
setReferralCode2(code);
|
|
@@ -20747,9 +20805,9 @@ var AuthContextProvider = /* @__PURE__ */ __name(({
|
|
|
20747
20805
|
initialComponentType,
|
|
20748
20806
|
initialParams
|
|
20749
20807
|
}) => {
|
|
20750
|
-
const [componentType, setComponentType] =
|
|
20751
|
-
const [params, setParams] =
|
|
20752
|
-
const [pendingTwoFactor, setPendingTwoFactor] =
|
|
20808
|
+
const [componentType, setComponentType] = useState77(initialComponentType);
|
|
20809
|
+
const [params, setParams] = useState77(initialParams);
|
|
20810
|
+
const [pendingTwoFactor, setPendingTwoFactor] = useState77();
|
|
20753
20811
|
const activeComponent = useMemo40(() => {
|
|
20754
20812
|
if (componentType === void 0) return null;
|
|
20755
20813
|
switch (componentType) {
|
|
@@ -20811,20 +20869,20 @@ __name(InnerAuthContainer, "InnerAuthContainer");
|
|
|
20811
20869
|
// src/features/auth/components/two-factor/TwoFactorSettings.tsx
|
|
20812
20870
|
import { ShieldAlert, ShieldCheck } from "lucide-react";
|
|
20813
20871
|
import { useTranslations as useTranslations97 } from "next-intl";
|
|
20814
|
-
import { useCallback as useCallback41, useEffect as useEffect61, useState as
|
|
20872
|
+
import { useCallback as useCallback41, useEffect as useEffect61, useState as useState85 } from "react";
|
|
20815
20873
|
import { v4 as v49 } from "uuid";
|
|
20816
20874
|
|
|
20817
20875
|
// src/features/auth/components/two-factor/BackupCodesDialog.tsx
|
|
20818
20876
|
import { Copy, Download, RefreshCw as RefreshCw2 } from "lucide-react";
|
|
20819
20877
|
import { useTranslations as useTranslations91 } from "next-intl";
|
|
20820
|
-
import { useState as
|
|
20878
|
+
import { useState as useState78 } from "react";
|
|
20821
20879
|
import { jsx as jsx216, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
20822
20880
|
function BackupCodesDialog({ remainingCodes, onRegenerate, trigger }) {
|
|
20823
20881
|
const t = useTranslations91();
|
|
20824
|
-
const [open, setOpen] =
|
|
20825
|
-
const [codes, setCodes] =
|
|
20826
|
-
const [isLoading, setIsLoading] =
|
|
20827
|
-
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);
|
|
20828
20886
|
const handleGenerate = /* @__PURE__ */ __name(async () => {
|
|
20829
20887
|
setIsLoading(true);
|
|
20830
20888
|
try {
|
|
@@ -20919,13 +20977,13 @@ __name(BackupCodesDialog, "BackupCodesDialog");
|
|
|
20919
20977
|
|
|
20920
20978
|
// src/features/auth/components/two-factor/DisableTwoFactorDialog.tsx
|
|
20921
20979
|
import { useTranslations as useTranslations92 } from "next-intl";
|
|
20922
|
-
import { useState as
|
|
20980
|
+
import { useState as useState80 } from "react";
|
|
20923
20981
|
|
|
20924
20982
|
// src/features/auth/components/two-factor/TotpInput.tsx
|
|
20925
|
-
import { useEffect as useEffect60, useRef as useRef40, useState as
|
|
20983
|
+
import { useEffect as useEffect60, useRef as useRef40, useState as useState79 } from "react";
|
|
20926
20984
|
import { jsx as jsx217, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
20927
20985
|
function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
20928
|
-
const [digits, setDigits] =
|
|
20986
|
+
const [digits, setDigits] = useState79(["", "", "", "", "", ""]);
|
|
20929
20987
|
const inputRefs = useRef40([]);
|
|
20930
20988
|
useEffect60(() => {
|
|
20931
20989
|
if (autoFocus && inputRefs.current[0]) {
|
|
@@ -20989,9 +21047,9 @@ __name(TotpInput, "TotpInput");
|
|
|
20989
21047
|
import { jsx as jsx218, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
20990
21048
|
function DisableTwoFactorDialog({ onSuccess, trigger }) {
|
|
20991
21049
|
const t = useTranslations92();
|
|
20992
|
-
const [open, setOpen] =
|
|
20993
|
-
const [isLoading, setIsLoading] =
|
|
20994
|
-
const [error, setError] =
|
|
21050
|
+
const [open, setOpen] = useState80(false);
|
|
21051
|
+
const [isLoading, setIsLoading] = useState80(false);
|
|
21052
|
+
const [error, setError] = useState80();
|
|
20995
21053
|
const handleVerify = /* @__PURE__ */ __name(async (code) => {
|
|
20996
21054
|
setIsLoading(true);
|
|
20997
21055
|
setError(void 0);
|
|
@@ -21032,15 +21090,15 @@ __name(DisableTwoFactorDialog, "DisableTwoFactorDialog");
|
|
|
21032
21090
|
// src/features/auth/components/two-factor/PasskeyList.tsx
|
|
21033
21091
|
import { Edit, Key, Trash2 } from "lucide-react";
|
|
21034
21092
|
import { useTranslations as useTranslations93 } from "next-intl";
|
|
21035
|
-
import { useState as
|
|
21093
|
+
import { useState as useState81 } from "react";
|
|
21036
21094
|
import { Fragment as Fragment36, jsx as jsx219, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
21037
21095
|
function PasskeyList({ passkeys, onRefresh }) {
|
|
21038
21096
|
const t = useTranslations93();
|
|
21039
21097
|
const dates = useDateFormatter();
|
|
21040
|
-
const [renameDialogOpen, setRenameDialogOpen] =
|
|
21041
|
-
const [selectedPasskey, setSelectedPasskey] =
|
|
21042
|
-
const [newName, setNewName] =
|
|
21043
|
-
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);
|
|
21044
21102
|
const handleDelete = /* @__PURE__ */ __name(async (passkey) => {
|
|
21045
21103
|
setIsLoading(true);
|
|
21046
21104
|
try {
|
|
@@ -21154,14 +21212,14 @@ __name(PasskeyList, "PasskeyList");
|
|
|
21154
21212
|
// src/features/auth/components/two-factor/PasskeySetupDialog.tsx
|
|
21155
21213
|
import { startRegistration } from "@simplewebauthn/browser";
|
|
21156
21214
|
import { useTranslations as useTranslations94 } from "next-intl";
|
|
21157
|
-
import { useState as
|
|
21215
|
+
import { useState as useState82 } from "react";
|
|
21158
21216
|
import { v4 as v47 } from "uuid";
|
|
21159
21217
|
import { jsx as jsx220, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
21160
21218
|
function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
21161
21219
|
const t = useTranslations94();
|
|
21162
21220
|
const { currentUser } = useCurrentUserContext();
|
|
21163
|
-
const [name, setName] =
|
|
21164
|
-
const [isLoading, setIsLoading] =
|
|
21221
|
+
const [name, setName] = useState82("");
|
|
21222
|
+
const [isLoading, setIsLoading] = useState82(false);
|
|
21165
21223
|
const handleRegister = /* @__PURE__ */ __name(async () => {
|
|
21166
21224
|
if (!name.trim()) return;
|
|
21167
21225
|
setIsLoading(true);
|
|
@@ -21225,12 +21283,12 @@ __name(PasskeySetupDialog, "PasskeySetupDialog");
|
|
|
21225
21283
|
// src/features/auth/components/two-factor/TotpAuthenticatorList.tsx
|
|
21226
21284
|
import { Smartphone, Trash2 as Trash22 } from "lucide-react";
|
|
21227
21285
|
import { useTranslations as useTranslations95 } from "next-intl";
|
|
21228
|
-
import { useState as
|
|
21286
|
+
import { useState as useState83 } from "react";
|
|
21229
21287
|
import { jsx as jsx221, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
21230
21288
|
function TotpAuthenticatorList({ authenticators, onDelete }) {
|
|
21231
21289
|
const t = useTranslations95();
|
|
21232
21290
|
const dates = useDateFormatter();
|
|
21233
|
-
const [deletingId, setDeletingId] =
|
|
21291
|
+
const [deletingId, setDeletingId] = useState83(null);
|
|
21234
21292
|
const handleDelete = /* @__PURE__ */ __name(async (id) => {
|
|
21235
21293
|
setDeletingId(id);
|
|
21236
21294
|
try {
|
|
@@ -21301,19 +21359,19 @@ __name(TotpAuthenticatorList, "TotpAuthenticatorList");
|
|
|
21301
21359
|
// src/features/auth/components/two-factor/TotpSetupDialog.tsx
|
|
21302
21360
|
import { useTranslations as useTranslations96 } from "next-intl";
|
|
21303
21361
|
import { QRCodeSVG } from "qrcode.react";
|
|
21304
|
-
import { useState as
|
|
21362
|
+
import { useState as useState84 } from "react";
|
|
21305
21363
|
import { v4 as v48 } from "uuid";
|
|
21306
21364
|
import { jsx as jsx222, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
21307
21365
|
function TotpSetupDialog({ onSuccess, trigger }) {
|
|
21308
21366
|
const t = useTranslations96();
|
|
21309
21367
|
const { currentUser } = useCurrentUserContext();
|
|
21310
|
-
const [open, setOpen] =
|
|
21311
|
-
const [step, setStep] =
|
|
21312
|
-
const [name, setName] =
|
|
21313
|
-
const [qrCodeUri, setQrCodeUri] =
|
|
21314
|
-
const [authenticatorId, setAuthenticatorId] =
|
|
21315
|
-
const [isLoading, setIsLoading] =
|
|
21316
|
-
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();
|
|
21317
21375
|
const handleStartSetup = /* @__PURE__ */ __name(async () => {
|
|
21318
21376
|
if (!name.trim()) return;
|
|
21319
21377
|
setIsLoading(true);
|
|
@@ -21411,12 +21469,12 @@ __name(TotpSetupDialog, "TotpSetupDialog");
|
|
|
21411
21469
|
import { Fragment as Fragment37, jsx as jsx223, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
21412
21470
|
function TwoFactorSettings() {
|
|
21413
21471
|
const t = useTranslations97();
|
|
21414
|
-
const [status, setStatus] =
|
|
21415
|
-
const [authenticators, setAuthenticators] =
|
|
21416
|
-
const [passkeys, setPasskeys] =
|
|
21417
|
-
const [isLoading, setIsLoading] =
|
|
21418
|
-
const [isEnabling, setIsEnabling] =
|
|
21419
|
-
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);
|
|
21420
21478
|
const loadStatus = useCallback41(async () => {
|
|
21421
21479
|
try {
|
|
21422
21480
|
const [statusData, authenticatorsList, passkeysList] = await Promise.all([
|
|
@@ -21627,14 +21685,14 @@ __name(LandingComponent, "LandingComponent");
|
|
|
21627
21685
|
import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
|
|
21628
21686
|
import { useTranslations as useTranslations100 } from "next-intl";
|
|
21629
21687
|
import Image10 from "next/image";
|
|
21630
|
-
import { useEffect as useEffect62, useState as
|
|
21688
|
+
import { useEffect as useEffect62, useState as useState86 } from "react";
|
|
21631
21689
|
import { useForm as useForm7 } from "react-hook-form";
|
|
21632
21690
|
import { z as z8 } from "zod";
|
|
21633
21691
|
import { Fragment as Fragment39, jsx as jsx227, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
21634
21692
|
function AcceptInvitation() {
|
|
21635
21693
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
21636
|
-
const [showConfirmation, setShowConfirmation] =
|
|
21637
|
-
const [error, setError] =
|
|
21694
|
+
const [showConfirmation, setShowConfirmation] = useState86(false);
|
|
21695
|
+
const [error, setError] = useState86(void 0);
|
|
21638
21696
|
const t = useTranslations100();
|
|
21639
21697
|
useEffect62(() => {
|
|
21640
21698
|
async function validateCode(code) {
|
|
@@ -21729,12 +21787,12 @@ __name(AcceptInvitation, "AcceptInvitation");
|
|
|
21729
21787
|
// src/features/auth/components/forms/ActivateAccount.tsx
|
|
21730
21788
|
import { useTranslations as useTranslations101 } from "next-intl";
|
|
21731
21789
|
import Image11 from "next/image";
|
|
21732
|
-
import { useEffect as useEffect63, useState as
|
|
21790
|
+
import { useEffect as useEffect63, useState as useState87 } from "react";
|
|
21733
21791
|
import { Fragment as Fragment40, jsx as jsx228, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
21734
21792
|
function ActivateAccount() {
|
|
21735
21793
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
21736
|
-
const [showConfirmation, setShowConfirmation] =
|
|
21737
|
-
const [error, setError] =
|
|
21794
|
+
const [showConfirmation, setShowConfirmation] = useState87(false);
|
|
21795
|
+
const [error, setError] = useState87(void 0);
|
|
21738
21796
|
const t = useTranslations101();
|
|
21739
21797
|
useEffect63(() => {
|
|
21740
21798
|
async function ActivateAccount2(code) {
|
|
@@ -21777,11 +21835,11 @@ function ActivateAccount() {
|
|
|
21777
21835
|
__name(ActivateAccount, "ActivateAccount");
|
|
21778
21836
|
|
|
21779
21837
|
// src/features/auth/components/forms/Cookies.tsx
|
|
21780
|
-
import { useEffect as useEffect64, useState as
|
|
21838
|
+
import { useEffect as useEffect64, useState as useState88 } from "react";
|
|
21781
21839
|
function Cookies({ dehydratedAuth, page }) {
|
|
21782
21840
|
const { setUser } = useCurrentUserContext();
|
|
21783
21841
|
const router = useI18nRouter();
|
|
21784
|
-
const [hasSaved, setHasSaved] =
|
|
21842
|
+
const [hasSaved, setHasSaved] = useState88(false);
|
|
21785
21843
|
useEffect64(() => {
|
|
21786
21844
|
if (hasSaved) return;
|
|
21787
21845
|
async function saveTokenOnServer() {
|
|
@@ -21806,14 +21864,14 @@ __name(Cookies, "Cookies");
|
|
|
21806
21864
|
import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
|
|
21807
21865
|
import { useTranslations as useTranslations102 } from "next-intl";
|
|
21808
21866
|
import Image12 from "next/image";
|
|
21809
|
-
import { useState as
|
|
21867
|
+
import { useState as useState89 } from "react";
|
|
21810
21868
|
import { useForm as useForm8 } from "react-hook-form";
|
|
21811
21869
|
import { z as z9 } from "zod";
|
|
21812
21870
|
import { Fragment as Fragment41, jsx as jsx229, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
21813
21871
|
function ForgotPassword() {
|
|
21814
21872
|
const t = useTranslations102();
|
|
21815
21873
|
const { setComponentType } = useAuthContext();
|
|
21816
|
-
const [showConfirmation, setShowConfirmation] =
|
|
21874
|
+
const [showConfirmation, setShowConfirmation] = useState89(false);
|
|
21817
21875
|
const formSchema = z9.object({
|
|
21818
21876
|
email: z9.string().email({
|
|
21819
21877
|
message: t(`common.errors.invalid_email`)
|
|
@@ -21878,7 +21936,7 @@ import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
|
|
|
21878
21936
|
import { useTranslations as useTranslations103 } from "next-intl";
|
|
21879
21937
|
import Image13 from "next/image";
|
|
21880
21938
|
import { useRouter, useSearchParams as useSearchParams3 } from "next/navigation";
|
|
21881
|
-
import { useEffect as useEffect65, useState as
|
|
21939
|
+
import { useEffect as useEffect65, useState as useState90 } from "react";
|
|
21882
21940
|
import { useForm as useForm9 } from "react-hook-form";
|
|
21883
21941
|
import { z as z10 } from "zod";
|
|
21884
21942
|
import { Fragment as Fragment42, jsx as jsx230, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
@@ -21891,7 +21949,7 @@ function Login() {
|
|
|
21891
21949
|
const nativeRouter = useRouter();
|
|
21892
21950
|
const searchParams = useSearchParams3();
|
|
21893
21951
|
const callbackUrl = searchParams.get("callbackUrl");
|
|
21894
|
-
const [referralCode, setReferralCode2] =
|
|
21952
|
+
const [referralCode, setReferralCode2] = useState90(null);
|
|
21895
21953
|
useEffect65(() => {
|
|
21896
21954
|
const cookies = document.cookie.split("; ");
|
|
21897
21955
|
for (const cookie of cookies) {
|
|
@@ -22073,14 +22131,14 @@ __name(RefreshUser, "RefreshUser");
|
|
|
22073
22131
|
import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
|
|
22074
22132
|
import { useTranslations as useTranslations104 } from "next-intl";
|
|
22075
22133
|
import Image14 from "next/image";
|
|
22076
|
-
import { useEffect as useEffect68, useState as
|
|
22134
|
+
import { useEffect as useEffect68, useState as useState91 } from "react";
|
|
22077
22135
|
import { useForm as useForm10 } from "react-hook-form";
|
|
22078
22136
|
import { z as z11 } from "zod";
|
|
22079
22137
|
import { Fragment as Fragment44, jsx as jsx232, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
22080
22138
|
function ResetPassword() {
|
|
22081
22139
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
22082
|
-
const [showConfirmation, setShowConfirmation] =
|
|
22083
|
-
const [error, setError] =
|
|
22140
|
+
const [showConfirmation, setShowConfirmation] = useState91(false);
|
|
22141
|
+
const [error, setError] = useState91(void 0);
|
|
22084
22142
|
const t = useTranslations104();
|
|
22085
22143
|
useEffect68(() => {
|
|
22086
22144
|
async function validateResetPasswordCode(code) {
|
|
@@ -22159,18 +22217,18 @@ __name(ResetPassword, "ResetPassword");
|
|
|
22159
22217
|
// src/features/auth/components/forms/TwoFactorChallenge.tsx
|
|
22160
22218
|
import { useTranslations as useTranslations106 } from "next-intl";
|
|
22161
22219
|
import { useRouter as useRouter2, useSearchParams as useSearchParams4 } from "next/navigation";
|
|
22162
|
-
import { useState as
|
|
22220
|
+
import { useState as useState93 } from "react";
|
|
22163
22221
|
import { v4 as v411 } from "uuid";
|
|
22164
22222
|
|
|
22165
22223
|
// src/features/auth/components/two-factor/PasskeyButton.tsx
|
|
22166
22224
|
import { startAuthentication } from "@simplewebauthn/browser";
|
|
22167
22225
|
import { useTranslations as useTranslations105 } from "next-intl";
|
|
22168
|
-
import { useState as
|
|
22226
|
+
import { useState as useState92 } from "react";
|
|
22169
22227
|
import { v4 as v410 } from "uuid";
|
|
22170
22228
|
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
22171
22229
|
function PasskeyButton({ pendingToken, onSuccess, onError, disabled = false }) {
|
|
22172
22230
|
const t = useTranslations105();
|
|
22173
|
-
const [isLoading, setIsLoading] =
|
|
22231
|
+
const [isLoading, setIsLoading] = useState92(false);
|
|
22174
22232
|
const handleClick = /* @__PURE__ */ __name(async () => {
|
|
22175
22233
|
setIsLoading(true);
|
|
22176
22234
|
try {
|
|
@@ -22215,10 +22273,10 @@ function TwoFactorChallenge() {
|
|
|
22215
22273
|
const nativeRouter = useRouter2();
|
|
22216
22274
|
const searchParams = useSearchParams4();
|
|
22217
22275
|
const callbackUrl = searchParams.get("callbackUrl");
|
|
22218
|
-
const [isVerifying, setIsVerifying] =
|
|
22219
|
-
const [totpError, setTotpError] =
|
|
22220
|
-
const [backupCode, setBackupCode] =
|
|
22221
|
-
const [backupError, setBackupError] =
|
|
22276
|
+
const [isVerifying, setIsVerifying] = useState93(false);
|
|
22277
|
+
const [totpError, setTotpError] = useState93();
|
|
22278
|
+
const [backupCode, setBackupCode] = useState93("");
|
|
22279
|
+
const [backupError, setBackupError] = useState93();
|
|
22222
22280
|
if (!pendingTwoFactor) {
|
|
22223
22281
|
return null;
|
|
22224
22282
|
}
|
|
@@ -22525,7 +22583,7 @@ var AI_CONNECTIONS_I18N_KEYS = [
|
|
|
22525
22583
|
|
|
22526
22584
|
// src/features/ai-connection/contexts/AiConnectionsContext.tsx
|
|
22527
22585
|
import { useTranslations as useTranslations108 } from "next-intl";
|
|
22528
|
-
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";
|
|
22529
22587
|
import { jsx as jsx236 } from "react/jsx-runtime";
|
|
22530
22588
|
var defaultContextValue4 = {
|
|
22531
22589
|
connections: [],
|
|
@@ -22541,11 +22599,11 @@ var defaultContextValue4 = {
|
|
|
22541
22599
|
var AiConnectionsContext = createContext30(void 0);
|
|
22542
22600
|
var AiConnectionsProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
22543
22601
|
const t = useTranslations108();
|
|
22544
|
-
const [connections, setConnections] =
|
|
22545
|
-
const [providerRegistry, setProviderRegistry] =
|
|
22546
|
-
const [envDefaults, setEnvDefaults] =
|
|
22547
|
-
const [scopeCompanyId, setScopeCompanyId] =
|
|
22548
|
-
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);
|
|
22549
22607
|
const refresh = useCallback42(async () => {
|
|
22550
22608
|
setIsLoading(true);
|
|
22551
22609
|
try {
|
|
@@ -22579,7 +22637,7 @@ var useAiConnections = /* @__PURE__ */ __name(() => useContext30(AiConnectionsCo
|
|
|
22579
22637
|
|
|
22580
22638
|
// src/features/ai-connection/components/containers/AiConnectionsContainer.tsx
|
|
22581
22639
|
import { useTranslations as useTranslations112 } from "next-intl";
|
|
22582
|
-
import { useEffect as useEffect71, useMemo as useMemo44, useState as
|
|
22640
|
+
import { useEffect as useEffect71, useMemo as useMemo44, useState as useState96 } from "react";
|
|
22583
22641
|
|
|
22584
22642
|
// src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx
|
|
22585
22643
|
import { ChevronDownIcon as ChevronDownIcon10, ChevronUpIcon as ChevronUpIcon3, PlusIcon as PlusIcon2 } from "lucide-react";
|
|
@@ -22589,12 +22647,12 @@ import { useMemo as useMemo43 } from "react";
|
|
|
22589
22647
|
// src/features/ai-connection/components/forms/AiConnectionDeleter.tsx
|
|
22590
22648
|
import { TrashIcon } from "lucide-react";
|
|
22591
22649
|
import { useTranslations as useTranslations109 } from "next-intl";
|
|
22592
|
-
import { useState as
|
|
22650
|
+
import { useState as useState95 } from "react";
|
|
22593
22651
|
import { Fragment as Fragment46, jsx as jsx237, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
22594
22652
|
function AiConnectionDeleter({ connection }) {
|
|
22595
22653
|
const t = useTranslations109();
|
|
22596
22654
|
const { refresh } = useAiConnections();
|
|
22597
|
-
const [open, setOpen] =
|
|
22655
|
+
const [open, setOpen] = useState95(false);
|
|
22598
22656
|
return /* @__PURE__ */ jsxs137(Fragment46, { children: [
|
|
22599
22657
|
/* @__PURE__ */ jsx237(
|
|
22600
22658
|
Button,
|
|
@@ -23073,7 +23131,7 @@ __name(AiConnectionsContainer, "AiConnectionsContainer");
|
|
|
23073
23131
|
function AiConnectionsBody() {
|
|
23074
23132
|
const t = useTranslations112();
|
|
23075
23133
|
const { scopeCompanyId, setScopeCompanyId } = useAiConnections();
|
|
23076
|
-
const [companies, setCompanies] =
|
|
23134
|
+
const [companies, setCompanies] = useState96([]);
|
|
23077
23135
|
useEffect71(() => {
|
|
23078
23136
|
let active = true;
|
|
23079
23137
|
CompanyService.findMany({}).then((response) => {
|
|
@@ -23116,7 +23174,7 @@ __name(AiConnectionsBody, "AiConnectionsBody");
|
|
|
23116
23174
|
// src/features/billing/components/widgets/CreditWarningBanner.tsx
|
|
23117
23175
|
import { XIcon as XIcon12 } from "lucide-react";
|
|
23118
23176
|
import { useTranslations as useTranslations113 } from "next-intl";
|
|
23119
|
-
import { useState as
|
|
23177
|
+
import { useState as useState97 } from "react";
|
|
23120
23178
|
import { jsx as jsx241, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
23121
23179
|
function CreditWarningBanner({
|
|
23122
23180
|
canManageBilling,
|
|
@@ -23126,7 +23184,7 @@ function CreditWarningBanner({
|
|
|
23126
23184
|
}) {
|
|
23127
23185
|
const t = useTranslations113();
|
|
23128
23186
|
const { company, refreshUser } = useCurrentUserContext();
|
|
23129
|
-
const [dismissing, setDismissing] =
|
|
23187
|
+
const [dismissing, setDismissing] = useState97(false);
|
|
23130
23188
|
if (!company || !canManageBilling || !isCreditWarningActive(company, thresholdPercent)) return null;
|
|
23131
23189
|
const offer = company.creditWarningOffer;
|
|
23132
23190
|
const handleDismiss = /* @__PURE__ */ __name(async () => {
|
|
@@ -23516,18 +23574,18 @@ __name(EmailBlastsListContainer, "EmailBlastsListContainer");
|
|
|
23516
23574
|
// src/features/email-blast/components/containers/EmailBlastContainer.tsx
|
|
23517
23575
|
import { LoaderCircleIcon as LoaderCircleIcon5, MailCheckIcon } from "lucide-react";
|
|
23518
23576
|
import { useTranslations as useTranslations122 } from "next-intl";
|
|
23519
|
-
import { useCallback as useCallback45, useEffect as useEffect73, useState as
|
|
23577
|
+
import { useCallback as useCallback45, useEffect as useEffect73, useState as useState99 } from "react";
|
|
23520
23578
|
|
|
23521
23579
|
// src/features/email-blast/components/forms/EmailBlastSendDialog.tsx
|
|
23522
23580
|
import { LoaderCircleIcon as LoaderCircleIcon4, SendIcon as SendIcon2 } from "lucide-react";
|
|
23523
23581
|
import { useTranslations as useTranslations121 } from "next-intl";
|
|
23524
|
-
import { useEffect as useEffect72, useState as
|
|
23582
|
+
import { useEffect as useEffect72, useState as useState98 } from "react";
|
|
23525
23583
|
import { Fragment as Fragment49, jsx as jsx249, jsxs as jsxs144 } from "react/jsx-runtime";
|
|
23526
23584
|
function EmailBlastSendDialog({ blast, onSuccess }) {
|
|
23527
23585
|
const t = useTranslations121();
|
|
23528
|
-
const [open, setOpen] =
|
|
23529
|
-
const [count, setCount] =
|
|
23530
|
-
const [isSending, setIsSending] =
|
|
23586
|
+
const [open, setOpen] = useState98(false);
|
|
23587
|
+
const [count, setCount] = useState98(void 0);
|
|
23588
|
+
const [isSending, setIsSending] = useState98(false);
|
|
23531
23589
|
useEffect72(() => {
|
|
23532
23590
|
if (!open) return;
|
|
23533
23591
|
let cancelled = false;
|
|
@@ -23586,7 +23644,7 @@ var STATUS_VARIANTS2 = {
|
|
|
23586
23644
|
};
|
|
23587
23645
|
function EmailBlastSendTestButton({ blast }) {
|
|
23588
23646
|
const t = useTranslations122();
|
|
23589
|
-
const [isSending, setIsSending] =
|
|
23647
|
+
const [isSending, setIsSending] = useState99(false);
|
|
23590
23648
|
const handleClick = /* @__PURE__ */ __name(async () => {
|
|
23591
23649
|
setIsSending(true);
|
|
23592
23650
|
try {
|
|
@@ -23608,7 +23666,7 @@ function EmailBlastContainer({ blastId }) {
|
|
|
23608
23666
|
const t = useTranslations122();
|
|
23609
23667
|
const dates = useDateFormatter();
|
|
23610
23668
|
const generateUrl = usePageUrlGenerator();
|
|
23611
|
-
const [blast, setBlast] =
|
|
23669
|
+
const [blast, setBlast] = useState99(void 0);
|
|
23612
23670
|
const reload = useCallback45(async () => {
|
|
23613
23671
|
setBlast(await EmailBlastService.findOne({ id: blastId }));
|
|
23614
23672
|
}, [blastId]);
|
|
@@ -23703,7 +23761,7 @@ __name(EmailBlastContainer, "EmailBlastContainer");
|
|
|
23703
23761
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
23704
23762
|
import { ArrowRight, LifeBuoyIcon } from "lucide-react";
|
|
23705
23763
|
import { useTranslations as useTranslations124 } from "next-intl";
|
|
23706
|
-
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";
|
|
23707
23765
|
|
|
23708
23766
|
// src/features/how-to/components/containers/HowToCommandViewer.tsx
|
|
23709
23767
|
import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
|
|
@@ -23829,10 +23887,10 @@ function matchPage(pathname, pattern) {
|
|
|
23829
23887
|
__name(matchPage, "matchPage");
|
|
23830
23888
|
function HowToCommand({ pathname, contextKeys, extraGroups, onStartChat }) {
|
|
23831
23889
|
const t = useTranslations124();
|
|
23832
|
-
const [dialogOpen, setDialogOpen] =
|
|
23833
|
-
const [selectedHowTo, setSelectedHowTo] =
|
|
23890
|
+
const [dialogOpen, setDialogOpen] = useState100(false);
|
|
23891
|
+
const [selectedHowTo, setSelectedHowTo] = useState100(null);
|
|
23834
23892
|
const searchTermRef = useRef41("");
|
|
23835
|
-
const [searchTerm, setSearchTerm] =
|
|
23893
|
+
const [searchTerm, setSearchTerm] = useState100("");
|
|
23836
23894
|
const data = useDataListRetriever({
|
|
23837
23895
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
23838
23896
|
return HowToService.findMany(params);
|
|
@@ -24122,11 +24180,11 @@ registerTableGenerator("howtos", useHowToTableStructure);
|
|
|
24122
24180
|
|
|
24123
24181
|
// src/features/how-to/components/forms/HowToReindexButton.tsx
|
|
24124
24182
|
import { useTranslations as useTranslations127 } from "next-intl";
|
|
24125
|
-
import { useState as
|
|
24183
|
+
import { useState as useState101 } from "react";
|
|
24126
24184
|
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
24127
24185
|
function HowToReindexButton({ refresh }) {
|
|
24128
24186
|
const t = useTranslations127();
|
|
24129
|
-
const [isReindexing, setIsReindexing] =
|
|
24187
|
+
const [isReindexing, setIsReindexing] = useState101(false);
|
|
24130
24188
|
const onReindex = /* @__PURE__ */ __name(async () => {
|
|
24131
24189
|
setIsReindexing(true);
|
|
24132
24190
|
try {
|
|
@@ -24185,7 +24243,7 @@ __name(HowToListContainer, "HowToListContainer");
|
|
|
24185
24243
|
// src/features/how-to/components/forms/HowToSelector.tsx
|
|
24186
24244
|
import { CircleX as CircleX3, RefreshCwIcon as RefreshCwIcon5, SearchIcon as SearchIcon7, XIcon as XIcon13 } from "lucide-react";
|
|
24187
24245
|
import { useTranslations as useTranslations129 } from "next-intl";
|
|
24188
|
-
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";
|
|
24189
24247
|
import { Fragment as Fragment52, jsx as jsx260, jsxs as jsxs149 } from "react/jsx-runtime";
|
|
24190
24248
|
function HowToSelector({
|
|
24191
24249
|
id,
|
|
@@ -24196,10 +24254,10 @@ function HowToSelector({
|
|
|
24196
24254
|
isRequired = false
|
|
24197
24255
|
}) {
|
|
24198
24256
|
const t = useTranslations129();
|
|
24199
|
-
const [open, setOpen] =
|
|
24257
|
+
const [open, setOpen] = useState102(false);
|
|
24200
24258
|
const searchTermRef = useRef42("");
|
|
24201
|
-
const [searchTerm, setSearchTerm] =
|
|
24202
|
-
const [isSearching, setIsSearching] =
|
|
24259
|
+
const [searchTerm, setSearchTerm] = useState102("");
|
|
24260
|
+
const [isSearching, setIsSearching] = useState102(false);
|
|
24203
24261
|
const data = useDataListRetriever({
|
|
24204
24262
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
24205
24263
|
return HowToService.findMany(params);
|
|
@@ -24290,7 +24348,7 @@ __name(HowToSelector, "HowToSelector");
|
|
|
24290
24348
|
|
|
24291
24349
|
// src/features/handbook/components/lists/HandbookContents.tsx
|
|
24292
24350
|
import { useTranslations as useTranslations145 } from "next-intl";
|
|
24293
|
-
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";
|
|
24294
24352
|
|
|
24295
24353
|
// src/features/handbook/contexts/HandbookContext.tsx
|
|
24296
24354
|
import { useTranslations as useTranslations130 } from "next-intl";
|
|
@@ -24345,10 +24403,10 @@ var HandbookProvider = /* @__PURE__ */ __name(({ children, page, section, functi
|
|
|
24345
24403
|
import { MessagesSquareIcon, Sparkles as Sparkles2 } from "lucide-react";
|
|
24346
24404
|
import { useTranslations as useTranslations142 } from "next-intl";
|
|
24347
24405
|
import Link5 from "next/link";
|
|
24348
|
-
import { useCallback as useCallback50, useState as
|
|
24406
|
+
import { useCallback as useCallback50, useState as useState108 } from "react";
|
|
24349
24407
|
|
|
24350
24408
|
// src/features/assistant/components/parts/AssistantComposer.tsx
|
|
24351
|
-
import { useState as
|
|
24409
|
+
import { useState as useState103 } from "react";
|
|
24352
24410
|
import { useTranslations as useTranslations131 } from "next-intl";
|
|
24353
24411
|
import { ArrowUp } from "lucide-react";
|
|
24354
24412
|
import { jsx as jsx262, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
@@ -24362,7 +24420,7 @@ function AssistantComposer({
|
|
|
24362
24420
|
leading
|
|
24363
24421
|
}) {
|
|
24364
24422
|
const t = useTranslations131();
|
|
24365
|
-
const [internal, setInternal] =
|
|
24423
|
+
const [internal, setInternal] = useState103("");
|
|
24366
24424
|
const value = controlled ?? internal;
|
|
24367
24425
|
const setValue = onValueChange ?? setInternal;
|
|
24368
24426
|
const canSend = value.trim().length > 0 && !disabled;
|
|
@@ -24422,10 +24480,10 @@ import ReactMarkdown3, { defaultUrlTransform } from "react-markdown";
|
|
|
24422
24480
|
import remarkGfm3 from "remark-gfm";
|
|
24423
24481
|
|
|
24424
24482
|
// src/features/assistant-message/components/parts/MessageSourcesContainer.tsx
|
|
24425
|
-
import { useEffect as useEffect76, useMemo as useMemo51, useState as
|
|
24483
|
+
import { useEffect as useEffect76, useMemo as useMemo51, useState as useState106 } from "react";
|
|
24426
24484
|
|
|
24427
24485
|
// src/features/assistant-message/components/parts/MessageSourcesPanel.tsx
|
|
24428
|
-
import { useMemo as useMemo50, useState as
|
|
24486
|
+
import { useMemo as useMemo50, useState as useState105 } from "react";
|
|
24429
24487
|
import { useTranslations as useTranslations138 } from "next-intl";
|
|
24430
24488
|
import { ChevronDown as ChevronDown4, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
24431
24489
|
|
|
@@ -24484,7 +24542,7 @@ function ReferencesTab({ references }) {
|
|
|
24484
24542
|
__name(ReferencesTab, "ReferencesTab");
|
|
24485
24543
|
|
|
24486
24544
|
// src/features/assistant-message/components/parts/tabs/CitationsTab.tsx
|
|
24487
|
-
import { Fragment as Fragment53, useState as
|
|
24545
|
+
import { Fragment as Fragment53, useState as useState104 } from "react";
|
|
24488
24546
|
import { useTranslations as useTranslations135 } from "next-intl";
|
|
24489
24547
|
import { ChevronDown as ChevronDown3, HelpCircle } from "lucide-react";
|
|
24490
24548
|
import ReactMarkdown2 from "react-markdown";
|
|
@@ -24527,7 +24585,7 @@ function CitationsTab({ citations, sources }) {
|
|
|
24527
24585
|
const t = useTranslations135();
|
|
24528
24586
|
const entityLabel = useEntityLabel();
|
|
24529
24587
|
const isMobile = useIsMobile();
|
|
24530
|
-
const [expanded, setExpanded] =
|
|
24588
|
+
const [expanded, setExpanded] = useState104(/* @__PURE__ */ new Set());
|
|
24531
24589
|
if (citations.length === 0) return null;
|
|
24532
24590
|
const sorted = [...citations].sort((a, b) => (b.relevance ?? 0) - (a.relevance ?? 0));
|
|
24533
24591
|
const toggle = /* @__PURE__ */ __name((id) => {
|
|
@@ -24795,8 +24853,8 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
24795
24853
|
if (usersCount > 0) visibleTabs.push("users");
|
|
24796
24854
|
const autoOpen = isLatestAssistant && suggestionsCount > 0;
|
|
24797
24855
|
const initialTab = autoOpen ? "suggested" : visibleTabs[0];
|
|
24798
|
-
const [open, setOpen] =
|
|
24799
|
-
const [active, setActive] =
|
|
24856
|
+
const [open, setOpen] = useState105(autoOpen);
|
|
24857
|
+
const [active, setActive] = useState105(initialTab);
|
|
24800
24858
|
if (total === 0) return null;
|
|
24801
24859
|
const panelId = `sources-panel-${message.id}`;
|
|
24802
24860
|
return /* @__PURE__ */ jsxs156("div", { className: "mt-2 w-full min-w-0", children: [
|
|
@@ -24878,7 +24936,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
24878
24936
|
}
|
|
24879
24937
|
return parts.sort().join("|");
|
|
24880
24938
|
}, [groups]);
|
|
24881
|
-
const [resolved, setResolved] =
|
|
24939
|
+
const [resolved, setResolved] = useState106([]);
|
|
24882
24940
|
useEffect76(() => {
|
|
24883
24941
|
if (groups.size === 0) {
|
|
24884
24942
|
setResolved((current) => current.length === 0 ? current : []);
|
|
@@ -25093,7 +25151,7 @@ __name(AssistantThread, "AssistantThread");
|
|
|
25093
25151
|
|
|
25094
25152
|
// src/features/handbook/hooks/useHandbookAsk.ts
|
|
25095
25153
|
import { useTranslations as useTranslations141 } from "next-intl";
|
|
25096
|
-
import { useCallback as useCallback49, useEffect as useEffect78, useState as
|
|
25154
|
+
import { useCallback as useCallback49, useEffect as useEffect78, useState as useState107 } from "react";
|
|
25097
25155
|
import { v4 as v414 } from "uuid";
|
|
25098
25156
|
function withSources(messages, label) {
|
|
25099
25157
|
return messages.map((message) => withSourcesInContent(message, label));
|
|
@@ -25121,10 +25179,10 @@ function useHandbookAsk(params) {
|
|
|
25121
25179
|
const generateUrl = usePageUrlGenerator();
|
|
25122
25180
|
const shouldSyncUrl = params?.syncUrl ?? true;
|
|
25123
25181
|
const handbookThreadId = params?.handbookThreadId;
|
|
25124
|
-
const [threads, setThreads] =
|
|
25125
|
-
const [thread, setThread] =
|
|
25126
|
-
const [messages, setMessages] =
|
|
25127
|
-
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);
|
|
25128
25186
|
const sourcesLabel = t("handbook.chat.sources");
|
|
25129
25187
|
useEffect78(() => {
|
|
25130
25188
|
let cancelled = false;
|
|
@@ -25229,7 +25287,7 @@ function HandbookAskSheet({ handbookPageId } = {}) {
|
|
|
25229
25287
|
const t = useTranslations142();
|
|
25230
25288
|
const generateUrl = usePageUrlGenerator();
|
|
25231
25289
|
const { threads, thread, messages, sending, ask, selectThread } = useHandbookAsk({ syncUrl: false });
|
|
25232
|
-
const [scoped, setScoped] =
|
|
25290
|
+
const [scoped, setScoped] = useState108(false);
|
|
25233
25291
|
const chatUrl = `${generateUrl({ page: Modules.HandbookPage })}/chat`;
|
|
25234
25292
|
const showThread = !!thread || sending || messages.length > 0;
|
|
25235
25293
|
const send = useCallback50(
|
|
@@ -25290,11 +25348,11 @@ __name(HandbookAskSheet, "HandbookAskSheet");
|
|
|
25290
25348
|
|
|
25291
25349
|
// src/features/handbook/components/forms/HandbookSyncButton.tsx
|
|
25292
25350
|
import { useTranslations as useTranslations143 } from "next-intl";
|
|
25293
|
-
import { useState as
|
|
25351
|
+
import { useState as useState109 } from "react";
|
|
25294
25352
|
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
25295
25353
|
function HandbookSyncButton({ refresh }) {
|
|
25296
25354
|
const t = useTranslations143();
|
|
25297
|
-
const [isSyncing, setIsSyncing] =
|
|
25355
|
+
const [isSyncing, setIsSyncing] = useState109(false);
|
|
25298
25356
|
const onSync = /* @__PURE__ */ __name(async () => {
|
|
25299
25357
|
setIsSyncing(true);
|
|
25300
25358
|
try {
|
|
@@ -25411,10 +25469,10 @@ __name(splitByNesting, "splitByNesting");
|
|
|
25411
25469
|
import { Fragment as Fragment55, jsx as jsx279, jsxs as jsxs163 } from "react/jsx-runtime";
|
|
25412
25470
|
function HandbookContents() {
|
|
25413
25471
|
const t = useTranslations145();
|
|
25414
|
-
const [pages, setPages] =
|
|
25415
|
-
const [sections, setSections] =
|
|
25416
|
-
const [isLoading, setIsLoading] =
|
|
25417
|
-
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);
|
|
25418
25476
|
useEffect79(() => {
|
|
25419
25477
|
let cancelled = false;
|
|
25420
25478
|
const load = /* @__PURE__ */ __name(async () => {
|
|
@@ -25505,7 +25563,7 @@ __name(HandbookAdminContainer, "HandbookAdminContainer");
|
|
|
25505
25563
|
|
|
25506
25564
|
// src/features/handbook/components/containers/HandbookPageContainer.tsx
|
|
25507
25565
|
import { useTranslations as useTranslations149 } from "next-intl";
|
|
25508
|
-
import { useEffect as useEffect82, useMemo as useMemo58, useState as
|
|
25566
|
+
import { useEffect as useEffect82, useMemo as useMemo58, useState as useState112 } from "react";
|
|
25509
25567
|
|
|
25510
25568
|
// src/features/handbook/components/details/HandbookPageDetails.tsx
|
|
25511
25569
|
import { jsx as jsx281 } from "react/jsx-runtime";
|
|
@@ -25561,13 +25619,13 @@ __name(HandbookPageNeighbours, "HandbookPageNeighbours");
|
|
|
25561
25619
|
// src/features/handbook/components/details/HandbookPageToc.tsx
|
|
25562
25620
|
import { List } from "lucide-react";
|
|
25563
25621
|
import { useTranslations as useTranslations147 } from "next-intl";
|
|
25564
|
-
import { useCallback as useCallback52, useEffect as useEffect80, useState as
|
|
25622
|
+
import { useCallback as useCallback52, useEffect as useEffect80, useState as useState111 } from "react";
|
|
25565
25623
|
import { jsx as jsx283, jsxs as jsxs165 } from "react/jsx-runtime";
|
|
25566
25624
|
function HandbookPageToc({ containerId }) {
|
|
25567
25625
|
const t = useTranslations147();
|
|
25568
|
-
const [activeId, setActiveId] =
|
|
25569
|
-
const [headings, setHeadings] =
|
|
25570
|
-
const [headingsWithIds, setHeadingsWithIds] =
|
|
25626
|
+
const [activeId, setActiveId] = useState111(null);
|
|
25627
|
+
const [headings, setHeadings] = useState111([]);
|
|
25628
|
+
const [headingsWithIds, setHeadingsWithIds] = useState111(/* @__PURE__ */ new Map());
|
|
25571
25629
|
useEffect80(() => {
|
|
25572
25630
|
const contentPanel = document.getElementById(containerId);
|
|
25573
25631
|
if (!contentPanel) return;
|
|
@@ -25732,10 +25790,10 @@ import { jsx as jsx285, jsxs as jsxs167 } from "react/jsx-runtime";
|
|
|
25732
25790
|
var CONTENT_CONTAINER_ID = "handbook-page-content";
|
|
25733
25791
|
function HandbookPageContainer({ handbookPageId }) {
|
|
25734
25792
|
const t = useTranslations149();
|
|
25735
|
-
const [handbookPage, setHandbookPage] =
|
|
25736
|
-
const [pages, setPages] =
|
|
25737
|
-
const [sections, setSections] =
|
|
25738
|
-
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);
|
|
25739
25797
|
useEffect82(() => {
|
|
25740
25798
|
let cancelled = false;
|
|
25741
25799
|
const load = /* @__PURE__ */ __name(async () => {
|
|
@@ -25977,14 +26035,14 @@ __name(EntityMentionLinkView, "EntityMentionLinkView");
|
|
|
25977
26035
|
var EntityMentionLink = /* @__PURE__ */ __name((p) => /* @__PURE__ */ jsx288(EntityMentionLinkView, { ...p }), "EntityMentionLink");
|
|
25978
26036
|
|
|
25979
26037
|
// src/features/assistant/components/parts/AssistantEmptyState.tsx
|
|
25980
|
-
import { useState as
|
|
26038
|
+
import { useState as useState113 } from "react";
|
|
25981
26039
|
import { useTranslations as useTranslations152 } from "next-intl";
|
|
25982
26040
|
import { Sparkles as Sparkles4 } from "lucide-react";
|
|
25983
26041
|
import { jsx as jsx289, jsxs as jsxs170 } from "react/jsx-runtime";
|
|
25984
26042
|
var STARTER_KEYS = ["a", "b", "c", "d"];
|
|
25985
26043
|
function AssistantEmptyState({ onSend, operatorMode = false, onOperatorModeChange, composerLeading }) {
|
|
25986
26044
|
const t = useTranslations152();
|
|
25987
|
-
const [draft, setDraft] =
|
|
26045
|
+
const [draft, setDraft] = useState113("");
|
|
25988
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: [
|
|
25989
26047
|
/* @__PURE__ */ jsxs170("div", { className: "text-center", children: [
|
|
25990
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" }) }),
|
|
@@ -26022,14 +26080,14 @@ function AssistantEmptyState({ onSend, operatorMode = false, onOperatorModeChang
|
|
|
26022
26080
|
__name(AssistantEmptyState, "AssistantEmptyState");
|
|
26023
26081
|
|
|
26024
26082
|
// src/features/assistant/components/parts/AssistantThreadHeader.tsx
|
|
26025
|
-
import { useState as
|
|
26083
|
+
import { useState as useState114 } from "react";
|
|
26026
26084
|
import { useTranslations as useTranslations153 } from "next-intl";
|
|
26027
26085
|
import { jsx as jsx290, jsxs as jsxs171 } from "react/jsx-runtime";
|
|
26028
26086
|
function AssistantThreadHeader({ assistant, onRename, onDelete, renamePlaceholder, deleteConfirmLabel }) {
|
|
26029
26087
|
const t = useTranslations153();
|
|
26030
|
-
const [renameValue, setRenameValue] =
|
|
26031
|
-
const [renameOpen, setRenameOpen] =
|
|
26032
|
-
const [deleteOpen, setDeleteOpen] =
|
|
26088
|
+
const [renameValue, setRenameValue] = useState114(assistant.title);
|
|
26089
|
+
const [renameOpen, setRenameOpen] = useState114(false);
|
|
26090
|
+
const [deleteOpen, setDeleteOpen] = useState114(false);
|
|
26033
26091
|
const handleRename = /* @__PURE__ */ __name(async () => {
|
|
26034
26092
|
const trimmed = renameValue.trim() || assistant.title;
|
|
26035
26093
|
await onRename(trimmed);
|
|
@@ -26181,7 +26239,7 @@ import { useTranslations as useTranslations156 } from "next-intl";
|
|
|
26181
26239
|
// src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx
|
|
26182
26240
|
import { ArrowUp as ArrowUp2 } from "lucide-react";
|
|
26183
26241
|
import { useTranslations as useTranslations155 } from "next-intl";
|
|
26184
|
-
import { useCallback as useCallback53, useId as useId5, useState as
|
|
26242
|
+
import { useCallback as useCallback53, useId as useId5, useState as useState115 } from "react";
|
|
26185
26243
|
import { jsx as jsx292, jsxs as jsxs173 } from "react/jsx-runtime";
|
|
26186
26244
|
function flattenBlocks(blocks) {
|
|
26187
26245
|
const lines = [];
|
|
@@ -26219,9 +26277,9 @@ function AssistantBlockNoteComposer({
|
|
|
26219
26277
|
}) {
|
|
26220
26278
|
const t = useTranslations155();
|
|
26221
26279
|
const editorId = useId5().replace(/[^a-zA-Z0-9]/g, "");
|
|
26222
|
-
const [blocks, setBlocks] =
|
|
26223
|
-
const [isEmpty, setIsEmpty] =
|
|
26224
|
-
const [resetKey, setResetKey] =
|
|
26280
|
+
const [blocks, setBlocks] = useState115([]);
|
|
26281
|
+
const [isEmpty, setIsEmpty] = useState115(true);
|
|
26282
|
+
const [resetKey, setResetKey] = useState115(0);
|
|
26225
26283
|
const canSend = !isEmpty && !disabled;
|
|
26226
26284
|
const submit = useCallback53(async () => {
|
|
26227
26285
|
if (isEmpty || disabled) return;
|
|
@@ -26360,7 +26418,7 @@ __name(AssistantPageContainer, "AssistantPageContainer");
|
|
|
26360
26418
|
// src/features/assistant-action/components/ApprovalActionCard.tsx
|
|
26361
26419
|
import { ShieldAlert as ShieldAlert2 } from "lucide-react";
|
|
26362
26420
|
import { useTranslations as useTranslations157 } from "next-intl";
|
|
26363
|
-
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";
|
|
26364
26422
|
import { jsx as jsx294, jsxs as jsxs175 } from "react/jsx-runtime";
|
|
26365
26423
|
var STATUS_VARIANT2 = {
|
|
26366
26424
|
pending: "softBlue",
|
|
@@ -26552,13 +26610,13 @@ function parseLegacyProposal(toolArgs) {
|
|
|
26552
26610
|
__name(parseLegacyProposal, "parseLegacyProposal");
|
|
26553
26611
|
function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipKeys }) {
|
|
26554
26612
|
const t = useTranslations157();
|
|
26555
|
-
const [status, setStatus] =
|
|
26556
|
-
const [actionSummary, setActionSummary] =
|
|
26557
|
-
const [toolName, setToolName] =
|
|
26558
|
-
const [toolArgs, setToolArgs] =
|
|
26559
|
-
const [actionProposal, setActionProposal] =
|
|
26560
|
-
const [busy, setBusy] =
|
|
26561
|
-
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);
|
|
26562
26620
|
useEffect83(() => {
|
|
26563
26621
|
let cancelled = false;
|
|
26564
26622
|
(async () => {
|
|
@@ -26729,7 +26787,7 @@ var NotificationErrorBoundary = class extends Component {
|
|
|
26729
26787
|
// src/features/notification/components/containers/NotificationsListContainer.tsx
|
|
26730
26788
|
import { useTranslations as useTranslations162 } from "next-intl";
|
|
26731
26789
|
import { useSearchParams as useSearchParams5 } from "next/navigation";
|
|
26732
|
-
import { useState as
|
|
26790
|
+
import { useState as useState117 } from "react";
|
|
26733
26791
|
|
|
26734
26792
|
// src/features/notification/components/filters/NotificationViewSwitcher.tsx
|
|
26735
26793
|
import { useTranslations as useTranslations159 } from "next-intl";
|
|
@@ -26930,7 +26988,7 @@ function NotificationsListContainerContent() {
|
|
|
26930
26988
|
const searchParams = useSearchParams5();
|
|
26931
26989
|
const { error } = useNotificationContext();
|
|
26932
26990
|
const tabParam = searchParams.get("tab");
|
|
26933
|
-
const [mode, setMode] =
|
|
26991
|
+
const [mode, setMode] = useState117(tabParam === "archived" ? "archived" : "inbox");
|
|
26934
26992
|
if (error) {
|
|
26935
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: [
|
|
26936
26994
|
/* @__PURE__ */ jsx300("p", { children: t("notification.ui.list.error_loading", { error }) }),
|
|
@@ -26967,7 +27025,7 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
26967
27025
|
// src/features/notification/components/modals/NotificationModal.tsx
|
|
26968
27026
|
import { BellIcon as BellIcon2, ExternalLinkIcon } from "lucide-react";
|
|
26969
27027
|
import { useTranslations as useTranslations163 } from "next-intl";
|
|
26970
|
-
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";
|
|
26971
27029
|
import { jsx as jsx301, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
26972
27030
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
26973
27031
|
const _instanceId = useRef46(Math.random().toString(36).substr(2, 9));
|
|
@@ -26989,7 +27047,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
26989
27047
|
} = useSocketContext();
|
|
26990
27048
|
const t = useTranslations163();
|
|
26991
27049
|
const generateUrl = usePageUrlGenerator();
|
|
26992
|
-
const [newNotifications, setNewNotifications] =
|
|
27050
|
+
const [newNotifications, setNewNotifications] = useState118(false);
|
|
26993
27051
|
const preventAutoClose = useRef46(false);
|
|
26994
27052
|
const circuitBreakerRef = useRef46({
|
|
26995
27053
|
count: 0,
|
|
@@ -27231,14 +27289,14 @@ import { useTranslations as useTranslations165 } from "next-intl";
|
|
|
27231
27289
|
// src/features/referral/components/ReferralWidget.tsx
|
|
27232
27290
|
import { Copy as Copy2, Loader2 as Loader27, Mail, Users } from "lucide-react";
|
|
27233
27291
|
import { useTranslations as useTranslations164 } from "next-intl";
|
|
27234
|
-
import { useCallback as useCallback55, useRef as useRef47, useState as
|
|
27292
|
+
import { useCallback as useCallback55, useRef as useRef47, useState as useState121 } from "react";
|
|
27235
27293
|
|
|
27236
27294
|
// src/features/referral/hooks/useReferralInvite.ts
|
|
27237
|
-
import { useState as
|
|
27295
|
+
import { useState as useState119 } from "react";
|
|
27238
27296
|
function useReferralInvite() {
|
|
27239
|
-
const [sending, setSending] =
|
|
27240
|
-
const [error, setError] =
|
|
27241
|
-
const [success, setSuccess] =
|
|
27297
|
+
const [sending, setSending] = useState119(false);
|
|
27298
|
+
const [error, setError] = useState119(null);
|
|
27299
|
+
const [success, setSuccess] = useState119(false);
|
|
27242
27300
|
const sendInvite = /* @__PURE__ */ __name(async (email) => {
|
|
27243
27301
|
if (!isReferralEnabled()) {
|
|
27244
27302
|
return;
|
|
@@ -27261,11 +27319,11 @@ function useReferralInvite() {
|
|
|
27261
27319
|
__name(useReferralInvite, "useReferralInvite");
|
|
27262
27320
|
|
|
27263
27321
|
// src/features/referral/hooks/useReferralStats.ts
|
|
27264
|
-
import { useEffect as useEffect87, useState as
|
|
27322
|
+
import { useEffect as useEffect87, useState as useState120 } from "react";
|
|
27265
27323
|
function useReferralStats() {
|
|
27266
|
-
const [stats, setStats] =
|
|
27267
|
-
const [loading, setLoading] =
|
|
27268
|
-
const [error, setError] =
|
|
27324
|
+
const [stats, setStats] = useState120(null);
|
|
27325
|
+
const [loading, setLoading] = useState120(true);
|
|
27326
|
+
const [error, setError] = useState120(null);
|
|
27269
27327
|
useEffect87(() => {
|
|
27270
27328
|
if (!isReferralEnabled()) {
|
|
27271
27329
|
setLoading(false);
|
|
@@ -27342,8 +27400,8 @@ function ReferralWidget({
|
|
|
27342
27400
|
};
|
|
27343
27401
|
const { stats, loading, error } = useReferralStats();
|
|
27344
27402
|
const { sendInvite, sending } = useReferralInvite();
|
|
27345
|
-
const [email, setEmail] =
|
|
27346
|
-
const [copied, setCopied] =
|
|
27403
|
+
const [email, setEmail] = useState121("");
|
|
27404
|
+
const [copied, setCopied] = useState121(false);
|
|
27347
27405
|
const linkInputRef = useRef47(null);
|
|
27348
27406
|
const config = getReferralConfig();
|
|
27349
27407
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
@@ -27508,7 +27566,7 @@ __name(ReferralDialog, "ReferralDialog");
|
|
|
27508
27566
|
// src/features/referral/components/containers/ReferralsAdminContainer.tsx
|
|
27509
27567
|
import { CopyIcon as CopyIcon3 } from "lucide-react";
|
|
27510
27568
|
import { useTranslations as useTranslations170 } from "next-intl";
|
|
27511
|
-
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";
|
|
27512
27570
|
|
|
27513
27571
|
// src/features/referral/hooks/useReferralAdminReferralTableStructure.tsx
|
|
27514
27572
|
import { useTranslations as useTranslations166 } from "next-intl";
|
|
@@ -28039,9 +28097,9 @@ function useRefetchOnChange(retriever, key, value) {
|
|
|
28039
28097
|
__name(useRefetchOnChange, "useRefetchOnChange");
|
|
28040
28098
|
function ReferralsAdminContainer() {
|
|
28041
28099
|
const t = useTranslations170();
|
|
28042
|
-
const [period, setPeriod] =
|
|
28043
|
-
const [sort, setSort] =
|
|
28044
|
-
const [summary, setSummary] =
|
|
28100
|
+
const [period, setPeriod] = useState122("30d");
|
|
28101
|
+
const [sort, setSort] = useState122("paying");
|
|
28102
|
+
const [summary, setSummary] = useState122([]);
|
|
28045
28103
|
useEffect88(() => {
|
|
28046
28104
|
let cancelled = false;
|
|
28047
28105
|
ReferralAdminService.getSummary({ period }).then((rows) => {
|
|
@@ -28220,11 +28278,11 @@ __name(FormRoles, "FormRoles");
|
|
|
28220
28278
|
|
|
28221
28279
|
// src/features/role/components/forms/RemoveUserFromRole.tsx
|
|
28222
28280
|
import { useTranslations as useTranslations173 } from "next-intl";
|
|
28223
|
-
import { useEffect as useEffect90, useState as
|
|
28281
|
+
import { useEffect as useEffect90, useState as useState123 } from "react";
|
|
28224
28282
|
import { Fragment as Fragment65, jsx as jsx313, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
28225
28283
|
function RemoveUserFromRole({ role, user, refresh }) {
|
|
28226
|
-
const [open, setOpen] =
|
|
28227
|
-
const [canRemove, setCanRemove] =
|
|
28284
|
+
const [open, setOpen] = useState123(false);
|
|
28285
|
+
const [canRemove, setCanRemove] = useState123(false);
|
|
28228
28286
|
const t = useTranslations173();
|
|
28229
28287
|
useEffect90(() => {
|
|
28230
28288
|
async function checkCompanyAdminDeletability() {
|
|
@@ -28296,13 +28354,13 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
28296
28354
|
// src/features/role/components/forms/UserRoleAdd.tsx
|
|
28297
28355
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
28298
28356
|
import { useTranslations as useTranslations174 } from "next-intl";
|
|
28299
|
-
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";
|
|
28300
28358
|
import { Fragment as Fragment66, jsx as jsx314, jsxs as jsxs190 } from "react/jsx-runtime";
|
|
28301
28359
|
function UserRoleAdd({ user, refresh }) {
|
|
28302
|
-
const [open, setOpen] =
|
|
28360
|
+
const [open, setOpen] = useState124(false);
|
|
28303
28361
|
const inputRef = useRef49(null);
|
|
28304
|
-
const [searchTerm, setSearchTerm] =
|
|
28305
|
-
const [roles, setRoles] =
|
|
28362
|
+
const [searchTerm, setSearchTerm] = useState124("");
|
|
28363
|
+
const [roles, setRoles] = useState124([]);
|
|
28306
28364
|
const t = useTranslations174();
|
|
28307
28365
|
const addUserToRole = /* @__PURE__ */ __name(async (role) => {
|
|
28308
28366
|
await RoleService.addUserToRole({
|
|
@@ -28617,12 +28675,12 @@ __name(OAuthScopeSelector, "OAuthScopeSelector");
|
|
|
28617
28675
|
|
|
28618
28676
|
// src/features/oauth/components/OAuthClientSecretDisplay.tsx
|
|
28619
28677
|
import { useTranslations as useTranslations179 } from "next-intl";
|
|
28620
|
-
import { useState as
|
|
28678
|
+
import { useState as useState125, useCallback as useCallback59 } from "react";
|
|
28621
28679
|
import { Copy as Copy3, Check, AlertTriangle } from "lucide-react";
|
|
28622
28680
|
import { jsx as jsx319, jsxs as jsxs193 } from "react/jsx-runtime";
|
|
28623
28681
|
function OAuthClientSecretDisplay({ secret, onDismiss, open, clientName }) {
|
|
28624
28682
|
const t = useTranslations179();
|
|
28625
|
-
const [copied, setCopied] =
|
|
28683
|
+
const [copied, setCopied] = useState125(false);
|
|
28626
28684
|
const handleCopy = useCallback59(async () => {
|
|
28627
28685
|
try {
|
|
28628
28686
|
await navigator.clipboard.writeText(secret);
|
|
@@ -28820,7 +28878,7 @@ __name(OAuthClientList, "OAuthClientList");
|
|
|
28820
28878
|
|
|
28821
28879
|
// src/features/oauth/components/OAuthClientForm.tsx
|
|
28822
28880
|
import { useTranslations as useTranslations182 } from "next-intl";
|
|
28823
|
-
import { useState as
|
|
28881
|
+
import { useState as useState126, useCallback as useCallback60 } from "react";
|
|
28824
28882
|
import { jsx as jsx322, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
28825
28883
|
function OAuthClientForm({
|
|
28826
28884
|
client,
|
|
@@ -28832,14 +28890,14 @@ function OAuthClientForm({
|
|
|
28832
28890
|
}) {
|
|
28833
28891
|
const t = useTranslations182();
|
|
28834
28892
|
const isEditMode = !!client;
|
|
28835
|
-
const [formState, setFormState] =
|
|
28893
|
+
const [formState, setFormState] = useState126({
|
|
28836
28894
|
name: client?.name || "",
|
|
28837
28895
|
description: client?.description || "",
|
|
28838
28896
|
redirectUris: client?.redirectUris?.length ? client.redirectUris : [""],
|
|
28839
28897
|
allowedScopes: client ? client.allowedScopes || [] : defaultScopes,
|
|
28840
28898
|
isConfidential: client?.isConfidential ?? true
|
|
28841
28899
|
});
|
|
28842
|
-
const [errors, setErrors] =
|
|
28900
|
+
const [errors, setErrors] = useState126({});
|
|
28843
28901
|
const validate = useCallback60(() => {
|
|
28844
28902
|
const newErrors = {};
|
|
28845
28903
|
if (!formState.name.trim()) {
|
|
@@ -28967,7 +29025,7 @@ __name(OAuthClientForm, "OAuthClientForm");
|
|
|
28967
29025
|
|
|
28968
29026
|
// src/features/oauth/components/OAuthClientDetail.tsx
|
|
28969
29027
|
import { useTranslations as useTranslations183 } from "next-intl";
|
|
28970
|
-
import { useState as
|
|
29028
|
+
import { useState as useState127, useCallback as useCallback61 } from "react";
|
|
28971
29029
|
import { Copy as Copy4, Check as Check2, RefreshCw as RefreshCw3, Pencil as Pencil2, Trash2 as Trash25, ExternalLink } from "lucide-react";
|
|
28972
29030
|
import { Fragment as Fragment67, jsx as jsx323, jsxs as jsxs197 } from "react/jsx-runtime";
|
|
28973
29031
|
function OAuthClientDetail({
|
|
@@ -28980,11 +29038,11 @@ function OAuthClientDetail({
|
|
|
28980
29038
|
const t = useTranslations183();
|
|
28981
29039
|
const { format } = useDateFormatter();
|
|
28982
29040
|
const scopeText = useOAuthScopeText();
|
|
28983
|
-
const [copiedField, setCopiedField] =
|
|
28984
|
-
const [showDeleteConfirm, setShowDeleteConfirm] =
|
|
28985
|
-
const [showRegenerateConfirm, setShowRegenerateConfirm] =
|
|
28986
|
-
const [isDeleting, setIsDeleting] =
|
|
28987
|
-
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);
|
|
28988
29046
|
const copyToClipboard2 = useCallback61(async (text, field) => {
|
|
28989
29047
|
try {
|
|
28990
29048
|
await navigator.clipboard.writeText(text);
|
|
@@ -29289,7 +29347,7 @@ __name(OAuthConsentScreen, "OAuthConsentScreen");
|
|
|
29289
29347
|
import { zodResolver as zodResolver13 } from "@hookform/resolvers/zod";
|
|
29290
29348
|
import { CheckCircle as CheckCircle2, Mail as Mail2 } from "lucide-react";
|
|
29291
29349
|
import { useTranslations as useTranslations189 } from "next-intl";
|
|
29292
|
-
import { useState as
|
|
29350
|
+
import { useState as useState128 } from "react";
|
|
29293
29351
|
import { useForm as useForm13 } from "react-hook-form";
|
|
29294
29352
|
import { v4 as v415 } from "uuid";
|
|
29295
29353
|
import { z as z14 } from "zod";
|
|
@@ -29391,8 +29449,8 @@ __name(WaitlistQuestionnaireRenderer, "WaitlistQuestionnaireRenderer");
|
|
|
29391
29449
|
import { Fragment as Fragment69, jsx as jsx330, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
29392
29450
|
function WaitlistForm({ onSuccess }) {
|
|
29393
29451
|
const t = useTranslations189();
|
|
29394
|
-
const [isSubmitting, setIsSubmitting] =
|
|
29395
|
-
const [isSuccess, setIsSuccess] =
|
|
29452
|
+
const [isSubmitting, setIsSubmitting] = useState128(false);
|
|
29453
|
+
const [isSuccess, setIsSuccess] = useState128(false);
|
|
29396
29454
|
const config = getWaitlistConfig();
|
|
29397
29455
|
const questionnaireFields = config.questionnaire ?? [];
|
|
29398
29456
|
const questionnaireSchema = questionnaireFields.reduce(
|
|
@@ -29573,12 +29631,12 @@ __name(WaitlistSuccessState, "WaitlistSuccessState");
|
|
|
29573
29631
|
// src/features/waitlist/components/sections/WaitlistConfirmation.tsx
|
|
29574
29632
|
import { CheckCircle as CheckCircle5, Loader2 as Loader29, XCircle as XCircle3 } from "lucide-react";
|
|
29575
29633
|
import { useTranslations as useTranslations191 } from "next-intl";
|
|
29576
|
-
import { useEffect as useEffect92, useState as
|
|
29634
|
+
import { useEffect as useEffect92, useState as useState129 } from "react";
|
|
29577
29635
|
import { jsx as jsx333, jsxs as jsxs207 } from "react/jsx-runtime";
|
|
29578
29636
|
function WaitlistConfirmation({ code }) {
|
|
29579
29637
|
const t = useTranslations191();
|
|
29580
|
-
const [state, setState] =
|
|
29581
|
-
const [errorMessage, setErrorMessage] =
|
|
29638
|
+
const [state, setState] = useState129("loading");
|
|
29639
|
+
const [errorMessage, setErrorMessage] = useState129("");
|
|
29582
29640
|
useEffect92(() => {
|
|
29583
29641
|
async function confirmEmail() {
|
|
29584
29642
|
try {
|
|
@@ -29618,12 +29676,12 @@ __name(WaitlistConfirmation, "WaitlistConfirmation");
|
|
|
29618
29676
|
// src/features/waitlist/components/lists/WaitlistList.tsx
|
|
29619
29677
|
import { RefreshCw as RefreshCw4 } from "lucide-react";
|
|
29620
29678
|
import { useTranslations as useTranslations192 } from "next-intl";
|
|
29621
|
-
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";
|
|
29622
29680
|
import { jsx as jsx334, jsxs as jsxs208 } from "react/jsx-runtime";
|
|
29623
29681
|
function WaitlistList({ fullWidth } = {}) {
|
|
29624
29682
|
const t = useTranslations192();
|
|
29625
|
-
const [statusFilter, setStatusFilter] =
|
|
29626
|
-
const [stats, setStats] =
|
|
29683
|
+
const [statusFilter, setStatusFilter] = useState130("all");
|
|
29684
|
+
const [stats, setStats] = useState130(void 0);
|
|
29627
29685
|
const data = useDataListRetriever({
|
|
29628
29686
|
retriever: /* @__PURE__ */ __name((params) => WaitlistService.findMany(params), "retriever"),
|
|
29629
29687
|
retrieverParams: {},
|
|
@@ -29720,7 +29778,7 @@ __name(WaitlistList, "WaitlistList");
|
|
|
29720
29778
|
// src/features/rbac/components/RbacContainer.tsx
|
|
29721
29779
|
import { Loader2Icon as Loader2Icon4 } from "lucide-react";
|
|
29722
29780
|
import { useTranslations as useTranslations194 } from "next-intl";
|
|
29723
|
-
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";
|
|
29724
29782
|
|
|
29725
29783
|
// src/features/rbac/components/RbacPermissionCell.tsx
|
|
29726
29784
|
import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon14 } from "lucide-react";
|
|
@@ -29801,7 +29859,7 @@ __name(RbacPermissionCell, "RbacPermissionCell");
|
|
|
29801
29859
|
import { Popover as PopoverPrimitive2 } from "@base-ui/react/popover";
|
|
29802
29860
|
import { CheckIcon as CheckIcon10, MinusIcon as MinusIcon3, XIcon as XIcon15 } from "lucide-react";
|
|
29803
29861
|
import { useTranslations as useTranslations193 } from "next-intl";
|
|
29804
|
-
import { useCallback as useCallback63, useEffect as useEffect94, useState as
|
|
29862
|
+
import { useCallback as useCallback63, useEffect as useEffect94, useState as useState131 } from "react";
|
|
29805
29863
|
import { Fragment as Fragment70, jsx as jsx336, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
29806
29864
|
function RbacPermissionPicker({
|
|
29807
29865
|
open,
|
|
@@ -29814,7 +29872,7 @@ function RbacPermissionPicker({
|
|
|
29814
29872
|
onClose
|
|
29815
29873
|
}) {
|
|
29816
29874
|
const t = useTranslations193();
|
|
29817
|
-
const [customSegment, setCustomSegment] =
|
|
29875
|
+
const [customSegment, setCustomSegment] = useState131("");
|
|
29818
29876
|
useEffect94(() => {
|
|
29819
29877
|
if (!open) setCustomSegment("");
|
|
29820
29878
|
}, [open]);
|
|
@@ -30063,8 +30121,8 @@ var ModuleEditor = memo2(/* @__PURE__ */ __name(function ModuleEditor2({
|
|
|
30063
30121
|
function RbacContainer() {
|
|
30064
30122
|
const t = useTranslations194();
|
|
30065
30123
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
30066
|
-
const [selectedModuleId, setSelectedModuleId] =
|
|
30067
|
-
const [activePicker, setActivePicker] =
|
|
30124
|
+
const [selectedModuleId, setSelectedModuleId] = useState132(null);
|
|
30125
|
+
const [activePicker, setActivePicker] = useState132(null);
|
|
30068
30126
|
const openPicker = useCallback64((picker) => {
|
|
30069
30127
|
setActivePicker(picker);
|
|
30070
30128
|
}, []);
|
|
@@ -30175,7 +30233,7 @@ __name(RbacContainer, "RbacContainer");
|
|
|
30175
30233
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
30176
30234
|
import { Loader2Icon as Loader2Icon5 } from "lucide-react";
|
|
30177
30235
|
import { useTranslations as useTranslations195 } from "next-intl";
|
|
30178
|
-
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";
|
|
30179
30237
|
import { jsx as jsx338, jsxs as jsxs212 } from "react/jsx-runtime";
|
|
30180
30238
|
function findToken2(tokens, action) {
|
|
30181
30239
|
if (!tokens) return void 0;
|
|
@@ -30213,8 +30271,8 @@ var ACTION_LABEL_KEYS2 = {
|
|
|
30213
30271
|
function RbacByRoleContainer() {
|
|
30214
30272
|
const t = useTranslations195();
|
|
30215
30273
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
30216
|
-
const [selectedRoleId, setSelectedRoleId] =
|
|
30217
|
-
const [activePicker, setActivePicker] =
|
|
30274
|
+
const [selectedRoleId, setSelectedRoleId] = useState133(null);
|
|
30275
|
+
const [activePicker, setActivePicker] = useState133(null);
|
|
30218
30276
|
const openPicker = useCallback65((picker) => {
|
|
30219
30277
|
setActivePicker(picker);
|
|
30220
30278
|
}, []);
|
|
@@ -30715,6 +30773,10 @@ export {
|
|
|
30715
30773
|
UsersListByContentIds,
|
|
30716
30774
|
AllowedUsersDetails,
|
|
30717
30775
|
ErrorDetails,
|
|
30776
|
+
buildBlockNoteEditorOptions,
|
|
30777
|
+
resolveEditable,
|
|
30778
|
+
isDocumentEmpty,
|
|
30779
|
+
removeTrailingEmptyBlocks,
|
|
30718
30780
|
BlockNoteEditorMentionHoverCard,
|
|
30719
30781
|
mentionDataAttrs,
|
|
30720
30782
|
parseMentionElement,
|
|
@@ -31001,4 +31063,4 @@ export {
|
|
|
31001
31063
|
useOAuthClients,
|
|
31002
31064
|
useOAuthClient
|
|
31003
31065
|
};
|
|
31004
|
-
//# sourceMappingURL=chunk-
|
|
31066
|
+
//# sourceMappingURL=chunk-OVSR72CZ.mjs.map
|