@carlonicora/nextjs-jsonapi 3.25.0 → 3.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-46O3JC4Z.mjs → BlockNoteEditor-VET2JD72.mjs} +13 -3
- package/dist/{BlockNoteEditor-46O3JC4Z.mjs.map → BlockNoteEditor-VET2JD72.mjs.map} +1 -1
- package/dist/{BlockNoteEditor-HKS6AXDA.js → BlockNoteEditor-WUC2NRGI.js} +20 -10
- package/dist/BlockNoteEditor-WUC2NRGI.js.map +1 -0
- package/dist/billing/index.js +335 -335
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-Y3OKEQGL.js → chunk-425GLYXN.js} +580 -363
- package/dist/chunk-425GLYXN.js.map +1 -0
- package/dist/{chunk-XDYILJ2S.mjs → chunk-7SJ4HKDR.mjs} +548 -331
- package/dist/chunk-7SJ4HKDR.mjs.map +1 -0
- package/dist/{chunk-KLV6RLDE.js → chunk-GKDHYB2R.js} +2 -2
- package/dist/chunk-GKDHYB2R.js.map +1 -0
- package/dist/{chunk-4Z2UONN2.mjs → chunk-U65JPKO3.mjs} +2 -2
- package/dist/chunk-U65JPKO3.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +16 -3
- package/dist/components/index.d.ts +16 -3
- package/dist/components/index.js +4 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/features/analytics/index.js +100 -100
- package/dist/features/analytics/index.js.map +1 -1
- package/dist/features/analytics/index.mjs +5 -5
- package/dist/features/analytics/index.mjs.map +1 -1
- package/dist/features/help/index.js +36 -36
- package/dist/features/help/index.js.map +1 -1
- package/dist/features/help/index.mjs +6 -6
- package/dist/features/help/index.mjs.map +1 -1
- package/dist/features/tokenusage/index.js +103 -103
- package/dist/features/tokenusage/index.js.map +1 -1
- package/dist/features/tokenusage/index.mjs +4 -4
- package/dist/features/tokenusage/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/containers/PageContainer.tsx +3 -1
- package/src/components/containers/RoundPageContainer.tsx +63 -16
- package/src/components/containers/RoundPageContainerTitle.tsx +75 -35
- package/src/components/editors/BlockNoteEditor.tsx +13 -1
- package/src/components/forms/EntityMultiSelector.tsx +4 -4
- package/src/components/forms/EntitySelector.tsx +4 -4
- package/src/components/forms/FormBlockNote.tsx +27 -1
- package/src/components/forms/FormCheckbox.tsx +3 -2
- package/src/components/forms/__tests__/useEditorDialog.test.ts +47 -0
- package/src/components/forms/useEditorDialog.ts +22 -0
- package/src/components/navigations/Breadcrumb.tsx +45 -16
- package/src/components/navigations/Header.tsx +18 -3
- package/src/components/navigations/MobileNavigationBar.tsx +12 -0
- package/src/components/navigations/__tests__/MobileNavigationBar.spec.tsx +17 -0
- package/src/components/tables/ContentListTable.tsx +52 -32
- package/src/features/analytics/components/AnalyticsAdminFilterBar.tsx +9 -6
- package/src/features/analytics/components/AnalyticsBreakdownTable.tsx +2 -1
- package/src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx +3 -1
- package/src/features/assistant/components/parts/AssistantComposer.tsx +3 -1
- package/src/features/assistant-message/components/MessageItem.tsx +2 -2
- package/src/features/assistant-message/components/parts/tabs/CitationsTab.tsx +25 -5
- package/src/features/auth/components/containers/AuthContainer.tsx +8 -1
- package/src/features/company/components/details/CompanyContent.tsx +3 -1
- package/src/features/company/components/details/CompanyDetails.tsx +9 -1
- package/src/features/company/components/details/TokenStatusIndicator.tsx +42 -13
- package/src/features/help/components/HelpHeader.tsx +7 -5
- package/src/features/tokenusage/components/TokenUsageAdminFilterBar.tsx +9 -6
- package/src/features/tokenusage/lib/__tests__/formatters.spec.ts +21 -0
- package/src/features/tokenusage/lib/formatters.ts +5 -1
- package/src/shadcnui/ui/button.tsx +1 -1
- package/src/shadcnui/ui/checkbox.tsx +1 -1
- package/src/shadcnui/ui/command.tsx +7 -4
- package/src/shadcnui/ui/dialog.tsx +2 -0
- package/src/shadcnui/ui/input.tsx +1 -1
- package/src/shadcnui/ui/popover.tsx +9 -0
- package/src/shadcnui/ui/select.tsx +1 -1
- package/src/shadcnui/ui/sheet.tsx +8 -1
- package/src/shadcnui/ui/table.tsx +5 -2
- package/src/shadcnui/ui/textarea.tsx +1 -1
- package/dist/BlockNoteEditor-HKS6AXDA.js.map +0 -1
- package/dist/chunk-4Z2UONN2.mjs.map +0 -1
- package/dist/chunk-KLV6RLDE.js.map +0 -1
- package/dist/chunk-XDYILJ2S.mjs.map +0 -1
- package/dist/chunk-Y3OKEQGL.js.map +0 -1
|
@@ -243,7 +243,7 @@ var buttonVariants = cva2(
|
|
|
243
243
|
link: "text-primary"
|
|
244
244
|
},
|
|
245
245
|
size: {
|
|
246
|
-
default: "h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
246
|
+
default: "h-7 max-md:h-9 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
247
247
|
xs: "h-5 gap-1 rounded-sm px-2 text-xs/relaxed has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-2.5",
|
|
248
248
|
sm: "h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
249
249
|
lg: "h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -1310,7 +1310,7 @@ function Checkbox({ className, ...props }) {
|
|
|
1310
1310
|
{
|
|
1311
1311
|
"data-slot": "checkbox",
|
|
1312
1312
|
className: cn(
|
|
1313
|
-
"border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-[4px] border transition-shadow group-has-disabled/field:opacity-50 focus-visible:ring-[2px] aria-invalid:ring-[2px] peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
1313
|
+
"border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-[4px] border transition-shadow group-has-disabled/field:opacity-50 focus-visible:ring-[2px] aria-invalid:ring-[2px] peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 max-md:after:-inset-y-3 cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
1314
1314
|
className
|
|
1315
1315
|
),
|
|
1316
1316
|
...props,
|
|
@@ -1360,7 +1360,7 @@ function Input({ className, type, ...props }) {
|
|
|
1360
1360
|
type,
|
|
1361
1361
|
"data-slot": "input",
|
|
1362
1362
|
className: cn(
|
|
1363
|
-
"bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-7 rounded-md border px-2 py-0.5 text-
|
|
1363
|
+
"bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-7 max-md:h-10 rounded-md border px-2 py-0.5 text-base transition-colors file:h-6 file:text-xs/relaxed file:font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] md:text-xs/relaxed file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1364
1364
|
className
|
|
1365
1365
|
),
|
|
1366
1366
|
...props
|
|
@@ -1377,7 +1377,7 @@ function Textarea({ className, ...props }) {
|
|
|
1377
1377
|
{
|
|
1378
1378
|
"data-slot": "textarea",
|
|
1379
1379
|
className: cn(
|
|
1380
|
-
"border-input bg-input/20 dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 resize-none rounded-md border px-2 py-2 text-
|
|
1380
|
+
"border-input bg-input/20 dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 resize-none rounded-md border px-2 py-2 text-base transition-colors focus-visible:ring-[2px] aria-invalid:ring-[2px] md:text-xs/relaxed placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1381
1381
|
className
|
|
1382
1382
|
),
|
|
1383
1383
|
...props
|
|
@@ -1812,6 +1812,8 @@ function DialogContent({
|
|
|
1812
1812
|
className: cn(
|
|
1813
1813
|
// rtl-ok: symmetric centering (`left-1/2` + `-translate-x-1/2`) — identical in LTR and RTL
|
|
1814
1814
|
"bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 grid gap-4 rounded-xl p-4 text-xs/relaxed ring-1 duration-100 fixed top-1/2 left-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 outline-none",
|
|
1815
|
+
// Phone: never wider or taller than the screen; the dialog scrolls inside.
|
|
1816
|
+
"max-md:max-h-[calc(100svh-2rem)] max-md:max-w-[calc(100vw-2rem)] max-md:overflow-y-auto",
|
|
1815
1817
|
className
|
|
1816
1818
|
),
|
|
1817
1819
|
...props,
|
|
@@ -1883,7 +1885,7 @@ function Command({ className, ...props }) {
|
|
|
1883
1885
|
{
|
|
1884
1886
|
"data-slot": "command",
|
|
1885
1887
|
className: cn(
|
|
1886
|
-
"bg-popover text-popover-foreground rounded-xl p-1 flex size-full flex-col overflow-hidden",
|
|
1888
|
+
"bg-popover text-popover-foreground rounded-xl p-1 flex size-full flex-col overflow-hidden max-md:min-h-0",
|
|
1887
1889
|
"[[data-slot=dialog-content]_&]:bg-transparent [[data-slot=dialog-content]_&]:text-foreground",
|
|
1888
1890
|
className
|
|
1889
1891
|
),
|
|
@@ -1910,13 +1912,13 @@ function CommandDialog({
|
|
|
1910
1912
|
}
|
|
1911
1913
|
__name(CommandDialog, "CommandDialog");
|
|
1912
1914
|
function CommandInput({ className, ...props }) {
|
|
1913
|
-
return /* @__PURE__ */ jsx19("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ jsxs8(InputGroup, { className: "bg-input/20 dark:bg-input/30 h-8!", children: [
|
|
1915
|
+
return /* @__PURE__ */ jsx19("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ jsxs8(InputGroup, { className: "bg-input/20 dark:bg-input/30 h-8! max-md:h-10!", children: [
|
|
1914
1916
|
/* @__PURE__ */ jsx19(
|
|
1915
1917
|
CommandPrimitive.Input,
|
|
1916
1918
|
{
|
|
1917
1919
|
"data-slot": "command-input",
|
|
1918
1920
|
className: cn(
|
|
1919
|
-
"w-full text-xs/relaxed outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
1921
|
+
"w-full text-xs/relaxed max-md:text-base outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
1920
1922
|
className
|
|
1921
1923
|
),
|
|
1922
1924
|
...props
|
|
@@ -1931,7 +1933,10 @@ function CommandList({ className, ...props }) {
|
|
|
1931
1933
|
CommandPrimitive.List,
|
|
1932
1934
|
{
|
|
1933
1935
|
"data-slot": "command-list",
|
|
1934
|
-
className: cn(
|
|
1936
|
+
className: cn(
|
|
1937
|
+
"no-scrollbar max-h-72 max-md:min-h-0 scroll-py-1 outline-none overflow-x-hidden overflow-y-auto",
|
|
1938
|
+
className
|
|
1939
|
+
),
|
|
1935
1940
|
...props
|
|
1936
1941
|
}
|
|
1937
1942
|
);
|
|
@@ -3128,6 +3133,7 @@ function PopoverContent({
|
|
|
3128
3133
|
anchor,
|
|
3129
3134
|
...props
|
|
3130
3135
|
}) {
|
|
3136
|
+
const matchesAnchorWidth = typeof className === "string" && className.includes("--anchor-width");
|
|
3131
3137
|
return /* @__PURE__ */ jsx31(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx31(
|
|
3132
3138
|
PopoverPrimitive.Positioner,
|
|
3133
3139
|
{
|
|
@@ -3143,6 +3149,11 @@ function PopoverContent({
|
|
|
3143
3149
|
"data-slot": "popover-content",
|
|
3144
3150
|
className: cn(
|
|
3145
3151
|
"bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 flex flex-col gap-4 rounded-lg p-2.5 text-xs shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden",
|
|
3152
|
+
// Phone: never taller than the space the positioner reports (the
|
|
3153
|
+
// keyboard shrinks it), so a picker list shrinks and scrolls instead
|
|
3154
|
+
// of running under the keyboard.
|
|
3155
|
+
"max-md:max-h-(--available-height) max-md:overflow-y-auto",
|
|
3156
|
+
matchesAnchorWidth && "max-md:min-w-[min(20rem,calc(100vw-2rem))]",
|
|
3146
3157
|
className
|
|
3147
3158
|
),
|
|
3148
3159
|
...props
|
|
@@ -3377,7 +3388,7 @@ function SelectTrigger({
|
|
|
3377
3388
|
"data-slot": "select-trigger",
|
|
3378
3389
|
"data-size": size,
|
|
3379
3390
|
className: cn(
|
|
3380
|
-
"border-input data-[placeholder]:text-muted-foreground bg-input/20 dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border px-2 py-1.5 text-xs/relaxed transition-colors focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-3.5 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
3391
|
+
"border-input data-[placeholder]:text-muted-foreground bg-input/20 dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-md border px-2 py-1.5 text-xs/relaxed transition-colors focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=default]:h-7 data-[size=sm]:h-6 max-md:data-[size=default]:h-10 max-md:text-base *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-3.5 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
3381
3392
|
className
|
|
3382
3393
|
),
|
|
3383
3394
|
...props,
|
|
@@ -3573,7 +3584,17 @@ function SheetContent({
|
|
|
3573
3584
|
SheetPrimitive.Close,
|
|
3574
3585
|
{
|
|
3575
3586
|
"data-slot": "sheet-close",
|
|
3576
|
-
render:
|
|
3587
|
+
render: (
|
|
3588
|
+
// Phone: a 40px tap target, moved by 8px so its centre stays where the 24px one sits.
|
|
3589
|
+
/* @__PURE__ */ jsx37(
|
|
3590
|
+
Button,
|
|
3591
|
+
{
|
|
3592
|
+
variant: "ghost",
|
|
3593
|
+
className: "absolute top-4 end-4 max-md:top-2 max-md:end-2 max-md:size-10",
|
|
3594
|
+
size: "icon-sm"
|
|
3595
|
+
}
|
|
3596
|
+
)
|
|
3597
|
+
),
|
|
3577
3598
|
children: [
|
|
3578
3599
|
/* @__PURE__ */ jsx37(XIcon3, {}),
|
|
3579
3600
|
/* @__PURE__ */ jsx37("span", { className: "sr-only", children: "Close" })
|
|
@@ -4466,7 +4487,7 @@ __name(Switch, "Switch");
|
|
|
4466
4487
|
// src/shadcnui/ui/table.tsx
|
|
4467
4488
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
4468
4489
|
function Table({ className, ...props }) {
|
|
4469
|
-
return /* @__PURE__ */ jsx45("div", { "data-slot": "table-container", className: "relative w-full overflow-x-clip", children: /* @__PURE__ */ jsx45("table", { "data-slot": "table", className: cn("w-full caption-bottom text-xs", className), ...props }) });
|
|
4490
|
+
return /* @__PURE__ */ jsx45("div", { "data-slot": "table-container", className: "relative w-full overflow-x-clip max-md:overflow-x-auto", children: /* @__PURE__ */ jsx45("table", { "data-slot": "table", className: cn("w-full caption-bottom text-xs", className), ...props }) });
|
|
4470
4491
|
}
|
|
4471
4492
|
__name(Table, "Table");
|
|
4472
4493
|
function TableHeader({ className, ...props }) {
|
|
@@ -4518,7 +4539,10 @@ function TableCell({ className, ...props }) {
|
|
|
4518
4539
|
"td",
|
|
4519
4540
|
{
|
|
4520
4541
|
"data-slot": "table-cell",
|
|
4521
|
-
className: cn(
|
|
4542
|
+
className: cn(
|
|
4543
|
+
"p-2 align-middle whitespace-nowrap max-md:whitespace-normal [&:has([role=checkbox])]:pe-0",
|
|
4544
|
+
className
|
|
4545
|
+
),
|
|
4522
4546
|
...props
|
|
4523
4547
|
}
|
|
4524
4548
|
);
|
|
@@ -6534,7 +6558,7 @@ __name(useHeaderLogo, "useHeaderLogo");
|
|
|
6534
6558
|
|
|
6535
6559
|
// src/components/navigations/Breadcrumb.tsx
|
|
6536
6560
|
import { useTranslations as useTranslations51 } from "next-intl";
|
|
6537
|
-
import { Fragment as
|
|
6561
|
+
import { Fragment as Fragment21, useState as useState47 } from "react";
|
|
6538
6562
|
import { ChevronDownIcon as ChevronDownIcon8 } from "lucide-react";
|
|
6539
6563
|
|
|
6540
6564
|
// src/hooks/TableGeneratorRegistry.ts
|
|
@@ -7677,7 +7701,7 @@ var useAdministrationContext = /* @__PURE__ */ __name(() => {
|
|
|
7677
7701
|
|
|
7678
7702
|
// src/features/company/contexts/CompanyContext.tsx
|
|
7679
7703
|
import { useTranslations as useTranslations41 } from "next-intl";
|
|
7680
|
-
import { Fragment as
|
|
7704
|
+
import { Fragment as Fragment20, createContext as createContext17, useContext as useContext18, useState as useState36 } from "react";
|
|
7681
7705
|
|
|
7682
7706
|
// src/features/user/contexts/CurrentUserContext.tsx
|
|
7683
7707
|
import { getCookie } from "cookies-next";
|
|
@@ -8557,7 +8581,7 @@ function EntityMultiSelector({
|
|
|
8557
8581
|
/* @__PURE__ */ jsx68(PopoverTrigger, { className: "w-full", disabled, children: /* @__PURE__ */ jsxs33(
|
|
8558
8582
|
"div",
|
|
8559
8583
|
{
|
|
8560
|
-
className: `bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] flex min-h-7 w-full items-center gap-2 rounded-md border px-2 text-sm md:text-xs/relaxed ${disabled ? "cursor-not-allowed opacity-50" : ""}`,
|
|
8584
|
+
className: `bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] flex min-h-7 max-md:min-h-10 w-full items-center gap-2 rounded-md border px-2 text-sm md:text-xs/relaxed ${disabled ? "cursor-not-allowed opacity-50" : ""}`,
|
|
8561
8585
|
children: [
|
|
8562
8586
|
selectedValues.length > 0 ? /* @__PURE__ */ jsxs33(Fragment7, { children: [
|
|
8563
8587
|
/* @__PURE__ */ jsx68("span", { className: "text-foreground min-w-0 flex-1 truncate text-start", children: triggerSummary }),
|
|
@@ -8576,7 +8600,7 @@ function EntityMultiSelector({
|
|
|
8576
8600
|
ref: searchInputRef,
|
|
8577
8601
|
placeholder,
|
|
8578
8602
|
type: "text",
|
|
8579
|
-
className: "h-8 w-full pe-7 ps-7 text-xs",
|
|
8603
|
+
className: "h-8 w-full pe-7 ps-7 text-xs max-md:text-base",
|
|
8580
8604
|
value: searchTerm,
|
|
8581
8605
|
onChange: (e) => setSearchTerm(e.target.value)
|
|
8582
8606
|
}
|
|
@@ -8591,7 +8615,7 @@ function EntityMultiSelector({
|
|
|
8591
8615
|
}
|
|
8592
8616
|
)
|
|
8593
8617
|
] }),
|
|
8594
|
-
/* @__PURE__ */ jsx68("div", { className: "max-h-52 overflow-y-auto p-1", children: sortedOptions.length === 0 ? /* @__PURE__ */ jsx68("div", { className: "text-muted-foreground py-4 text-center text-xs", children: emptyText }) : sortedOptions.map((option) => {
|
|
8618
|
+
/* @__PURE__ */ jsx68("div", { className: "max-h-52 max-md:min-h-0 overflow-y-auto p-1", children: sortedOptions.length === 0 ? /* @__PURE__ */ jsx68("div", { className: "text-muted-foreground py-4 text-center text-xs", children: emptyText }) : sortedOptions.map((option) => {
|
|
8595
8619
|
const isSelected = selectedIds.has(option.id);
|
|
8596
8620
|
return /* @__PURE__ */ jsx68(
|
|
8597
8621
|
"button",
|
|
@@ -8635,7 +8659,7 @@ function EntityMultiSelector({
|
|
|
8635
8659
|
"button",
|
|
8636
8660
|
{
|
|
8637
8661
|
type: "button",
|
|
8638
|
-
className: "text-muted-foreground hover:text-foreground rounded-sm p-0.5 transition-colors",
|
|
8662
|
+
className: "text-muted-foreground hover:text-foreground rounded-sm p-0.5 max-md:p-2 transition-colors",
|
|
8639
8663
|
onClick: () => removeEntity(value.id),
|
|
8640
8664
|
children: /* @__PURE__ */ jsx68(XIcon5, { className: "size-3" })
|
|
8641
8665
|
}
|
|
@@ -9601,6 +9625,20 @@ import { PencilIcon as PencilIcon3 } from "lucide-react";
|
|
|
9601
9625
|
// src/components/forms/useEditorDialog.ts
|
|
9602
9626
|
import { useCallback as useCallback15, useEffect as useEffect16, useRef as useRef13, useState as useState22 } from "react";
|
|
9603
9627
|
var openEditorStack = [];
|
|
9628
|
+
var INNER_LAYER_SELECTOR = [
|
|
9629
|
+
"[data-slot=popover-content][data-open]",
|
|
9630
|
+
"[data-slot=select-content][data-open]",
|
|
9631
|
+
"[data-slot=combobox-content][data-open]",
|
|
9632
|
+
"[data-slot=dropdown-menu-content][data-open]",
|
|
9633
|
+
"[data-slot=context-menu-content][data-open]",
|
|
9634
|
+
"[data-slot=dialog-content][data-open]",
|
|
9635
|
+
"[data-slot=alert-dialog-content][data-open]",
|
|
9636
|
+
".bn-suggestion-menu"
|
|
9637
|
+
].join(",");
|
|
9638
|
+
function hasOpenInnerLayer(doc = document) {
|
|
9639
|
+
return doc.querySelector(INNER_LAYER_SELECTOR) !== null;
|
|
9640
|
+
}
|
|
9641
|
+
__name(hasOpenInnerLayer, "hasOpenInnerLayer");
|
|
9604
9642
|
function useEditorDialog(isFormDirty, options) {
|
|
9605
9643
|
const [open, setOpen] = useState22(false);
|
|
9606
9644
|
const [showDiscardConfirm, setShowDiscardConfirm] = useState22(false);
|
|
@@ -9652,6 +9690,7 @@ function useEditorDialog(isFormDirty, options) {
|
|
|
9652
9690
|
const handleKeyDown = /* @__PURE__ */ __name((event) => {
|
|
9653
9691
|
if (event.key === "Escape" && open) {
|
|
9654
9692
|
if (openEditorStack[openEditorStack.length - 1] !== dialogId.current) return;
|
|
9693
|
+
if (hasOpenInnerLayer()) return;
|
|
9655
9694
|
event.preventDefault();
|
|
9656
9695
|
event.stopPropagation();
|
|
9657
9696
|
handleOpenChange(false);
|
|
@@ -9986,7 +10025,7 @@ function EntitySelector({
|
|
|
9986
10025
|
/* @__PURE__ */ jsx88(PopoverTrigger, { className: "w-full", disabled, children: /* @__PURE__ */ jsxs49(
|
|
9987
10026
|
"div",
|
|
9988
10027
|
{
|
|
9989
|
-
className: `bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] flex min-h-7 w-full items-center gap-2 rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed ${hasValue(effectiveValue) ? "" : "text-muted-foreground"} ${disabled ? "cursor-not-allowed opacity-50" : ""}`,
|
|
10028
|
+
className: `bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] flex min-h-7 max-md:min-h-10 w-full items-center gap-2 rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed ${hasValue(effectiveValue) ? "" : "text-muted-foreground"} ${disabled ? "cursor-not-allowed opacity-50" : ""}`,
|
|
9990
10029
|
children: [
|
|
9991
10030
|
/* @__PURE__ */ jsx88("span", { className: "min-w-0 flex-1 truncate text-start", children: hasValue(effectiveValue) ? getSelectedItemDisplay ? getSelectedItemDisplay(effectiveValue) : effectiveValue?.name ?? "" : placeholder }),
|
|
9992
10031
|
hasValue(effectiveValue) && !disabled && /* @__PURE__ */ jsx88(
|
|
@@ -10005,7 +10044,7 @@ function EntitySelector({
|
|
|
10005
10044
|
) }),
|
|
10006
10045
|
/* @__PURE__ */ jsx88(PopoverContent, { align: "start", className: "w-(--anchor-width) pointer-events-auto", children: /* @__PURE__ */ jsxs49(Command, { shouldFilter: false, children: [
|
|
10007
10046
|
/* @__PURE__ */ jsxs49("div", { className: "relative mb-2 w-full", children: [
|
|
10008
|
-
/* @__PURE__ */ jsx88(SearchIcon3, { className: "text-muted-foreground absolute top-2.5 start-2.5 h-4 w-4" }),
|
|
10047
|
+
/* @__PURE__ */ jsx88(SearchIcon3, { className: "text-muted-foreground absolute top-2.5 max-md:top-3 start-2.5 h-4 w-4" }),
|
|
10009
10048
|
/* @__PURE__ */ jsx88(
|
|
10010
10049
|
Input,
|
|
10011
10050
|
{
|
|
@@ -10016,10 +10055,10 @@ function EntitySelector({
|
|
|
10016
10055
|
value: searchTerm
|
|
10017
10056
|
}
|
|
10018
10057
|
),
|
|
10019
|
-
isSearching ? /* @__PURE__ */ jsx88(RefreshCwIcon, { className: "text-muted-foreground absolute top-2.5 end-2.5 h-4 w-4 animate-spin" }) : searchTermRef.current ? /* @__PURE__ */ jsx88(
|
|
10058
|
+
isSearching ? /* @__PURE__ */ jsx88(RefreshCwIcon, { className: "text-muted-foreground absolute top-2.5 max-md:top-3 end-2.5 h-4 w-4 animate-spin" }) : searchTermRef.current ? /* @__PURE__ */ jsx88(
|
|
10020
10059
|
XIcon6,
|
|
10021
10060
|
{
|
|
10022
|
-
className: "absolute top-2.5 end-2.5 h-4 w-4 cursor-pointer",
|
|
10061
|
+
className: "absolute top-2.5 max-md:top-3 end-2.5 h-4 w-4 cursor-pointer",
|
|
10023
10062
|
onClick: () => {
|
|
10024
10063
|
setSearchTerm("");
|
|
10025
10064
|
search("");
|
|
@@ -10399,7 +10438,7 @@ import { useRef as useRef17 } from "react";
|
|
|
10399
10438
|
import dynamic from "next/dynamic";
|
|
10400
10439
|
import React18 from "react";
|
|
10401
10440
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
10402
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10441
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-VET2JD72.mjs"), {
|
|
10403
10442
|
ssr: false
|
|
10404
10443
|
});
|
|
10405
10444
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -10408,6 +10447,14 @@ var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function Edit
|
|
|
10408
10447
|
|
|
10409
10448
|
// src/components/forms/FormBlockNote.tsx
|
|
10410
10449
|
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
10450
|
+
function isEmptyDocument(value) {
|
|
10451
|
+
return value === void 0 || value === null || value === "" || Array.isArray(value) && value.length === 0;
|
|
10452
|
+
}
|
|
10453
|
+
__name(isEmptyDocument, "isEmptyDocument");
|
|
10454
|
+
function getPath(source, path) {
|
|
10455
|
+
return path.split(".").reduce((acc, key) => acc == null ? void 0 : acc[key], source);
|
|
10456
|
+
}
|
|
10457
|
+
__name(getPath, "getPath");
|
|
10411
10458
|
function FormBlockNote({
|
|
10412
10459
|
form,
|
|
10413
10460
|
id,
|
|
@@ -10441,6 +10488,10 @@ function FormBlockNote({
|
|
|
10441
10488
|
className: cn(
|
|
10442
10489
|
"flex w-full flex-col",
|
|
10443
10490
|
stretch && "min-h-0 flex-1 [&>[data-slot=field]]:min-h-0 [&>[data-slot=field]]:flex-1",
|
|
10491
|
+
// Phone: the sheet is too short to share with the other fields, so the
|
|
10492
|
+
// editor stops filling the leftover space (2px in a long form) and grows
|
|
10493
|
+
// with its content instead; the sheet body does the scrolling.
|
|
10494
|
+
stretch && "max-md:min-h-64 max-md:flex-none",
|
|
10444
10495
|
className
|
|
10445
10496
|
),
|
|
10446
10497
|
children: /* @__PURE__ */ jsx91(
|
|
@@ -10466,7 +10517,11 @@ function FormBlockNote({
|
|
|
10466
10517
|
initialContent: initialContentRef.current,
|
|
10467
10518
|
onChange: (content, isEmpty) => {
|
|
10468
10519
|
lastEditorContentRef.current = content;
|
|
10469
|
-
|
|
10520
|
+
if (isEmpty && isEmptyDocument(getPath(form.formState.defaultValues, id)) && !form.getFieldState(id).isDirty) {
|
|
10521
|
+
form.resetField(id, { defaultValue: content });
|
|
10522
|
+
} else {
|
|
10523
|
+
field.onChange(content);
|
|
10524
|
+
}
|
|
10470
10525
|
onEmptyChange?.(isEmpty);
|
|
10471
10526
|
},
|
|
10472
10527
|
placeholder,
|
|
@@ -10498,7 +10553,10 @@ __name(FormBlockNote, "FormBlockNote");
|
|
|
10498
10553
|
import { jsx as jsx92, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
10499
10554
|
function FormCheckbox({ form, id, name, labelBefore, description, isRequired }) {
|
|
10500
10555
|
const simpleLabel = /* @__PURE__ */ __name(() => {
|
|
10501
|
-
return
|
|
10556
|
+
return (
|
|
10557
|
+
// Phone: the label fills the row and is 40px tall, so the whole row toggles the box.
|
|
10558
|
+
/* @__PURE__ */ jsx92(FieldLabel, { htmlFor: id, className: `font-normal ${labelBefore ? "" : "ms-3"} max-md:min-h-10 max-md:flex-1`, children: name })
|
|
10559
|
+
);
|
|
10502
10560
|
}, "simpleLabel");
|
|
10503
10561
|
const label = /* @__PURE__ */ __name(() => {
|
|
10504
10562
|
if (!description) return simpleLabel();
|
|
@@ -10508,7 +10566,7 @@ function FormCheckbox({ form, id, name, labelBefore, description, isRequired })
|
|
|
10508
10566
|
/* @__PURE__ */ jsx92(TooltipContent, { children: description })
|
|
10509
10567
|
] });
|
|
10510
10568
|
}, "label");
|
|
10511
|
-
return /* @__PURE__ */ jsx92("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx92(FormFieldWrapper, { form, name: id, orientation: "horizontal", children: (field) => /* @__PURE__ */ jsxs51("div", { className: "flex gap-x-4", children: [
|
|
10569
|
+
return /* @__PURE__ */ jsx92("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx92(FormFieldWrapper, { form, name: id, orientation: "horizontal", children: (field) => /* @__PURE__ */ jsxs51("div", { className: "flex gap-x-4 max-md:min-h-10 max-md:items-center", children: [
|
|
10512
10570
|
labelBefore && label(),
|
|
10513
10571
|
labelBefore && isRequired && /* @__PURE__ */ jsx92("span", { className: "ms-1 text-destructive", children: "*" }),
|
|
10514
10572
|
/* @__PURE__ */ jsx92(Checkbox, { id, checked: field.value ?? false, onCheckedChange: field.onChange }),
|
|
@@ -12477,7 +12535,7 @@ function CompanyContent({ company, actions }) {
|
|
|
12477
12535
|
const t = useTranslations35();
|
|
12478
12536
|
if (!company) return null;
|
|
12479
12537
|
return /* @__PURE__ */ jsxs74("div", { className: "flex flex-col gap-y-8", children: [
|
|
12480
|
-
/* @__PURE__ */ jsxs74("div", { className: "flex w-full items-center justify-between", children: [
|
|
12538
|
+
/* @__PURE__ */ jsxs74("div", { className: cn("flex w-full items-center justify-between", !actions && "max-md:hidden"), children: [
|
|
12481
12539
|
/* @__PURE__ */ jsx132(SectionHeader, { level: 2, children: company.name }),
|
|
12482
12540
|
actions && /* @__PURE__ */ jsx132("div", { className: "flex items-center gap-x-2", children: actions })
|
|
12483
12541
|
] }),
|
|
@@ -12532,9 +12590,14 @@ __name(CompanyContent, "CompanyContent");
|
|
|
12532
12590
|
import { Battery, BatteryFull, BatteryLow, BatteryMedium, PlusCircle } from "lucide-react";
|
|
12533
12591
|
import Link2 from "next/link";
|
|
12534
12592
|
import { useTranslations as useTranslations36 } from "next-intl";
|
|
12535
|
-
import { jsx as jsx133, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
12593
|
+
import { Fragment as Fragment16, jsx as jsx133, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
12536
12594
|
var asWholeCredits = /* @__PURE__ */ __name((value) => Math.trunc(value).toLocaleString(), "asWholeCredits");
|
|
12537
|
-
function TokenStatusIndicator({
|
|
12595
|
+
function TokenStatusIndicator({
|
|
12596
|
+
className,
|
|
12597
|
+
size = "md",
|
|
12598
|
+
showExtraPages = true,
|
|
12599
|
+
href
|
|
12600
|
+
}) {
|
|
12538
12601
|
const { company } = useCurrentUserContext();
|
|
12539
12602
|
const t = useTranslations36();
|
|
12540
12603
|
if (!company) return null;
|
|
@@ -12616,20 +12679,32 @@ function TokenStatusIndicator({ className, size = "md", showExtraPages = true })
|
|
|
12616
12679
|
/* @__PURE__ */ jsx133(Link2, { href: "/settings/billing?action=subscribe", className: "w-full flex justify-end my-4", children: /* @__PURE__ */ jsx133(Button, { variant: "outline", size: "sm", children: t("billing.tokens.purchase_extra", { defaultValue: "Purchase additional analysis" }) }) })
|
|
12617
12680
|
] })
|
|
12618
12681
|
] });
|
|
12682
|
+
const badge = /* @__PURE__ */ jsxs75(Fragment16, { children: [
|
|
12683
|
+
getBatteryIcon(),
|
|
12684
|
+
/* @__PURE__ */ jsx133("span", { className: cn(textSize, "text-muted-foreground font-medium leading-none"), children: asWholeCredits(availableMonthlyCredits) }),
|
|
12685
|
+
showExtraPages && availableExtraCredits > 0 && /* @__PURE__ */ jsxs75("span", { className: "inline-flex items-center gap-0.5", children: [
|
|
12686
|
+
/* @__PURE__ */ jsx133(PlusCircle, { className: cn(smallIconSize, "text-blue-500") }),
|
|
12687
|
+
/* @__PURE__ */ jsx133("span", { className: cn(textSize, "text-blue-500 font-medium leading-none"), children: asWholeCredits(availableExtraCredits) })
|
|
12688
|
+
] })
|
|
12689
|
+
] });
|
|
12690
|
+
if (href) {
|
|
12691
|
+
return /* @__PURE__ */ jsx133(
|
|
12692
|
+
Link2,
|
|
12693
|
+
{
|
|
12694
|
+
href,
|
|
12695
|
+
className: cn("inline-flex min-h-10 min-w-10 items-center justify-center gap-1.5 px-1", className),
|
|
12696
|
+
"aria-label": t("billing.tokens.status", { defaultValue: "Page Status" }),
|
|
12697
|
+
children: badge
|
|
12698
|
+
}
|
|
12699
|
+
);
|
|
12700
|
+
}
|
|
12619
12701
|
return /* @__PURE__ */ jsxs75(Tooltip2, { children: [
|
|
12620
|
-
/* @__PURE__ */
|
|
12702
|
+
/* @__PURE__ */ jsx133(
|
|
12621
12703
|
TooltipTrigger,
|
|
12622
12704
|
{
|
|
12623
12705
|
className: cn("inline-flex items-center gap-1.5 cursor-default", className),
|
|
12624
12706
|
"aria-label": t("billing.tokens.status", { defaultValue: "Page Status" }),
|
|
12625
|
-
children:
|
|
12626
|
-
getBatteryIcon(),
|
|
12627
|
-
/* @__PURE__ */ jsx133("span", { className: cn(textSize, "text-muted-foreground font-medium leading-none"), children: asWholeCredits(availableMonthlyCredits) }),
|
|
12628
|
-
showExtraPages && availableExtraCredits > 0 && /* @__PURE__ */ jsxs75("span", { className: "inline-flex items-center gap-0.5", children: [
|
|
12629
|
-
/* @__PURE__ */ jsx133(PlusCircle, { className: cn(smallIconSize, "text-blue-500") }),
|
|
12630
|
-
/* @__PURE__ */ jsx133("span", { className: cn(textSize, "text-blue-500 font-medium leading-none"), children: asWholeCredits(availableExtraCredits) })
|
|
12631
|
-
] })
|
|
12632
|
-
]
|
|
12707
|
+
children: badge
|
|
12633
12708
|
}
|
|
12634
12709
|
),
|
|
12635
12710
|
/* @__PURE__ */ jsx133(TooltipContent, { side: "top", className: "max-w-xs", children: tooltipContent })
|
|
@@ -12645,7 +12720,16 @@ function CompanyDetails() {
|
|
|
12645
12720
|
const { company } = useCompanyContext();
|
|
12646
12721
|
if (!company) return null;
|
|
12647
12722
|
return /* @__PURE__ */ jsxs76("div", { className: "flex w-full flex-col gap-y-2", children: [
|
|
12648
|
-
/* @__PURE__ */ jsx134(
|
|
12723
|
+
/* @__PURE__ */ jsx134(
|
|
12724
|
+
ContentTitle,
|
|
12725
|
+
{
|
|
12726
|
+
module: Modules.Company,
|
|
12727
|
+
type: title.type,
|
|
12728
|
+
element: title.element,
|
|
12729
|
+
functions: title.functions,
|
|
12730
|
+
className: "max-md:hidden"
|
|
12731
|
+
}
|
|
12732
|
+
),
|
|
12649
12733
|
/* @__PURE__ */ jsx134(TokenStatusIndicator, { size: "md" }),
|
|
12650
12734
|
/* @__PURE__ */ jsx134(CompanyContent, { company })
|
|
12651
12735
|
] });
|
|
@@ -12653,12 +12737,12 @@ function CompanyDetails() {
|
|
|
12653
12737
|
__name(CompanyDetails, "CompanyDetails");
|
|
12654
12738
|
|
|
12655
12739
|
// src/features/company/components/containers/AdminCompanyContainer.tsx
|
|
12656
|
-
import { Fragment as
|
|
12740
|
+
import { Fragment as Fragment17, jsx as jsx135, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
12657
12741
|
function AdminCompanyContainerInternal() {
|
|
12658
12742
|
const { company } = useCompanyContext();
|
|
12659
12743
|
const { hasRole } = useCurrentUserContext();
|
|
12660
12744
|
if (!company || !hasRole(getRoleId().Administrator)) return null;
|
|
12661
|
-
return /* @__PURE__ */ jsxs77(
|
|
12745
|
+
return /* @__PURE__ */ jsxs77(Fragment17, { children: [
|
|
12662
12746
|
/* @__PURE__ */ jsx135(CompanyDetails, {}),
|
|
12663
12747
|
/* @__PURE__ */ jsx135(AdminUsersList, {})
|
|
12664
12748
|
] });
|
|
@@ -12681,7 +12765,7 @@ import { useCallback as useCallback21, useEffect as useEffect26, useMemo as useM
|
|
|
12681
12765
|
import { useForm as useForm2 } from "react-hook-form";
|
|
12682
12766
|
import { v4 as v42 } from "uuid";
|
|
12683
12767
|
import { z as z2 } from "zod";
|
|
12684
|
-
import { Fragment as
|
|
12768
|
+
import { Fragment as Fragment18, jsx as jsx136, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
12685
12769
|
function CompanyEditorInternal({
|
|
12686
12770
|
company,
|
|
12687
12771
|
propagateChanges,
|
|
@@ -12842,7 +12926,7 @@ function CompanyEditorInternal({
|
|
|
12842
12926
|
width: 200,
|
|
12843
12927
|
height: 200
|
|
12844
12928
|
}
|
|
12845
|
-
) : /* @__PURE__ */ jsxs78(
|
|
12929
|
+
) : /* @__PURE__ */ jsxs78(Fragment18, { children: [
|
|
12846
12930
|
/* @__PURE__ */ jsx136(UploadIcon3, { className: "my-4 h-8 w-8" }),
|
|
12847
12931
|
/* @__PURE__ */ jsx136("p", { className: "mb-1 flex w-full text-center text-sm", children: t(`company.click_drag_logo`) })
|
|
12848
12932
|
] }) }) }) }) }) }),
|
|
@@ -12990,7 +13074,7 @@ __name(CompanyConfigurationEditor, "CompanyConfigurationEditor");
|
|
|
12990
13074
|
import { LoaderCircleIcon as LoaderCircleIcon2, Trash2Icon as Trash2Icon3 } from "lucide-react";
|
|
12991
13075
|
import { useTranslations as useTranslations40 } from "next-intl";
|
|
12992
13076
|
import { useState as useState35 } from "react";
|
|
12993
|
-
import { Fragment as
|
|
13077
|
+
import { Fragment as Fragment19, jsx as jsx141, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
12994
13078
|
function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 }) {
|
|
12995
13079
|
const t = useTranslations40();
|
|
12996
13080
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -13021,7 +13105,7 @@ function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 })
|
|
|
13021
13105
|
setFinalWarningOpen(false);
|
|
13022
13106
|
setCompanyName("");
|
|
13023
13107
|
}, "handleGoBack");
|
|
13024
|
-
return /* @__PURE__ */ jsxs80(
|
|
13108
|
+
return /* @__PURE__ */ jsxs80(Fragment19, { children: [
|
|
13025
13109
|
/* @__PURE__ */ jsxs80(AlertDialog, { open, onOpenChange: setOpen, children: [
|
|
13026
13110
|
/* @__PURE__ */ jsx141(AlertDialogTrigger, { children: /* @__PURE__ */ jsx141(
|
|
13027
13111
|
Button,
|
|
@@ -13102,7 +13186,7 @@ function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 })
|
|
|
13102
13186
|
},
|
|
13103
13187
|
variant: "destructive",
|
|
13104
13188
|
disabled: isDeleting,
|
|
13105
|
-
children: isDeleting ? /* @__PURE__ */ jsxs80(
|
|
13189
|
+
children: isDeleting ? /* @__PURE__ */ jsxs80(Fragment19, { children: [
|
|
13106
13190
|
t(`ui.buttons.deleting`),
|
|
13107
13191
|
/* @__PURE__ */ jsx141(LoaderCircleIcon2, { className: "animate-spin-slow h-5 w-5" })
|
|
13108
13192
|
] }) : t(`ui.buttons.delete_forever`)
|
|
@@ -13163,7 +13247,7 @@ var CompanyProvider = /* @__PURE__ */ __name(({ children, dehydratedCompany, con
|
|
|
13163
13247
|
functions.push(/* @__PURE__ */ jsx142(CompanyDeleter, { company }, "companyDeleter"));
|
|
13164
13248
|
if (hasRole(getRoleId().Administrator) || hasPermissionToModule({ module: Modules.Company, action: "update" /* Update */ })) {
|
|
13165
13249
|
if (company && configurationEditorSlot)
|
|
13166
|
-
functions.push(/* @__PURE__ */ jsx142(
|
|
13250
|
+
functions.push(/* @__PURE__ */ jsx142(Fragment20, { children: configurationEditorSlot }, "configurationEditorSlot"));
|
|
13167
13251
|
functions.push(/* @__PURE__ */ jsx142(CompanyEditor, { company, propagateChanges: setCompany }, "companyEditor"));
|
|
13168
13252
|
}
|
|
13169
13253
|
if (functions.length > 0) response.functions = functions;
|
|
@@ -15010,7 +15094,7 @@ function useSocket({ token }) {
|
|
|
15010
15094
|
__name(useSocket, "useSocket");
|
|
15011
15095
|
|
|
15012
15096
|
// src/components/navigations/Breadcrumb.tsx
|
|
15013
|
-
import { Fragment as
|
|
15097
|
+
import { Fragment as Fragment22, jsx as jsx159, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
15014
15098
|
var ITEMS_TO_DISPLAY = 4;
|
|
15015
15099
|
function BreadcrumbDesktop({
|
|
15016
15100
|
items,
|
|
@@ -15020,24 +15104,24 @@ function BreadcrumbDesktop({
|
|
|
15020
15104
|
}) {
|
|
15021
15105
|
const [open, setOpen] = useState47(false);
|
|
15022
15106
|
return /* @__PURE__ */ jsx159(Breadcrumb, { children: /* @__PURE__ */ jsxs86(BreadcrumbList, { children: [
|
|
15023
|
-
showRoot && /* @__PURE__ */ jsxs86(
|
|
15107
|
+
showRoot && /* @__PURE__ */ jsxs86(Fragment22, { children: [
|
|
15024
15108
|
/* @__PURE__ */ jsx159(BreadcrumbItem, { children: /* @__PURE__ */ jsx159(Link, { href: generateUrl({ page: `/` }), children: rootLabel }) }),
|
|
15025
15109
|
items.length > 0 && /* @__PURE__ */ jsx159(BreadcrumbSeparator, {})
|
|
15026
15110
|
] }),
|
|
15027
|
-
items.length > ITEMS_TO_DISPLAY ? /* @__PURE__ */ jsxs86(
|
|
15028
|
-
/* @__PURE__ */ jsx159(BreadcrumbItem, { children: items[0].href ? /* @__PURE__ */ jsx159(Link, { href: items[0].href, onClick: items[0].onClick, children: items[0].name }) : /* @__PURE__ */ jsx159(
|
|
15111
|
+
items.length > ITEMS_TO_DISPLAY ? /* @__PURE__ */ jsxs86(Fragment22, { children: [
|
|
15112
|
+
/* @__PURE__ */ jsx159(BreadcrumbItem, { children: items[0].href ? /* @__PURE__ */ jsx159(Link, { href: items[0].href, onClick: items[0].onClick, children: items[0].name }) : /* @__PURE__ */ jsx159(Fragment22, { children: items[0].name }) }),
|
|
15029
15113
|
/* @__PURE__ */ jsx159(BreadcrumbSeparator, {}),
|
|
15030
15114
|
/* @__PURE__ */ jsx159(BreadcrumbItem, { children: /* @__PURE__ */ jsxs86(DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
15031
15115
|
/* @__PURE__ */ jsx159(DropdownMenuTrigger, { className: "flex items-center gap-1", "aria-label": "Toggle menu", children: /* @__PURE__ */ jsx159(BreadcrumbEllipsis, { className: "h-4 w-4" }) }),
|
|
15032
15116
|
/* @__PURE__ */ jsx159(DropdownMenuContent, { align: "start", children: items.slice(1, -ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsx159(DropdownMenuItem, { children: /* @__PURE__ */ jsx159(Link, { href: item.href ? item.href : "#", onClick: item.onClick, children: item.name }) }, index)) })
|
|
15033
15117
|
] }) }),
|
|
15034
15118
|
/* @__PURE__ */ jsx159(BreadcrumbSeparator, {}),
|
|
15035
|
-
items.slice(-ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsxs86(
|
|
15036
|
-
/* @__PURE__ */ jsx159(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx159(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx159(
|
|
15119
|
+
items.slice(-ITEMS_TO_DISPLAY + 2).map((item, index) => /* @__PURE__ */ jsxs86(Fragment21, { children: [
|
|
15120
|
+
/* @__PURE__ */ jsx159(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx159(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx159(Fragment22, { children: item.name }) }),
|
|
15037
15121
|
index < items.slice(-ITEMS_TO_DISPLAY + 2).length - 1 && /* @__PURE__ */ jsx159(BreadcrumbSeparator, {})
|
|
15038
15122
|
] }, index))
|
|
15039
|
-
] }) : /* @__PURE__ */ jsx159(
|
|
15040
|
-
/* @__PURE__ */ jsx159(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx159(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx159(
|
|
15123
|
+
] }) : /* @__PURE__ */ jsx159(Fragment22, { children: items.map((item, index) => /* @__PURE__ */ jsxs86(Fragment21, { children: [
|
|
15124
|
+
/* @__PURE__ */ jsx159(BreadcrumbItem, { children: item.href ? /* @__PURE__ */ jsx159(Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ jsx159(Fragment22, { children: item.name }) }),
|
|
15041
15125
|
index < items.length - 1 && /* @__PURE__ */ jsx159(BreadcrumbSeparator, {})
|
|
15042
15126
|
] }, index)) })
|
|
15043
15127
|
] }) });
|
|
@@ -15056,12 +15140,41 @@ function BreadcrumbMobile({
|
|
|
15056
15140
|
if (!showRoot) return null;
|
|
15057
15141
|
return /* @__PURE__ */ jsx159(Breadcrumb, { children: /* @__PURE__ */ jsx159(BreadcrumbList, { children: /* @__PURE__ */ jsx159(BreadcrumbItem, { children: /* @__PURE__ */ jsx159(Link, { href: generateUrl({ page: `/` }), children: rootLabel }) }) }) });
|
|
15058
15142
|
}
|
|
15143
|
+
if (allItems.length <= 1) {
|
|
15144
|
+
return /* @__PURE__ */ jsx159("span", { className: "text-foreground block min-w-0 truncate px-1.5 text-xs/relaxed font-normal", children: lastItem?.name });
|
|
15145
|
+
}
|
|
15059
15146
|
return /* @__PURE__ */ jsxs86(DropdownMenu, { open, onOpenChange: setOpen, children: [
|
|
15060
|
-
/* @__PURE__ */ jsxs86(DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
|
|
15061
|
-
lastItem?.name,
|
|
15062
|
-
/* @__PURE__ */ jsx159(ChevronDownIcon8, { className: "text-muted-foreground size-3.5" })
|
|
15147
|
+
/* @__PURE__ */ jsxs86(DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex min-h-9 min-w-0 items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
|
|
15148
|
+
/* @__PURE__ */ jsx159("span", { className: "truncate", children: lastItem?.name }),
|
|
15149
|
+
/* @__PURE__ */ jsx159(ChevronDownIcon8, { className: "text-muted-foreground size-3.5 shrink-0" })
|
|
15063
15150
|
] }),
|
|
15064
|
-
/* @__PURE__ */ jsx159(DropdownMenuContent, { align: "start", children: allItems.map(
|
|
15151
|
+
/* @__PURE__ */ jsx159(DropdownMenuContent, { align: "start", children: allItems.map(
|
|
15152
|
+
(item, index) => item.href ? (
|
|
15153
|
+
// The item renders AS the link, so the whole row navigates — a Link
|
|
15154
|
+
// nested inside the row only answered taps on its own text.
|
|
15155
|
+
/* @__PURE__ */ jsx159(
|
|
15156
|
+
DropdownMenuItem,
|
|
15157
|
+
{
|
|
15158
|
+
className: "min-h-10",
|
|
15159
|
+
render: (props) => /* @__PURE__ */ jsx159(
|
|
15160
|
+
Link,
|
|
15161
|
+
{
|
|
15162
|
+
...props,
|
|
15163
|
+
href: item.href,
|
|
15164
|
+
className: cn(props.className, "text-foreground font-normal"),
|
|
15165
|
+
onClick: (event) => {
|
|
15166
|
+
props.onClick?.(event);
|
|
15167
|
+
item.onClick?.();
|
|
15168
|
+
},
|
|
15169
|
+
children: props.children
|
|
15170
|
+
}
|
|
15171
|
+
),
|
|
15172
|
+
children: item.name
|
|
15173
|
+
},
|
|
15174
|
+
index
|
|
15175
|
+
)
|
|
15176
|
+
) : /* @__PURE__ */ jsx159(DropdownMenuItem, { className: "min-h-10", children: item.name }, index)
|
|
15177
|
+
) })
|
|
15065
15178
|
] });
|
|
15066
15179
|
}
|
|
15067
15180
|
__name(BreadcrumbMobile, "BreadcrumbMobile");
|
|
@@ -15112,7 +15225,14 @@ __name(ContentTitle, "ContentTitle");
|
|
|
15112
15225
|
|
|
15113
15226
|
// src/components/navigations/Header.tsx
|
|
15114
15227
|
import { jsx as jsx161, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
15115
|
-
function Header({
|
|
15228
|
+
function Header({
|
|
15229
|
+
children,
|
|
15230
|
+
mobileChildren,
|
|
15231
|
+
leftContent,
|
|
15232
|
+
logo,
|
|
15233
|
+
className,
|
|
15234
|
+
hideSidebarTriggerOnMobile
|
|
15235
|
+
}) {
|
|
15116
15236
|
const { breadcrumbs } = useSharedContext();
|
|
15117
15237
|
const rootLabel = useHeaderRootLabel();
|
|
15118
15238
|
const isRootHidden = useIsBreadcrumbRootHidden();
|
|
@@ -15137,9 +15257,9 @@ function Header({ children, mobileChildren, leftContent, logo, className }) {
|
|
|
15137
15257
|
className: `bg-sidebar sticky top-0 z-10 flex h-[var(--app-header-h,calc(3rem_+_env(safe-area-inset-top)))] flex-col items-center justify-start gap-x-4 pt-[env(safe-area-inset-top)] ${className ?? ""}`,
|
|
15138
15258
|
children: /* @__PURE__ */ jsxs88("div", { className: "bg-sidebar flex h-12 w-full flex-row items-center justify-between ps-2 pe-4", children: [
|
|
15139
15259
|
isMobile && logo && /* @__PURE__ */ jsx161("div", { className: "flex shrink-0 flex-row items-center pe-1", children: logo }),
|
|
15140
|
-
sidebar && /* @__PURE__ */ jsx161(SidebarTrigger, { "aria-label": "Toggle sidebar", id: "sidebar-trigger" }),
|
|
15260
|
+
sidebar && !(isMobile && hideSidebarTriggerOnMobile) && /* @__PURE__ */ jsx161(SidebarTrigger, { "aria-label": "Toggle sidebar", id: "sidebar-trigger" }),
|
|
15141
15261
|
leftContent,
|
|
15142
|
-
/* @__PURE__ */ jsx161("div", { className: "flex w-full flex-row items-center justify-start", children: /* @__PURE__ */ jsx161(BreadcrumbNavigation, { items: breadcrumbs, rootLabel: rootLabel ?? void 0, showRoot: !isRootHidden }) }),
|
|
15262
|
+
/* @__PURE__ */ jsx161("div", { className: "flex w-full flex-row items-center justify-start max-md:min-w-0", children: /* @__PURE__ */ jsx161(BreadcrumbNavigation, { items: breadcrumbs, rootLabel: rootLabel ?? void 0, showRoot: !isRootHidden }) }),
|
|
15143
15263
|
isMobile ? mobileChildren && /* @__PURE__ */ jsx161("div", { className: "flex shrink-0 flex-row items-center justify-end gap-x-2 whitespace-nowrap", children: mobileChildren }) : children && // No fixed width: the widget slot sizes to its content and the
|
|
15144
15264
|
// breadcrumb (w-full, above) takes the rest. A `w-64` cap here
|
|
15145
15265
|
// clipped consumers whose widget set outgrew 256px.
|
|
@@ -15153,7 +15273,7 @@ __name(Header, "Header");
|
|
|
15153
15273
|
|
|
15154
15274
|
// src/components/navigations/MobileNavigationBar.tsx
|
|
15155
15275
|
import { usePathname as usePathname3 } from "next/navigation";
|
|
15156
|
-
import { Fragment as
|
|
15276
|
+
import { Fragment as Fragment23, jsx as jsx162, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
15157
15277
|
function isActiveHref(pathname, href) {
|
|
15158
15278
|
if (href === "/") return pathname === "/";
|
|
15159
15279
|
return pathname === href || pathname.startsWith(`${href}/`);
|
|
@@ -15165,7 +15285,7 @@ var slotClass = cn(
|
|
|
15165
15285
|
"transition-colors"
|
|
15166
15286
|
);
|
|
15167
15287
|
function SlotContent({ item }) {
|
|
15168
|
-
if (item.render) return /* @__PURE__ */ jsx162(
|
|
15288
|
+
if (item.render) return /* @__PURE__ */ jsx162(Fragment23, { children: item.render });
|
|
15169
15289
|
const Icon = item.icon;
|
|
15170
15290
|
return Icon ? /* @__PURE__ */ jsx162(Icon, { className: "size-6" }) : null;
|
|
15171
15291
|
}
|
|
@@ -15185,10 +15305,13 @@ function MobileNavigationBar({ className } = {}) {
|
|
|
15185
15305
|
children: items.map((item) => {
|
|
15186
15306
|
const active = item.href ? isActiveHref(pathname, item.href) : false;
|
|
15187
15307
|
const tone = active ? "text-primary" : "text-muted-foreground";
|
|
15188
|
-
const body = /* @__PURE__ */ jsxs89(
|
|
15308
|
+
const body = /* @__PURE__ */ jsxs89(Fragment23, { children: [
|
|
15189
15309
|
active && /* @__PURE__ */ jsx162("span", { "aria-hidden": true, className: "bg-primary absolute inset-x-0 top-0 h-0.5" }),
|
|
15190
15310
|
/* @__PURE__ */ jsx162(SlotContent, { item })
|
|
15191
15311
|
] });
|
|
15312
|
+
if (!item.href && !item.onClick) {
|
|
15313
|
+
return /* @__PURE__ */ jsx162("div", { "data-testid": `mobile-nav-${item.key}`, className: cn(slotClass, tone), children: /* @__PURE__ */ jsx162(SlotContent, { item }) }, item.key);
|
|
15314
|
+
}
|
|
15192
15315
|
return item.href ? /* @__PURE__ */ jsx162(
|
|
15193
15316
|
Link,
|
|
15194
15317
|
{
|
|
@@ -15339,7 +15462,7 @@ function PageContainer({ children, testId, className }) {
|
|
|
15339
15462
|
const headerLogo = useHeaderLogo();
|
|
15340
15463
|
return /* @__PURE__ */ jsxs92("div", { className: `flex h-full w-full flex-col`, "data-testid": testId, children: [
|
|
15341
15464
|
/* @__PURE__ */ jsx166(Header, { leftContent: headerLeftContent, logo: headerLogo, mobileChildren: headerMobileChildren, children: headerChildren }),
|
|
15342
|
-
/* @__PURE__ */ jsx166("main", { className: cn(`flex w-full flex-1 flex-col gap-y-4 pt-4 ps-4 pe-0`, className), children })
|
|
15465
|
+
/* @__PURE__ */ jsx166("main", { className: cn(`flex w-full flex-1 flex-col gap-y-4 pt-4 ps-4 pe-0 max-md:pe-4`, className), children })
|
|
15343
15466
|
] });
|
|
15344
15467
|
}
|
|
15345
15468
|
__name(PageContainer, "PageContainer");
|
|
@@ -15592,7 +15715,7 @@ __name(ReactMarkdownContainer, "ReactMarkdownContainer");
|
|
|
15592
15715
|
|
|
15593
15716
|
// src/components/containers/RoundPageContainerTitle.tsx
|
|
15594
15717
|
import { InfoIcon as InfoIcon2 } from "lucide-react";
|
|
15595
|
-
import { jsx as jsx169, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
15718
|
+
import { Fragment as Fragment24, jsx as jsx169, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
15596
15719
|
var HEADER_ROW_MIN_H = "min-h-[53px]";
|
|
15597
15720
|
function RoundPageContainerTitle({
|
|
15598
15721
|
module,
|
|
@@ -15604,41 +15727,74 @@ function RoundPageContainerTitle({
|
|
|
15604
15727
|
}) {
|
|
15605
15728
|
const { title } = useSharedContext();
|
|
15606
15729
|
const isMobile = useIsMobile();
|
|
15730
|
+
const detailsLabel = `${showDetails ? "Hide" : "Show"} ${typeof detailsTitle === "string" ? detailsTitle : "details"}`;
|
|
15731
|
+
const detailsToggle = details ? isMobile ? /* @__PURE__ */ jsx169(
|
|
15732
|
+
Button,
|
|
15733
|
+
{
|
|
15734
|
+
"data-help": "page.details",
|
|
15735
|
+
variant: showDetails ? `ghost` : `default`,
|
|
15736
|
+
onClick: () => setShowDetails(!showDetails),
|
|
15737
|
+
"aria-label": detailsLabel,
|
|
15738
|
+
className: "shrink-0",
|
|
15739
|
+
children: detailsIcon ?? /* @__PURE__ */ jsx169(InfoIcon2, {})
|
|
15740
|
+
}
|
|
15741
|
+
) : /* @__PURE__ */ jsxs94(Tooltip2, { children: [
|
|
15742
|
+
/* @__PURE__ */ jsx169(
|
|
15743
|
+
TooltipTrigger,
|
|
15744
|
+
{
|
|
15745
|
+
render: /* @__PURE__ */ jsx169(
|
|
15746
|
+
Button,
|
|
15747
|
+
{
|
|
15748
|
+
"data-help": "page.details",
|
|
15749
|
+
variant: showDetails ? `ghost` : `default`,
|
|
15750
|
+
onClick: () => setShowDetails(!showDetails),
|
|
15751
|
+
"aria-label": detailsLabel,
|
|
15752
|
+
className: cn(`cursor-pointer`)
|
|
15753
|
+
}
|
|
15754
|
+
),
|
|
15755
|
+
children: detailsIcon ?? /* @__PURE__ */ jsx169(InfoIcon2, {})
|
|
15756
|
+
}
|
|
15757
|
+
),
|
|
15758
|
+
/* @__PURE__ */ jsxs94(TooltipContent, { children: [
|
|
15759
|
+
showDetails ? "Hide" : "Show",
|
|
15760
|
+
" ",
|
|
15761
|
+
detailsTitle ?? "details"
|
|
15762
|
+
] })
|
|
15763
|
+
] }) : null;
|
|
15607
15764
|
return /* @__PURE__ */ jsxs94("div", { className: "flex w-full flex-col border-b", children: [
|
|
15608
|
-
|
|
15609
|
-
|
|
15765
|
+
isMobile ? (
|
|
15766
|
+
// Phone: "type · name" on one truncated line with the details toggle
|
|
15767
|
+
// beside it; the page controls drop to their own wrapping line below,
|
|
15768
|
+
// so they can never push the page wider than the screen.
|
|
15769
|
+
/* @__PURE__ */ jsxs94("div", { className: cn(`flex w-full flex-col gap-y-2 p-4`, HEADER_ROW_MIN_H), children: [
|
|
15770
|
+
/* @__PURE__ */ jsxs94("div", { className: "flex w-full min-w-0 items-center justify-between gap-x-2", children: [
|
|
15771
|
+
/* @__PURE__ */ jsxs94("div", { className: "text-muted-foreground flex min-w-0 items-center gap-x-2 text-base font-light", children: [
|
|
15772
|
+
title.titleActions,
|
|
15773
|
+
module && module.icon ? /* @__PURE__ */ jsx169(module.icon, { className: "text-primary h-5 w-5 shrink-0" }) : title.icon,
|
|
15774
|
+
/* @__PURE__ */ jsxs94("span", { className: "truncate", children: [
|
|
15775
|
+
title.type,
|
|
15776
|
+
title.element && /* @__PURE__ */ jsxs94(Fragment24, { children: [
|
|
15777
|
+
/* @__PURE__ */ jsx169("span", { "aria-hidden": true, children: " \xB7 " }),
|
|
15778
|
+
/* @__PURE__ */ jsx169("span", { className: "text-primary font-semibold", children: title.element })
|
|
15779
|
+
] })
|
|
15780
|
+
] })
|
|
15781
|
+
] }),
|
|
15782
|
+
detailsToggle
|
|
15783
|
+
] }),
|
|
15784
|
+
title.functions && /* @__PURE__ */ jsx169("div", { className: "flex w-full min-w-0 flex-wrap items-center justify-end gap-2", children: title.functions })
|
|
15785
|
+
] })
|
|
15786
|
+
) : /* @__PURE__ */ jsxs94("div", { className: cn(`flex w-full flex-row items-center gap-x-2 p-4 justify-between`, HEADER_ROW_MIN_H), children: [
|
|
15787
|
+
/* @__PURE__ */ jsxs94("div", { className: "flex w-full gap-x-4", children: [
|
|
15610
15788
|
/* @__PURE__ */ jsxs94("div", { className: "text-muted-foreground flex items-center gap-x-2 text-lg font-light whitespace-nowrap", children: [
|
|
15611
15789
|
title.titleActions,
|
|
15612
15790
|
module && module.icon ? /* @__PURE__ */ jsx169(module.icon, { className: "text-primary h-6 w-6" }) : title.icon,
|
|
15613
15791
|
title.type
|
|
15614
15792
|
] }),
|
|
15615
15793
|
/* @__PURE__ */ jsx169("div", { className: cn("text-primary w-full text-xl font-semibold"), children: title.element })
|
|
15616
|
-
] }) : /* @__PURE__ */ jsxs94("div", { className: "text-muted-foreground flex min-w-0 items-center gap-x-2 text-base font-light", children: [
|
|
15617
|
-
title.titleActions,
|
|
15618
|
-
module && module.icon ? /* @__PURE__ */ jsx169(module.icon, { className: "text-primary h-5 w-5 shrink-0" }) : title.icon,
|
|
15619
|
-
/* @__PURE__ */ jsx169("span", { className: "truncate", children: title.type })
|
|
15620
15794
|
] }),
|
|
15621
15795
|
(title.functions || details) && /* @__PURE__ */ jsxs94("div", { className: "flex shrink-0 items-center gap-x-2", children: [
|
|
15622
15796
|
title.functions,
|
|
15623
|
-
|
|
15624
|
-
/* @__PURE__ */ jsx169(TooltipTrigger, { children: /* @__PURE__ */ jsx169(
|
|
15625
|
-
Button,
|
|
15626
|
-
{
|
|
15627
|
-
"data-help": "page.details",
|
|
15628
|
-
render: /* @__PURE__ */ jsx169("div", {}),
|
|
15629
|
-
nativeButton: false,
|
|
15630
|
-
variant: showDetails ? `ghost` : `default`,
|
|
15631
|
-
onClick: () => setShowDetails(!showDetails),
|
|
15632
|
-
className: cn(`cursor-pointer`),
|
|
15633
|
-
children: detailsIcon ?? /* @__PURE__ */ jsx169(InfoIcon2, {})
|
|
15634
|
-
}
|
|
15635
|
-
) }),
|
|
15636
|
-
/* @__PURE__ */ jsxs94(TooltipContent, { children: [
|
|
15637
|
-
showDetails ? "Hide" : "Show",
|
|
15638
|
-
" ",
|
|
15639
|
-
detailsTitle ?? "details"
|
|
15640
|
-
] })
|
|
15641
|
-
] })
|
|
15797
|
+
detailsToggle
|
|
15642
15798
|
] })
|
|
15643
15799
|
] }),
|
|
15644
15800
|
title.actionBar && /* @__PURE__ */ jsx169(
|
|
@@ -15646,7 +15802,7 @@ function RoundPageContainerTitle({
|
|
|
15646
15802
|
{
|
|
15647
15803
|
"data-testid": "round-page-action-bar",
|
|
15648
15804
|
"data-help": "page.action-bar",
|
|
15649
|
-
className: "flex w-full items-center gap-x-2 border-t px-4 py-2",
|
|
15805
|
+
className: "flex w-full items-center gap-x-2 border-t px-4 py-2 max-md:flex-wrap max-md:gap-y-2",
|
|
15650
15806
|
children: /* @__PURE__ */ jsx169(ActionBarProvider, { value: true, children: title.actionBar })
|
|
15651
15807
|
}
|
|
15652
15808
|
)
|
|
@@ -15656,8 +15812,8 @@ __name(RoundPageContainerTitle, "RoundPageContainerTitle");
|
|
|
15656
15812
|
|
|
15657
15813
|
// src/components/containers/RoundPageContainer.tsx
|
|
15658
15814
|
import { useSearchParams } from "next/navigation";
|
|
15659
|
-
import { Fragment as
|
|
15660
|
-
import { Fragment as
|
|
15815
|
+
import { Fragment as Fragment25, useCallback as useCallback27, useEffect as useEffect42, useMemo as useMemo22, useState as useState52 } from "react";
|
|
15816
|
+
import { Fragment as Fragment26, jsx as jsx170, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
15661
15817
|
var DETAILS_COOKIE_NAME = "round_page_details_state";
|
|
15662
15818
|
var DETAILS_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
15663
15819
|
var railTriggerClass = cn(
|
|
@@ -15697,7 +15853,9 @@ function RoundPageContainer({
|
|
|
15697
15853
|
const headerLogo = useHeaderLogo();
|
|
15698
15854
|
const headerMobileChildren = useHeaderMobileChildren();
|
|
15699
15855
|
const [showDetails, setShowDetailsState] = useState52(defaultDetailsOpen);
|
|
15856
|
+
const [showDetailsMobile, setShowDetailsMobile] = useState52(false);
|
|
15700
15857
|
const isMobile = useIsMobile();
|
|
15858
|
+
const hasMobileNavigation = useMobileNavigationItems().length > 0;
|
|
15701
15859
|
const hasSidebar = useOptionalSidebar() !== null;
|
|
15702
15860
|
const [mounted, setMounted] = useState52(false);
|
|
15703
15861
|
useEffect42(() => {
|
|
@@ -15759,14 +15917,20 @@ function RoundPageContainer({
|
|
|
15759
15917
|
[tabs]
|
|
15760
15918
|
);
|
|
15761
15919
|
const isReady = mounted;
|
|
15920
|
+
const activeDocumentTab = activeFillHeight && activeConstrainWidth;
|
|
15921
|
+
const mobileFlow = isMobile && isFixed && (!activeFillHeight || activeDocumentTab) && !fullWidth;
|
|
15922
|
+
const innerClip = mobileFlow ? `` : clip;
|
|
15923
|
+
const innerScrollY = mobileFlow ? `` : scrollY;
|
|
15924
|
+
const showMobileSectionPicker = (tabs?.length ?? 0) > 1;
|
|
15762
15925
|
if (!isReady) {
|
|
15763
|
-
return /* @__PURE__ */ jsxs95(
|
|
15926
|
+
return /* @__PURE__ */ jsxs95(Fragment26, { children: [
|
|
15764
15927
|
/* @__PURE__ */ jsx170(
|
|
15765
15928
|
Header,
|
|
15766
15929
|
{
|
|
15767
15930
|
leftContent: headerLeftContent,
|
|
15768
15931
|
logo: headerLogo,
|
|
15769
15932
|
mobileChildren: headerMobileChildren,
|
|
15933
|
+
hideSidebarTriggerOnMobile: hasMobileNavigation,
|
|
15770
15934
|
className: "bg-sidebar border-0",
|
|
15771
15935
|
children: headerChildren
|
|
15772
15936
|
}
|
|
@@ -15796,13 +15960,14 @@ function RoundPageContainer({
|
|
|
15796
15960
|
)
|
|
15797
15961
|
] });
|
|
15798
15962
|
}
|
|
15799
|
-
return /* @__PURE__ */ jsxs95(
|
|
15963
|
+
return /* @__PURE__ */ jsxs95(Fragment26, { children: [
|
|
15800
15964
|
/* @__PURE__ */ jsx170(
|
|
15801
15965
|
Header,
|
|
15802
15966
|
{
|
|
15803
15967
|
leftContent: headerLeftContent,
|
|
15804
15968
|
logo: headerLogo,
|
|
15805
15969
|
mobileChildren: headerMobileChildren,
|
|
15970
|
+
hideSidebarTriggerOnMobile: hasMobileNavigation,
|
|
15806
15971
|
className: "bg-sidebar border-0",
|
|
15807
15972
|
children: headerChildren
|
|
15808
15973
|
}
|
|
@@ -15826,7 +15991,7 @@ function RoundPageContainer({
|
|
|
15826
15991
|
),
|
|
15827
15992
|
children: [
|
|
15828
15993
|
/* @__PURE__ */ jsxs95("div", { className: "bg-background flex min-h-0 w-full flex-1 rounded-lg border p-0", children: [
|
|
15829
|
-
/* @__PURE__ */ jsxs95("div", { className: "flex w-full flex-col", children: [
|
|
15994
|
+
/* @__PURE__ */ jsxs95("div", { className: cn("flex w-full flex-col", mobileFlow && "min-h-0 overflow-y-auto pb-16"), children: [
|
|
15830
15995
|
(!fullWidth || forceHeader) && /* @__PURE__ */ jsx170(
|
|
15831
15996
|
RoundPageContainerTitle,
|
|
15832
15997
|
{
|
|
@@ -15834,12 +15999,12 @@ function RoundPageContainer({
|
|
|
15834
15999
|
details,
|
|
15835
16000
|
detailsTitle,
|
|
15836
16001
|
detailsIcon,
|
|
15837
|
-
showDetails,
|
|
15838
|
-
setShowDetails,
|
|
16002
|
+
showDetails: isMobile ? showDetailsMobile : showDetails,
|
|
16003
|
+
setShowDetails: isMobile ? setShowDetailsMobile : setShowDetails,
|
|
15839
16004
|
fullWidth
|
|
15840
16005
|
}
|
|
15841
16006
|
),
|
|
15842
|
-
/* @__PURE__ */ jsx170("div", { className: cn(`flex w-full`, isFixed && `h-full`,
|
|
16007
|
+
/* @__PURE__ */ jsx170("div", { className: cn(`flex w-full`, isFixed && !mobileFlow && `h-full`, innerClip), children: layout2 === "rail" && tabs ? (
|
|
15843
16008
|
// Rail layout: the vertical-tab navigation is a flush-left
|
|
15844
16009
|
// sidebar of the card and the content fills the full remaining
|
|
15845
16010
|
// width (like `fullWidth`) — NOT the centred max-w-6xl column.
|
|
@@ -15849,7 +16014,11 @@ function RoundPageContainer({
|
|
|
15849
16014
|
value: activeTab,
|
|
15850
16015
|
onValueChange: handleTabChange,
|
|
15851
16016
|
orientation: "horizontal",
|
|
15852
|
-
className: cn(
|
|
16017
|
+
className: cn(
|
|
16018
|
+
`flex min-w-0 grow data-[orientation=horizontal]:flex-row`,
|
|
16019
|
+
isFixed && !mobileFlow && `h-full`,
|
|
16020
|
+
innerClip
|
|
16021
|
+
),
|
|
15853
16022
|
children: [
|
|
15854
16023
|
/* @__PURE__ */ jsxs95(
|
|
15855
16024
|
"aside",
|
|
@@ -15864,7 +16033,7 @@ function RoundPageContainer({
|
|
|
15864
16033
|
railHeader && /* @__PURE__ */ jsx170("div", { children: railHeader }),
|
|
15865
16034
|
/* @__PURE__ */ jsxs95(TabsList, { className: "flex h-auto w-full flex-col items-stretch gap-0.5 bg-transparent p-0", children: [
|
|
15866
16035
|
ungrouped.map((tab) => /* @__PURE__ */ jsx170(TabsTrigger, { value: tabValue(tab), className: railTriggerClass, children: tab.contentLabel ?? tab.label }, tab.label)),
|
|
15867
|
-
groups.map((group) => /* @__PURE__ */ jsxs95(
|
|
16036
|
+
groups.map((group) => /* @__PURE__ */ jsxs95(Fragment25, { children: [
|
|
15868
16037
|
/* @__PURE__ */ jsx170(MicroLabel, { as: "span", role: "presentation", className: "block px-3 pt-3 pb-1", children: group.label }),
|
|
15869
16038
|
group.items.map((tab) => /* @__PURE__ */ jsx170(TabsTrigger, { value: tabValue(tab), className: railTriggerClass, children: tab.contentLabel ?? tab.label }, tab.label))
|
|
15870
16039
|
] }, group.label))
|
|
@@ -15872,32 +16041,42 @@ function RoundPageContainer({
|
|
|
15872
16041
|
]
|
|
15873
16042
|
}
|
|
15874
16043
|
),
|
|
15875
|
-
/* @__PURE__ */ jsxs95("div", { className: cn(`flex min-w-0 grow flex-col`,
|
|
15876
|
-
railHeader && /* @__PURE__ */ jsx170("div", { className: "mx-auto w-full max-w-
|
|
15877
|
-
/* @__PURE__ */ jsx170(
|
|
15878
|
-
|
|
16044
|
+
/* @__PURE__ */ jsxs95("div", { className: cn(`flex min-w-0 grow flex-col`, innerClip), children: [
|
|
16045
|
+
railHeader && /* @__PURE__ */ jsx170("div", { className: "mx-auto w-full max-w-24 px-2 pt-2 md:hidden", children: railHeader }),
|
|
16046
|
+
/* @__PURE__ */ jsx170(
|
|
16047
|
+
"div",
|
|
15879
16048
|
{
|
|
15880
|
-
|
|
15881
|
-
|
|
15882
|
-
|
|
15883
|
-
|
|
15884
|
-
|
|
15885
|
-
|
|
15886
|
-
|
|
15887
|
-
|
|
15888
|
-
|
|
15889
|
-
|
|
15890
|
-
|
|
15891
|
-
|
|
15892
|
-
|
|
15893
|
-
|
|
15894
|
-
|
|
16049
|
+
"data-testid": "round-page-rail-select",
|
|
16050
|
+
className: cn("p-2 md:hidden", !showMobileSectionPicker && "hidden"),
|
|
16051
|
+
children: /* @__PURE__ */ jsxs95(
|
|
16052
|
+
Select,
|
|
16053
|
+
{
|
|
16054
|
+
items: tabItems,
|
|
16055
|
+
value: activeTab,
|
|
16056
|
+
onValueChange: (value) => {
|
|
16057
|
+
if (value) handleTabChange(value);
|
|
16058
|
+
},
|
|
16059
|
+
children: [
|
|
16060
|
+
/* @__PURE__ */ jsx170(SelectTrigger, { className: "w-full", children: /* @__PURE__ */ jsx170(SelectValue, {}) }),
|
|
16061
|
+
/* @__PURE__ */ jsxs95(SelectContent, { children: [
|
|
16062
|
+
ungrouped.map((tab) => /* @__PURE__ */ jsx170(SelectItem, { value: tabValue(tab), children: tab.contentLabel ?? tab.label }, tab.label)),
|
|
16063
|
+
groups.map((group) => /* @__PURE__ */ jsxs95(SelectGroup, { children: [
|
|
16064
|
+
/* @__PURE__ */ jsx170(SelectLabel, { children: group.label }),
|
|
16065
|
+
group.items.map((tab) => /* @__PURE__ */ jsx170(SelectItem, { value: tabValue(tab), children: tab.contentLabel ?? tab.label }, tab.label))
|
|
16066
|
+
] }, group.label))
|
|
16067
|
+
] })
|
|
16068
|
+
]
|
|
16069
|
+
}
|
|
16070
|
+
)
|
|
15895
16071
|
}
|
|
15896
|
-
)
|
|
16072
|
+
),
|
|
15897
16073
|
/* @__PURE__ */ jsx170(
|
|
15898
16074
|
"div",
|
|
15899
16075
|
{
|
|
15900
|
-
className: cn(
|
|
16076
|
+
className: cn(
|
|
16077
|
+
`min-w-0 grow`,
|
|
16078
|
+
activeFillHeight ? cn(`flex flex-col`, innerClip) : cn(innerScrollY, `p-4`)
|
|
16079
|
+
),
|
|
15901
16080
|
children: /* @__PURE__ */ jsxs95(
|
|
15902
16081
|
"div",
|
|
15903
16082
|
{
|
|
@@ -15932,7 +16111,7 @@ function RoundPageContainer({
|
|
|
15932
16111
|
className: cn(
|
|
15933
16112
|
`grow`,
|
|
15934
16113
|
isMobile ? `p-2` : `p-4`,
|
|
15935
|
-
activeFillHeight ? cn(`flex flex-col`,
|
|
16114
|
+
activeFillHeight ? cn(`flex flex-col`, innerClip) : innerScrollY,
|
|
15936
16115
|
fullWidth && `p-0`
|
|
15937
16116
|
),
|
|
15938
16117
|
children: /* @__PURE__ */ jsxs95(
|
|
@@ -15945,7 +16124,7 @@ function RoundPageContainer({
|
|
|
15945
16124
|
),
|
|
15946
16125
|
children: [
|
|
15947
16126
|
header,
|
|
15948
|
-
tabs ? /* @__PURE__ */ jsxs95(
|
|
16127
|
+
tabs ? /* @__PURE__ */ jsxs95(Fragment26, { children: [
|
|
15949
16128
|
/* @__PURE__ */ jsxs95(
|
|
15950
16129
|
Tabs,
|
|
15951
16130
|
{
|
|
@@ -15953,7 +16132,7 @@ function RoundPageContainer({
|
|
|
15953
16132
|
className: cn(`w-full`, activeFillHeight && `flex flex-1 min-h-0 flex-col`),
|
|
15954
16133
|
onValueChange: handleTabChange,
|
|
15955
16134
|
children: [
|
|
15956
|
-
isMobile ? /* @__PURE__ */ jsx170("div", { className: "p-0", children: /* @__PURE__ */ jsxs95(
|
|
16135
|
+
isMobile ? /* @__PURE__ */ jsx170("div", { className: cn("p-0", !showMobileSectionPicker && "hidden"), children: /* @__PURE__ */ jsxs95(
|
|
15957
16136
|
Select,
|
|
15958
16137
|
{
|
|
15959
16138
|
items: tabItems,
|
|
@@ -15973,7 +16152,7 @@ function RoundPageContainer({
|
|
|
15973
16152
|
className: cn(
|
|
15974
16153
|
`flex w-full `,
|
|
15975
16154
|
isMobile ? `` : `px-4`,
|
|
15976
|
-
activeFillHeight ? `flex-1 min-h-0` :
|
|
16155
|
+
activeFillHeight ? `flex-1 min-h-0` : innerScrollY
|
|
15977
16156
|
),
|
|
15978
16157
|
children: tabs.map((tab) => /* @__PURE__ */ jsx170(
|
|
15979
16158
|
TabsContent,
|
|
@@ -15997,10 +16176,17 @@ function RoundPageContainer({
|
|
|
15997
16176
|
}
|
|
15998
16177
|
) })
|
|
15999
16178
|
] }),
|
|
16000
|
-
details && (isMobile ? /* @__PURE__ */ jsx170(Sheet, { open:
|
|
16001
|
-
|
|
16002
|
-
|
|
16003
|
-
|
|
16179
|
+
details && (isMobile ? /* @__PURE__ */ jsx170(Sheet, { open: showDetailsMobile, onOpenChange: setShowDetailsMobile, children: /* @__PURE__ */ jsxs95(
|
|
16180
|
+
SheetContent,
|
|
16181
|
+
{
|
|
16182
|
+
side: "end",
|
|
16183
|
+
className: "data-[side=left]:w-full data-[side=right]:w-full data-[side=left]:sm:max-w-none data-[side=right]:sm:max-w-none",
|
|
16184
|
+
children: [
|
|
16185
|
+
/* @__PURE__ */ jsx170(SheetHeader, { children: /* @__PURE__ */ jsx170(SheetTitle, { children: detailsTitle ?? "Details" }) }),
|
|
16186
|
+
/* @__PURE__ */ jsx170("div", { className: "overflow-y-auto p-6 pt-0", children: details })
|
|
16187
|
+
]
|
|
16188
|
+
}
|
|
16189
|
+
) }) : /* @__PURE__ */ jsxs95(
|
|
16004
16190
|
"div",
|
|
16005
16191
|
{
|
|
16006
16192
|
className: cn(
|
|
@@ -16043,7 +16229,7 @@ function RoundPageContainer({
|
|
|
16043
16229
|
__name(RoundPageContainer, "RoundPageContainer");
|
|
16044
16230
|
|
|
16045
16231
|
// src/components/containers/TabsContainer.tsx
|
|
16046
|
-
import { Fragment as
|
|
16232
|
+
import { Fragment as Fragment27, jsx as jsx171, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
16047
16233
|
function TabsContainer({
|
|
16048
16234
|
tabs,
|
|
16049
16235
|
defaultTab,
|
|
@@ -16088,7 +16274,7 @@ function TabsContainer({
|
|
|
16088
16274
|
),
|
|
16089
16275
|
additionalComponent && additionalComponent
|
|
16090
16276
|
] }),
|
|
16091
|
-
scrollAreaClassName ? /* @__PURE__ */ jsx171(ScrollArea, { className: scrollAreaClassName, children: validTabs.map((tab) => /* @__PURE__ */ jsx171(TabsContent, { value: tab.label, children: tab.content }, tab.label)) }) : /* @__PURE__ */ jsx171(
|
|
16277
|
+
scrollAreaClassName ? /* @__PURE__ */ jsx171(ScrollArea, { className: scrollAreaClassName, children: validTabs.map((tab) => /* @__PURE__ */ jsx171(TabsContent, { value: tab.label, children: tab.content }, tab.label)) }) : /* @__PURE__ */ jsx171(Fragment27, { children: validTabs.map((tab) => /* @__PURE__ */ jsx171(TabsContent, { value: tab.label, children: tab.content }, tab.label)) })
|
|
16092
16278
|
] });
|
|
16093
16279
|
}
|
|
16094
16280
|
__name(TabsContainer, "TabsContainer");
|
|
@@ -16939,7 +17125,7 @@ __name(useSubscriptionStatus, "useSubscriptionStatus");
|
|
|
16939
17125
|
// src/features/role/hooks/useRoleTableStructure.tsx
|
|
16940
17126
|
import { useTranslations as useTranslations56 } from "next-intl";
|
|
16941
17127
|
import { useMemo as useMemo28 } from "react";
|
|
16942
|
-
import { Fragment as
|
|
17128
|
+
import { Fragment as Fragment28, jsx as jsx186 } from "react/jsx-runtime";
|
|
16943
17129
|
var useRoleTableStructure = /* @__PURE__ */ __name((params) => {
|
|
16944
17130
|
const t = useTranslations56();
|
|
16945
17131
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -16976,7 +17162,7 @@ var useRoleTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
16976
17162
|
id: "description",
|
|
16977
17163
|
accessorKey: "description",
|
|
16978
17164
|
header: t(`role.fields.description.label`),
|
|
16979
|
-
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx186(
|
|
17165
|
+
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx186(Fragment28, { children: row.getValue("description") }), "cell"),
|
|
16980
17166
|
enableSorting: false,
|
|
16981
17167
|
enableHiding: false
|
|
16982
17168
|
}),
|
|
@@ -17332,7 +17518,7 @@ var useWaitlistTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
17332
17518
|
// src/features/content/hooks/useContentTableStructure.tsx
|
|
17333
17519
|
import { useTranslations as useTranslations60 } from "next-intl";
|
|
17334
17520
|
import { useMemo as useMemo32 } from "react";
|
|
17335
|
-
import { Fragment as
|
|
17521
|
+
import { Fragment as Fragment29, jsx as jsx190, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
17336
17522
|
var useContentTableStructure = /* @__PURE__ */ __name((params) => {
|
|
17337
17523
|
const t = useTranslations60();
|
|
17338
17524
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -17363,7 +17549,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
17363
17549
|
const contentModule = content.contentType ? Modules.findByModelName(content.contentType) : void 0;
|
|
17364
17550
|
const link = contentModule ? generateUrl({ page: contentModule, id: content.id }) : "#";
|
|
17365
17551
|
return /* @__PURE__ */ jsxs103(Tooltip2, { children: [
|
|
17366
|
-
/* @__PURE__ */ jsx190(TooltipTrigger, { className: "flex items-center justify-start space-x-2", children: /* @__PURE__ */ jsxs103(
|
|
17552
|
+
/* @__PURE__ */ jsx190(TooltipTrigger, { className: "flex items-center justify-start space-x-2", children: /* @__PURE__ */ jsxs103(Fragment29, { children: [
|
|
17367
17553
|
contentModule && getIconByModule({ module: contentModule, className: "h-4 w-4" }),
|
|
17368
17554
|
/* @__PURE__ */ jsx190(Link, { href: link, children: content.name })
|
|
17369
17555
|
] }) }),
|
|
@@ -17379,7 +17565,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
17379
17565
|
header: t(`common.relevance`),
|
|
17380
17566
|
cell: /* @__PURE__ */ __name(({ row }) => {
|
|
17381
17567
|
const content = row.original.jsonApiData;
|
|
17382
|
-
if (!content.relevance) return /* @__PURE__ */ jsx190(
|
|
17568
|
+
if (!content.relevance) return /* @__PURE__ */ jsx190(Fragment29, {});
|
|
17383
17569
|
const response = `${content.relevance.toFixed(0)}%`;
|
|
17384
17570
|
return /* @__PURE__ */ jsxs103("div", { className: "relative flex h-5 w-20 items-center justify-center overflow-clip rounded border text-center", children: [
|
|
17385
17571
|
/* @__PURE__ */ jsx190(
|
|
@@ -17853,7 +18039,7 @@ function ContentTableSearch({ data }) {
|
|
|
17853
18039
|
__name(ContentTableSearch, "ContentTableSearch");
|
|
17854
18040
|
|
|
17855
18041
|
// src/components/tables/ContentListTable.tsx
|
|
17856
|
-
import { Fragment as
|
|
18042
|
+
import { Fragment as Fragment30, jsx as jsx192, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
17857
18043
|
var EMPTY_ARRAY = [];
|
|
17858
18044
|
function getGroupKeys(item, field) {
|
|
17859
18045
|
const value = item.jsonApiData[field];
|
|
@@ -17868,7 +18054,7 @@ function getGroupKeys(item, field) {
|
|
|
17868
18054
|
__name(getGroupKeys, "getGroupKeys");
|
|
17869
18055
|
var isClassComponent = /* @__PURE__ */ __name((component) => typeof component === "function" && !!component.prototype?.isReactComponent, "isClassComponent");
|
|
17870
18056
|
function StableCell({ render, context }) {
|
|
17871
|
-
return /* @__PURE__ */ jsx192(
|
|
18057
|
+
return /* @__PURE__ */ jsx192(Fragment30, { children: render(context) });
|
|
17872
18058
|
}
|
|
17873
18059
|
__name(StableCell, "StableCell");
|
|
17874
18060
|
function renderCell(cellDef, context) {
|
|
@@ -17881,6 +18067,7 @@ __name(renderCell, "renderCell");
|
|
|
17881
18067
|
var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(props) {
|
|
17882
18068
|
const { data, fields, checkedIds, toggleId, allowSearch, filters: _filters, fullWidth, onRowClick } = props;
|
|
17883
18069
|
const t = useTranslations62();
|
|
18070
|
+
const isMobile = useIsMobile();
|
|
17884
18071
|
const [expanded, setExpanded] = useState61(
|
|
17885
18072
|
props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
|
|
17886
18073
|
);
|
|
@@ -17962,49 +18149,73 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
17962
18149
|
}, [props.groupBy, props.groupOrder, rowModel]);
|
|
17963
18150
|
const showFooter = !props.hidePagination && !!(data.next || data.previous);
|
|
17964
18151
|
const titleIsLarge = (props.titleSize ?? (fullWidth ? `lg` : `sm`)) === `lg`;
|
|
17965
|
-
|
|
17966
|
-
|
|
17967
|
-
|
|
17968
|
-
|
|
17969
|
-
|
|
17970
|
-
|
|
17971
|
-
|
|
17972
|
-
|
|
17973
|
-
|
|
17974
|
-
|
|
17975
|
-
|
|
17976
|
-
|
|
17977
|
-
|
|
17978
|
-
|
|
17979
|
-
|
|
17980
|
-
|
|
17981
|
-
|
|
17982
|
-
|
|
17983
|
-
|
|
17984
|
-
|
|
17985
|
-
|
|
17986
|
-
|
|
17987
|
-
|
|
17988
|
-
|
|
17989
|
-
|
|
17990
|
-
|
|
17991
|
-
|
|
17992
|
-
|
|
17993
|
-
|
|
17994
|
-
|
|
17995
|
-
|
|
18152
|
+
const titleLabel = /* @__PURE__ */ jsxs105(
|
|
18153
|
+
"div",
|
|
18154
|
+
{
|
|
18155
|
+
className: cn(
|
|
18156
|
+
"text-muted-foreground flex items-center gap-x-2 font-light whitespace-nowrap",
|
|
18157
|
+
titleIsLarge ? `text-lg` : `text-sm`
|
|
18158
|
+
),
|
|
18159
|
+
children: [
|
|
18160
|
+
props.titleActions,
|
|
18161
|
+
props.tableGeneratorType.icon && /* @__PURE__ */ jsx192(props.tableGeneratorType.icon, { className: cn(`text-primary`, titleIsLarge ? `h-6 w-6` : `h-4 w-4`) }),
|
|
18162
|
+
props.title
|
|
18163
|
+
]
|
|
18164
|
+
}
|
|
18165
|
+
);
|
|
18166
|
+
const hasTitleControls = !!(props.functions || props.filters || allowSearch);
|
|
18167
|
+
const titleControls = /* @__PURE__ */ jsxs105(Fragment30, { children: [
|
|
18168
|
+
props.filters,
|
|
18169
|
+
props.functions,
|
|
18170
|
+
allowSearch !== false && /* @__PURE__ */ jsx192(ContentTableSearch, { data })
|
|
18171
|
+
] });
|
|
18172
|
+
return /* @__PURE__ */ jsx192("div", { "data-help": "list.table", className: "flex w-full flex-col", children: /* @__PURE__ */ jsxs105("div", { className: cn(`overflow-clip`, fullWidth ? `` : `rounded-md border`), children: [
|
|
18173
|
+
props.title && isMobile && /* @__PURE__ */ jsxs105(
|
|
18174
|
+
"div",
|
|
18175
|
+
{
|
|
18176
|
+
"data-testid": "content-list-table-title-bar",
|
|
18177
|
+
className: "bg-card text-primary flex flex-wrap items-center gap-2 border-b p-4 font-bold",
|
|
18178
|
+
children: [
|
|
18179
|
+
/* @__PURE__ */ jsx192("div", { className: "shrink-0", children: titleLabel }),
|
|
18180
|
+
hasTitleControls && /* @__PURE__ */ jsx192("div", { className: "ms-auto flex flex-wrap items-center justify-end gap-2", children: titleControls })
|
|
18181
|
+
]
|
|
18182
|
+
}
|
|
18183
|
+
),
|
|
18184
|
+
/* @__PURE__ */ jsxs105(Table, { children: [
|
|
18185
|
+
/* @__PURE__ */ jsxs105(TableHeader, { className: "bg-muted font-semibold", children: [
|
|
18186
|
+
props.title && !isMobile && /* @__PURE__ */ jsx192(TableRow, { children: /* @__PURE__ */ jsx192(
|
|
18187
|
+
TableHead,
|
|
18188
|
+
{
|
|
18189
|
+
className: "bg-card rounded-t-lg text-primary p-4 text-start font-bold",
|
|
18190
|
+
colSpan: tableColumns.length,
|
|
18191
|
+
children: /* @__PURE__ */ jsxs105("div", { className: "flex w-full items-center justify-between gap-x-2", children: [
|
|
18192
|
+
/* @__PURE__ */ jsx192("div", { className: "w-full", children: titleLabel }),
|
|
18193
|
+
hasTitleControls && titleControls
|
|
17996
18194
|
] })
|
|
17997
|
-
|
|
17998
|
-
}
|
|
17999
|
-
|
|
18000
|
-
|
|
18001
|
-
|
|
18002
|
-
|
|
18003
|
-
})
|
|
18004
|
-
|
|
18005
|
-
|
|
18006
|
-
|
|
18007
|
-
|
|
18195
|
+
}
|
|
18196
|
+
) }),
|
|
18197
|
+
!props.hideHeader && table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx192(TableRow, { children: headerGroup.headers.map((header) => {
|
|
18198
|
+
const meta = header.column.columnDef.meta;
|
|
18199
|
+
return /* @__PURE__ */ jsx192(TableHead, { className: meta?.className, children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
|
|
18200
|
+
}) }, headerGroup.id))
|
|
18201
|
+
] }),
|
|
18202
|
+
/* @__PURE__ */ jsx192(TableBody, { children: rowModel && rowModel.rows?.length ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ jsxs105(React31.Fragment, { children: [
|
|
18203
|
+
/* @__PURE__ */ jsx192(TableRow, { children: /* @__PURE__ */ jsx192(TableCell, { colSpan: tableColumns.length, className: "bg-muted px-4 py-2", children: /* @__PURE__ */ jsx192(MicroLabel, { children: props.groupLabel?.(group.groupKey) ?? group.groupKey }) }) }),
|
|
18204
|
+
group.rows.map((row) => /* @__PURE__ */ jsxs105(React31.Fragment, { children: [
|
|
18205
|
+
/* @__PURE__ */ jsx192(
|
|
18206
|
+
TableRow,
|
|
18207
|
+
{
|
|
18208
|
+
onClick: () => onRowClick?.(row.original.jsonApiData),
|
|
18209
|
+
className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
|
|
18210
|
+
children: row.getVisibleCells().map((cell) => {
|
|
18211
|
+
const meta = cell.column.columnDef.meta;
|
|
18212
|
+
return /* @__PURE__ */ jsx192(TableCell, { className: meta?.className, children: renderCell(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
|
|
18213
|
+
})
|
|
18214
|
+
}
|
|
18215
|
+
),
|
|
18216
|
+
props.renderExpandedRow && row.getIsExpanded() && /* @__PURE__ */ jsx192(TableRow, { "data-testid": "content-list-table-expanded-row", children: /* @__PURE__ */ jsx192(TableCell, { colSpan: tableColumns.length, className: "bg-muted/30 px-4 py-3", children: props.renderExpandedRow(row.original.jsonApiData) }) })
|
|
18217
|
+
] }, row.id))
|
|
18218
|
+
] }, group.groupKey)) : rowModel.rows.map((row) => /* @__PURE__ */ jsxs105(React31.Fragment, { children: [
|
|
18008
18219
|
/* @__PURE__ */ jsx192(
|
|
18009
18220
|
TableRow,
|
|
18010
18221
|
{
|
|
@@ -18017,58 +18228,45 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
|
|
|
18017
18228
|
}
|
|
18018
18229
|
),
|
|
18019
18230
|
props.renderExpandedRow && row.getIsExpanded() && /* @__PURE__ */ jsx192(TableRow, { "data-testid": "content-list-table-expanded-row", children: /* @__PURE__ */ jsx192(TableCell, { colSpan: tableColumns.length, className: "bg-muted/30 px-4 py-3", children: props.renderExpandedRow(row.original.jsonApiData) }) })
|
|
18020
|
-
] }, row.id))
|
|
18021
|
-
|
|
18022
|
-
|
|
18023
|
-
|
|
18024
|
-
|
|
18025
|
-
|
|
18026
|
-
|
|
18027
|
-
|
|
18028
|
-
|
|
18029
|
-
|
|
18030
|
-
|
|
18031
|
-
|
|
18032
|
-
|
|
18033
|
-
|
|
18034
|
-
|
|
18035
|
-
|
|
18036
|
-
|
|
18037
|
-
|
|
18038
|
-
|
|
18039
|
-
|
|
18040
|
-
|
|
18041
|
-
|
|
18042
|
-
e
|
|
18043
|
-
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
|
|
18047
|
-
|
|
18048
|
-
|
|
18049
|
-
|
|
18050
|
-
|
|
18051
|
-
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
variant: "outline",
|
|
18055
|
-
size: "sm",
|
|
18056
|
-
onClick: (e) => {
|
|
18057
|
-
e.preventDefault();
|
|
18058
|
-
setPendingDirection("next");
|
|
18059
|
-
data.next?.(true);
|
|
18060
|
-
},
|
|
18061
|
-
disabled: !data.next || pendingDirection !== null,
|
|
18062
|
-
children: pendingDirection === "next" ? /* @__PURE__ */ jsx192(Loader23, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx192(ChevronRight, { className: "h-4 w-4 rtl:rotate-180" })
|
|
18063
|
-
}
|
|
18064
|
-
)
|
|
18065
|
-
] }) }) }) })
|
|
18066
|
-
] }) }) });
|
|
18231
|
+
] }, row.id)) : /* @__PURE__ */ jsx192(TableRow, { children: /* @__PURE__ */ jsx192(TableCell, { colSpan: tableColumns.length, className: "h-24 text-center", children: props.emptyState ?? (t.has("ui.empty_states.no_results") ? t("ui.empty_states.no_results") : "No results.") }) }) }),
|
|
18232
|
+
showFooter && /* @__PURE__ */ jsx192(TableFooter, { children: /* @__PURE__ */ jsx192(TableRow, { children: /* @__PURE__ */ jsx192(TableCell, { colSpan: tableColumns.length, className: "bg-card py-4 text-end", children: /* @__PURE__ */ jsxs105("div", { className: "flex items-center justify-end space-x-2", children: [
|
|
18233
|
+
/* @__PURE__ */ jsx192(
|
|
18234
|
+
Button,
|
|
18235
|
+
{
|
|
18236
|
+
variant: "outline",
|
|
18237
|
+
size: "sm",
|
|
18238
|
+
onClick: (e) => {
|
|
18239
|
+
e.preventDefault();
|
|
18240
|
+
setPendingDirection("prev");
|
|
18241
|
+
data.previous?.(true);
|
|
18242
|
+
},
|
|
18243
|
+
disabled: !data.previous || pendingDirection !== null,
|
|
18244
|
+
children: pendingDirection === "prev" ? /* @__PURE__ */ jsx192(Loader23, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx192(ChevronLeft, { className: "h-4 w-4 rtl:rotate-180" })
|
|
18245
|
+
}
|
|
18246
|
+
),
|
|
18247
|
+
data.pageInfo && /* @__PURE__ */ jsx192("span", { className: "text-muted-foreground text-xs", children: `${data.pageInfo.startItem}-${data.pageInfo.endItem}${data.total ? ` of ${data.total}` : ""}` }),
|
|
18248
|
+
/* @__PURE__ */ jsx192(
|
|
18249
|
+
Button,
|
|
18250
|
+
{
|
|
18251
|
+
variant: "outline",
|
|
18252
|
+
size: "sm",
|
|
18253
|
+
onClick: (e) => {
|
|
18254
|
+
e.preventDefault();
|
|
18255
|
+
setPendingDirection("next");
|
|
18256
|
+
data.next?.(true);
|
|
18257
|
+
},
|
|
18258
|
+
disabled: !data.next || pendingDirection !== null,
|
|
18259
|
+
children: pendingDirection === "next" ? /* @__PURE__ */ jsx192(Loader23, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx192(ChevronRight, { className: "h-4 w-4 rtl:rotate-180" })
|
|
18260
|
+
}
|
|
18261
|
+
)
|
|
18262
|
+
] }) }) }) })
|
|
18263
|
+
] })
|
|
18264
|
+
] }) });
|
|
18067
18265
|
}, "ContentListTable"));
|
|
18068
18266
|
|
|
18069
18267
|
// src/components/grids/ContentListGrid.tsx
|
|
18070
18268
|
import { useEffect as useEffect52, useRef as useRef32 } from "react";
|
|
18071
|
-
import { Fragment as
|
|
18269
|
+
import { Fragment as Fragment31, jsx as jsx193, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
18072
18270
|
var DEFAULT_GRID_CLASSES = "grid grid-cols-2 gap-4 p-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5";
|
|
18073
18271
|
function ContentListGrid(props) {
|
|
18074
18272
|
const { data, ItemComponent, allowSearch, fullWidth, gridClassName } = props;
|
|
@@ -18099,7 +18297,7 @@ function ContentListGrid(props) {
|
|
|
18099
18297
|
]
|
|
18100
18298
|
}
|
|
18101
18299
|
) }),
|
|
18102
|
-
(props.functions || props.filters || allowSearch) && /* @__PURE__ */ jsxs106(
|
|
18300
|
+
(props.functions || props.filters || allowSearch) && /* @__PURE__ */ jsxs106(Fragment31, { children: [
|
|
18103
18301
|
props.functions,
|
|
18104
18302
|
props.filters,
|
|
18105
18303
|
allowSearch && /* @__PURE__ */ jsx193(ContentTableSearch, { data })
|
|
@@ -18332,14 +18530,14 @@ import { z as z5 } from "zod";
|
|
|
18332
18530
|
|
|
18333
18531
|
// src/features/auth/components/GdprConsentSection.tsx
|
|
18334
18532
|
import { useTranslations as useTranslations64 } from "next-intl";
|
|
18335
|
-
import { Fragment as
|
|
18533
|
+
import { Fragment as Fragment32, jsx as jsx200, jsxs as jsxs111 } from "react/jsx-runtime";
|
|
18336
18534
|
function GdprConsentSection({
|
|
18337
18535
|
form,
|
|
18338
18536
|
termsCheckboxId = "termsAccepted",
|
|
18339
18537
|
marketingCheckboxId = "marketingConsent"
|
|
18340
18538
|
}) {
|
|
18341
18539
|
const t = useTranslations64("auth.gdpr");
|
|
18342
|
-
const termsLabel = /* @__PURE__ */ jsxs111(
|
|
18540
|
+
const termsLabel = /* @__PURE__ */ jsxs111(Fragment32, { children: [
|
|
18343
18541
|
t("terms_prefix"),
|
|
18344
18542
|
" ",
|
|
18345
18543
|
/* @__PURE__ */ jsx200(Link, { href: "/terms", target: "_blank", rel: "noopener", children: t("terms_of_service") }),
|
|
@@ -18364,7 +18562,7 @@ function GdprConsentSection({
|
|
|
18364
18562
|
__name(GdprConsentSection, "GdprConsentSection");
|
|
18365
18563
|
|
|
18366
18564
|
// src/features/auth/components/forms/Register.tsx
|
|
18367
|
-
import { Fragment as
|
|
18565
|
+
import { Fragment as Fragment33, jsx as jsx201, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
18368
18566
|
var REFERRAL_COOKIE_NAME = "referral_code";
|
|
18369
18567
|
function getReferralCode() {
|
|
18370
18568
|
if (typeof document === "undefined") return null;
|
|
@@ -18482,7 +18680,7 @@ function Register() {
|
|
|
18482
18680
|
}
|
|
18483
18681
|
}, "onSubmit");
|
|
18484
18682
|
if (registrationMode === "waitlist" && inviteCode && isValidatingInvite) {
|
|
18485
|
-
return /* @__PURE__ */ jsxs112(
|
|
18683
|
+
return /* @__PURE__ */ jsxs112(Fragment33, { children: [
|
|
18486
18684
|
/* @__PURE__ */ jsx201(CardHeader, { children: /* @__PURE__ */ jsxs112(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
18487
18685
|
/* @__PURE__ */ jsx201(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
18488
18686
|
t("waitlist.invite.validating_title")
|
|
@@ -18494,7 +18692,7 @@ function Register() {
|
|
|
18494
18692
|
] });
|
|
18495
18693
|
}
|
|
18496
18694
|
if (registrationMode === "waitlist" && inviteCode && inviteError) {
|
|
18497
|
-
return /* @__PURE__ */ jsxs112(
|
|
18695
|
+
return /* @__PURE__ */ jsxs112(Fragment33, { children: [
|
|
18498
18696
|
/* @__PURE__ */ jsx201(CardHeader, { children: /* @__PURE__ */ jsxs112(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
18499
18697
|
/* @__PURE__ */ jsx201(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
18500
18698
|
t("waitlist.invite.invalid_title")
|
|
@@ -18507,7 +18705,7 @@ function Register() {
|
|
|
18507
18705
|
] });
|
|
18508
18706
|
}
|
|
18509
18707
|
if (registrationMode === "waitlist" && !inviteCode) {
|
|
18510
|
-
return /* @__PURE__ */ jsxs112(
|
|
18708
|
+
return /* @__PURE__ */ jsxs112(Fragment33, { children: [
|
|
18511
18709
|
/* @__PURE__ */ jsx201(CardHeader, { children: /* @__PURE__ */ jsxs112(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
18512
18710
|
/* @__PURE__ */ jsx201(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
18513
18711
|
t("waitlist.invite.registration_title")
|
|
@@ -18520,13 +18718,13 @@ function Register() {
|
|
|
18520
18718
|
/* @__PURE__ */ jsx201(CardFooter, { className: "flex w-full flex-row justify-between", children: /* @__PURE__ */ jsx201(Link, { href: "#", className: "flex w-full justify-start", onClick: () => setComponentType(0 /* Login */), children: t("auth.buttons.login") }) })
|
|
18521
18719
|
] });
|
|
18522
18720
|
}
|
|
18523
|
-
return /* @__PURE__ */ jsxs112(
|
|
18721
|
+
return /* @__PURE__ */ jsxs112(Fragment33, { children: [
|
|
18524
18722
|
/* @__PURE__ */ jsxs112(CardHeader, { children: [
|
|
18525
18723
|
/* @__PURE__ */ jsxs112(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
18526
18724
|
/* @__PURE__ */ jsx201(Image7, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
18527
18725
|
t(`auth.buttons.register`)
|
|
18528
18726
|
] }),
|
|
18529
|
-
/* @__PURE__ */ jsx201(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx201(
|
|
18727
|
+
/* @__PURE__ */ jsx201(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx201(Fragment33, { children: " " }) : /* @__PURE__ */ jsx201(Fragment33, { children: t(`auth.register_description`) }) })
|
|
18530
18728
|
] }),
|
|
18531
18729
|
showConfirmation ? /* @__PURE__ */ jsx201(CardContent, { children: /* @__PURE__ */ jsx201(CardDescription, { className: "text-center text-xl", children: t("auth.register_confirmation") }) }) : /* @__PURE__ */ jsx201(Form, { ...form, children: /* @__PURE__ */ jsxs112("form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
18532
18730
|
/* @__PURE__ */ jsxs112(CardContent, { children: [
|
|
@@ -18730,7 +18928,7 @@ function InnerAuthContainer() {
|
|
|
18730
18928
|
const { activeComponent } = useAuthContext();
|
|
18731
18929
|
if (activeComponent === null)
|
|
18732
18930
|
return /* @__PURE__ */ jsx203("div", { className: "max-w-sm", children: /* @__PURE__ */ jsx203(Image8, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, className: "animate-spin-slow", priority: true }) });
|
|
18733
|
-
return /* @__PURE__ */ jsx203(Card, { className: "w-full max-w-md", children: activeComponent });
|
|
18931
|
+
return /* @__PURE__ */ jsx203(Card, { className: "w-full max-w-md max-md:[&_[data-slot=button]:not([data-size])]:h-10 max-md:[&_[data-slot=input-group-control]]:h-full max-md:[&_[data-slot=input-group]]:h-10 max-md:[&_[data-slot=input]]:h-10", children: activeComponent });
|
|
18734
18932
|
}
|
|
18735
18933
|
__name(InnerAuthContainer, "InnerAuthContainer");
|
|
18736
18934
|
|
|
@@ -18959,7 +19157,7 @@ __name(DisableTwoFactorDialog, "DisableTwoFactorDialog");
|
|
|
18959
19157
|
import { Edit, Key, Trash2 } from "lucide-react";
|
|
18960
19158
|
import { useTranslations as useTranslations68 } from "next-intl";
|
|
18961
19159
|
import { useState as useState68 } from "react";
|
|
18962
|
-
import { Fragment as
|
|
19160
|
+
import { Fragment as Fragment34, jsx as jsx207, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
18963
19161
|
function PasskeyList({ passkeys, onRefresh }) {
|
|
18964
19162
|
const t = useTranslations68();
|
|
18965
19163
|
const [renameDialogOpen, setRenameDialogOpen] = useState68(false);
|
|
@@ -19015,7 +19213,7 @@ function PasskeyList({ passkeys, onRefresh }) {
|
|
|
19015
19213
|
if (passkeys.length === 0) {
|
|
19016
19214
|
return /* @__PURE__ */ jsx207("p", { className: "text-sm text-muted-foreground text-center py-4", children: t("auth.two_factor.no_passkeys") });
|
|
19017
19215
|
}
|
|
19018
|
-
return /* @__PURE__ */ jsxs116(
|
|
19216
|
+
return /* @__PURE__ */ jsxs116(Fragment34, { children: [
|
|
19019
19217
|
/* @__PURE__ */ jsx207("div", { className: "space-y-2", children: passkeys.map((passkey) => /* @__PURE__ */ jsxs116("div", { className: "flex items-center justify-between p-3 border rounded-lg", children: [
|
|
19020
19218
|
/* @__PURE__ */ jsxs116("div", { className: "flex items-center gap-3", children: [
|
|
19021
19219
|
/* @__PURE__ */ jsx207(Key, { className: "h-5 w-5 text-muted-foreground" }),
|
|
@@ -19332,7 +19530,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
|
|
|
19332
19530
|
__name(TotpSetupDialog, "TotpSetupDialog");
|
|
19333
19531
|
|
|
19334
19532
|
// src/features/auth/components/two-factor/TwoFactorSettings.tsx
|
|
19335
|
-
import { Fragment as
|
|
19533
|
+
import { Fragment as Fragment35, jsx as jsx211, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
19336
19534
|
function TwoFactorSettings() {
|
|
19337
19535
|
const t = useTranslations72();
|
|
19338
19536
|
const [status, setStatus] = useState72(null);
|
|
@@ -19419,7 +19617,7 @@ function TwoFactorSettings() {
|
|
|
19419
19617
|
] }),
|
|
19420
19618
|
/* @__PURE__ */ jsx211(BackupCodesDialog, { remainingCodes: status?.backupCodesCount ?? 0, onRegenerate: handleRefresh })
|
|
19421
19619
|
] }) }),
|
|
19422
|
-
!isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ jsxs120(
|
|
19620
|
+
!isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ jsxs120(Fragment35, { children: [
|
|
19423
19621
|
/* @__PURE__ */ jsx211(Separator, {}),
|
|
19424
19622
|
/* @__PURE__ */ jsxs120("div", { className: "flex items-center justify-between", children: [
|
|
19425
19623
|
/* @__PURE__ */ jsxs120("div", { children: [
|
|
@@ -19429,7 +19627,7 @@ function TwoFactorSettings() {
|
|
|
19429
19627
|
/* @__PURE__ */ jsx211(Button, { onClick: handleEnable2FA, disabled: isEnabling, children: isEnabling ? t("common.loading") : t("auth.two_factor.enable_button") })
|
|
19430
19628
|
] })
|
|
19431
19629
|
] }),
|
|
19432
|
-
isEnabled && /* @__PURE__ */ jsxs120(
|
|
19630
|
+
isEnabled && /* @__PURE__ */ jsxs120(Fragment35, { children: [
|
|
19433
19631
|
/* @__PURE__ */ jsx211(Separator, {}),
|
|
19434
19632
|
/* @__PURE__ */ jsxs120("div", { className: "flex items-center justify-between", children: [
|
|
19435
19633
|
/* @__PURE__ */ jsxs120("div", { children: [
|
|
@@ -19511,11 +19709,11 @@ function GoogleSignInButton({ referralCode }) {
|
|
|
19511
19709
|
__name(GoogleSignInButton, "GoogleSignInButton");
|
|
19512
19710
|
|
|
19513
19711
|
// src/features/auth/components/details/LandingComponent.tsx
|
|
19514
|
-
import { Fragment as
|
|
19712
|
+
import { Fragment as Fragment36, jsx as jsx214, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
19515
19713
|
function LandingComponent() {
|
|
19516
19714
|
const t = useTranslations73();
|
|
19517
19715
|
const { setComponentType } = useAuthContext();
|
|
19518
|
-
return /* @__PURE__ */ jsxs122(
|
|
19716
|
+
return /* @__PURE__ */ jsxs122(Fragment36, { children: [
|
|
19519
19717
|
/* @__PURE__ */ jsxs122(CardHeader, { className: "mb-4", "data-testid": "page-pre-login-container", children: [
|
|
19520
19718
|
/* @__PURE__ */ jsxs122(CardTitle, { className: "text-primary flex flex-col items-center gap-y-8 pb-8 text-4xl", children: [
|
|
19521
19719
|
/* @__PURE__ */ jsx214(Image9, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
@@ -19524,7 +19722,7 @@ function LandingComponent() {
|
|
|
19524
19722
|
/* @__PURE__ */ jsx214(CardDescription, { className: "flex w-full justify-center text-center text-sm", children: t(`common.description`) })
|
|
19525
19723
|
] }),
|
|
19526
19724
|
/* @__PURE__ */ jsxs122(CardFooter, { className: "mt-4 flex w-full flex-col justify-between gap-y-4", children: [
|
|
19527
|
-
isInternalAuthEnabled() && /* @__PURE__ */ jsxs122(
|
|
19725
|
+
isInternalAuthEnabled() && /* @__PURE__ */ jsxs122(Fragment36, { children: [
|
|
19528
19726
|
isRegistrationAllowed() && /* @__PURE__ */ jsx214(
|
|
19529
19727
|
Link,
|
|
19530
19728
|
{
|
|
@@ -19550,7 +19748,7 @@ import Image10 from "next/image";
|
|
|
19550
19748
|
import { useEffect as useEffect56, useState as useState73 } from "react";
|
|
19551
19749
|
import { useForm as useForm6 } from "react-hook-form";
|
|
19552
19750
|
import { z as z6 } from "zod";
|
|
19553
|
-
import { Fragment as
|
|
19751
|
+
import { Fragment as Fragment37, jsx as jsx215, jsxs as jsxs123 } from "react/jsx-runtime";
|
|
19554
19752
|
function AcceptInvitation() {
|
|
19555
19753
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
19556
19754
|
const [showConfirmation, setShowConfirmation] = useState73(false);
|
|
@@ -19613,13 +19811,13 @@ function AcceptInvitation() {
|
|
|
19613
19811
|
errorToast({ title: t(`common.errors.error`), error });
|
|
19614
19812
|
}
|
|
19615
19813
|
}, "onSubmit");
|
|
19616
|
-
return /* @__PURE__ */ jsxs123(
|
|
19814
|
+
return /* @__PURE__ */ jsxs123(Fragment37, { children: [
|
|
19617
19815
|
/* @__PURE__ */ jsxs123(CardHeader, { children: [
|
|
19618
19816
|
/* @__PURE__ */ jsxs123(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
19619
19817
|
/* @__PURE__ */ jsx215(Image10, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
19620
19818
|
t("auth.accept_invitation")
|
|
19621
19819
|
] }),
|
|
19622
|
-
/* @__PURE__ */ jsx215(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx215(
|
|
19820
|
+
/* @__PURE__ */ jsx215(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx215(Fragment37, { children: t("auth.errors.activating_account") }) : /* @__PURE__ */ jsx215(Fragment37, { children: t("auth.select_password") }) })
|
|
19623
19821
|
] }),
|
|
19624
19822
|
/* @__PURE__ */ jsx215(CardContent, { children: showConfirmation ? /* @__PURE__ */ jsx215(CardDescription, { className: "text-center text-xl", children: t("auth.activation_description") }) : error ? /* @__PURE__ */ jsx215(CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ jsx215(Form, { ...form, children: /* @__PURE__ */ jsxs123("form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
19625
19823
|
/* @__PURE__ */ jsx215(
|
|
@@ -19650,7 +19848,7 @@ __name(AcceptInvitation, "AcceptInvitation");
|
|
|
19650
19848
|
import { useTranslations as useTranslations75 } from "next-intl";
|
|
19651
19849
|
import Image11 from "next/image";
|
|
19652
19850
|
import { useEffect as useEffect57, useState as useState74 } from "react";
|
|
19653
|
-
import { Fragment as
|
|
19851
|
+
import { Fragment as Fragment38, jsx as jsx216, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
19654
19852
|
function ActivateAccount() {
|
|
19655
19853
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
19656
19854
|
const [showConfirmation, setShowConfirmation] = useState74(false);
|
|
@@ -19683,15 +19881,15 @@ function ActivateAccount() {
|
|
|
19683
19881
|
setError(t(`auth.errors.invalid_invitation_code`));
|
|
19684
19882
|
}
|
|
19685
19883
|
}, []);
|
|
19686
|
-
return /* @__PURE__ */ jsxs124(
|
|
19884
|
+
return /* @__PURE__ */ jsxs124(Fragment38, { children: [
|
|
19687
19885
|
/* @__PURE__ */ jsxs124(CardHeader, { children: [
|
|
19688
19886
|
/* @__PURE__ */ jsxs124(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
19689
19887
|
/* @__PURE__ */ jsx216(Image11, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
19690
19888
|
t("auth.accept_invitation")
|
|
19691
19889
|
] }),
|
|
19692
|
-
/* @__PURE__ */ jsx216(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx216(
|
|
19890
|
+
/* @__PURE__ */ jsx216(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx216(Fragment38, { children: t("auth.errors.activating_account") }) : /* @__PURE__ */ jsx216(Fragment38, { children: " " }) })
|
|
19693
19891
|
] }),
|
|
19694
|
-
/* @__PURE__ */ jsx216(CardContent, { children: /* @__PURE__ */ jsx216(CardDescription, { className: "text-center text-xl", children: showConfirmation ? /* @__PURE__ */ jsx216(
|
|
19892
|
+
/* @__PURE__ */ jsx216(CardContent, { children: /* @__PURE__ */ jsx216(CardDescription, { className: "text-center text-xl", children: showConfirmation ? /* @__PURE__ */ jsx216(Fragment38, { children: t("auth.activation_description") }) : error ? /* @__PURE__ */ jsx216(Fragment38, { children: error }) : /* @__PURE__ */ jsx216(Fragment38, { children: t("auth.activation_wait") }) }) })
|
|
19695
19893
|
] });
|
|
19696
19894
|
}
|
|
19697
19895
|
__name(ActivateAccount, "ActivateAccount");
|
|
@@ -19728,7 +19926,7 @@ import Image12 from "next/image";
|
|
|
19728
19926
|
import { useState as useState76 } from "react";
|
|
19729
19927
|
import { useForm as useForm7 } from "react-hook-form";
|
|
19730
19928
|
import { z as z7 } from "zod";
|
|
19731
|
-
import { Fragment as
|
|
19929
|
+
import { Fragment as Fragment39, jsx as jsx217, jsxs as jsxs125 } from "react/jsx-runtime";
|
|
19732
19930
|
function ForgotPassword() {
|
|
19733
19931
|
const t = useTranslations76();
|
|
19734
19932
|
const { setComponentType } = useAuthContext();
|
|
@@ -19755,13 +19953,13 @@ function ForgotPassword() {
|
|
|
19755
19953
|
errorToast({ error: e });
|
|
19756
19954
|
}
|
|
19757
19955
|
}, "onSubmit");
|
|
19758
|
-
return /* @__PURE__ */ jsxs125(
|
|
19956
|
+
return /* @__PURE__ */ jsxs125(Fragment39, { children: [
|
|
19759
19957
|
/* @__PURE__ */ jsxs125(CardHeader, { "data-testid": "page-forgot-password-container", children: [
|
|
19760
19958
|
/* @__PURE__ */ jsxs125(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
19761
19959
|
/* @__PURE__ */ jsx217(Image12, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
19762
19960
|
t("auth.buttons.forgot_password")
|
|
19763
19961
|
] }),
|
|
19764
|
-
/* @__PURE__ */ jsx217(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx217(
|
|
19962
|
+
/* @__PURE__ */ jsx217(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx217(Fragment39, { children: " " }) : /* @__PURE__ */ jsx217(Fragment39, { children: t(`auth.add_email_to_reset`) }) })
|
|
19765
19963
|
] }),
|
|
19766
19964
|
showConfirmation ? /* @__PURE__ */ jsx217(CardContent, { children: /* @__PURE__ */ jsx217(CardDescription, { className: "text-center text-xl", children: t(`auth.reset_confirmation`) }) }) : /* @__PURE__ */ jsx217(Form, { ...form, children: /* @__PURE__ */ jsxs125("form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
19767
19965
|
/* @__PURE__ */ jsxs125(CardContent, { children: [
|
|
@@ -19800,7 +19998,7 @@ import { useRouter, useSearchParams as useSearchParams3 } from "next/navigation"
|
|
|
19800
19998
|
import { useEffect as useEffect59, useState as useState77 } from "react";
|
|
19801
19999
|
import { useForm as useForm8 } from "react-hook-form";
|
|
19802
20000
|
import { z as z8 } from "zod";
|
|
19803
|
-
import { Fragment as
|
|
20001
|
+
import { Fragment as Fragment40, jsx as jsx218, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
19804
20002
|
function Login() {
|
|
19805
20003
|
const t = useTranslations77();
|
|
19806
20004
|
const { setUser } = useCurrentUserContext();
|
|
@@ -19866,7 +20064,7 @@ function Login() {
|
|
|
19866
20064
|
});
|
|
19867
20065
|
}
|
|
19868
20066
|
}, "onSubmit");
|
|
19869
|
-
return /* @__PURE__ */ jsxs126(
|
|
20067
|
+
return /* @__PURE__ */ jsxs126(Fragment40, { children: [
|
|
19870
20068
|
/* @__PURE__ */ jsxs126(CardHeader, { "data-testid": "page-login-container", children: [
|
|
19871
20069
|
/* @__PURE__ */ jsxs126(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
19872
20070
|
/* @__PURE__ */ jsx218(Image13, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
@@ -19875,7 +20073,7 @@ function Login() {
|
|
|
19875
20073
|
/* @__PURE__ */ jsx218(CardDescription, { className: "text-sm", children: t(`auth.login_description`) })
|
|
19876
20074
|
] }),
|
|
19877
20075
|
/* @__PURE__ */ jsx218(Form, { ...form, children: /* @__PURE__ */ jsxs126("form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
19878
|
-
/* @__PURE__ */ jsx218(CardContent, { children: isInternalAuthEnabled() && /* @__PURE__ */ jsxs126(
|
|
20076
|
+
/* @__PURE__ */ jsx218(CardContent, { children: isInternalAuthEnabled() && /* @__PURE__ */ jsxs126(Fragment40, { children: [
|
|
19879
20077
|
/* @__PURE__ */ jsx218(
|
|
19880
20078
|
FormInput,
|
|
19881
20079
|
{
|
|
@@ -19942,7 +20140,7 @@ function clearClientStorage(keys) {
|
|
|
19942
20140
|
__name(clearClientStorage, "clearClientStorage");
|
|
19943
20141
|
|
|
19944
20142
|
// src/features/auth/components/forms/Logout.tsx
|
|
19945
|
-
import { Fragment as
|
|
20143
|
+
import { Fragment as Fragment41, jsx as jsx219 } from "react/jsx-runtime";
|
|
19946
20144
|
function Logout({ storageKeys }) {
|
|
19947
20145
|
const generateUrl = usePageUrlGenerator();
|
|
19948
20146
|
useEffect60(() => {
|
|
@@ -19953,7 +20151,7 @@ function Logout({ storageKeys }) {
|
|
|
19953
20151
|
}, "logOut");
|
|
19954
20152
|
logOut();
|
|
19955
20153
|
}, []);
|
|
19956
|
-
return /* @__PURE__ */ jsx219(
|
|
20154
|
+
return /* @__PURE__ */ jsx219(Fragment41, {});
|
|
19957
20155
|
}
|
|
19958
20156
|
__name(Logout, "Logout");
|
|
19959
20157
|
|
|
@@ -19994,7 +20192,7 @@ import Image14 from "next/image";
|
|
|
19994
20192
|
import { useEffect as useEffect62, useState as useState78 } from "react";
|
|
19995
20193
|
import { useForm as useForm9 } from "react-hook-form";
|
|
19996
20194
|
import { z as z9 } from "zod";
|
|
19997
|
-
import { Fragment as
|
|
20195
|
+
import { Fragment as Fragment42, jsx as jsx220, jsxs as jsxs127 } from "react/jsx-runtime";
|
|
19998
20196
|
function ResetPassword() {
|
|
19999
20197
|
const { setComponentType, params, setParams } = useAuthContext();
|
|
20000
20198
|
const [showConfirmation, setShowConfirmation] = useState78(false);
|
|
@@ -20057,13 +20255,13 @@ function ResetPassword() {
|
|
|
20057
20255
|
errorToast({ title: t(`common.errors.error`), error });
|
|
20058
20256
|
}
|
|
20059
20257
|
}, "onSubmit");
|
|
20060
|
-
return /* @__PURE__ */ jsxs127(
|
|
20258
|
+
return /* @__PURE__ */ jsxs127(Fragment42, { children: [
|
|
20061
20259
|
/* @__PURE__ */ jsxs127(CardHeader, { children: [
|
|
20062
20260
|
/* @__PURE__ */ jsxs127(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
20063
20261
|
/* @__PURE__ */ jsx220(Image14, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
20064
20262
|
t(`auth.password_reset`)
|
|
20065
20263
|
] }),
|
|
20066
|
-
/* @__PURE__ */ jsx220(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx220(
|
|
20264
|
+
/* @__PURE__ */ jsx220(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx220(Fragment42, { children: t(`auth.errors.password_reset_error`) }) : /* @__PURE__ */ jsx220(Fragment42, { children: t(`auth.reset_password`) }) })
|
|
20067
20265
|
] }),
|
|
20068
20266
|
/* @__PURE__ */ jsx220(CardContent, { children: showConfirmation ? /* @__PURE__ */ jsx220(CardDescription, { className: "text-center text-xl", children: t(`auth.reset_success_description`) }) : error ? /* @__PURE__ */ jsx220(CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ jsx220(Form, { ...form, children: /* @__PURE__ */ jsxs127("form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
20069
20267
|
/* @__PURE__ */ jsx220(FormPassword, { form, id: "password", name: "Password" }),
|
|
@@ -20123,7 +20321,7 @@ function PasskeyButton({ pendingToken, onSuccess, onError, disabled = false }) {
|
|
|
20123
20321
|
__name(PasskeyButton, "PasskeyButton");
|
|
20124
20322
|
|
|
20125
20323
|
// src/features/auth/components/forms/TwoFactorChallenge.tsx
|
|
20126
|
-
import { Fragment as
|
|
20324
|
+
import { Fragment as Fragment43, jsx as jsx222, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
20127
20325
|
function TwoFactorChallenge() {
|
|
20128
20326
|
const t = useTranslations80();
|
|
20129
20327
|
const { setUser } = useCurrentUserContext();
|
|
@@ -20203,7 +20401,7 @@ function TwoFactorChallenge() {
|
|
|
20203
20401
|
const hasTotp = availableMethods.includes("totp");
|
|
20204
20402
|
const hasPasskey = availableMethods.includes("passkey");
|
|
20205
20403
|
const hasBackup = availableMethods.includes("backup");
|
|
20206
|
-
return /* @__PURE__ */ jsxs128(
|
|
20404
|
+
return /* @__PURE__ */ jsxs128(Fragment43, { children: [
|
|
20207
20405
|
/* @__PURE__ */ jsxs128(CardHeader, { "data-testid": "page-2fa-challenge", children: [
|
|
20208
20406
|
/* @__PURE__ */ jsx222(CardTitle, { className: "text-primary", children: t("auth.two_factor.verification_required") }),
|
|
20209
20407
|
/* @__PURE__ */ jsx222(CardDescription, { children: t("auth.two_factor.enter_verification_code") })
|
|
@@ -20503,12 +20701,12 @@ import { useMemo as useMemo37 } from "react";
|
|
|
20503
20701
|
import { TrashIcon } from "lucide-react";
|
|
20504
20702
|
import { useTranslations as useTranslations83 } from "next-intl";
|
|
20505
20703
|
import { useState as useState82 } from "react";
|
|
20506
|
-
import { Fragment as
|
|
20704
|
+
import { Fragment as Fragment44, jsx as jsx225, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
20507
20705
|
function AiConnectionDeleter({ connection }) {
|
|
20508
20706
|
const t = useTranslations83();
|
|
20509
20707
|
const { refresh } = useAiConnections();
|
|
20510
20708
|
const [open, setOpen] = useState82(false);
|
|
20511
|
-
return /* @__PURE__ */ jsxs130(
|
|
20709
|
+
return /* @__PURE__ */ jsxs130(Fragment44, { children: [
|
|
20512
20710
|
/* @__PURE__ */ jsx225(
|
|
20513
20711
|
Button,
|
|
20514
20712
|
{
|
|
@@ -20788,7 +20986,7 @@ function AiConnectionEditor({
|
|
|
20788
20986
|
__name(AiConnectionEditor, "AiConnectionEditor");
|
|
20789
20987
|
|
|
20790
20988
|
// src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx
|
|
20791
|
-
import { Fragment as
|
|
20989
|
+
import { Fragment as Fragment45, jsx as jsx227, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
20792
20990
|
function toInput(connection, overrides) {
|
|
20793
20991
|
return {
|
|
20794
20992
|
id: connection.id,
|
|
@@ -20911,7 +21109,7 @@ function AiConnectionTypeCard({ connectionType }) {
|
|
|
20911
21109
|
children: /* @__PURE__ */ jsx227(ChevronDownIcon10, {})
|
|
20912
21110
|
}
|
|
20913
21111
|
),
|
|
20914
|
-
!readOnly && /* @__PURE__ */ jsxs132(
|
|
21112
|
+
!readOnly && /* @__PURE__ */ jsxs132(Fragment45, { children: [
|
|
20915
21113
|
/* @__PURE__ */ jsx227(
|
|
20916
21114
|
AiConnectionEditor,
|
|
20917
21115
|
{
|
|
@@ -21217,7 +21415,7 @@ function HowToCommandViewer({ howTo, onBack, onStartChat }) {
|
|
|
21217
21415
|
__name(HowToCommandViewer, "HowToCommandViewer");
|
|
21218
21416
|
|
|
21219
21417
|
// src/features/how-to/components/containers/HowToCommand.tsx
|
|
21220
|
-
import { Fragment as
|
|
21418
|
+
import { Fragment as Fragment46, jsx as jsx233, jsxs as jsxs136 } from "react/jsx-runtime";
|
|
21221
21419
|
function matchPage(pathname, pattern) {
|
|
21222
21420
|
if (pattern.includes(":")) {
|
|
21223
21421
|
const pathSegments = pathname.split("/").filter(Boolean);
|
|
@@ -21288,7 +21486,7 @@ function HowToCommand({ pathname, contextKeys, extraGroups, onStartChat }) {
|
|
|
21288
21486
|
setSelectedHowTo(null);
|
|
21289
21487
|
if (onStartChat) onStartChat();
|
|
21290
21488
|
}, "handleStartChat");
|
|
21291
|
-
return /* @__PURE__ */ jsxs136(
|
|
21489
|
+
return /* @__PURE__ */ jsxs136(Fragment46, { children: [
|
|
21292
21490
|
/* @__PURE__ */ jsxs136(
|
|
21293
21491
|
SidebarMenuButton,
|
|
21294
21492
|
{
|
|
@@ -21438,7 +21636,7 @@ import { useTranslations as useTranslations95 } from "next-intl";
|
|
|
21438
21636
|
// src/features/how-to/hooks/useHowToTableStructure.tsx
|
|
21439
21637
|
import { useTranslations as useTranslations93 } from "next-intl";
|
|
21440
21638
|
import { useMemo as useMemo41 } from "react";
|
|
21441
|
-
import { Fragment as
|
|
21639
|
+
import { Fragment as Fragment47, jsx as jsx237 } from "react/jsx-runtime";
|
|
21442
21640
|
var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
|
|
21443
21641
|
const t = useTranslations93();
|
|
21444
21642
|
const generateUrl = usePageUrlGenerator();
|
|
@@ -21475,7 +21673,7 @@ var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
21475
21673
|
id: "description",
|
|
21476
21674
|
accessorKey: "description",
|
|
21477
21675
|
header: t(`howto.fields.description.label`),
|
|
21478
|
-
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx237(
|
|
21676
|
+
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx237(Fragment47, { children: row.getValue("description") }), "cell"),
|
|
21479
21677
|
enableSorting: false,
|
|
21480
21678
|
enableHiding: false
|
|
21481
21679
|
}),
|
|
@@ -21483,7 +21681,7 @@ var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
|
|
|
21483
21681
|
id: "pages",
|
|
21484
21682
|
accessorKey: "pages",
|
|
21485
21683
|
header: t(`howto.fields.pages.label`),
|
|
21486
|
-
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx237(
|
|
21684
|
+
cell: /* @__PURE__ */ __name(({ row }) => /* @__PURE__ */ jsx237(Fragment47, { children: row.getValue("pages") }), "cell"),
|
|
21487
21685
|
enableSorting: false,
|
|
21488
21686
|
enableHiding: false
|
|
21489
21687
|
}),
|
|
@@ -21569,7 +21767,7 @@ __name(HowToListContainer, "HowToListContainer");
|
|
|
21569
21767
|
import { CircleX as CircleX3, RefreshCwIcon as RefreshCwIcon4, SearchIcon as SearchIcon7, XIcon as XIcon11 } from "lucide-react";
|
|
21570
21768
|
import { useTranslations as useTranslations96 } from "next-intl";
|
|
21571
21769
|
import { useCallback as useCallback41, useEffect as useEffect67, useRef as useRef36, useState as useState86 } from "react";
|
|
21572
|
-
import { Fragment as
|
|
21770
|
+
import { Fragment as Fragment48, jsx as jsx241, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
21573
21771
|
function HowToSelector({
|
|
21574
21772
|
id,
|
|
21575
21773
|
form,
|
|
@@ -21654,7 +21852,7 @@ function HowToSelector({
|
|
|
21654
21852
|
search("");
|
|
21655
21853
|
}
|
|
21656
21854
|
}
|
|
21657
|
-
) : /* @__PURE__ */ jsx241(
|
|
21855
|
+
) : /* @__PURE__ */ jsx241(Fragment48, {})
|
|
21658
21856
|
] }),
|
|
21659
21857
|
/* @__PURE__ */ jsx241(CommandList, { children: data.data && data.data.length > 0 && data.data.map((howTo) => /* @__PURE__ */ jsx241(
|
|
21660
21858
|
CommandItem,
|
|
@@ -21788,7 +21986,7 @@ function AssistantComposer({
|
|
|
21788
21986
|
textarea,
|
|
21789
21987
|
sendButton
|
|
21790
21988
|
] }),
|
|
21791
|
-
/* @__PURE__ */ jsx243("div", { className: "text-muted-foreground text-end text-xs", children: t("features.assistant.keyboard_hint") })
|
|
21989
|
+
/* @__PURE__ */ jsx243("div", { className: "text-muted-foreground text-end text-xs max-md:hidden", children: t("features.assistant.keyboard_hint") })
|
|
21792
21990
|
] });
|
|
21793
21991
|
}
|
|
21794
21992
|
__name(AssistantComposer, "AssistantComposer");
|
|
@@ -21866,7 +22064,7 @@ function ReferencesTab({ references }) {
|
|
|
21866
22064
|
__name(ReferencesTab, "ReferencesTab");
|
|
21867
22065
|
|
|
21868
22066
|
// src/features/assistant-message/components/parts/tabs/CitationsTab.tsx
|
|
21869
|
-
import { Fragment as
|
|
22067
|
+
import { Fragment as Fragment49, useState as useState88 } from "react";
|
|
21870
22068
|
import { useTranslations as useTranslations101 } from "next-intl";
|
|
21871
22069
|
import { ChevronDown as ChevronDown3, HelpCircle } from "lucide-react";
|
|
21872
22070
|
import ReactMarkdown2 from "react-markdown";
|
|
@@ -21906,6 +22104,7 @@ import { jsx as jsx246, jsxs as jsxs142 } from "react/jsx-runtime";
|
|
|
21906
22104
|
function CitationsTab({ citations, sources }) {
|
|
21907
22105
|
const t = useTranslations101();
|
|
21908
22106
|
const entityLabel = useEntityLabel();
|
|
22107
|
+
const isMobile = useIsMobile();
|
|
21909
22108
|
const [expanded, setExpanded] = useState88(/* @__PURE__ */ new Set());
|
|
21910
22109
|
if (citations.length === 0) return null;
|
|
21911
22110
|
const sorted = [...citations].sort((a, b) => (b.relevance ?? 0) - (a.relevance ?? 0));
|
|
@@ -21920,7 +22119,7 @@ function CitationsTab({ citations, sources }) {
|
|
|
21920
22119
|
return /* @__PURE__ */ jsxs142(Table, { className: "table-fixed", children: [
|
|
21921
22120
|
/* @__PURE__ */ jsx246(TableHeader, { children: /* @__PURE__ */ jsxs142(TableRow, { children: [
|
|
21922
22121
|
/* @__PURE__ */ jsx246(TableHead, { children: t("features.assistant.message.sources.source") }),
|
|
21923
|
-
/* @__PURE__ */ jsx246(TableHead, { className: "w-28 text-center", children: t("features.assistant.message.sources.relevance") })
|
|
22122
|
+
/* @__PURE__ */ jsx246(TableHead, { className: "w-28 text-center max-md:w-20", children: t("features.assistant.message.sources.relevance") })
|
|
21924
22123
|
] }) }),
|
|
21925
22124
|
/* @__PURE__ */ jsx246(TableBody, { children: sorted.map((chunk) => {
|
|
21926
22125
|
const isOpen = expanded.has(chunk.id);
|
|
@@ -21928,7 +22127,7 @@ function CitationsTab({ citations, sources }) {
|
|
|
21928
22127
|
const typeLabel = chunk.nodeType ? entityLabel(chunk.nodeType) : t("features.assistant.message.sources.source");
|
|
21929
22128
|
const fallbackName = chunk.nodeId ? `${typeLabel} ${chunk.nodeId.slice(0, 8)}` : typeLabel;
|
|
21930
22129
|
const sourceName = resolved?.name ?? fallbackName;
|
|
21931
|
-
return /* @__PURE__ */ jsxs142(
|
|
22130
|
+
return /* @__PURE__ */ jsxs142(Fragment49, { children: [
|
|
21932
22131
|
/* @__PURE__ */ jsxs142(TableRow, { children: [
|
|
21933
22132
|
/* @__PURE__ */ jsx246(TableCell, { children: /* @__PURE__ */ jsxs142(
|
|
21934
22133
|
"div",
|
|
@@ -21945,16 +22144,33 @@ function CitationsTab({ citations, sources }) {
|
|
|
21945
22144
|
"aria-expanded": isOpen,
|
|
21946
22145
|
className: "flex w-full cursor-pointer items-center justify-start gap-x-2",
|
|
21947
22146
|
children: [
|
|
21948
|
-
/* @__PURE__ */ jsx246(
|
|
21949
|
-
|
|
21950
|
-
|
|
22147
|
+
/* @__PURE__ */ jsx246(
|
|
22148
|
+
ChevronDown3,
|
|
22149
|
+
{
|
|
22150
|
+
className: cn("h-4 w-4 transition-transform max-md:shrink-0", !isOpen && "-rotate-90")
|
|
22151
|
+
}
|
|
22152
|
+
),
|
|
22153
|
+
/* @__PURE__ */ jsx246("span", { className: "font-semibold max-md:min-w-0 max-md:truncate", children: sourceName }),
|
|
22154
|
+
chunk.reason && isMobile && /* @__PURE__ */ jsxs142(Popover, { children: [
|
|
22155
|
+
/* @__PURE__ */ jsx246(
|
|
22156
|
+
PopoverTrigger,
|
|
22157
|
+
{
|
|
22158
|
+
"aria-label": chunk.reason,
|
|
22159
|
+
onClick: (e) => e.stopPropagation(),
|
|
22160
|
+
className: "text-muted-foreground -m-2 inline-flex shrink-0 p-2",
|
|
22161
|
+
children: /* @__PURE__ */ jsx246(HelpCircle, { className: "h-3.5 w-3.5" })
|
|
22162
|
+
}
|
|
22163
|
+
),
|
|
22164
|
+
/* @__PURE__ */ jsx246(PopoverContent, { className: "max-w-64 text-xs", children: chunk.reason })
|
|
22165
|
+
] }),
|
|
22166
|
+
chunk.reason && !isMobile && /* @__PURE__ */ jsxs142(Tooltip2, { children: [
|
|
21951
22167
|
/* @__PURE__ */ jsx246(TooltipTrigger, { className: "text-muted-foreground inline-flex", children: /* @__PURE__ */ jsx246(HelpCircle, { className: "h-3.5 w-3.5" }) }),
|
|
21952
22168
|
/* @__PURE__ */ jsx246(TooltipContent, { className: "max-w-64 text-xs", children: chunk.reason })
|
|
21953
22169
|
] })
|
|
21954
22170
|
]
|
|
21955
22171
|
}
|
|
21956
22172
|
) }),
|
|
21957
|
-
/* @__PURE__ */ jsx246(TableCell, { className: "text-center", children: /* @__PURE__ */ jsx246(RelevanceMeter, { value: chunk.relevance ?? 0 }) })
|
|
22173
|
+
/* @__PURE__ */ jsx246(TableCell, { className: "text-center", children: /* @__PURE__ */ jsx246(RelevanceMeter, { value: chunk.relevance ?? 0, className: "max-md:w-16" }) })
|
|
21958
22174
|
] }),
|
|
21959
22175
|
isOpen && /* @__PURE__ */ jsx246(TableRow, { children: /* @__PURE__ */ jsx246(TableCell, { colSpan: 2, className: "w-full max-w-0 border-t-0 p-4", children: /* @__PURE__ */ jsx246("div", { className: "bg-card w-full min-w-0 rounded border p-4 text-sm break-words whitespace-pre-wrap [overflow-wrap:anywhere] [&_pre]:overflow-x-auto [&_table]:block [&_table]:overflow-x-auto", children: /* @__PURE__ */ jsx246(ReactMarkdown2, { remarkPlugins: [remarkGfm2], children: chunk.content }) }) }) })
|
|
21960
22176
|
] }, chunk.id);
|
|
@@ -22307,7 +22523,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
|
|
|
22307
22523
|
__name(MessageSourcesContainer, "MessageSourcesContainer");
|
|
22308
22524
|
|
|
22309
22525
|
// src/features/assistant-message/components/MessageItem.tsx
|
|
22310
|
-
import { Fragment as
|
|
22526
|
+
import { Fragment as Fragment50, jsx as jsx252, jsxs as jsxs146 } from "react/jsx-runtime";
|
|
22311
22527
|
var MENTION_HREF = /^mention:\/\/([^/]+)\/(.+)$/;
|
|
22312
22528
|
function mentionUrlTransform(url) {
|
|
22313
22529
|
return MENTION_HREF.test(url) ? url : defaultUrlTransform(url);
|
|
@@ -22330,14 +22546,14 @@ function MessageItem({
|
|
|
22330
22546
|
a: /* @__PURE__ */ __name(({ href, children }) => {
|
|
22331
22547
|
const match = href ? MENTION_HREF.exec(href) : null;
|
|
22332
22548
|
if (!match || !renderMention) return /* @__PURE__ */ jsx252("a", { href, children });
|
|
22333
|
-
return /* @__PURE__ */ jsx252(
|
|
22549
|
+
return /* @__PURE__ */ jsx252(Fragment50, { children: renderMention({ type: match[1], id: match[2], alias: String(children ?? "") }) });
|
|
22334
22550
|
}, "a")
|
|
22335
22551
|
}),
|
|
22336
22552
|
[renderMention]
|
|
22337
22553
|
);
|
|
22338
22554
|
if (isUser) {
|
|
22339
22555
|
return /* @__PURE__ */ jsxs146("div", { className: "flex flex-col items-end gap-1", children: [
|
|
22340
|
-
/* @__PURE__ */ jsx252("div", { className: "bg-primary text-primary-foreground max-w-[72%] rounded-2xl rounded-ee-sm px-3.5 py-2 text-sm [&_a]:text-primary-foreground [&_a]:font-semibold [&_p]:m-0", children: /* @__PURE__ */ jsx252(ReactMarkdown3, { remarkPlugins: [remarkGfm3], urlTransform: mentionUrlTransform, components: markdownComponents, children: message.content }) }),
|
|
22556
|
+
/* @__PURE__ */ jsx252("div", { className: "bg-primary text-primary-foreground max-w-[72%] max-md:max-w-[92%] rounded-2xl rounded-ee-sm px-3.5 py-2 text-sm [&_a]:text-primary-foreground [&_a]:font-semibold [&_p]:m-0", children: /* @__PURE__ */ jsx252(ReactMarkdown3, { remarkPlugins: [remarkGfm3], urlTransform: mentionUrlTransform, components: markdownComponents, children: message.content }) }),
|
|
22341
22557
|
isFailed && /* @__PURE__ */ jsxs146("div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
|
|
22342
22558
|
/* @__PURE__ */ jsx252(AlertCircle, { className: "h-3.5 w-3.5" }),
|
|
22343
22559
|
/* @__PURE__ */ jsx252("span", { children: t("features.assistant.send_failed") }),
|
|
@@ -22346,7 +22562,7 @@ function MessageItem({
|
|
|
22346
22562
|
] });
|
|
22347
22563
|
}
|
|
22348
22564
|
const isApprovalRequest = message.messageType === "approval-request" && !!renderApprovalAction;
|
|
22349
|
-
return /* @__PURE__ */ jsxs146("div", { className: "flex min-w-0 max-w-[78%] flex-col gap-1.5", children: [
|
|
22565
|
+
return /* @__PURE__ */ jsxs146("div", { className: "flex min-w-0 max-w-[78%] max-md:max-w-[92%] flex-col gap-1.5", children: [
|
|
22350
22566
|
/* @__PURE__ */ jsxs146("div", { className: "text-muted-foreground flex items-center gap-2 ps-1 text-xs", children: [
|
|
22351
22567
|
/* @__PURE__ */ jsx252("span", { className: "flex h-4 w-4 items-center justify-center rounded-full bg-gradient-to-br from-blue-400 to-violet-500 text-white", children: /* @__PURE__ */ jsx252(Sparkles, { className: "h-2.5 w-2.5" }) }),
|
|
22352
22568
|
/* @__PURE__ */ jsx252("span", { children: t("features.assistant.agent_name") })
|
|
@@ -22769,7 +22985,7 @@ function splitByNesting(pages) {
|
|
|
22769
22985
|
__name(splitByNesting, "splitByNesting");
|
|
22770
22986
|
|
|
22771
22987
|
// src/features/handbook/components/lists/HandbookContents.tsx
|
|
22772
|
-
import { Fragment as
|
|
22988
|
+
import { Fragment as Fragment51, jsx as jsx260, jsxs as jsxs152 } from "react/jsx-runtime";
|
|
22773
22989
|
function HandbookContents() {
|
|
22774
22990
|
const t = useTranslations111();
|
|
22775
22991
|
const [pages, setPages] = useState94([]);
|
|
@@ -22808,7 +23024,7 @@ function HandbookContents() {
|
|
|
22808
23024
|
return /* @__PURE__ */ jsx260(
|
|
22809
23025
|
HandbookProvider,
|
|
22810
23026
|
{
|
|
22811
|
-
functions: /* @__PURE__ */ jsxs152(
|
|
23027
|
+
functions: /* @__PURE__ */ jsxs152(Fragment51, { children: [
|
|
22812
23028
|
/* @__PURE__ */ jsx260(HandbookAskSheet, {}),
|
|
22813
23029
|
/* @__PURE__ */ jsx260(HandbookSyncButton, { refresh }),
|
|
22814
23030
|
/* @__PURE__ */ jsx260(HandbookIndexStatus, { pages })
|
|
@@ -23199,7 +23415,7 @@ function groupThreadsByBucket(threads) {
|
|
|
23199
23415
|
__name(groupThreadsByBucket, "groupThreadsByBucket");
|
|
23200
23416
|
|
|
23201
23417
|
// src/features/assistant/components/parts/AssistantSidebar.tsx
|
|
23202
|
-
import { Fragment as
|
|
23418
|
+
import { Fragment as Fragment52, jsx as jsx267, jsxs as jsxs157 } from "react/jsx-runtime";
|
|
23203
23419
|
function AssistantSidebar({
|
|
23204
23420
|
threads,
|
|
23205
23421
|
activeId,
|
|
@@ -23236,7 +23452,7 @@ function AssistantSidebar({
|
|
|
23236
23452
|
" ",
|
|
23237
23453
|
newLabel ?? t("features.assistant.new")
|
|
23238
23454
|
] }) }),
|
|
23239
|
-
/* @__PURE__ */ jsx267("div", { className: "flex-1 overflow-y-auto p-2", children: threads.length === 0 ? /* @__PURE__ */ jsx267("div", { className: "text-muted-foreground mt-6 text-center text-xs", children: emptyLabel ?? t("features.assistant.empty_sidebar") }) : /* @__PURE__ */ jsxs157(
|
|
23455
|
+
/* @__PURE__ */ jsx267("div", { className: "flex-1 overflow-y-auto p-2", children: threads.length === 0 ? /* @__PURE__ */ jsx267("div", { className: "text-muted-foreground mt-6 text-center text-xs", children: emptyLabel ?? t("features.assistant.empty_sidebar") }) : /* @__PURE__ */ jsxs157(Fragment52, { children: [
|
|
23240
23456
|
renderSection(t("features.assistant.bucket_today"), groups.today),
|
|
23241
23457
|
renderSection(t("features.assistant.bucket_week"), groups.thisWeek),
|
|
23242
23458
|
renderSection(t("features.assistant.bucket_earlier"), groups.earlier)
|
|
@@ -23246,7 +23462,7 @@ function AssistantSidebar({
|
|
|
23246
23462
|
__name(AssistantSidebar, "AssistantSidebar");
|
|
23247
23463
|
|
|
23248
23464
|
// src/features/handbook/components/containers/HandbookAskContainer.tsx
|
|
23249
|
-
import { Fragment as
|
|
23465
|
+
import { Fragment as Fragment53, jsx as jsx268, jsxs as jsxs158 } from "react/jsx-runtime";
|
|
23250
23466
|
function HandbookAskContainer({ handbookThreadId } = {}) {
|
|
23251
23467
|
const t = useTranslations117();
|
|
23252
23468
|
const { threads, thread, messages, sending, ask, selectThread, startNew } = useHandbookAsk({ handbookThreadId });
|
|
@@ -23287,7 +23503,7 @@ function HandbookAskContainer({ handbookThreadId } = {}) {
|
|
|
23287
23503
|
detailsIcon: /* @__PURE__ */ jsx268(MessagesSquareIcon2, {}),
|
|
23288
23504
|
details,
|
|
23289
23505
|
children: /* @__PURE__ */ jsxs158("div", { className: "flex h-full min-h-0 w-full flex-col overflow-hidden", children: [
|
|
23290
|
-
showThread ? /* @__PURE__ */ jsx268(
|
|
23506
|
+
showThread ? /* @__PURE__ */ jsx268(Fragment53, { children: /* @__PURE__ */ jsx268(
|
|
23291
23507
|
AssistantThread,
|
|
23292
23508
|
{
|
|
23293
23509
|
messages,
|
|
@@ -23322,16 +23538,16 @@ import { useTranslations as useTranslations120 } from "next-intl";
|
|
|
23322
23538
|
import { useMemo as useMemo52 } from "react";
|
|
23323
23539
|
|
|
23324
23540
|
// src/features/assistant-message/components/EntityMentionLink.tsx
|
|
23325
|
-
import { Fragment as
|
|
23541
|
+
import { Fragment as Fragment54, jsx as jsx269 } from "react/jsx-runtime";
|
|
23326
23542
|
function EntityMentionLinkView({ type, id, alias }) {
|
|
23327
23543
|
const generate = usePageUrlGenerator();
|
|
23328
23544
|
let module;
|
|
23329
23545
|
try {
|
|
23330
23546
|
module = ModuleRegistry.findByName(type);
|
|
23331
23547
|
} catch {
|
|
23332
|
-
return /* @__PURE__ */ jsx269(
|
|
23548
|
+
return /* @__PURE__ */ jsx269(Fragment54, { children: alias });
|
|
23333
23549
|
}
|
|
23334
|
-
if (!module?.pageUrl) return /* @__PURE__ */ jsx269(
|
|
23550
|
+
if (!module?.pageUrl) return /* @__PURE__ */ jsx269(Fragment54, { children: alias });
|
|
23335
23551
|
return /* @__PURE__ */ jsx269(Link, { href: generate({ page: module, id }), children: alias });
|
|
23336
23552
|
}
|
|
23337
23553
|
__name(EntityMentionLinkView, "EntityMentionLinkView");
|
|
@@ -23443,7 +23659,7 @@ function AssistantThreadHeader({ assistant, onRename, onDelete, renamePlaceholde
|
|
|
23443
23659
|
__name(AssistantThreadHeader, "AssistantThreadHeader");
|
|
23444
23660
|
|
|
23445
23661
|
// src/features/assistant/components/containers/AssistantContainer.tsx
|
|
23446
|
-
import { Fragment as
|
|
23662
|
+
import { Fragment as Fragment55, jsx as jsx272, jsxs as jsxs161 } from "react/jsx-runtime";
|
|
23447
23663
|
function AssistantContainer({
|
|
23448
23664
|
renderApprovalAction,
|
|
23449
23665
|
renderMention,
|
|
@@ -23471,7 +23687,7 @@ function AssistantContainer({
|
|
|
23471
23687
|
),
|
|
23472
23688
|
[ctx.threads, ctx.assistant?.id, ctx.selectThread, renderThreadBadge]
|
|
23473
23689
|
);
|
|
23474
|
-
const thread = /* @__PURE__ */ jsx272(
|
|
23690
|
+
const thread = /* @__PURE__ */ jsx272(Fragment55, { children: !showThread ? /* @__PURE__ */ jsx272(
|
|
23475
23691
|
AssistantEmptyState,
|
|
23476
23692
|
{
|
|
23477
23693
|
onSend: ctx.sendMessage,
|
|
@@ -23479,7 +23695,7 @@ function AssistantContainer({
|
|
|
23479
23695
|
onOperatorModeChange: showOperatorToggle ? ctx.setOperatorMode : void 0,
|
|
23480
23696
|
composerLeading: renderScopePicker?.()
|
|
23481
23697
|
}
|
|
23482
|
-
) : /* @__PURE__ */ jsxs161(
|
|
23698
|
+
) : /* @__PURE__ */ jsxs161(Fragment55, { children: [
|
|
23483
23699
|
ctx.assistant ? /* @__PURE__ */ jsx272(
|
|
23484
23700
|
AssistantThreadHeader,
|
|
23485
23701
|
{
|
|
@@ -23629,13 +23845,13 @@ function AssistantBlockNoteComposer({
|
|
|
23629
23845
|
t("features.assistant.send")
|
|
23630
23846
|
] })
|
|
23631
23847
|
] }),
|
|
23632
|
-
/* @__PURE__ */ jsx273("div", { className: "text-muted-foreground text-end text-xs", children: t("features.assistant.keyboard_hint") })
|
|
23848
|
+
/* @__PURE__ */ jsx273("div", { className: "text-muted-foreground text-end text-xs max-md:hidden", children: t("features.assistant.keyboard_hint") })
|
|
23633
23849
|
] });
|
|
23634
23850
|
}
|
|
23635
23851
|
__name(AssistantBlockNoteComposer, "AssistantBlockNoteComposer");
|
|
23636
23852
|
|
|
23637
23853
|
// src/features/assistant/components/containers/AssistantPageContainer.tsx
|
|
23638
|
-
import { Fragment as
|
|
23854
|
+
import { Fragment as Fragment56, jsx as jsx274, jsxs as jsxs163 } from "react/jsx-runtime";
|
|
23639
23855
|
function AssistantPageContainer({
|
|
23640
23856
|
renderApprovalAction,
|
|
23641
23857
|
renderMention,
|
|
@@ -23673,7 +23889,7 @@ function AssistantPageContainer({
|
|
|
23673
23889
|
) })
|
|
23674
23890
|
),
|
|
23675
23891
|
children: /* @__PURE__ */ jsxs163("div", { className: "bg-background flex h-full w-full flex-col overflow-hidden rounded-lg border", children: [
|
|
23676
|
-
showThread ? /* @__PURE__ */ jsxs163(
|
|
23892
|
+
showThread ? /* @__PURE__ */ jsxs163(Fragment56, { children: [
|
|
23677
23893
|
ctx.assistant ? /* @__PURE__ */ jsx274(
|
|
23678
23894
|
AssistantThreadHeader,
|
|
23679
23895
|
{
|
|
@@ -23720,7 +23936,7 @@ __name(AssistantPageContainer, "AssistantPageContainer");
|
|
|
23720
23936
|
// src/features/assistant-action/components/ApprovalActionCard.tsx
|
|
23721
23937
|
import { ShieldAlert as ShieldAlert2 } from "lucide-react";
|
|
23722
23938
|
import { useTranslations as useTranslations123 } from "next-intl";
|
|
23723
|
-
import { Fragment as
|
|
23939
|
+
import { Fragment as Fragment57, useEffect as useEffect75, useMemo as useMemo53, useState as useState100 } from "react";
|
|
23724
23940
|
import { jsx as jsx275, jsxs as jsxs164 } from "react/jsx-runtime";
|
|
23725
23941
|
var STATUS_VARIANT = {
|
|
23726
23942
|
pending: "softBlue",
|
|
@@ -23968,7 +24184,7 @@ function ApprovalActionCard({ actionId, summary, onResolved, hiddenRelationshipK
|
|
|
23968
24184
|
/* @__PURE__ */ jsx275("span", { children: isUpdate ? t("features.assistant.approval.proposal.updateHeading", { entity: entityLabel }) : t("features.assistant.approval.proposal.heading", { entity: entityLabel }) }),
|
|
23969
24185
|
targetLabel !== "" && /* @__PURE__ */ jsx275("span", { className: "text-foreground tracking-normal normal-case", children: targetLabel })
|
|
23970
24186
|
] }),
|
|
23971
|
-
/* @__PURE__ */ jsx275("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__ */ jsxs164(
|
|
24187
|
+
/* @__PURE__ */ jsx275("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__ */ jsxs164(Fragment57, { children: [
|
|
23972
24188
|
/* @__PURE__ */ jsx275("dt", { className: "text-muted-foreground text-xs leading-relaxed break-words sm:text-sm", children: row.label }),
|
|
23973
24189
|
/* @__PURE__ */ jsx275("dd", { className: "text-foreground text-sm leading-relaxed break-words whitespace-pre-wrap", children: row.value })
|
|
23974
24190
|
] }, row.key)) })
|
|
@@ -24281,7 +24497,7 @@ __name(NotificationsListContainer, "NotificationsListContainer");
|
|
|
24281
24497
|
// src/features/notification/components/modals/NotificationModal.tsx
|
|
24282
24498
|
import { BellIcon as BellIcon2, ExternalLinkIcon } from "lucide-react";
|
|
24283
24499
|
import { useTranslations as useTranslations127 } from "next-intl";
|
|
24284
|
-
import { Fragment as
|
|
24500
|
+
import { Fragment as Fragment58, useCallback as useCallback48, useEffect as useEffect77, useMemo as useMemo55, useRef as useRef40, useState as useState102 } from "react";
|
|
24285
24501
|
import { jsx as jsx282, jsxs as jsxs168 } from "react/jsx-runtime";
|
|
24286
24502
|
function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
24287
24503
|
const _instanceId = useRef40(Math.random().toString(36).substr(2, 9));
|
|
@@ -24470,7 +24686,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
24470
24686
|
] }),
|
|
24471
24687
|
isLoading && /* @__PURE__ */ jsx282("div", { className: "text-muted-foreground px-3 py-2 text-xs", children: t(`common.loading`) }),
|
|
24472
24688
|
error && /* @__PURE__ */ jsx282("div", { className: "text-destructive px-3 py-2 text-xs", children: error }),
|
|
24473
|
-
/* @__PURE__ */ jsx282(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__ */ jsx282("div", { className: "divide-border divide-y", children: notifications.map((notification) => /* @__PURE__ */ jsx282(
|
|
24689
|
+
/* @__PURE__ */ jsx282(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__ */ jsx282("div", { className: "divide-border divide-y", children: notifications.map((notification) => /* @__PURE__ */ jsx282(Fragment58, { children: generateNotification(notification, () => setIsOpen(false)) }, notification.id)) }) : /* @__PURE__ */ jsx282("div", { className: "text-muted-foreground p-6 text-center text-sm", children: t(`notification.empty`) }) })
|
|
24474
24690
|
] })
|
|
24475
24691
|
] });
|
|
24476
24692
|
}
|
|
@@ -24481,10 +24697,10 @@ function NotificationModal(props) {
|
|
|
24481
24697
|
__name(NotificationModal, "NotificationModal");
|
|
24482
24698
|
|
|
24483
24699
|
// src/features/notification/components/notifications/PushNotificationProvider.tsx
|
|
24484
|
-
import { Fragment as
|
|
24700
|
+
import { Fragment as Fragment59, jsx as jsx283 } from "react/jsx-runtime";
|
|
24485
24701
|
function PushNotificationProvider({ children }) {
|
|
24486
24702
|
usePushNotifications();
|
|
24487
|
-
return /* @__PURE__ */ jsx283(
|
|
24703
|
+
return /* @__PURE__ */ jsx283(Fragment59, { children });
|
|
24488
24704
|
}
|
|
24489
24705
|
__name(PushNotificationProvider, "PushNotificationProvider");
|
|
24490
24706
|
|
|
@@ -24804,11 +25020,11 @@ function RoleDetails() {
|
|
|
24804
25020
|
__name(RoleDetails, "RoleDetails");
|
|
24805
25021
|
|
|
24806
25022
|
// src/features/role/components/containers/RoleContainer.tsx
|
|
24807
|
-
import { Fragment as
|
|
25023
|
+
import { Fragment as Fragment60, jsx as jsx287, jsxs as jsxs171 } from "react/jsx-runtime";
|
|
24808
25024
|
function RoleContainer() {
|
|
24809
25025
|
const { role } = useRoleContext();
|
|
24810
25026
|
if (!role) return null;
|
|
24811
|
-
return /* @__PURE__ */ jsxs171(
|
|
25027
|
+
return /* @__PURE__ */ jsxs171(Fragment60, { children: [
|
|
24812
25028
|
/* @__PURE__ */ jsx287(RoleDetails, {}),
|
|
24813
25029
|
/* @__PURE__ */ jsx287(RoleUsersList, { role })
|
|
24814
25030
|
] });
|
|
@@ -24853,7 +25069,7 @@ __name(FormRoles, "FormRoles");
|
|
|
24853
25069
|
// src/features/role/components/forms/RemoveUserFromRole.tsx
|
|
24854
25070
|
import { useTranslations as useTranslations130 } from "next-intl";
|
|
24855
25071
|
import { useEffect as useEffect80, useState as useState106 } from "react";
|
|
24856
|
-
import { Fragment as
|
|
25072
|
+
import { Fragment as Fragment61, jsx as jsx289, jsxs as jsxs173 } from "react/jsx-runtime";
|
|
24857
25073
|
function RemoveUserFromRole({ role, user, refresh }) {
|
|
24858
25074
|
const [open, setOpen] = useState106(false);
|
|
24859
25075
|
const [canRemove, setCanRemove] = useState106(false);
|
|
@@ -24902,7 +25118,7 @@ function RemoveUserFromRole({ role, user, refresh }) {
|
|
|
24902
25118
|
/* @__PURE__ */ jsx289(DialogTitle, { children: t(`role.remove_user.title`) }),
|
|
24903
25119
|
/* @__PURE__ */ jsx289(DialogDescription, { children: canRemove ? t(`role.remove_user.subtitle_allowed`) : t(`role.remove_user.subtitle_not_allowed`) })
|
|
24904
25120
|
] }),
|
|
24905
|
-
canRemove ? /* @__PURE__ */ jsxs173(
|
|
25121
|
+
canRemove ? /* @__PURE__ */ jsxs173(Fragment61, { children: [
|
|
24906
25122
|
t(`role.remove_user.description_allowed`, { role: roleName, user: user.name }),
|
|
24907
25123
|
/* @__PURE__ */ jsxs173("div", { className: "flex justify-end", children: [
|
|
24908
25124
|
/* @__PURE__ */ jsx289(Button, { className: "me-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
|
|
@@ -24919,7 +25135,7 @@ function RemoveUserFromRole({ role, user, refresh }) {
|
|
|
24919
25135
|
}
|
|
24920
25136
|
)
|
|
24921
25137
|
] })
|
|
24922
|
-
] }) : /* @__PURE__ */ jsx289(
|
|
25138
|
+
] }) : /* @__PURE__ */ jsx289(Fragment61, { children: t(`role.remove_user.description_not_allowed`, { role: roleName, user: user.name }) })
|
|
24923
25139
|
] })
|
|
24924
25140
|
] });
|
|
24925
25141
|
}
|
|
@@ -24929,7 +25145,7 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
|
|
|
24929
25145
|
import { PlusCircle as PlusCircle2 } from "lucide-react";
|
|
24930
25146
|
import { useTranslations as useTranslations131 } from "next-intl";
|
|
24931
25147
|
import { useCallback as useCallback50, useEffect as useEffect81, useRef as useRef42, useState as useState107 } from "react";
|
|
24932
|
-
import { Fragment as
|
|
25148
|
+
import { Fragment as Fragment62, jsx as jsx290, jsxs as jsxs174 } from "react/jsx-runtime";
|
|
24933
25149
|
function UserRoleAdd({ user, refresh }) {
|
|
24934
25150
|
const [open, setOpen] = useState107(false);
|
|
24935
25151
|
const inputRef = useRef42(null);
|
|
@@ -24976,7 +25192,7 @@ function UserRoleAdd({ user, refresh }) {
|
|
|
24976
25192
|
useEffect81(() => {
|
|
24977
25193
|
if (open) searchRoles("");
|
|
24978
25194
|
}, [open]);
|
|
24979
|
-
return /* @__PURE__ */ jsxs174(
|
|
25195
|
+
return /* @__PURE__ */ jsxs174(Fragment62, { children: [
|
|
24980
25196
|
/* @__PURE__ */ jsxs174(Button, { size: "sm", onClick: () => setOpen(true), children: [
|
|
24981
25197
|
/* @__PURE__ */ jsx290(PlusCircle2, { className: "me-3 h-3.5 w-3.5" }),
|
|
24982
25198
|
t(`common.association.label`, {
|
|
@@ -25582,7 +25798,7 @@ __name(OAuthClientForm, "OAuthClientForm");
|
|
|
25582
25798
|
import { useState as useState110, useCallback as useCallback55 } from "react";
|
|
25583
25799
|
import { format as format2 } from "date-fns";
|
|
25584
25800
|
import { Copy as Copy4, Check as Check2, RefreshCw as RefreshCw3, Pencil as Pencil2, Trash2 as Trash25, ExternalLink } from "lucide-react";
|
|
25585
|
-
import { Fragment as
|
|
25801
|
+
import { Fragment as Fragment63, jsx as jsx299, jsxs as jsxs181 } from "react/jsx-runtime";
|
|
25586
25802
|
function OAuthClientDetail({
|
|
25587
25803
|
client,
|
|
25588
25804
|
isLoading = false,
|
|
@@ -25625,7 +25841,7 @@ function OAuthClientDetail({
|
|
|
25625
25841
|
}
|
|
25626
25842
|
}, [onRegenerateSecret]);
|
|
25627
25843
|
const createdDate = client.createdAt ? format2(new Date(client.createdAt), "MMMM d, yyyy") : "Unknown";
|
|
25628
|
-
return /* @__PURE__ */ jsxs181(
|
|
25844
|
+
return /* @__PURE__ */ jsxs181(Fragment63, { children: [
|
|
25629
25845
|
/* @__PURE__ */ jsxs181(Card, { children: [
|
|
25630
25846
|
/* @__PURE__ */ jsx299(CardHeader, { children: /* @__PURE__ */ jsxs181("div", { className: "flex items-start justify-between", children: [
|
|
25631
25847
|
/* @__PURE__ */ jsxs181("div", { children: [
|
|
@@ -25840,7 +26056,7 @@ function OAuthCompanySelector({ companies, value, onChange }) {
|
|
|
25840
26056
|
__name(OAuthCompanySelector, "OAuthCompanySelector");
|
|
25841
26057
|
|
|
25842
26058
|
// src/features/oauth/components/consent/OAuthConsentScreen.tsx
|
|
25843
|
-
import { Fragment as
|
|
26059
|
+
import { Fragment as Fragment64, jsx as jsx304, jsxs as jsxs186 } from "react/jsx-runtime";
|
|
25844
26060
|
function OAuthConsentScreen({
|
|
25845
26061
|
params,
|
|
25846
26062
|
logoUrl,
|
|
@@ -25874,7 +26090,7 @@ function OAuthConsentScreen({
|
|
|
25874
26090
|
/* @__PURE__ */ jsx304(Separator, {}),
|
|
25875
26091
|
/* @__PURE__ */ jsx304(OAuthScopeList, { scopes }),
|
|
25876
26092
|
/* @__PURE__ */ jsx304(Separator, {}),
|
|
25877
|
-
companies.length > 1 && /* @__PURE__ */ jsxs186(
|
|
26093
|
+
companies.length > 1 && /* @__PURE__ */ jsxs186(Fragment64, { children: [
|
|
25878
26094
|
/* @__PURE__ */ jsx304(OAuthCompanySelector, { companies, value: companyId, onChange: setCompanyId }),
|
|
25879
26095
|
/* @__PURE__ */ jsx304(Separator, {})
|
|
25880
26096
|
] }),
|
|
@@ -26003,7 +26219,7 @@ function WaitlistQuestionnaireRenderer({
|
|
|
26003
26219
|
__name(WaitlistQuestionnaireRenderer, "WaitlistQuestionnaireRenderer");
|
|
26004
26220
|
|
|
26005
26221
|
// src/features/waitlist/components/forms/WaitlistForm.tsx
|
|
26006
|
-
import { Fragment as
|
|
26222
|
+
import { Fragment as Fragment65, jsx as jsx306, jsxs as jsxs188 } from "react/jsx-runtime";
|
|
26007
26223
|
function WaitlistForm({ onSuccess }) {
|
|
26008
26224
|
const t = useTranslations139();
|
|
26009
26225
|
const [isSubmitting, setIsSubmitting] = useState111(false);
|
|
@@ -26122,7 +26338,7 @@ function WaitlistForm({ onSuccess }) {
|
|
|
26122
26338
|
{
|
|
26123
26339
|
form,
|
|
26124
26340
|
id: "gdprConsent",
|
|
26125
|
-
label: /* @__PURE__ */ jsxs188(
|
|
26341
|
+
label: /* @__PURE__ */ jsxs188(Fragment65, { children: [
|
|
26126
26342
|
t("auth.gdpr.terms_prefix"),
|
|
26127
26343
|
/* @__PURE__ */ jsx306(Link, { href: "/terms", target: "_blank", rel: "noopener", children: t("auth.gdpr.terms_of_service") }),
|
|
26128
26344
|
t("auth.gdpr.and"),
|
|
@@ -26386,7 +26602,7 @@ import { Popover as PopoverPrimitive2 } from "@base-ui/react/popover";
|
|
|
26386
26602
|
import { CheckIcon as CheckIcon10, MinusIcon as MinusIcon3, XIcon as XIcon13 } from "lucide-react";
|
|
26387
26603
|
import { useTranslations as useTranslations143 } from "next-intl";
|
|
26388
26604
|
import { useCallback as useCallback56, useEffect as useEffect83, useState as useState114 } from "react";
|
|
26389
|
-
import { Fragment as
|
|
26605
|
+
import { Fragment as Fragment66, jsx as jsx312, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
26390
26606
|
function RbacPermissionPicker({
|
|
26391
26607
|
open,
|
|
26392
26608
|
anchor,
|
|
@@ -26472,7 +26688,7 @@ function RbacPermissionPicker({
|
|
|
26472
26688
|
)
|
|
26473
26689
|
] })
|
|
26474
26690
|
] }),
|
|
26475
|
-
isRoleColumn && onClear && /* @__PURE__ */ jsxs194(
|
|
26691
|
+
isRoleColumn && onClear && /* @__PURE__ */ jsxs194(Fragment66, { children: [
|
|
26476
26692
|
/* @__PURE__ */ jsx312(Separator, {}),
|
|
26477
26693
|
/* @__PURE__ */ jsxs194(
|
|
26478
26694
|
Button,
|
|
@@ -26759,7 +26975,7 @@ __name(RbacContainer, "RbacContainer");
|
|
|
26759
26975
|
// src/features/rbac/components/RbacByRoleContainer.tsx
|
|
26760
26976
|
import { Loader2Icon as Loader2Icon5 } from "lucide-react";
|
|
26761
26977
|
import { useTranslations as useTranslations145 } from "next-intl";
|
|
26762
|
-
import { Fragment as
|
|
26978
|
+
import { Fragment as Fragment67, memo as memo3, useCallback as useCallback58, useEffect as useEffect85, useMemo as useMemo59, useRef as useRef44, useState as useState116 } from "react";
|
|
26763
26979
|
import { jsx as jsx314, jsxs as jsxs196 } from "react/jsx-runtime";
|
|
26764
26980
|
function findToken2(tokens, action) {
|
|
26765
26981
|
if (!tokens) return void 0;
|
|
@@ -26885,7 +27101,7 @@ function RbacByRoleContainer() {
|
|
|
26885
27101
|
const defaultTokens = block.default ?? [];
|
|
26886
27102
|
const roleTokens = block[selectedRoleId];
|
|
26887
27103
|
const moduleLabel = moduleNames?.[moduleId] ?? moduleId;
|
|
26888
|
-
return /* @__PURE__ */ jsxs196(
|
|
27104
|
+
return /* @__PURE__ */ jsxs196(Fragment67, { children: [
|
|
26889
27105
|
/* @__PURE__ */ jsx314("tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ jsx314(
|
|
26890
27106
|
"td",
|
|
26891
27107
|
{
|
|
@@ -27319,6 +27535,7 @@ export {
|
|
|
27319
27535
|
DatePickerPopover,
|
|
27320
27536
|
nextDateRange,
|
|
27321
27537
|
DateRangeSelector,
|
|
27538
|
+
hasOpenInnerLayer,
|
|
27322
27539
|
useEditorDialog,
|
|
27323
27540
|
EditorSheet,
|
|
27324
27541
|
FormFieldWrapper,
|
|
@@ -27534,4 +27751,4 @@ export {
|
|
|
27534
27751
|
useOAuthClients,
|
|
27535
27752
|
useOAuthClient
|
|
27536
27753
|
};
|
|
27537
|
-
//# sourceMappingURL=chunk-
|
|
27754
|
+
//# sourceMappingURL=chunk-7SJ4HKDR.mjs.map
|