@carlonicora/nextjs-jsonapi 6.29.0 → 6.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-KGCHQQVY.js → BlockNoteEditor-FTRTY4YJ.js} +15 -15
- package/dist/{BlockNoteEditor-KGCHQQVY.js.map → BlockNoteEditor-FTRTY4YJ.js.map} +1 -1
- package/dist/{BlockNoteEditor-BHCNJ2JA.mjs → BlockNoteEditor-SQQF7OCY.mjs} +2 -2
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-UQFDOZVF.mjs → chunk-MNN6MTEN.mjs} +552 -546
- package/dist/chunk-MNN6MTEN.mjs.map +1 -0
- package/dist/{chunk-WXTEAATG.js → chunk-S4FSGMKX.js} +11 -5
- package/dist/chunk-S4FSGMKX.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/forms/CommonEditorButtons.d.ts.map +1 -1
- package/dist/components/forms/EditorSheet.d.ts.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/email-automations/index.js +78 -78
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +107 -107
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/blog/index.js +93 -93
- package/dist/features/blog/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +102 -102
- package/dist/features/tokenusage/index.mjs +1 -1
- package/messages/en.json +1 -0
- package/messages/it.json +1 -0
- package/package.json +1 -1
- package/src/components/forms/CommonEditorButtons.tsx +16 -2
- package/src/components/forms/EditorSheet.tsx +7 -2
- package/src/components/forms/__tests__/EditorSheet.spec.tsx +36 -0
- package/dist/chunk-UQFDOZVF.mjs.map +0 -1
- package/dist/chunk-WXTEAATG.js.map +0 -1
- /package/dist/{BlockNoteEditor-BHCNJ2JA.mjs.map → BlockNoteEditor-SQQF7OCY.mjs.map} +0 -0
|
@@ -6767,7 +6767,7 @@ __name(useHeaderLogo, "useHeaderLogo");
|
|
|
6767
6767
|
|
|
6768
6768
|
// src/components/navigations/Breadcrumb.tsx
|
|
6769
6769
|
import { useTranslations as useTranslations57 } from "next-intl";
|
|
6770
|
-
import { Fragment as
|
|
6770
|
+
import { Fragment as Fragment24, 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
|
|
7929
|
+
import { Fragment as Fragment22, 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";
|
|
@@ -9555,7 +9555,8 @@ __name(CommonDeleter, "CommonDeleter");
|
|
|
9555
9555
|
|
|
9556
9556
|
// src/components/forms/CommonEditorButtons.tsx
|
|
9557
9557
|
import { useTranslations as useTranslations14 } from "next-intl";
|
|
9558
|
-
import {
|
|
9558
|
+
import { Loader2 as Loader23 } from "lucide-react";
|
|
9559
|
+
import { Fragment as Fragment10, jsx as jsx81, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
9559
9560
|
function CommonEditorButtons({
|
|
9560
9561
|
isEdit,
|
|
9561
9562
|
form,
|
|
@@ -9566,11 +9567,15 @@ function CommonEditorButtons({
|
|
|
9566
9567
|
buttonTitle
|
|
9567
9568
|
}) {
|
|
9568
9569
|
const t = useTranslations14();
|
|
9570
|
+
const submitLabel = form.formState.isSubmitting ? /* @__PURE__ */ jsxs43(Fragment10, { children: [
|
|
9571
|
+
/* @__PURE__ */ jsx81(Loader23, { className: "h-4 w-4 animate-spin" }),
|
|
9572
|
+
t(`ui.buttons.saving`)
|
|
9573
|
+
] }) : buttonTitle ? buttonTitle : isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`);
|
|
9569
9574
|
if (centerButtons) {
|
|
9570
9575
|
return /* @__PURE__ */ jsxs43("div", { className: "flex w-full items-center justify-between gap-x-2", children: [
|
|
9571
9576
|
/* @__PURE__ */ jsx81(Button, { variant: "outline", type: `button`, onClick: () => setOpen(false), "data-testid": `modal-button-cancel`, children: t(`ui.buttons.cancel`) }),
|
|
9572
9577
|
/* @__PURE__ */ jsx81("div", { className: "flex flex-1 justify-center gap-x-2", children: centerButtons }),
|
|
9573
|
-
!hideSubmit ? /* @__PURE__ */ jsx81(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children:
|
|
9578
|
+
!hideSubmit ? /* @__PURE__ */ jsx81(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: submitLabel }) : /* @__PURE__ */ jsx81("div", {})
|
|
9574
9579
|
] });
|
|
9575
9580
|
}
|
|
9576
9581
|
return /* @__PURE__ */ jsxs43("div", { className: "flex justify-end", children: [
|
|
@@ -9585,7 +9590,7 @@ function CommonEditorButtons({
|
|
|
9585
9590
|
children: t(`ui.buttons.cancel`)
|
|
9586
9591
|
}
|
|
9587
9592
|
),
|
|
9588
|
-
!hideSubmit && /* @__PURE__ */ jsx81(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children:
|
|
9593
|
+
!hideSubmit && /* @__PURE__ */ jsx81(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: submitLabel })
|
|
9589
9594
|
] });
|
|
9590
9595
|
}
|
|
9591
9596
|
__name(CommonEditorButtons, "CommonEditorButtons");
|
|
@@ -9898,7 +9903,7 @@ var DatePickerPopover = /* @__PURE__ */ __name(({
|
|
|
9898
9903
|
import { CalendarIcon as CalendarIcon2 } from "lucide-react";
|
|
9899
9904
|
import { useTranslations as useTranslations18 } from "next-intl";
|
|
9900
9905
|
import { useEffect as useEffect17, useState as useState23 } from "react";
|
|
9901
|
-
import { Fragment as
|
|
9906
|
+
import { Fragment as Fragment11, jsx as jsx87, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
9902
9907
|
function nextDateRange(params) {
|
|
9903
9908
|
const { current, computed, triggerDate } = params;
|
|
9904
9909
|
if (!computed) return void 0;
|
|
@@ -9942,7 +9947,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9942
9947
|
className: cn("w-[300px] justify-start text-start font-normal", !date && "text-muted-foreground"),
|
|
9943
9948
|
children: [
|
|
9944
9949
|
/* @__PURE__ */ jsx87(CalendarIcon2, {}),
|
|
9945
|
-
date?.from ? date.to ? /* @__PURE__ */ jsxs48(
|
|
9950
|
+
date?.from ? date.to ? /* @__PURE__ */ jsxs48(Fragment11, { children: [
|
|
9946
9951
|
format(date.from, "dateMedium"),
|
|
9947
9952
|
" - ",
|
|
9948
9953
|
format(date.to, "dateMedium")
|
|
@@ -9965,7 +9970,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
9965
9970
|
),
|
|
9966
9971
|
children: [
|
|
9967
9972
|
/* @__PURE__ */ jsx87(CalendarIcon2, {}),
|
|
9968
|
-
date?.from ? date.to ? /* @__PURE__ */ jsxs48(
|
|
9973
|
+
date?.from ? date.to ? /* @__PURE__ */ jsxs48(Fragment11, { children: [
|
|
9969
9974
|
format(date.from, "dateMedium"),
|
|
9970
9975
|
" - ",
|
|
9971
9976
|
format(date.to, "dateMedium")
|
|
@@ -10009,7 +10014,7 @@ __name(DateRangeSelector, "DateRangeSelector");
|
|
|
10009
10014
|
|
|
10010
10015
|
// src/components/forms/EditorSheet.tsx
|
|
10011
10016
|
import { useTranslations as useTranslations19 } from "next-intl";
|
|
10012
|
-
import { isValidElement as isValidElement2, useCallback as useCallback17, useEffect as useEffect19, useRef as useRef15 } from "react";
|
|
10017
|
+
import { isValidElement as isValidElement2, useCallback as useCallback17, useEffect as useEffect19, useRef as useRef15, useState as useState25 } from "react";
|
|
10013
10018
|
import { PencilIcon as PencilIcon3 } from "lucide-react";
|
|
10014
10019
|
|
|
10015
10020
|
// src/components/forms/useEditorDialog.ts
|
|
@@ -10132,7 +10137,7 @@ function useEditorDialog(isFormDirty, options) {
|
|
|
10132
10137
|
__name(useEditorDialog, "useEditorDialog");
|
|
10133
10138
|
|
|
10134
10139
|
// src/components/forms/EditorSheet.tsx
|
|
10135
|
-
import { Fragment as
|
|
10140
|
+
import { Fragment as Fragment12, jsx as jsx88, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
10136
10141
|
function resolveTriggerIsNativeButton(trigger) {
|
|
10137
10142
|
if (!isValidElement2(trigger)) return true;
|
|
10138
10143
|
const props = trigger.props ?? {};
|
|
@@ -10194,7 +10199,8 @@ function EditorSheet({
|
|
|
10194
10199
|
{ dialogOpen, onDialogOpenChange, forceShow }
|
|
10195
10200
|
);
|
|
10196
10201
|
const hasBeenOpen = useRef15(false);
|
|
10197
|
-
const
|
|
10202
|
+
const [mountFingerprint] = useState25(() => isEdit ? JSON.stringify(onReset()) : void 0);
|
|
10203
|
+
const seeded = useRef15(mountFingerprint);
|
|
10198
10204
|
useEffect19(() => {
|
|
10199
10205
|
if (open) {
|
|
10200
10206
|
hasBeenOpen.current = true;
|
|
@@ -10255,7 +10261,7 @@ function EditorSheet({
|
|
|
10255
10261
|
);
|
|
10256
10262
|
const headerTitle = titleOverride ?? (isEdit ? t("common.edit.update.title", { type: entityType }) : t("common.edit.create.title", { type: entityType }));
|
|
10257
10263
|
const headerDescription = descriptionOverride ?? (isEdit ? t("common.edit.update.description", { type: entityType, name: entityName2 ?? "" }) : t("common.edit.create.description", { type: entityType }));
|
|
10258
|
-
return /* @__PURE__ */ jsxs49(
|
|
10264
|
+
return /* @__PURE__ */ jsxs49(Fragment12, { children: [
|
|
10259
10265
|
/* @__PURE__ */ jsxs49(Sheet, { open, onOpenChange: handleOpenChange, children: [
|
|
10260
10266
|
dialogOpen === void 0 && forceShow === void 0 && (trigger ? (
|
|
10261
10267
|
// Base UI: the trigger renders its own <button>. Pass the caller's
|
|
@@ -10313,7 +10319,7 @@ function EditorSheet({
|
|
|
10313
10319
|
] }),
|
|
10314
10320
|
/* @__PURE__ */ jsx88("div", { className: "flex shrink-0 items-center gap-x-2", children: actions })
|
|
10315
10321
|
] })
|
|
10316
|
-
) : /* @__PURE__ */ jsxs49(
|
|
10322
|
+
) : /* @__PURE__ */ jsxs49(Fragment12, { children: [
|
|
10317
10323
|
/* @__PURE__ */ jsx88(SheetTitle, { children: headerTitle }),
|
|
10318
10324
|
/* @__PURE__ */ jsx88(SheetDescription, { children: headerDescription })
|
|
10319
10325
|
] }) }),
|
|
@@ -10349,7 +10355,7 @@ function EditorSheet({
|
|
|
10349
10355
|
__name(EditorSheet, "EditorSheet");
|
|
10350
10356
|
|
|
10351
10357
|
// src/components/forms/EntitySelector.tsx
|
|
10352
|
-
import { useCallback as useCallback18, useEffect as useEffect20, useRef as useRef16, useState as
|
|
10358
|
+
import { useCallback as useCallback18, useEffect as useEffect20, useRef as useRef16, useState as useState26 } from "react";
|
|
10353
10359
|
import { CircleX, Plus, RefreshCwIcon, SearchIcon as SearchIcon3, XIcon as XIcon6 } from "lucide-react";
|
|
10354
10360
|
import { useTranslations as useTranslations20 } from "next-intl";
|
|
10355
10361
|
import { jsx as jsx89, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
@@ -10380,12 +10386,12 @@ function EntitySelector({
|
|
|
10380
10386
|
}) {
|
|
10381
10387
|
const t = useTranslations20();
|
|
10382
10388
|
const placeholder = placeholderProp ?? t("ui.search.placeholder_global");
|
|
10383
|
-
const [open, setOpen] =
|
|
10389
|
+
const [open, setOpen] = useState26(false);
|
|
10384
10390
|
const searchTermRef = useRef16("");
|
|
10385
|
-
const [searchTerm, setSearchTerm] =
|
|
10386
|
-
const [isSearching, setIsSearching] =
|
|
10387
|
-
const [isCreating, setIsCreating] =
|
|
10388
|
-
const [selectedEntity, setSelectedEntity] =
|
|
10391
|
+
const [searchTerm, setSearchTerm] = useState26("");
|
|
10392
|
+
const [isSearching, setIsSearching] = useState26(false);
|
|
10393
|
+
const [isCreating, setIsCreating] = useState26(false);
|
|
10394
|
+
const [selectedEntity, setSelectedEntity] = useState26(void 0);
|
|
10389
10395
|
const watchedValue = shouldUseFormWatch ? form.watch(id) : void 0;
|
|
10390
10396
|
const data = useDataListRetriever({
|
|
10391
10397
|
retriever: /* @__PURE__ */ __name((params) => retriever(params), "retriever"),
|
|
@@ -10549,7 +10555,7 @@ import {
|
|
|
10549
10555
|
useEffect as useEffect21,
|
|
10550
10556
|
useMemo as useMemo13,
|
|
10551
10557
|
useRef as useRef17,
|
|
10552
|
-
useState as
|
|
10558
|
+
useState as useState27
|
|
10553
10559
|
} from "react";
|
|
10554
10560
|
import {
|
|
10555
10561
|
ErrorCode,
|
|
@@ -10577,9 +10583,9 @@ var FileUploader = forwardRef6(
|
|
|
10577
10583
|
onFilesRejected,
|
|
10578
10584
|
...props
|
|
10579
10585
|
}, ref) => {
|
|
10580
|
-
const [isFileTooBig, setIsFileTooBig] =
|
|
10581
|
-
const [isLOF, setIsLOF] =
|
|
10582
|
-
const [activeIndex, setActiveIndex] =
|
|
10586
|
+
const [isFileTooBig, setIsFileTooBig] = useState27(false);
|
|
10587
|
+
const [isLOF, setIsLOF] = useState27(false);
|
|
10588
|
+
const [activeIndex, setActiveIndex] = useState27(-1);
|
|
10583
10589
|
const { maxFiles = 1, maxSize = 4 * 1024 * 1024, multiple = true } = dropzoneOptions;
|
|
10584
10590
|
const t = useTranslations21();
|
|
10585
10591
|
const reSelectAll = maxFiles === 1 ? true : reSelect;
|
|
@@ -10876,7 +10882,7 @@ import { useRef as useRef18 } from "react";
|
|
|
10876
10882
|
import dynamic from "next/dynamic";
|
|
10877
10883
|
import React18 from "react";
|
|
10878
10884
|
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
10879
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10885
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-SQQF7OCY.mjs"), {
|
|
10880
10886
|
ssr: false
|
|
10881
10887
|
});
|
|
10882
10888
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -11019,7 +11025,7 @@ __name(FormCheckbox, "FormCheckbox");
|
|
|
11019
11025
|
// src/components/forms/FormDate.tsx
|
|
11020
11026
|
import { isValid as isValid2, parse as parse2 } from "date-fns";
|
|
11021
11027
|
import { Calendar as CalendarIcon3, CircleXIcon as CircleXIcon2 } from "lucide-react";
|
|
11022
|
-
import { useMemo as useMemo14, useState as
|
|
11028
|
+
import { useMemo as useMemo14, useState as useState28 } from "react";
|
|
11023
11029
|
import { jsx as jsx94, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
11024
11030
|
function FormDate({
|
|
11025
11031
|
form,
|
|
@@ -11037,8 +11043,8 @@ function FormDate({
|
|
|
11037
11043
|
const { locale } = useDateLocale();
|
|
11038
11044
|
const dateFnsLocale = useI18nDateFnsLocale();
|
|
11039
11045
|
const weekStartsOn = dateFnsLocale?.options?.weekStartsOn ?? 1;
|
|
11040
|
-
const [open, setOpen] =
|
|
11041
|
-
const [displayMonth, setDisplayMonth] =
|
|
11046
|
+
const [open, setOpen] = useState28(false);
|
|
11047
|
+
const [displayMonth, setDisplayMonth] = useState28(() => {
|
|
11042
11048
|
const currentValue = form.getValues(id);
|
|
11043
11049
|
return currentValue || defaultMonth || /* @__PURE__ */ new Date();
|
|
11044
11050
|
});
|
|
@@ -11065,7 +11071,7 @@ function FormDate({
|
|
|
11065
11071
|
return part.value;
|
|
11066
11072
|
}).join("");
|
|
11067
11073
|
}, [dateFormatter]);
|
|
11068
|
-
const [inputValue, setInputValue] =
|
|
11074
|
+
const [inputValue, setInputValue] = useState28(() => {
|
|
11069
11075
|
const currentValue = form.getValues(id);
|
|
11070
11076
|
return currentValue ? formatDate3(currentValue) : "";
|
|
11071
11077
|
});
|
|
@@ -11161,7 +11167,7 @@ __name(FormDate, "FormDate");
|
|
|
11161
11167
|
|
|
11162
11168
|
// src/components/forms/FormDateTime.tsx
|
|
11163
11169
|
import { Calendar as CalendarIcon4, CircleXIcon as CircleXIcon3 } from "lucide-react";
|
|
11164
|
-
import { useMemo as useMemo15, useState as
|
|
11170
|
+
import { useMemo as useMemo15, useState as useState29 } from "react";
|
|
11165
11171
|
|
|
11166
11172
|
// src/components/forms/time-cycle.ts
|
|
11167
11173
|
function to24Hour(hour12, period) {
|
|
@@ -11210,20 +11216,20 @@ function FormDateTime({
|
|
|
11210
11216
|
reference,
|
|
11211
11217
|
markedDate
|
|
11212
11218
|
}) {
|
|
11213
|
-
const [open, setOpen] =
|
|
11219
|
+
const [open, setOpen] = useState29(false);
|
|
11214
11220
|
const t = useI18nTranslations();
|
|
11215
11221
|
const { format, locale, twelveHourClock } = useDateFormatter();
|
|
11216
11222
|
const dateFnsLocale = useI18nDateFnsLocale();
|
|
11217
11223
|
const weekStartsOn = dateFnsLocale?.options?.weekStartsOn ?? 1;
|
|
11218
|
-
const [displayMonth, setDisplayMonth] =
|
|
11224
|
+
const [displayMonth, setDisplayMonth] = useState29(() => {
|
|
11219
11225
|
const currentValue = form.getValues(id);
|
|
11220
11226
|
return currentValue || defaultMonth || reference?.date || /* @__PURE__ */ new Date();
|
|
11221
11227
|
});
|
|
11222
11228
|
const formatDateTime = /* @__PURE__ */ __name((date) => format(date, "dateTimeLong"), "formatDateTime");
|
|
11223
11229
|
const periodLabels = useMemo15(() => dayPeriodLabels(locale), [locale]);
|
|
11224
11230
|
const initialTime = reference ? snapToFiveMinutes(reference.date) : /* @__PURE__ */ new Date();
|
|
11225
|
-
const [selectedHours, setSelectedHours] =
|
|
11226
|
-
const [selectedMinutes, setSelectedMinutes] =
|
|
11231
|
+
const [selectedHours, setSelectedHours] = useState29(initialTime.getHours());
|
|
11232
|
+
const [selectedMinutes, setSelectedMinutes] = useState29(roundToNearestFiveMinutes(initialTime.getMinutes()));
|
|
11227
11233
|
const dayModifiers = {
|
|
11228
11234
|
...reference ? { reference: reference.date } : {},
|
|
11229
11235
|
...markedDate ? { marked: markedDate } : {}
|
|
@@ -11654,7 +11660,7 @@ function FormPassword({
|
|
|
11654
11660
|
__name(FormPassword, "FormPassword");
|
|
11655
11661
|
|
|
11656
11662
|
// src/components/forms/FormPlaceAutocomplete.tsx
|
|
11657
|
-
import { useEffect as useEffect22, useRef as useRef19, useState as
|
|
11663
|
+
import { useEffect as useEffect22, useRef as useRef19, useState as useState31 } from "react";
|
|
11658
11664
|
import { jsx as jsx100, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
11659
11665
|
function FormPlaceAutocomplete({
|
|
11660
11666
|
form,
|
|
@@ -11670,12 +11676,12 @@ function FormPlaceAutocomplete({
|
|
|
11670
11676
|
includeTypes,
|
|
11671
11677
|
languageCode = "en"
|
|
11672
11678
|
}) {
|
|
11673
|
-
const [inputValue, setInputValue] =
|
|
11674
|
-
const [suggestions, setSuggestions] =
|
|
11675
|
-
const [isLoading, setIsLoading] =
|
|
11676
|
-
const [showSuggestions, setShowSuggestions] =
|
|
11677
|
-
const [loadError, setLoadError] =
|
|
11678
|
-
const [apiKey, setApiKey] =
|
|
11679
|
+
const [inputValue, setInputValue] = useState31("");
|
|
11680
|
+
const [suggestions, setSuggestions] = useState31([]);
|
|
11681
|
+
const [isLoading, setIsLoading] = useState31(false);
|
|
11682
|
+
const [showSuggestions, setShowSuggestions] = useState31(false);
|
|
11683
|
+
const [loadError, setLoadError] = useState31(false);
|
|
11684
|
+
const [apiKey, setApiKey] = useState31(null);
|
|
11679
11685
|
const debounceRef = useRef19(null);
|
|
11680
11686
|
const containerRef = useRef19(null);
|
|
11681
11687
|
useEffect22(() => {
|
|
@@ -12042,7 +12048,7 @@ __name(GdprConsentCheckbox, "GdprConsentCheckbox");
|
|
|
12042
12048
|
import { FileIcon, FileImageIcon, FileSpreadsheetIcon, FileTextIcon, UploadIcon as UploadIcon2, XIcon as XIcon7 } from "lucide-react";
|
|
12043
12049
|
import { useTranslations as useTranslations24 } from "next-intl";
|
|
12044
12050
|
import Image3 from "next/image";
|
|
12045
|
-
import { useEffect as useEffect23, useState as
|
|
12051
|
+
import { useEffect as useEffect23, useState as useState32 } from "react";
|
|
12046
12052
|
import { jsx as jsx106, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
12047
12053
|
var dropzone = {
|
|
12048
12054
|
maxSize: 100 * 1024 * 1024,
|
|
@@ -12085,7 +12091,7 @@ function MultiFileUploader({ files, setFiles, multiple = false, className }) {
|
|
|
12085
12091
|
__name(MultiFileUploader, "MultiFileUploader");
|
|
12086
12092
|
var FilePreviewItem = /* @__PURE__ */ __name(({ file, onRemoveClick }) => {
|
|
12087
12093
|
const t = useTranslations24();
|
|
12088
|
-
const [objectUrl, setObjectUrl] =
|
|
12094
|
+
const [objectUrl, setObjectUrl] = useState32(null);
|
|
12089
12095
|
useEffect23(() => {
|
|
12090
12096
|
if (file.type.startsWith("image/")) {
|
|
12091
12097
|
const url = URL.createObjectURL(file);
|
|
@@ -12196,14 +12202,14 @@ __name(UserAvatarList, "UserAvatarList");
|
|
|
12196
12202
|
// src/features/user/components/widgets/UserSearchPopover.tsx
|
|
12197
12203
|
import { RefreshCwIcon as RefreshCwIcon2, SearchIcon as SearchIcon4, XIcon as XIcon8 } from "lucide-react";
|
|
12198
12204
|
import { useTranslations as useTranslations26 } from "next-intl";
|
|
12199
|
-
import { useEffect as useEffect25, useState as
|
|
12205
|
+
import { useEffect as useEffect25, useState as useState34 } from "react";
|
|
12200
12206
|
|
|
12201
12207
|
// src/features/user/hooks/useUserSearch.ts
|
|
12202
|
-
import { useCallback as useCallback20, useEffect as useEffect24, useRef as useRef20, useState as
|
|
12208
|
+
import { useCallback as useCallback20, useEffect as useEffect24, useRef as useRef20, useState as useState33 } from "react";
|
|
12203
12209
|
var useUserSearch = /* @__PURE__ */ __name(() => {
|
|
12204
|
-
const [users, setUsers] =
|
|
12205
|
-
const [searchQuery, setSearchQuery] =
|
|
12206
|
-
const [isLoading, setIsLoading] =
|
|
12210
|
+
const [users, setUsers] = useState33([]);
|
|
12211
|
+
const [searchQuery, setSearchQuery] = useState33("");
|
|
12212
|
+
const [isLoading, setIsLoading] = useState33(false);
|
|
12207
12213
|
const searchQueryRef = useRef20("");
|
|
12208
12214
|
const loadUsers = useCallback20(
|
|
12209
12215
|
async (search) => {
|
|
@@ -12246,7 +12252,7 @@ var useUserSearch = /* @__PURE__ */ __name(() => {
|
|
|
12246
12252
|
// src/features/user/hooks/useUserTableStructure.tsx
|
|
12247
12253
|
import { useTranslations as useTranslations25 } from "next-intl";
|
|
12248
12254
|
import { useMemo as useMemo16 } from "react";
|
|
12249
|
-
import { Fragment as
|
|
12255
|
+
import { Fragment as Fragment13, jsx as jsx109, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
12250
12256
|
var useUserTableStructure = /* @__PURE__ */ __name((params) => {
|
|
12251
12257
|
const t = useTranslations25();
|
|
12252
12258
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -12298,7 +12304,7 @@ var useUserTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
12298
12304
|
id: "email",
|
|
12299
12305
|
accessorKey: "email",
|
|
12300
12306
|
header: t(`common.fields.email.label`),
|
|
12301
|
-
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx109(
|
|
12307
|
+
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx109(Fragment13, { children: row.getValue("email") }), "cell"),
|
|
12302
12308
|
enableSorting: false,
|
|
12303
12309
|
enableHiding: false
|
|
12304
12310
|
}),
|
|
@@ -12323,7 +12329,7 @@ var useUserTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
12323
12329
|
header: t(`common.relevance`),
|
|
12324
12330
|
cell: /* @__PURE__ */ __name(({ row }) => {
|
|
12325
12331
|
const user = row.original.jsonApiData;
|
|
12326
|
-
if (!user.relevance) return /* @__PURE__ */ jsx109(
|
|
12332
|
+
if (!user.relevance) return /* @__PURE__ */ jsx109(Fragment13, {});
|
|
12327
12333
|
const response = `${user.relevance.toFixed(0)}%`;
|
|
12328
12334
|
return /* @__PURE__ */ jsxs65("div", { className: "relative flex h-5 w-20 items-center justify-center overflow-clip rounded border text-center", children: [
|
|
12329
12335
|
/* @__PURE__ */ jsx109(
|
|
@@ -12360,7 +12366,7 @@ var useUserTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
12360
12366
|
import { jsx as jsx110, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
12361
12367
|
var UserSearchPopover = /* @__PURE__ */ __name(({ children, onSelect, align = "start", className }) => {
|
|
12362
12368
|
const t = useTranslations26();
|
|
12363
|
-
const [isOpen, setIsOpen] =
|
|
12369
|
+
const [isOpen, setIsOpen] = useState34(false);
|
|
12364
12370
|
const { users, searchQuery, setSearchQuery, isLoading, loadUsers, clearSearch } = useUserSearch();
|
|
12365
12371
|
useEffect25(() => {
|
|
12366
12372
|
if (isOpen && users.length === 0 && !searchQuery) {
|
|
@@ -12417,13 +12423,13 @@ var UserSearchPopover = /* @__PURE__ */ __name(({ children, onSelect, align = "s
|
|
|
12417
12423
|
}, "UserSearchPopover");
|
|
12418
12424
|
|
|
12419
12425
|
// src/features/user/components/forms/UserSelector.tsx
|
|
12420
|
-
import { Fragment as
|
|
12426
|
+
import { Fragment as Fragment14, jsx as jsx111, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
12421
12427
|
function UserSelector({ id, form, label, placeholder, onChange, isRequired = false }) {
|
|
12422
12428
|
const t = useTranslations27();
|
|
12423
|
-
const [open, setOpen] =
|
|
12429
|
+
const [open, setOpen] = useState35(false);
|
|
12424
12430
|
const searchTermRef = useRef21("");
|
|
12425
|
-
const [searchTerm, setSearchTerm] =
|
|
12426
|
-
const [isSearching, setIsSearching] =
|
|
12431
|
+
const [searchTerm, setSearchTerm] = useState35("");
|
|
12432
|
+
const [isSearching, setIsSearching] = useState35(false);
|
|
12427
12433
|
const data = useDataListRetriever({
|
|
12428
12434
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
12429
12435
|
return UserService.findMany(params);
|
|
@@ -12501,7 +12507,7 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
|
|
|
12501
12507
|
search("");
|
|
12502
12508
|
}
|
|
12503
12509
|
}
|
|
12504
|
-
) : /* @__PURE__ */ jsx111(
|
|
12510
|
+
) : /* @__PURE__ */ jsx111(Fragment14, {})
|
|
12505
12511
|
] }),
|
|
12506
12512
|
/* @__PURE__ */ jsx111(CommandList, { children: data.data && data.data.length > 0 && data.data.map((user) => /* @__PURE__ */ jsxs67(
|
|
12507
12513
|
CommandItem,
|
|
@@ -12529,7 +12535,7 @@ var UserProvider = /* @__PURE__ */ __name(({ children, dehydratedUser }) => {
|
|
|
12529
12535
|
const generateUrl = usePageUrlGenerator();
|
|
12530
12536
|
const { hasPermissionToModule, hasRole } = useCurrentUserContext();
|
|
12531
12537
|
const t = useTranslations28();
|
|
12532
|
-
const [user, setUser] =
|
|
12538
|
+
const [user, setUser] = useState36(
|
|
12533
12539
|
dehydratedUser ? rehydrate(Modules.User, dehydratedUser) : void 0
|
|
12534
12540
|
);
|
|
12535
12541
|
const breadcrumb = /* @__PURE__ */ __name(() => {
|
|
@@ -12668,7 +12674,7 @@ __name(AttributeElement, "AttributeElement");
|
|
|
12668
12674
|
|
|
12669
12675
|
// src/features/user/components/details/UserContent.tsx
|
|
12670
12676
|
import { BriefcaseIcon, MailIcon as MailIcon2, PhoneIcon } from "lucide-react";
|
|
12671
|
-
import { Fragment as
|
|
12677
|
+
import { Fragment as Fragment15, jsx as jsx117, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
12672
12678
|
function UserContent({ user }) {
|
|
12673
12679
|
const t = useTranslations31();
|
|
12674
12680
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -12696,7 +12702,7 @@ function UserContent({ user }) {
|
|
|
12696
12702
|
),
|
|
12697
12703
|
/* @__PURE__ */ jsxs69("div", { className: "flex flex-col gap-y-2", children: [
|
|
12698
12704
|
user.roles && user.roles.length > 0 && /* @__PURE__ */ jsx117("div", { className: "flex flex-wrap gap-2", children: user.roles.map((role) => /* @__PURE__ */ jsx117(Link, { href: generateUrl({ page: Modules.Role, id: role.id }), children: /* @__PURE__ */ jsx117(Badge, { variant: "default", children: t(`role.roles`, { role: role.id.replaceAll(`-`, ``) }) }) }, role.id)) }),
|
|
12699
|
-
user.isDeleted ? /* @__PURE__ */ jsx117("div", { children: /* @__PURE__ */ jsx117(Badge, { variant: "destructive", children: t(`user.errors.deleted`) }) }) : /* @__PURE__ */ jsx117(
|
|
12705
|
+
user.isDeleted ? /* @__PURE__ */ jsx117("div", { children: /* @__PURE__ */ jsx117(Badge, { variant: "destructive", children: t(`user.errors.deleted`) }) }) : /* @__PURE__ */ jsx117(Fragment15, { children: !user.isActivated && /* @__PURE__ */ jsx117("div", { children: /* @__PURE__ */ jsx117(Badge, { variant: "destructive", children: t(`user.errors.inactive`) }) }) }),
|
|
12700
12706
|
user.title && /* @__PURE__ */ jsxs69("div", { className: "text-muted-foreground flex items-center gap-x-2 text-sm", children: [
|
|
12701
12707
|
/* @__PURE__ */ jsx117(BriefcaseIcon, { className: "h-4 w-4 shrink-0" }),
|
|
12702
12708
|
user.title
|
|
@@ -12735,12 +12741,12 @@ __name(UserIndexDetails, "UserIndexDetails");
|
|
|
12735
12741
|
// src/features/user/components/details/UserStandaloneDetails.tsx
|
|
12736
12742
|
import { useTranslations as useTranslations32 } from "next-intl";
|
|
12737
12743
|
import Image4 from "next/image";
|
|
12738
|
-
import { Fragment as
|
|
12744
|
+
import { Fragment as Fragment16, jsx as jsx119, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
12739
12745
|
function UserStanadaloneDetails({ user }) {
|
|
12740
12746
|
const generateUrl = usePageUrlGenerator();
|
|
12741
12747
|
const t = useTranslations32();
|
|
12742
12748
|
const { title } = useSharedContext();
|
|
12743
|
-
let roles = /* @__PURE__ */ jsx119(
|
|
12749
|
+
let roles = /* @__PURE__ */ jsx119(Fragment16, {});
|
|
12744
12750
|
if (user.roles && user.roles.length > 0) {
|
|
12745
12751
|
roles = /* @__PURE__ */ jsx119("div", { className: "mb-4 w-full", children: /* @__PURE__ */ jsx119("div", { className: "flex flex-wrap gap-2", children: user.roles.map((role, _index) => /* @__PURE__ */ jsx119(Link, { href: generateUrl({ page: Modules.Role, id: role.id }), children: /* @__PURE__ */ jsx119(Badge, { className: "me-2", variant: `default`, children: t(`role.roles`, { role: role.id.replaceAll(`-`, ``) }) }) }, role.id)) }) });
|
|
12746
12752
|
}
|
|
@@ -12758,7 +12764,7 @@ function UserStanadaloneDetails({ user }) {
|
|
|
12758
12764
|
) }) }),
|
|
12759
12765
|
/* @__PURE__ */ jsxs71("div", { className: "flex w-full flex-col gap-y-2", children: [
|
|
12760
12766
|
/* @__PURE__ */ jsx119(ContentTitle, { module: Modules.User, type: title.type, element: title.element, functions: title.functions }),
|
|
12761
|
-
user.isDeleted ? /* @__PURE__ */ jsx119("div", { children: /* @__PURE__ */ jsx119(Badge, { variant: "destructive", children: t(`user.errors.deleted`) }) }) : /* @__PURE__ */ jsx119(
|
|
12767
|
+
user.isDeleted ? /* @__PURE__ */ jsx119("div", { children: /* @__PURE__ */ jsx119(Badge, { variant: "destructive", children: t(`user.errors.deleted`) }) }) : /* @__PURE__ */ jsx119(Fragment16, { children: !user.isActivated && /* @__PURE__ */ jsx119("div", { children: /* @__PURE__ */ jsx119(Badge, { variant: "destructive", children: t(`user.errors.inactive`) }) }) }),
|
|
12762
12768
|
roles,
|
|
12763
12769
|
/* @__PURE__ */ jsx119(AttributeElement, { inline: true, title: t(`user.fields.title.label`), value: user.title }),
|
|
12764
12770
|
/* @__PURE__ */ jsx119(AttributeElement, { inline: true, title: t(`common.fields.email.label`), value: user.email }),
|
|
@@ -12941,9 +12947,9 @@ __name(RoleUsersList, "RoleUsersList");
|
|
|
12941
12947
|
|
|
12942
12948
|
// src/features/user/components/lists/UserListInAdd.tsx
|
|
12943
12949
|
import React21 from "react";
|
|
12944
|
-
import { Fragment as
|
|
12950
|
+
import { Fragment as Fragment17, jsx as jsx128, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
12945
12951
|
function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
12946
|
-
return /* @__PURE__ */ jsx128(
|
|
12952
|
+
return /* @__PURE__ */ jsx128(Fragment17, { children: data.data !== void 0 && data.data.filter(
|
|
12947
12953
|
(user) => existingUsers && !existingUsers.find((existingUser) => existingUser.id === user.id)
|
|
12948
12954
|
).map((user) => {
|
|
12949
12955
|
return /* @__PURE__ */ jsx128(React21.Fragment, { children: /* @__PURE__ */ jsx128(
|
|
@@ -13141,7 +13147,7 @@ __name(CompanyContent, "CompanyContent");
|
|
|
13141
13147
|
import { Battery, BatteryFull, BatteryLow, BatteryMedium, PlusCircle } from "lucide-react";
|
|
13142
13148
|
import Link2 from "next/link";
|
|
13143
13149
|
import { useTranslations as useTranslations42 } from "next-intl";
|
|
13144
|
-
import { Fragment as
|
|
13150
|
+
import { Fragment as Fragment18, jsx as jsx134, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
13145
13151
|
var asWholeCredits = /* @__PURE__ */ __name((value, locale) => Math.trunc(value).toLocaleString(locale), "asWholeCredits");
|
|
13146
13152
|
function TokenStatusIndicator({
|
|
13147
13153
|
className,
|
|
@@ -13231,7 +13237,7 @@ function TokenStatusIndicator({
|
|
|
13231
13237
|
/* @__PURE__ */ jsx134(Link2, { href: "/settings/billing?action=subscribe", className: "w-full flex justify-end my-4", children: /* @__PURE__ */ jsx134(Button, { variant: "outline", size: "sm", children: t("billing.tokens.purchase_extra", { defaultValue: "Purchase additional analysis" }) }) })
|
|
13232
13238
|
] })
|
|
13233
13239
|
] });
|
|
13234
|
-
const badge = /* @__PURE__ */ jsxs76(
|
|
13240
|
+
const badge = /* @__PURE__ */ jsxs76(Fragment18, { children: [
|
|
13235
13241
|
getBatteryIcon(),
|
|
13236
13242
|
/* @__PURE__ */ jsx134("span", { className: cn(textSize, "text-muted-foreground font-medium leading-none"), children: asWholeCredits(availableMonthlyCredits, locale) }),
|
|
13237
13243
|
showExtraPages && availableExtraCredits > 0 && /* @__PURE__ */ jsxs76("span", { className: "inline-flex items-center gap-0.5", children: [
|
|
@@ -13289,12 +13295,12 @@ function CompanyDetails() {
|
|
|
13289
13295
|
__name(CompanyDetails, "CompanyDetails");
|
|
13290
13296
|
|
|
13291
13297
|
// src/features/company/components/containers/AdminCompanyContainer.tsx
|
|
13292
|
-
import { Fragment as
|
|
13298
|
+
import { Fragment as Fragment19, jsx as jsx136, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
13293
13299
|
function AdminCompanyContainerInternal() {
|
|
13294
13300
|
const { company } = useCompanyContext();
|
|
13295
13301
|
const { hasRole } = useCurrentUserContext();
|
|
13296
13302
|
if (!company || !hasRole(getRoleId().Administrator)) return null;
|
|
13297
|
-
return /* @__PURE__ */ jsxs78(
|
|
13303
|
+
return /* @__PURE__ */ jsxs78(Fragment19, { children: [
|
|
13298
13304
|
/* @__PURE__ */ jsx136(CompanyDetails, {}),
|
|
13299
13305
|
/* @__PURE__ */ jsx136(AdminUsersList, {})
|
|
13300
13306
|
] });
|
|
@@ -13313,11 +13319,11 @@ import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
|
|
|
13313
13319
|
import { UploadIcon as UploadIcon3 } from "lucide-react";
|
|
13314
13320
|
import { useTranslations as useTranslations43 } from "next-intl";
|
|
13315
13321
|
import Image6 from "next/image";
|
|
13316
|
-
import { useCallback as useCallback22, useEffect as useEffect28, useMemo as useMemo17, useRef as useRef22, useState as
|
|
13322
|
+
import { useCallback as useCallback22, useEffect as useEffect28, useMemo as useMemo17, useRef as useRef22, useState as useState37 } from "react";
|
|
13317
13323
|
import { useForm as useForm2 } from "react-hook-form";
|
|
13318
13324
|
import { v4 as v42 } from "uuid";
|
|
13319
13325
|
import { z as z2 } from "zod";
|
|
13320
|
-
import { Fragment as
|
|
13326
|
+
import { Fragment as Fragment20, jsx as jsx137, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
13321
13327
|
function CompanyEditorInternal({
|
|
13322
13328
|
company,
|
|
13323
13329
|
propagateChanges,
|
|
@@ -13330,10 +13336,10 @@ function CompanyEditorInternal({
|
|
|
13330
13336
|
}) {
|
|
13331
13337
|
const { hasRole, setUser } = useCurrentUserContext();
|
|
13332
13338
|
const router = useI18nRouter();
|
|
13333
|
-
const [features, setFeatures] =
|
|
13334
|
-
const [file, setFile] =
|
|
13335
|
-
const [files, setFiles] =
|
|
13336
|
-
const [contentType, setContentType] =
|
|
13339
|
+
const [features, setFeatures] = useState37([]);
|
|
13340
|
+
const [file, setFile] = useState37(null);
|
|
13341
|
+
const [files, setFiles] = useState37(null);
|
|
13342
|
+
const [contentType, setContentType] = useState37(null);
|
|
13337
13343
|
const t = useTranslations43();
|
|
13338
13344
|
const fiscalRef = useRef22(null);
|
|
13339
13345
|
const addressComponentsRef = useRef22({});
|
|
@@ -13479,7 +13485,7 @@ function CompanyEditorInternal({
|
|
|
13479
13485
|
height: 200,
|
|
13480
13486
|
unoptimized: isRemoteImageSrc(file ? void 0 : company?.logo)
|
|
13481
13487
|
}
|
|
13482
|
-
) : /* @__PURE__ */ jsxs79(
|
|
13488
|
+
) : /* @__PURE__ */ jsxs79(Fragment20, { children: [
|
|
13483
13489
|
/* @__PURE__ */ jsx137(UploadIcon3, { className: "my-4 h-8 w-8" }),
|
|
13484
13490
|
/* @__PURE__ */ jsx137("p", { className: "mb-1 flex w-full text-center text-sm", children: t(`company.click_drag_logo`) })
|
|
13485
13491
|
] }) }) }) }) }) }),
|
|
@@ -13626,15 +13632,15 @@ __name(CompanyConfigurationEditor, "CompanyConfigurationEditor");
|
|
|
13626
13632
|
// src/features/company/components/forms/CompanyDeleter.tsx
|
|
13627
13633
|
import { LoaderCircleIcon as LoaderCircleIcon3, Trash2Icon as Trash2Icon3 } from "lucide-react";
|
|
13628
13634
|
import { useTranslations as useTranslations46 } from "next-intl";
|
|
13629
|
-
import { useState as
|
|
13630
|
-
import { Fragment as
|
|
13635
|
+
import { useState as useState38 } from "react";
|
|
13636
|
+
import { Fragment as Fragment21, jsx as jsx142, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
13631
13637
|
function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 }) {
|
|
13632
13638
|
const t = useTranslations46();
|
|
13633
13639
|
const generateUrl = usePageUrlGenerator();
|
|
13634
|
-
const [open, setOpen] =
|
|
13635
|
-
const [finalWarningOpen, setFinalWarningOpen] =
|
|
13636
|
-
const [isDeleting, setIsDeleting] =
|
|
13637
|
-
const [companyName, setCompanyName] =
|
|
13640
|
+
const [open, setOpen] = useState38(false);
|
|
13641
|
+
const [finalWarningOpen, setFinalWarningOpen] = useState38(false);
|
|
13642
|
+
const [isDeleting, setIsDeleting] = useState38(false);
|
|
13643
|
+
const [companyName, setCompanyName] = useState38("");
|
|
13638
13644
|
const handleProceedToFinalWarning = /* @__PURE__ */ __name(() => {
|
|
13639
13645
|
setOpen(false);
|
|
13640
13646
|
setFinalWarningOpen(true);
|
|
@@ -13658,7 +13664,7 @@ function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 })
|
|
|
13658
13664
|
setFinalWarningOpen(false);
|
|
13659
13665
|
setCompanyName("");
|
|
13660
13666
|
}, "handleGoBack");
|
|
13661
|
-
return /* @__PURE__ */ jsxs81(
|
|
13667
|
+
return /* @__PURE__ */ jsxs81(Fragment21, { children: [
|
|
13662
13668
|
/* @__PURE__ */ jsxs81(AlertDialog, { open, onOpenChange: setOpen, children: [
|
|
13663
13669
|
/* @__PURE__ */ jsx142(AlertDialogTrigger, { children: /* @__PURE__ */ jsx142(
|
|
13664
13670
|
Button,
|
|
@@ -13739,7 +13745,7 @@ function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 })
|
|
|
13739
13745
|
},
|
|
13740
13746
|
variant: "destructive",
|
|
13741
13747
|
disabled: isDeleting,
|
|
13742
|
-
children: isDeleting ? /* @__PURE__ */ jsxs81(
|
|
13748
|
+
children: isDeleting ? /* @__PURE__ */ jsxs81(Fragment21, { children: [
|
|
13743
13749
|
t(`ui.buttons.deleting`),
|
|
13744
13750
|
/* @__PURE__ */ jsx142(LoaderCircleIcon3, { className: "animate-spin-slow h-5 w-5" })
|
|
13745
13751
|
] }) : t(`ui.buttons.delete_forever`)
|
|
@@ -13774,7 +13780,7 @@ var CompanyProvider = /* @__PURE__ */ __name(({ children, dehydratedCompany, con
|
|
|
13774
13780
|
const generateUrl = usePageUrlGenerator();
|
|
13775
13781
|
const t = useTranslations47();
|
|
13776
13782
|
const { hasPermissionToModule, hasRole } = useCurrentUserContext();
|
|
13777
|
-
const [company, setCompany] =
|
|
13783
|
+
const [company, setCompany] = useState39(
|
|
13778
13784
|
dehydratedCompany ? rehydrate(Modules.Company, dehydratedCompany) : void 0
|
|
13779
13785
|
);
|
|
13780
13786
|
const breadcrumb = /* @__PURE__ */ __name(() => {
|
|
@@ -13800,7 +13806,7 @@ var CompanyProvider = /* @__PURE__ */ __name(({ children, dehydratedCompany, con
|
|
|
13800
13806
|
functions.push(/* @__PURE__ */ jsx143(CompanyDeleter, { company }, "companyDeleter"));
|
|
13801
13807
|
if (hasRole(getRoleId().Administrator) || hasPermissionToModule({ module: Modules.Company, action: "update" /* Update */ })) {
|
|
13802
13808
|
if (company && configurationEditorSlot)
|
|
13803
|
-
functions.push(/* @__PURE__ */ jsx143(
|
|
13809
|
+
functions.push(/* @__PURE__ */ jsx143(Fragment22, { children: configurationEditorSlot }, "configurationEditorSlot"));
|
|
13804
13810
|
functions.push(/* @__PURE__ */ jsx143(CompanyEditor, { company, propagateChanges: setCompany }, "companyEditor"));
|
|
13805
13811
|
}
|
|
13806
13812
|
if (functions.length > 0) response.functions = functions;
|
|
@@ -13823,11 +13829,11 @@ var useCompanyContext = /* @__PURE__ */ __name(() => {
|
|
|
13823
13829
|
|
|
13824
13830
|
// src/features/notification/contexts/NotificationContext.tsx
|
|
13825
13831
|
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
|
|
13832
|
+
import { createContext as createContext18, useCallback as useCallback23, useContext as useContext19, useEffect as useEffect30, useRef as useRef23, useState as useState41 } from "react";
|
|
13827
13833
|
|
|
13828
13834
|
// src/features/notification/components/notifications/Notification.tsx
|
|
13829
13835
|
import { useTranslations as useTranslations48 } from "next-intl";
|
|
13830
|
-
import { Suspense, useEffect as useEffect29, useState as
|
|
13836
|
+
import { Suspense, useEffect as useEffect29, useState as useState40 } from "react";
|
|
13831
13837
|
|
|
13832
13838
|
// src/features/notification/components/notifications/NotificationIcon.tsx
|
|
13833
13839
|
import { ArchiveIcon, AudioLinesIcon, BellIcon } from "lucide-react";
|
|
@@ -13856,7 +13862,7 @@ function NotificationIcon({ notificationType, className }) {
|
|
|
13856
13862
|
__name(NotificationIcon, "NotificationIcon");
|
|
13857
13863
|
|
|
13858
13864
|
// src/features/notification/components/notifications/Notification.tsx
|
|
13859
|
-
import { Fragment as
|
|
13865
|
+
import { Fragment as Fragment23, jsx as jsx145, jsxs as jsxs82 } from "react/jsx-runtime";
|
|
13860
13866
|
var generateNotificationData = /* @__PURE__ */ __name((params) => {
|
|
13861
13867
|
const response = {};
|
|
13862
13868
|
response.actor = params.notification.actor;
|
|
@@ -13867,7 +13873,7 @@ var generateNotificationData = /* @__PURE__ */ __name((params) => {
|
|
|
13867
13873
|
}, "generateNotificationData");
|
|
13868
13874
|
function NotificationToastTime({ date }) {
|
|
13869
13875
|
const { format } = useDateFormatter();
|
|
13870
|
-
return /* @__PURE__ */ jsx145(
|
|
13876
|
+
return /* @__PURE__ */ jsx145(Fragment23, { children: format(new Date(date), "dateTime") });
|
|
13871
13877
|
}
|
|
13872
13878
|
__name(NotificationToastTime, "NotificationToastTime");
|
|
13873
13879
|
function NotificationToast(notification, t, generateUrl, reouter, dateLocaleSource = null) {
|
|
@@ -13898,12 +13904,12 @@ __name(NotificationToast, "NotificationToast");
|
|
|
13898
13904
|
function NotificationMenuItemTime({ date }) {
|
|
13899
13905
|
const { locale } = useDateFormatter();
|
|
13900
13906
|
const now = useMountedNow();
|
|
13901
|
-
return /* @__PURE__ */ jsx145(
|
|
13907
|
+
return /* @__PURE__ */ jsx145(Fragment23, { children: now ? formatDate(new Date(date), "default", locale, now) : "" });
|
|
13902
13908
|
}
|
|
13903
13909
|
__name(NotificationMenuItemTime, "NotificationMenuItemTime");
|
|
13904
13910
|
function NotificationMenuItem({ notification, closePopover }) {
|
|
13905
13911
|
const generateUrl = usePageUrlGenerator();
|
|
13906
|
-
const [isRead, setIsRead] =
|
|
13912
|
+
const [isRead, setIsRead] = useState40(false);
|
|
13907
13913
|
const t = useTranslations48();
|
|
13908
13914
|
useEffect29(() => {
|
|
13909
13915
|
setIsRead(notification.isRead);
|
|
@@ -13947,11 +13953,11 @@ var NotificationContextProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
|
13947
13953
|
const tRef = useRef23(t);
|
|
13948
13954
|
tRef.current = t;
|
|
13949
13955
|
const router = useI18nRouter();
|
|
13950
|
-
const [notifications, setNotifications] =
|
|
13951
|
-
const [isLoading, setIsLoading] =
|
|
13952
|
-
const [error, setError] =
|
|
13953
|
-
const [lastLoaded, setLastLoaded] =
|
|
13954
|
-
const [hasInitiallyLoaded, setHasInitiallyLoaded] =
|
|
13956
|
+
const [notifications, setNotifications] = useState41([]);
|
|
13957
|
+
const [isLoading, setIsLoading] = useState41(false);
|
|
13958
|
+
const [error, setError] = useState41(null);
|
|
13959
|
+
const [lastLoaded, setLastLoaded] = useState41(0);
|
|
13960
|
+
const [hasInitiallyLoaded, setHasInitiallyLoaded] = useState41(false);
|
|
13955
13961
|
const inFlightRef = useRef23(null);
|
|
13956
13962
|
const { currentUser } = useCurrentUserContext();
|
|
13957
13963
|
const shouldRefresh = lastLoaded === 0 || Date.now() - lastLoaded > 5 * 60 * 1e3;
|
|
@@ -14078,7 +14084,7 @@ var useNotificationContext = /* @__PURE__ */ __name(() => {
|
|
|
14078
14084
|
}, "useNotificationContext");
|
|
14079
14085
|
|
|
14080
14086
|
// 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
|
|
14087
|
+
import { createContext as createContext19, useCallback as useCallback24, useContext as useContext20, useEffect as useEffect31, useRef as useRef24, useState as useState42 } from "react";
|
|
14082
14088
|
import { flushSync } from "react-dom";
|
|
14083
14089
|
import { createRoot } from "react-dom/client";
|
|
14084
14090
|
import { driver } from "driver.js";
|
|
@@ -14152,10 +14158,10 @@ function OnboardingProvider({
|
|
|
14152
14158
|
zIndex: _zIndex = 9999,
|
|
14153
14159
|
onTourEnd
|
|
14154
14160
|
}) {
|
|
14155
|
-
const [isTourActive, setIsTourActive] =
|
|
14156
|
-
const [activeTourId, setActiveTourId] =
|
|
14157
|
-
const [currentStepIndex, setCurrentStepIndex] =
|
|
14158
|
-
const [totalSteps, setTotalSteps] =
|
|
14161
|
+
const [isTourActive, setIsTourActive] = useState42(false);
|
|
14162
|
+
const [activeTourId, setActiveTourId] = useState42(null);
|
|
14163
|
+
const [currentStepIndex, setCurrentStepIndex] = useState42(0);
|
|
14164
|
+
const [totalSteps, setTotalSteps] = useState42(0);
|
|
14159
14165
|
const driverRef = useRef24(null);
|
|
14160
14166
|
const rootsRef = useRef24(/* @__PURE__ */ new Map());
|
|
14161
14167
|
const endReasonRef = useRef24("dismissed");
|
|
@@ -14322,13 +14328,13 @@ __name(useOnboarding, "useOnboarding");
|
|
|
14322
14328
|
|
|
14323
14329
|
// src/features/role/contexts/RoleContext.tsx
|
|
14324
14330
|
import { useTranslations as useTranslations50 } from "next-intl";
|
|
14325
|
-
import { createContext as createContext20, useContext as useContext21, useState as
|
|
14331
|
+
import { createContext as createContext20, useContext as useContext21, useState as useState43 } from "react";
|
|
14326
14332
|
import { jsx as jsx149 } from "react/jsx-runtime";
|
|
14327
14333
|
var RoleContext = createContext20(void 0);
|
|
14328
14334
|
var RoleProvider = /* @__PURE__ */ __name(({ children, dehydratedRole }) => {
|
|
14329
14335
|
const generateUrl = usePageUrlGenerator();
|
|
14330
14336
|
const t = useTranslations50();
|
|
14331
|
-
const [role, setRole] =
|
|
14337
|
+
const [role, setRole] = useState43(
|
|
14332
14338
|
dehydratedRole ? rehydrate(Modules.Role, dehydratedRole) : void 0
|
|
14333
14339
|
);
|
|
14334
14340
|
const breadcrumb = /* @__PURE__ */ __name(() => {
|
|
@@ -14398,7 +14404,7 @@ __name(HowToDeleter, "HowToDeleter");
|
|
|
14398
14404
|
import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
|
|
14399
14405
|
import { PlusIcon, SearchIcon as SearchIcon6, XIcon as XIcon10 } from "lucide-react";
|
|
14400
14406
|
import { useTranslations as useTranslations52 } from "next-intl";
|
|
14401
|
-
import { useCallback as useCallback25, useEffect as useEffect32, useMemo as useMemo18, useRef as useRef25, useState as
|
|
14407
|
+
import { useCallback as useCallback25, useEffect as useEffect32, useMemo as useMemo18, useRef as useRef25, useState as useState44 } from "react";
|
|
14402
14408
|
import { useForm as useForm4 } from "react-hook-form";
|
|
14403
14409
|
import { v4 as v43 } from "uuid";
|
|
14404
14410
|
import { z as z3 } from "zod";
|
|
@@ -14447,8 +14453,8 @@ function PageSelector({
|
|
|
14447
14453
|
onSelect,
|
|
14448
14454
|
onRemove
|
|
14449
14455
|
}) {
|
|
14450
|
-
const [open, setOpen] =
|
|
14451
|
-
const [search, setSearch] =
|
|
14456
|
+
const [open, setOpen] = useState44(false);
|
|
14457
|
+
const [search, setSearch] = useState44("");
|
|
14452
14458
|
const selectedLabel = value ? allPageUrls.find((opt) => opt.id === value) : void 0;
|
|
14453
14459
|
const filteredOptions = useMemo18(() => {
|
|
14454
14460
|
const available = allPageUrls.filter((opt) => opt.id === value || !selectedPages.includes(opt.id));
|
|
@@ -14760,13 +14766,13 @@ __name(HowToEditor, "HowToEditor");
|
|
|
14760
14766
|
|
|
14761
14767
|
// src/features/how-to/contexts/HowToContext.tsx
|
|
14762
14768
|
import { useTranslations as useTranslations53 } from "next-intl";
|
|
14763
|
-
import { createContext as createContext21, useContext as useContext22, useState as
|
|
14769
|
+
import { createContext as createContext21, useContext as useContext22, useState as useState45 } from "react";
|
|
14764
14770
|
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
14765
14771
|
var HowToContext = createContext21(void 0);
|
|
14766
14772
|
var HowToProvider = /* @__PURE__ */ __name(({ children, dehydratedHowTo }) => {
|
|
14767
14773
|
const generateUrl = usePageUrlGenerator();
|
|
14768
14774
|
const t = useTranslations53();
|
|
14769
|
-
const [howTo, setHowTo] =
|
|
14775
|
+
const [howTo, setHowTo] = useState45(
|
|
14770
14776
|
dehydratedHowTo ? rehydrate(Modules.HowTo, dehydratedHowTo) : void 0
|
|
14771
14777
|
);
|
|
14772
14778
|
const reloadHowTo = /* @__PURE__ */ __name(async () => {
|
|
@@ -14825,7 +14831,7 @@ var useHowToContext = /* @__PURE__ */ __name(() => {
|
|
|
14825
14831
|
// src/features/rbac/contexts/RbacContext.tsx
|
|
14826
14832
|
import { DownloadIcon, Loader2Icon as Loader2Icon3 } from "lucide-react";
|
|
14827
14833
|
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
|
|
14834
|
+
import { createContext as createContext22, useCallback as useCallback26, useContext as useContext23, useEffect as useEffect33, useMemo as useMemo19, useState as useState46 } from "react";
|
|
14829
14835
|
import { jsx as jsx154, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
14830
14836
|
var DEFAULT_OUTPUT_PATH = "apps/api/src/rbac/permissions.ts";
|
|
14831
14837
|
function upsertToken(tokens, action, scope) {
|
|
@@ -14847,11 +14853,11 @@ var RbacProvider = /* @__PURE__ */ __name(({
|
|
|
14847
14853
|
outputPath = DEFAULT_OUTPUT_PATH
|
|
14848
14854
|
}) => {
|
|
14849
14855
|
const t = useTranslations54();
|
|
14850
|
-
const [matrix, setMatrix] =
|
|
14851
|
-
const [modulePaths, setModulePaths] =
|
|
14852
|
-
const [loading, setLoading] =
|
|
14853
|
-
const [error, setError] =
|
|
14854
|
-
const [saving, setSaving] =
|
|
14856
|
+
const [matrix, setMatrix] = useState46(null);
|
|
14857
|
+
const [modulePaths, setModulePaths] = useState46({});
|
|
14858
|
+
const [loading, setLoading] = useState46(true);
|
|
14859
|
+
const [error, setError] = useState46(null);
|
|
14860
|
+
const [saving, setSaving] = useState46(false);
|
|
14855
14861
|
useEffect33(() => {
|
|
14856
14862
|
let cancelled = false;
|
|
14857
14863
|
setLoading(true);
|
|
@@ -14957,7 +14963,7 @@ var useRbacContext = /* @__PURE__ */ __name(() => {
|
|
|
14957
14963
|
// src/features/assistant/contexts/AssistantContext.tsx
|
|
14958
14964
|
import { PlusCircleIcon as PlusCircleIcon2 } from "lucide-react";
|
|
14959
14965
|
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
|
|
14966
|
+
import { createContext as createContext23, useCallback as useCallback27, useContext as useContext24, useEffect as useEffect34, useMemo as useMemo20, useState as useState47 } from "react";
|
|
14961
14967
|
import { jsx as jsx155, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
14962
14968
|
var AssistantContext = createContext23(void 0);
|
|
14963
14969
|
function stripOptimistic(list) {
|
|
@@ -14996,21 +15002,21 @@ function AssistantProvider({
|
|
|
14996
15002
|
(id) => threadUrl ? threadUrl(id) : id ? `/assistants/${id}` : "/assistants",
|
|
14997
15003
|
[threadUrl]
|
|
14998
15004
|
);
|
|
14999
|
-
const [assistant, setAssistant] =
|
|
15005
|
+
const [assistant, setAssistant] = useState47(
|
|
15000
15006
|
() => dehydratedAssistant ? rehydrate(Modules.Assistant, dehydratedAssistant) : void 0
|
|
15001
15007
|
);
|
|
15002
|
-
const [messages, setMessages] =
|
|
15008
|
+
const [messages, setMessages] = useState47(
|
|
15003
15009
|
() => dehydratedMessages ? rehydrateList(Modules.AssistantMessage, dehydratedMessages) : []
|
|
15004
15010
|
);
|
|
15005
|
-
const [threads, setThreads] =
|
|
15006
|
-
const [threadsLoading, setThreadsLoading] =
|
|
15007
|
-
const [sending, setSending] =
|
|
15008
|
-
const [status, setStatus] =
|
|
15009
|
-
const [failedMessageIds, setFailedMessageIds] =
|
|
15010
|
-
const [operatorMode, setOperatorMode] =
|
|
15011
|
+
const [threads, setThreads] = useState47([]);
|
|
15012
|
+
const [threadsLoading, setThreadsLoading] = useState47(true);
|
|
15013
|
+
const [sending, setSending] = useState47(false);
|
|
15014
|
+
const [status, setStatus] = useState47(void 0);
|
|
15015
|
+
const [failedMessageIds, setFailedMessageIds] = useState47(() => /* @__PURE__ */ new Set());
|
|
15016
|
+
const [operatorMode, setOperatorMode] = useState47(
|
|
15011
15017
|
() => dehydratedAssistant?.jsonApi?.attributes?.engine === "operator"
|
|
15012
15018
|
);
|
|
15013
|
-
const [pendingScope, setPendingScope] =
|
|
15019
|
+
const [pendingScope, setPendingScope] = useState47(scope);
|
|
15014
15020
|
const { socket } = useSocketContext();
|
|
15015
15021
|
const sendMessage = useCallback27(
|
|
15016
15022
|
async (content, opts) => {
|
|
@@ -15554,15 +15560,15 @@ __name(usePushNotifications, "usePushNotifications");
|
|
|
15554
15560
|
var usePushNotifications_default = usePushNotifications;
|
|
15555
15561
|
|
|
15556
15562
|
// src/hooks/useSocket.ts
|
|
15557
|
-
import { useEffect as useEffect39, useRef as useRef27, useState as
|
|
15563
|
+
import { useEffect as useEffect39, useRef as useRef27, useState as useState49 } from "react";
|
|
15558
15564
|
import io from "socket.io-client";
|
|
15559
15565
|
function useSocket({ token, paused = false }) {
|
|
15560
15566
|
const _errorCount = useRef27(0);
|
|
15561
15567
|
const shouldConnect = useRef27(true);
|
|
15562
|
-
const [socket, setSocket] =
|
|
15563
|
-
const [isConnected, setIsConnected] =
|
|
15564
|
-
const [messages, setMessages] =
|
|
15565
|
-
const [socketNotifications, setSocketNotifications] =
|
|
15568
|
+
const [socket, setSocket] = useState49(null);
|
|
15569
|
+
const [isConnected, setIsConnected] = useState49(false);
|
|
15570
|
+
const [messages, setMessages] = useState49([]);
|
|
15571
|
+
const [socketNotifications, setSocketNotifications] = useState49([]);
|
|
15566
15572
|
const socketRef = useRef27(null);
|
|
15567
15573
|
useEffect39(() => {
|
|
15568
15574
|
if (!token) return;
|
|
@@ -15719,7 +15725,7 @@ function useSocket({ token, paused = false }) {
|
|
|
15719
15725
|
__name(useSocket, "useSocket");
|
|
15720
15726
|
|
|
15721
15727
|
// src/components/navigations/Breadcrumb.tsx
|
|
15722
|
-
import { Fragment as
|
|
15728
|
+
import { Fragment as Fragment25, jsx as jsx161, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
15723
15729
|
var ITEMS_TO_DISPLAY = 4;
|
|
15724
15730
|
function BreadcrumbDesktop({
|
|
15725
15731
|
items,
|
|
@@ -15728,26 +15734,26 @@ function BreadcrumbDesktop({
|
|
|
15728
15734
|
showRoot
|
|
15729
15735
|
}) {
|
|
15730
15736
|
const t = useTranslations57();
|
|
15731
|
-
const [open, setOpen] =
|
|
15737
|
+
const [open, setOpen] = useState50(false);
|
|
15732
15738
|
return /* @__PURE__ */ jsx161(Breadcrumb, { children: /* @__PURE__ */ jsxs87(BreadcrumbList, { children: [
|
|
15733
|
-
showRoot && /* @__PURE__ */ jsxs87(
|
|
15739
|
+
showRoot && /* @__PURE__ */ jsxs87(Fragment25, { children: [
|
|
15734
15740
|
/* @__PURE__ */ jsx161(BreadcrumbItem, { children: /* @__PURE__ */ jsx161(Link, { href: generateUrl({ page: `/` }), children: rootLabel }) }),
|
|
15735
15741
|
items.length > 0 && /* @__PURE__ */ jsx161(BreadcrumbSeparator, {})
|
|
15736
15742
|
] }),
|
|
15737
|
-
items.length > ITEMS_TO_DISPLAY ? /* @__PURE__ */ jsxs87(
|
|
15738
|
-
/* @__PURE__ */ jsx161(BreadcrumbItem, { children: items[0].href ? /* @__PURE__ */ jsx161(Link, { href: items[0].href, onClick: items[0].onClick, children: items[0].name }) : /* @__PURE__ */ jsx161(
|
|
15743
|
+
items.length > ITEMS_TO_DISPLAY ? /* @__PURE__ */ jsxs87(Fragment25, { children: [
|
|
15744
|
+
/* @__PURE__ */ jsx161(BreadcrumbItem, { children: items[0].href ? /* @__PURE__ */ jsx161(Link, { href: items[0].href, onClick: items[0].onClick, children: items[0].name }) : /* @__PURE__ */ jsx161(Fragment25, { children: items[0].name }) }),
|
|
15739
15745
|
/* @__PURE__ */ jsx161(BreadcrumbSeparator, {}),
|
|
15740
15746
|
/* @__PURE__ */ jsx161(BreadcrumbItem, { children: /* @__PURE__ */ jsxs87(DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
15741
15747
|
/* @__PURE__ */ jsx161(DropdownMenuTrigger, { className: "flex items-center gap-1", "aria-label": t("ui.labels.toggle_menu"), children: /* @__PURE__ */ jsx161(BreadcrumbEllipsis, { className: "h-4 w-4", label: t("ui.labels.more") }) }),
|
|
15742
15748
|
/* @__PURE__ */ jsx161(DropdownMenuContent, { align: "start", children: items.slice(1, -ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsx161(DropdownMenuItem, { children: /* @__PURE__ */ jsx161(Link, { href: item.href ? item.href : "#", onClick: item.onClick, children: item.name }) }, index)) })
|
|
15743
15749
|
] }) }),
|
|
15744
15750
|
/* @__PURE__ */ jsx161(BreadcrumbSeparator, {}),
|
|
15745
|
-
items.slice(-ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsxs87(
|
|
15746
|
-
/* @__PURE__ */ jsx161(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx161(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx161(
|
|
15751
|
+
items.slice(-ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsxs87(Fragment24, { children: [
|
|
15752
|
+
/* @__PURE__ */ jsx161(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx161(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx161(Fragment25, { children: item.name }) }),
|
|
15747
15753
|
index < items.slice(-ITEMS_TO_DISPLAY + 2).length - 1 && /* @__PURE__ */ jsx161(BreadcrumbSeparator, {})
|
|
15748
15754
|
] }, index))
|
|
15749
|
-
] }) : /* @__PURE__ */ jsx161(
|
|
15750
|
-
/* @__PURE__ */ jsx161(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx161(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx161(
|
|
15755
|
+
] }) : /* @__PURE__ */ jsx161(Fragment25, { children: items.map((item, index) => /* @__PURE__ */ jsxs87(Fragment24, { children: [
|
|
15756
|
+
/* @__PURE__ */ jsx161(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx161(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx161(Fragment25, { children: item.name }) }),
|
|
15751
15757
|
index < items.length - 1 && /* @__PURE__ */ jsx161(BreadcrumbSeparator, {})
|
|
15752
15758
|
] }, index)) })
|
|
15753
15759
|
] }) });
|
|
@@ -15759,7 +15765,7 @@ function BreadcrumbMobile({
|
|
|
15759
15765
|
rootLabel,
|
|
15760
15766
|
showRoot
|
|
15761
15767
|
}) {
|
|
15762
|
-
const [open, setOpen] =
|
|
15768
|
+
const [open, setOpen] = useState50(false);
|
|
15763
15769
|
const lastItem = items[items.length - 1];
|
|
15764
15770
|
const allItems = showRoot ? [{ name: rootLabel, href: generateUrl({ page: `/` }) }, ...items] : items;
|
|
15765
15771
|
if (!lastItem && items.length === 0) {
|
|
@@ -15817,7 +15823,7 @@ function BreadcrumbNavigation({ items, rootLabel, showRoot = true }) {
|
|
|
15817
15823
|
__name(BreadcrumbNavigation, "BreadcrumbNavigation");
|
|
15818
15824
|
|
|
15819
15825
|
// src/components/navigations/ContentTitle.tsx
|
|
15820
|
-
import { useEffect as useEffect40, useState as
|
|
15826
|
+
import { useEffect as useEffect40, useState as useState51 } from "react";
|
|
15821
15827
|
import { jsx as jsx162, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
15822
15828
|
function ContentTitle({
|
|
15823
15829
|
module,
|
|
@@ -15829,8 +15835,8 @@ function ContentTitle({
|
|
|
15829
15835
|
headingLevel
|
|
15830
15836
|
}) {
|
|
15831
15837
|
const ElementTag = headingLevel === 1 ? "h1" : headingLevel === 2 ? "h2" : "div";
|
|
15832
|
-
const [clientFunctions, setClientFunctions] =
|
|
15833
|
-
const [isClient, setIsClient] =
|
|
15838
|
+
const [clientFunctions, setClientFunctions] = useState51(null);
|
|
15839
|
+
const [isClient, setIsClient] = useState51(false);
|
|
15834
15840
|
useEffect40(() => {
|
|
15835
15841
|
setIsClient(true);
|
|
15836
15842
|
setClientFunctions(functions);
|
|
@@ -15911,7 +15917,7 @@ __name(Header, "Header");
|
|
|
15911
15917
|
// src/components/navigations/MobileNavigationBar.tsx
|
|
15912
15918
|
import { useTranslations as useTranslations59 } from "next-intl";
|
|
15913
15919
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
15914
|
-
import { Fragment as
|
|
15920
|
+
import { Fragment as Fragment26, jsx as jsx164, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
15915
15921
|
function isActiveHref(pathname, href) {
|
|
15916
15922
|
if (href === "/") return pathname === "/";
|
|
15917
15923
|
return pathname === href || pathname.startsWith(`${href}/`);
|
|
@@ -15923,7 +15929,7 @@ var slotClass = cn(
|
|
|
15923
15929
|
"transition-colors"
|
|
15924
15930
|
);
|
|
15925
15931
|
function SlotContent({ item }) {
|
|
15926
|
-
if (item.render) return /* @__PURE__ */ jsx164(
|
|
15932
|
+
if (item.render) return /* @__PURE__ */ jsx164(Fragment26, { children: item.render });
|
|
15927
15933
|
const Icon = item.icon;
|
|
15928
15934
|
return Icon ? /* @__PURE__ */ jsx164(Icon, { className: "size-6" }) : null;
|
|
15929
15935
|
}
|
|
@@ -15944,7 +15950,7 @@ function MobileNavigationBar({ className } = {}) {
|
|
|
15944
15950
|
children: items.map((item) => {
|
|
15945
15951
|
const active = item.href ? isActiveHref(pathname, item.href) : false;
|
|
15946
15952
|
const tone = active ? "text-primary" : "text-muted-foreground";
|
|
15947
|
-
const body = /* @__PURE__ */ jsxs90(
|
|
15953
|
+
const body = /* @__PURE__ */ jsxs90(Fragment26, { children: [
|
|
15948
15954
|
active && /* @__PURE__ */ jsx164("span", { "aria-hidden": true, className: "bg-primary absolute inset-x-0 top-0 h-0.5" }),
|
|
15949
15955
|
/* @__PURE__ */ jsx164(SlotContent, { item })
|
|
15950
15956
|
] });
|
|
@@ -15995,12 +16001,12 @@ __name(ModeToggleSwitch, "ModeToggleSwitch");
|
|
|
15995
16001
|
|
|
15996
16002
|
// src/components/navigations/PageSection.tsx
|
|
15997
16003
|
import { ChevronDownIcon as ChevronDownIcon9, ChevronRightIcon as ChevronRightIcon6 } from "lucide-react";
|
|
15998
|
-
import { useEffect as useEffect41, useState as
|
|
16004
|
+
import { useEffect as useEffect41, useState as useState52 } from "react";
|
|
15999
16005
|
import { v4 as v44 } from "uuid";
|
|
16000
16006
|
import { jsx as jsx166, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
16001
16007
|
function PageSection({ children, title, options, open, small, onToggle }) {
|
|
16002
|
-
const [isOpen, setIsOpen] =
|
|
16003
|
-
const [shouldRender, setShouldRender] =
|
|
16008
|
+
const [isOpen, setIsOpen] = useState52(open ?? true);
|
|
16009
|
+
const [shouldRender, setShouldRender] = useState52(open ?? true);
|
|
16004
16010
|
useEffect41(() => {
|
|
16005
16011
|
if (onToggle) {
|
|
16006
16012
|
onToggle(isOpen);
|
|
@@ -16046,14 +16052,14 @@ import { useAtomValue } from "jotai";
|
|
|
16046
16052
|
import { HistoryIcon } from "lucide-react";
|
|
16047
16053
|
import { useTranslations as useTranslations60 } from "next-intl";
|
|
16048
16054
|
import { usePathname as usePathname3 } from "next/navigation";
|
|
16049
|
-
import { useEffect as useEffect42, useState as
|
|
16055
|
+
import { useEffect as useEffect42, useState as useState53 } from "react";
|
|
16050
16056
|
import { jsx as jsx167, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
16051
16057
|
function RecentPagesNavigator() {
|
|
16052
16058
|
const recentPages = useAtomValue(recentPagesAtom);
|
|
16053
16059
|
const t = useTranslations60();
|
|
16054
16060
|
const { isMobile } = useSidebar();
|
|
16055
16061
|
const pathname = usePathname3();
|
|
16056
|
-
const [mounted, setMounted] =
|
|
16062
|
+
const [mounted, setMounted] = useState53(false);
|
|
16057
16063
|
useEffect42(() => {
|
|
16058
16064
|
setMounted(true);
|
|
16059
16065
|
}, []);
|
|
@@ -16139,13 +16145,13 @@ __name(partitionTabs, "partitionTabs");
|
|
|
16139
16145
|
|
|
16140
16146
|
// src/components/containers/MermaidDiagram.tsx
|
|
16141
16147
|
import { useTheme as useTheme3 } from "next-themes";
|
|
16142
|
-
import { useEffect as useEffect43, useId as useId4, useState as
|
|
16148
|
+
import { useEffect as useEffect43, useId as useId4, useState as useState54 } from "react";
|
|
16143
16149
|
import { jsx as jsx169 } from "react/jsx-runtime";
|
|
16144
16150
|
function MermaidDiagram({ chart }) {
|
|
16145
16151
|
const reactId = useId4();
|
|
16146
16152
|
const { resolvedTheme } = useTheme3();
|
|
16147
|
-
const [svg, setSvg] =
|
|
16148
|
-
const [failed, setFailed] =
|
|
16153
|
+
const [svg, setSvg] = useState54(void 0);
|
|
16154
|
+
const [failed, setFailed] = useState54(false);
|
|
16149
16155
|
useEffect43(() => {
|
|
16150
16156
|
let cancelled = false;
|
|
16151
16157
|
const draw = /* @__PURE__ */ __name(async () => {
|
|
@@ -16208,7 +16214,7 @@ __name(MermaidDiagram, "MermaidDiagram");
|
|
|
16208
16214
|
// src/components/containers/ReactMarkdownContainer.tsx
|
|
16209
16215
|
import { ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
|
|
16210
16216
|
import { useTranslations as useTranslations61 } from "next-intl";
|
|
16211
|
-
import { useEffect as useEffect44, useRef as useRef28, useState as
|
|
16217
|
+
import { useEffect as useEffect44, useRef as useRef28, useState as useState55 } from "react";
|
|
16212
16218
|
import ReactMarkdown from "react-markdown";
|
|
16213
16219
|
import rehypeSlug from "rehype-slug";
|
|
16214
16220
|
import remarkGfm from "remark-gfm";
|
|
@@ -16231,8 +16237,8 @@ function ReactMarkdownContainer({
|
|
|
16231
16237
|
size = "normal"
|
|
16232
16238
|
}) {
|
|
16233
16239
|
const t = useTranslations61("ui.buttons");
|
|
16234
|
-
const [isExpanded, setIsExpanded] =
|
|
16235
|
-
const [showExpandButton, setShowExpandButton] =
|
|
16240
|
+
const [isExpanded, setIsExpanded] = useState55(false);
|
|
16241
|
+
const [showExpandButton, setShowExpandButton] = useState55(false);
|
|
16236
16242
|
const contentRef = useRef28(null);
|
|
16237
16243
|
useEffect44(() => {
|
|
16238
16244
|
if (collapsible && contentRef.current && !isExpanded) {
|
|
@@ -16373,7 +16379,7 @@ __name(detailsFitsByDefault, "detailsFitsByDefault");
|
|
|
16373
16379
|
// src/components/containers/RoundPageContainerTitle.tsx
|
|
16374
16380
|
import { InfoIcon as InfoIcon2 } from "lucide-react";
|
|
16375
16381
|
import { useTranslations as useTranslations62 } from "next-intl";
|
|
16376
|
-
import { Fragment as
|
|
16382
|
+
import { Fragment as Fragment27, jsx as jsx171, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
16377
16383
|
var HEADER_ROW_MIN_H = "min-h-[53px]";
|
|
16378
16384
|
function RoundPageContainerTitle({
|
|
16379
16385
|
module,
|
|
@@ -16433,7 +16439,7 @@ function RoundPageContainerTitle({
|
|
|
16433
16439
|
module && module.icon ? /* @__PURE__ */ jsx171(module.icon, { className: "text-primary h-5 w-5 shrink-0" }) : title.icon,
|
|
16434
16440
|
/* @__PURE__ */ jsxs95("span", { className: "truncate", children: [
|
|
16435
16441
|
title.type,
|
|
16436
|
-
title.element && /* @__PURE__ */ jsxs95(
|
|
16442
|
+
title.element && /* @__PURE__ */ jsxs95(Fragment27, { children: [
|
|
16437
16443
|
/* @__PURE__ */ jsx171("span", { "aria-hidden": true, children: " \xB7 " }),
|
|
16438
16444
|
/* @__PURE__ */ jsx171("span", { className: "text-primary font-semibold", children: title.element })
|
|
16439
16445
|
] })
|
|
@@ -16473,8 +16479,8 @@ __name(RoundPageContainerTitle, "RoundPageContainerTitle");
|
|
|
16473
16479
|
// src/components/containers/RoundPageContainer.tsx
|
|
16474
16480
|
import { useTranslations as useTranslations63 } from "next-intl";
|
|
16475
16481
|
import { useSearchParams } from "next/navigation";
|
|
16476
|
-
import { Fragment as
|
|
16477
|
-
import { Fragment as
|
|
16482
|
+
import { Fragment as Fragment28, useCallback as useCallback28, useEffect as useEffect45, useMemo as useMemo23, useRef as useRef29, useState as useState56 } from "react";
|
|
16483
|
+
import { Fragment as Fragment29, jsx as jsx172, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
16478
16484
|
var DETAILS_COOKIE_NAME = "round_page_details_state";
|
|
16479
16485
|
var DETAILS_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
16480
16486
|
var railTriggerClass = cn(
|
|
@@ -16515,12 +16521,12 @@ function RoundPageContainer({
|
|
|
16515
16521
|
const headerLeftContent = useHeaderLeftContent();
|
|
16516
16522
|
const headerLogo = useHeaderLogo();
|
|
16517
16523
|
const headerMobileChildren = useHeaderMobileChildren();
|
|
16518
|
-
const [showDetails, setShowDetailsState] =
|
|
16519
|
-
const [showDetailsMobile, setShowDetailsMobile] =
|
|
16524
|
+
const [showDetails, setShowDetailsState] = useState56(defaultDetailsOpen);
|
|
16525
|
+
const [showDetailsMobile, setShowDetailsMobile] = useState56(false);
|
|
16520
16526
|
const isMobile = useIsMobile();
|
|
16521
16527
|
const hasMobileNavigation = useMobileNavigationItems().length > 0;
|
|
16522
16528
|
const hasSidebar = useOptionalSidebar() !== null;
|
|
16523
|
-
const [mounted, setMounted] =
|
|
16529
|
+
const [mounted, setMounted] = useState56(false);
|
|
16524
16530
|
const cardRef = useRef29(null);
|
|
16525
16531
|
useEffect45(() => {
|
|
16526
16532
|
if (!mounted) return;
|
|
@@ -16560,7 +16566,7 @@ function RoundPageContainer({
|
|
|
16560
16566
|
const section = searchParams.get("section");
|
|
16561
16567
|
const rewriteUrl = useUrlRewriter();
|
|
16562
16568
|
const initialValue = tabs ? (section && tabs.find((i) => tabValue(i) === section) ? section : null) || tabValue(tabs[0]) : void 0;
|
|
16563
|
-
const [activeTab, setActiveTab] =
|
|
16569
|
+
const [activeTab, setActiveTab] = useState56(initialValue);
|
|
16564
16570
|
const previousSection = useRef29(section);
|
|
16565
16571
|
useEffect45(() => {
|
|
16566
16572
|
if (tabs && section) {
|
|
@@ -16600,7 +16606,7 @@ function RoundPageContainer({
|
|
|
16600
16606
|
const innerScrollY = mobileFlow ? `` : scrollY;
|
|
16601
16607
|
const showMobileSectionPicker = (tabs?.length ?? 0) > 1;
|
|
16602
16608
|
if (!isReady) {
|
|
16603
|
-
return /* @__PURE__ */ jsxs96(
|
|
16609
|
+
return /* @__PURE__ */ jsxs96(Fragment29, { children: [
|
|
16604
16610
|
/* @__PURE__ */ jsx172(
|
|
16605
16611
|
Header,
|
|
16606
16612
|
{
|
|
@@ -16638,7 +16644,7 @@ function RoundPageContainer({
|
|
|
16638
16644
|
)
|
|
16639
16645
|
] });
|
|
16640
16646
|
}
|
|
16641
|
-
return /* @__PURE__ */ jsxs96(
|
|
16647
|
+
return /* @__PURE__ */ jsxs96(Fragment29, { children: [
|
|
16642
16648
|
/* @__PURE__ */ jsx172(
|
|
16643
16649
|
Header,
|
|
16644
16650
|
{
|
|
@@ -16712,7 +16718,7 @@ function RoundPageContainer({
|
|
|
16712
16718
|
railHeader && /* @__PURE__ */ jsx172("div", { children: railHeader }),
|
|
16713
16719
|
/* @__PURE__ */ jsxs96(TabsList, { className: "flex h-auto w-full flex-col items-stretch gap-0.5 bg-transparent p-0", children: [
|
|
16714
16720
|
ungrouped.map((tab) => /* @__PURE__ */ jsx172(TabsTrigger, { value: tabValue(tab), className: railTriggerClass, children: tab.contentLabel ?? tab.label }, tabValue(tab))),
|
|
16715
|
-
groups.map((group) => /* @__PURE__ */ jsxs96(
|
|
16721
|
+
groups.map((group) => /* @__PURE__ */ jsxs96(Fragment28, { children: [
|
|
16716
16722
|
/* @__PURE__ */ jsx172(MicroLabel, { as: "span", role: "presentation", className: "block px-3 pt-3 pb-1", children: group.label }),
|
|
16717
16723
|
group.items.map((tab) => /* @__PURE__ */ jsx172(TabsTrigger, { value: tabValue(tab), className: railTriggerClass, children: tab.contentLabel ?? tab.label }, tabValue(tab)))
|
|
16718
16724
|
] }, group.label))
|
|
@@ -16803,7 +16809,7 @@ function RoundPageContainer({
|
|
|
16803
16809
|
),
|
|
16804
16810
|
children: [
|
|
16805
16811
|
header,
|
|
16806
|
-
tabs ? /* @__PURE__ */ jsxs96(
|
|
16812
|
+
tabs ? /* @__PURE__ */ jsxs96(Fragment29, { children: [
|
|
16807
16813
|
/* @__PURE__ */ jsxs96(
|
|
16808
16814
|
Tabs,
|
|
16809
16815
|
{
|
|
@@ -16928,7 +16934,7 @@ function RoundPageContainer({
|
|
|
16928
16934
|
__name(RoundPageContainer, "RoundPageContainer");
|
|
16929
16935
|
|
|
16930
16936
|
// src/components/containers/TabsContainer.tsx
|
|
16931
|
-
import { Fragment as
|
|
16937
|
+
import { Fragment as Fragment30, jsx as jsx173, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
16932
16938
|
function TabsContainer({
|
|
16933
16939
|
tabs,
|
|
16934
16940
|
defaultTab,
|
|
@@ -16973,7 +16979,7 @@ function TabsContainer({
|
|
|
16973
16979
|
),
|
|
16974
16980
|
additionalComponent && additionalComponent
|
|
16975
16981
|
] }),
|
|
16976
|
-
scrollAreaClassName ? /* @__PURE__ */ jsx173(ScrollArea, { className: scrollAreaClassName, children: validTabs.map((tab) => /* @__PURE__ */ jsx173(TabsContent, { value: tab.label, children: tab.content }, tab.label)) }) : /* @__PURE__ */ jsx173(
|
|
16982
|
+
scrollAreaClassName ? /* @__PURE__ */ jsx173(ScrollArea, { className: scrollAreaClassName, children: validTabs.map((tab) => /* @__PURE__ */ jsx173(TabsContent, { value: tab.label, children: tab.content }, tab.label)) }) : /* @__PURE__ */ jsx173(Fragment30, { children: validTabs.map((tab) => /* @__PURE__ */ jsx173(TabsContent, { value: tab.label, children: tab.content }, tab.label)) })
|
|
16977
16983
|
] });
|
|
16978
16984
|
}
|
|
16979
16985
|
__name(TabsContainer, "TabsContainer");
|
|
@@ -16991,14 +16997,14 @@ function AllowedUsersDetails({ showTitle, content }) {
|
|
|
16991
16997
|
__name(AllowedUsersDetails, "AllowedUsersDetails");
|
|
16992
16998
|
|
|
16993
16999
|
// src/components/editors/BlockNoteEditorMentionHoverCard.tsx
|
|
16994
|
-
import { useCallback as useCallback29, useEffect as useEffect46, useRef as useRef30, useState as
|
|
17000
|
+
import { useCallback as useCallback29, useEffect as useEffect46, useRef as useRef30, useState as useState57 } from "react";
|
|
16995
17001
|
import { createPortal as createPortal3 } from "react-dom";
|
|
16996
17002
|
import { jsx as jsx175 } from "react/jsx-runtime";
|
|
16997
17003
|
function BlockNoteEditorMentionHoverCard({
|
|
16998
17004
|
containerRef,
|
|
16999
17005
|
mentionResolveFn
|
|
17000
17006
|
}) {
|
|
17001
|
-
const [hovered, setHovered] =
|
|
17007
|
+
const [hovered, setHovered] = useState57(null);
|
|
17002
17008
|
const closeTimeoutRef = useRef30(null);
|
|
17003
17009
|
const scheduleClose = useCallback29(() => {
|
|
17004
17010
|
closeTimeoutRef.current = setTimeout(() => setHovered(null), 200);
|
|
@@ -17317,14 +17323,14 @@ var BlockNoteViewerContainer = React29.memo(/* @__PURE__ */ __name(function View
|
|
|
17317
17323
|
|
|
17318
17324
|
// src/components/viewers/BlockNoteStaticViewer.tsx
|
|
17319
17325
|
import { useTheme as useTheme4 } from "next-themes";
|
|
17320
|
-
import { useEffect as useEffect47, useState as
|
|
17326
|
+
import { useEffect as useEffect47, useState as useState58 } from "react";
|
|
17321
17327
|
import { jsx as jsx179 } from "react/jsx-runtime";
|
|
17322
17328
|
function BlockNoteStaticViewer({
|
|
17323
17329
|
html,
|
|
17324
17330
|
size,
|
|
17325
17331
|
className
|
|
17326
17332
|
}) {
|
|
17327
|
-
const [mounted, setMounted] =
|
|
17333
|
+
const [mounted, setMounted] = useState58(false);
|
|
17328
17334
|
const { resolvedTheme } = useTheme4();
|
|
17329
17335
|
useEffect47(() => {
|
|
17330
17336
|
setMounted(true);
|
|
@@ -17349,11 +17355,11 @@ function BlockNoteStaticViewer({
|
|
|
17349
17355
|
__name(BlockNoteStaticViewer, "BlockNoteStaticViewer");
|
|
17350
17356
|
|
|
17351
17357
|
// src/components/pages/PageContainerContentDetails.tsx
|
|
17352
|
-
import { useEffect as useEffect48, useRef as useRef31, useState as
|
|
17358
|
+
import { useEffect as useEffect48, useRef as useRef31, useState as useState59 } from "react";
|
|
17353
17359
|
import { jsx as jsx180, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
17354
17360
|
function PageContainerContentDetails({ items, section, module, id }) {
|
|
17355
17361
|
const rewriteUrl = useUrlRewriter();
|
|
17356
|
-
const [isScrolled, setIsScrolled] =
|
|
17362
|
+
const [isScrolled, setIsScrolled] = useState59(false);
|
|
17357
17363
|
const sentinelRef = useRef31(null);
|
|
17358
17364
|
useEffect48(() => {
|
|
17359
17365
|
const sentinel = sentinelRef.current;
|
|
@@ -17388,11 +17394,11 @@ function PageContainerContentDetails({ items, section, module, id }) {
|
|
|
17388
17394
|
__name(PageContainerContentDetails, "PageContainerContentDetails");
|
|
17389
17395
|
|
|
17390
17396
|
// src/components/pages/PageContentContainer.tsx
|
|
17391
|
-
import { useEffect as useEffect49, useState as
|
|
17397
|
+
import { useEffect as useEffect49, useState as useState60 } from "react";
|
|
17392
17398
|
import { useDefaultLayout } from "react-resizable-panels";
|
|
17393
17399
|
import { jsx as jsx181, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
17394
17400
|
function PageContentContainer({ header, details, footer, content, fullBleed }) {
|
|
17395
|
-
const [mounted, setMounted] =
|
|
17401
|
+
const [mounted, setMounted] = useState60(false);
|
|
17396
17402
|
const isMobile = useIsMobile();
|
|
17397
17403
|
useEffect49(() => {
|
|
17398
17404
|
setMounted(true);
|
|
@@ -17580,12 +17586,12 @@ function JsonApiProvider({ config, children }) {
|
|
|
17580
17586
|
__name(JsonApiProvider, "JsonApiProvider");
|
|
17581
17587
|
|
|
17582
17588
|
// src/client/hooks/useJsonApiGet.ts
|
|
17583
|
-
import { useState as
|
|
17589
|
+
import { useState as useState61, useEffect as useEffect51, useCallback as useCallback31, useRef as useRef32 } from "react";
|
|
17584
17590
|
function useJsonApiGet(params) {
|
|
17585
|
-
const [data, setData] =
|
|
17586
|
-
const [loading, setLoading] =
|
|
17587
|
-
const [error, setError] =
|
|
17588
|
-
const [response, setResponse] =
|
|
17591
|
+
const [data, setData] = useState61(null);
|
|
17592
|
+
const [loading, setLoading] = useState61(false);
|
|
17593
|
+
const [error, setError] = useState61(null);
|
|
17594
|
+
const [response, setResponse] = useState61(null);
|
|
17589
17595
|
const isMounted = useRef32(true);
|
|
17590
17596
|
const fetchData = useCallback31(async () => {
|
|
17591
17597
|
if (params.options?.enabled === false) return;
|
|
@@ -17680,12 +17686,12 @@ function useJsonApiGet(params) {
|
|
|
17680
17686
|
__name(useJsonApiGet, "useJsonApiGet");
|
|
17681
17687
|
|
|
17682
17688
|
// src/client/hooks/useJsonApiMutation.ts
|
|
17683
|
-
import { useState as
|
|
17689
|
+
import { useState as useState62, useCallback as useCallback32 } from "react";
|
|
17684
17690
|
function useJsonApiMutation(config) {
|
|
17685
|
-
const [data, setData] =
|
|
17686
|
-
const [loading, setLoading] =
|
|
17687
|
-
const [error, setError] =
|
|
17688
|
-
const [response, setResponse] =
|
|
17691
|
+
const [data, setData] = useState62(null);
|
|
17692
|
+
const [loading, setLoading] = useState62(false);
|
|
17693
|
+
const [error, setError] = useState62(null);
|
|
17694
|
+
const [response, setResponse] = useState62(null);
|
|
17689
17695
|
const reset = useCallback32(() => {
|
|
17690
17696
|
setData(null);
|
|
17691
17697
|
setLoading(false);
|
|
@@ -17932,7 +17938,7 @@ __name(useSubscriptionStatus, "useSubscriptionStatus");
|
|
|
17932
17938
|
// src/features/role/hooks/useRoleTableStructure.tsx
|
|
17933
17939
|
import { useTranslations as useTranslations67 } from "next-intl";
|
|
17934
17940
|
import { useMemo as useMemo29 } from "react";
|
|
17935
|
-
import { Fragment as
|
|
17941
|
+
import { Fragment as Fragment31, jsx as jsx189 } from "react/jsx-runtime";
|
|
17936
17942
|
var useRoleTableStructure = /* @__PURE__ */ __name((params) => {
|
|
17937
17943
|
const t = useTranslations67();
|
|
17938
17944
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -17969,7 +17975,7 @@ var useRoleTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
17969
17975
|
id: "description",
|
|
17970
17976
|
accessorKey: "description",
|
|
17971
17977
|
header: t(`role.fields.description.label`),
|
|
17972
|
-
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx189(
|
|
17978
|
+
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx189(Fragment31, { children: row.getValue("description") }), "cell"),
|
|
17973
17979
|
enableSorting: false,
|
|
17974
17980
|
enableHiding: false
|
|
17975
17981
|
}),
|
|
@@ -18312,21 +18318,21 @@ registerTableGenerator("stripe-coupons", useStripeCouponTableStructure);
|
|
|
18312
18318
|
|
|
18313
18319
|
// src/features/billing/stripe-coupon/hooks/useStripeCouponCodeTableStructure.tsx
|
|
18314
18320
|
import { useTranslations as useTranslations77 } from "next-intl";
|
|
18315
|
-
import { useMemo as useMemo36, useState as
|
|
18321
|
+
import { useMemo as useMemo36, useState as useState68 } from "react";
|
|
18316
18322
|
|
|
18317
18323
|
// src/features/billing/contexts/CouponContext.tsx
|
|
18318
18324
|
import { useTranslations as useTranslations75 } from "next-intl";
|
|
18319
|
-
import { createContext as createContext28, useCallback as useCallback34, useContext as useContext28, useMemo as useMemo35, useState as
|
|
18325
|
+
import { createContext as createContext28, useCallback as useCallback34, useContext as useContext28, useMemo as useMemo35, useState as useState66 } from "react";
|
|
18320
18326
|
|
|
18321
18327
|
// src/features/billing/stripe-coupon/components/forms/CouponRefresher.tsx
|
|
18322
18328
|
import { RefreshCwIcon as RefreshCwIcon4 } from "lucide-react";
|
|
18323
18329
|
import { useTranslations as useTranslations72 } from "next-intl";
|
|
18324
|
-
import { useState as
|
|
18330
|
+
import { useState as useState63 } from "react";
|
|
18325
18331
|
import { jsx as jsx193, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
18326
18332
|
function CouponRefresher({ coupon }) {
|
|
18327
18333
|
const t = useTranslations72();
|
|
18328
18334
|
const { refreshCounts } = useCouponContext();
|
|
18329
|
-
const [pending, setPending] =
|
|
18335
|
+
const [pending, setPending] = useState63(false);
|
|
18330
18336
|
return /* @__PURE__ */ jsxs103(
|
|
18331
18337
|
Button,
|
|
18332
18338
|
{
|
|
@@ -18355,7 +18361,7 @@ __name(CouponRefresher, "CouponRefresher");
|
|
|
18355
18361
|
// src/features/billing/stripe-coupon/components/forms/CouponEditor.tsx
|
|
18356
18362
|
import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
|
|
18357
18363
|
import { useTranslations as useTranslations74 } from "next-intl";
|
|
18358
|
-
import { useCallback as useCallback33, useMemo as useMemo34, useState as
|
|
18364
|
+
import { useCallback as useCallback33, useMemo as useMemo34, useState as useState65 } from "react";
|
|
18359
18365
|
import { useForm as useForm5 } from "react-hook-form";
|
|
18360
18366
|
import { v4 as v45 } from "uuid";
|
|
18361
18367
|
import { z as z5 } from "zod";
|
|
@@ -18368,7 +18374,7 @@ __name(couponPageModule, "couponPageModule");
|
|
|
18368
18374
|
|
|
18369
18375
|
// src/features/billing/stripe-coupon/components/forms/CouponCodeFields.tsx
|
|
18370
18376
|
import { useTranslations as useTranslations73 } from "next-intl";
|
|
18371
|
-
import { useState as
|
|
18377
|
+
import { useState as useState64 } from "react";
|
|
18372
18378
|
import { z as z4 } from "zod";
|
|
18373
18379
|
import { jsx as jsx194, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
18374
18380
|
var rawNumber = /* @__PURE__ */ __name(() => z4.union([z4.string(), z4.number()]).nullish(), "rawNumber");
|
|
@@ -18452,7 +18458,7 @@ var couponCurrencyOptions = [
|
|
|
18452
18458
|
];
|
|
18453
18459
|
function CouponCodeFields({ form, prefix = "" }) {
|
|
18454
18460
|
const t = useTranslations73();
|
|
18455
|
-
const [now] =
|
|
18461
|
+
const [now] = useState64(() => /* @__PURE__ */ new Date());
|
|
18456
18462
|
return /* @__PURE__ */ jsxs104("div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
18457
18463
|
/* @__PURE__ */ jsx194(
|
|
18458
18464
|
FormInput,
|
|
@@ -18714,7 +18720,7 @@ function CouponCreateEditor({
|
|
|
18714
18720
|
const t = useTranslations74();
|
|
18715
18721
|
const router = useI18nRouter();
|
|
18716
18722
|
const { createCoupon } = useCouponContext();
|
|
18717
|
-
const [now] =
|
|
18723
|
+
const [now] = useState65(() => /* @__PURE__ */ new Date());
|
|
18718
18724
|
const formSchema = useMemo34(() => couponCreateSchema(t), [t]);
|
|
18719
18725
|
const getDefaultValues = useCallback33(
|
|
18720
18726
|
() => ({
|
|
@@ -18925,10 +18931,10 @@ var CouponProvider = /* @__PURE__ */ __name(({ children, dehydratedCoupon, publi
|
|
|
18925
18931
|
const t = useTranslations75();
|
|
18926
18932
|
const generateUrl = usePageUrlGenerator();
|
|
18927
18933
|
const { hasRole } = useCurrentUserContext();
|
|
18928
|
-
const [coupon, setCoupon] =
|
|
18934
|
+
const [coupon, setCoupon] = useState66(
|
|
18929
18935
|
dehydratedCoupon ? rehydrate(Modules.StripeCoupon, dehydratedCoupon) : void 0
|
|
18930
18936
|
);
|
|
18931
|
-
const [catalogueVersion, setCatalogueVersion] =
|
|
18937
|
+
const [catalogueVersion, setCatalogueVersion] = useState66(0);
|
|
18932
18938
|
const refreshCatalogue = useCallback34(() => setCatalogueVersion((value2) => value2 + 1), []);
|
|
18933
18939
|
const reloadCoupon = useCallback34(async () => {
|
|
18934
18940
|
if (!coupon?.id) return;
|
|
@@ -19036,13 +19042,13 @@ var useCouponContext = /* @__PURE__ */ __name(() => useContext28(CouponContext)
|
|
|
19036
19042
|
// src/features/billing/stripe-coupon/components/widgets/CouponCodeActions.tsx
|
|
19037
19043
|
import { PowerIcon, RotateCcwIcon } from "lucide-react";
|
|
19038
19044
|
import { useTranslations as useTranslations76 } from "next-intl";
|
|
19039
|
-
import { useState as
|
|
19045
|
+
import { useState as useState67 } from "react";
|
|
19040
19046
|
import { jsx as jsx197, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
19041
19047
|
function CouponCodeActions({ code, status }) {
|
|
19042
19048
|
const t = useTranslations76();
|
|
19043
19049
|
const { updateCodeFlags } = useCouponContext();
|
|
19044
|
-
const [open, setOpen] =
|
|
19045
|
-
const [pending, setPending] =
|
|
19050
|
+
const [open, setOpen] = useState67(false);
|
|
19051
|
+
const [pending, setPending] = useState67(false);
|
|
19046
19052
|
const isDead = status === "expired" || status === "used_up";
|
|
19047
19053
|
const isInactive = !code.active;
|
|
19048
19054
|
const scope = isInactive ? "reactivate" : "deactivate";
|
|
@@ -19114,7 +19120,7 @@ var useStripeCouponCodeTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
19114
19120
|
const t = useTranslations77();
|
|
19115
19121
|
const fmt = useBillingFormatOptions();
|
|
19116
19122
|
const { coupon } = useCouponContext();
|
|
19117
|
-
const [now] =
|
|
19123
|
+
const [now] = useState68(() => /* @__PURE__ */ new Date());
|
|
19118
19124
|
const tableData = useMemo36(() => {
|
|
19119
19125
|
return params.data.map((code) => {
|
|
19120
19126
|
const entry = { jsonApiData: code };
|
|
@@ -19344,7 +19350,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
19344
19350
|
// src/features/content/hooks/useContentTableStructure.tsx
|
|
19345
19351
|
import { useTranslations as useTranslations79 } from "next-intl";
|
|
19346
19352
|
import { useMemo as useMemo38 } from "react";
|
|
19347
|
-
import { Fragment as
|
|
19353
|
+
import { Fragment as Fragment32, jsx as jsx200, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
19348
19354
|
var useContentTableStructure = /* @__PURE__ */ __name((params) => {
|
|
19349
19355
|
const t = useTranslations79();
|
|
19350
19356
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -19375,7 +19381,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
19375
19381
|
const contentModule = content.contentType ? Modules.findByModelName(content.contentType) : void 0;
|
|
19376
19382
|
const link = contentModule ? generateUrl({ page: contentModule, id: content.id }) : "#";
|
|
19377
19383
|
return /* @__PURE__ */ jsxs108(Tooltip2, { children: [
|
|
19378
|
-
/* @__PURE__ */ jsx200(TooltipTrigger, { className: "flex items-center justify-start space-x-2", children: /* @__PURE__ */ jsxs108(
|
|
19384
|
+
/* @__PURE__ */ jsx200(TooltipTrigger, { className: "flex items-center justify-start space-x-2", children: /* @__PURE__ */ jsxs108(Fragment32, { children: [
|
|
19379
19385
|
contentModule && getIconByModule({ module: contentModule, className: "h-4 w-4" }),
|
|
19380
19386
|
/* @__PURE__ */ jsx200(Link, { href: link, children: content.name })
|
|
19381
19387
|
] }) }),
|
|
@@ -19391,7 +19397,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
19391
19397
|
header: t(`common.relevance`),
|
|
19392
19398
|
cell: /* @__PURE__ */ __name(({ row }) => {
|
|
19393
19399
|
const content = row.original.jsonApiData;
|
|
19394
|
-
if (!content.relevance) return /* @__PURE__ */ jsx200(
|
|
19400
|
+
if (!content.relevance) return /* @__PURE__ */ jsx200(Fragment32, {});
|
|
19395
19401
|
const response = `${content.relevance.toFixed(0)}%`;
|
|
19396
19402
|
return /* @__PURE__ */ jsxs108("div", { className: "relative flex h-5 w-20 items-center justify-center overflow-clip rounded border text-center", children: [
|
|
19397
19403
|
/* @__PURE__ */ jsx200(
|
|
@@ -19567,7 +19573,7 @@ __name(useOAuthClients, "useOAuthClients");
|
|
|
19567
19573
|
// src/features/oauth/hooks/useOAuthClient.ts
|
|
19568
19574
|
import { useTranslations as useTranslations81 } from "next-intl";
|
|
19569
19575
|
import { useAtomValue as useAtomValue2, useSetAtom as useSetAtom2 } from "jotai";
|
|
19570
|
-
import { useCallback as useCallback36, useEffect as useEffect53, useRef as useRef34, useState as
|
|
19576
|
+
import { useCallback as useCallback36, useEffect as useEffect53, useRef as useRef34, useState as useState69 } from "react";
|
|
19571
19577
|
function useOAuthClient(clientId) {
|
|
19572
19578
|
const storedClient = useAtomValue2(oauthClientByIdAtom(clientId));
|
|
19573
19579
|
const updateClientInStore = useSetAtom2(updateOAuthClientAtom);
|
|
@@ -19576,9 +19582,9 @@ function useOAuthClient(clientId) {
|
|
|
19576
19582
|
const t = useTranslations81();
|
|
19577
19583
|
const tRef = useRef34(t);
|
|
19578
19584
|
tRef.current = t;
|
|
19579
|
-
const [fetchedClient, setFetchedClient] =
|
|
19580
|
-
const [isLoading, setIsLoading] =
|
|
19581
|
-
const [error, setError] =
|
|
19585
|
+
const [fetchedClient, setFetchedClient] = useState69(null);
|
|
19586
|
+
const [isLoading, setIsLoading] = useState69(false);
|
|
19587
|
+
const [error, setError] = useState69(null);
|
|
19582
19588
|
const client = storedClient || fetchedClient;
|
|
19583
19589
|
const fetchClient = useCallback36(async () => {
|
|
19584
19590
|
if (!clientId) return;
|
|
@@ -19669,13 +19675,13 @@ __name(useOAuthClient, "useOAuthClient");
|
|
|
19669
19675
|
|
|
19670
19676
|
// src/features/oauth/hooks/useOAuthConsent.ts
|
|
19671
19677
|
import { useTranslations as useTranslations82 } from "next-intl";
|
|
19672
|
-
import { useCallback as useCallback37, useEffect as useEffect54, useRef as useRef35, useState as
|
|
19678
|
+
import { useCallback as useCallback37, useEffect as useEffect54, useRef as useRef35, useState as useState70 } from "react";
|
|
19673
19679
|
function useOAuthConsent(params, options) {
|
|
19674
|
-
const [clientInfo, setClientInfo] =
|
|
19675
|
-
const [isLoading, setIsLoading] =
|
|
19676
|
-
const [error, setError] =
|
|
19677
|
-
const [isSubmitting, setIsSubmitting] =
|
|
19678
|
-
const [companyId, setCompanyId] =
|
|
19680
|
+
const [clientInfo, setClientInfo] = useState70(null);
|
|
19681
|
+
const [isLoading, setIsLoading] = useState70(true);
|
|
19682
|
+
const [error, setError] = useState70(null);
|
|
19683
|
+
const [isSubmitting, setIsSubmitting] = useState70(false);
|
|
19684
|
+
const [companyId, setCompanyId] = useState70(void 0);
|
|
19679
19685
|
const contextCompanyId = useCurrentUserContextOptional()?.company?.id;
|
|
19680
19686
|
const currentCompanyId = options?.defaultCompanyId ?? contextCompanyId;
|
|
19681
19687
|
const t = useTranslations82();
|
|
@@ -19791,22 +19797,22 @@ registerTableGenerator("waitlists", useWaitlistTableStructure);
|
|
|
19791
19797
|
|
|
19792
19798
|
// src/components/tables/ContentListTable.tsx
|
|
19793
19799
|
import { flexRender, getCoreRowModel, getExpandedRowModel, useReactTable } from "@tanstack/react-table";
|
|
19794
|
-
import { ChevronLeft, ChevronRight, Loader2 as
|
|
19800
|
+
import { ChevronLeft, ChevronRight, Loader2 as Loader24 } from "lucide-react";
|
|
19795
19801
|
import { useTranslations as useTranslations85 } from "next-intl";
|
|
19796
|
-
import React31, { memo, useMemo as useMemo39, useState as
|
|
19802
|
+
import React31, { memo, useMemo as useMemo39, useState as useState72 } from "react";
|
|
19797
19803
|
|
|
19798
19804
|
// src/components/tables/ContentTableSearch.tsx
|
|
19799
19805
|
import { RefreshCw, Search, X as X3 } from "lucide-react";
|
|
19800
19806
|
import { useTranslations as useTranslations84 } from "next-intl";
|
|
19801
|
-
import { useCallback as useCallback39, useEffect as useEffect55, useRef as useRef36, useState as
|
|
19807
|
+
import { useCallback as useCallback39, useEffect as useEffect55, useRef as useRef36, useState as useState71 } from "react";
|
|
19802
19808
|
import { jsx as jsx201, jsxs as jsxs109 } from "react/jsx-runtime";
|
|
19803
19809
|
function ContentTableSearch({ data }) {
|
|
19804
19810
|
const t = useTranslations84();
|
|
19805
19811
|
const searchTermRef = useRef36("");
|
|
19806
19812
|
const inputRef = useRef36(null);
|
|
19807
|
-
const [searchTerm, setSearchTerm] =
|
|
19808
|
-
const [isFocused, setIsFocused] =
|
|
19809
|
-
const [isSearching, setIsSearching] =
|
|
19813
|
+
const [searchTerm, setSearchTerm] = useState71("");
|
|
19814
|
+
const [isFocused, setIsFocused] = useState71(false);
|
|
19815
|
+
const [isSearching, setIsSearching] = useState71(false);
|
|
19810
19816
|
const isExpanded = isFocused || searchTerm.length > 0;
|
|
19811
19817
|
const search = useCallback39(
|
|
19812
19818
|
async (searchedTerm) => {
|
|
@@ -19901,7 +19907,7 @@ function ContentTableSearch({ data }) {
|
|
|
19901
19907
|
__name(ContentTableSearch, "ContentTableSearch");
|
|
19902
19908
|
|
|
19903
19909
|
// src/components/tables/ContentListTable.tsx
|
|
19904
|
-
import { Fragment as
|
|
19910
|
+
import { Fragment as Fragment33, jsx as jsx202, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
19905
19911
|
var EMPTY_ARRAY = [];
|
|
19906
19912
|
function getGroupKeys(item, field) {
|
|
19907
19913
|
const value = item.jsonApiData[field];
|
|
@@ -19916,7 +19922,7 @@ function getGroupKeys(item, field) {
|
|
|
19916
19922
|
__name(getGroupKeys, "getGroupKeys");
|
|
19917
19923
|
var isClassComponent = /* @__PURE__ */ __name((component) => typeof component === "function" && !!component.prototype?.isReactComponent, "isClassComponent");
|
|
19918
19924
|
function StableCell({ render, context }) {
|
|
19919
|
-
return /* @__PURE__ */ jsx202(
|
|
19925
|
+
return /* @__PURE__ */ jsx202(Fragment33, { children: render(context) });
|
|
19920
19926
|
}
|
|
19921
19927
|
__name(StableCell, "StableCell");
|
|
19922
19928
|
function renderCell(cellDef, context) {
|
|
@@ -19930,10 +19936,10 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
19930
19936
|
const { data, fields, checkedIds, toggleId, allowSearch, filters: _filters, fullWidth, onRowClick } = props;
|
|
19931
19937
|
const t = useTranslations85();
|
|
19932
19938
|
const isMobile = useIsMobile();
|
|
19933
|
-
const [expanded, setExpanded] =
|
|
19939
|
+
const [expanded, setExpanded] = useState72(
|
|
19934
19940
|
props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
|
|
19935
19941
|
);
|
|
19936
|
-
const [pendingDirection, setPendingDirection] =
|
|
19942
|
+
const [pendingDirection, setPendingDirection] = useState72(null);
|
|
19937
19943
|
React31.useEffect(() => {
|
|
19938
19944
|
if (data.isLoaded) setPendingDirection(null);
|
|
19939
19945
|
}, [data.isLoaded]);
|
|
@@ -20032,7 +20038,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
20032
20038
|
}
|
|
20033
20039
|
);
|
|
20034
20040
|
const hasTitleControls = !!(props.functions || props.filters || allowSearch);
|
|
20035
|
-
const titleControls = /* @__PURE__ */ jsxs110(
|
|
20041
|
+
const titleControls = /* @__PURE__ */ jsxs110(Fragment33, { children: [
|
|
20036
20042
|
props.filters,
|
|
20037
20043
|
props.functions,
|
|
20038
20044
|
allowSearch !== false && /* @__PURE__ */ jsx202(ContentTableSearch, { data })
|
|
@@ -20109,7 +20115,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
20109
20115
|
data.previous?.(true);
|
|
20110
20116
|
},
|
|
20111
20117
|
disabled: !data.previous || pendingDirection !== null,
|
|
20112
|
-
children: pendingDirection === "prev" ? /* @__PURE__ */ jsx202(
|
|
20118
|
+
children: pendingDirection === "prev" ? /* @__PURE__ */ jsx202(Loader24, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx202(ChevronLeft, { className: "h-4 w-4 rtl:rotate-180" })
|
|
20113
20119
|
}
|
|
20114
20120
|
),
|
|
20115
20121
|
data.pageInfo && /* @__PURE__ */ jsx202("span", { className: "text-muted-foreground text-xs", children: `${data.pageInfo.startItem}-${data.pageInfo.endItem}${data.total ? ` of ${data.total}` : ""}` }),
|
|
@@ -20124,7 +20130,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
20124
20130
|
data.next?.(true);
|
|
20125
20131
|
},
|
|
20126
20132
|
disabled: !data.next || pendingDirection !== null,
|
|
20127
|
-
children: pendingDirection === "next" ? /* @__PURE__ */ jsx202(
|
|
20133
|
+
children: pendingDirection === "next" ? /* @__PURE__ */ jsx202(Loader24, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx202(ChevronRight, { className: "h-4 w-4 rtl:rotate-180" })
|
|
20128
20134
|
}
|
|
20129
20135
|
)
|
|
20130
20136
|
] }) }) }) })
|
|
@@ -20134,7 +20140,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
20134
20140
|
|
|
20135
20141
|
// src/components/grids/ContentListGrid.tsx
|
|
20136
20142
|
import { useEffect as useEffect56, useRef as useRef37 } from "react";
|
|
20137
|
-
import { Fragment as
|
|
20143
|
+
import { Fragment as Fragment34, jsx as jsx203, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
20138
20144
|
var DEFAULT_GRID_CLASSES = "grid grid-cols-2 gap-4 p-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5";
|
|
20139
20145
|
function ContentListGrid(props) {
|
|
20140
20146
|
const { data, ItemComponent, allowSearch, fullWidth, gridClassName } = props;
|
|
@@ -20165,7 +20171,7 @@ function ContentListGrid(props) {
|
|
|
20165
20171
|
]
|
|
20166
20172
|
}
|
|
20167
20173
|
) }),
|
|
20168
|
-
(props.functions || props.filters || allowSearch) && /* @__PURE__ */ jsxs111(
|
|
20174
|
+
(props.functions || props.filters || allowSearch) && /* @__PURE__ */ jsxs111(Fragment34, { children: [
|
|
20169
20175
|
props.functions,
|
|
20170
20176
|
props.filters,
|
|
20171
20177
|
allowSearch && /* @__PURE__ */ jsx203(ContentTableSearch, { data })
|
|
@@ -20182,15 +20188,15 @@ __name(ContentListGrid, "ContentListGrid");
|
|
|
20182
20188
|
|
|
20183
20189
|
// src/components/fiscal/ItalianFiscalData.tsx
|
|
20184
20190
|
import { useTranslations as useTranslations86 } from "next-intl";
|
|
20185
|
-
import { forwardRef as forwardRef8, useCallback as useCallback40, useImperativeHandle as useImperativeHandle2, useRef as useRef38, useState as
|
|
20191
|
+
import { forwardRef as forwardRef8, useCallback as useCallback40, useImperativeHandle as useImperativeHandle2, useRef as useRef38, useState as useState73 } from "react";
|
|
20186
20192
|
import { z as z6 } from "zod";
|
|
20187
20193
|
import { jsx as jsx204, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
20188
20194
|
var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
|
|
20189
20195
|
const t = useTranslations86();
|
|
20190
20196
|
const initialRef = useRef38(initialData);
|
|
20191
|
-
const [fiscalData, setFiscalData] =
|
|
20197
|
+
const [fiscalData, setFiscalData] = useState73(initialData);
|
|
20192
20198
|
const fiscalDataRef = useRef38(initialData);
|
|
20193
|
-
const [fiscalErrors, setFiscalErrors] =
|
|
20199
|
+
const [fiscalErrors, setFiscalErrors] = useState73({});
|
|
20194
20200
|
const updateFiscalField = useCallback40((key, value) => {
|
|
20195
20201
|
setFiscalData((prev) => {
|
|
20196
20202
|
const next = { ...prev, [key]: value };
|
|
@@ -20382,11 +20388,11 @@ __name(EntitySection, "EntitySection");
|
|
|
20382
20388
|
// src/features/account-deletion/components/AccountDeletionCancelledNotice.tsx
|
|
20383
20389
|
import { XIcon as XIcon11 } from "lucide-react";
|
|
20384
20390
|
import { useTranslations as useTranslations87 } from "next-intl";
|
|
20385
|
-
import { useEffect as useEffect57, useState as
|
|
20391
|
+
import { useEffect as useEffect57, useState as useState74 } from "react";
|
|
20386
20392
|
import { jsx as jsx210, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
20387
20393
|
function AccountDeletionCancelledNotice({ choosePlanHref }) {
|
|
20388
20394
|
const t = useTranslations87();
|
|
20389
|
-
const [visible, setVisible] =
|
|
20395
|
+
const [visible, setVisible] = useState74(false);
|
|
20390
20396
|
useEffect57(() => {
|
|
20391
20397
|
if (consumeAccountDeletionCancelled()) setVisible(true);
|
|
20392
20398
|
}, []);
|
|
@@ -20403,13 +20409,13 @@ function AccountDeletionCancelledNotice({ choosePlanHref }) {
|
|
|
20403
20409
|
__name(AccountDeletionCancelledNotice, "AccountDeletionCancelledNotice");
|
|
20404
20410
|
|
|
20405
20411
|
// src/features/account-deletion/components/AccountDeletionKeepContainer.tsx
|
|
20406
|
-
import { CheckCircle, Loader2 as
|
|
20412
|
+
import { CheckCircle, Loader2 as Loader25, XCircle as XCircle2 } from "lucide-react";
|
|
20407
20413
|
import { useTranslations as useTranslations88 } from "next-intl";
|
|
20408
|
-
import { useEffect as useEffect58, useRef as useRef39, useState as
|
|
20414
|
+
import { useEffect as useEffect58, useRef as useRef39, useState as useState75 } from "react";
|
|
20409
20415
|
import { jsx as jsx211, jsxs as jsxs117 } from "react/jsx-runtime";
|
|
20410
20416
|
function AccountDeletionKeepContainer({ token }) {
|
|
20411
20417
|
const t = useTranslations88();
|
|
20412
|
-
const [state, setState] =
|
|
20418
|
+
const [state, setState] = useState75(token ? "loading" : "failure");
|
|
20413
20419
|
const called = useRef39(false);
|
|
20414
20420
|
useEffect58(() => {
|
|
20415
20421
|
if (!token || called.current) return;
|
|
@@ -20418,7 +20424,7 @@ function AccountDeletionKeepContainer({ token }) {
|
|
|
20418
20424
|
}, [token]);
|
|
20419
20425
|
if (state === "loading") {
|
|
20420
20426
|
return /* @__PURE__ */ jsxs117("div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
|
|
20421
|
-
/* @__PURE__ */ jsx211(
|
|
20427
|
+
/* @__PURE__ */ jsx211(Loader25, { className: "text-primary h-12 w-12 animate-spin" }),
|
|
20422
20428
|
/* @__PURE__ */ jsx211("p", { className: "text-muted-foreground", children: t("ui.buttons.loading") })
|
|
20423
20429
|
] });
|
|
20424
20430
|
}
|
|
@@ -20442,29 +20448,29 @@ __name(AccountDeletionKeepContainer, "AccountDeletionKeepContainer");
|
|
|
20442
20448
|
import Image8 from "next/image";
|
|
20443
20449
|
|
|
20444
20450
|
// src/features/auth/contexts/AuthContext.tsx
|
|
20445
|
-
import { createContext as createContext29, useContext as useContext29, useMemo as useMemo40, useState as
|
|
20451
|
+
import { createContext as createContext29, useContext as useContext29, useMemo as useMemo40, useState as useState77 } from "react";
|
|
20446
20452
|
|
|
20447
20453
|
// src/features/auth/components/forms/Register.tsx
|
|
20448
20454
|
import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
|
|
20449
|
-
import { Loader2 as
|
|
20455
|
+
import { Loader2 as Loader26 } from "lucide-react";
|
|
20450
20456
|
import { useTranslations as useTranslations90 } from "next-intl";
|
|
20451
20457
|
import Image7 from "next/image";
|
|
20452
20458
|
import { useSearchParams as useSearchParams2 } from "next/navigation";
|
|
20453
|
-
import { useEffect as useEffect59, useState as
|
|
20459
|
+
import { useEffect as useEffect59, useState as useState76 } from "react";
|
|
20454
20460
|
import { useForm as useForm6 } from "react-hook-form";
|
|
20455
20461
|
import { v4 as v46 } from "uuid";
|
|
20456
20462
|
import { z as z7 } from "zod";
|
|
20457
20463
|
|
|
20458
20464
|
// src/features/auth/components/GdprConsentSection.tsx
|
|
20459
20465
|
import { useTranslations as useTranslations89 } from "next-intl";
|
|
20460
|
-
import { Fragment as
|
|
20466
|
+
import { Fragment as Fragment35, jsx as jsx212, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
20461
20467
|
function GdprConsentSection({
|
|
20462
20468
|
form,
|
|
20463
20469
|
termsCheckboxId = "termsAccepted",
|
|
20464
20470
|
marketingCheckboxId = "marketingConsent"
|
|
20465
20471
|
}) {
|
|
20466
20472
|
const t = useTranslations89("auth.gdpr");
|
|
20467
|
-
const termsLabel = /* @__PURE__ */ jsxs118(
|
|
20473
|
+
const termsLabel = /* @__PURE__ */ jsxs118(Fragment35, { children: [
|
|
20468
20474
|
t("terms_prefix"),
|
|
20469
20475
|
" ",
|
|
20470
20476
|
/* @__PURE__ */ jsx212(Link, { href: "/terms", target: "_blank", rel: "noopener", children: t("terms_of_service") }),
|
|
@@ -20489,7 +20495,7 @@ function GdprConsentSection({
|
|
|
20489
20495
|
__name(GdprConsentSection, "GdprConsentSection");
|
|
20490
20496
|
|
|
20491
20497
|
// src/features/auth/components/forms/Register.tsx
|
|
20492
|
-
import { Fragment as
|
|
20498
|
+
import { Fragment as Fragment36, jsx as jsx213, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
20493
20499
|
var REFERRAL_COOKIE_NAME = "referral_code";
|
|
20494
20500
|
function getReferralCode() {
|
|
20495
20501
|
if (typeof document === "undefined") return null;
|
|
@@ -20522,14 +20528,14 @@ function Register() {
|
|
|
20522
20528
|
const searchParams = useSearchParams2();
|
|
20523
20529
|
const inviteCode = searchParams.get("invite");
|
|
20524
20530
|
const registrationMode = getRegistrationMode();
|
|
20525
|
-
const [showConfirmation, setShowConfirmation] =
|
|
20526
|
-
const [inviteValidated, setInviteValidated] =
|
|
20527
|
-
const [inviteError, setInviteError] =
|
|
20528
|
-
const [isValidatingInvite, setIsValidatingInvite] =
|
|
20531
|
+
const [showConfirmation, setShowConfirmation] = useState76(false);
|
|
20532
|
+
const [inviteValidated, setInviteValidated] = useState76(false);
|
|
20533
|
+
const [inviteError, setInviteError] = useState76("");
|
|
20534
|
+
const [isValidatingInvite, setIsValidatingInvite] = useState76(
|
|
20529
20535
|
registrationMode === "waitlist" && !!inviteCode
|
|
20530
20536
|
);
|
|
20531
|
-
const [referralCode, setReferralCode2] =
|
|
20532
|
-
const [signupSource, setSignupSource] =
|
|
20537
|
+
const [referralCode, setReferralCode2] = useState76(null);
|
|
20538
|
+
const [signupSource, setSignupSource] = useState76(void 0);
|
|
20533
20539
|
useEffect59(() => {
|
|
20534
20540
|
const code = getReferralCode();
|
|
20535
20541
|
setReferralCode2(code);
|
|
@@ -20611,19 +20617,19 @@ function Register() {
|
|
|
20611
20617
|
}
|
|
20612
20618
|
}, "onSubmit");
|
|
20613
20619
|
if (registrationMode === "waitlist" && inviteCode && isValidatingInvite) {
|
|
20614
|
-
return /* @__PURE__ */ jsxs119(
|
|
20620
|
+
return /* @__PURE__ */ jsxs119(Fragment36, { children: [
|
|
20615
20621
|
/* @__PURE__ */ jsx213(CardHeader, { children: /* @__PURE__ */ jsxs119(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
20616
20622
|
/* @__PURE__ */ jsx213(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
20617
20623
|
t("waitlist.invite.validating_title")
|
|
20618
20624
|
] }) }),
|
|
20619
20625
|
/* @__PURE__ */ jsxs119(CardContent, { className: "flex flex-col items-center justify-center space-y-4 py-8", children: [
|
|
20620
|
-
/* @__PURE__ */ jsx213(
|
|
20626
|
+
/* @__PURE__ */ jsx213(Loader26, { className: "h-8 w-8 animate-spin text-primary" }),
|
|
20621
20627
|
/* @__PURE__ */ jsx213("p", { className: "text-muted-foreground", children: t("waitlist.invite.validating_description") })
|
|
20622
20628
|
] })
|
|
20623
20629
|
] });
|
|
20624
20630
|
}
|
|
20625
20631
|
if (registrationMode === "waitlist" && inviteCode && inviteError) {
|
|
20626
|
-
return /* @__PURE__ */ jsxs119(
|
|
20632
|
+
return /* @__PURE__ */ jsxs119(Fragment36, { children: [
|
|
20627
20633
|
/* @__PURE__ */ jsx213(CardHeader, { children: /* @__PURE__ */ jsxs119(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
20628
20634
|
/* @__PURE__ */ jsx213(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
20629
20635
|
t("waitlist.invite.invalid_title")
|
|
@@ -20636,7 +20642,7 @@ function Register() {
|
|
|
20636
20642
|
] });
|
|
20637
20643
|
}
|
|
20638
20644
|
if (registrationMode === "waitlist" && !inviteCode) {
|
|
20639
|
-
return /* @__PURE__ */ jsxs119(
|
|
20645
|
+
return /* @__PURE__ */ jsxs119(Fragment36, { children: [
|
|
20640
20646
|
/* @__PURE__ */ jsx213(CardHeader, { children: /* @__PURE__ */ jsxs119(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
20641
20647
|
/* @__PURE__ */ jsx213(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
20642
20648
|
t("waitlist.invite.registration_title")
|
|
@@ -20649,13 +20655,13 @@ function Register() {
|
|
|
20649
20655
|
/* @__PURE__ */ jsx213(CardFooter, { className: "flex w-full flex-row justify-between", children: /* @__PURE__ */ jsx213(Link, { href: "#", className: "flex w-full justify-start", onClick: () => setComponentType(0 /* Login */), children: t("auth.buttons.login") }) })
|
|
20650
20656
|
] });
|
|
20651
20657
|
}
|
|
20652
|
-
return /* @__PURE__ */ jsxs119(
|
|
20658
|
+
return /* @__PURE__ */ jsxs119(Fragment36, { children: [
|
|
20653
20659
|
/* @__PURE__ */ jsxs119(CardHeader, { children: [
|
|
20654
20660
|
/* @__PURE__ */ jsxs119(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
20655
20661
|
/* @__PURE__ */ jsx213(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
20656
20662
|
t(`auth.buttons.register`)
|
|
20657
20663
|
] }),
|
|
20658
|
-
/* @__PURE__ */ jsx213(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx213(
|
|
20664
|
+
/* @__PURE__ */ jsx213(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx213(Fragment36, { children: " " }) : /* @__PURE__ */ jsx213(Fragment36, { children: t(`auth.register_description`) }) })
|
|
20659
20665
|
] }),
|
|
20660
20666
|
showConfirmation ? /* @__PURE__ */ jsx213(CardContent, { children: /* @__PURE__ */ jsx213(CardDescription, { className: "text-center text-xl", children: t("auth.register_confirmation") }) }) : /* @__PURE__ */ jsx213(Form, { ...form, children: /* @__PURE__ */ jsxs119("form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
20661
20667
|
/* @__PURE__ */ jsxs119(CardContent, { children: [
|
|
@@ -20804,9 +20810,9 @@ var AuthContextProvider = /* @__PURE__ */ __name(({
|
|
|
20804
20810
|
initialComponentType,
|
|
20805
20811
|
initialParams
|
|
20806
20812
|
}) => {
|
|
20807
|
-
const [componentType, setComponentType] =
|
|
20808
|
-
const [params, setParams] =
|
|
20809
|
-
const [pendingTwoFactor, setPendingTwoFactor] =
|
|
20813
|
+
const [componentType, setComponentType] = useState77(initialComponentType);
|
|
20814
|
+
const [params, setParams] = useState77(initialParams);
|
|
20815
|
+
const [pendingTwoFactor, setPendingTwoFactor] = useState77();
|
|
20810
20816
|
const activeComponent = useMemo40(() => {
|
|
20811
20817
|
if (componentType === void 0) return null;
|
|
20812
20818
|
switch (componentType) {
|
|
@@ -20868,20 +20874,20 @@ __name(InnerAuthContainer, "InnerAuthContainer");
|
|
|
20868
20874
|
// src/features/auth/components/two-factor/TwoFactorSettings.tsx
|
|
20869
20875
|
import { ShieldAlert, ShieldCheck } from "lucide-react";
|
|
20870
20876
|
import { useTranslations as useTranslations97 } from "next-intl";
|
|
20871
|
-
import { useCallback as useCallback41, useEffect as useEffect61, useState as
|
|
20877
|
+
import { useCallback as useCallback41, useEffect as useEffect61, useState as useState85 } from "react";
|
|
20872
20878
|
import { v4 as v49 } from "uuid";
|
|
20873
20879
|
|
|
20874
20880
|
// src/features/auth/components/two-factor/BackupCodesDialog.tsx
|
|
20875
20881
|
import { Copy, Download, RefreshCw as RefreshCw2 } from "lucide-react";
|
|
20876
20882
|
import { useTranslations as useTranslations91 } from "next-intl";
|
|
20877
|
-
import { useState as
|
|
20883
|
+
import { useState as useState78 } from "react";
|
|
20878
20884
|
import { jsx as jsx216, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
20879
20885
|
function BackupCodesDialog({ remainingCodes, onRegenerate, trigger }) {
|
|
20880
20886
|
const t = useTranslations91();
|
|
20881
|
-
const [open, setOpen] =
|
|
20882
|
-
const [codes, setCodes] =
|
|
20883
|
-
const [isLoading, setIsLoading] =
|
|
20884
|
-
const [showCodes, setShowCodes] =
|
|
20887
|
+
const [open, setOpen] = useState78(false);
|
|
20888
|
+
const [codes, setCodes] = useState78([]);
|
|
20889
|
+
const [isLoading, setIsLoading] = useState78(false);
|
|
20890
|
+
const [showCodes, setShowCodes] = useState78(false);
|
|
20885
20891
|
const handleGenerate = /* @__PURE__ */ __name(async () => {
|
|
20886
20892
|
setIsLoading(true);
|
|
20887
20893
|
try {
|
|
@@ -20976,13 +20982,13 @@ __name(BackupCodesDialog, "BackupCodesDialog");
|
|
|
20976
20982
|
|
|
20977
20983
|
// src/features/auth/components/two-factor/DisableTwoFactorDialog.tsx
|
|
20978
20984
|
import { useTranslations as useTranslations92 } from "next-intl";
|
|
20979
|
-
import { useState as
|
|
20985
|
+
import { useState as useState80 } from "react";
|
|
20980
20986
|
|
|
20981
20987
|
// src/features/auth/components/two-factor/TotpInput.tsx
|
|
20982
|
-
import { useEffect as useEffect60, useRef as useRef40, useState as
|
|
20988
|
+
import { useEffect as useEffect60, useRef as useRef40, useState as useState79 } from "react";
|
|
20983
20989
|
import { jsx as jsx217, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
20984
20990
|
function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
|
|
20985
|
-
const [digits, setDigits] =
|
|
20991
|
+
const [digits, setDigits] = useState79(["", "", "", "", "", ""]);
|
|
20986
20992
|
const inputRefs = useRef40([]);
|
|
20987
20993
|
useEffect60(() => {
|
|
20988
20994
|
if (autoFocus && inputRefs.current[0]) {
|
|
@@ -21046,9 +21052,9 @@ __name(TotpInput, "TotpInput");
|
|
|
21046
21052
|
import { jsx as jsx218, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
21047
21053
|
function DisableTwoFactorDialog({ onSuccess, trigger }) {
|
|
21048
21054
|
const t = useTranslations92();
|
|
21049
|
-
const [open, setOpen] =
|
|
21050
|
-
const [isLoading, setIsLoading] =
|
|
21051
|
-
const [error, setError] =
|
|
21055
|
+
const [open, setOpen] = useState80(false);
|
|
21056
|
+
const [isLoading, setIsLoading] = useState80(false);
|
|
21057
|
+
const [error, setError] = useState80();
|
|
21052
21058
|
const handleVerify = /* @__PURE__ */ __name(async (code) => {
|
|
21053
21059
|
setIsLoading(true);
|
|
21054
21060
|
setError(void 0);
|
|
@@ -21089,15 +21095,15 @@ __name(DisableTwoFactorDialog, "DisableTwoFactorDialog");
|
|
|
21089
21095
|
// src/features/auth/components/two-factor/PasskeyList.tsx
|
|
21090
21096
|
import { Edit, Key, Trash2 } from "lucide-react";
|
|
21091
21097
|
import { useTranslations as useTranslations93 } from "next-intl";
|
|
21092
|
-
import { useState as
|
|
21093
|
-
import { Fragment as
|
|
21098
|
+
import { useState as useState81 } from "react";
|
|
21099
|
+
import { Fragment as Fragment37, jsx as jsx219, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
21094
21100
|
function PasskeyList({ passkeys, onRefresh }) {
|
|
21095
21101
|
const t = useTranslations93();
|
|
21096
21102
|
const dates = useDateFormatter();
|
|
21097
|
-
const [renameDialogOpen, setRenameDialogOpen] =
|
|
21098
|
-
const [selectedPasskey, setSelectedPasskey] =
|
|
21099
|
-
const [newName, setNewName] =
|
|
21100
|
-
const [isLoading, setIsLoading] =
|
|
21103
|
+
const [renameDialogOpen, setRenameDialogOpen] = useState81(false);
|
|
21104
|
+
const [selectedPasskey, setSelectedPasskey] = useState81(null);
|
|
21105
|
+
const [newName, setNewName] = useState81("");
|
|
21106
|
+
const [isLoading, setIsLoading] = useState81(false);
|
|
21101
21107
|
const handleDelete = /* @__PURE__ */ __name(async (passkey) => {
|
|
21102
21108
|
setIsLoading(true);
|
|
21103
21109
|
try {
|
|
@@ -21147,7 +21153,7 @@ function PasskeyList({ passkeys, onRefresh }) {
|
|
|
21147
21153
|
if (passkeys.length === 0) {
|
|
21148
21154
|
return /* @__PURE__ */ jsx219("p", { className: "text-sm text-muted-foreground text-center py-4", children: t("auth.two_factor.no_passkeys") });
|
|
21149
21155
|
}
|
|
21150
|
-
return /* @__PURE__ */ jsxs123(
|
|
21156
|
+
return /* @__PURE__ */ jsxs123(Fragment37, { children: [
|
|
21151
21157
|
/* @__PURE__ */ jsx219("div", { className: "space-y-2", children: passkeys.map((passkey) => /* @__PURE__ */ jsxs123("div", { className: "flex items-center justify-between p-3 border rounded-lg", children: [
|
|
21152
21158
|
/* @__PURE__ */ jsxs123("div", { className: "flex items-center gap-3", children: [
|
|
21153
21159
|
/* @__PURE__ */ jsx219(Key, { className: "h-5 w-5 text-muted-foreground" }),
|
|
@@ -21211,14 +21217,14 @@ __name(PasskeyList, "PasskeyList");
|
|
|
21211
21217
|
// src/features/auth/components/two-factor/PasskeySetupDialog.tsx
|
|
21212
21218
|
import { startRegistration } from "@simplewebauthn/browser";
|
|
21213
21219
|
import { useTranslations as useTranslations94 } from "next-intl";
|
|
21214
|
-
import { useState as
|
|
21220
|
+
import { useState as useState82 } from "react";
|
|
21215
21221
|
import { v4 as v47 } from "uuid";
|
|
21216
21222
|
import { jsx as jsx220, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
21217
21223
|
function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
|
|
21218
21224
|
const t = useTranslations94();
|
|
21219
21225
|
const { currentUser } = useCurrentUserContext();
|
|
21220
|
-
const [name, setName] =
|
|
21221
|
-
const [isLoading, setIsLoading] =
|
|
21226
|
+
const [name, setName] = useState82("");
|
|
21227
|
+
const [isLoading, setIsLoading] = useState82(false);
|
|
21222
21228
|
const handleRegister = /* @__PURE__ */ __name(async () => {
|
|
21223
21229
|
if (!name.trim()) return;
|
|
21224
21230
|
setIsLoading(true);
|
|
@@ -21282,12 +21288,12 @@ __name(PasskeySetupDialog, "PasskeySetupDialog");
|
|
|
21282
21288
|
// src/features/auth/components/two-factor/TotpAuthenticatorList.tsx
|
|
21283
21289
|
import { Smartphone, Trash2 as Trash22 } from "lucide-react";
|
|
21284
21290
|
import { useTranslations as useTranslations95 } from "next-intl";
|
|
21285
|
-
import { useState as
|
|
21291
|
+
import { useState as useState83 } from "react";
|
|
21286
21292
|
import { jsx as jsx221, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
21287
21293
|
function TotpAuthenticatorList({ authenticators, onDelete }) {
|
|
21288
21294
|
const t = useTranslations95();
|
|
21289
21295
|
const dates = useDateFormatter();
|
|
21290
|
-
const [deletingId, setDeletingId] =
|
|
21296
|
+
const [deletingId, setDeletingId] = useState83(null);
|
|
21291
21297
|
const handleDelete = /* @__PURE__ */ __name(async (id) => {
|
|
21292
21298
|
setDeletingId(id);
|
|
21293
21299
|
try {
|
|
@@ -21358,19 +21364,19 @@ __name(TotpAuthenticatorList, "TotpAuthenticatorList");
|
|
|
21358
21364
|
// src/features/auth/components/two-factor/TotpSetupDialog.tsx
|
|
21359
21365
|
import { useTranslations as useTranslations96 } from "next-intl";
|
|
21360
21366
|
import { QRCodeSVG } from "qrcode.react";
|
|
21361
|
-
import { useState as
|
|
21367
|
+
import { useState as useState84 } from "react";
|
|
21362
21368
|
import { v4 as v48 } from "uuid";
|
|
21363
21369
|
import { jsx as jsx222, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
21364
21370
|
function TotpSetupDialog({ onSuccess, trigger }) {
|
|
21365
21371
|
const t = useTranslations96();
|
|
21366
21372
|
const { currentUser } = useCurrentUserContext();
|
|
21367
|
-
const [open, setOpen] =
|
|
21368
|
-
const [step, setStep] =
|
|
21369
|
-
const [name, setName] =
|
|
21370
|
-
const [qrCodeUri, setQrCodeUri] =
|
|
21371
|
-
const [authenticatorId, setAuthenticatorId] =
|
|
21372
|
-
const [isLoading, setIsLoading] =
|
|
21373
|
-
const [verifyError, setVerifyError] =
|
|
21373
|
+
const [open, setOpen] = useState84(false);
|
|
21374
|
+
const [step, setStep] = useState84("name");
|
|
21375
|
+
const [name, setName] = useState84("");
|
|
21376
|
+
const [qrCodeUri, setQrCodeUri] = useState84("");
|
|
21377
|
+
const [authenticatorId, setAuthenticatorId] = useState84("");
|
|
21378
|
+
const [isLoading, setIsLoading] = useState84(false);
|
|
21379
|
+
const [verifyError, setVerifyError] = useState84();
|
|
21374
21380
|
const handleStartSetup = /* @__PURE__ */ __name(async () => {
|
|
21375
21381
|
if (!name.trim()) return;
|
|
21376
21382
|
setIsLoading(true);
|
|
@@ -21465,15 +21471,15 @@ function TotpSetupDialog({ onSuccess, trigger }) {
|
|
|
21465
21471
|
__name(TotpSetupDialog, "TotpSetupDialog");
|
|
21466
21472
|
|
|
21467
21473
|
// src/features/auth/components/two-factor/TwoFactorSettings.tsx
|
|
21468
|
-
import { Fragment as
|
|
21474
|
+
import { Fragment as Fragment38, jsx as jsx223, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
21469
21475
|
function TwoFactorSettings() {
|
|
21470
21476
|
const t = useTranslations97();
|
|
21471
|
-
const [status, setStatus] =
|
|
21472
|
-
const [authenticators, setAuthenticators] =
|
|
21473
|
-
const [passkeys, setPasskeys] =
|
|
21474
|
-
const [isLoading, setIsLoading] =
|
|
21475
|
-
const [isEnabling, setIsEnabling] =
|
|
21476
|
-
const [passkeyDialogOpen, setPasskeyDialogOpen] =
|
|
21477
|
+
const [status, setStatus] = useState85(null);
|
|
21478
|
+
const [authenticators, setAuthenticators] = useState85([]);
|
|
21479
|
+
const [passkeys, setPasskeys] = useState85([]);
|
|
21480
|
+
const [isLoading, setIsLoading] = useState85(true);
|
|
21481
|
+
const [isEnabling, setIsEnabling] = useState85(false);
|
|
21482
|
+
const [passkeyDialogOpen, setPasskeyDialogOpen] = useState85(false);
|
|
21477
21483
|
const loadStatus = useCallback41(async () => {
|
|
21478
21484
|
try {
|
|
21479
21485
|
const [statusData, authenticatorsList, passkeysList] = await Promise.all([
|
|
@@ -21552,7 +21558,7 @@ function TwoFactorSettings() {
|
|
|
21552
21558
|
] }),
|
|
21553
21559
|
/* @__PURE__ */ jsx223(BackupCodesDialog, { remainingCodes: status?.backupCodesCount ?? 0, onRegenerate: handleRefresh })
|
|
21554
21560
|
] }) }),
|
|
21555
|
-
!isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ jsxs127(
|
|
21561
|
+
!isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ jsxs127(Fragment38, { children: [
|
|
21556
21562
|
/* @__PURE__ */ jsx223(Separator, {}),
|
|
21557
21563
|
/* @__PURE__ */ jsxs127("div", { className: "flex items-center justify-between", children: [
|
|
21558
21564
|
/* @__PURE__ */ jsxs127("div", { children: [
|
|
@@ -21562,7 +21568,7 @@ function TwoFactorSettings() {
|
|
|
21562
21568
|
/* @__PURE__ */ jsx223(Button, { onClick: handleEnable2FA, disabled: isEnabling, children: isEnabling ? t("common.loading") : t("auth.two_factor.enable_button") })
|
|
21563
21569
|
] })
|
|
21564
21570
|
] }),
|
|
21565
|
-
isEnabled && /* @__PURE__ */ jsxs127(
|
|
21571
|
+
isEnabled && /* @__PURE__ */ jsxs127(Fragment38, { children: [
|
|
21566
21572
|
/* @__PURE__ */ jsx223(Separator, {}),
|
|
21567
21573
|
/* @__PURE__ */ jsxs127("div", { className: "flex items-center justify-between", children: [
|
|
21568
21574
|
/* @__PURE__ */ jsxs127("div", { children: [
|
|
@@ -21648,11 +21654,11 @@ function GoogleSignInButton({ referralCode, source }) {
|
|
|
21648
21654
|
__name(GoogleSignInButton, "GoogleSignInButton");
|
|
21649
21655
|
|
|
21650
21656
|
// src/features/auth/components/details/LandingComponent.tsx
|
|
21651
|
-
import { Fragment as
|
|
21657
|
+
import { Fragment as Fragment39, jsx as jsx226, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
21652
21658
|
function LandingComponent() {
|
|
21653
21659
|
const t = useTranslations99();
|
|
21654
21660
|
const { setComponentType } = useAuthContext();
|
|
21655
|
-
return /* @__PURE__ */ jsxs129(
|
|
21661
|
+
return /* @__PURE__ */ jsxs129(Fragment39, { children: [
|
|
21656
21662
|
/* @__PURE__ */ jsxs129(CardHeader, { className: "mb-4", "data-testid": "page-pre-login-container", children: [
|
|
21657
21663
|
/* @__PURE__ */ jsxs129(CardTitle, { className: "text-primary flex flex-col items-center gap-y-8 pb-8 text-4xl", children: [
|
|
21658
21664
|
/* @__PURE__ */ jsx226(Image9, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
@@ -21661,7 +21667,7 @@ function LandingComponent() {
|
|
|
21661
21667
|
/* @__PURE__ */ jsx226(CardDescription, { className: "flex w-full justify-center text-center text-sm", children: t(`common.description`) })
|
|
21662
21668
|
] }),
|
|
21663
21669
|
/* @__PURE__ */ jsxs129(CardFooter, { className: "mt-4 flex w-full flex-col justify-between gap-y-4", children: [
|
|
21664
|
-
isInternalAuthEnabled() && /* @__PURE__ */ jsxs129(
|
|
21670
|
+
isInternalAuthEnabled() && /* @__PURE__ */ jsxs129(Fragment39, { children: [
|
|
21665
21671
|
isRegistrationAllowed() && /* @__PURE__ */ jsx226(
|
|
21666
21672
|
Link,
|
|
21667
21673
|
{
|
|
@@ -21684,14 +21690,14 @@ __name(LandingComponent, "LandingComponent");
|
|
|
21684
21690
|
import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
|
|
21685
21691
|
import { useTranslations as useTranslations100 } from "next-intl";
|
|
21686
21692
|
import Image10 from "next/image";
|
|
21687
|
-
import { useEffect as useEffect62, useState as
|
|
21693
|
+
import { useEffect as useEffect62, useState as useState86 } from "react";
|
|
21688
21694
|
import { useForm as useForm7 } from "react-hook-form";
|
|
21689
21695
|
import { z as z8 } from "zod";
|
|
21690
|
-
import { Fragment as
|
|
21696
|
+
import { Fragment as Fragment40, jsx as jsx227, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
21691
21697
|
function AcceptInvitation() {
|
|
21692
21698
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
21693
|
-
const [showConfirmation, setShowConfirmation] =
|
|
21694
|
-
const [error, setError] =
|
|
21699
|
+
const [showConfirmation, setShowConfirmation] = useState86(false);
|
|
21700
|
+
const [error, setError] = useState86(void 0);
|
|
21695
21701
|
const t = useTranslations100();
|
|
21696
21702
|
useEffect62(() => {
|
|
21697
21703
|
async function validateCode(code) {
|
|
@@ -21750,13 +21756,13 @@ function AcceptInvitation() {
|
|
|
21750
21756
|
errorToast({ title: t(`common.errors.error`), error });
|
|
21751
21757
|
}
|
|
21752
21758
|
}, "onSubmit");
|
|
21753
|
-
return /* @__PURE__ */ jsxs130(
|
|
21759
|
+
return /* @__PURE__ */ jsxs130(Fragment40, { children: [
|
|
21754
21760
|
/* @__PURE__ */ jsxs130(CardHeader, { children: [
|
|
21755
21761
|
/* @__PURE__ */ jsxs130(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
21756
21762
|
/* @__PURE__ */ jsx227(Image10, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
21757
21763
|
t("auth.accept_invitation")
|
|
21758
21764
|
] }),
|
|
21759
|
-
/* @__PURE__ */ jsx227(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx227(
|
|
21765
|
+
/* @__PURE__ */ jsx227(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx227(Fragment40, { children: t("auth.errors.activating_account") }) : /* @__PURE__ */ jsx227(Fragment40, { children: t("auth.select_password") }) })
|
|
21760
21766
|
] }),
|
|
21761
21767
|
/* @__PURE__ */ jsx227(CardContent, { children: showConfirmation ? /* @__PURE__ */ jsx227(CardDescription, { className: "text-center text-xl", children: t("auth.activation_description") }) : error ? /* @__PURE__ */ jsx227(CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ jsx227(Form, { ...form, children: /* @__PURE__ */ jsxs130("form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
21762
21768
|
/* @__PURE__ */ jsx227(
|
|
@@ -21786,12 +21792,12 @@ __name(AcceptInvitation, "AcceptInvitation");
|
|
|
21786
21792
|
// src/features/auth/components/forms/ActivateAccount.tsx
|
|
21787
21793
|
import { useTranslations as useTranslations101 } from "next-intl";
|
|
21788
21794
|
import Image11 from "next/image";
|
|
21789
|
-
import { useEffect as useEffect63, useState as
|
|
21790
|
-
import { Fragment as
|
|
21795
|
+
import { useEffect as useEffect63, useState as useState87 } from "react";
|
|
21796
|
+
import { Fragment as Fragment41, jsx as jsx228, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
21791
21797
|
function ActivateAccount() {
|
|
21792
21798
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
21793
|
-
const [showConfirmation, setShowConfirmation] =
|
|
21794
|
-
const [error, setError] =
|
|
21799
|
+
const [showConfirmation, setShowConfirmation] = useState87(false);
|
|
21800
|
+
const [error, setError] = useState87(void 0);
|
|
21795
21801
|
const t = useTranslations101();
|
|
21796
21802
|
useEffect63(() => {
|
|
21797
21803
|
async function ActivateAccount2(code) {
|
|
@@ -21820,25 +21826,25 @@ function ActivateAccount() {
|
|
|
21820
21826
|
setError(t(`auth.errors.invalid_invitation_code`));
|
|
21821
21827
|
}
|
|
21822
21828
|
}, []);
|
|
21823
|
-
return /* @__PURE__ */ jsxs131(
|
|
21829
|
+
return /* @__PURE__ */ jsxs131(Fragment41, { children: [
|
|
21824
21830
|
/* @__PURE__ */ jsxs131(CardHeader, { children: [
|
|
21825
21831
|
/* @__PURE__ */ jsxs131(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
21826
21832
|
/* @__PURE__ */ jsx228(Image11, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
21827
21833
|
t("auth.accept_invitation")
|
|
21828
21834
|
] }),
|
|
21829
|
-
/* @__PURE__ */ jsx228(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx228(
|
|
21835
|
+
/* @__PURE__ */ jsx228(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx228(Fragment41, { children: t("auth.errors.activating_account") }) : /* @__PURE__ */ jsx228(Fragment41, { children: " " }) })
|
|
21830
21836
|
] }),
|
|
21831
|
-
/* @__PURE__ */ jsx228(CardContent, { children: /* @__PURE__ */ jsx228(CardDescription, { className: "text-center text-xl", children: showConfirmation ? /* @__PURE__ */ jsx228(
|
|
21837
|
+
/* @__PURE__ */ jsx228(CardContent, { children: /* @__PURE__ */ jsx228(CardDescription, { className: "text-center text-xl", children: showConfirmation ? /* @__PURE__ */ jsx228(Fragment41, { children: t("auth.activation_description") }) : error ? /* @__PURE__ */ jsx228(Fragment41, { children: error }) : /* @__PURE__ */ jsx228(Fragment41, { children: t("auth.activation_wait") }) }) })
|
|
21832
21838
|
] });
|
|
21833
21839
|
}
|
|
21834
21840
|
__name(ActivateAccount, "ActivateAccount");
|
|
21835
21841
|
|
|
21836
21842
|
// src/features/auth/components/forms/Cookies.tsx
|
|
21837
|
-
import { useEffect as useEffect64, useState as
|
|
21843
|
+
import { useEffect as useEffect64, useState as useState88 } from "react";
|
|
21838
21844
|
function Cookies({ dehydratedAuth, page }) {
|
|
21839
21845
|
const { setUser } = useCurrentUserContext();
|
|
21840
21846
|
const router = useI18nRouter();
|
|
21841
|
-
const [hasSaved, setHasSaved] =
|
|
21847
|
+
const [hasSaved, setHasSaved] = useState88(false);
|
|
21842
21848
|
useEffect64(() => {
|
|
21843
21849
|
if (hasSaved) return;
|
|
21844
21850
|
async function saveTokenOnServer() {
|
|
@@ -21863,14 +21869,14 @@ __name(Cookies, "Cookies");
|
|
|
21863
21869
|
import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
|
|
21864
21870
|
import { useTranslations as useTranslations102 } from "next-intl";
|
|
21865
21871
|
import Image12 from "next/image";
|
|
21866
|
-
import { useState as
|
|
21872
|
+
import { useState as useState89 } from "react";
|
|
21867
21873
|
import { useForm as useForm8 } from "react-hook-form";
|
|
21868
21874
|
import { z as z9 } from "zod";
|
|
21869
|
-
import { Fragment as
|
|
21875
|
+
import { Fragment as Fragment42, jsx as jsx229, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
21870
21876
|
function ForgotPassword() {
|
|
21871
21877
|
const t = useTranslations102();
|
|
21872
21878
|
const { setComponentType } = useAuthContext();
|
|
21873
|
-
const [showConfirmation, setShowConfirmation] =
|
|
21879
|
+
const [showConfirmation, setShowConfirmation] = useState89(false);
|
|
21874
21880
|
const formSchema = z9.object({
|
|
21875
21881
|
email: z9.string().email({
|
|
21876
21882
|
message: t(`common.errors.invalid_email`)
|
|
@@ -21893,13 +21899,13 @@ function ForgotPassword() {
|
|
|
21893
21899
|
errorToast({ title: t("common.errors.error"), error: e });
|
|
21894
21900
|
}
|
|
21895
21901
|
}, "onSubmit");
|
|
21896
|
-
return /* @__PURE__ */ jsxs132(
|
|
21902
|
+
return /* @__PURE__ */ jsxs132(Fragment42, { children: [
|
|
21897
21903
|
/* @__PURE__ */ jsxs132(CardHeader, { "data-testid": "page-forgot-password-container", children: [
|
|
21898
21904
|
/* @__PURE__ */ jsxs132(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
21899
21905
|
/* @__PURE__ */ jsx229(Image12, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
21900
21906
|
t("auth.buttons.forgot_password")
|
|
21901
21907
|
] }),
|
|
21902
|
-
/* @__PURE__ */ jsx229(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx229(
|
|
21908
|
+
/* @__PURE__ */ jsx229(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx229(Fragment42, { children: " " }) : /* @__PURE__ */ jsx229(Fragment42, { children: t(`auth.add_email_to_reset`) }) })
|
|
21903
21909
|
] }),
|
|
21904
21910
|
showConfirmation ? /* @__PURE__ */ jsx229(CardContent, { children: /* @__PURE__ */ jsx229(CardDescription, { className: "text-center text-xl", children: t(`auth.reset_confirmation`) }) }) : /* @__PURE__ */ jsx229(Form, { ...form, children: /* @__PURE__ */ jsxs132("form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
21905
21911
|
/* @__PURE__ */ jsxs132(CardContent, { children: [
|
|
@@ -21935,10 +21941,10 @@ import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
|
|
|
21935
21941
|
import { useTranslations as useTranslations103 } from "next-intl";
|
|
21936
21942
|
import Image13 from "next/image";
|
|
21937
21943
|
import { useRouter, useSearchParams as useSearchParams3 } from "next/navigation";
|
|
21938
|
-
import { useEffect as useEffect65, useState as
|
|
21944
|
+
import { useEffect as useEffect65, useState as useState90 } from "react";
|
|
21939
21945
|
import { useForm as useForm9 } from "react-hook-form";
|
|
21940
21946
|
import { z as z10 } from "zod";
|
|
21941
|
-
import { Fragment as
|
|
21947
|
+
import { Fragment as Fragment43, jsx as jsx230, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
21942
21948
|
function Login() {
|
|
21943
21949
|
const t = useTranslations103();
|
|
21944
21950
|
const { setUser } = useCurrentUserContext();
|
|
@@ -21948,7 +21954,7 @@ function Login() {
|
|
|
21948
21954
|
const nativeRouter = useRouter();
|
|
21949
21955
|
const searchParams = useSearchParams3();
|
|
21950
21956
|
const callbackUrl = searchParams.get("callbackUrl");
|
|
21951
|
-
const [referralCode, setReferralCode2] =
|
|
21957
|
+
const [referralCode, setReferralCode2] = useState90(null);
|
|
21952
21958
|
useEffect65(() => {
|
|
21953
21959
|
const cookies = document.cookie.split("; ");
|
|
21954
21960
|
for (const cookie of cookies) {
|
|
@@ -22004,7 +22010,7 @@ function Login() {
|
|
|
22004
22010
|
});
|
|
22005
22011
|
}
|
|
22006
22012
|
}, "onSubmit");
|
|
22007
|
-
return /* @__PURE__ */ jsxs133(
|
|
22013
|
+
return /* @__PURE__ */ jsxs133(Fragment43, { children: [
|
|
22008
22014
|
/* @__PURE__ */ jsxs133(CardHeader, { "data-testid": "page-login-container", children: [
|
|
22009
22015
|
/* @__PURE__ */ jsxs133(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
22010
22016
|
/* @__PURE__ */ jsx230(Image13, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
@@ -22013,7 +22019,7 @@ function Login() {
|
|
|
22013
22019
|
/* @__PURE__ */ jsx230(CardDescription, { className: "text-sm", children: t(`auth.login_description`) })
|
|
22014
22020
|
] }),
|
|
22015
22021
|
/* @__PURE__ */ jsx230(Form, { ...form, children: /* @__PURE__ */ jsxs133("form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
22016
|
-
/* @__PURE__ */ jsx230(CardContent, { children: isInternalAuthEnabled() && /* @__PURE__ */ jsxs133(
|
|
22022
|
+
/* @__PURE__ */ jsx230(CardContent, { children: isInternalAuthEnabled() && /* @__PURE__ */ jsxs133(Fragment43, { children: [
|
|
22017
22023
|
/* @__PURE__ */ jsx230(
|
|
22018
22024
|
FormInput,
|
|
22019
22025
|
{
|
|
@@ -22080,7 +22086,7 @@ function clearClientStorage(keys) {
|
|
|
22080
22086
|
__name(clearClientStorage, "clearClientStorage");
|
|
22081
22087
|
|
|
22082
22088
|
// src/features/auth/components/forms/Logout.tsx
|
|
22083
|
-
import { Fragment as
|
|
22089
|
+
import { Fragment as Fragment44, jsx as jsx231 } from "react/jsx-runtime";
|
|
22084
22090
|
function Logout({ storageKeys, beforeLogout }) {
|
|
22085
22091
|
const generateUrl = usePageUrlGenerator();
|
|
22086
22092
|
useEffect66(() => {
|
|
@@ -22092,7 +22098,7 @@ function Logout({ storageKeys, beforeLogout }) {
|
|
|
22092
22098
|
}, "logOut");
|
|
22093
22099
|
logOut();
|
|
22094
22100
|
}, []);
|
|
22095
|
-
return /* @__PURE__ */ jsx231(
|
|
22101
|
+
return /* @__PURE__ */ jsx231(Fragment44, {});
|
|
22096
22102
|
}
|
|
22097
22103
|
__name(Logout, "Logout");
|
|
22098
22104
|
|
|
@@ -22130,14 +22136,14 @@ __name(RefreshUser, "RefreshUser");
|
|
|
22130
22136
|
import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
|
|
22131
22137
|
import { useTranslations as useTranslations104 } from "next-intl";
|
|
22132
22138
|
import Image14 from "next/image";
|
|
22133
|
-
import { useEffect as useEffect68, useState as
|
|
22139
|
+
import { useEffect as useEffect68, useState as useState91 } from "react";
|
|
22134
22140
|
import { useForm as useForm10 } from "react-hook-form";
|
|
22135
22141
|
import { z as z11 } from "zod";
|
|
22136
|
-
import { Fragment as
|
|
22142
|
+
import { Fragment as Fragment45, jsx as jsx232, jsxs as jsxs134 } from "react/jsx-runtime";
|
|
22137
22143
|
function ResetPassword() {
|
|
22138
22144
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
22139
|
-
const [showConfirmation, setShowConfirmation] =
|
|
22140
|
-
const [error, setError] =
|
|
22145
|
+
const [showConfirmation, setShowConfirmation] = useState91(false);
|
|
22146
|
+
const [error, setError] = useState91(void 0);
|
|
22141
22147
|
const t = useTranslations104();
|
|
22142
22148
|
useEffect68(() => {
|
|
22143
22149
|
async function validateResetPasswordCode(code) {
|
|
@@ -22196,13 +22202,13 @@ function ResetPassword() {
|
|
|
22196
22202
|
errorToast({ title: t(`common.errors.error`), error });
|
|
22197
22203
|
}
|
|
22198
22204
|
}, "onSubmit");
|
|
22199
|
-
return /* @__PURE__ */ jsxs134(
|
|
22205
|
+
return /* @__PURE__ */ jsxs134(Fragment45, { children: [
|
|
22200
22206
|
/* @__PURE__ */ jsxs134(CardHeader, { children: [
|
|
22201
22207
|
/* @__PURE__ */ jsxs134(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
22202
22208
|
/* @__PURE__ */ jsx232(Image14, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
22203
22209
|
t(`auth.password_reset`)
|
|
22204
22210
|
] }),
|
|
22205
|
-
/* @__PURE__ */ jsx232(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx232(
|
|
22211
|
+
/* @__PURE__ */ jsx232(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx232(Fragment45, { children: t(`auth.errors.password_reset_error`) }) : /* @__PURE__ */ jsx232(Fragment45, { children: t(`auth.reset_password`) }) })
|
|
22206
22212
|
] }),
|
|
22207
22213
|
/* @__PURE__ */ jsx232(CardContent, { children: showConfirmation ? /* @__PURE__ */ jsx232(CardDescription, { className: "text-center text-xl", children: t(`auth.reset_success_description`) }) : error ? /* @__PURE__ */ jsx232(CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ jsx232(Form, { ...form, children: /* @__PURE__ */ jsxs134("form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
22208
22214
|
/* @__PURE__ */ jsx232(FormPassword, { form, id: "password", name: t(`user.fields.password.label`) }),
|
|
@@ -22216,18 +22222,18 @@ __name(ResetPassword, "ResetPassword");
|
|
|
22216
22222
|
// src/features/auth/components/forms/TwoFactorChallenge.tsx
|
|
22217
22223
|
import { useTranslations as useTranslations106 } from "next-intl";
|
|
22218
22224
|
import { useRouter as useRouter2, useSearchParams as useSearchParams4 } from "next/navigation";
|
|
22219
|
-
import { useState as
|
|
22225
|
+
import { useState as useState93 } from "react";
|
|
22220
22226
|
import { v4 as v411 } from "uuid";
|
|
22221
22227
|
|
|
22222
22228
|
// src/features/auth/components/two-factor/PasskeyButton.tsx
|
|
22223
22229
|
import { startAuthentication } from "@simplewebauthn/browser";
|
|
22224
22230
|
import { useTranslations as useTranslations105 } from "next-intl";
|
|
22225
|
-
import { useState as
|
|
22231
|
+
import { useState as useState92 } from "react";
|
|
22226
22232
|
import { v4 as v410 } from "uuid";
|
|
22227
22233
|
import { jsx as jsx233 } from "react/jsx-runtime";
|
|
22228
22234
|
function PasskeyButton({ pendingToken, onSuccess, onError, disabled = false }) {
|
|
22229
22235
|
const t = useTranslations105();
|
|
22230
|
-
const [isLoading, setIsLoading] =
|
|
22236
|
+
const [isLoading, setIsLoading] = useState92(false);
|
|
22231
22237
|
const handleClick = /* @__PURE__ */ __name(async () => {
|
|
22232
22238
|
setIsLoading(true);
|
|
22233
22239
|
try {
|
|
@@ -22262,7 +22268,7 @@ function PasskeyButton({ pendingToken, onSuccess, onError, disabled = false }) {
|
|
|
22262
22268
|
__name(PasskeyButton, "PasskeyButton");
|
|
22263
22269
|
|
|
22264
22270
|
// src/features/auth/components/forms/TwoFactorChallenge.tsx
|
|
22265
|
-
import { Fragment as
|
|
22271
|
+
import { Fragment as Fragment46, jsx as jsx234, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
22266
22272
|
function TwoFactorChallenge() {
|
|
22267
22273
|
const t = useTranslations106();
|
|
22268
22274
|
const { setUser } = useCurrentUserContext();
|
|
@@ -22272,10 +22278,10 @@ function TwoFactorChallenge() {
|
|
|
22272
22278
|
const nativeRouter = useRouter2();
|
|
22273
22279
|
const searchParams = useSearchParams4();
|
|
22274
22280
|
const callbackUrl = searchParams.get("callbackUrl");
|
|
22275
|
-
const [isVerifying, setIsVerifying] =
|
|
22276
|
-
const [totpError, setTotpError] =
|
|
22277
|
-
const [backupCode, setBackupCode] =
|
|
22278
|
-
const [backupError, setBackupError] =
|
|
22281
|
+
const [isVerifying, setIsVerifying] = useState93(false);
|
|
22282
|
+
const [totpError, setTotpError] = useState93();
|
|
22283
|
+
const [backupCode, setBackupCode] = useState93("");
|
|
22284
|
+
const [backupError, setBackupError] = useState93();
|
|
22279
22285
|
if (!pendingTwoFactor) {
|
|
22280
22286
|
return null;
|
|
22281
22287
|
}
|
|
@@ -22343,7 +22349,7 @@ function TwoFactorChallenge() {
|
|
|
22343
22349
|
const hasTotp = availableMethods.includes("totp");
|
|
22344
22350
|
const hasPasskey = availableMethods.includes("passkey");
|
|
22345
22351
|
const hasBackup = availableMethods.includes("backup");
|
|
22346
|
-
return /* @__PURE__ */ jsxs135(
|
|
22352
|
+
return /* @__PURE__ */ jsxs135(Fragment46, { children: [
|
|
22347
22353
|
/* @__PURE__ */ jsxs135(CardHeader, { "data-testid": "page-2fa-challenge", children: [
|
|
22348
22354
|
/* @__PURE__ */ jsx234(CardTitle, { className: "text-primary", children: t("auth.two_factor.verification_required") }),
|
|
22349
22355
|
/* @__PURE__ */ jsx234(CardDescription, { children: t("auth.two_factor.enter_verification_code") })
|
|
@@ -22582,7 +22588,7 @@ var AI_CONNECTIONS_I18N_KEYS = [
|
|
|
22582
22588
|
|
|
22583
22589
|
// src/features/ai-connection/contexts/AiConnectionsContext.tsx
|
|
22584
22590
|
import { useTranslations as useTranslations108 } from "next-intl";
|
|
22585
|
-
import { createContext as createContext30, useCallback as useCallback42, useContext as useContext30, useEffect as useEffect69, useMemo as useMemo41, useState as
|
|
22591
|
+
import { createContext as createContext30, useCallback as useCallback42, useContext as useContext30, useEffect as useEffect69, useMemo as useMemo41, useState as useState94 } from "react";
|
|
22586
22592
|
import { jsx as jsx236 } from "react/jsx-runtime";
|
|
22587
22593
|
var defaultContextValue4 = {
|
|
22588
22594
|
connections: [],
|
|
@@ -22598,11 +22604,11 @@ var defaultContextValue4 = {
|
|
|
22598
22604
|
var AiConnectionsContext = createContext30(void 0);
|
|
22599
22605
|
var AiConnectionsProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
22600
22606
|
const t = useTranslations108();
|
|
22601
|
-
const [connections, setConnections] =
|
|
22602
|
-
const [providerRegistry, setProviderRegistry] =
|
|
22603
|
-
const [envDefaults, setEnvDefaults] =
|
|
22604
|
-
const [scopeCompanyId, setScopeCompanyId] =
|
|
22605
|
-
const [isLoading, setIsLoading] =
|
|
22607
|
+
const [connections, setConnections] = useState94([]);
|
|
22608
|
+
const [providerRegistry, setProviderRegistry] = useState94({});
|
|
22609
|
+
const [envDefaults, setEnvDefaults] = useState94({});
|
|
22610
|
+
const [scopeCompanyId, setScopeCompanyId] = useState94(null);
|
|
22611
|
+
const [isLoading, setIsLoading] = useState94(true);
|
|
22606
22612
|
const refresh = useCallback42(async () => {
|
|
22607
22613
|
setIsLoading(true);
|
|
22608
22614
|
try {
|
|
@@ -22636,7 +22642,7 @@ var useAiConnections = /* @__PURE__ */ __name(() => useContext30(AiConnectionsCo
|
|
|
22636
22642
|
|
|
22637
22643
|
// src/features/ai-connection/components/containers/AiConnectionsContainer.tsx
|
|
22638
22644
|
import { useTranslations as useTranslations112 } from "next-intl";
|
|
22639
|
-
import { useEffect as useEffect71, useMemo as useMemo44, useState as
|
|
22645
|
+
import { useEffect as useEffect71, useMemo as useMemo44, useState as useState96 } from "react";
|
|
22640
22646
|
|
|
22641
22647
|
// src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx
|
|
22642
22648
|
import { ChevronDownIcon as ChevronDownIcon10, ChevronUpIcon as ChevronUpIcon3, PlusIcon as PlusIcon2 } from "lucide-react";
|
|
@@ -22646,13 +22652,13 @@ import { useMemo as useMemo43 } from "react";
|
|
|
22646
22652
|
// src/features/ai-connection/components/forms/AiConnectionDeleter.tsx
|
|
22647
22653
|
import { TrashIcon } from "lucide-react";
|
|
22648
22654
|
import { useTranslations as useTranslations109 } from "next-intl";
|
|
22649
|
-
import { useState as
|
|
22650
|
-
import { Fragment as
|
|
22655
|
+
import { useState as useState95 } from "react";
|
|
22656
|
+
import { Fragment as Fragment47, jsx as jsx237, jsxs as jsxs137 } from "react/jsx-runtime";
|
|
22651
22657
|
function AiConnectionDeleter({ connection }) {
|
|
22652
22658
|
const t = useTranslations109();
|
|
22653
22659
|
const { refresh } = useAiConnections();
|
|
22654
|
-
const [open, setOpen] =
|
|
22655
|
-
return /* @__PURE__ */ jsxs137(
|
|
22660
|
+
const [open, setOpen] = useState95(false);
|
|
22661
|
+
return /* @__PURE__ */ jsxs137(Fragment47, { children: [
|
|
22656
22662
|
/* @__PURE__ */ jsx237(
|
|
22657
22663
|
Button,
|
|
22658
22664
|
{
|
|
@@ -22932,7 +22938,7 @@ function AiConnectionEditor({
|
|
|
22932
22938
|
__name(AiConnectionEditor, "AiConnectionEditor");
|
|
22933
22939
|
|
|
22934
22940
|
// src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx
|
|
22935
|
-
import { Fragment as
|
|
22941
|
+
import { Fragment as Fragment48, jsx as jsx239, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
22936
22942
|
function toInput(connection, overrides) {
|
|
22937
22943
|
return {
|
|
22938
22944
|
id: connection.id,
|
|
@@ -23055,7 +23061,7 @@ function AiConnectionTypeCard({ connectionType }) {
|
|
|
23055
23061
|
children: /* @__PURE__ */ jsx239(ChevronDownIcon10, {})
|
|
23056
23062
|
}
|
|
23057
23063
|
),
|
|
23058
|
-
!readOnly && /* @__PURE__ */ jsxs139(
|
|
23064
|
+
!readOnly && /* @__PURE__ */ jsxs139(Fragment48, { children: [
|
|
23059
23065
|
/* @__PURE__ */ jsx239(
|
|
23060
23066
|
AiConnectionEditor,
|
|
23061
23067
|
{
|
|
@@ -23130,7 +23136,7 @@ __name(AiConnectionsContainer, "AiConnectionsContainer");
|
|
|
23130
23136
|
function AiConnectionsBody() {
|
|
23131
23137
|
const t = useTranslations112();
|
|
23132
23138
|
const { scopeCompanyId, setScopeCompanyId } = useAiConnections();
|
|
23133
|
-
const [companies, setCompanies] =
|
|
23139
|
+
const [companies, setCompanies] = useState96([]);
|
|
23134
23140
|
useEffect71(() => {
|
|
23135
23141
|
let active = true;
|
|
23136
23142
|
CompanyService.findMany({}).then((response) => {
|
|
@@ -23173,7 +23179,7 @@ __name(AiConnectionsBody, "AiConnectionsBody");
|
|
|
23173
23179
|
// src/features/billing/components/widgets/CreditWarningBanner.tsx
|
|
23174
23180
|
import { XIcon as XIcon12 } from "lucide-react";
|
|
23175
23181
|
import { useTranslations as useTranslations113 } from "next-intl";
|
|
23176
|
-
import { useState as
|
|
23182
|
+
import { useState as useState97 } from "react";
|
|
23177
23183
|
import { jsx as jsx241, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
23178
23184
|
function CreditWarningBanner({
|
|
23179
23185
|
canManageBilling,
|
|
@@ -23183,7 +23189,7 @@ function CreditWarningBanner({
|
|
|
23183
23189
|
}) {
|
|
23184
23190
|
const t = useTranslations113();
|
|
23185
23191
|
const { company, refreshUser } = useCurrentUserContext();
|
|
23186
|
-
const [dismissing, setDismissing] =
|
|
23192
|
+
const [dismissing, setDismissing] = useState97(false);
|
|
23187
23193
|
if (!company || !canManageBilling || !isCreditWarningActive(company, thresholdPercent)) return null;
|
|
23188
23194
|
const offer = company.creditWarningOffer;
|
|
23189
23195
|
const handleDismiss = /* @__PURE__ */ __name(async () => {
|
|
@@ -23403,7 +23409,7 @@ import { useCallback as useCallback44, useMemo as useMemo46 } from "react";
|
|
|
23403
23409
|
import { useForm as useForm12 } from "react-hook-form";
|
|
23404
23410
|
import { v4 as v413 } from "uuid";
|
|
23405
23411
|
import { z as z13 } from "zod";
|
|
23406
|
-
import { Fragment as
|
|
23412
|
+
import { Fragment as Fragment49, jsx as jsx246, jsxs as jsxs143 } from "react/jsx-runtime";
|
|
23407
23413
|
var TEMPLATE_VARIABLES = ["{{name}}", "{{email}}", "{{url}}"];
|
|
23408
23414
|
var MARKETING_ONLY_VARIABLES = ["{{unsubscribeAllUrl}}"];
|
|
23409
23415
|
function EmailBlastEditorInternal({
|
|
@@ -23507,7 +23513,7 @@ function EmailBlastEditorInternal({
|
|
|
23507
23513
|
name: t("emailBlasts.editor.fields.body.label"),
|
|
23508
23514
|
className: "min-h-72",
|
|
23509
23515
|
isRequired: true,
|
|
23510
|
-
description: /* @__PURE__ */ jsxs143(
|
|
23516
|
+
description: /* @__PURE__ */ jsxs143(Fragment49, { children: [
|
|
23511
23517
|
/* @__PURE__ */ jsxs143("span", { className: "block", children: [
|
|
23512
23518
|
t("emailBlasts.editor.variablesHint"),
|
|
23513
23519
|
" ",
|
|
@@ -23573,18 +23579,18 @@ __name(EmailBlastsListContainer, "EmailBlastsListContainer");
|
|
|
23573
23579
|
// src/features/email-blast/components/containers/EmailBlastContainer.tsx
|
|
23574
23580
|
import { LoaderCircleIcon as LoaderCircleIcon5, MailCheckIcon } from "lucide-react";
|
|
23575
23581
|
import { useTranslations as useTranslations122 } from "next-intl";
|
|
23576
|
-
import { useCallback as useCallback45, useEffect as useEffect73, useState as
|
|
23582
|
+
import { useCallback as useCallback45, useEffect as useEffect73, useState as useState99 } from "react";
|
|
23577
23583
|
|
|
23578
23584
|
// src/features/email-blast/components/forms/EmailBlastSendDialog.tsx
|
|
23579
23585
|
import { LoaderCircleIcon as LoaderCircleIcon4, SendIcon as SendIcon2 } from "lucide-react";
|
|
23580
23586
|
import { useTranslations as useTranslations121 } from "next-intl";
|
|
23581
|
-
import { useEffect as useEffect72, useState as
|
|
23582
|
-
import { Fragment as
|
|
23587
|
+
import { useEffect as useEffect72, useState as useState98 } from "react";
|
|
23588
|
+
import { Fragment as Fragment50, jsx as jsx249, jsxs as jsxs144 } from "react/jsx-runtime";
|
|
23583
23589
|
function EmailBlastSendDialog({ blast, onSuccess }) {
|
|
23584
23590
|
const t = useTranslations121();
|
|
23585
|
-
const [open, setOpen] =
|
|
23586
|
-
const [count, setCount] =
|
|
23587
|
-
const [isSending, setIsSending] =
|
|
23591
|
+
const [open, setOpen] = useState98(false);
|
|
23592
|
+
const [count, setCount] = useState98(void 0);
|
|
23593
|
+
const [isSending, setIsSending] = useState98(false);
|
|
23588
23594
|
useEffect72(() => {
|
|
23589
23595
|
if (!open) return;
|
|
23590
23596
|
let cancelled = false;
|
|
@@ -23624,7 +23630,7 @@ function EmailBlastSendDialog({ blast, onSuccess }) {
|
|
|
23624
23630
|
] }),
|
|
23625
23631
|
/* @__PURE__ */ jsxs144("div", { className: "flex justify-end", children: [
|
|
23626
23632
|
/* @__PURE__ */ jsx249(Button, { className: "me-2", variant: "outline", type: "button", onClick: () => setOpen(false), disabled: isSending, children: t("emailBlasts.send.cancel") }),
|
|
23627
|
-
/* @__PURE__ */ jsx249(Button, { type: "button", variant: "default", onClick: handleSend, disabled: !canSend, children: isSending ? /* @__PURE__ */ jsxs144(
|
|
23633
|
+
/* @__PURE__ */ jsx249(Button, { type: "button", variant: "default", onClick: handleSend, disabled: !canSend, children: isSending ? /* @__PURE__ */ jsxs144(Fragment50, { children: [
|
|
23628
23634
|
t("emailBlasts.send.action"),
|
|
23629
23635
|
/* @__PURE__ */ jsx249(LoaderCircleIcon4, { className: "animate-spin-slow h-5 w-5" })
|
|
23630
23636
|
] }) : t("emailBlasts.send.action") })
|
|
@@ -23643,7 +23649,7 @@ var STATUS_VARIANTS2 = {
|
|
|
23643
23649
|
};
|
|
23644
23650
|
function EmailBlastSendTestButton({ blast }) {
|
|
23645
23651
|
const t = useTranslations122();
|
|
23646
|
-
const [isSending, setIsSending] =
|
|
23652
|
+
const [isSending, setIsSending] = useState99(false);
|
|
23647
23653
|
const handleClick = /* @__PURE__ */ __name(async () => {
|
|
23648
23654
|
setIsSending(true);
|
|
23649
23655
|
try {
|
|
@@ -23665,7 +23671,7 @@ function EmailBlastContainer({ blastId }) {
|
|
|
23665
23671
|
const t = useTranslations122();
|
|
23666
23672
|
const dates = useDateFormatter();
|
|
23667
23673
|
const generateUrl = usePageUrlGenerator();
|
|
23668
|
-
const [blast, setBlast] =
|
|
23674
|
+
const [blast, setBlast] = useState99(void 0);
|
|
23669
23675
|
const reload = useCallback45(async () => {
|
|
23670
23676
|
setBlast(await EmailBlastService.findOne({ id: blastId }));
|
|
23671
23677
|
}, [blastId]);
|
|
@@ -23760,7 +23766,7 @@ __name(EmailBlastContainer, "EmailBlastContainer");
|
|
|
23760
23766
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
23761
23767
|
import { ArrowRight, LifeBuoyIcon } from "lucide-react";
|
|
23762
23768
|
import { useTranslations as useTranslations124 } from "next-intl";
|
|
23763
|
-
import { useCallback as useCallback46, useEffect as useEffect74, useMemo as useMemo48, useRef as useRef41, useState as
|
|
23769
|
+
import { useCallback as useCallback46, useEffect as useEffect74, useMemo as useMemo48, useRef as useRef41, useState as useState100 } from "react";
|
|
23764
23770
|
|
|
23765
23771
|
// src/features/how-to/components/containers/HowToCommandViewer.tsx
|
|
23766
23772
|
import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
|
|
@@ -23873,7 +23879,7 @@ function HowToCommandViewer({ howTo, onBack, onStartChat }) {
|
|
|
23873
23879
|
__name(HowToCommandViewer, "HowToCommandViewer");
|
|
23874
23880
|
|
|
23875
23881
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
23876
|
-
import { Fragment as
|
|
23882
|
+
import { Fragment as Fragment51, jsx as jsx252, jsxs as jsxs147 } from "react/jsx-runtime";
|
|
23877
23883
|
function matchPage(pathname, pattern) {
|
|
23878
23884
|
if (pattern.includes(":")) {
|
|
23879
23885
|
const pathSegments = pathname.split("/").filter(Boolean);
|
|
@@ -23886,10 +23892,10 @@ function matchPage(pathname, pattern) {
|
|
|
23886
23892
|
__name(matchPage, "matchPage");
|
|
23887
23893
|
function HowToCommand({ pathname, contextKeys, extraGroups, onStartChat }) {
|
|
23888
23894
|
const t = useTranslations124();
|
|
23889
|
-
const [dialogOpen, setDialogOpen] =
|
|
23890
|
-
const [selectedHowTo, setSelectedHowTo] =
|
|
23895
|
+
const [dialogOpen, setDialogOpen] = useState100(false);
|
|
23896
|
+
const [selectedHowTo, setSelectedHowTo] = useState100(null);
|
|
23891
23897
|
const searchTermRef = useRef41("");
|
|
23892
|
-
const [searchTerm, setSearchTerm] =
|
|
23898
|
+
const [searchTerm, setSearchTerm] = useState100("");
|
|
23893
23899
|
const data = useDataListRetriever({
|
|
23894
23900
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
23895
23901
|
return HowToService.findMany(params);
|
|
@@ -23944,7 +23950,7 @@ function HowToCommand({ pathname, contextKeys, extraGroups, onStartChat }) {
|
|
|
23944
23950
|
setSelectedHowTo(null);
|
|
23945
23951
|
if (onStartChat) onStartChat();
|
|
23946
23952
|
}, "handleStartChat");
|
|
23947
|
-
return /* @__PURE__ */ jsxs147(
|
|
23953
|
+
return /* @__PURE__ */ jsxs147(Fragment51, { children: [
|
|
23948
23954
|
/* @__PURE__ */ jsxs147(
|
|
23949
23955
|
SidebarMenuButton,
|
|
23950
23956
|
{
|
|
@@ -24112,7 +24118,7 @@ import { useTranslations as useTranslations128 } from "next-intl";
|
|
|
24112
24118
|
// src/features/how-to/hooks/useHowToTableStructure.tsx
|
|
24113
24119
|
import { useTranslations as useTranslations126 } from "next-intl";
|
|
24114
24120
|
import { useMemo as useMemo49 } from "react";
|
|
24115
|
-
import { Fragment as
|
|
24121
|
+
import { Fragment as Fragment52, jsx as jsx256 } from "react/jsx-runtime";
|
|
24116
24122
|
var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
|
|
24117
24123
|
const t = useTranslations126();
|
|
24118
24124
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -24149,7 +24155,7 @@ var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
24149
24155
|
id: "description",
|
|
24150
24156
|
accessorKey: "description",
|
|
24151
24157
|
header: t(`howto.fields.description.label`),
|
|
24152
|
-
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx256(
|
|
24158
|
+
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx256(Fragment52, { children: row.getValue("description") }), "cell"),
|
|
24153
24159
|
enableSorting: false,
|
|
24154
24160
|
enableHiding: false
|
|
24155
24161
|
}),
|
|
@@ -24157,7 +24163,7 @@ var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
24157
24163
|
id: "pages",
|
|
24158
24164
|
accessorKey: "pages",
|
|
24159
24165
|
header: t(`howto.fields.pages.label`),
|
|
24160
|
-
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx256(
|
|
24166
|
+
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx256(Fragment52, { children: row.getValue("pages") }), "cell"),
|
|
24161
24167
|
enableSorting: false,
|
|
24162
24168
|
enableHiding: false
|
|
24163
24169
|
}),
|
|
@@ -24179,11 +24185,11 @@ registerTableGenerator("howtos", useHowToTableStructure);
|
|
|
24179
24185
|
|
|
24180
24186
|
// src/features/how-to/components/forms/HowToReindexButton.tsx
|
|
24181
24187
|
import { useTranslations as useTranslations127 } from "next-intl";
|
|
24182
|
-
import { useState as
|
|
24188
|
+
import { useState as useState101 } from "react";
|
|
24183
24189
|
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
24184
24190
|
function HowToReindexButton({ refresh }) {
|
|
24185
24191
|
const t = useTranslations127();
|
|
24186
|
-
const [isReindexing, setIsReindexing] =
|
|
24192
|
+
const [isReindexing, setIsReindexing] = useState101(false);
|
|
24187
24193
|
const onReindex = /* @__PURE__ */ __name(async () => {
|
|
24188
24194
|
setIsReindexing(true);
|
|
24189
24195
|
try {
|
|
@@ -24242,8 +24248,8 @@ __name(HowToListContainer, "HowToListContainer");
|
|
|
24242
24248
|
// src/features/how-to/components/forms/HowToSelector.tsx
|
|
24243
24249
|
import { CircleX as CircleX3, RefreshCwIcon as RefreshCwIcon5, SearchIcon as SearchIcon7, XIcon as XIcon13 } from "lucide-react";
|
|
24244
24250
|
import { useTranslations as useTranslations129 } from "next-intl";
|
|
24245
|
-
import { useCallback as useCallback47, useEffect as useEffect75, useRef as useRef42, useState as
|
|
24246
|
-
import { Fragment as
|
|
24251
|
+
import { useCallback as useCallback47, useEffect as useEffect75, useRef as useRef42, useState as useState102 } from "react";
|
|
24252
|
+
import { Fragment as Fragment53, jsx as jsx260, jsxs as jsxs149 } from "react/jsx-runtime";
|
|
24247
24253
|
function HowToSelector({
|
|
24248
24254
|
id,
|
|
24249
24255
|
form,
|
|
@@ -24253,10 +24259,10 @@ function HowToSelector({
|
|
|
24253
24259
|
isRequired = false
|
|
24254
24260
|
}) {
|
|
24255
24261
|
const t = useTranslations129();
|
|
24256
|
-
const [open, setOpen] =
|
|
24262
|
+
const [open, setOpen] = useState102(false);
|
|
24257
24263
|
const searchTermRef = useRef42("");
|
|
24258
|
-
const [searchTerm, setSearchTerm] =
|
|
24259
|
-
const [isSearching, setIsSearching] =
|
|
24264
|
+
const [searchTerm, setSearchTerm] = useState102("");
|
|
24265
|
+
const [isSearching, setIsSearching] = useState102(false);
|
|
24260
24266
|
const data = useDataListRetriever({
|
|
24261
24267
|
retriever: /* @__PURE__ */ __name((params) => {
|
|
24262
24268
|
return HowToService.findMany(params);
|
|
@@ -24328,7 +24334,7 @@ function HowToSelector({
|
|
|
24328
24334
|
search("");
|
|
24329
24335
|
}
|
|
24330
24336
|
}
|
|
24331
|
-
) : /* @__PURE__ */ jsx260(
|
|
24337
|
+
) : /* @__PURE__ */ jsx260(Fragment53, {})
|
|
24332
24338
|
] }),
|
|
24333
24339
|
/* @__PURE__ */ jsx260(CommandList, { children: data.data && data.data.length > 0 && data.data.map((howTo) => /* @__PURE__ */ jsx260(
|
|
24334
24340
|
CommandItem,
|
|
@@ -24347,7 +24353,7 @@ __name(HowToSelector, "HowToSelector");
|
|
|
24347
24353
|
|
|
24348
24354
|
// src/features/handbook/components/lists/HandbookContents.tsx
|
|
24349
24355
|
import { useTranslations as useTranslations145 } from "next-intl";
|
|
24350
|
-
import { useCallback as useCallback51, useEffect as useEffect79, useMemo as useMemo55, useState as
|
|
24356
|
+
import { useCallback as useCallback51, useEffect as useEffect79, useMemo as useMemo55, useState as useState110 } from "react";
|
|
24351
24357
|
|
|
24352
24358
|
// src/features/handbook/contexts/HandbookContext.tsx
|
|
24353
24359
|
import { useTranslations as useTranslations130 } from "next-intl";
|
|
@@ -24402,10 +24408,10 @@ var HandbookProvider = /* @__PURE__ */ __name(({ children, page, section, functi
|
|
|
24402
24408
|
import { MessagesSquareIcon, Sparkles as Sparkles2 } from "lucide-react";
|
|
24403
24409
|
import { useTranslations as useTranslations142 } from "next-intl";
|
|
24404
24410
|
import Link5 from "next/link";
|
|
24405
|
-
import { useCallback as useCallback50, useState as
|
|
24411
|
+
import { useCallback as useCallback50, useState as useState108 } from "react";
|
|
24406
24412
|
|
|
24407
24413
|
// src/features/assistant/components/parts/AssistantComposer.tsx
|
|
24408
|
-
import { useState as
|
|
24414
|
+
import { useState as useState103 } from "react";
|
|
24409
24415
|
import { useTranslations as useTranslations131 } from "next-intl";
|
|
24410
24416
|
import { ArrowUp } from "lucide-react";
|
|
24411
24417
|
import { jsx as jsx262, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
@@ -24419,7 +24425,7 @@ function AssistantComposer({
|
|
|
24419
24425
|
leading
|
|
24420
24426
|
}) {
|
|
24421
24427
|
const t = useTranslations131();
|
|
24422
|
-
const [internal, setInternal] =
|
|
24428
|
+
const [internal, setInternal] = useState103("");
|
|
24423
24429
|
const value = controlled ?? internal;
|
|
24424
24430
|
const setValue = onValueChange ?? setInternal;
|
|
24425
24431
|
const canSend = value.trim().length > 0 && !disabled;
|
|
@@ -24479,10 +24485,10 @@ import ReactMarkdown3, { defaultUrlTransform } from "react-markdown";
|
|
|
24479
24485
|
import remarkGfm3 from "remark-gfm";
|
|
24480
24486
|
|
|
24481
24487
|
// src/features/assistant-message/components/parts/MessageSourcesContainer.tsx
|
|
24482
|
-
import { useEffect as useEffect76, useMemo as useMemo51, useState as
|
|
24488
|
+
import { useEffect as useEffect76, useMemo as useMemo51, useState as useState106 } from "react";
|
|
24483
24489
|
|
|
24484
24490
|
// src/features/assistant-message/components/parts/MessageSourcesPanel.tsx
|
|
24485
|
-
import { useMemo as useMemo50, useState as
|
|
24491
|
+
import { useMemo as useMemo50, useState as useState105 } from "react";
|
|
24486
24492
|
import { useTranslations as useTranslations138 } from "next-intl";
|
|
24487
24493
|
import { ChevronDown as ChevronDown4, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
24488
24494
|
|
|
@@ -24541,7 +24547,7 @@ function ReferencesTab({ references }) {
|
|
|
24541
24547
|
__name(ReferencesTab, "ReferencesTab");
|
|
24542
24548
|
|
|
24543
24549
|
// src/features/assistant-message/components/parts/tabs/CitationsTab.tsx
|
|
24544
|
-
import { Fragment as
|
|
24550
|
+
import { Fragment as Fragment54, useState as useState104 } from "react";
|
|
24545
24551
|
import { useTranslations as useTranslations135 } from "next-intl";
|
|
24546
24552
|
import { ChevronDown as ChevronDown3, HelpCircle } from "lucide-react";
|
|
24547
24553
|
import ReactMarkdown2 from "react-markdown";
|
|
@@ -24584,7 +24590,7 @@ function CitationsTab({ citations, sources }) {
|
|
|
24584
24590
|
const t = useTranslations135();
|
|
24585
24591
|
const entityLabel = useEntityLabel();
|
|
24586
24592
|
const isMobile = useIsMobile();
|
|
24587
|
-
const [expanded, setExpanded] =
|
|
24593
|
+
const [expanded, setExpanded] = useState104(/* @__PURE__ */ new Set());
|
|
24588
24594
|
if (citations.length === 0) return null;
|
|
24589
24595
|
const sorted = [...citations].sort((a, b) => (b.relevance ?? 0) - (a.relevance ?? 0));
|
|
24590
24596
|
const toggle = /* @__PURE__ */ __name((id) => {
|
|
@@ -24606,7 +24612,7 @@ function CitationsTab({ citations, sources }) {
|
|
|
24606
24612
|
const typeLabel = chunk.nodeType ? entityLabel(chunk.nodeType) : t("features.assistant.message.sources.source");
|
|
24607
24613
|
const fallbackName = chunk.nodeId ? `${typeLabel} ${chunk.nodeId.slice(0, 8)}` : typeLabel;
|
|
24608
24614
|
const sourceName = resolved?.name ?? fallbackName;
|
|
24609
|
-
return /* @__PURE__ */ jsxs153(
|
|
24615
|
+
return /* @__PURE__ */ jsxs153(Fragment54, { children: [
|
|
24610
24616
|
/* @__PURE__ */ jsxs153(TableRow, { children: [
|
|
24611
24617
|
/* @__PURE__ */ jsx265(TableCell, { children: /* @__PURE__ */ jsxs153(
|
|
24612
24618
|
"div",
|
|
@@ -24852,8 +24858,8 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
|
|
|
24852
24858
|
if (usersCount > 0) visibleTabs.push("users");
|
|
24853
24859
|
const autoOpen = isLatestAssistant && suggestionsCount > 0;
|
|
24854
24860
|
const initialTab = autoOpen ? "suggested" : visibleTabs[0];
|
|
24855
|
-
const [open, setOpen] =
|
|
24856
|
-
const [active, setActive] =
|
|
24861
|
+
const [open, setOpen] = useState105(autoOpen);
|
|
24862
|
+
const [active, setActive] = useState105(initialTab);
|
|
24857
24863
|
if (total === 0) return null;
|
|
24858
24864
|
const panelId = `sources-panel-${message.id}`;
|
|
24859
24865
|
return /* @__PURE__ */ jsxs156("div", { className: "mt-2 w-full min-w-0", children: [
|
|
@@ -24935,7 +24941,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
24935
24941
|
}
|
|
24936
24942
|
return parts.sort().join("|");
|
|
24937
24943
|
}, [groups]);
|
|
24938
|
-
const [resolved, setResolved] =
|
|
24944
|
+
const [resolved, setResolved] = useState106([]);
|
|
24939
24945
|
useEffect76(() => {
|
|
24940
24946
|
if (groups.size === 0) {
|
|
24941
24947
|
setResolved((current) => current.length === 0 ? current : []);
|
|
@@ -25003,7 +25009,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
25003
25009
|
__name(MessageSourcesContainer, "MessageSourcesContainer");
|
|
25004
25010
|
|
|
25005
25011
|
// src/features/assistant-message/components/MessageItem.tsx
|
|
25006
|
-
import { Fragment as
|
|
25012
|
+
import { Fragment as Fragment55, jsx as jsx271, jsxs as jsxs157 } from "react/jsx-runtime";
|
|
25007
25013
|
var MENTION_HREF = /^mention:\/\/([^/]+)\/(.+)$/;
|
|
25008
25014
|
function mentionUrlTransform(url) {
|
|
25009
25015
|
return MENTION_HREF.test(url) ? url : defaultUrlTransform(url);
|
|
@@ -25026,7 +25032,7 @@ function MessageItem({
|
|
|
25026
25032
|
a: /* @__PURE__ */ __name(({ href, children }) => {
|
|
25027
25033
|
const match = href ? MENTION_HREF.exec(href) : null;
|
|
25028
25034
|
if (!match || !renderMention) return /* @__PURE__ */ jsx271("a", { href, children });
|
|
25029
|
-
return /* @__PURE__ */ jsx271(
|
|
25035
|
+
return /* @__PURE__ */ jsx271(Fragment55, { children: renderMention({ type: match[1], id: match[2], alias: String(children ?? "") }) });
|
|
25030
25036
|
}, "a")
|
|
25031
25037
|
}),
|
|
25032
25038
|
[renderMention]
|
|
@@ -25102,13 +25108,13 @@ __name(MessageList, "MessageList");
|
|
|
25102
25108
|
|
|
25103
25109
|
// src/features/assistant/components/parts/AssistantStatusLine.tsx
|
|
25104
25110
|
import { useTranslations as useTranslations140 } from "next-intl";
|
|
25105
|
-
import { Loader2 as
|
|
25111
|
+
import { Loader2 as Loader27 } from "lucide-react";
|
|
25106
25112
|
import { jsx as jsx273, jsxs as jsxs158 } from "react/jsx-runtime";
|
|
25107
25113
|
function AssistantStatusLine({ status }) {
|
|
25108
25114
|
const t = useTranslations140();
|
|
25109
25115
|
const text = status ?? t("features.assistant.thinking");
|
|
25110
25116
|
return /* @__PURE__ */ jsxs158("div", { className: "text-muted-foreground flex items-center gap-2 px-4 py-2 text-sm", children: [
|
|
25111
|
-
/* @__PURE__ */ jsx273(
|
|
25117
|
+
/* @__PURE__ */ jsx273(Loader27, { className: "h-4 w-4 animate-spin" }),
|
|
25112
25118
|
/* @__PURE__ */ jsx273("span", { children: text })
|
|
25113
25119
|
] });
|
|
25114
25120
|
}
|
|
@@ -25150,7 +25156,7 @@ __name(AssistantThread, "AssistantThread");
|
|
|
25150
25156
|
|
|
25151
25157
|
// src/features/handbook/hooks/useHandbookAsk.ts
|
|
25152
25158
|
import { useTranslations as useTranslations141 } from "next-intl";
|
|
25153
|
-
import { useCallback as useCallback49, useEffect as useEffect78, useState as
|
|
25159
|
+
import { useCallback as useCallback49, useEffect as useEffect78, useState as useState107 } from "react";
|
|
25154
25160
|
import { v4 as v414 } from "uuid";
|
|
25155
25161
|
function withSources(messages, label) {
|
|
25156
25162
|
return messages.map((message) => withSourcesInContent(message, label));
|
|
@@ -25178,10 +25184,10 @@ function useHandbookAsk(params) {
|
|
|
25178
25184
|
const generateUrl = usePageUrlGenerator();
|
|
25179
25185
|
const shouldSyncUrl = params?.syncUrl ?? true;
|
|
25180
25186
|
const handbookThreadId = params?.handbookThreadId;
|
|
25181
|
-
const [threads, setThreads] =
|
|
25182
|
-
const [thread, setThread] =
|
|
25183
|
-
const [messages, setMessages] =
|
|
25184
|
-
const [sending, setSending] =
|
|
25187
|
+
const [threads, setThreads] = useState107([]);
|
|
25188
|
+
const [thread, setThread] = useState107(void 0);
|
|
25189
|
+
const [messages, setMessages] = useState107([]);
|
|
25190
|
+
const [sending, setSending] = useState107(false);
|
|
25185
25191
|
const sourcesLabel = t("handbook.chat.sources");
|
|
25186
25192
|
useEffect78(() => {
|
|
25187
25193
|
let cancelled = false;
|
|
@@ -25286,7 +25292,7 @@ function HandbookAskSheet({ handbookPageId } = {}) {
|
|
|
25286
25292
|
const t = useTranslations142();
|
|
25287
25293
|
const generateUrl = usePageUrlGenerator();
|
|
25288
25294
|
const { threads, thread, messages, sending, ask, selectThread } = useHandbookAsk({ syncUrl: false });
|
|
25289
|
-
const [scoped, setScoped] =
|
|
25295
|
+
const [scoped, setScoped] = useState108(false);
|
|
25290
25296
|
const chatUrl = `${generateUrl({ page: Modules.HandbookPage })}/chat`;
|
|
25291
25297
|
const showThread = !!thread || sending || messages.length > 0;
|
|
25292
25298
|
const send = useCallback50(
|
|
@@ -25347,11 +25353,11 @@ __name(HandbookAskSheet, "HandbookAskSheet");
|
|
|
25347
25353
|
|
|
25348
25354
|
// src/features/handbook/components/forms/HandbookSyncButton.tsx
|
|
25349
25355
|
import { useTranslations as useTranslations143 } from "next-intl";
|
|
25350
|
-
import { useState as
|
|
25356
|
+
import { useState as useState109 } from "react";
|
|
25351
25357
|
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
25352
25358
|
function HandbookSyncButton({ refresh }) {
|
|
25353
25359
|
const t = useTranslations143();
|
|
25354
|
-
const [isSyncing, setIsSyncing] =
|
|
25360
|
+
const [isSyncing, setIsSyncing] = useState109(false);
|
|
25355
25361
|
const onSync = /* @__PURE__ */ __name(async () => {
|
|
25356
25362
|
setIsSyncing(true);
|
|
25357
25363
|
try {
|
|
@@ -25465,13 +25471,13 @@ function splitByNesting(pages) {
|
|
|
25465
25471
|
__name(splitByNesting, "splitByNesting");
|
|
25466
25472
|
|
|
25467
25473
|
// src/features/handbook/components/lists/HandbookContents.tsx
|
|
25468
|
-
import { Fragment as
|
|
25474
|
+
import { Fragment as Fragment56, jsx as jsx279, jsxs as jsxs163 } from "react/jsx-runtime";
|
|
25469
25475
|
function HandbookContents() {
|
|
25470
25476
|
const t = useTranslations145();
|
|
25471
|
-
const [pages, setPages] =
|
|
25472
|
-
const [sections, setSections] =
|
|
25473
|
-
const [isLoading, setIsLoading] =
|
|
25474
|
-
const [reloadToken, setReloadToken] =
|
|
25477
|
+
const [pages, setPages] = useState110([]);
|
|
25478
|
+
const [sections, setSections] = useState110([]);
|
|
25479
|
+
const [isLoading, setIsLoading] = useState110(true);
|
|
25480
|
+
const [reloadToken, setReloadToken] = useState110(0);
|
|
25475
25481
|
useEffect79(() => {
|
|
25476
25482
|
let cancelled = false;
|
|
25477
25483
|
const load = /* @__PURE__ */ __name(async () => {
|
|
@@ -25504,7 +25510,7 @@ function HandbookContents() {
|
|
|
25504
25510
|
return /* @__PURE__ */ jsx279(
|
|
25505
25511
|
HandbookProvider,
|
|
25506
25512
|
{
|
|
25507
|
-
functions: /* @__PURE__ */ jsxs163(
|
|
25513
|
+
functions: /* @__PURE__ */ jsxs163(Fragment56, { children: [
|
|
25508
25514
|
/* @__PURE__ */ jsx279(HandbookAskSheet, {}),
|
|
25509
25515
|
/* @__PURE__ */ jsx279(HandbookSyncButton, { refresh }),
|
|
25510
25516
|
/* @__PURE__ */ jsx279(HandbookIndexStatus, { pages })
|
|
@@ -25562,7 +25568,7 @@ __name(HandbookAdminContainer, "HandbookAdminContainer");
|
|
|
25562
25568
|
|
|
25563
25569
|
// src/features/handbook/components/containers/HandbookPageContainer.tsx
|
|
25564
25570
|
import { useTranslations as useTranslations149 } from "next-intl";
|
|
25565
|
-
import { useEffect as useEffect82, useMemo as useMemo58, useState as
|
|
25571
|
+
import { useEffect as useEffect82, useMemo as useMemo58, useState as useState112 } from "react";
|
|
25566
25572
|
|
|
25567
25573
|
// src/features/handbook/components/details/HandbookPageDetails.tsx
|
|
25568
25574
|
import { jsx as jsx281 } from "react/jsx-runtime";
|
|
@@ -25618,13 +25624,13 @@ __name(HandbookPageNeighbours, "HandbookPageNeighbours");
|
|
|
25618
25624
|
// src/features/handbook/components/details/HandbookPageToc.tsx
|
|
25619
25625
|
import { List } from "lucide-react";
|
|
25620
25626
|
import { useTranslations as useTranslations147 } from "next-intl";
|
|
25621
|
-
import { useCallback as useCallback52, useEffect as useEffect80, useState as
|
|
25627
|
+
import { useCallback as useCallback52, useEffect as useEffect80, useState as useState111 } from "react";
|
|
25622
25628
|
import { jsx as jsx283, jsxs as jsxs165 } from "react/jsx-runtime";
|
|
25623
25629
|
function HandbookPageToc({ containerId }) {
|
|
25624
25630
|
const t = useTranslations147();
|
|
25625
|
-
const [activeId, setActiveId] =
|
|
25626
|
-
const [headings, setHeadings] =
|
|
25627
|
-
const [headingsWithIds, setHeadingsWithIds] =
|
|
25631
|
+
const [activeId, setActiveId] = useState111(null);
|
|
25632
|
+
const [headings, setHeadings] = useState111([]);
|
|
25633
|
+
const [headingsWithIds, setHeadingsWithIds] = useState111(/* @__PURE__ */ new Map());
|
|
25628
25634
|
useEffect80(() => {
|
|
25629
25635
|
const contentPanel = document.getElementById(containerId);
|
|
25630
25636
|
if (!contentPanel) return;
|
|
@@ -25789,10 +25795,10 @@ import { jsx as jsx285, jsxs as jsxs167 } from "react/jsx-runtime";
|
|
|
25789
25795
|
var CONTENT_CONTAINER_ID = "handbook-page-content";
|
|
25790
25796
|
function HandbookPageContainer({ handbookPageId }) {
|
|
25791
25797
|
const t = useTranslations149();
|
|
25792
|
-
const [handbookPage, setHandbookPage] =
|
|
25793
|
-
const [pages, setPages] =
|
|
25794
|
-
const [sections, setSections] =
|
|
25795
|
-
const [isLoading, setIsLoading] =
|
|
25798
|
+
const [handbookPage, setHandbookPage] = useState112(void 0);
|
|
25799
|
+
const [pages, setPages] = useState112([]);
|
|
25800
|
+
const [sections, setSections] = useState112([]);
|
|
25801
|
+
const [isLoading, setIsLoading] = useState112(true);
|
|
25796
25802
|
useEffect82(() => {
|
|
25797
25803
|
let cancelled = false;
|
|
25798
25804
|
const load = /* @__PURE__ */ __name(async () => {
|
|
@@ -25895,7 +25901,7 @@ function groupThreadsByBucket(threads) {
|
|
|
25895
25901
|
__name(groupThreadsByBucket, "groupThreadsByBucket");
|
|
25896
25902
|
|
|
25897
25903
|
// src/features/assistant/components/parts/AssistantSidebar.tsx
|
|
25898
|
-
import { Fragment as
|
|
25904
|
+
import { Fragment as Fragment57, jsx as jsx286, jsxs as jsxs168 } from "react/jsx-runtime";
|
|
25899
25905
|
function AssistantSidebar({
|
|
25900
25906
|
threads,
|
|
25901
25907
|
activeId,
|
|
@@ -25932,7 +25938,7 @@ function AssistantSidebar({
|
|
|
25932
25938
|
" ",
|
|
25933
25939
|
newLabel ?? t("features.assistant.new")
|
|
25934
25940
|
] }) }),
|
|
25935
|
-
/* @__PURE__ */ jsx286("div", { className: "flex-1 overflow-y-auto p-2", children: threads.length === 0 ? /* @__PURE__ */ jsx286("div", { className: "text-muted-foreground mt-6 text-center text-xs", children: emptyLabel ?? t("features.assistant.empty_sidebar") }) : /* @__PURE__ */ jsxs168(
|
|
25941
|
+
/* @__PURE__ */ jsx286("div", { className: "flex-1 overflow-y-auto p-2", children: threads.length === 0 ? /* @__PURE__ */ jsx286("div", { className: "text-muted-foreground mt-6 text-center text-xs", children: emptyLabel ?? t("features.assistant.empty_sidebar") }) : /* @__PURE__ */ jsxs168(Fragment57, { children: [
|
|
25936
25942
|
renderSection(t("features.assistant.bucket_today"), groups.today),
|
|
25937
25943
|
renderSection(t("features.assistant.bucket_week"), groups.thisWeek),
|
|
25938
25944
|
renderSection(t("features.assistant.bucket_earlier"), groups.earlier)
|
|
@@ -25942,7 +25948,7 @@ function AssistantSidebar({
|
|
|
25942
25948
|
__name(AssistantSidebar, "AssistantSidebar");
|
|
25943
25949
|
|
|
25944
25950
|
// src/features/handbook/components/containers/HandbookAskContainer.tsx
|
|
25945
|
-
import { Fragment as
|
|
25951
|
+
import { Fragment as Fragment58, jsx as jsx287, jsxs as jsxs169 } from "react/jsx-runtime";
|
|
25946
25952
|
function HandbookAskContainer({ handbookThreadId } = {}) {
|
|
25947
25953
|
const t = useTranslations151();
|
|
25948
25954
|
const { threads, thread, messages, sending, ask, selectThread, startNew } = useHandbookAsk({ handbookThreadId });
|
|
@@ -25983,7 +25989,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
|
|
|
25983
25989
|
detailsIcon: /* @__PURE__ */ jsx287(MessagesSquareIcon2, {}),
|
|
25984
25990
|
details,
|
|
25985
25991
|
children: /* @__PURE__ */ jsxs169("div", { className: "flex h-full min-h-0 w-full flex-col overflow-hidden", children: [
|
|
25986
|
-
showThread ? /* @__PURE__ */ jsx287(
|
|
25992
|
+
showThread ? /* @__PURE__ */ jsx287(Fragment58, { children: /* @__PURE__ */ jsx287(
|
|
25987
25993
|
AssistantThread,
|
|
25988
25994
|
{
|
|
25989
25995
|
messages,
|
|
@@ -26018,30 +26024,30 @@ import { useTranslations as useTranslations154 } from "next-intl";
|
|
|
26018
26024
|
import { useMemo as useMemo60 } from "react";
|
|
26019
26025
|
|
|
26020
26026
|
// src/features/assistant-message/components/EntityMentionLink.tsx
|
|
26021
|
-
import { Fragment as
|
|
26027
|
+
import { Fragment as Fragment59, jsx as jsx288 } from "react/jsx-runtime";
|
|
26022
26028
|
function EntityMentionLinkView({ type, id, alias }) {
|
|
26023
26029
|
const generate = usePageUrlGenerator();
|
|
26024
26030
|
let module;
|
|
26025
26031
|
try {
|
|
26026
26032
|
module = ModuleRegistry.findByName(type);
|
|
26027
26033
|
} catch {
|
|
26028
|
-
return /* @__PURE__ */ jsx288(
|
|
26034
|
+
return /* @__PURE__ */ jsx288(Fragment59, { children: alias });
|
|
26029
26035
|
}
|
|
26030
|
-
if (!module?.pageUrl) return /* @__PURE__ */ jsx288(
|
|
26036
|
+
if (!module?.pageUrl) return /* @__PURE__ */ jsx288(Fragment59, { children: alias });
|
|
26031
26037
|
return /* @__PURE__ */ jsx288(Link, { href: generate({ page: module, id }), children: alias });
|
|
26032
26038
|
}
|
|
26033
26039
|
__name(EntityMentionLinkView, "EntityMentionLinkView");
|
|
26034
26040
|
var EntityMentionLink = /* @__PURE__ */ __name((p) => /* @__PURE__ */ jsx288(EntityMentionLinkView, { ...p }), "EntityMentionLink");
|
|
26035
26041
|
|
|
26036
26042
|
// src/features/assistant/components/parts/AssistantEmptyState.tsx
|
|
26037
|
-
import { useState as
|
|
26043
|
+
import { useState as useState113 } from "react";
|
|
26038
26044
|
import { useTranslations as useTranslations152 } from "next-intl";
|
|
26039
26045
|
import { Sparkles as Sparkles4 } from "lucide-react";
|
|
26040
26046
|
import { jsx as jsx289, jsxs as jsxs170 } from "react/jsx-runtime";
|
|
26041
26047
|
var STARTER_KEYS = ["a", "b", "c", "d"];
|
|
26042
26048
|
function AssistantEmptyState({ onSend, operatorMode = false, onOperatorModeChange, composerLeading }) {
|
|
26043
26049
|
const t = useTranslations152();
|
|
26044
|
-
const [draft, setDraft] =
|
|
26050
|
+
const [draft, setDraft] = useState113("");
|
|
26045
26051
|
return /* @__PURE__ */ jsx289("div", { className: "flex h-full w-full items-center justify-center p-10", children: /* @__PURE__ */ jsxs170("div", { className: "flex w-full max-w-2xl flex-col gap-6", children: [
|
|
26046
26052
|
/* @__PURE__ */ jsxs170("div", { className: "text-center", children: [
|
|
26047
26053
|
/* @__PURE__ */ jsx289("div", { className: "mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-blue-400 to-violet-500 text-white", children: /* @__PURE__ */ jsx289(Sparkles4, { className: "h-5 w-5" }) }),
|
|
@@ -26079,14 +26085,14 @@ function AssistantEmptyState({ onSend, operatorMode = false, onOperatorModeChang
|
|
|
26079
26085
|
__name(AssistantEmptyState, "AssistantEmptyState");
|
|
26080
26086
|
|
|
26081
26087
|
// src/features/assistant/components/parts/AssistantThreadHeader.tsx
|
|
26082
|
-
import { useState as
|
|
26088
|
+
import { useState as useState114 } from "react";
|
|
26083
26089
|
import { useTranslations as useTranslations153 } from "next-intl";
|
|
26084
26090
|
import { jsx as jsx290, jsxs as jsxs171 } from "react/jsx-runtime";
|
|
26085
26091
|
function AssistantThreadHeader({ assistant, onRename, onDelete, renamePlaceholder, deleteConfirmLabel }) {
|
|
26086
26092
|
const t = useTranslations153();
|
|
26087
|
-
const [renameValue, setRenameValue] =
|
|
26088
|
-
const [renameOpen, setRenameOpen] =
|
|
26089
|
-
const [deleteOpen, setDeleteOpen] =
|
|
26093
|
+
const [renameValue, setRenameValue] = useState114(assistant.title);
|
|
26094
|
+
const [renameOpen, setRenameOpen] = useState114(false);
|
|
26095
|
+
const [deleteOpen, setDeleteOpen] = useState114(false);
|
|
26090
26096
|
const handleRename = /* @__PURE__ */ __name(async () => {
|
|
26091
26097
|
const trimmed = renameValue.trim() || assistant.title;
|
|
26092
26098
|
await onRename(trimmed);
|
|
@@ -26139,7 +26145,7 @@ function AssistantThreadHeader({ assistant, onRename, onDelete, renamePlaceholde
|
|
|
26139
26145
|
__name(AssistantThreadHeader, "AssistantThreadHeader");
|
|
26140
26146
|
|
|
26141
26147
|
// src/features/assistant/components/containers/AssistantContainer.tsx
|
|
26142
|
-
import { Fragment as
|
|
26148
|
+
import { Fragment as Fragment60, jsx as jsx291, jsxs as jsxs172 } from "react/jsx-runtime";
|
|
26143
26149
|
function AssistantContainer({
|
|
26144
26150
|
renderApprovalAction,
|
|
26145
26151
|
renderMention,
|
|
@@ -26167,7 +26173,7 @@ function AssistantContainer({
|
|
|
26167
26173
|
),
|
|
26168
26174
|
[ctx.threads, ctx.assistant?.id, ctx.selectThread, renderThreadBadge]
|
|
26169
26175
|
);
|
|
26170
|
-
const thread = /* @__PURE__ */ jsx291(
|
|
26176
|
+
const thread = /* @__PURE__ */ jsx291(Fragment60, { children: !showThread ? /* @__PURE__ */ jsx291(
|
|
26171
26177
|
AssistantEmptyState,
|
|
26172
26178
|
{
|
|
26173
26179
|
onSend: ctx.sendMessage,
|
|
@@ -26175,7 +26181,7 @@ function AssistantContainer({
|
|
|
26175
26181
|
onOperatorModeChange: showOperatorToggle ? ctx.setOperatorMode : void 0,
|
|
26176
26182
|
composerLeading: renderScopePicker?.()
|
|
26177
26183
|
}
|
|
26178
|
-
) : /* @__PURE__ */ jsxs172(
|
|
26184
|
+
) : /* @__PURE__ */ jsxs172(Fragment60, { children: [
|
|
26179
26185
|
ctx.assistant ? /* @__PURE__ */ jsx291(
|
|
26180
26186
|
AssistantThreadHeader,
|
|
26181
26187
|
{
|
|
@@ -26238,7 +26244,7 @@ import { useTranslations as useTranslations156 } from "next-intl";
|
|
|
26238
26244
|
// src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx
|
|
26239
26245
|
import { ArrowUp as ArrowUp2 } from "lucide-react";
|
|
26240
26246
|
import { useTranslations as useTranslations155 } from "next-intl";
|
|
26241
|
-
import { useCallback as useCallback53, useId as useId5, useState as
|
|
26247
|
+
import { useCallback as useCallback53, useId as useId5, useState as useState115 } from "react";
|
|
26242
26248
|
import { jsx as jsx292, jsxs as jsxs173 } from "react/jsx-runtime";
|
|
26243
26249
|
function flattenBlocks(blocks) {
|
|
26244
26250
|
const lines = [];
|
|
@@ -26276,9 +26282,9 @@ function AssistantBlockNoteComposer({
|
|
|
26276
26282
|
}) {
|
|
26277
26283
|
const t = useTranslations155();
|
|
26278
26284
|
const editorId = useId5().replace(/[^a-zA-Z0-9]/g, "");
|
|
26279
|
-
const [blocks, setBlocks] =
|
|
26280
|
-
const [isEmpty, setIsEmpty] =
|
|
26281
|
-
const [resetKey, setResetKey] =
|
|
26285
|
+
const [blocks, setBlocks] = useState115([]);
|
|
26286
|
+
const [isEmpty, setIsEmpty] = useState115(true);
|
|
26287
|
+
const [resetKey, setResetKey] = useState115(0);
|
|
26282
26288
|
const canSend = !isEmpty && !disabled;
|
|
26283
26289
|
const submit = useCallback53(async () => {
|
|
26284
26290
|
if (isEmpty || disabled) return;
|
|
@@ -26331,7 +26337,7 @@ function AssistantBlockNoteComposer({
|
|
|
26331
26337
|
__name(AssistantBlockNoteComposer, "AssistantBlockNoteComposer");
|
|
26332
26338
|
|
|
26333
26339
|
// src/features/assistant/components/containers/AssistantPageContainer.tsx
|
|
26334
|
-
import { Fragment as
|
|
26340
|
+
import { Fragment as Fragment61, jsx as jsx293, jsxs as jsxs174 } from "react/jsx-runtime";
|
|
26335
26341
|
function AssistantPageContainer({
|
|
26336
26342
|
renderApprovalAction,
|
|
26337
26343
|
renderMention,
|
|
@@ -26370,7 +26376,7 @@ function AssistantPageContainer({
|
|
|
26370
26376
|
) })
|
|
26371
26377
|
),
|
|
26372
26378
|
children: /* @__PURE__ */ jsxs174("div", { className: "bg-background flex h-full w-full flex-col overflow-hidden rounded-lg border", children: [
|
|
26373
|
-
showThread ? /* @__PURE__ */ jsxs174(
|
|
26379
|
+
showThread ? /* @__PURE__ */ jsxs174(Fragment61, { children: [
|
|
26374
26380
|
ctx.assistant ? /* @__PURE__ */ jsx293(
|
|
26375
26381
|
AssistantThreadHeader,
|
|
26376
26382
|
{
|
|
@@ -26417,7 +26423,7 @@ __name(AssistantPageContainer, "AssistantPageContainer");
|
|
|
26417
26423
|
// src/features/assistant-action/components/ApprovalActionCard.tsx
|
|
26418
26424
|
import { ShieldAlert as ShieldAlert2 } from "lucide-react";
|
|
26419
26425
|
import { useTranslations as useTranslations157 } from "next-intl";
|
|
26420
|
-
import { Fragment as
|
|
26426
|
+
import { Fragment as Fragment62, useEffect as useEffect83, useMemo as useMemo61, useState as useState116 } from "react";
|
|
26421
26427
|
import { jsx as jsx294, jsxs as jsxs175 } from "react/jsx-runtime";
|
|
26422
26428
|
var STATUS_VARIANT2 = {
|
|
26423
26429
|
pending: "softBlue",
|
|
@@ -26609,13 +26615,13 @@ function parseLegacyProposal(toolArgs) {
|
|
|
26609
26615
|
__name(parseLegacyProposal, "parseLegacyProposal");
|
|
26610
26616
|
function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipKeys }) {
|
|
26611
26617
|
const t = useTranslations157();
|
|
26612
|
-
const [status, setStatus] =
|
|
26613
|
-
const [actionSummary, setActionSummary] =
|
|
26614
|
-
const [toolName, setToolName] =
|
|
26615
|
-
const [toolArgs, setToolArgs] =
|
|
26616
|
-
const [actionProposal, setActionProposal] =
|
|
26617
|
-
const [busy, setBusy] =
|
|
26618
|
-
const [failed, setFailed] =
|
|
26618
|
+
const [status, setStatus] = useState116(void 0);
|
|
26619
|
+
const [actionSummary, setActionSummary] = useState116(void 0);
|
|
26620
|
+
const [toolName, setToolName] = useState116(void 0);
|
|
26621
|
+
const [toolArgs, setToolArgs] = useState116(void 0);
|
|
26622
|
+
const [actionProposal, setActionProposal] = useState116(void 0);
|
|
26623
|
+
const [busy, setBusy] = useState116(false);
|
|
26624
|
+
const [failed, setFailed] = useState116(false);
|
|
26619
26625
|
useEffect83(() => {
|
|
26620
26626
|
let cancelled = false;
|
|
26621
26627
|
(async () => {
|
|
@@ -26704,7 +26710,7 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
|
|
|
26704
26710
|
/* @__PURE__ */ jsx294("span", { children: isUpdate ? t("features.assistant.approval.proposal.updateHeading", { entity: entityLabel }) : t("features.assistant.approval.proposal.heading", { entity: entityLabel }) }),
|
|
26705
26711
|
targetLabel !== "" && /* @__PURE__ */ jsx294("span", { className: "text-foreground tracking-normal normal-case", children: targetLabel })
|
|
26706
26712
|
] }),
|
|
26707
|
-
/* @__PURE__ */ jsx294("dl", { className: "grid grid-cols-1 gap-x-4 gap-y-1.5 sm:grid-cols-[minmax(0,10rem)_minmax(0,1fr)]", children: rows.map((row) => /* @__PURE__ */ jsxs175(
|
|
26713
|
+
/* @__PURE__ */ jsx294("dl", { className: "grid grid-cols-1 gap-x-4 gap-y-1.5 sm:grid-cols-[minmax(0,10rem)_minmax(0,1fr)]", children: rows.map((row) => /* @__PURE__ */ jsxs175(Fragment62, { children: [
|
|
26708
26714
|
/* @__PURE__ */ jsx294("dt", { className: "text-muted-foreground text-xs leading-relaxed break-words sm:text-sm", children: row.label }),
|
|
26709
26715
|
/* @__PURE__ */ jsx294("dd", { className: "text-foreground text-sm leading-relaxed break-words whitespace-pre-wrap", children: row.value })
|
|
26710
26716
|
] }, row.key)) })
|
|
@@ -26786,7 +26792,7 @@ var NotificationErrorBoundary = class extends Component {
|
|
|
26786
26792
|
// src/features/notification/components/containers/NotificationsListContainer.tsx
|
|
26787
26793
|
import { useTranslations as useTranslations162 } from "next-intl";
|
|
26788
26794
|
import { useSearchParams as useSearchParams5 } from "next/navigation";
|
|
26789
|
-
import { useState as
|
|
26795
|
+
import { useState as useState117 } from "react";
|
|
26790
26796
|
|
|
26791
26797
|
// src/features/notification/components/filters/NotificationViewSwitcher.tsx
|
|
26792
26798
|
import { useTranslations as useTranslations159 } from "next-intl";
|
|
@@ -26987,7 +26993,7 @@ function NotificationsListContainerContent() {
|
|
|
26987
26993
|
const searchParams = useSearchParams5();
|
|
26988
26994
|
const { error } = useNotificationContext();
|
|
26989
26995
|
const tabParam = searchParams.get("tab");
|
|
26990
|
-
const [mode, setMode] =
|
|
26996
|
+
const [mode, setMode] = useState117(tabParam === "archived" ? "archived" : "inbox");
|
|
26991
26997
|
if (error) {
|
|
26992
26998
|
return /* @__PURE__ */ jsx300("div", { className: "flex items-center justify-center p-8 text-center", children: /* @__PURE__ */ jsxs178("div", { className: "text-destructive text-xs/relaxed", children: [
|
|
26993
26999
|
/* @__PURE__ */ jsx300("p", { children: t("notification.ui.list.error_loading", { error }) }),
|
|
@@ -27024,7 +27030,7 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
27024
27030
|
// src/features/notification/components/modals/NotificationModal.tsx
|
|
27025
27031
|
import { BellIcon as BellIcon2, ExternalLinkIcon } from "lucide-react";
|
|
27026
27032
|
import { useTranslations as useTranslations163 } from "next-intl";
|
|
27027
|
-
import { Fragment as
|
|
27033
|
+
import { Fragment as Fragment63, useCallback as useCallback54, useEffect as useEffect85, useMemo as useMemo63, useRef as useRef46, useState as useState118 } from "react";
|
|
27028
27034
|
import { jsx as jsx301, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
27029
27035
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
27030
27036
|
const _instanceId = useRef46(Math.random().toString(36).substr(2, 9));
|
|
@@ -27046,7 +27052,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
27046
27052
|
} = useSocketContext();
|
|
27047
27053
|
const t = useTranslations163();
|
|
27048
27054
|
const generateUrl = usePageUrlGenerator();
|
|
27049
|
-
const [newNotifications, setNewNotifications] =
|
|
27055
|
+
const [newNotifications, setNewNotifications] = useState118(false);
|
|
27050
27056
|
const preventAutoClose = useRef46(false);
|
|
27051
27057
|
const circuitBreakerRef = useRef46({
|
|
27052
27058
|
count: 0,
|
|
@@ -27213,7 +27219,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
27213
27219
|
] }),
|
|
27214
27220
|
isLoading && /* @__PURE__ */ jsx301("div", { className: "text-muted-foreground px-3 py-2 text-xs", children: t(`common.loading`) }),
|
|
27215
27221
|
error && /* @__PURE__ */ jsx301("div", { className: "text-destructive px-3 py-2 text-xs", children: error }),
|
|
27216
|
-
/* @__PURE__ */ jsx301(ScrollArea, { className: "[&_[data-slot=scroll-area-scrollbar]]:w-2.5 [&_[data-slot=scroll-area-thumb]]:bg-muted-foreground/40 [&>[data-slot=scroll-area-viewport]]:max-h-[min(32rem,calc(var(--available-height,32rem)-3.5rem))]", children: notifications.length > 0 ? /* @__PURE__ */ jsx301("div", { className: "divide-border divide-y", children: notifications.map((notification) => /* @__PURE__ */ jsx301(
|
|
27222
|
+
/* @__PURE__ */ jsx301(ScrollArea, { className: "[&_[data-slot=scroll-area-scrollbar]]:w-2.5 [&_[data-slot=scroll-area-thumb]]:bg-muted-foreground/40 [&>[data-slot=scroll-area-viewport]]:max-h-[min(32rem,calc(var(--available-height,32rem)-3.5rem))]", children: notifications.length > 0 ? /* @__PURE__ */ jsx301("div", { className: "divide-border divide-y", children: notifications.map((notification) => /* @__PURE__ */ jsx301(Fragment63, { children: generateNotification(notification, () => setIsOpen(false)) }, notification.id)) }) : /* @__PURE__ */ jsx301("div", { className: "text-muted-foreground p-6 text-center text-sm", children: t(`notification.empty`) }) })
|
|
27217
27223
|
] })
|
|
27218
27224
|
] });
|
|
27219
27225
|
}
|
|
@@ -27224,7 +27230,7 @@ function NotificationModal(props) {
|
|
|
27224
27230
|
__name(NotificationModal, "NotificationModal");
|
|
27225
27231
|
|
|
27226
27232
|
// src/features/notification/components/notifications/PushNotificationProvider.tsx
|
|
27227
|
-
import { Fragment as
|
|
27233
|
+
import { Fragment as Fragment64, jsx as jsx302 } from "react/jsx-runtime";
|
|
27228
27234
|
function PushNotificationProvider({
|
|
27229
27235
|
children,
|
|
27230
27236
|
excludedRoleIds = []
|
|
@@ -27232,7 +27238,7 @@ function PushNotificationProvider({
|
|
|
27232
27238
|
const { currentUser, hasRole } = useCurrentUserContext();
|
|
27233
27239
|
const canSubscribe = !hasRole(getRoleId().Administrator) && !excludedRoleIds.some((roleId) => hasRole(roleId));
|
|
27234
27240
|
usePushNotifications_default({ currentUser: currentUser ?? void 0, canSubscribe });
|
|
27235
|
-
return /* @__PURE__ */ jsx302(
|
|
27241
|
+
return /* @__PURE__ */ jsx302(Fragment64, { children });
|
|
27236
27242
|
}
|
|
27237
27243
|
__name(PushNotificationProvider, "PushNotificationProvider");
|
|
27238
27244
|
|
|
@@ -27286,16 +27292,16 @@ __name(ReferralCodeCapture, "ReferralCodeCapture");
|
|
|
27286
27292
|
import { useTranslations as useTranslations165 } from "next-intl";
|
|
27287
27293
|
|
|
27288
27294
|
// src/features/referral/components/ReferralWidget.tsx
|
|
27289
|
-
import { Copy as Copy2, Loader2 as
|
|
27295
|
+
import { Copy as Copy2, Loader2 as Loader28, Mail, Users } from "lucide-react";
|
|
27290
27296
|
import { useTranslations as useTranslations164 } from "next-intl";
|
|
27291
|
-
import { useCallback as useCallback55, useRef as useRef47, useState as
|
|
27297
|
+
import { useCallback as useCallback55, useRef as useRef47, useState as useState121 } from "react";
|
|
27292
27298
|
|
|
27293
27299
|
// src/features/referral/hooks/useReferralInvite.ts
|
|
27294
|
-
import { useState as
|
|
27300
|
+
import { useState as useState119 } from "react";
|
|
27295
27301
|
function useReferralInvite() {
|
|
27296
|
-
const [sending, setSending] =
|
|
27297
|
-
const [error, setError] =
|
|
27298
|
-
const [success, setSuccess] =
|
|
27302
|
+
const [sending, setSending] = useState119(false);
|
|
27303
|
+
const [error, setError] = useState119(null);
|
|
27304
|
+
const [success, setSuccess] = useState119(false);
|
|
27299
27305
|
const sendInvite = /* @__PURE__ */ __name(async (email) => {
|
|
27300
27306
|
if (!isReferralEnabled()) {
|
|
27301
27307
|
return;
|
|
@@ -27318,11 +27324,11 @@ function useReferralInvite() {
|
|
|
27318
27324
|
__name(useReferralInvite, "useReferralInvite");
|
|
27319
27325
|
|
|
27320
27326
|
// src/features/referral/hooks/useReferralStats.ts
|
|
27321
|
-
import { useEffect as useEffect87, useState as
|
|
27327
|
+
import { useEffect as useEffect87, useState as useState120 } from "react";
|
|
27322
27328
|
function useReferralStats() {
|
|
27323
|
-
const [stats, setStats] =
|
|
27324
|
-
const [loading, setLoading] =
|
|
27325
|
-
const [error, setError] =
|
|
27329
|
+
const [stats, setStats] = useState120(null);
|
|
27330
|
+
const [loading, setLoading] = useState120(true);
|
|
27331
|
+
const [error, setError] = useState120(null);
|
|
27326
27332
|
useEffect87(() => {
|
|
27327
27333
|
if (!isReferralEnabled()) {
|
|
27328
27334
|
setLoading(false);
|
|
@@ -27399,8 +27405,8 @@ function ReferralWidget({
|
|
|
27399
27405
|
};
|
|
27400
27406
|
const { stats, loading, error } = useReferralStats();
|
|
27401
27407
|
const { sendInvite, sending } = useReferralInvite();
|
|
27402
|
-
const [email, setEmail] =
|
|
27403
|
-
const [copied, setCopied] =
|
|
27408
|
+
const [email, setEmail] = useState121("");
|
|
27409
|
+
const [copied, setCopied] = useState121(false);
|
|
27404
27410
|
const linkInputRef = useRef47(null);
|
|
27405
27411
|
const config = getReferralConfig();
|
|
27406
27412
|
const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
|
|
@@ -27459,9 +27465,9 @@ function ReferralWidget({
|
|
|
27459
27465
|
);
|
|
27460
27466
|
if (loading) {
|
|
27461
27467
|
if (isDialog) {
|
|
27462
|
-
return /* @__PURE__ */ jsx303("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx303(
|
|
27468
|
+
return /* @__PURE__ */ jsx303("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx303(Loader28, { className: "text-muted-foreground h-6 w-6 animate-spin" }) });
|
|
27463
27469
|
}
|
|
27464
|
-
return /* @__PURE__ */ jsx303(Card, { className: `p-6 ${className ?? ""}`, children: /* @__PURE__ */ jsx303("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx303(
|
|
27470
|
+
return /* @__PURE__ */ jsx303(Card, { className: `p-6 ${className ?? ""}`, children: /* @__PURE__ */ jsx303("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx303(Loader28, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }) });
|
|
27465
27471
|
}
|
|
27466
27472
|
if (error) {
|
|
27467
27473
|
const errorMessage = text.loadError;
|
|
@@ -27520,7 +27526,7 @@ function ReferralWidget({
|
|
|
27520
27526
|
onClick: handleSendInvite,
|
|
27521
27527
|
disabled: sending || !email,
|
|
27522
27528
|
"aria-label": sending ? text.sendingButton : text.sendButton,
|
|
27523
|
-
children: sending ? /* @__PURE__ */ jsx303(
|
|
27529
|
+
children: sending ? /* @__PURE__ */ jsx303(Loader28, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx303(Mail, { className: "h-4 w-4" })
|
|
27524
27530
|
}
|
|
27525
27531
|
)
|
|
27526
27532
|
] })
|
|
@@ -27565,7 +27571,7 @@ __name(ReferralDialog, "ReferralDialog");
|
|
|
27565
27571
|
// src/features/referral/components/containers/ReferralsAdminContainer.tsx
|
|
27566
27572
|
import { CopyIcon as CopyIcon3 } from "lucide-react";
|
|
27567
27573
|
import { useTranslations as useTranslations170 } from "next-intl";
|
|
27568
|
-
import { useEffect as useEffect88, useMemo as useMemo67, useRef as useRef48, useState as
|
|
27574
|
+
import { useEffect as useEffect88, useMemo as useMemo67, useRef as useRef48, useState as useState122 } from "react";
|
|
27569
27575
|
|
|
27570
27576
|
// src/features/referral/hooks/useReferralAdminReferralTableStructure.tsx
|
|
27571
27577
|
import { useTranslations as useTranslations166 } from "next-intl";
|
|
@@ -28096,9 +28102,9 @@ function useRefetchOnChange(retriever, key, value) {
|
|
|
28096
28102
|
__name(useRefetchOnChange, "useRefetchOnChange");
|
|
28097
28103
|
function ReferralsAdminContainer() {
|
|
28098
28104
|
const t = useTranslations170();
|
|
28099
|
-
const [period, setPeriod] =
|
|
28100
|
-
const [sort, setSort] =
|
|
28101
|
-
const [summary, setSummary] =
|
|
28105
|
+
const [period, setPeriod] = useState122("30d");
|
|
28106
|
+
const [sort, setSort] = useState122("paying");
|
|
28107
|
+
const [summary, setSummary] = useState122([]);
|
|
28102
28108
|
useEffect88(() => {
|
|
28103
28109
|
let cancelled = false;
|
|
28104
28110
|
ReferralAdminService.getSummary({ period }).then((rows) => {
|
|
@@ -28229,11 +28235,11 @@ function RoleDetails() {
|
|
|
28229
28235
|
__name(RoleDetails, "RoleDetails");
|
|
28230
28236
|
|
|
28231
28237
|
// src/features/role/components/containers/RoleContainer.tsx
|
|
28232
|
-
import { Fragment as
|
|
28238
|
+
import { Fragment as Fragment65, jsx as jsx311, jsxs as jsxs187 } from "react/jsx-runtime";
|
|
28233
28239
|
function RoleContainer() {
|
|
28234
28240
|
const { role } = useRoleContext();
|
|
28235
28241
|
if (!role) return null;
|
|
28236
|
-
return /* @__PURE__ */ jsxs187(
|
|
28242
|
+
return /* @__PURE__ */ jsxs187(Fragment65, { children: [
|
|
28237
28243
|
/* @__PURE__ */ jsx311(RoleDetails, {}),
|
|
28238
28244
|
/* @__PURE__ */ jsx311(RoleUsersList, { role })
|
|
28239
28245
|
] });
|
|
@@ -28277,11 +28283,11 @@ __name(FormRoles, "FormRoles");
|
|
|
28277
28283
|
|
|
28278
28284
|
// src/features/role/components/forms/RemoveUserFromRole.tsx
|
|
28279
28285
|
import { useTranslations as useTranslations173 } from "next-intl";
|
|
28280
|
-
import { useEffect as useEffect90, useState as
|
|
28281
|
-
import { Fragment as
|
|
28286
|
+
import { useEffect as useEffect90, useState as useState123 } from "react";
|
|
28287
|
+
import { Fragment as Fragment66, jsx as jsx313, jsxs as jsxs189 } from "react/jsx-runtime";
|
|
28282
28288
|
function RemoveUserFromRole({ role, user, refresh }) {
|
|
28283
|
-
const [open, setOpen] =
|
|
28284
|
-
const [canRemove, setCanRemove] =
|
|
28289
|
+
const [open, setOpen] = useState123(false);
|
|
28290
|
+
const [canRemove, setCanRemove] = useState123(false);
|
|
28285
28291
|
const t = useTranslations173();
|
|
28286
28292
|
useEffect90(() => {
|
|
28287
28293
|
async function checkCompanyAdminDeletability() {
|
|
@@ -28327,7 +28333,7 @@ function RemoveUserFromRole({ role, user, refresh }) {
|
|
|
28327
28333
|
/* @__PURE__ */ jsx313(DialogTitle, { children: t(`role.remove_user.title`) }),
|
|
28328
28334
|
/* @__PURE__ */ jsx313(DialogDescription, { children: canRemove ? t(`role.remove_user.subtitle_allowed`) : t(`role.remove_user.subtitle_not_allowed`) })
|
|
28329
28335
|
] }),
|
|
28330
|
-
canRemove ? /* @__PURE__ */ jsxs189(
|
|
28336
|
+
canRemove ? /* @__PURE__ */ jsxs189(Fragment66, { children: [
|
|
28331
28337
|
t(`role.remove_user.description_allowed`, { role: roleName, user: user.name }),
|
|
28332
28338
|
/* @__PURE__ */ jsxs189("div", { className: "flex justify-end", children: [
|
|
28333
28339
|
/* @__PURE__ */ jsx313(Button, { className: "me-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
|
|
@@ -28344,7 +28350,7 @@ function RemoveUserFromRole({ role, user, refresh }) {
|
|
|
28344
28350
|
}
|
|
28345
28351
|
)
|
|
28346
28352
|
] })
|
|
28347
|
-
] }) : /* @__PURE__ */ jsx313(
|
|
28353
|
+
] }) : /* @__PURE__ */ jsx313(Fragment66, { children: t(`role.remove_user.description_not_allowed`, { role: roleName, user: user.name }) })
|
|
28348
28354
|
] })
|
|
28349
28355
|
] });
|
|
28350
28356
|
}
|
|
@@ -28353,13 +28359,13 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
28353
28359
|
// src/features/role/components/forms/UserRoleAdd.tsx
|
|
28354
28360
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
28355
28361
|
import { useTranslations as useTranslations174 } from "next-intl";
|
|
28356
|
-
import { useCallback as useCallback56, useEffect as useEffect91, useRef as useRef49, useState as
|
|
28357
|
-
import { Fragment as
|
|
28362
|
+
import { useCallback as useCallback56, useEffect as useEffect91, useRef as useRef49, useState as useState124 } from "react";
|
|
28363
|
+
import { Fragment as Fragment67, jsx as jsx314, jsxs as jsxs190 } from "react/jsx-runtime";
|
|
28358
28364
|
function UserRoleAdd({ user, refresh }) {
|
|
28359
|
-
const [open, setOpen] =
|
|
28365
|
+
const [open, setOpen] = useState124(false);
|
|
28360
28366
|
const inputRef = useRef49(null);
|
|
28361
|
-
const [searchTerm, setSearchTerm] =
|
|
28362
|
-
const [roles, setRoles] =
|
|
28367
|
+
const [searchTerm, setSearchTerm] = useState124("");
|
|
28368
|
+
const [roles, setRoles] = useState124([]);
|
|
28363
28369
|
const t = useTranslations174();
|
|
28364
28370
|
const addUserToRole = /* @__PURE__ */ __name(async (role) => {
|
|
28365
28371
|
await RoleService.addUserToRole({
|
|
@@ -28401,7 +28407,7 @@ function UserRoleAdd({ user, refresh }) {
|
|
|
28401
28407
|
useEffect91(() => {
|
|
28402
28408
|
if (open) searchRoles("");
|
|
28403
28409
|
}, [open]);
|
|
28404
|
-
return /* @__PURE__ */ jsxs190(
|
|
28410
|
+
return /* @__PURE__ */ jsxs190(Fragment67, { children: [
|
|
28405
28411
|
/* @__PURE__ */ jsxs190(Button, { size: "sm", onClick: () => setOpen(true), children: [
|
|
28406
28412
|
/* @__PURE__ */ jsx314(PlusCircle2, { className: "me-3 h-3.5 w-3.5" }),
|
|
28407
28413
|
t(`common.association.label`, {
|
|
@@ -28674,12 +28680,12 @@ __name(OAuthScopeSelector, "OAuthScopeSelector");
|
|
|
28674
28680
|
|
|
28675
28681
|
// src/features/oauth/components/OAuthClientSecretDisplay.tsx
|
|
28676
28682
|
import { useTranslations as useTranslations179 } from "next-intl";
|
|
28677
|
-
import { useState as
|
|
28683
|
+
import { useState as useState125, useCallback as useCallback59 } from "react";
|
|
28678
28684
|
import { Copy as Copy3, Check, AlertTriangle } from "lucide-react";
|
|
28679
28685
|
import { jsx as jsx319, jsxs as jsxs193 } from "react/jsx-runtime";
|
|
28680
28686
|
function OAuthClientSecretDisplay({ secret, onDismiss, open, clientName }) {
|
|
28681
28687
|
const t = useTranslations179();
|
|
28682
|
-
const [copied, setCopied] =
|
|
28688
|
+
const [copied, setCopied] = useState125(false);
|
|
28683
28689
|
const handleCopy = useCallback59(async () => {
|
|
28684
28690
|
try {
|
|
28685
28691
|
await navigator.clipboard.writeText(secret);
|
|
@@ -28877,7 +28883,7 @@ __name(OAuthClientList, "OAuthClientList");
|
|
|
28877
28883
|
|
|
28878
28884
|
// src/features/oauth/components/OAuthClientForm.tsx
|
|
28879
28885
|
import { useTranslations as useTranslations182 } from "next-intl";
|
|
28880
|
-
import { useState as
|
|
28886
|
+
import { useState as useState126, useCallback as useCallback60 } from "react";
|
|
28881
28887
|
import { jsx as jsx322, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
28882
28888
|
function OAuthClientForm({
|
|
28883
28889
|
client,
|
|
@@ -28889,14 +28895,14 @@ function OAuthClientForm({
|
|
|
28889
28895
|
}) {
|
|
28890
28896
|
const t = useTranslations182();
|
|
28891
28897
|
const isEditMode = !!client;
|
|
28892
|
-
const [formState, setFormState] =
|
|
28898
|
+
const [formState, setFormState] = useState126({
|
|
28893
28899
|
name: client?.name || "",
|
|
28894
28900
|
description: client?.description || "",
|
|
28895
28901
|
redirectUris: client?.redirectUris?.length ? client.redirectUris : [""],
|
|
28896
28902
|
allowedScopes: client ? client.allowedScopes || [] : defaultScopes,
|
|
28897
28903
|
isConfidential: client?.isConfidential ?? true
|
|
28898
28904
|
});
|
|
28899
|
-
const [errors, setErrors] =
|
|
28905
|
+
const [errors, setErrors] = useState126({});
|
|
28900
28906
|
const validate = useCallback60(() => {
|
|
28901
28907
|
const newErrors = {};
|
|
28902
28908
|
if (!formState.name.trim()) {
|
|
@@ -29024,9 +29030,9 @@ __name(OAuthClientForm, "OAuthClientForm");
|
|
|
29024
29030
|
|
|
29025
29031
|
// src/features/oauth/components/OAuthClientDetail.tsx
|
|
29026
29032
|
import { useTranslations as useTranslations183 } from "next-intl";
|
|
29027
|
-
import { useState as
|
|
29033
|
+
import { useState as useState127, useCallback as useCallback61 } from "react";
|
|
29028
29034
|
import { Copy as Copy4, Check as Check2, RefreshCw as RefreshCw3, Pencil as Pencil2, Trash2 as Trash25, ExternalLink } from "lucide-react";
|
|
29029
|
-
import { Fragment as
|
|
29035
|
+
import { Fragment as Fragment68, jsx as jsx323, jsxs as jsxs197 } from "react/jsx-runtime";
|
|
29030
29036
|
function OAuthClientDetail({
|
|
29031
29037
|
client,
|
|
29032
29038
|
isLoading = false,
|
|
@@ -29037,11 +29043,11 @@ function OAuthClientDetail({
|
|
|
29037
29043
|
const t = useTranslations183();
|
|
29038
29044
|
const { format } = useDateFormatter();
|
|
29039
29045
|
const scopeText = useOAuthScopeText();
|
|
29040
|
-
const [copiedField, setCopiedField] =
|
|
29041
|
-
const [showDeleteConfirm, setShowDeleteConfirm] =
|
|
29042
|
-
const [showRegenerateConfirm, setShowRegenerateConfirm] =
|
|
29043
|
-
const [isDeleting, setIsDeleting] =
|
|
29044
|
-
const [isRegenerating, setIsRegenerating] =
|
|
29046
|
+
const [copiedField, setCopiedField] = useState127(null);
|
|
29047
|
+
const [showDeleteConfirm, setShowDeleteConfirm] = useState127(false);
|
|
29048
|
+
const [showRegenerateConfirm, setShowRegenerateConfirm] = useState127(false);
|
|
29049
|
+
const [isDeleting, setIsDeleting] = useState127(false);
|
|
29050
|
+
const [isRegenerating, setIsRegenerating] = useState127(false);
|
|
29045
29051
|
const copyToClipboard2 = useCallback61(async (text, field) => {
|
|
29046
29052
|
try {
|
|
29047
29053
|
await navigator.clipboard.writeText(text);
|
|
@@ -29072,7 +29078,7 @@ function OAuthClientDetail({
|
|
|
29072
29078
|
}
|
|
29073
29079
|
}, [onRegenerateSecret]);
|
|
29074
29080
|
const createdDate = client.createdAt ? format(new Date(client.createdAt), "dateLong") : t("oauth.ui.card.unknown");
|
|
29075
|
-
return /* @__PURE__ */ jsxs197(
|
|
29081
|
+
return /* @__PURE__ */ jsxs197(Fragment68, { children: [
|
|
29076
29082
|
/* @__PURE__ */ jsxs197(Card, { children: [
|
|
29077
29083
|
/* @__PURE__ */ jsx323(CardHeader, { children: /* @__PURE__ */ jsxs197("div", { className: "flex items-start justify-between", children: [
|
|
29078
29084
|
/* @__PURE__ */ jsxs197("div", { children: [
|
|
@@ -29246,7 +29252,7 @@ function OAuthConsentActions({ onApprove, onDeny, isLoading = false }) {
|
|
|
29246
29252
|
__name(OAuthConsentActions, "OAuthConsentActions");
|
|
29247
29253
|
|
|
29248
29254
|
// src/features/oauth/components/consent/OAuthConsentScreen.tsx
|
|
29249
|
-
import { ExternalLink as ExternalLink2, AlertTriangle as AlertTriangle2, Loader2 as
|
|
29255
|
+
import { ExternalLink as ExternalLink2, AlertTriangle as AlertTriangle2, Loader2 as Loader29 } from "lucide-react";
|
|
29250
29256
|
import { useTranslations as useTranslations188 } from "next-intl";
|
|
29251
29257
|
|
|
29252
29258
|
// src/features/oauth/components/consent/OAuthCompanySelector.tsx
|
|
@@ -29281,7 +29287,7 @@ function OAuthCompanySelector({ companies, value, onChange }) {
|
|
|
29281
29287
|
__name(OAuthCompanySelector, "OAuthCompanySelector");
|
|
29282
29288
|
|
|
29283
29289
|
// src/features/oauth/components/consent/OAuthConsentScreen.tsx
|
|
29284
|
-
import { Fragment as
|
|
29290
|
+
import { Fragment as Fragment69, jsx as jsx328, jsxs as jsxs202 } from "react/jsx-runtime";
|
|
29285
29291
|
function OAuthConsentScreen({
|
|
29286
29292
|
params,
|
|
29287
29293
|
logoUrl,
|
|
@@ -29297,7 +29303,7 @@ function OAuthConsentScreen({
|
|
|
29297
29303
|
);
|
|
29298
29304
|
if (isLoading) {
|
|
29299
29305
|
return /* @__PURE__ */ jsx328("div", { className: "min-h-dvh flex items-center justify-center p-4", children: /* @__PURE__ */ jsx328(Card, { className: "w-full max-w-md", children: /* @__PURE__ */ jsxs202(CardContent, { className: "flex flex-col items-center justify-center py-12", children: [
|
|
29300
|
-
/* @__PURE__ */ jsx328(
|
|
29306
|
+
/* @__PURE__ */ jsx328(Loader29, { className: "h-8 w-8 animate-spin text-muted-foreground" }),
|
|
29301
29307
|
/* @__PURE__ */ jsx328("p", { className: "mt-4 text-muted-foreground text-sm", children: t("oauth.consent.loading") })
|
|
29302
29308
|
] }) }) });
|
|
29303
29309
|
}
|
|
@@ -29315,7 +29321,7 @@ function OAuthConsentScreen({
|
|
|
29315
29321
|
/* @__PURE__ */ jsx328(Separator, {}),
|
|
29316
29322
|
/* @__PURE__ */ jsx328(OAuthScopeList, { scopes }),
|
|
29317
29323
|
/* @__PURE__ */ jsx328(Separator, {}),
|
|
29318
|
-
companies.length > 1 && /* @__PURE__ */ jsxs202(
|
|
29324
|
+
companies.length > 1 && /* @__PURE__ */ jsxs202(Fragment69, { children: [
|
|
29319
29325
|
/* @__PURE__ */ jsx328(OAuthCompanySelector, { companies, value: companyId, onChange: setCompanyId }),
|
|
29320
29326
|
/* @__PURE__ */ jsx328(Separator, {})
|
|
29321
29327
|
] }),
|
|
@@ -29346,7 +29352,7 @@ __name(OAuthConsentScreen, "OAuthConsentScreen");
|
|
|
29346
29352
|
import { zodResolver as zodResolver13 } from "@hookform/resolvers/zod";
|
|
29347
29353
|
import { CheckCircle as CheckCircle2, Mail as Mail2 } from "lucide-react";
|
|
29348
29354
|
import { useTranslations as useTranslations189 } from "next-intl";
|
|
29349
|
-
import { useState as
|
|
29355
|
+
import { useState as useState128 } from "react";
|
|
29350
29356
|
import { useForm as useForm13 } from "react-hook-form";
|
|
29351
29357
|
import { v4 as v415 } from "uuid";
|
|
29352
29358
|
import { z as z14 } from "zod";
|
|
@@ -29445,11 +29451,11 @@ function WaitlistQuestionnaireRenderer({
|
|
|
29445
29451
|
__name(WaitlistQuestionnaireRenderer, "WaitlistQuestionnaireRenderer");
|
|
29446
29452
|
|
|
29447
29453
|
// src/features/waitlist/components/forms/WaitlistForm.tsx
|
|
29448
|
-
import { Fragment as
|
|
29454
|
+
import { Fragment as Fragment70, jsx as jsx330, jsxs as jsxs204 } from "react/jsx-runtime";
|
|
29449
29455
|
function WaitlistForm({ onSuccess }) {
|
|
29450
29456
|
const t = useTranslations189();
|
|
29451
|
-
const [isSubmitting, setIsSubmitting] =
|
|
29452
|
-
const [isSuccess, setIsSuccess] =
|
|
29457
|
+
const [isSubmitting, setIsSubmitting] = useState128(false);
|
|
29458
|
+
const [isSuccess, setIsSuccess] = useState128(false);
|
|
29453
29459
|
const config = getWaitlistConfig();
|
|
29454
29460
|
const questionnaireFields = config.questionnaire ?? [];
|
|
29455
29461
|
const questionnaireSchema = questionnaireFields.reduce(
|
|
@@ -29565,7 +29571,7 @@ function WaitlistForm({ onSuccess }) {
|
|
|
29565
29571
|
{
|
|
29566
29572
|
form,
|
|
29567
29573
|
id: "gdprConsent",
|
|
29568
|
-
label: /* @__PURE__ */ jsxs204(
|
|
29574
|
+
label: /* @__PURE__ */ jsxs204(Fragment70, { children: [
|
|
29569
29575
|
t("auth.gdpr.terms_prefix"),
|
|
29570
29576
|
/* @__PURE__ */ jsx330(Link, { href: "/terms", target: "_blank", rel: "noopener", children: t("auth.gdpr.terms_of_service") }),
|
|
29571
29577
|
t("auth.gdpr.and"),
|
|
@@ -29628,14 +29634,14 @@ function WaitlistSuccessState() {
|
|
|
29628
29634
|
__name(WaitlistSuccessState, "WaitlistSuccessState");
|
|
29629
29635
|
|
|
29630
29636
|
// src/features/waitlist/components/sections/WaitlistConfirmation.tsx
|
|
29631
|
-
import { CheckCircle as CheckCircle5, Loader2 as
|
|
29637
|
+
import { CheckCircle as CheckCircle5, Loader2 as Loader210, XCircle as XCircle3 } from "lucide-react";
|
|
29632
29638
|
import { useTranslations as useTranslations191 } from "next-intl";
|
|
29633
|
-
import { useEffect as useEffect92, useState as
|
|
29639
|
+
import { useEffect as useEffect92, useState as useState129 } from "react";
|
|
29634
29640
|
import { jsx as jsx333, jsxs as jsxs207 } from "react/jsx-runtime";
|
|
29635
29641
|
function WaitlistConfirmation({ code }) {
|
|
29636
29642
|
const t = useTranslations191();
|
|
29637
|
-
const [state, setState] =
|
|
29638
|
-
const [errorMessage, setErrorMessage] =
|
|
29643
|
+
const [state, setState] = useState129("loading");
|
|
29644
|
+
const [errorMessage, setErrorMessage] = useState129("");
|
|
29639
29645
|
useEffect92(() => {
|
|
29640
29646
|
async function confirmEmail() {
|
|
29641
29647
|
try {
|
|
@@ -29651,7 +29657,7 @@ function WaitlistConfirmation({ code }) {
|
|
|
29651
29657
|
}, [code, t]);
|
|
29652
29658
|
if (state === "loading") {
|
|
29653
29659
|
return /* @__PURE__ */ jsxs207("div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
|
|
29654
|
-
/* @__PURE__ */ jsx333(
|
|
29660
|
+
/* @__PURE__ */ jsx333(Loader210, { className: "text-primary h-12 w-12 animate-spin" }),
|
|
29655
29661
|
/* @__PURE__ */ jsx333("p", { className: "text-muted-foreground", children: t("waitlist.confirmation.loading") })
|
|
29656
29662
|
] });
|
|
29657
29663
|
}
|
|
@@ -29675,12 +29681,12 @@ __name(WaitlistConfirmation, "WaitlistConfirmation");
|
|
|
29675
29681
|
// src/features/waitlist/components/lists/WaitlistList.tsx
|
|
29676
29682
|
import { RefreshCw as RefreshCw4 } from "lucide-react";
|
|
29677
29683
|
import { useTranslations as useTranslations192 } from "next-intl";
|
|
29678
|
-
import { useCallback as useCallback62, useEffect as useEffect93, useMemo as useMemo69, useState as
|
|
29684
|
+
import { useCallback as useCallback62, useEffect as useEffect93, useMemo as useMemo69, useState as useState130 } from "react";
|
|
29679
29685
|
import { jsx as jsx334, jsxs as jsxs208 } from "react/jsx-runtime";
|
|
29680
29686
|
function WaitlistList({ fullWidth } = {}) {
|
|
29681
29687
|
const t = useTranslations192();
|
|
29682
|
-
const [statusFilter, setStatusFilter] =
|
|
29683
|
-
const [stats, setStats] =
|
|
29688
|
+
const [statusFilter, setStatusFilter] = useState130("all");
|
|
29689
|
+
const [stats, setStats] = useState130(void 0);
|
|
29684
29690
|
const data = useDataListRetriever({
|
|
29685
29691
|
retriever: /* @__PURE__ */ __name((params) => WaitlistService.findMany(params), "retriever"),
|
|
29686
29692
|
retrieverParams: {},
|
|
@@ -29777,7 +29783,7 @@ __name(WaitlistList, "WaitlistList");
|
|
|
29777
29783
|
// src/features/rbac/components/RbacContainer.tsx
|
|
29778
29784
|
import { Loader2Icon as Loader2Icon4 } from "lucide-react";
|
|
29779
29785
|
import { useTranslations as useTranslations194 } from "next-intl";
|
|
29780
|
-
import { memo as memo2, useCallback as useCallback64, useEffect as useEffect95, useMemo as useMemo70, useRef as useRef50, useState as
|
|
29786
|
+
import { memo as memo2, useCallback as useCallback64, useEffect as useEffect95, useMemo as useMemo70, useRef as useRef50, useState as useState132 } from "react";
|
|
29781
29787
|
|
|
29782
29788
|
// src/features/rbac/components/RbacPermissionCell.tsx
|
|
29783
29789
|
import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon14 } from "lucide-react";
|
|
@@ -29858,8 +29864,8 @@ __name(RbacPermissionCell, "RbacPermissionCell");
|
|
|
29858
29864
|
import { Popover as PopoverPrimitive2 } from "@base-ui/react/popover";
|
|
29859
29865
|
import { CheckIcon as CheckIcon10, MinusIcon as MinusIcon3, XIcon as XIcon15 } from "lucide-react";
|
|
29860
29866
|
import { useTranslations as useTranslations193 } from "next-intl";
|
|
29861
|
-
import { useCallback as useCallback63, useEffect as useEffect94, useState as
|
|
29862
|
-
import { Fragment as
|
|
29867
|
+
import { useCallback as useCallback63, useEffect as useEffect94, useState as useState131 } from "react";
|
|
29868
|
+
import { Fragment as Fragment71, jsx as jsx336, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
29863
29869
|
function RbacPermissionPicker({
|
|
29864
29870
|
open,
|
|
29865
29871
|
anchor,
|
|
@@ -29871,7 +29877,7 @@ function RbacPermissionPicker({
|
|
|
29871
29877
|
onClose
|
|
29872
29878
|
}) {
|
|
29873
29879
|
const t = useTranslations193();
|
|
29874
|
-
const [customSegment, setCustomSegment] =
|
|
29880
|
+
const [customSegment, setCustomSegment] = useState131("");
|
|
29875
29881
|
useEffect94(() => {
|
|
29876
29882
|
if (!open) setCustomSegment("");
|
|
29877
29883
|
}, [open]);
|
|
@@ -29945,7 +29951,7 @@ function RbacPermissionPicker({
|
|
|
29945
29951
|
)
|
|
29946
29952
|
] })
|
|
29947
29953
|
] }),
|
|
29948
|
-
isRoleColumn && onClear && /* @__PURE__ */ jsxs210(
|
|
29954
|
+
isRoleColumn && onClear && /* @__PURE__ */ jsxs210(Fragment71, { children: [
|
|
29949
29955
|
/* @__PURE__ */ jsx336(Separator, {}),
|
|
29950
29956
|
/* @__PURE__ */ jsxs210(
|
|
29951
29957
|
Button,
|
|
@@ -30120,8 +30126,8 @@ var ModuleEditor = memo2(/* @__PURE__ */ __name(function ModuleEditor2({
|
|
|
30120
30126
|
function RbacContainer() {
|
|
30121
30127
|
const t = useTranslations194();
|
|
30122
30128
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
30123
|
-
const [selectedModuleId, setSelectedModuleId] =
|
|
30124
|
-
const [activePicker, setActivePicker] =
|
|
30129
|
+
const [selectedModuleId, setSelectedModuleId] = useState132(null);
|
|
30130
|
+
const [activePicker, setActivePicker] = useState132(null);
|
|
30125
30131
|
const openPicker = useCallback64((picker) => {
|
|
30126
30132
|
setActivePicker(picker);
|
|
30127
30133
|
}, []);
|
|
@@ -30232,7 +30238,7 @@ __name(RbacContainer, "RbacContainer");
|
|
|
30232
30238
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
30233
30239
|
import { Loader2Icon as Loader2Icon5 } from "lucide-react";
|
|
30234
30240
|
import { useTranslations as useTranslations195 } from "next-intl";
|
|
30235
|
-
import { Fragment as
|
|
30241
|
+
import { Fragment as Fragment72, memo as memo3, useCallback as useCallback65, useEffect as useEffect96, useMemo as useMemo71, useRef as useRef51, useState as useState133 } from "react";
|
|
30236
30242
|
import { jsx as jsx338, jsxs as jsxs212 } from "react/jsx-runtime";
|
|
30237
30243
|
function findToken2(tokens, action) {
|
|
30238
30244
|
if (!tokens) return void 0;
|
|
@@ -30270,8 +30276,8 @@ var ACTION_LABEL_KEYS2 = {
|
|
|
30270
30276
|
function RbacByRoleContainer() {
|
|
30271
30277
|
const t = useTranslations195();
|
|
30272
30278
|
const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
|
|
30273
|
-
const [selectedRoleId, setSelectedRoleId] =
|
|
30274
|
-
const [activePicker, setActivePicker] =
|
|
30279
|
+
const [selectedRoleId, setSelectedRoleId] = useState133(null);
|
|
30280
|
+
const [activePicker, setActivePicker] = useState133(null);
|
|
30275
30281
|
const openPicker = useCallback65((picker) => {
|
|
30276
30282
|
setActivePicker(picker);
|
|
30277
30283
|
}, []);
|
|
@@ -30358,7 +30364,7 @@ function RbacByRoleContainer() {
|
|
|
30358
30364
|
const defaultTokens = block.default ?? [];
|
|
30359
30365
|
const roleTokens = block[selectedRoleId];
|
|
30360
30366
|
const moduleLabel = moduleNames?.[moduleId] ?? moduleId;
|
|
30361
|
-
return /* @__PURE__ */ jsxs212(
|
|
30367
|
+
return /* @__PURE__ */ jsxs212(Fragment72, { children: [
|
|
30362
30368
|
/* @__PURE__ */ jsx338("tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ jsx338(
|
|
30363
30369
|
"td",
|
|
30364
30370
|
{
|
|
@@ -31062,4 +31068,4 @@ export {
|
|
|
31062
31068
|
useOAuthClients,
|
|
31063
31069
|
useOAuthClient
|
|
31064
31070
|
};
|
|
31065
|
-
//# sourceMappingURL=chunk-
|
|
31071
|
+
//# sourceMappingURL=chunk-MNN6MTEN.mjs.map
|