@carlonicora/nextjs-jsonapi 1.0.6 → 1.1.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.
Files changed (112) hide show
  1. package/dist/{AbstractService-B2n_JdiC.d.mts → AbstractService-BsY6W3Ej.d.mts} +1 -1
  2. package/dist/{AbstractService-DtQTYovo.d.ts → AbstractService-wLid8dB0.d.ts} +1 -1
  3. package/dist/AuthComponent-hxOPs9o8.d.mts +11 -0
  4. package/dist/AuthComponent-hxOPs9o8.d.ts +11 -0
  5. package/dist/{BlockNoteEditor-BLVXQPXV.mjs → BlockNoteEditor-4VOBTXWC.mjs} +7 -7
  6. package/dist/{BlockNoteEditor-ZTDHULFT.js → BlockNoteEditor-6NVBI7XL.js} +17 -17
  7. package/dist/{BlockNoteEditor-ZTDHULFT.js.map → BlockNoteEditor-6NVBI7XL.js.map} +1 -1
  8. package/dist/{chunk-6GKHCVF6.js → chunk-32HM6MDD.js} +1 -1
  9. package/dist/chunk-32HM6MDD.js.map +1 -0
  10. package/dist/{chunk-A5DDIABK.js → chunk-EZK3H6EJ.js} +206 -206
  11. package/dist/{chunk-A5DDIABK.js.map → chunk-EZK3H6EJ.js.map} +1 -1
  12. package/dist/{chunk-RZO2LOW4.js → chunk-FYRFMABS.js} +181 -183
  13. package/dist/chunk-FYRFMABS.js.map +1 -0
  14. package/dist/{chunk-DD3KISNB.mjs → chunk-HAG77QBV.mjs} +1 -1
  15. package/dist/chunk-HAG77QBV.mjs.map +1 -0
  16. package/dist/{chunk-3APORDYP.mjs → chunk-HP4Q5ZVG.mjs} +705 -517
  17. package/dist/chunk-HP4Q5ZVG.mjs.map +1 -0
  18. package/dist/{chunk-2LM6LCJW.mjs → chunk-JLN6UWII.mjs} +41 -2
  19. package/dist/chunk-JLN6UWII.mjs.map +1 -0
  20. package/dist/{chunk-WEC4YMOS.js → chunk-KPRHIJO6.js} +783 -595
  21. package/dist/chunk-KPRHIJO6.js.map +1 -0
  22. package/dist/{chunk-JC3WJK65.js → chunk-LJRD4SRV.js} +41 -2
  23. package/dist/chunk-LJRD4SRV.js.map +1 -0
  24. package/dist/{chunk-7C5RAEBO.mjs → chunk-MA2L2PL2.mjs} +2 -4
  25. package/dist/chunk-MA2L2PL2.mjs.map +1 -0
  26. package/dist/{chunk-PYF2U6WG.mjs → chunk-NPPQNSXN.mjs} +11 -1
  27. package/dist/{chunk-PYF2U6WG.mjs.map → chunk-NPPQNSXN.mjs.map} +1 -1
  28. package/dist/{chunk-HMHGLXWC.js → chunk-WZJDLITG.js} +11 -1
  29. package/dist/chunk-WZJDLITG.js.map +1 -0
  30. package/dist/{chunk-IWFGEPAA.mjs → chunk-X53MF5ZN.mjs} +2 -2
  31. package/dist/client/index.d.mts +8 -4
  32. package/dist/client/index.d.ts +8 -4
  33. package/dist/client/index.js +9 -7
  34. package/dist/client/index.js.map +1 -1
  35. package/dist/client/index.mjs +8 -6
  36. package/dist/components/index.d.mts +20 -3
  37. package/dist/components/index.d.ts +20 -3
  38. package/dist/components/index.js +13 -7
  39. package/dist/components/index.js.map +1 -1
  40. package/dist/components/index.mjs +12 -6
  41. package/dist/{user.fields-CbdObSmS.d.mts → content.fields-cHPdM8GJ.d.mts} +10 -1
  42. package/dist/{user.fields-CbdObSmS.d.ts → content.fields-cHPdM8GJ.d.ts} +10 -1
  43. package/dist/{AuthComponent-m6Qp4Hz6.d.ts → content.interface-C_PGZMuy.d.ts} +1 -11
  44. package/dist/{AuthComponent-CPLvEerw.d.mts → content.interface-D_WS6CrB.d.mts} +1 -11
  45. package/dist/contexts/index.d.mts +2 -1
  46. package/dist/contexts/index.d.ts +2 -1
  47. package/dist/contexts/index.js +7 -7
  48. package/dist/contexts/index.mjs +6 -6
  49. package/dist/core/index.d.mts +6 -3
  50. package/dist/core/index.d.ts +6 -3
  51. package/dist/core/index.js +2 -2
  52. package/dist/core/index.mjs +1 -1
  53. package/dist/features/index.d.mts +7 -17
  54. package/dist/features/index.d.ts +7 -17
  55. package/dist/features/index.js +4 -4
  56. package/dist/features/index.mjs +3 -3
  57. package/dist/hooks/index.d.mts +4 -4
  58. package/dist/hooks/index.d.ts +4 -4
  59. package/dist/hooks/index.js +7 -7
  60. package/dist/hooks/index.mjs +6 -6
  61. package/dist/index.d.mts +4 -3
  62. package/dist/index.d.ts +4 -3
  63. package/dist/index.js +3 -3
  64. package/dist/index.mjs +2 -2
  65. package/dist/permissions/index.d.mts +3 -2
  66. package/dist/permissions/index.d.ts +3 -2
  67. package/dist/permissions/index.js +2 -2
  68. package/dist/permissions/index.mjs +1 -1
  69. package/dist/server/index.d.mts +2 -1
  70. package/dist/server/index.d.ts +2 -1
  71. package/dist/server/index.js +2 -2
  72. package/dist/server/index.mjs +1 -1
  73. package/dist/shadcnui/index.js +5 -3
  74. package/dist/shadcnui/index.js.map +1 -1
  75. package/dist/shadcnui/index.mjs +4 -2
  76. package/dist/{types-BUAlgqqh.d.ts → types-B2QRyqyK.d.ts} +1 -1
  77. package/dist/{types-iVdVY7ba.d.mts → types-CgvNmxTd.d.mts} +1 -1
  78. package/dist/{types-Bl61ob-7.d.mts → types-t2PyXhDu.d.mts} +4 -0
  79. package/dist/{types-Bl61ob-7.d.ts → types-t2PyXhDu.d.ts} +4 -0
  80. package/dist/utils/index.d.mts +27 -3
  81. package/dist/utils/index.d.ts +27 -3
  82. package/dist/utils/index.js +16 -2
  83. package/dist/utils/index.js.map +1 -1
  84. package/dist/utils/index.mjs +15 -1
  85. package/package.json +1 -1
  86. package/src/client/index.ts +3 -1
  87. package/src/components/index.ts +1 -0
  88. package/src/core/registry/ModuleRegistry.ts +16 -1
  89. package/src/features/content/components/index.ts +1 -0
  90. package/src/features/content/components/lists/ContentsList.tsx +67 -0
  91. package/src/features/content/components/lists/ContentsListById.tsx +30 -0
  92. package/src/features/content/components/lists/RelevantContentsList.tsx +30 -0
  93. package/src/features/content/components/lists/index.ts +3 -0
  94. package/src/features/content/data/content.fields.ts +0 -2
  95. package/src/features/content/hooks/index.ts +1 -0
  96. package/src/features/content/hooks/useContentTableStructure.tsx +132 -0
  97. package/src/hooks/usePageTracker.ts +1 -1
  98. package/src/hooks/useSocket.ts +4 -4
  99. package/src/permissions/types.ts +3 -0
  100. package/src/utils/icons.tsx +40 -0
  101. package/src/utils/index.ts +1 -0
  102. package/dist/chunk-2LM6LCJW.mjs.map +0 -1
  103. package/dist/chunk-3APORDYP.mjs.map +0 -1
  104. package/dist/chunk-6GKHCVF6.js.map +0 -1
  105. package/dist/chunk-7C5RAEBO.mjs.map +0 -1
  106. package/dist/chunk-DD3KISNB.mjs.map +0 -1
  107. package/dist/chunk-HMHGLXWC.js.map +0 -1
  108. package/dist/chunk-JC3WJK65.js.map +0 -1
  109. package/dist/chunk-RZO2LOW4.js.map +0 -1
  110. package/dist/chunk-WEC4YMOS.js.map +0 -1
  111. /package/dist/{BlockNoteEditor-BLVXQPXV.mjs.map → BlockNoteEditor-4VOBTXWC.mjs.map} +0 -0
  112. /package/dist/{chunk-IWFGEPAA.mjs.map → chunk-X53MF5ZN.mjs.map} +0 -0
@@ -52,6 +52,9 @@ import {
52
52
  FormItem,
53
53
  FormLabel,
54
54
  FormMessage,
55
+ HoverCard,
56
+ HoverCardContent,
57
+ HoverCardTrigger,
55
58
  Input,
56
59
  Label,
57
60
  Link,
@@ -91,20 +94,22 @@ import {
91
94
  TooltipTrigger,
92
95
  buttonVariants,
93
96
  useSidebar
94
- } from "./chunk-IWFGEPAA.mjs";
97
+ } from "./chunk-X53MF5ZN.mjs";
95
98
  import {
96
- cn
97
- } from "./chunk-2LM6LCJW.mjs";
99
+ cn,
100
+ getIconByModule
101
+ } from "./chunk-JLN6UWII.mjs";
98
102
  import {
99
103
  AuthService,
100
104
  CompanyService,
105
+ ContentService,
101
106
  FeatureService,
102
107
  NotificationService,
103
108
  PushService,
104
109
  RoleService,
105
110
  S3Service,
106
111
  UserService
107
- } from "./chunk-7C5RAEBO.mjs";
112
+ } from "./chunk-MA2L2PL2.mjs";
108
113
  import {
109
114
  getTokenHandler,
110
115
  useI18nDateFnsLocale,
@@ -127,16 +132,16 @@ import {
127
132
  Modules,
128
133
  RehydrationFactory,
129
134
  rehydrate
130
- } from "./chunk-PYF2U6WG.mjs";
135
+ } from "./chunk-NPPQNSXN.mjs";
131
136
  import {
132
137
  checkPermissions
133
- } from "./chunk-DD3KISNB.mjs";
138
+ } from "./chunk-HAG77QBV.mjs";
134
139
  import {
135
140
  __name
136
141
  } from "./chunk-PAWJFY3S.mjs";
137
142
 
138
143
  // src/features/company/contexts/CompanyContext.tsx
139
- import { useTranslations as useTranslations59 } from "next-intl";
144
+ import { useTranslations as useTranslations63 } from "next-intl";
140
145
  import { createContext as createContext9, useContext as useContext9, useState as useState46 } from "react";
141
146
 
142
147
  // src/hooks/TableGeneratorRegistry.ts
@@ -952,7 +957,7 @@ import { useEffect as useEffect5 } from "react";
952
957
  var EXCLUDED_ROUTES = ["/", "/login", "/register", "/forgot-password", "/reset-password", "/activate"];
953
958
  function usePageTracker() {
954
959
  const pathname = usePathname();
955
- const [recentPages, setRecentPages] = useAtom(recentPagesAtom);
960
+ const [_recentPages, setRecentPages] = useAtom(recentPagesAtom);
956
961
  useEffect5(() => {
957
962
  if (!pathname) return;
958
963
  if (EXCLUDED_ROUTES.some((route) => pathname === route || pathname.endsWith(route))) {
@@ -1052,9 +1057,9 @@ __name(usePushNotifications, "usePushNotifications");
1052
1057
  import { useEffect as useEffect7, useRef as useRef4, useState as useState2 } from "react";
1053
1058
  import io from "socket.io-client";
1054
1059
  function useSocket({ token }) {
1055
- const errorCount = useRef4(0);
1060
+ const _errorCount = useRef4(0);
1056
1061
  const shouldConnect = useRef4(true);
1057
- const hookInstanceId = useRef4(Math.random().toString(36).substring(2, 11));
1062
+ const _hookInstanceId = useRef4(Math.random().toString(36).substring(2, 11));
1058
1063
  const [socket, setSocket] = useState2(null);
1059
1064
  const [isConnected, setIsConnected] = useState2(false);
1060
1065
  const [messages, setMessages] = useState2([]);
@@ -1064,7 +1069,7 @@ function useSocket({ token }) {
1064
1069
  if (!token) return;
1065
1070
  const globalSocketKey = `__socket_${process.env.NEXT_PUBLIC_API_URL?.replace(/[^a-zA-Z0-9]/g, "_")}`;
1066
1071
  if (typeof window !== "undefined") {
1067
- const allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
1072
+ const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
1068
1073
  const existingSocket = window[globalSocketKey];
1069
1074
  if (existingSocket) {
1070
1075
  if (existingSocket.connected) {
@@ -1100,7 +1105,7 @@ function useSocket({ token }) {
1100
1105
  }
1101
1106
  socketRef.current = currentSocket;
1102
1107
  setSocket(currentSocket);
1103
- } catch (error) {
1108
+ } catch {
1104
1109
  return () => {
1105
1110
  };
1106
1111
  }
@@ -1288,11 +1293,11 @@ function useCurrentUserContext() {
1288
1293
  __name(useCurrentUserContext, "useCurrentUserContext");
1289
1294
 
1290
1295
  // src/features/user/contexts/UserContext.tsx
1291
- import { useTranslations as useTranslations58 } from "next-intl";
1296
+ import { useTranslations as useTranslations62 } from "next-intl";
1292
1297
  import { createContext as createContext8, useContext as useContext8, useState as useState45 } from "react";
1293
1298
 
1294
1299
  // src/features/user/components/forms/RoleUserAdd.tsx
1295
- import { useTranslations as useTranslations51 } from "next-intl";
1300
+ import { useTranslations as useTranslations55 } from "next-intl";
1296
1301
  import { useEffect as useEffect35, useState as useState38 } from "react";
1297
1302
 
1298
1303
  // src/components/navigations/Breadcrumb.tsx
@@ -1979,7 +1984,7 @@ __name(AllowedUsersDetails, "AllowedUsersDetails");
1979
1984
  import dynamic from "next/dynamic";
1980
1985
  import React3 from "react";
1981
1986
  import { jsx as jsx29 } from "react/jsx-runtime";
1982
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-BLVXQPXV.mjs"), {
1987
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-4VOBTXWC.mjs"), {
1983
1988
  ssr: false
1984
1989
  });
1985
1990
  var BlockNoteEditorContainer = React3.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -4433,6 +4438,110 @@ var useUserTableStructure = /* @__PURE__ */ __name((params) => {
4433
4438
  return useMemo10(() => ({ data: tableData, columns }), [tableData, columns]);
4434
4439
  }, "useUserTableStructure");
4435
4440
 
4441
+ // src/features/content/hooks/useContentTableStructure.tsx
4442
+ import { useTranslations as useTranslations24 } from "next-intl";
4443
+ import { useMemo as useMemo11 } from "react";
4444
+ import { Fragment as Fragment10, jsx as jsx63, jsxs as jsxs42 } from "react/jsx-runtime";
4445
+ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
4446
+ const t = useTranslations24();
4447
+ const generateUrl = usePageUrlGenerator();
4448
+ const tableData = useMemo11(() => {
4449
+ return params.data.map((content) => {
4450
+ const entry = {
4451
+ jsonApiData: content
4452
+ };
4453
+ entry["contentId" /* contentId */] = content.id;
4454
+ params.fields.forEach((field) => {
4455
+ entry[field] = content[field];
4456
+ });
4457
+ return entry;
4458
+ });
4459
+ }, [params.data, params.fields]);
4460
+ const fieldColumnMap = {
4461
+ ["contentId" /* contentId */]: () => cellId({
4462
+ name: "contentId",
4463
+ checkedIds: params.checkedIds,
4464
+ toggleId: params.toggleId
4465
+ }),
4466
+ ["name" /* name */]: () => ({
4467
+ id: "name",
4468
+ accessorKey: "name",
4469
+ header: t(`foundations.content.fields.name.label`),
4470
+ cell: /* @__PURE__ */ __name(({ row }) => {
4471
+ const content = row.original.jsonApiData;
4472
+ const contentModule = content.contentType ? Modules.findByModelName(content.contentType) : void 0;
4473
+ const link = contentModule ? generateUrl({ page: contentModule, id: content.id }) : "#";
4474
+ return /* @__PURE__ */ jsxs42(Tooltip, { children: [
4475
+ /* @__PURE__ */ jsx63(TooltipTrigger, { className: "flex items-center justify-start space-x-2", children: /* @__PURE__ */ jsxs42(Fragment10, { children: [
4476
+ contentModule && getIconByModule({ module: contentModule, className: "h-4 w-4" }),
4477
+ /* @__PURE__ */ jsx63(Link, { href: link, children: content.name })
4478
+ ] }) }),
4479
+ /* @__PURE__ */ jsx63(TooltipContent, { children: content.tldr })
4480
+ ] });
4481
+ }, "cell"),
4482
+ enableSorting: false,
4483
+ enableHiding: false
4484
+ }),
4485
+ ["relevance" /* relevance */]: () => ({
4486
+ id: "relevance",
4487
+ accessorKey: "relevance",
4488
+ header: t(`generic.relevance`),
4489
+ cell: /* @__PURE__ */ __name(({ row }) => {
4490
+ const content = row.original.jsonApiData;
4491
+ if (!content.relevance) return /* @__PURE__ */ jsx63(Fragment10, {});
4492
+ const response = `${content.relevance.toFixed(0)}%`;
4493
+ return /* @__PURE__ */ jsxs42("div", { className: "relative flex h-5 w-20 items-center justify-center overflow-hidden rounded border text-center", children: [
4494
+ /* @__PURE__ */ jsx63(
4495
+ "div",
4496
+ {
4497
+ className: `bg-accent absolute top-0 left-0 h-full opacity-${Math.round(content.relevance)}`,
4498
+ style: { width: `${content.relevance}%` }
4499
+ }
4500
+ ),
4501
+ /* @__PURE__ */ jsx63(
4502
+ "span",
4503
+ {
4504
+ className: `relative text-xs ${content.relevance < 40 ? "text-muted-foreground" : "text-accent-foreground font-semibold"}`,
4505
+ children: response
4506
+ }
4507
+ )
4508
+ ] });
4509
+ }, "cell"),
4510
+ enableSorting: false,
4511
+ enableHiding: false
4512
+ }),
4513
+ ["authors" /* authors */]: () => ({
4514
+ id: "authors",
4515
+ accessorKey: "authors",
4516
+ header: t(`generic.relationships.author.label`),
4517
+ cell: /* @__PURE__ */ __name(({ row }) => {
4518
+ const content = row.original.jsonApiData;
4519
+ return /* @__PURE__ */ jsx63(ContributorsList, { content });
4520
+ }, "cell"),
4521
+ enableSorting: false,
4522
+ enableHiding: false
4523
+ }),
4524
+ ["createdAt" /* createdAt */]: () => cellDate({
4525
+ name: "createdAt",
4526
+ title: t(`generic.date.create`)
4527
+ }),
4528
+ ["updatedAt" /* updatedAt */]: () => cellDate({
4529
+ name: "updatedAt",
4530
+ title: t(`generic.date.update`)
4531
+ })
4532
+ };
4533
+ const columns = useMemo11(() => {
4534
+ return params.fields.map((field) => {
4535
+ const localHandler = fieldColumnMap[field];
4536
+ if (localHandler) return localHandler();
4537
+ const customHandler = params.context?.customCells?.[field];
4538
+ if (customHandler) return customHandler({ t });
4539
+ return void 0;
4540
+ }).filter((col) => col !== void 0);
4541
+ }, [params.fields, fieldColumnMap, t, generateUrl, params.context?.customCells]);
4542
+ return useMemo11(() => ({ data: tableData, columns }), [tableData, columns]);
4543
+ }, "useContentTableStructure");
4544
+
4436
4545
  // src/client/index.ts
4437
4546
  registerTableGenerator("roles", useRoleTableStructure);
4438
4547
  registerTableGenerator("users", useUserTableStructure);
@@ -4441,15 +4550,15 @@ registerTableGenerator("companies", useCompanyTableStructure);
4441
4550
  // src/components/tables/ContentListTable.tsx
4442
4551
  import { flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
4443
4552
  import { CaretLeftIcon, CaretRightIcon } from "@radix-ui/react-icons";
4444
- import { memo, useMemo as useMemo11 } from "react";
4553
+ import { memo, useMemo as useMemo12 } from "react";
4445
4554
 
4446
4555
  // src/components/tables/ContentTableSearch.tsx
4447
4556
  import { RefreshCw, Search, X } from "lucide-react";
4448
- import { useTranslations as useTranslations24 } from "next-intl";
4557
+ import { useTranslations as useTranslations25 } from "next-intl";
4449
4558
  import { useCallback as useCallback10, useEffect as useEffect22, useRef as useRef12, useState as useState21 } from "react";
4450
- import { jsx as jsx63, jsxs as jsxs42 } from "react/jsx-runtime";
4559
+ import { jsx as jsx64, jsxs as jsxs43 } from "react/jsx-runtime";
4451
4560
  function ContentTableSearch({ data }) {
4452
- const t = useTranslations24();
4561
+ const t = useTranslations25();
4453
4562
  const searchTermRef = useRef12("");
4454
4563
  const inputRef = useRef12(null);
4455
4564
  const [searchTerm, setSearchTerm] = useState21("");
@@ -4489,19 +4598,19 @@ function ContentTableSearch({ data }) {
4489
4598
  search("");
4490
4599
  setIsFocused(false);
4491
4600
  }, "handleClear");
4492
- return /* @__PURE__ */ jsxs42(
4601
+ return /* @__PURE__ */ jsxs43(
4493
4602
  "div",
4494
4603
  {
4495
4604
  className: `relative flex h-6 items-center text-xs font-normal transition-all duration-300 ease-in-out ${isExpanded ? "w-64" : "w-6"}`,
4496
4605
  children: [
4497
- /* @__PURE__ */ jsx63(
4606
+ /* @__PURE__ */ jsx64(
4498
4607
  Search,
4499
4608
  {
4500
4609
  className: `absolute top-1 left-1 h-4 w-4 transition-colors ${isExpanded ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground cursor-pointer"}`,
4501
4610
  onClick: handleSearchIconClick
4502
4611
  }
4503
4612
  ),
4504
- isExpanded && /* @__PURE__ */ jsx63(
4613
+ isExpanded && /* @__PURE__ */ jsx64(
4505
4614
  Input,
4506
4615
  {
4507
4616
  ref: inputRef,
@@ -4519,8 +4628,8 @@ function ContentTableSearch({ data }) {
4519
4628
  value: searchTerm
4520
4629
  }
4521
4630
  ),
4522
- isExpanded && isSearching && /* @__PURE__ */ jsx63(RefreshCw, { className: "text-muted-foreground absolute top-1 right-1 h-4 w-4 animate-spin" }),
4523
- isExpanded && !isSearching && searchTermRef.current && /* @__PURE__ */ jsx63(
4631
+ isExpanded && isSearching && /* @__PURE__ */ jsx64(RefreshCw, { className: "text-muted-foreground absolute top-1 right-1 h-4 w-4 animate-spin" }),
4632
+ isExpanded && !isSearching && searchTermRef.current && /* @__PURE__ */ jsx64(
4524
4633
  X,
4525
4634
  {
4526
4635
  className: "text-muted-foreground hover:text-foreground absolute top-1 right-1 h-4 w-4 cursor-pointer",
@@ -4534,7 +4643,7 @@ function ContentTableSearch({ data }) {
4534
4643
  __name(ContentTableSearch, "ContentTableSearch");
4535
4644
 
4536
4645
  // src/components/tables/ContentListTable.tsx
4537
- import { Fragment as Fragment10, jsx as jsx64, jsxs as jsxs43 } from "react/jsx-runtime";
4646
+ import { Fragment as Fragment11, jsx as jsx65, jsxs as jsxs44 } from "react/jsx-runtime";
4538
4647
  var EMPTY_ARRAY = [];
4539
4648
  var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(props) {
4540
4649
  const { data, fields, checkedIds, toggleId, allowSearch, filters } = props;
@@ -4546,7 +4655,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
4546
4655
  dataRetriever: data,
4547
4656
  context: props.context
4548
4657
  });
4549
- const columnVisibility = useMemo11(
4658
+ const columnVisibility = useMemo12(
4550
4659
  () => fields.reduce(
4551
4660
  (acc, columnId) => {
4552
4661
  acc[columnId] = true;
@@ -4566,23 +4675,23 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
4566
4675
  });
4567
4676
  const rowModel = tableData ? table.getRowModel() : null;
4568
4677
  const showFooter = !!(props.functions || data.next || data.previous);
4569
- return /* @__PURE__ */ jsx64("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx64("div", { className: "overflow-hidden rounded-md border", children: /* @__PURE__ */ jsxs43(Table, { children: [
4570
- /* @__PURE__ */ jsxs43(TableHeader, { className: "bg-muted font-semibold", children: [
4571
- props.title && /* @__PURE__ */ jsx64(TableRow, { children: /* @__PURE__ */ jsx64(TableHead, { className: "bg-card text-primary p-4 text-left font-bold", colSpan: tableColumns.length, children: /* @__PURE__ */ jsxs43("div", { className: "flex w-full items-center justify-between gap-x-2", children: [
4572
- /* @__PURE__ */ jsx64("div", { className: "w-full", children: props.title }),
4573
- (props.functions || props.filters || allowSearch) && /* @__PURE__ */ jsxs43(Fragment10, { children: [
4678
+ return /* @__PURE__ */ jsx65("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx65("div", { className: "overflow-hidden rounded-md border", children: /* @__PURE__ */ jsxs44(Table, { children: [
4679
+ /* @__PURE__ */ jsxs44(TableHeader, { className: "bg-muted font-semibold", children: [
4680
+ props.title && /* @__PURE__ */ jsx65(TableRow, { children: /* @__PURE__ */ jsx65(TableHead, { className: "bg-card text-primary p-4 text-left font-bold", colSpan: tableColumns.length, children: /* @__PURE__ */ jsxs44("div", { className: "flex w-full items-center justify-between gap-x-2", children: [
4681
+ /* @__PURE__ */ jsx65("div", { className: "w-full", children: props.title }),
4682
+ (props.functions || props.filters || allowSearch) && /* @__PURE__ */ jsxs44(Fragment11, { children: [
4574
4683
  props.functions,
4575
4684
  props.filters,
4576
- /* @__PURE__ */ jsx64(ContentTableSearch, { data })
4685
+ /* @__PURE__ */ jsx65(ContentTableSearch, { data })
4577
4686
  ] })
4578
4687
  ] }) }) }),
4579
- table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx64(TableRow, { children: headerGroup.headers.map((header) => {
4580
- return /* @__PURE__ */ jsx64(TableHead, { children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
4688
+ table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx65(TableRow, { children: headerGroup.headers.map((header) => {
4689
+ return /* @__PURE__ */ jsx65(TableHead, { children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
4581
4690
  }) }, headerGroup.id))
4582
4691
  ] }),
4583
- /* @__PURE__ */ jsx64(TableBody, { children: rowModel && rowModel.rows?.length ? rowModel.rows.map((row) => /* @__PURE__ */ jsx64(TableRow, { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx64(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) : /* @__PURE__ */ jsx64(TableRow, { children: /* @__PURE__ */ jsx64(TableCell, { colSpan: tableColumns.length, className: "h-24 text-center", children: "No results." }) }) }),
4584
- showFooter && /* @__PURE__ */ jsx64(TableFooter, { children: /* @__PURE__ */ jsx64(TableRow, { children: /* @__PURE__ */ jsx64(TableCell, { colSpan: tableColumns.length, className: "bg-card py-4 text-right", children: /* @__PURE__ */ jsxs43("div", { className: "flex items-center justify-end space-x-2", children: [
4585
- /* @__PURE__ */ jsx64(
4692
+ /* @__PURE__ */ jsx65(TableBody, { children: rowModel && rowModel.rows?.length ? rowModel.rows.map((row) => /* @__PURE__ */ jsx65(TableRow, { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx65(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) : /* @__PURE__ */ jsx65(TableRow, { children: /* @__PURE__ */ jsx65(TableCell, { colSpan: tableColumns.length, className: "h-24 text-center", children: "No results." }) }) }),
4693
+ showFooter && /* @__PURE__ */ jsx65(TableFooter, { children: /* @__PURE__ */ jsx65(TableRow, { children: /* @__PURE__ */ jsx65(TableCell, { colSpan: tableColumns.length, className: "bg-card py-4 text-right", children: /* @__PURE__ */ jsxs44("div", { className: "flex items-center justify-end space-x-2", children: [
4694
+ /* @__PURE__ */ jsx65(
4586
4695
  Button,
4587
4696
  {
4588
4697
  variant: "outline",
@@ -4592,15 +4701,15 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
4592
4701
  data.previous?.(true);
4593
4702
  },
4594
4703
  disabled: !data.previous,
4595
- children: /* @__PURE__ */ jsx64(CaretLeftIcon, { className: "h-4 w-4" })
4704
+ children: /* @__PURE__ */ jsx65(CaretLeftIcon, { className: "h-4 w-4" })
4596
4705
  }
4597
4706
  ),
4598
- data.pageInfo && /* @__PURE__ */ jsxs43("span", { className: "text-muted-foreground text-xs", children: [
4707
+ data.pageInfo && /* @__PURE__ */ jsxs44("span", { className: "text-muted-foreground text-xs", children: [
4599
4708
  data.pageInfo.startItem,
4600
4709
  "-",
4601
4710
  data.pageInfo.endItem
4602
4711
  ] }),
4603
- /* @__PURE__ */ jsx64(
4712
+ /* @__PURE__ */ jsx65(
4604
4713
  Button,
4605
4714
  {
4606
4715
  variant: "outline",
@@ -4610,7 +4719,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
4610
4719
  data.next?.(true);
4611
4720
  },
4612
4721
  disabled: !data.next,
4613
- children: /* @__PURE__ */ jsx64(CaretRightIcon, { className: "h-4 w-4" })
4722
+ children: /* @__PURE__ */ jsx65(CaretRightIcon, { className: "h-4 w-4" })
4614
4723
  }
4615
4724
  )
4616
4725
  ] }) }) }) })
@@ -4621,19 +4730,19 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
4621
4730
  import Image5 from "next/image";
4622
4731
 
4623
4732
  // src/features/auth/contexts/AuthContext.tsx
4624
- import { createContext as createContext5, useContext as useContext5, useMemo as useMemo12, useState as useState23 } from "react";
4733
+ import { createContext as createContext5, useContext as useContext5, useMemo as useMemo13, useState as useState23 } from "react";
4625
4734
 
4626
4735
  // src/features/auth/components/forms/Register.tsx
4627
4736
  import { zodResolver } from "@hookform/resolvers/zod";
4628
- import { useTranslations as useTranslations25 } from "next-intl";
4737
+ import { useTranslations as useTranslations26 } from "next-intl";
4629
4738
  import Image4 from "next/image";
4630
4739
  import { useState as useState22 } from "react";
4631
4740
  import { useForm } from "react-hook-form";
4632
4741
  import { v4 as v42 } from "uuid";
4633
4742
  import { z } from "zod";
4634
- import { Fragment as Fragment11, jsx as jsx65, jsxs as jsxs44 } from "react/jsx-runtime";
4743
+ import { Fragment as Fragment12, jsx as jsx66, jsxs as jsxs45 } from "react/jsx-runtime";
4635
4744
  function Register() {
4636
- const t = useTranslations25();
4745
+ const t = useTranslations26();
4637
4746
  const { setComponentType } = useAuthContext();
4638
4747
  const [showConfirmation, setShowConfirmation] = useState22(false);
4639
4748
  const formSchema = z.object({
@@ -4674,17 +4783,17 @@ function Register() {
4674
4783
  errorToast({ error: e });
4675
4784
  }
4676
4785
  }, "onSubmit");
4677
- return /* @__PURE__ */ jsxs44(Fragment11, { children: [
4678
- /* @__PURE__ */ jsxs44(CardHeader, { children: [
4679
- /* @__PURE__ */ jsxs44(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
4680
- /* @__PURE__ */ jsx65(Image4, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
4786
+ return /* @__PURE__ */ jsxs45(Fragment12, { children: [
4787
+ /* @__PURE__ */ jsxs45(CardHeader, { children: [
4788
+ /* @__PURE__ */ jsxs45(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
4789
+ /* @__PURE__ */ jsx66(Image4, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
4681
4790
  t(`foundations.auth.register`)
4682
4791
  ] }),
4683
- /* @__PURE__ */ jsx65(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx65(Fragment11, { children: " " }) : /* @__PURE__ */ jsx65(Fragment11, { children: t(`foundations.auth.register_description`) }) })
4792
+ /* @__PURE__ */ jsx66(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx66(Fragment12, { children: " " }) : /* @__PURE__ */ jsx66(Fragment12, { children: t(`foundations.auth.register_description`) }) })
4684
4793
  ] }),
4685
- showConfirmation ? /* @__PURE__ */ jsx65(CardContent, { children: /* @__PURE__ */ jsx65(CardDescription, { className: "text-center text-xl", children: t("foundations.auth.register_confirmation") }) }) : /* @__PURE__ */ jsx65(Form, { ...form, children: /* @__PURE__ */ jsxs44("form", { onSubmit: form.handleSubmit(onSubmit), children: [
4686
- /* @__PURE__ */ jsxs44(CardContent, { children: [
4687
- /* @__PURE__ */ jsx65(
4794
+ showConfirmation ? /* @__PURE__ */ jsx66(CardContent, { children: /* @__PURE__ */ jsx66(CardDescription, { className: "text-center text-xl", children: t("foundations.auth.register_confirmation") }) }) : /* @__PURE__ */ jsx66(Form, { ...form, children: /* @__PURE__ */ jsxs45("form", { onSubmit: form.handleSubmit(onSubmit), children: [
4795
+ /* @__PURE__ */ jsxs45(CardContent, { children: [
4796
+ /* @__PURE__ */ jsx66(
4688
4797
  FormInput,
4689
4798
  {
4690
4799
  isRequired: true,
@@ -4694,7 +4803,7 @@ function Register() {
4694
4803
  placeholder: t(`foundations.company.fields.name.placeholder`)
4695
4804
  }
4696
4805
  ),
4697
- /* @__PURE__ */ jsx65(
4806
+ /* @__PURE__ */ jsx66(
4698
4807
  FormInput,
4699
4808
  {
4700
4809
  isRequired: true,
@@ -4704,7 +4813,7 @@ function Register() {
4704
4813
  placeholder: t(`foundations.user.fields.name.placeholder`)
4705
4814
  }
4706
4815
  ),
4707
- /* @__PURE__ */ jsx65(
4816
+ /* @__PURE__ */ jsx66(
4708
4817
  FormInput,
4709
4818
  {
4710
4819
  isRequired: true,
@@ -4714,7 +4823,7 @@ function Register() {
4714
4823
  placeholder: t(`generic.fields.email.placeholder`)
4715
4824
  }
4716
4825
  ),
4717
- /* @__PURE__ */ jsx65(
4826
+ /* @__PURE__ */ jsx66(
4718
4827
  FormPassword,
4719
4828
  {
4720
4829
  isRequired: true,
@@ -4724,10 +4833,10 @@ function Register() {
4724
4833
  placeholder: t(`foundations.user.fields.password.placeholder`)
4725
4834
  }
4726
4835
  ),
4727
- /* @__PURE__ */ jsx65(Button, { className: "mt-4 w-full", type: "submit", children: t(`foundations.auth.buttons.register`) })
4836
+ /* @__PURE__ */ jsx66(Button, { className: "mt-4 w-full", type: "submit", children: t(`foundations.auth.buttons.register`) })
4728
4837
  ] }),
4729
- /* @__PURE__ */ jsxs44(CardFooter, { className: "flex w-full flex-row justify-between", children: [
4730
- /* @__PURE__ */ jsx65(
4838
+ /* @__PURE__ */ jsxs45(CardFooter, { className: "flex w-full flex-row justify-between", children: [
4839
+ /* @__PURE__ */ jsx66(
4731
4840
  Link,
4732
4841
  {
4733
4842
  href: "#",
@@ -4736,7 +4845,7 @@ function Register() {
4736
4845
  children: t(`foundations.auth.buttons.login`)
4737
4846
  }
4738
4847
  ),
4739
- /* @__PURE__ */ jsx65(
4848
+ /* @__PURE__ */ jsx66(
4740
4849
  Link,
4741
4850
  {
4742
4851
  href: "#",
@@ -4752,7 +4861,7 @@ function Register() {
4752
4861
  __name(Register, "Register");
4753
4862
 
4754
4863
  // src/features/auth/contexts/AuthContext.tsx
4755
- import { jsx as jsx66 } from "react/jsx-runtime";
4864
+ import { jsx as jsx67 } from "react/jsx-runtime";
4756
4865
  var AuthContext = createContext5(void 0);
4757
4866
  var AuthContextProvider = /* @__PURE__ */ __name(({
4758
4867
  children,
@@ -4761,26 +4870,26 @@ var AuthContextProvider = /* @__PURE__ */ __name(({
4761
4870
  }) => {
4762
4871
  const [componentType, setComponentType] = useState23(initialComponentType);
4763
4872
  const [params, setParams] = useState23(initialParams);
4764
- const activeComponent = useMemo12(() => {
4873
+ const activeComponent = useMemo13(() => {
4765
4874
  if (componentType === void 0) return null;
4766
4875
  switch (componentType) {
4767
4876
  case 0 /* Login */:
4768
- return /* @__PURE__ */ jsx66(Login, {});
4877
+ return /* @__PURE__ */ jsx67(Login, {});
4769
4878
  case 5 /* Register */:
4770
- return /* @__PURE__ */ jsx66(Register, {});
4879
+ return /* @__PURE__ */ jsx67(Register, {});
4771
4880
  case 1 /* ForgotPassword */:
4772
- return /* @__PURE__ */ jsx66(ForgotPassword, {});
4881
+ return /* @__PURE__ */ jsx67(ForgotPassword, {});
4773
4882
  case 3 /* ActivateAccount */:
4774
- return /* @__PURE__ */ jsx66(ActivateAccount, {});
4883
+ return /* @__PURE__ */ jsx67(ActivateAccount, {});
4775
4884
  case 2 /* ResetPassword */:
4776
- return /* @__PURE__ */ jsx66(ResetPassword, {});
4885
+ return /* @__PURE__ */ jsx67(ResetPassword, {});
4777
4886
  case 4 /* AcceptInvitation */:
4778
- return /* @__PURE__ */ jsx66(AcceptInvitation, {});
4887
+ return /* @__PURE__ */ jsx67(AcceptInvitation, {});
4779
4888
  default:
4780
- return /* @__PURE__ */ jsx66(LandingComponent, {});
4889
+ return /* @__PURE__ */ jsx67(LandingComponent, {});
4781
4890
  }
4782
4891
  }, [componentType]);
4783
- return /* @__PURE__ */ jsx66(
4892
+ return /* @__PURE__ */ jsx67(
4784
4893
  AuthContext.Provider,
4785
4894
  {
4786
4895
  value: {
@@ -4802,37 +4911,37 @@ var useAuthContext = /* @__PURE__ */ __name(() => {
4802
4911
  }, "useAuthContext");
4803
4912
 
4804
4913
  // src/features/auth/components/containers/AuthContainer.tsx
4805
- import { jsx as jsx67 } from "react/jsx-runtime";
4914
+ import { jsx as jsx68 } from "react/jsx-runtime";
4806
4915
  function AuthContainer({ componentType, params }) {
4807
- return /* @__PURE__ */ jsx67(AuthContextProvider, { initialComponentType: componentType, initialParams: params, children: /* @__PURE__ */ jsx67(InnerAuthContainer, {}) });
4916
+ return /* @__PURE__ */ jsx68(AuthContextProvider, { initialComponentType: componentType, initialParams: params, children: /* @__PURE__ */ jsx68(InnerAuthContainer, {}) });
4808
4917
  }
4809
4918
  __name(AuthContainer, "AuthContainer");
4810
4919
  function InnerAuthContainer() {
4811
4920
  const { activeComponent } = useAuthContext();
4812
4921
  if (activeComponent === null)
4813
- return /* @__PURE__ */ jsx67("div", { className: "max-w-sm", children: /* @__PURE__ */ jsx67(Image5, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, className: "animate-spin-slow", priority: true }) });
4814
- return /* @__PURE__ */ jsx67(Card, { className: "w-full max-w-md", children: activeComponent });
4922
+ return /* @__PURE__ */ jsx68("div", { className: "max-w-sm", children: /* @__PURE__ */ jsx68(Image5, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, className: "animate-spin-slow", priority: true }) });
4923
+ return /* @__PURE__ */ jsx68(Card, { className: "w-full max-w-md", children: activeComponent });
4815
4924
  }
4816
4925
  __name(InnerAuthContainer, "InnerAuthContainer");
4817
4926
 
4818
4927
  // src/features/auth/components/details/LandingComponent.tsx
4819
- import { useTranslations as useTranslations26 } from "next-intl";
4928
+ import { useTranslations as useTranslations27 } from "next-intl";
4820
4929
  import Image6 from "next/image";
4821
- import { Fragment as Fragment12, jsx as jsx68, jsxs as jsxs45 } from "react/jsx-runtime";
4930
+ import { Fragment as Fragment13, jsx as jsx69, jsxs as jsxs46 } from "react/jsx-runtime";
4822
4931
  function LandingComponent() {
4823
- const t = useTranslations26();
4932
+ const t = useTranslations27();
4824
4933
  const { setComponentType } = useAuthContext();
4825
- return /* @__PURE__ */ jsxs45(Fragment12, { children: [
4826
- /* @__PURE__ */ jsxs45(CardHeader, { className: "mb-4", "data-testid": "page-pre-login-container", children: [
4827
- /* @__PURE__ */ jsxs45(CardTitle, { className: "text-primary flex flex-col items-center gap-y-8 pb-8 text-4xl", children: [
4828
- /* @__PURE__ */ jsx68(Image6, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
4934
+ return /* @__PURE__ */ jsxs46(Fragment13, { children: [
4935
+ /* @__PURE__ */ jsxs46(CardHeader, { className: "mb-4", "data-testid": "page-pre-login-container", children: [
4936
+ /* @__PURE__ */ jsxs46(CardTitle, { className: "text-primary flex flex-col items-center gap-y-8 pb-8 text-4xl", children: [
4937
+ /* @__PURE__ */ jsx69(Image6, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
4829
4938
  t(`generic.title`)
4830
4939
  ] }),
4831
- /* @__PURE__ */ jsx68(CardDescription, { className: "flex w-full justify-center text-center text-sm", children: t(`generic.description`) })
4940
+ /* @__PURE__ */ jsx69(CardDescription, { className: "flex w-full justify-center text-center text-sm", children: t(`generic.description`) })
4832
4941
  ] }),
4833
- /* @__PURE__ */ jsxs45(CardFooter, { className: "mt-4 flex w-full flex-col justify-between", children: [
4834
- /* @__PURE__ */ jsx68(Link, { href: "#", className: "flex w-full justify-start", onClick: () => setComponentType(5 /* Register */), children: /* @__PURE__ */ jsx68(Button, { className: "mt-4 w-full", variant: `default`, children: t(`foundations.auth.buttons.register`) }) }),
4835
- /* @__PURE__ */ jsx68(Link, { href: "#", className: "flex w-full justify-end", onClick: () => setComponentType(0 /* Login */), children: /* @__PURE__ */ jsx68(Button, { className: "mt-4 w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: t(`foundations.auth.buttons.login`) }) })
4942
+ /* @__PURE__ */ jsxs46(CardFooter, { className: "mt-4 flex w-full flex-col justify-between", children: [
4943
+ /* @__PURE__ */ jsx69(Link, { href: "#", className: "flex w-full justify-start", onClick: () => setComponentType(5 /* Register */), children: /* @__PURE__ */ jsx69(Button, { className: "mt-4 w-full", variant: `default`, children: t(`foundations.auth.buttons.register`) }) }),
4944
+ /* @__PURE__ */ jsx69(Link, { href: "#", className: "flex w-full justify-end", onClick: () => setComponentType(0 /* Login */), children: /* @__PURE__ */ jsx69(Button, { className: "mt-4 w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: t(`foundations.auth.buttons.login`) }) })
4836
4945
  ] })
4837
4946
  ] });
4838
4947
  }
@@ -4840,18 +4949,18 @@ __name(LandingComponent, "LandingComponent");
4840
4949
 
4841
4950
  // src/features/auth/components/forms/AcceptInvitation.tsx
4842
4951
  import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
4843
- import { useTranslations as useTranslations27 } from "next-intl";
4952
+ import { useTranslations as useTranslations28 } from "next-intl";
4844
4953
  import Image7 from "next/image";
4845
4954
  import { useEffect as useEffect23, useState as useState24 } from "react";
4846
4955
  import { useForm as useForm2 } from "react-hook-form";
4847
4956
  import { toast as toast4 } from "sonner";
4848
4957
  import { z as z2 } from "zod";
4849
- import { Fragment as Fragment13, jsx as jsx69, jsxs as jsxs46 } from "react/jsx-runtime";
4958
+ import { Fragment as Fragment14, jsx as jsx70, jsxs as jsxs47 } from "react/jsx-runtime";
4850
4959
  function AcceptInvitation() {
4851
4960
  const { setComponentType, params, setParams } = useAuthContext();
4852
4961
  const [showConfirmation, setShowConfirmation] = useState24(false);
4853
4962
  const [error, setError] = useState24(void 0);
4854
- const t = useTranslations27();
4963
+ const t = useTranslations28();
4855
4964
  useEffect23(() => {
4856
4965
  async function validateCode(code) {
4857
4966
  try {
@@ -4909,16 +5018,16 @@ function AcceptInvitation() {
4909
5018
  errorToast({ title: t(`generic.errors.error`), error });
4910
5019
  }
4911
5020
  }, "onSubmit");
4912
- return /* @__PURE__ */ jsxs46(Fragment13, { children: [
4913
- /* @__PURE__ */ jsxs46(CardHeader, { children: [
4914
- /* @__PURE__ */ jsxs46(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
4915
- /* @__PURE__ */ jsx69(Image7, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
5021
+ return /* @__PURE__ */ jsxs47(Fragment14, { children: [
5022
+ /* @__PURE__ */ jsxs47(CardHeader, { children: [
5023
+ /* @__PURE__ */ jsxs47(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5024
+ /* @__PURE__ */ jsx70(Image7, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
4916
5025
  t("foundations.auth.accept_invitation")
4917
5026
  ] }),
4918
- /* @__PURE__ */ jsx69(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx69(Fragment13, { children: t("foundations.auth.errors.activating_account") }) : /* @__PURE__ */ jsx69(Fragment13, { children: t("foundations.auth.select_password") }) })
5027
+ /* @__PURE__ */ jsx70(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx70(Fragment14, { children: t("foundations.auth.errors.activating_account") }) : /* @__PURE__ */ jsx70(Fragment14, { children: t("foundations.auth.select_password") }) })
4919
5028
  ] }),
4920
- /* @__PURE__ */ jsx69(CardContent, { children: showConfirmation ? /* @__PURE__ */ jsx69(CardDescription, { className: "text-center text-xl", children: t("foundations.auth.activation_description") }) : error ? /* @__PURE__ */ jsx69(CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ jsx69(Form, { ...form, children: /* @__PURE__ */ jsxs46("form", { onSubmit: form.handleSubmit(onSubmit), children: [
4921
- /* @__PURE__ */ jsx69(
5029
+ /* @__PURE__ */ jsx70(CardContent, { children: showConfirmation ? /* @__PURE__ */ jsx70(CardDescription, { className: "text-center text-xl", children: t("foundations.auth.activation_description") }) : error ? /* @__PURE__ */ jsx70(CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ jsx70(Form, { ...form, children: /* @__PURE__ */ jsxs47("form", { onSubmit: form.handleSubmit(onSubmit), children: [
5030
+ /* @__PURE__ */ jsx70(
4922
5031
  FormPassword,
4923
5032
  {
4924
5033
  form,
@@ -4927,7 +5036,7 @@ function AcceptInvitation() {
4927
5036
  placeholder: t(`foundations.user.fields.password.placeholder`)
4928
5037
  }
4929
5038
  ),
4930
- /* @__PURE__ */ jsx69(
5039
+ /* @__PURE__ */ jsx70(
4931
5040
  FormPassword,
4932
5041
  {
4933
5042
  form,
@@ -4936,23 +5045,23 @@ function AcceptInvitation() {
4936
5045
  placeholder: t(`foundations.auth.fields.retype_password.placeholder`)
4937
5046
  }
4938
5047
  ),
4939
- /* @__PURE__ */ jsx69(Button, { className: "mt-4 w-full", type: "submit", children: t("foundations.auth.accept_invitation") })
5048
+ /* @__PURE__ */ jsx70(Button, { className: "mt-4 w-full", type: "submit", children: t("foundations.auth.accept_invitation") })
4940
5049
  ] }) }) })
4941
5050
  ] });
4942
5051
  }
4943
5052
  __name(AcceptInvitation, "AcceptInvitation");
4944
5053
 
4945
5054
  // src/features/auth/components/forms/ActivateAccount.tsx
4946
- import { useTranslations as useTranslations28 } from "next-intl";
5055
+ import { useTranslations as useTranslations29 } from "next-intl";
4947
5056
  import Image8 from "next/image";
4948
5057
  import { useEffect as useEffect24, useState as useState25 } from "react";
4949
5058
  import { toast as toast5 } from "sonner";
4950
- import { Fragment as Fragment14, jsx as jsx70, jsxs as jsxs47 } from "react/jsx-runtime";
5059
+ import { Fragment as Fragment15, jsx as jsx71, jsxs as jsxs48 } from "react/jsx-runtime";
4951
5060
  function ActivateAccount() {
4952
5061
  const { setComponentType, params, setParams } = useAuthContext();
4953
5062
  const [showConfirmation, setShowConfirmation] = useState25(false);
4954
5063
  const [error, setError] = useState25(void 0);
4955
- const t = useTranslations28();
5064
+ const t = useTranslations29();
4956
5065
  useEffect24(() => {
4957
5066
  async function ActivateAccount2(code) {
4958
5067
  try {
@@ -4980,15 +5089,15 @@ function ActivateAccount() {
4980
5089
  setError(t(`foundations.auth.errors.invalid_invitation_code`));
4981
5090
  }
4982
5091
  }, []);
4983
- return /* @__PURE__ */ jsxs47(Fragment14, { children: [
4984
- /* @__PURE__ */ jsxs47(CardHeader, { children: [
4985
- /* @__PURE__ */ jsxs47(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
4986
- /* @__PURE__ */ jsx70(Image8, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
5092
+ return /* @__PURE__ */ jsxs48(Fragment15, { children: [
5093
+ /* @__PURE__ */ jsxs48(CardHeader, { children: [
5094
+ /* @__PURE__ */ jsxs48(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5095
+ /* @__PURE__ */ jsx71(Image8, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
4987
5096
  t("foundations.auth.accept_invitation")
4988
5097
  ] }),
4989
- /* @__PURE__ */ jsx70(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx70(Fragment14, { children: t("foundations.auth.errors.activating_account") }) : /* @__PURE__ */ jsx70(Fragment14, { children: " " }) })
5098
+ /* @__PURE__ */ jsx71(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx71(Fragment15, { children: t("foundations.auth.errors.activating_account") }) : /* @__PURE__ */ jsx71(Fragment15, { children: " " }) })
4990
5099
  ] }),
4991
- /* @__PURE__ */ jsx70(CardContent, { children: /* @__PURE__ */ jsx70(CardDescription, { className: "text-center text-xl", children: showConfirmation ? /* @__PURE__ */ jsx70(Fragment14, { children: t("foundations.auth.activation_description") }) : error ? /* @__PURE__ */ jsx70(Fragment14, { children: error }) : /* @__PURE__ */ jsx70(Fragment14, { children: t("foundations.auth.activation_wait") }) }) })
5100
+ /* @__PURE__ */ jsx71(CardContent, { children: /* @__PURE__ */ jsx71(CardDescription, { className: "text-center text-xl", children: showConfirmation ? /* @__PURE__ */ jsx71(Fragment15, { children: t("foundations.auth.activation_description") }) : error ? /* @__PURE__ */ jsx71(Fragment15, { children: error }) : /* @__PURE__ */ jsx71(Fragment15, { children: t("foundations.auth.activation_wait") }) }) })
4992
5101
  ] });
4993
5102
  }
4994
5103
  __name(ActivateAccount, "ActivateAccount");
@@ -5020,14 +5129,14 @@ __name(Cookies, "Cookies");
5020
5129
 
5021
5130
  // src/features/auth/components/forms/ForgotPassword.tsx
5022
5131
  import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
5023
- import { useTranslations as useTranslations29 } from "next-intl";
5132
+ import { useTranslations as useTranslations30 } from "next-intl";
5024
5133
  import Image9 from "next/image";
5025
5134
  import { useState as useState27 } from "react";
5026
5135
  import { useForm as useForm3 } from "react-hook-form";
5027
5136
  import { z as z3 } from "zod";
5028
- import { Fragment as Fragment15, jsx as jsx71, jsxs as jsxs48 } from "react/jsx-runtime";
5137
+ import { Fragment as Fragment16, jsx as jsx72, jsxs as jsxs49 } from "react/jsx-runtime";
5029
5138
  function ForgotPassword() {
5030
- const t = useTranslations29();
5139
+ const t = useTranslations30();
5031
5140
  const { setComponentType } = useAuthContext();
5032
5141
  const [showConfirmation, setShowConfirmation] = useState27(false);
5033
5142
  const formSchema = z3.object({
@@ -5052,17 +5161,17 @@ function ForgotPassword() {
5052
5161
  errorToast({ error: e });
5053
5162
  }
5054
5163
  }, "onSubmit");
5055
- return /* @__PURE__ */ jsxs48(Fragment15, { children: [
5056
- /* @__PURE__ */ jsxs48(CardHeader, { "data-testid": "page-forgot-password-container", children: [
5057
- /* @__PURE__ */ jsxs48(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5058
- /* @__PURE__ */ jsx71(Image9, { src: "/phlow-logo.webp", alt: "Phlows", width: 100, height: 100, priority: true }),
5164
+ return /* @__PURE__ */ jsxs49(Fragment16, { children: [
5165
+ /* @__PURE__ */ jsxs49(CardHeader, { "data-testid": "page-forgot-password-container", children: [
5166
+ /* @__PURE__ */ jsxs49(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5167
+ /* @__PURE__ */ jsx72(Image9, { src: "/phlow-logo.webp", alt: "Phlows", width: 100, height: 100, priority: true }),
5059
5168
  t("foundations.auth.forgot_password")
5060
5169
  ] }),
5061
- /* @__PURE__ */ jsx71(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx71(Fragment15, { children: " " }) : /* @__PURE__ */ jsx71(Fragment15, { children: t(`foundations.auth.add_email_to_reset`) }) })
5170
+ /* @__PURE__ */ jsx72(CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ jsx72(Fragment16, { children: " " }) : /* @__PURE__ */ jsx72(Fragment16, { children: t(`foundations.auth.add_email_to_reset`) }) })
5062
5171
  ] }),
5063
- showConfirmation ? /* @__PURE__ */ jsx71(CardContent, { children: /* @__PURE__ */ jsx71(CardDescription, { className: "text-center text-xl", children: t(`foundations.auth.reset_confirmation`) }) }) : /* @__PURE__ */ jsx71(Form, { ...form, children: /* @__PURE__ */ jsxs48("form", { onSubmit: form.handleSubmit(onSubmit), children: [
5064
- /* @__PURE__ */ jsxs48(CardContent, { children: [
5065
- /* @__PURE__ */ jsx71(
5172
+ showConfirmation ? /* @__PURE__ */ jsx72(CardContent, { children: /* @__PURE__ */ jsx72(CardDescription, { className: "text-center text-xl", children: t(`foundations.auth.reset_confirmation`) }) }) : /* @__PURE__ */ jsx72(Form, { ...form, children: /* @__PURE__ */ jsxs49("form", { onSubmit: form.handleSubmit(onSubmit), children: [
5173
+ /* @__PURE__ */ jsxs49(CardContent, { children: [
5174
+ /* @__PURE__ */ jsx72(
5066
5175
  FormInput,
5067
5176
  {
5068
5177
  form,
@@ -5072,9 +5181,9 @@ function ForgotPassword() {
5072
5181
  testId: "form-forgot-password-input-email"
5073
5182
  }
5074
5183
  ),
5075
- /* @__PURE__ */ jsx71(Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-forgot-password-button-reset", children: t(`foundations.auth.buttons.reset_password`) })
5184
+ /* @__PURE__ */ jsx72(Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-forgot-password-button-reset", children: t(`foundations.auth.buttons.reset_password`) })
5076
5185
  ] }),
5077
- /* @__PURE__ */ jsx71(CardFooter, { className: "flex w-full flex-row justify-between", children: /* @__PURE__ */ jsx71(
5186
+ /* @__PURE__ */ jsx72(CardFooter, { className: "flex w-full flex-row justify-between", children: /* @__PURE__ */ jsx72(
5078
5187
  Link,
5079
5188
  {
5080
5189
  href: "#",
@@ -5091,13 +5200,13 @@ __name(ForgotPassword, "ForgotPassword");
5091
5200
 
5092
5201
  // src/features/auth/components/forms/Login.tsx
5093
5202
  import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
5094
- import { useTranslations as useTranslations30 } from "next-intl";
5203
+ import { useTranslations as useTranslations31 } from "next-intl";
5095
5204
  import Image10 from "next/image";
5096
5205
  import { useForm as useForm4 } from "react-hook-form";
5097
5206
  import { z as z4 } from "zod";
5098
- import { Fragment as Fragment16, jsx as jsx72, jsxs as jsxs49 } from "react/jsx-runtime";
5207
+ import { Fragment as Fragment17, jsx as jsx73, jsxs as jsxs50 } from "react/jsx-runtime";
5099
5208
  function Login() {
5100
- const t = useTranslations30();
5209
+ const t = useTranslations31();
5101
5210
  const { setUser } = useCurrentUserContext();
5102
5211
  const { setComponentType } = useAuthContext();
5103
5212
  const generateUrl = usePageUrlGenerator();
@@ -5130,17 +5239,17 @@ function Login() {
5130
5239
  });
5131
5240
  }
5132
5241
  }, "onSubmit");
5133
- return /* @__PURE__ */ jsxs49(Fragment16, { children: [
5134
- /* @__PURE__ */ jsxs49(CardHeader, { "data-testid": "page-login-container", children: [
5135
- /* @__PURE__ */ jsxs49(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5136
- /* @__PURE__ */ jsx72(Image10, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
5242
+ return /* @__PURE__ */ jsxs50(Fragment17, { children: [
5243
+ /* @__PURE__ */ jsxs50(CardHeader, { "data-testid": "page-login-container", children: [
5244
+ /* @__PURE__ */ jsxs50(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5245
+ /* @__PURE__ */ jsx73(Image10, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
5137
5246
  t("foundations.auth.login")
5138
5247
  ] }),
5139
- /* @__PURE__ */ jsx72(CardDescription, { className: "text-sm", children: t(`foundations.auth.login_description`) })
5248
+ /* @__PURE__ */ jsx73(CardDescription, { className: "text-sm", children: t(`foundations.auth.login_description`) })
5140
5249
  ] }),
5141
- /* @__PURE__ */ jsx72(Form, { ...form, children: /* @__PURE__ */ jsxs49("form", { onSubmit: form.handleSubmit(onSubmit), children: [
5142
- /* @__PURE__ */ jsxs49(CardContent, { children: [
5143
- /* @__PURE__ */ jsx72(
5250
+ /* @__PURE__ */ jsx73(Form, { ...form, children: /* @__PURE__ */ jsxs50("form", { onSubmit: form.handleSubmit(onSubmit), children: [
5251
+ /* @__PURE__ */ jsxs50(CardContent, { children: [
5252
+ /* @__PURE__ */ jsx73(
5144
5253
  FormInput,
5145
5254
  {
5146
5255
  autoFocus: true,
@@ -5151,7 +5260,7 @@ function Login() {
5151
5260
  testId: "form-login-input-email"
5152
5261
  }
5153
5262
  ),
5154
- /* @__PURE__ */ jsx72(
5263
+ /* @__PURE__ */ jsx73(
5155
5264
  FormPassword,
5156
5265
  {
5157
5266
  form,
@@ -5161,10 +5270,10 @@ function Login() {
5161
5270
  testId: "form-login-input-password"
5162
5271
  }
5163
5272
  ),
5164
- /* @__PURE__ */ jsx72(Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-login-button-submit", children: t(`foundations.auth.login`) })
5273
+ /* @__PURE__ */ jsx73(Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-login-button-submit", children: t(`foundations.auth.login`) })
5165
5274
  ] }),
5166
- /* @__PURE__ */ jsxs49(CardFooter, { className: "flex w-full flex-row justify-between", children: [
5167
- /* @__PURE__ */ jsx72(
5275
+ /* @__PURE__ */ jsxs50(CardFooter, { className: "flex w-full flex-row justify-between", children: [
5276
+ /* @__PURE__ */ jsx73(
5168
5277
  Link,
5169
5278
  {
5170
5279
  href: "#",
@@ -5173,7 +5282,7 @@ function Login() {
5173
5282
  children: t(`foundations.auth.register`)
5174
5283
  }
5175
5284
  ),
5176
- /* @__PURE__ */ jsx72(
5285
+ /* @__PURE__ */ jsx73(
5177
5286
  Link,
5178
5287
  {
5179
5288
  href: "#",
@@ -5191,7 +5300,7 @@ __name(Login, "Login");
5191
5300
 
5192
5301
  // src/features/auth/components/forms/Logout.tsx
5193
5302
  import { useEffect as useEffect26 } from "react";
5194
- import { Fragment as Fragment17, jsx as jsx73 } from "react/jsx-runtime";
5303
+ import { Fragment as Fragment18, jsx as jsx74 } from "react/jsx-runtime";
5195
5304
  function Logout() {
5196
5305
  const generateUrl = usePageUrlGenerator();
5197
5306
  useEffect26(() => {
@@ -5201,7 +5310,7 @@ function Logout() {
5201
5310
  }, "logOut");
5202
5311
  logOut();
5203
5312
  }, []);
5204
- return /* @__PURE__ */ jsx73(Fragment17, {});
5313
+ return /* @__PURE__ */ jsx74(Fragment18, {});
5205
5314
  }
5206
5315
  __name(Logout, "Logout");
5207
5316
 
@@ -5238,18 +5347,18 @@ __name(RefreshUser, "RefreshUser");
5238
5347
 
5239
5348
  // src/features/auth/components/forms/ResetPassword.tsx
5240
5349
  import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
5241
- import { useTranslations as useTranslations31 } from "next-intl";
5350
+ import { useTranslations as useTranslations32 } from "next-intl";
5242
5351
  import Image11 from "next/image";
5243
5352
  import { useEffect as useEffect28, useState as useState28 } from "react";
5244
5353
  import { useForm as useForm5 } from "react-hook-form";
5245
5354
  import { toast as toast6 } from "sonner";
5246
5355
  import { z as z5 } from "zod";
5247
- import { Fragment as Fragment18, jsx as jsx74, jsxs as jsxs50 } from "react/jsx-runtime";
5356
+ import { Fragment as Fragment19, jsx as jsx75, jsxs as jsxs51 } from "react/jsx-runtime";
5248
5357
  function ResetPassword() {
5249
5358
  const { setComponentType, params, setParams } = useAuthContext();
5250
5359
  const [showConfirmation, setShowConfirmation] = useState28(false);
5251
5360
  const [error, setError] = useState28(void 0);
5252
- const t = useTranslations31();
5361
+ const t = useTranslations32();
5253
5362
  useEffect28(() => {
5254
5363
  async function validateResetPasswordCode(code) {
5255
5364
  try {
@@ -5307,84 +5416,84 @@ function ResetPassword() {
5307
5416
  errorToast({ title: t(`generic.errors.error`), error });
5308
5417
  }
5309
5418
  }, "onSubmit");
5310
- return /* @__PURE__ */ jsxs50(Fragment18, { children: [
5311
- /* @__PURE__ */ jsxs50(CardHeader, { children: [
5312
- /* @__PURE__ */ jsxs50(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5313
- /* @__PURE__ */ jsx74(Image11, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
5419
+ return /* @__PURE__ */ jsxs51(Fragment19, { children: [
5420
+ /* @__PURE__ */ jsxs51(CardHeader, { children: [
5421
+ /* @__PURE__ */ jsxs51(CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
5422
+ /* @__PURE__ */ jsx75(Image11, { src: "/phlow-logo.webp", alt: "Phlow", width: 100, height: 100, priority: true }),
5314
5423
  t(`foundations.auth.password_reset`)
5315
5424
  ] }),
5316
- /* @__PURE__ */ jsx74(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx74(Fragment18, { children: t(`foundations.auth.errors.password_reset_error`) }) : /* @__PURE__ */ jsx74(Fragment18, { children: t(`foundations.auth.reset_password`) }) })
5425
+ /* @__PURE__ */ jsx75(CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ jsx75(Fragment19, { children: t(`foundations.auth.errors.password_reset_error`) }) : /* @__PURE__ */ jsx75(Fragment19, { children: t(`foundations.auth.reset_password`) }) })
5317
5426
  ] }),
5318
- /* @__PURE__ */ jsx74(CardContent, { children: showConfirmation ? /* @__PURE__ */ jsx74(CardDescription, { className: "text-center text-xl", children: t(`foundations.auth.reset_success_description`) }) : error ? /* @__PURE__ */ jsx74(CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ jsx74(Form, { ...form, children: /* @__PURE__ */ jsxs50("form", { onSubmit: form.handleSubmit(onSubmit), children: [
5319
- /* @__PURE__ */ jsx74(FormPassword, { form, id: "password", name: "Password" }),
5320
- /* @__PURE__ */ jsx74(FormPassword, { form, id: "passwordRetype", name: "Retype Password" }),
5321
- /* @__PURE__ */ jsx74(Button, { className: "mt-4 w-full", type: "submit", children: t(`foundations.auth.buttons.reset_password`) })
5427
+ /* @__PURE__ */ jsx75(CardContent, { children: showConfirmation ? /* @__PURE__ */ jsx75(CardDescription, { className: "text-center text-xl", children: t(`foundations.auth.reset_success_description`) }) : error ? /* @__PURE__ */ jsx75(CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ jsx75(Form, { ...form, children: /* @__PURE__ */ jsxs51("form", { onSubmit: form.handleSubmit(onSubmit), children: [
5428
+ /* @__PURE__ */ jsx75(FormPassword, { form, id: "password", name: "Password" }),
5429
+ /* @__PURE__ */ jsx75(FormPassword, { form, id: "passwordRetype", name: "Retype Password" }),
5430
+ /* @__PURE__ */ jsx75(Button, { className: "mt-4 w-full", type: "submit", children: t(`foundations.auth.buttons.reset_password`) })
5322
5431
  ] }) }) })
5323
5432
  ] });
5324
5433
  }
5325
5434
  __name(ResetPassword, "ResetPassword");
5326
5435
 
5327
5436
  // src/features/company/components/details/CompanyDetails.tsx
5328
- import { useTranslations as useTranslations32 } from "next-intl";
5437
+ import { useTranslations as useTranslations33 } from "next-intl";
5329
5438
  import Image12 from "next/image";
5330
- import { jsx as jsx75, jsxs as jsxs51 } from "react/jsx-runtime";
5439
+ import { jsx as jsx76, jsxs as jsxs52 } from "react/jsx-runtime";
5331
5440
  function CompanyDetails() {
5332
- const t = useTranslations32();
5441
+ const t = useTranslations33();
5333
5442
  const { title } = useSharedContext();
5334
5443
  const generateUrl = usePageUrlGenerator();
5335
5444
  const { company } = useCompanyContext();
5336
5445
  if (!company) return null;
5337
- return /* @__PURE__ */ jsxs51("div", { className: "flex w-full flex-col gap-y-2", children: [
5338
- /* @__PURE__ */ jsx75(ContentTitle, { type: title.type, element: title.element, functions: title.functions }),
5339
- company.logo && /* @__PURE__ */ jsx75(Image12, { src: company.logo, alt: company.name, width: 150, height: 150, className: "mb-4 rounded-md" })
5446
+ return /* @__PURE__ */ jsxs52("div", { className: "flex w-full flex-col gap-y-2", children: [
5447
+ /* @__PURE__ */ jsx76(ContentTitle, { type: title.type, element: title.element, functions: title.functions }),
5448
+ company.logo && /* @__PURE__ */ jsx76(Image12, { src: company.logo, alt: company.name, width: 150, height: 150, className: "mb-4 rounded-md" })
5340
5449
  ] });
5341
5450
  }
5342
5451
  __name(CompanyDetails, "CompanyDetails");
5343
5452
 
5344
5453
  // src/features/company/components/containers/AdminCompanyContainer.tsx
5345
- import { Fragment as Fragment19, jsx as jsx76, jsxs as jsxs52 } from "react/jsx-runtime";
5454
+ import { Fragment as Fragment20, jsx as jsx77, jsxs as jsxs53 } from "react/jsx-runtime";
5346
5455
  function AdminCompanyContainerInternal() {
5347
5456
  const { company } = useCompanyContext();
5348
5457
  const { hasRole } = useCurrentUserContext();
5349
5458
  if (!company || !hasRole(getRoleId().Administrator)) return null;
5350
- return /* @__PURE__ */ jsxs52(Fragment19, { children: [
5351
- /* @__PURE__ */ jsx76(CompanyDetails, {}),
5352
- /* @__PURE__ */ jsx76(AdminUsersList, {})
5459
+ return /* @__PURE__ */ jsxs53(Fragment20, { children: [
5460
+ /* @__PURE__ */ jsx77(CompanyDetails, {}),
5461
+ /* @__PURE__ */ jsx77(AdminUsersList, {})
5353
5462
  ] });
5354
5463
  }
5355
5464
  __name(AdminCompanyContainerInternal, "AdminCompanyContainerInternal");
5356
5465
  function AdminCompanyContainer() {
5357
- return /* @__PURE__ */ jsx76(AdminCompanyContainerInternal, {});
5466
+ return /* @__PURE__ */ jsx77(AdminCompanyContainerInternal, {});
5358
5467
  }
5359
5468
  __name(AdminCompanyContainer, "AdminCompanyContainer");
5360
5469
 
5361
5470
  // src/features/company/components/containers/CompanyContainer.tsx
5362
- import { jsx as jsx77 } from "react/jsx-runtime";
5471
+ import { jsx as jsx78 } from "react/jsx-runtime";
5363
5472
  function CompanyContainer() {
5364
5473
  const { currentUser } = useCurrentUserContext();
5365
5474
  if (!currentUser) return null;
5366
- return /* @__PURE__ */ jsx77(CompanyProvider, { dehydratedCompany: currentUser.company, children: /* @__PURE__ */ jsx77(CompanyDetails, {}) });
5475
+ return /* @__PURE__ */ jsx78(CompanyProvider, { dehydratedCompany: currentUser.company, children: /* @__PURE__ */ jsx78(CompanyDetails, {}) });
5367
5476
  }
5368
5477
  __name(CompanyContainer, "CompanyContainer");
5369
5478
 
5370
5479
  // src/features/company/components/forms/CompanyConfigurationEditor.tsx
5371
5480
  import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
5372
5481
  import { Settings2Icon } from "lucide-react";
5373
- import { useTranslations as useTranslations34 } from "next-intl";
5374
- import { useEffect as useEffect29, useMemo as useMemo13, useState as useState29 } from "react";
5482
+ import { useTranslations as useTranslations35 } from "next-intl";
5483
+ import { useEffect as useEffect29, useMemo as useMemo14, useState as useState29 } from "react";
5375
5484
  import { useForm as useForm6 } from "react-hook-form";
5376
5485
  import { toast as toast7 } from "sonner";
5377
5486
  import z6 from "zod";
5378
5487
 
5379
5488
  // src/features/company/components/forms/CompanyConfigurationSecurityForm.tsx
5380
- import { useTranslations as useTranslations33 } from "next-intl";
5381
- import { jsx as jsx78, jsxs as jsxs53 } from "react/jsx-runtime";
5489
+ import { useTranslations as useTranslations34 } from "next-intl";
5490
+ import { jsx as jsx79, jsxs as jsxs54 } from "react/jsx-runtime";
5382
5491
  var providerConfig = {
5383
5492
  fields: ["isManagedKnowledge", "allowPublicBot"],
5384
5493
  defaults: {}
5385
5494
  };
5386
5495
  function CompanyConfigurationSecurityForm({ form }) {
5387
- const t = useTranslations33();
5496
+ const t = useTranslations34();
5388
5497
  const renderProviderFields = /* @__PURE__ */ __name(() => {
5389
5498
  const config = providerConfig;
5390
5499
  if (!config) return null;
@@ -5405,13 +5514,13 @@ function CompanyConfigurationSecurityForm({ form }) {
5405
5514
  type = "checkbox";
5406
5515
  break;
5407
5516
  }
5408
- return /* @__PURE__ */ jsx78(
5517
+ return /* @__PURE__ */ jsx79(
5409
5518
  FormField,
5410
5519
  {
5411
5520
  control: form.control,
5412
5521
  name: currentField,
5413
- render: ({ field: formField }) => type === "checkbox" ? /* @__PURE__ */ jsxs53(FormItem, { className: "flex items-start space-x-4", children: [
5414
- /* @__PURE__ */ jsx78(FormControl, { children: /* @__PURE__ */ jsx78(
5522
+ render: ({ field: formField }) => type === "checkbox" ? /* @__PURE__ */ jsxs54(FormItem, { className: "flex items-start space-x-4", children: [
5523
+ /* @__PURE__ */ jsx79(FormControl, { children: /* @__PURE__ */ jsx79(
5415
5524
  Checkbox,
5416
5525
  {
5417
5526
  id: currentField,
@@ -5421,41 +5530,41 @@ function CompanyConfigurationSecurityForm({ form }) {
5421
5530
  }
5422
5531
  }
5423
5532
  ) }),
5424
- /* @__PURE__ */ jsxs53("div", { className: "grid gap-2", children: [
5425
- /* @__PURE__ */ jsxs53(FormLabel, { htmlFor: currentField, children: [
5533
+ /* @__PURE__ */ jsxs54("div", { className: "grid gap-2", children: [
5534
+ /* @__PURE__ */ jsxs54(FormLabel, { htmlFor: currentField, children: [
5426
5535
  label,
5427
5536
  " ",
5428
- isRequired && /* @__PURE__ */ jsx78("span", { className: "text-destructive", children: "*" })
5537
+ isRequired && /* @__PURE__ */ jsx79("span", { className: "text-destructive", children: "*" })
5429
5538
  ] }),
5430
- /* @__PURE__ */ jsx78("p", { className: "text-muted-foreground text-sm", children: placeholder })
5539
+ /* @__PURE__ */ jsx79("p", { className: "text-muted-foreground text-sm", children: placeholder })
5431
5540
  ] }),
5432
- /* @__PURE__ */ jsx78(FormLabel, {}),
5433
- /* @__PURE__ */ jsx78(FormMessage, {})
5434
- ] }) : /* @__PURE__ */ jsxs53(FormItem, { children: [
5435
- /* @__PURE__ */ jsxs53(FormLabel, { children: [
5541
+ /* @__PURE__ */ jsx79(FormLabel, {}),
5542
+ /* @__PURE__ */ jsx79(FormMessage, {})
5543
+ ] }) : /* @__PURE__ */ jsxs54(FormItem, { children: [
5544
+ /* @__PURE__ */ jsxs54(FormLabel, { children: [
5436
5545
  label,
5437
5546
  " ",
5438
- isRequired && /* @__PURE__ */ jsx78("span", { className: "text-destructive", children: "*" })
5547
+ isRequired && /* @__PURE__ */ jsx79("span", { className: "text-destructive", children: "*" })
5439
5548
  ] }),
5440
- /* @__PURE__ */ jsx78(FormControl, { children: /* @__PURE__ */ jsx78(Input, { type, placeholder, ...formField }) }),
5441
- /* @__PURE__ */ jsx78(FormMessage, {})
5549
+ /* @__PURE__ */ jsx79(FormControl, { children: /* @__PURE__ */ jsx79(Input, { type, placeholder, ...formField }) }),
5550
+ /* @__PURE__ */ jsx79(FormMessage, {})
5442
5551
  ] })
5443
5552
  },
5444
5553
  currentField
5445
5554
  );
5446
5555
  });
5447
5556
  }, "renderProviderFields");
5448
- return /* @__PURE__ */ jsx78("div", { className: "space-y-4", children: /* @__PURE__ */ jsx78("div", { className: "space-y-4 border-t pt-4", children: renderProviderFields() }) });
5557
+ return /* @__PURE__ */ jsx79("div", { className: "space-y-4", children: /* @__PURE__ */ jsx79("div", { className: "space-y-4 border-t pt-4", children: renderProviderFields() }) });
5449
5558
  }
5450
5559
  __name(CompanyConfigurationSecurityForm, "CompanyConfigurationSecurityForm");
5451
5560
 
5452
5561
  // src/features/company/components/forms/CompanyConfigurationEditor.tsx
5453
- import { jsx as jsx79, jsxs as jsxs54 } from "react/jsx-runtime";
5562
+ import { jsx as jsx80, jsxs as jsxs55 } from "react/jsx-runtime";
5454
5563
  function CompanyConfigurationEditorInternal({ company }) {
5455
5564
  const [open, setOpen] = useState29(false);
5456
- const t = useTranslations34();
5565
+ const t = useTranslations35();
5457
5566
  const { setUser } = useCurrentUserContext();
5458
- const defaultValues = useMemo13(() => {
5567
+ const defaultValues = useMemo14(() => {
5459
5568
  return {
5460
5569
  isManagedKnowledge: company.configurations?.isManagedKnowledge ?? false,
5461
5570
  allowPublicBot: company.configurations?.allowPublicBot ?? false
@@ -5507,20 +5616,20 @@ function CompanyConfigurationEditorInternal({ company }) {
5507
5616
  });
5508
5617
  }
5509
5618
  }, "onSubmit");
5510
- return /* @__PURE__ */ jsxs54(Dialog, { open, onOpenChange: setOpen, children: [
5511
- /* @__PURE__ */ jsx79(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx79(Button, { size: "sm", variant: `ghost`, className: "cursor-pointer", children: /* @__PURE__ */ jsx79(Settings2Icon, { className: "h-3.5 w-3.5" }) }) }),
5512
- /* @__PURE__ */ jsxs54(DialogContent, { className: `flex max-h-[70vh] max-w-4xl flex-col overflow-y-auto`, children: [
5513
- /* @__PURE__ */ jsxs54(DialogHeader, { children: [
5514
- /* @__PURE__ */ jsx79(DialogTitle, { children: t(`types.configurations`, { count: 2 }) }),
5515
- /* @__PURE__ */ jsx79(DialogDescription, { className: "text-destructive", children: t(`features.configuration.warning_description`) })
5619
+ return /* @__PURE__ */ jsxs55(Dialog, { open, onOpenChange: setOpen, children: [
5620
+ /* @__PURE__ */ jsx80(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx80(Button, { size: "sm", variant: `ghost`, className: "cursor-pointer", children: /* @__PURE__ */ jsx80(Settings2Icon, { className: "h-3.5 w-3.5" }) }) }),
5621
+ /* @__PURE__ */ jsxs55(DialogContent, { className: `flex max-h-[70vh] max-w-4xl flex-col overflow-y-auto`, children: [
5622
+ /* @__PURE__ */ jsxs55(DialogHeader, { children: [
5623
+ /* @__PURE__ */ jsx80(DialogTitle, { children: t(`types.configurations`, { count: 2 }) }),
5624
+ /* @__PURE__ */ jsx80(DialogDescription, { className: "text-destructive", children: t(`features.configuration.warning_description`) })
5516
5625
  ] }),
5517
- /* @__PURE__ */ jsx79(Form, { ...form, children: /* @__PURE__ */ jsxs54("form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
5518
- /* @__PURE__ */ jsx79("div", { className: `flex flex-row gap-x-4`, children: /* @__PURE__ */ jsx79("div", { className: `flex w-full flex-col justify-start gap-y-4`, children: /* @__PURE__ */ jsxs54(Tabs, { defaultValue: process.env.NEXT_PUBLIC_PRIVATE_INSTALLATION ? "security" : "ai", children: [
5519
- /* @__PURE__ */ jsx79(TabsList, { children: /* @__PURE__ */ jsx79(TabsTrigger, { value: "security", children: "Privacy & Security" }) }),
5520
- /* @__PURE__ */ jsx79(TabsContent, { value: "features", children: /* @__PURE__ */ jsx79("div", { className: "space-y-4", children: /* @__PURE__ */ jsx79("p", { className: "text-muted-foreground text-sm", children: "Feature configuration will be implemented in future updates." }) }) }),
5521
- /* @__PURE__ */ jsx79(TabsContent, { value: "security", children: /* @__PURE__ */ jsx79(CompanyConfigurationSecurityForm, { form }) })
5626
+ /* @__PURE__ */ jsx80(Form, { ...form, children: /* @__PURE__ */ jsxs55("form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
5627
+ /* @__PURE__ */ jsx80("div", { className: `flex flex-row gap-x-4`, children: /* @__PURE__ */ jsx80("div", { className: `flex w-full flex-col justify-start gap-y-4`, children: /* @__PURE__ */ jsxs55(Tabs, { defaultValue: process.env.NEXT_PUBLIC_PRIVATE_INSTALLATION ? "security" : "ai", children: [
5628
+ /* @__PURE__ */ jsx80(TabsList, { children: /* @__PURE__ */ jsx80(TabsTrigger, { value: "security", children: "Privacy & Security" }) }),
5629
+ /* @__PURE__ */ jsx80(TabsContent, { value: "features", children: /* @__PURE__ */ jsx80("div", { className: "space-y-4", children: /* @__PURE__ */ jsx80("p", { className: "text-muted-foreground text-sm", children: "Feature configuration will be implemented in future updates." }) }) }),
5630
+ /* @__PURE__ */ jsx80(TabsContent, { value: "security", children: /* @__PURE__ */ jsx80(CompanyConfigurationSecurityForm, { form }) })
5522
5631
  ] }) }) }),
5523
- /* @__PURE__ */ jsx79(CommonEditorButtons, { form, setOpen, isEdit: true })
5632
+ /* @__PURE__ */ jsx80(CommonEditorButtons, { form, setOpen, isEdit: true })
5524
5633
  ] }) })
5525
5634
  ] })
5526
5635
  ] });
@@ -5528,18 +5637,18 @@ function CompanyConfigurationEditorInternal({ company }) {
5528
5637
  __name(CompanyConfigurationEditorInternal, "CompanyConfigurationEditorInternal");
5529
5638
  function CompanyConfigurationEditor(props) {
5530
5639
  const { hasRole } = useCurrentUserContext();
5531
- if (hasRole(getRoleId().Administrator)) return /* @__PURE__ */ jsx79(CompanyConfigurationEditorInternal, { ...props });
5532
- return /* @__PURE__ */ jsx79(CompanyConfigurationEditorInternal, { ...props });
5640
+ if (hasRole(getRoleId().Administrator)) return /* @__PURE__ */ jsx80(CompanyConfigurationEditorInternal, { ...props });
5641
+ return /* @__PURE__ */ jsx80(CompanyConfigurationEditorInternal, { ...props });
5533
5642
  }
5534
5643
  __name(CompanyConfigurationEditor, "CompanyConfigurationEditor");
5535
5644
 
5536
5645
  // src/features/company/components/forms/CompanyDeleter.tsx
5537
5646
  import { LoaderCircleIcon as LoaderCircleIcon2, Trash2Icon as Trash2Icon2 } from "lucide-react";
5538
- import { useTranslations as useTranslations35 } from "next-intl";
5647
+ import { useTranslations as useTranslations36 } from "next-intl";
5539
5648
  import { useState as useState30 } from "react";
5540
- import { Fragment as Fragment20, jsx as jsx80, jsxs as jsxs55 } from "react/jsx-runtime";
5649
+ import { Fragment as Fragment21, jsx as jsx81, jsxs as jsxs56 } from "react/jsx-runtime";
5541
5650
  function CompanyDeleterInternal({ company }) {
5542
- const t = useTranslations35();
5651
+ const t = useTranslations36();
5543
5652
  const router = useI18nRouter();
5544
5653
  const [open, setOpen] = useState30(false);
5545
5654
  const [isDeleting, setIsDeleting] = useState30(false);
@@ -5554,25 +5663,25 @@ function CompanyDeleterInternal({ company }) {
5554
5663
  }
5555
5664
  setIsDeleting(false);
5556
5665
  }, "handleDelete");
5557
- return /* @__PURE__ */ jsxs55(AlertDialog, { open, onOpenChange: setOpen, children: [
5558
- /* @__PURE__ */ jsx80(AlertDialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs55(Button, { size: "sm", variant: "destructive", children: [
5559
- /* @__PURE__ */ jsx80(Trash2Icon2, { className: "mr-3 h-3.5 w-3.5" }),
5666
+ return /* @__PURE__ */ jsxs56(AlertDialog, { open, onOpenChange: setOpen, children: [
5667
+ /* @__PURE__ */ jsx81(AlertDialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs56(Button, { size: "sm", variant: "destructive", children: [
5668
+ /* @__PURE__ */ jsx81(Trash2Icon2, { className: "mr-3 h-3.5 w-3.5" }),
5560
5669
  t(`generic.buttons.delete`)
5561
5670
  ] }) }),
5562
- /* @__PURE__ */ jsxs55(AlertDialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
5563
- /* @__PURE__ */ jsxs55(AlertDialogHeader, { children: [
5564
- /* @__PURE__ */ jsx80(AlertDialogTitle, { children: t(`generic.delete.title`, { type: t(`types.companies`, { count: 1 }) }) }),
5565
- /* @__PURE__ */ jsx80(AlertDialogDescription, { children: t(`generic.delete.subtitle`, { type: t(`types.companies`, { count: 1 }) }) })
5671
+ /* @__PURE__ */ jsxs56(AlertDialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
5672
+ /* @__PURE__ */ jsxs56(AlertDialogHeader, { children: [
5673
+ /* @__PURE__ */ jsx81(AlertDialogTitle, { children: t(`generic.delete.title`, { type: t(`types.companies`, { count: 1 }) }) }),
5674
+ /* @__PURE__ */ jsx81(AlertDialogDescription, { children: t(`generic.delete.subtitle`, { type: t(`types.companies`, { count: 1 }) }) })
5566
5675
  ] }),
5567
- /* @__PURE__ */ jsx80("div", { className: "text-destructive p-4 text-sm", children: t(`generic.delete.description`, { type: t(`types.companies`, { count: 1 }) }) }),
5568
- /* @__PURE__ */ jsxs55("div", { className: "flex w-full flex-col gap-y-2", children: [
5569
- /* @__PURE__ */ jsx80("div", { children: t(`generic.delete.confirmation`, { type: t(`types.companies`, { count: 1 }) }) }),
5570
- /* @__PURE__ */ jsxs55("div", { className: "flex w-full flex-col", children: [
5571
- /* @__PURE__ */ jsxs55(Label, { className: "flex items-center", children: [
5676
+ /* @__PURE__ */ jsx81("div", { className: "text-destructive p-4 text-sm", children: t(`generic.delete.description`, { type: t(`types.companies`, { count: 1 }) }) }),
5677
+ /* @__PURE__ */ jsxs56("div", { className: "flex w-full flex-col gap-y-2", children: [
5678
+ /* @__PURE__ */ jsx81("div", { children: t(`generic.delete.confirmation`, { type: t(`types.companies`, { count: 1 }) }) }),
5679
+ /* @__PURE__ */ jsxs56("div", { className: "flex w-full flex-col", children: [
5680
+ /* @__PURE__ */ jsxs56(Label, { className: "flex items-center", children: [
5572
5681
  t(`foundations.company.fields.name.label`),
5573
- /* @__PURE__ */ jsx80("span", { className: "text-destructive ml-2 font-semibold", children: "*" })
5682
+ /* @__PURE__ */ jsx81("span", { className: "text-destructive ml-2 font-semibold", children: "*" })
5574
5683
  ] }),
5575
- /* @__PURE__ */ jsx80(
5684
+ /* @__PURE__ */ jsx81(
5576
5685
  Input,
5577
5686
  {
5578
5687
  className: `w-full`,
@@ -5582,8 +5691,8 @@ function CompanyDeleterInternal({ company }) {
5582
5691
  )
5583
5692
  ] })
5584
5693
  ] }),
5585
- /* @__PURE__ */ jsxs55("div", { className: "flex justify-end", children: [
5586
- /* @__PURE__ */ jsx80(
5694
+ /* @__PURE__ */ jsxs56("div", { className: "flex justify-end", children: [
5695
+ /* @__PURE__ */ jsx81(
5587
5696
  Button,
5588
5697
  {
5589
5698
  className: "mr-2",
@@ -5594,7 +5703,7 @@ function CompanyDeleterInternal({ company }) {
5594
5703
  children: t(`generic.buttons.cancel`)
5595
5704
  }
5596
5705
  ),
5597
- /* @__PURE__ */ jsx80(
5706
+ /* @__PURE__ */ jsx81(
5598
5707
  Button,
5599
5708
  {
5600
5709
  type: "submit",
@@ -5604,9 +5713,9 @@ function CompanyDeleterInternal({ company }) {
5604
5713
  },
5605
5714
  variant: "destructive",
5606
5715
  disabled: company.name !== companyName || isDeleting,
5607
- children: isDeleting ? /* @__PURE__ */ jsxs55(Fragment20, { children: [
5716
+ children: isDeleting ? /* @__PURE__ */ jsxs56(Fragment21, { children: [
5608
5717
  t(`generic.buttons.is_deleting`),
5609
- /* @__PURE__ */ jsx80(LoaderCircleIcon2, { className: "animate-spin-slow h-5 w-5" })
5718
+ /* @__PURE__ */ jsx81(LoaderCircleIcon2, { className: "animate-spin-slow h-5 w-5" })
5610
5719
  ] }) : t(`generic.buttons.delete`)
5611
5720
  }
5612
5721
  )
@@ -5619,7 +5728,7 @@ function CompanyDeleter({ company }) {
5619
5728
  const { hasPermissionToModule, hasRole } = useCurrentUserContext();
5620
5729
  if (!hasRole(getRoleId().Administrator) && !hasPermissionToModule({ module: Modules.Company, action: "delete" /* Delete */ }))
5621
5730
  return null;
5622
- return /* @__PURE__ */ jsx80(CompanyDeleterInternal, { company });
5731
+ return /* @__PURE__ */ jsx81(CompanyDeleterInternal, { company });
5623
5732
  }
5624
5733
  __name(CompanyDeleter, "CompanyDeleter");
5625
5734
 
@@ -5627,13 +5736,13 @@ __name(CompanyDeleter, "CompanyDeleter");
5627
5736
  import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
5628
5737
  import { setCookie } from "cookies-next";
5629
5738
  import { UploadIcon as UploadIcon2 } from "lucide-react";
5630
- import { useTranslations as useTranslations36 } from "next-intl";
5739
+ import { useTranslations as useTranslations37 } from "next-intl";
5631
5740
  import Image13 from "next/image";
5632
5741
  import { useEffect as useEffect30, useState as useState31 } from "react";
5633
5742
  import { useForm as useForm7 } from "react-hook-form";
5634
5743
  import { v4 as v43 } from "uuid";
5635
5744
  import { z as z7 } from "zod";
5636
- import { Fragment as Fragment21, jsx as jsx81, jsxs as jsxs56 } from "react/jsx-runtime";
5745
+ import { Fragment as Fragment22, jsx as jsx82, jsxs as jsxs57 } from "react/jsx-runtime";
5637
5746
  function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
5638
5747
  const { hasRole } = useCurrentUserContext();
5639
5748
  const router = useI18nRouter();
@@ -5642,7 +5751,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
5642
5751
  const [file, setFile] = useState31(null);
5643
5752
  const [files, setFiles] = useState31(null);
5644
5753
  const [contentType, setContentType] = useState31(null);
5645
- const t = useTranslations36();
5754
+ const t = useTranslations37();
5646
5755
  const generateUrl = usePageUrlGenerator();
5647
5756
  const formSchema = z7.object({
5648
5757
  id: z7.uuidv4(),
@@ -5748,17 +5857,17 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
5748
5857
  };
5749
5858
  const canAccessFeatures = hasRole(getRoleId().Administrator) || hasRole(getRoleId().CompanyAdministrator) && process.env.NEXT_PUBLIC_PRIVATE_INSTALLATION?.toLowerCase() === "true";
5750
5859
  const isAdministrator = hasRole(getRoleId().Administrator);
5751
- return /* @__PURE__ */ jsxs56(Dialog, { open, onOpenChange: setOpen, children: [
5752
- /* @__PURE__ */ jsx81(CommonEditorTrigger, { isEdit: !!company }),
5753
- /* @__PURE__ */ jsxs56(
5860
+ return /* @__PURE__ */ jsxs57(Dialog, { open, onOpenChange: setOpen, children: [
5861
+ /* @__PURE__ */ jsx82(CommonEditorTrigger, { isEdit: !!company }),
5862
+ /* @__PURE__ */ jsxs57(
5754
5863
  DialogContent,
5755
5864
  {
5756
5865
  className: `flex max-h-[70vh] w-full ${isAdministrator || canAccessFeatures ? `max-w-5xl` : `max-w-4xl`} flex-col overflow-y-auto`,
5757
5866
  children: [
5758
- /* @__PURE__ */ jsx81(CommonEditorHeader, { type: t(`types.companies`, { count: 1 }), name: company?.name }),
5759
- /* @__PURE__ */ jsx81(Form, { ...form, children: /* @__PURE__ */ jsxs56("form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
5760
- /* @__PURE__ */ jsxs56("div", { className: "flex w-full items-start justify-between gap-x-4", children: [
5761
- /* @__PURE__ */ jsx81("div", { className: `flex w-96 flex-col justify-start gap-y-4`, children: /* @__PURE__ */ jsx81(FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ jsx81(FileInput, { className: "text-neutral-300 outline-dashed", children: /* @__PURE__ */ jsx81("div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ jsx81("div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || company?.logo ? /* @__PURE__ */ jsx81(
5867
+ /* @__PURE__ */ jsx82(CommonEditorHeader, { type: t(`types.companies`, { count: 1 }), name: company?.name }),
5868
+ /* @__PURE__ */ jsx82(Form, { ...form, children: /* @__PURE__ */ jsxs57("form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
5869
+ /* @__PURE__ */ jsxs57("div", { className: "flex w-full items-start justify-between gap-x-4", children: [
5870
+ /* @__PURE__ */ jsx82("div", { className: `flex w-96 flex-col justify-start gap-y-4`, children: /* @__PURE__ */ jsx82(FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ jsx82(FileInput, { className: "text-neutral-300 outline-dashed", children: /* @__PURE__ */ jsx82("div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ jsx82("div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || company?.logo ? /* @__PURE__ */ jsx82(
5762
5871
  Image13,
5763
5872
  {
5764
5873
  src: file ? URL.createObjectURL(file) : company?.logo || "",
@@ -5766,11 +5875,11 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
5766
5875
  width: 200,
5767
5876
  height: 200
5768
5877
  }
5769
- ) : /* @__PURE__ */ jsxs56(Fragment21, { children: [
5770
- /* @__PURE__ */ jsx81(UploadIcon2, { className: "my-4 h-8 w-8" }),
5771
- /* @__PURE__ */ jsx81("p", { className: "mb-1 flex w-full text-center text-sm", children: t(`foundations.company.click_drag_logo`) })
5878
+ ) : /* @__PURE__ */ jsxs57(Fragment22, { children: [
5879
+ /* @__PURE__ */ jsx82(UploadIcon2, { className: "my-4 h-8 w-8" }),
5880
+ /* @__PURE__ */ jsx82("p", { className: "mb-1 flex w-full text-center text-sm", children: t(`foundations.company.click_drag_logo`) })
5772
5881
  ] }) }) }) }) }) }),
5773
- /* @__PURE__ */ jsx81("div", { className: `flex w-full flex-col justify-start gap-y-4`, children: /* @__PURE__ */ jsx81(
5882
+ /* @__PURE__ */ jsx82("div", { className: `flex w-full flex-col justify-start gap-y-4`, children: /* @__PURE__ */ jsx82(
5774
5883
  FormInput,
5775
5884
  {
5776
5885
  form,
@@ -5779,7 +5888,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
5779
5888
  placeholder: t(`foundations.company.fields.name.placeholder`)
5780
5889
  }
5781
5890
  ) }),
5782
- canAccessFeatures && /* @__PURE__ */ jsx81("div", { className: `flex w-96 flex-col justify-start gap-y-4`, children: /* @__PURE__ */ jsx81(ScrollArea, { className: "h-max", children: /* @__PURE__ */ jsx81(
5891
+ canAccessFeatures && /* @__PURE__ */ jsx82("div", { className: `flex w-96 flex-col justify-start gap-y-4`, children: /* @__PURE__ */ jsx82(ScrollArea, { className: "h-max", children: /* @__PURE__ */ jsx82(
5783
5892
  FormFeatures,
5784
5893
  {
5785
5894
  form,
@@ -5788,7 +5897,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
5788
5897
  }
5789
5898
  ) }) })
5790
5899
  ] }),
5791
- /* @__PURE__ */ jsx81(CommonEditorButtons, { form, setOpen, isEdit: !!company })
5900
+ /* @__PURE__ */ jsx82(CommonEditorButtons, { form, setOpen, isEdit: !!company })
5792
5901
  ] }) })
5793
5902
  ]
5794
5903
  }
@@ -5797,7 +5906,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
5797
5906
  }
5798
5907
  __name(CompanyEditorInternal, "CompanyEditorInternal");
5799
5908
  function CompanyEditor(props) {
5800
- return /* @__PURE__ */ jsx81(CompanyEditorInternal, { ...props });
5909
+ return /* @__PURE__ */ jsx82(CompanyEditorInternal, { ...props });
5801
5910
  }
5802
5911
  __name(CompanyEditor, "CompanyEditor");
5803
5912
 
@@ -5805,25 +5914,25 @@ __name(CompanyEditor, "CompanyEditor");
5805
5914
  import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
5806
5915
  import { deleteCookie as deleteCookie2 } from "cookies-next";
5807
5916
  import { ClipboardIcon } from "lucide-react";
5808
- import { useTranslations as useTranslations37 } from "next-intl";
5917
+ import { useTranslations as useTranslations38 } from "next-intl";
5809
5918
  import Image14 from "next/image";
5810
5919
  import { useForm as useForm8 } from "react-hook-form";
5811
5920
  import { toast as toast8 } from "sonner";
5812
5921
  import z8 from "zod";
5813
- import { Fragment as Fragment22, jsx as jsx82, jsxs as jsxs57 } from "react/jsx-runtime";
5922
+ import { Fragment as Fragment23, jsx as jsx83, jsxs as jsxs58 } from "react/jsx-runtime";
5814
5923
 
5815
5924
  // src/features/company/components/lists/CompaniesList.tsx
5816
- import { useTranslations as useTranslations38 } from "next-intl";
5817
- import { jsx as jsx83 } from "react/jsx-runtime";
5925
+ import { useTranslations as useTranslations39 } from "next-intl";
5926
+ import { jsx as jsx84 } from "react/jsx-runtime";
5818
5927
  function CompaniesList() {
5819
- const t = useTranslations38();
5928
+ const t = useTranslations39();
5820
5929
  const data = useDataListRetriever({
5821
5930
  retriever: /* @__PURE__ */ __name((params) => CompanyService.findMany(params), "retriever"),
5822
5931
  retrieverParams: {},
5823
5932
  module: Modules.Company
5824
5933
  });
5825
- const functions = [/* @__PURE__ */ jsx83(CompanyEditor, {}, "create-account")];
5826
- return /* @__PURE__ */ jsx83(
5934
+ const functions = [/* @__PURE__ */ jsx84(CompanyEditor, {}, "create-account")];
5935
+ return /* @__PURE__ */ jsx84(
5827
5936
  ContentListTable,
5828
5937
  {
5829
5938
  data,
@@ -5836,9 +5945,84 @@ function CompaniesList() {
5836
5945
  }
5837
5946
  __name(CompaniesList, "CompaniesList");
5838
5947
 
5948
+ // src/features/content/components/lists/ContentsList.tsx
5949
+ import { useTranslations as useTranslations40 } from "next-intl";
5950
+ import { jsx as jsx85, jsxs as jsxs59 } from "react/jsx-runtime";
5951
+ function ContentsList({ contentList }) {
5952
+ const t = useTranslations40();
5953
+ return /* @__PURE__ */ jsxs59("div", { className: "flex min-h-0 w-full flex-col overflow-y-auto", children: [
5954
+ /* @__PURE__ */ jsx85("h2", { className: "text-xl font-semibold", children: t(`foundations.content.news`) }),
5955
+ /* @__PURE__ */ jsx85("div", { className: "flex flex-col", children: contentList.map((content) => /* @__PURE__ */ jsx85(ContentsListElement, { content }, content.id)) })
5956
+ ] });
5957
+ }
5958
+ __name(ContentsList, "ContentsList");
5959
+ function ContentsListElement({ content }) {
5960
+ const generateUrl = usePageUrlGenerator();
5961
+ const contentModule = content.contentType ? Modules.findByModelName(content.contentType) : void 0;
5962
+ const link = contentModule ? generateUrl({ page: contentModule, id: content.id }) : "#";
5963
+ return /* @__PURE__ */ jsx85("div", { className: "hover:bg-muted flex w-full flex-col gap-y-2 border-b p-2 py-4", children: /* @__PURE__ */ jsxs59("div", { className: "flex w-full justify-between gap-x-2", children: [
5964
+ /* @__PURE__ */ jsxs59(HoverCard, { children: [
5965
+ /* @__PURE__ */ jsx85(HoverCardTrigger, { asChild: true, children: /* @__PURE__ */ jsxs59(Link, { href: link, className: "flex w-full items-center justify-start gap-2 font-semibold", children: [
5966
+ contentModule && getIconByModule({ module: contentModule, className: "h-4 w-4" }),
5967
+ content.name
5968
+ ] }) }),
5969
+ /* @__PURE__ */ jsxs59(HoverCardContent, { className: "flex max-h-96 w-96 flex-col gap-y-4 overflow-y-auto", children: [
5970
+ /* @__PURE__ */ jsx85(Link, { href: link, className: "font-semibold", children: content.name }),
5971
+ /* @__PURE__ */ jsx85("div", { className: "text-xs", children: content.abstract })
5972
+ ] })
5973
+ ] }),
5974
+ /* @__PURE__ */ jsx85(ContributorsList, { content })
5975
+ ] }) });
5976
+ }
5977
+ __name(ContentsListElement, "ContentsListElement");
5978
+
5979
+ // src/features/content/components/lists/ContentsListById.tsx
5980
+ import { useTranslations as useTranslations41 } from "next-intl";
5981
+ import { jsx as jsx86 } from "react/jsx-runtime";
5982
+ function ContentsListById({ contentIds }) {
5983
+ const t = useTranslations41();
5984
+ const data = useDataListRetriever({
5985
+ module: Modules.Content,
5986
+ retriever: /* @__PURE__ */ __name((params) => ContentService.findMany(params), "retriever"),
5987
+ retrieverParams: { contentIds }
5988
+ });
5989
+ return /* @__PURE__ */ jsx86(
5990
+ ContentListTable,
5991
+ {
5992
+ data,
5993
+ fields: ["name" /* name */, "authors" /* authors */, "updatedAt" /* updatedAt */],
5994
+ tableGeneratorType: Modules.Content,
5995
+ title: t(`generic.relevant`)
5996
+ }
5997
+ );
5998
+ }
5999
+ __name(ContentsListById, "ContentsListById");
6000
+
6001
+ // src/features/content/components/lists/RelevantContentsList.tsx
6002
+ import { useTranslations as useTranslations42 } from "next-intl";
6003
+ import { jsx as jsx87 } from "react/jsx-runtime";
6004
+ function RelevantContentsList({ id }) {
6005
+ const t = useTranslations42();
6006
+ const data = useDataListRetriever({
6007
+ module: Modules.Content,
6008
+ retriever: /* @__PURE__ */ __name((params) => ContentService.findRelevant(params), "retriever"),
6009
+ retrieverParams: { id }
6010
+ });
6011
+ return /* @__PURE__ */ jsx87(
6012
+ ContentListTable,
6013
+ {
6014
+ data,
6015
+ fields: ["name" /* name */, "authors" /* authors */, "relevance" /* relevance */, "updatedAt" /* updatedAt */],
6016
+ tableGeneratorType: Modules.Content,
6017
+ title: t(`generic.relevant`)
6018
+ }
6019
+ );
6020
+ }
6021
+ __name(RelevantContentsList, "RelevantContentsList");
6022
+
5839
6023
  // src/features/notification/components/common/NotificationErrorBoundary.tsx
5840
6024
  import { Component } from "react";
5841
- import { jsx as jsx84, jsxs as jsxs58 } from "react/jsx-runtime";
6025
+ import { jsx as jsx88, jsxs as jsxs60 } from "react/jsx-runtime";
5842
6026
  var NotificationErrorBoundary = class extends Component {
5843
6027
  static {
5844
6028
  __name(this, "NotificationErrorBoundary");
@@ -5855,9 +6039,9 @@ var NotificationErrorBoundary = class extends Component {
5855
6039
  }
5856
6040
  render() {
5857
6041
  if (this.state.hasError) {
5858
- return this.props.fallback || /* @__PURE__ */ jsx84("div", { className: "flex items-center justify-center p-4 text-center", children: /* @__PURE__ */ jsxs58("div", { className: "text-muted-foreground text-sm", children: [
5859
- /* @__PURE__ */ jsx84("p", { children: "Something went wrong with notifications." }),
5860
- /* @__PURE__ */ jsx84(
6042
+ return this.props.fallback || /* @__PURE__ */ jsx88("div", { className: "flex items-center justify-center p-4 text-center", children: /* @__PURE__ */ jsxs60("div", { className: "text-muted-foreground text-sm", children: [
6043
+ /* @__PURE__ */ jsx88("p", { children: "Something went wrong with notifications." }),
6044
+ /* @__PURE__ */ jsx88(
5861
6045
  "button",
5862
6046
  {
5863
6047
  onClick: () => this.setState({ hasError: false }),
@@ -5872,16 +6056,16 @@ var NotificationErrorBoundary = class extends Component {
5872
6056
  };
5873
6057
 
5874
6058
  // src/features/notification/components/containers/NotificationsListContainer.tsx
5875
- import { useTranslations as useTranslations42 } from "next-intl";
6059
+ import { useTranslations as useTranslations46 } from "next-intl";
5876
6060
 
5877
6061
  // src/features/notification/contexts/NotificationContext.tsx
5878
- import { useTranslations as useTranslations40 } from "next-intl";
6062
+ import { useTranslations as useTranslations44 } from "next-intl";
5879
6063
  import { createContext as createContext6, useCallback as useCallback11, useContext as useContext6, useState as useState33 } from "react";
5880
6064
 
5881
6065
  // src/features/notification/components/notifications/Notification.tsx
5882
- import { useTranslations as useTranslations39 } from "next-intl";
6066
+ import { useTranslations as useTranslations43 } from "next-intl";
5883
6067
  import { useEffect as useEffect31, useState as useState32 } from "react";
5884
- import { jsx as jsx85, jsxs as jsxs59 } from "react/jsx-runtime";
6068
+ import { jsx as jsx89, jsxs as jsxs61 } from "react/jsx-runtime";
5885
6069
  var generateNotificationData = /* @__PURE__ */ __name((params) => {
5886
6070
  const response = {};
5887
6071
  response.actor = params.notification.actor;
@@ -5891,15 +6075,15 @@ function NotificationToast(notification, t, generateUrl, reouter) {
5891
6075
  const data = generateNotificationData({ notification, generateUrl });
5892
6076
  return {
5893
6077
  title: t(`foundations.notification.${notification.notificationType}.title`),
5894
- description: /* @__PURE__ */ jsxs59("div", { className: `flex w-full flex-row items-center p-2`, children: [
5895
- data.actor ? /* @__PURE__ */ jsx85("div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ jsx85(UserAvatar, { user: data.actor, className: "h-8 w-8" }) }) : /* @__PURE__ */ jsx85("div", { className: "flex w-14 max-w-14 px-2" }),
5896
- /* @__PURE__ */ jsxs59("div", { className: "flex w-full flex-col", children: [
5897
- /* @__PURE__ */ jsx85("p", { className: "text-sm", children: t.rich(`foundations.notification.${notification.notificationType}.description`, {
5898
- strong: /* @__PURE__ */ __name((chunks) => /* @__PURE__ */ jsx85("strong", { children: chunks }), "strong"),
6078
+ description: /* @__PURE__ */ jsxs61("div", { className: `flex w-full flex-row items-center p-2`, children: [
6079
+ data.actor ? /* @__PURE__ */ jsx89("div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ jsx89(UserAvatar, { user: data.actor, className: "h-8 w-8" }) }) : /* @__PURE__ */ jsx89("div", { className: "flex w-14 max-w-14 px-2" }),
6080
+ /* @__PURE__ */ jsxs61("div", { className: "flex w-full flex-col", children: [
6081
+ /* @__PURE__ */ jsx89("p", { className: "text-sm", children: t.rich(`foundations.notification.${notification.notificationType}.description`, {
6082
+ strong: /* @__PURE__ */ __name((chunks) => /* @__PURE__ */ jsx89("strong", { children: chunks }), "strong"),
5899
6083
  actor: data.actor?.name ?? "",
5900
6084
  title: data.title
5901
6085
  }) }),
5902
- /* @__PURE__ */ jsx85("div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
6086
+ /* @__PURE__ */ jsx89("div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
5903
6087
  ] })
5904
6088
  ] }),
5905
6089
  action: data.url ? {
@@ -5914,32 +6098,32 @@ __name(NotificationToast, "NotificationToast");
5914
6098
  function NotificationMenuItem({ notification, closePopover }) {
5915
6099
  const generateUrl = usePageUrlGenerator();
5916
6100
  const [isRead, setIsRead] = useState32(false);
5917
- const t = useTranslations39();
6101
+ const t = useTranslations43();
5918
6102
  useEffect31(() => {
5919
6103
  setIsRead(notification.isRead);
5920
6104
  }, []);
5921
6105
  const data = generateNotificationData({ notification, generateUrl });
5922
- const response = /* @__PURE__ */ jsxs59("div", { className: `flex w-full flex-row p-2 ${isRead ? "" : "bg-muted"} items-center`, children: [
5923
- data.actor ? /* @__PURE__ */ jsx85("div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ jsx85(UserAvatar, { user: data.actor, className: "h-8 w-8" }) }) : /* @__PURE__ */ jsx85("div", { className: "flex w-14 max-w-14 px-2" }),
5924
- /* @__PURE__ */ jsxs59("div", { className: "flex w-full flex-col", children: [
5925
- /* @__PURE__ */ jsx85("p", { className: "text-sm", children: t.rich(`foundations.notification.${notification.notificationType}.description`, {
5926
- strong: /* @__PURE__ */ __name((chunks) => /* @__PURE__ */ jsx85("strong", { children: chunks }), "strong"),
6106
+ const response = /* @__PURE__ */ jsxs61("div", { className: `flex w-full flex-row p-2 ${isRead ? "" : "bg-muted"} items-center`, children: [
6107
+ data.actor ? /* @__PURE__ */ jsx89("div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ jsx89(UserAvatar, { user: data.actor, className: "h-8 w-8" }) }) : /* @__PURE__ */ jsx89("div", { className: "flex w-14 max-w-14 px-2" }),
6108
+ /* @__PURE__ */ jsxs61("div", { className: "flex w-full flex-col", children: [
6109
+ /* @__PURE__ */ jsx89("p", { className: "text-sm", children: t.rich(`foundations.notification.${notification.notificationType}.description`, {
6110
+ strong: /* @__PURE__ */ __name((chunks) => /* @__PURE__ */ jsx89("strong", { children: chunks }), "strong"),
5927
6111
  actor: data.actor?.name ?? "",
5928
6112
  title: data.title
5929
6113
  }) }),
5930
- /* @__PURE__ */ jsx85("div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
6114
+ /* @__PURE__ */ jsx89("div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
5931
6115
  ] })
5932
6116
  ] });
5933
6117
  if (!data.url) return response;
5934
- return /* @__PURE__ */ jsx85(Link, { href: data.url, onClick: closePopover, children: response });
6118
+ return /* @__PURE__ */ jsx89(Link, { href: data.url, onClick: closePopover, children: response });
5935
6119
  }
5936
6120
  __name(NotificationMenuItem, "NotificationMenuItem");
5937
6121
 
5938
6122
  // src/features/notification/contexts/NotificationContext.tsx
5939
- import { jsx as jsx86 } from "react/jsx-runtime";
6123
+ import { jsx as jsx90 } from "react/jsx-runtime";
5940
6124
  var NotificationContext = createContext6(void 0);
5941
6125
  var NotificationContextProvider = /* @__PURE__ */ __name(({ children }) => {
5942
- const t = useTranslations40();
6126
+ const t = useTranslations44();
5943
6127
  const router = useI18nRouter();
5944
6128
  const [notifications, setNotifications] = useState33([]);
5945
6129
  const [isLoading, setIsLoading] = useState33(false);
@@ -6006,7 +6190,7 @@ var NotificationContextProvider = /* @__PURE__ */ __name(({ children }) => {
6006
6190
  return NotificationToast(notification, t2, generateUrl, router);
6007
6191
  }, "generateToastNotification");
6008
6192
  const generateNotification = /* @__PURE__ */ __name((notification, closePopover) => {
6009
- return /* @__PURE__ */ jsx86(NotificationMenuItem, { notification, closePopover });
6193
+ return /* @__PURE__ */ jsx90(NotificationMenuItem, { notification, closePopover });
6010
6194
  }, "generateNotification");
6011
6195
  const breadcrumb = /* @__PURE__ */ __name(() => {
6012
6196
  const response = [];
@@ -6021,7 +6205,7 @@ var NotificationContextProvider = /* @__PURE__ */ __name(({ children }) => {
6021
6205
  };
6022
6206
  return response;
6023
6207
  }, "title");
6024
- return /* @__PURE__ */ jsx86(SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ jsx86(
6208
+ return /* @__PURE__ */ jsx90(SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ jsx90(
6025
6209
  NotificationContext.Provider,
6026
6210
  {
6027
6211
  value: {
@@ -6052,10 +6236,10 @@ var useNotificationContext = /* @__PURE__ */ __name(() => {
6052
6236
 
6053
6237
  // src/features/notification/components/lists/NotificationsList.tsx
6054
6238
  import { ArchiveIcon } from "lucide-react";
6055
- import { useTranslations as useTranslations41 } from "next-intl";
6056
- import { Fragment as Fragment23, jsx as jsx87, jsxs as jsxs60 } from "react/jsx-runtime";
6239
+ import { useTranslations as useTranslations45 } from "next-intl";
6240
+ import { Fragment as Fragment24, jsx as jsx91, jsxs as jsxs62 } from "react/jsx-runtime";
6057
6241
  function NotificationsList({ archived }) {
6058
- const t = useTranslations41();
6242
+ const t = useTranslations45();
6059
6243
  const generateUrl = usePageUrlGenerator();
6060
6244
  const data = useDataListRetriever({
6061
6245
  retriever: /* @__PURE__ */ __name((params) => NotificationService.findMany(params), "retriever"),
@@ -6066,30 +6250,30 @@ function NotificationsList({ archived }) {
6066
6250
  await NotificationService.archive({ id: notification.id });
6067
6251
  data.removeElement(notification);
6068
6252
  }, "archiveNotification");
6069
- const LoadingSkeleton = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx87("div", { className: "space-y-4", children: Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx87(Card, { children: /* @__PURE__ */ jsx87(CardContent, { className: "p-2", children: /* @__PURE__ */ jsxs60("div", { className: "flex w-full flex-row items-center", children: [
6070
- /* @__PURE__ */ jsx87(Skeleton, { className: "mr-4 h-8 w-8 rounded-full" }),
6071
- /* @__PURE__ */ jsxs60("div", { className: "flex-1 space-y-2", children: [
6072
- /* @__PURE__ */ jsx87(Skeleton, { className: "h-4 w-3/4" }),
6073
- /* @__PURE__ */ jsx87(Skeleton, { className: "h-3 w-1/2" })
6253
+ const LoadingSkeleton = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx91("div", { className: "space-y-4", children: Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsx91(Card, { children: /* @__PURE__ */ jsx91(CardContent, { className: "p-2", children: /* @__PURE__ */ jsxs62("div", { className: "flex w-full flex-row items-center", children: [
6254
+ /* @__PURE__ */ jsx91(Skeleton, { className: "mr-4 h-8 w-8 rounded-full" }),
6255
+ /* @__PURE__ */ jsxs62("div", { className: "flex-1 space-y-2", children: [
6256
+ /* @__PURE__ */ jsx91(Skeleton, { className: "h-4 w-3/4" }),
6257
+ /* @__PURE__ */ jsx91(Skeleton, { className: "h-3 w-1/2" })
6074
6258
  ] }),
6075
- /* @__PURE__ */ jsx87(Skeleton, { className: "h-8 w-20" })
6259
+ /* @__PURE__ */ jsx91(Skeleton, { className: "h-8 w-20" })
6076
6260
  ] }) }) }, i)) }), "LoadingSkeleton");
6077
- return /* @__PURE__ */ jsx87("div", { className: "space-y-4", children: data.isLoaded ? data.data?.map((notification) => {
6261
+ return /* @__PURE__ */ jsx91("div", { className: "space-y-4", children: data.isLoaded ? data.data?.map((notification) => {
6078
6262
  const notificationData = generateNotificationData({ notification, generateUrl });
6079
- return /* @__PURE__ */ jsx87(Card, { children: /* @__PURE__ */ jsx87(CardContent, { className: "p-0", children: /* @__PURE__ */ jsxs60("div", { className: `flex w-full flex-row items-center p-2`, children: [
6080
- notificationData.actor ? /* @__PURE__ */ jsx87("div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ jsx87(Link, { href: generateUrl({ page: Modules.User, id: notificationData.actor.id }), children: /* @__PURE__ */ jsx87(UserAvatar, { user: notificationData.actor, className: "h-8 w-8" }) }) }) : /* @__PURE__ */ jsx87("div", { className: "flex w-14 max-w-14 px-2" }),
6081
- /* @__PURE__ */ jsxs60("div", { className: "flex w-full flex-col", children: [
6082
- /* @__PURE__ */ jsx87("p", { className: "text-sm", children: t.rich(`foundations.notification.${notification.notificationType}.description`, {
6083
- strong: /* @__PURE__ */ __name((chunks) => /* @__PURE__ */ jsx87("strong", { children: chunks }), "strong"),
6263
+ return /* @__PURE__ */ jsx91(Card, { children: /* @__PURE__ */ jsx91(CardContent, { className: "p-0", children: /* @__PURE__ */ jsxs62("div", { className: `flex w-full flex-row items-center p-2`, children: [
6264
+ notificationData.actor ? /* @__PURE__ */ jsx91("div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ jsx91(Link, { href: generateUrl({ page: Modules.User, id: notificationData.actor.id }), children: /* @__PURE__ */ jsx91(UserAvatar, { user: notificationData.actor, className: "h-8 w-8" }) }) }) : /* @__PURE__ */ jsx91("div", { className: "flex w-14 max-w-14 px-2" }),
6265
+ /* @__PURE__ */ jsxs62("div", { className: "flex w-full flex-col", children: [
6266
+ /* @__PURE__ */ jsx91("p", { className: "text-sm", children: t.rich(`foundations.notification.${notification.notificationType}.description`, {
6267
+ strong: /* @__PURE__ */ __name((chunks) => /* @__PURE__ */ jsx91("strong", { children: chunks }), "strong"),
6084
6268
  actor: notificationData.actor?.name ?? "",
6085
6269
  title: notificationData.title
6086
6270
  }) }),
6087
- /* @__PURE__ */ jsx87("div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
6271
+ /* @__PURE__ */ jsx91("div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
6088
6272
  ] }),
6089
- /* @__PURE__ */ jsxs60("div", { className: "flex flex-row items-center", children: [
6090
- notificationData.url ? /* @__PURE__ */ jsx87(Link, { href: notificationData.url, children: /* @__PURE__ */ jsx87(Button, { variant: `outline`, size: `sm`, onClick: (e) => e.stopPropagation(), children: t(`foundations.notification.${notification.notificationType}.buttons.action`) }) }) : /* @__PURE__ */ jsx87(Fragment23, {}),
6091
- !archived && /* @__PURE__ */ jsxs60(Tooltip, { children: [
6092
- /* @__PURE__ */ jsx87(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx87(
6273
+ /* @__PURE__ */ jsxs62("div", { className: "flex flex-row items-center", children: [
6274
+ notificationData.url ? /* @__PURE__ */ jsx91(Link, { href: notificationData.url, children: /* @__PURE__ */ jsx91(Button, { variant: `outline`, size: `sm`, onClick: (e) => e.stopPropagation(), children: t(`foundations.notification.${notification.notificationType}.buttons.action`) }) }) : /* @__PURE__ */ jsx91(Fragment24, {}),
6275
+ !archived && /* @__PURE__ */ jsxs62(Tooltip, { children: [
6276
+ /* @__PURE__ */ jsx91(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx91(
6093
6277
  Button,
6094
6278
  {
6095
6279
  variant: `link`,
@@ -6099,55 +6283,55 @@ function NotificationsList({ archived }) {
6099
6283
  archiveNotification(notification);
6100
6284
  },
6101
6285
  className: "text-muted-foreground hover:text-destructive ml-2",
6102
- children: /* @__PURE__ */ jsx87(ArchiveIcon, { className: "h-4 w-4 cursor-pointer" })
6286
+ children: /* @__PURE__ */ jsx91(ArchiveIcon, { className: "h-4 w-4 cursor-pointer" })
6103
6287
  }
6104
6288
  ) }),
6105
- /* @__PURE__ */ jsx87(TooltipContent, { children: t(`foundations.notification.buttons.archive`) })
6289
+ /* @__PURE__ */ jsx91(TooltipContent, { children: t(`foundations.notification.buttons.archive`) })
6106
6290
  ] })
6107
6291
  ] })
6108
6292
  ] }) }) }, notification.id);
6109
- }) : /* @__PURE__ */ jsx87(LoadingSkeleton, {}) });
6293
+ }) : /* @__PURE__ */ jsx91(LoadingSkeleton, {}) });
6110
6294
  }
6111
6295
  __name(NotificationsList, "NotificationsList");
6112
6296
 
6113
6297
  // src/features/notification/components/containers/NotificationsListContainer.tsx
6114
- import { jsx as jsx88, jsxs as jsxs61 } from "react/jsx-runtime";
6298
+ import { jsx as jsx92, jsxs as jsxs63 } from "react/jsx-runtime";
6115
6299
  function NotificationsListContainerContent() {
6116
- const t = useTranslations42();
6300
+ const t = useTranslations46();
6117
6301
  const { notifications, isLoading, error } = useNotificationContext();
6118
6302
  if (error) {
6119
- return /* @__PURE__ */ jsx88("div", { className: "flex items-center justify-center p-8 text-center", children: /* @__PURE__ */ jsxs61("div", { className: "text-destructive text-sm", children: [
6120
- /* @__PURE__ */ jsxs61("p", { children: [
6303
+ return /* @__PURE__ */ jsx92("div", { className: "flex items-center justify-center p-8 text-center", children: /* @__PURE__ */ jsxs63("div", { className: "text-destructive text-sm", children: [
6304
+ /* @__PURE__ */ jsxs63("p", { children: [
6121
6305
  "Error loading notifications: ",
6122
6306
  error
6123
6307
  ] }),
6124
- /* @__PURE__ */ jsx88("p", { className: "text-muted-foreground mt-2", children: "Please try refreshing the page." })
6308
+ /* @__PURE__ */ jsx92("p", { className: "text-muted-foreground mt-2", children: "Please try refreshing the page." })
6125
6309
  ] }) });
6126
6310
  }
6127
6311
  const tabs = [
6128
6312
  {
6129
6313
  label: t(`foundations.notification.inbox`),
6130
- content: /* @__PURE__ */ jsx88(NotificationsList, { archived: false })
6314
+ content: /* @__PURE__ */ jsx92(NotificationsList, { archived: false })
6131
6315
  },
6132
6316
  {
6133
6317
  label: t(`foundations.notification.archived`),
6134
- content: /* @__PURE__ */ jsx88(NotificationsList, { archived: true })
6318
+ content: /* @__PURE__ */ jsx92(NotificationsList, { archived: true })
6135
6319
  }
6136
6320
  ];
6137
- return /* @__PURE__ */ jsx88(TabsContainer, { tabs });
6321
+ return /* @__PURE__ */ jsx92(TabsContainer, { tabs });
6138
6322
  }
6139
6323
  __name(NotificationsListContainerContent, "NotificationsListContainerContent");
6140
6324
  function NotificationsListContainer() {
6141
- return /* @__PURE__ */ jsx88(NotificationErrorBoundary, { children: /* @__PURE__ */ jsx88(NotificationsListContainerContent, {}) });
6325
+ return /* @__PURE__ */ jsx92(NotificationErrorBoundary, { children: /* @__PURE__ */ jsx92(NotificationsListContainerContent, {}) });
6142
6326
  }
6143
6327
  __name(NotificationsListContainer, "NotificationsListContainer");
6144
6328
 
6145
6329
  // src/features/notification/components/modals/NotificationModal.tsx
6146
6330
  import { BellIcon } from "lucide-react";
6147
- import { useTranslations as useTranslations43 } from "next-intl";
6148
- import { Fragment as Fragment24, useCallback as useCallback12, useEffect as useEffect32, useMemo as useMemo14, useRef as useRef13, useState as useState34 } from "react";
6331
+ import { useTranslations as useTranslations47 } from "next-intl";
6332
+ import { Fragment as Fragment25, useCallback as useCallback12, useEffect as useEffect32, useMemo as useMemo15, useRef as useRef13, useState as useState34 } from "react";
6149
6333
  import { toast as toast9 } from "sonner";
6150
- import { jsx as jsx89, jsxs as jsxs62 } from "react/jsx-runtime";
6334
+ import { jsx as jsx93, jsxs as jsxs64 } from "react/jsx-runtime";
6151
6335
  function NotificationModalContent({ isOpen, setIsOpen }) {
6152
6336
  const instanceId = useRef13(Math.random().toString(36).substr(2, 9));
6153
6337
  const {
@@ -6160,7 +6344,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
6160
6344
  error
6161
6345
  } = useNotificationContext();
6162
6346
  const { socketNotifications, removeSocketNotification, clearSocketNotifications } = useSocketContext();
6163
- const t = useTranslations43();
6347
+ const t = useTranslations47();
6164
6348
  const generateUrl = usePageUrlGenerator();
6165
6349
  const [newNotifications, setNewNotifications] = useState34(false);
6166
6350
  const preventAutoClose = useRef13(false);
@@ -6184,7 +6368,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
6184
6368
  }
6185
6369
  return !breaker.isOpen;
6186
6370
  }, []);
6187
- const { unreadCount, unreadIds } = useMemo14(() => {
6371
+ const { unreadCount, unreadIds } = useMemo15(() => {
6188
6372
  const unreadNotifications2 = notifications.filter((notif) => !notif.isRead);
6189
6373
  return {
6190
6374
  unreadCount: unreadNotifications2.length,
@@ -6268,9 +6452,9 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
6268
6452
  }
6269
6453
  }, "handleOpenChange");
6270
6454
  const unreadNotifications = newNotifications && unreadCount > 0;
6271
- return /* @__PURE__ */ jsxs62(Popover, { open: isOpen, onOpenChange: handleOpenChange, "data-testid": `sidebar-notification button`, children: [
6272
- /* @__PURE__ */ jsx89(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs62(SidebarMenuButton, { className: "text-muted-foreground h-6", disabled: isLoading, children: [
6273
- /* @__PURE__ */ jsx89(
6455
+ return /* @__PURE__ */ jsxs64(Popover, { open: isOpen, onOpenChange: handleOpenChange, "data-testid": `sidebar-notification button`, children: [
6456
+ /* @__PURE__ */ jsx93(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs64(SidebarMenuButton, { className: "text-muted-foreground h-6", disabled: isLoading, children: [
6457
+ /* @__PURE__ */ jsx93(
6274
6458
  BellIcon,
6275
6459
  {
6276
6460
  className: `h-5 w-5 cursor-pointer ${unreadNotifications ? "text-destructive" : ""} ${isLoading ? "animate-pulse" : ""}`
@@ -6278,42 +6462,42 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
6278
6462
  ),
6279
6463
  t(`types.notifications`, { count: 2 })
6280
6464
  ] }) }),
6281
- /* @__PURE__ */ jsx89(PopoverContent, { className: "relative left-10 w-80 border-0 p-0 shadow-none", children: /* @__PURE__ */ jsxs62(Card, { children: [
6282
- /* @__PURE__ */ jsxs62(CardHeader, { className: "p-4", children: [
6283
- /* @__PURE__ */ jsx89(CardTitle, { children: t(`types.notifications`, { count: 2 }) }),
6284
- isLoading && /* @__PURE__ */ jsx89("div", { className: "text-muted-foreground text-xs", children: "Loading..." }),
6285
- error && /* @__PURE__ */ jsxs62("div", { className: "text-destructive text-xs", children: [
6465
+ /* @__PURE__ */ jsx93(PopoverContent, { className: "relative left-10 w-80 border-0 p-0 shadow-none", children: /* @__PURE__ */ jsxs64(Card, { children: [
6466
+ /* @__PURE__ */ jsxs64(CardHeader, { className: "p-4", children: [
6467
+ /* @__PURE__ */ jsx93(CardTitle, { children: t(`types.notifications`, { count: 2 }) }),
6468
+ isLoading && /* @__PURE__ */ jsx93("div", { className: "text-muted-foreground text-xs", children: "Loading..." }),
6469
+ error && /* @__PURE__ */ jsxs64("div", { className: "text-destructive text-xs", children: [
6286
6470
  "Error: ",
6287
6471
  error
6288
6472
  ] })
6289
6473
  ] }),
6290
- /* @__PURE__ */ jsx89(Separator, {}),
6291
- /* @__PURE__ */ jsx89(ScrollArea, { className: "h-96", children: notifications.length > 0 ? notifications.map((notification) => /* @__PURE__ */ jsx89(Fragment24, { children: generateNotification(notification, () => setIsOpen(false)) }, notification.id)) : /* @__PURE__ */ jsx89("div", { className: "p-4 text-center text-sm text-gray-500", children: t(`foundations.notification.empty`, { count: 2 }) }) })
6474
+ /* @__PURE__ */ jsx93(Separator, {}),
6475
+ /* @__PURE__ */ jsx93(ScrollArea, { className: "h-96", children: notifications.length > 0 ? notifications.map((notification) => /* @__PURE__ */ jsx93(Fragment25, { children: generateNotification(notification, () => setIsOpen(false)) }, notification.id)) : /* @__PURE__ */ jsx93("div", { className: "p-4 text-center text-sm text-gray-500", children: t(`foundations.notification.empty`, { count: 2 }) }) })
6292
6476
  ] }) })
6293
6477
  ] });
6294
6478
  }
6295
6479
  __name(NotificationModalContent, "NotificationModalContent");
6296
6480
  function NotificationModal(props) {
6297
- return /* @__PURE__ */ jsx89(NotificationErrorBoundary, { children: /* @__PURE__ */ jsx89(NotificationModalContent, { ...props }) });
6481
+ return /* @__PURE__ */ jsx93(NotificationErrorBoundary, { children: /* @__PURE__ */ jsx93(NotificationModalContent, { ...props }) });
6298
6482
  }
6299
6483
  __name(NotificationModal, "NotificationModal");
6300
6484
 
6301
6485
  // src/features/notification/components/notifications/PushNotificationProvider.tsx
6302
- import { Fragment as Fragment25, jsx as jsx90 } from "react/jsx-runtime";
6486
+ import { Fragment as Fragment26, jsx as jsx94 } from "react/jsx-runtime";
6303
6487
  function PushNotificationProvider({ children }) {
6304
6488
  usePushNotifications();
6305
- return /* @__PURE__ */ jsx90(Fragment25, { children });
6489
+ return /* @__PURE__ */ jsx94(Fragment26, { children });
6306
6490
  }
6307
6491
  __name(PushNotificationProvider, "PushNotificationProvider");
6308
6492
 
6309
6493
  // src/features/role/contexts/RoleContext.tsx
6310
- import { useTranslations as useTranslations44 } from "next-intl";
6494
+ import { useTranslations as useTranslations48 } from "next-intl";
6311
6495
  import { createContext as createContext7, useContext as useContext7, useState as useState35 } from "react";
6312
- import { jsx as jsx91 } from "react/jsx-runtime";
6496
+ import { jsx as jsx95 } from "react/jsx-runtime";
6313
6497
  var RoleContext = createContext7(void 0);
6314
6498
  var RoleProvider = /* @__PURE__ */ __name(({ children, dehydratedRole }) => {
6315
6499
  const generateUrl = usePageUrlGenerator();
6316
- const t = useTranslations44();
6500
+ const t = useTranslations48();
6317
6501
  const [role, setRole] = useState35(
6318
6502
  dehydratedRole ? rehydrate(Modules.Role, dehydratedRole) : void 0
6319
6503
  );
@@ -6341,7 +6525,7 @@ var RoleProvider = /* @__PURE__ */ __name(({ children, dehydratedRole }) => {
6341
6525
  if (functions.length > 0) response.functions = functions;
6342
6526
  return response;
6343
6527
  }, "title");
6344
- return /* @__PURE__ */ jsx91(SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ jsx91(
6528
+ return /* @__PURE__ */ jsx95(SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ jsx95(
6345
6529
  RoleContext.Provider,
6346
6530
  {
6347
6531
  value: {
@@ -6361,46 +6545,46 @@ var useRoleContext = /* @__PURE__ */ __name(() => {
6361
6545
  }, "useRoleContext");
6362
6546
 
6363
6547
  // src/features/role/components/details/RoleDetails.tsx
6364
- import { useTranslations as useTranslations45 } from "next-intl";
6365
- import { jsx as jsx92 } from "react/jsx-runtime";
6548
+ import { useTranslations as useTranslations49 } from "next-intl";
6549
+ import { jsx as jsx96 } from "react/jsx-runtime";
6366
6550
  function RoleDetails() {
6367
6551
  const { role } = useRoleContext();
6368
- const t = useTranslations45();
6552
+ const t = useTranslations49();
6369
6553
  if (!role) return null;
6370
- return /* @__PURE__ */ jsx92(Card, { className: "w-full", children: /* @__PURE__ */ jsx92(CardContent, { className: "p-4", children: /* @__PURE__ */ jsx92(AttributeElement, { title: t(`foundations.role.fields.description.label`), value: role.description }) }) });
6554
+ return /* @__PURE__ */ jsx96(Card, { className: "w-full", children: /* @__PURE__ */ jsx96(CardContent, { className: "p-4", children: /* @__PURE__ */ jsx96(AttributeElement, { title: t(`foundations.role.fields.description.label`), value: role.description }) }) });
6371
6555
  }
6372
6556
  __name(RoleDetails, "RoleDetails");
6373
6557
 
6374
6558
  // src/features/role/components/containers/RoleContainer.tsx
6375
- import { Fragment as Fragment26, jsx as jsx93, jsxs as jsxs63 } from "react/jsx-runtime";
6559
+ import { Fragment as Fragment27, jsx as jsx97, jsxs as jsxs65 } from "react/jsx-runtime";
6376
6560
  function RoleContainer() {
6377
6561
  const { role } = useRoleContext();
6378
6562
  if (!role) return null;
6379
- return /* @__PURE__ */ jsxs63(Fragment26, { children: [
6380
- /* @__PURE__ */ jsx93(RoleDetails, {}),
6381
- /* @__PURE__ */ jsx93(RoleUsersList, { role })
6563
+ return /* @__PURE__ */ jsxs65(Fragment27, { children: [
6564
+ /* @__PURE__ */ jsx97(RoleDetails, {}),
6565
+ /* @__PURE__ */ jsx97(RoleUsersList, { role })
6382
6566
  ] });
6383
6567
  }
6384
6568
  __name(RoleContainer, "RoleContainer");
6385
6569
 
6386
6570
  // src/features/role/components/forms/FormRoles.tsx
6387
- import { useTranslations as useTranslations46 } from "next-intl";
6388
- import { jsx as jsx94, jsxs as jsxs64 } from "react/jsx-runtime";
6571
+ import { useTranslations as useTranslations50 } from "next-intl";
6572
+ import { jsx as jsx98, jsxs as jsxs66 } from "react/jsx-runtime";
6389
6573
  function FormRoles({ form, id, name, roles }) {
6390
- const t = useTranslations46();
6574
+ const t = useTranslations50();
6391
6575
  const { hasAccesToFeature } = useCurrentUserContext();
6392
- return /* @__PURE__ */ jsx94("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx94(
6576
+ return /* @__PURE__ */ jsx98("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx98(
6393
6577
  FormField,
6394
6578
  {
6395
6579
  control: form.control,
6396
6580
  name: id,
6397
- render: ({ field }) => /* @__PURE__ */ jsxs64(FormItem, { className: `${name ? "mb-5" : "mb-1"}`, children: [
6398
- /* @__PURE__ */ jsx94(FormControl, { children: /* @__PURE__ */ jsxs64("div", { children: [
6399
- /* @__PURE__ */ jsx94("div", { className: "text-sm font-semibold", children: name }),
6581
+ render: ({ field }) => /* @__PURE__ */ jsxs66(FormItem, { className: `${name ? "mb-5" : "mb-1"}`, children: [
6582
+ /* @__PURE__ */ jsx98(FormControl, { children: /* @__PURE__ */ jsxs66("div", { children: [
6583
+ /* @__PURE__ */ jsx98("div", { className: "text-sm font-semibold", children: name }),
6400
6584
  roles.filter((role) => role.isSelectable).sort((a, b) => a.name.localeCompare(b.name)).map((role) => {
6401
6585
  if (role.requiredFeature && !hasAccesToFeature(role.requiredFeature.id)) return null;
6402
- return /* @__PURE__ */ jsxs64("div", { children: [
6403
- /* @__PURE__ */ jsx94(
6586
+ return /* @__PURE__ */ jsxs66("div", { children: [
6587
+ /* @__PURE__ */ jsx98(
6404
6588
  Checkbox,
6405
6589
  {
6406
6590
  defaultChecked: field.value.some((roleId) => roleId === role.id),
@@ -6416,14 +6600,14 @@ function FormRoles({ form, id, name, roles }) {
6416
6600
  }
6417
6601
  }
6418
6602
  ),
6419
- /* @__PURE__ */ jsxs64(Tooltip, { children: [
6420
- /* @__PURE__ */ jsx94(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx94(FormLabel, { className: "ml-3 font-normal", children: t(`foundations.role.roles`, { role: role.id.replaceAll(`-`, ``) }) }) }),
6421
- /* @__PURE__ */ jsx94(TooltipContent, { children: t(`foundations.role.roles_descriptions`, { role: role.id.replaceAll(`-`, ``) }) })
6603
+ /* @__PURE__ */ jsxs66(Tooltip, { children: [
6604
+ /* @__PURE__ */ jsx98(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx98(FormLabel, { className: "ml-3 font-normal", children: t(`foundations.role.roles`, { role: role.id.replaceAll(`-`, ``) }) }) }),
6605
+ /* @__PURE__ */ jsx98(TooltipContent, { children: t(`foundations.role.roles_descriptions`, { role: role.id.replaceAll(`-`, ``) }) })
6422
6606
  ] })
6423
6607
  ] }, role.id);
6424
6608
  })
6425
6609
  ] }) }),
6426
- /* @__PURE__ */ jsx94(FormMessage, {})
6610
+ /* @__PURE__ */ jsx98(FormMessage, {})
6427
6611
  ] })
6428
6612
  }
6429
6613
  ) });
@@ -6431,13 +6615,13 @@ function FormRoles({ form, id, name, roles }) {
6431
6615
  __name(FormRoles, "FormRoles");
6432
6616
 
6433
6617
  // src/features/role/components/forms/RemoveUserFromRole.tsx
6434
- import { useTranslations as useTranslations47 } from "next-intl";
6618
+ import { useTranslations as useTranslations51 } from "next-intl";
6435
6619
  import { useEffect as useEffect33, useState as useState36 } from "react";
6436
- import { Fragment as Fragment27, jsx as jsx95, jsxs as jsxs65 } from "react/jsx-runtime";
6620
+ import { Fragment as Fragment28, jsx as jsx99, jsxs as jsxs67 } from "react/jsx-runtime";
6437
6621
  function RemoveUserFromRole({ role, user, refresh }) {
6438
6622
  const [open, setOpen] = useState36(false);
6439
6623
  const [canRemove, setCanRemove] = useState36(false);
6440
- const t = useTranslations47();
6624
+ const t = useTranslations51();
6441
6625
  useEffect33(() => {
6442
6626
  async function checkCompanyAdminDeletability() {
6443
6627
  const roleUsers = await UserService.findAllUsersByRole({
@@ -6465,8 +6649,8 @@ function RemoveUserFromRole({ role, user, refresh }) {
6465
6649
  }
6466
6650
  }, "remove");
6467
6651
  const roleName = t(`foundations.role.roles`, { role: role.id.replaceAll(`-`, ``) });
6468
- return /* @__PURE__ */ jsxs65(Dialog, { open, onOpenChange: setOpen, children: [
6469
- /* @__PURE__ */ jsx95(
6652
+ return /* @__PURE__ */ jsxs67(Dialog, { open, onOpenChange: setOpen, children: [
6653
+ /* @__PURE__ */ jsx99(
6470
6654
  DialogTrigger,
6471
6655
  {
6472
6656
  onClick: (e) => {
@@ -6474,19 +6658,19 @@ function RemoveUserFromRole({ role, user, refresh }) {
6474
6658
  e.preventDefault();
6475
6659
  setOpen(true);
6476
6660
  },
6477
- children: /* @__PURE__ */ jsx95("span", { className: "hover:text-destructive cursor-pointer", children: t(`foundations.role.remove_user.title`) })
6661
+ children: /* @__PURE__ */ jsx99("span", { className: "hover:text-destructive cursor-pointer", children: t(`foundations.role.remove_user.title`) })
6478
6662
  }
6479
6663
  ),
6480
- /* @__PURE__ */ jsxs65(DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
6481
- /* @__PURE__ */ jsxs65(DialogHeader, { children: [
6482
- /* @__PURE__ */ jsx95(DialogTitle, { children: t(`foundations.role.remove_user.title`) }),
6483
- /* @__PURE__ */ jsx95(DialogDescription, { children: canRemove ? t(`foundations.role.remove_user.subtitle_allowed`) : t(`foundations.role.remove_user.subtitle_not_allowed`) })
6664
+ /* @__PURE__ */ jsxs67(DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
6665
+ /* @__PURE__ */ jsxs67(DialogHeader, { children: [
6666
+ /* @__PURE__ */ jsx99(DialogTitle, { children: t(`foundations.role.remove_user.title`) }),
6667
+ /* @__PURE__ */ jsx99(DialogDescription, { children: canRemove ? t(`foundations.role.remove_user.subtitle_allowed`) : t(`foundations.role.remove_user.subtitle_not_allowed`) })
6484
6668
  ] }),
6485
- canRemove ? /* @__PURE__ */ jsxs65(Fragment27, { children: [
6669
+ canRemove ? /* @__PURE__ */ jsxs67(Fragment28, { children: [
6486
6670
  t(`foundations.role.remove_user.description_allowed`, { role: roleName, user: user.name }),
6487
- /* @__PURE__ */ jsxs65("div", { className: "flex justify-end", children: [
6488
- /* @__PURE__ */ jsx95(Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`generic.buttons.cancel`) }),
6489
- /* @__PURE__ */ jsx95(
6671
+ /* @__PURE__ */ jsxs67("div", { className: "flex justify-end", children: [
6672
+ /* @__PURE__ */ jsx99(Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`generic.buttons.cancel`) }),
6673
+ /* @__PURE__ */ jsx99(
6490
6674
  Button,
6491
6675
  {
6492
6676
  type: "submit",
@@ -6499,7 +6683,7 @@ function RemoveUserFromRole({ role, user, refresh }) {
6499
6683
  }
6500
6684
  )
6501
6685
  ] })
6502
- ] }) : /* @__PURE__ */ jsx95(Fragment27, { children: t(`foundations.role.remove_user.description_not_allowed`, { role: roleName, user: user.name }) })
6686
+ ] }) : /* @__PURE__ */ jsx99(Fragment28, { children: t(`foundations.role.remove_user.description_not_allowed`, { role: roleName, user: user.name }) })
6503
6687
  ] })
6504
6688
  ] });
6505
6689
  }
@@ -6507,16 +6691,16 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
6507
6691
 
6508
6692
  // src/features/role/components/forms/UserRoleAdd.tsx
6509
6693
  import { PlusCircle } from "lucide-react";
6510
- import { useTranslations as useTranslations48 } from "next-intl";
6694
+ import { useTranslations as useTranslations52 } from "next-intl";
6511
6695
  import { useCallback as useCallback13, useEffect as useEffect34, useRef as useRef14, useState as useState37 } from "react";
6512
6696
  import { toast as toast10 } from "sonner";
6513
- import { Fragment as Fragment28, jsx as jsx96, jsxs as jsxs66 } from "react/jsx-runtime";
6697
+ import { Fragment as Fragment29, jsx as jsx100, jsxs as jsxs68 } from "react/jsx-runtime";
6514
6698
  function UserRoleAdd({ user, refresh }) {
6515
6699
  const [open, setOpen] = useState37(false);
6516
6700
  const inputRef = useRef14(null);
6517
6701
  const [searchTerm, setSearchTerm] = useState37("");
6518
6702
  const [roles, setRoles] = useState37([]);
6519
- const t = useTranslations48();
6703
+ const t = useTranslations52();
6520
6704
  const addUserToRole = /* @__PURE__ */ __name(async (role) => {
6521
6705
  await RoleService.addUserToRole({
6522
6706
  roleId: role.id,
@@ -6557,26 +6741,26 @@ function UserRoleAdd({ user, refresh }) {
6557
6741
  useEffect34(() => {
6558
6742
  if (open) searchRoles("");
6559
6743
  }, [open]);
6560
- return /* @__PURE__ */ jsxs66(Fragment28, { children: [
6561
- /* @__PURE__ */ jsxs66(Button, { size: "sm", onClick: () => setOpen(true), children: [
6562
- /* @__PURE__ */ jsx96(PlusCircle, { className: "mr-3 h-3.5 w-3.5" }),
6744
+ return /* @__PURE__ */ jsxs68(Fragment29, { children: [
6745
+ /* @__PURE__ */ jsxs68(Button, { size: "sm", onClick: () => setOpen(true), children: [
6746
+ /* @__PURE__ */ jsx100(PlusCircle, { className: "mr-3 h-3.5 w-3.5" }),
6563
6747
  t(`generic.association.label`, {
6564
6748
  source: t(`types.roles`, { count: 1 }),
6565
6749
  destination: t(`types.users`, { count: 1 })
6566
6750
  })
6567
6751
  ] }),
6568
- /* @__PURE__ */ jsxs66(CommandDialog, { open, onOpenChange: setOpen, children: [
6569
- /* @__PURE__ */ jsx96(DialogTitle, { children: t(`generic.association.label`, {
6752
+ /* @__PURE__ */ jsxs68(CommandDialog, { open, onOpenChange: setOpen, children: [
6753
+ /* @__PURE__ */ jsx100(DialogTitle, { children: t(`generic.association.label`, {
6570
6754
  source: t(`types.roles`, { count: 1 }),
6571
6755
  destination: t(`types.users`, { count: 1 })
6572
6756
  }) }),
6573
- /* @__PURE__ */ jsx96(DialogDescription, { children: t(`generic.association.description`, {
6757
+ /* @__PURE__ */ jsx100(DialogDescription, { children: t(`generic.association.description`, {
6574
6758
  source: t(`types.roles`, { count: 1 }),
6575
6759
  destination: t(`types.users`, { count: 1 }),
6576
6760
  destination_name: user.name
6577
6761
  }) }),
6578
- /* @__PURE__ */ jsxs66(Command, { shouldFilter: false, children: [
6579
- /* @__PURE__ */ jsx96(
6762
+ /* @__PURE__ */ jsxs68(Command, { shouldFilter: false, children: [
6763
+ /* @__PURE__ */ jsx100(
6580
6764
  CommandInput,
6581
6765
  {
6582
6766
  placeholder: t(`generic.search.placeholder`, { type: t(`types.roles`, { count: 1 }) }),
@@ -6585,9 +6769,9 @@ function UserRoleAdd({ user, refresh }) {
6585
6769
  ref: inputRef
6586
6770
  }
6587
6771
  ),
6588
- /* @__PURE__ */ jsxs66(CommandList, { className: "mt-3 h-auto max-h-96 min-h-96 max-w-full overflow-x-hidden overflow-y-auto", children: [
6589
- /* @__PURE__ */ jsx96(CommandEmpty, { children: t(`generic.search.no_results`, { type: t(`types.roles`, { count: 1 }) }) }),
6590
- roles.map((role) => /* @__PURE__ */ jsx96(
6772
+ /* @__PURE__ */ jsxs68(CommandList, { className: "mt-3 h-auto max-h-96 min-h-96 max-w-full overflow-x-hidden overflow-y-auto", children: [
6773
+ /* @__PURE__ */ jsx100(CommandEmpty, { children: t(`generic.search.no_results`, { type: t(`types.roles`, { count: 1 }) }) }),
6774
+ roles.map((role) => /* @__PURE__ */ jsx100(
6591
6775
  CommandItem,
6592
6776
  {
6593
6777
  className: "cursor-pointer",
@@ -6605,16 +6789,16 @@ function UserRoleAdd({ user, refresh }) {
6605
6789
  __name(UserRoleAdd, "UserRoleAdd");
6606
6790
 
6607
6791
  // src/features/role/components/lists/RolesList.tsx
6608
- import { useTranslations as useTranslations49 } from "next-intl";
6609
- import { jsx as jsx97 } from "react/jsx-runtime";
6792
+ import { useTranslations as useTranslations53 } from "next-intl";
6793
+ import { jsx as jsx101 } from "react/jsx-runtime";
6610
6794
  function RolesList() {
6611
- const t = useTranslations49();
6795
+ const t = useTranslations53();
6612
6796
  const data = useDataListRetriever({
6613
6797
  retriever: /* @__PURE__ */ __name((params) => RoleService.findAllRoles(params), "retriever"),
6614
6798
  retrieverParams: {},
6615
6799
  module: Modules.Role
6616
6800
  });
6617
- return /* @__PURE__ */ jsx97(
6801
+ return /* @__PURE__ */ jsx101(
6618
6802
  ContentListTable,
6619
6803
  {
6620
6804
  data,
@@ -6627,16 +6811,16 @@ function RolesList() {
6627
6811
  __name(RolesList, "RolesList");
6628
6812
 
6629
6813
  // src/features/role/components/lists/UserRolesList.tsx
6630
- import { useTranslations as useTranslations50 } from "next-intl";
6631
- import { jsx as jsx98 } from "react/jsx-runtime";
6814
+ import { useTranslations as useTranslations54 } from "next-intl";
6815
+ import { jsx as jsx102 } from "react/jsx-runtime";
6632
6816
  function UserRolesList({ user }) {
6633
- const t = useTranslations50();
6817
+ const t = useTranslations54();
6634
6818
  const data = useDataListRetriever({
6635
6819
  retriever: /* @__PURE__ */ __name((params) => RoleService.findAllRolesByUser(params), "retriever"),
6636
6820
  retrieverParams: { userId: user.id },
6637
6821
  module: Modules.Role
6638
6822
  });
6639
- return /* @__PURE__ */ jsx98(
6823
+ return /* @__PURE__ */ jsx102(
6640
6824
  ContentListTable,
6641
6825
  {
6642
6826
  data,
@@ -6649,12 +6833,12 @@ function UserRolesList({ user }) {
6649
6833
  __name(UserRolesList, "UserRolesList");
6650
6834
 
6651
6835
  // src/features/user/components/forms/RoleUserAdd.tsx
6652
- import { Fragment as Fragment29, jsx as jsx99, jsxs as jsxs67 } from "react/jsx-runtime";
6836
+ import { Fragment as Fragment30, jsx as jsx103, jsxs as jsxs69 } from "react/jsx-runtime";
6653
6837
  function AddUserToRoleInternal({ role, refresh }) {
6654
6838
  const { company } = useCurrentUserContext();
6655
6839
  const [show, setShow] = useState38(false);
6656
6840
  const [users, setUsers] = useState38([]);
6657
- const t = useTranslations51();
6841
+ const t = useTranslations55();
6658
6842
  const [existingUsers, setExistingUsers] = useState38(null);
6659
6843
  useEffect35(() => {
6660
6844
  const fetchExistingUsers = /* @__PURE__ */ __name(async () => {
@@ -6691,8 +6875,8 @@ function AddUserToRoleInternal({ role, refresh }) {
6691
6875
  data.setReady(true);
6692
6876
  }
6693
6877
  }, [data, company, show]);
6694
- return /* @__PURE__ */ jsxs67(Fragment29, { children: [
6695
- /* @__PURE__ */ jsx99(
6878
+ return /* @__PURE__ */ jsxs69(Fragment30, { children: [
6879
+ /* @__PURE__ */ jsx103(
6696
6880
  CommonAssociationTrigger,
6697
6881
  {
6698
6882
  sourceType: t(`types.users`, { count: 1 }),
@@ -6700,7 +6884,7 @@ function AddUserToRoleInternal({ role, refresh }) {
6700
6884
  onTrigger: () => setShow(true)
6701
6885
  }
6702
6886
  ),
6703
- /* @__PURE__ */ jsx99(
6887
+ /* @__PURE__ */ jsx103(
6704
6888
  CommonAssociationCommandDialog,
6705
6889
  {
6706
6890
  show,
@@ -6709,26 +6893,26 @@ function AddUserToRoleInternal({ role, refresh }) {
6709
6893
  source: t(`types.users`, { count: 1 }),
6710
6894
  destination: t(`types.roles`, { count: 1 }),
6711
6895
  destinationName: t(`foundations.role.roles`, { role: role.id.replaceAll(`-`, ``) }),
6712
- children: /* @__PURE__ */ jsx99(UserListInAdd, { data, existingUsers, setSelectedUser: addUserToRole })
6896
+ children: /* @__PURE__ */ jsx103(UserListInAdd, { data, existingUsers, setSelectedUser: addUserToRole })
6713
6897
  }
6714
6898
  )
6715
6899
  ] });
6716
6900
  }
6717
6901
  __name(AddUserToRoleInternal, "AddUserToRoleInternal");
6718
6902
  function AddUserToRole(props) {
6719
- return /* @__PURE__ */ jsx99(AddUserToRoleInternal, { ...props });
6903
+ return /* @__PURE__ */ jsx103(AddUserToRoleInternal, { ...props });
6720
6904
  }
6721
6905
  __name(AddUserToRole, "AddUserToRole");
6722
6906
 
6723
6907
  // src/features/user/components/forms/UserAvatarEditor.tsx
6724
6908
  import { UploadIcon as UploadIcon3 } from "lucide-react";
6725
- import { useTranslations as useTranslations52 } from "next-intl";
6909
+ import { useTranslations as useTranslations56 } from "next-intl";
6726
6910
  import Image15 from "next/image";
6727
6911
  import { useEffect as useEffect36, useState as useState39 } from "react";
6728
- import { jsx as jsx100, jsxs as jsxs68 } from "react/jsx-runtime";
6912
+ import { jsx as jsx104, jsxs as jsxs70 } from "react/jsx-runtime";
6729
6913
  function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
6730
6914
  const [files, setFiles] = useState39(null);
6731
- const t = useTranslations52();
6915
+ const t = useTranslations56();
6732
6916
  useEffect36(() => {
6733
6917
  if (files && files.length > 0) {
6734
6918
  setResetImage(false);
@@ -6743,15 +6927,15 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
6743
6927
  "application/images": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"]
6744
6928
  }
6745
6929
  };
6746
- return /* @__PURE__ */ jsxs68("div", { className: "flex w-40 flex-col gap-y-4", children: [
6747
- /* @__PURE__ */ jsx100(
6930
+ return /* @__PURE__ */ jsxs70("div", { className: "flex w-40 flex-col gap-y-4", children: [
6931
+ /* @__PURE__ */ jsx104(
6748
6932
  FileUploader,
6749
6933
  {
6750
6934
  value: files,
6751
6935
  onValueChange: setFiles,
6752
6936
  dropzoneOptions: dropzone2,
6753
6937
  className: "h-40 w-40 rounded-full p-0",
6754
- children: /* @__PURE__ */ jsx100(FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || user?.avatar) ? /* @__PURE__ */ jsx100(
6938
+ children: /* @__PURE__ */ jsx104(FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || user?.avatar) ? /* @__PURE__ */ jsx104(
6755
6939
  Image15,
6756
6940
  {
6757
6941
  src: file ? URL.createObjectURL(file) : user?.avatar || "",
@@ -6759,10 +6943,10 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
6759
6943
  width: 200,
6760
6944
  height: 200
6761
6945
  }
6762
- ) : /* @__PURE__ */ jsx100(UploadIcon3, { className: "my-4 h-8 w-8" }) })
6946
+ ) : /* @__PURE__ */ jsx104(UploadIcon3, { className: "my-4 h-8 w-8" }) })
6763
6947
  }
6764
6948
  ),
6765
- !resetImage && (file || user?.avatar) && /* @__PURE__ */ jsx100(
6949
+ !resetImage && (file || user?.avatar) && /* @__PURE__ */ jsx104(
6766
6950
  Button,
6767
6951
  {
6768
6952
  className: "",
@@ -6782,13 +6966,13 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
6782
6966
  __name(UserAvatarEditor, "UserAvatarEditor");
6783
6967
 
6784
6968
  // src/features/user/components/forms/UserDeleter.tsx
6785
- import { useTranslations as useTranslations53 } from "next-intl";
6786
- import { jsx as jsx101 } from "react/jsx-runtime";
6969
+ import { useTranslations as useTranslations57 } from "next-intl";
6970
+ import { jsx as jsx105 } from "react/jsx-runtime";
6787
6971
  function UserDeleterInternal({ user, onDeleted, companyId }) {
6788
6972
  const { currentUser, company } = useCurrentUserContext();
6789
6973
  const generateUrl = usePageUrlGenerator();
6790
6974
  const router = useI18nRouter();
6791
- const t = useTranslations53();
6975
+ const t = useTranslations57();
6792
6976
  let cId;
6793
6977
  if (currentUser?.roles.find((role) => role.id === getRoleId().Administrator) && companyId) {
6794
6978
  cId = companyId;
@@ -6796,7 +6980,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
6796
6980
  if (!company) return;
6797
6981
  cId = company.id;
6798
6982
  }
6799
- return /* @__PURE__ */ jsx101(
6983
+ return /* @__PURE__ */ jsx105(
6800
6984
  CommonDeleter,
6801
6985
  {
6802
6986
  type: `users`,
@@ -6810,18 +6994,18 @@ __name(UserDeleterInternal, "UserDeleterInternal");
6810
6994
  function UserDeleter(props) {
6811
6995
  const { hasPermissionToModule } = useCurrentUserContext();
6812
6996
  if (!hasPermissionToModule({ module: Modules.User, action: "delete" /* Delete */, data: props.user })) return null;
6813
- return /* @__PURE__ */ jsx101(UserDeleterInternal, { ...props });
6997
+ return /* @__PURE__ */ jsx105(UserDeleterInternal, { ...props });
6814
6998
  }
6815
6999
  __name(UserDeleter, "UserDeleter");
6816
7000
 
6817
7001
  // src/features/user/components/forms/UserEditor.tsx
6818
7002
  import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
6819
- import { useTranslations as useTranslations54 } from "next-intl";
7003
+ import { useTranslations as useTranslations58 } from "next-intl";
6820
7004
  import { useEffect as useEffect37, useState as useState40 } from "react";
6821
7005
  import { useForm as useForm9 } from "react-hook-form";
6822
7006
  import { v4 as v44 } from "uuid";
6823
7007
  import { z as z9 } from "zod";
6824
- import { jsx as jsx102, jsxs as jsxs69 } from "react/jsx-runtime";
7008
+ import { jsx as jsx106, jsxs as jsxs71 } from "react/jsx-runtime";
6825
7009
  function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onRevalidate }) {
6826
7010
  const {
6827
7011
  company: userCompany,
@@ -6837,7 +7021,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6837
7021
  const [roles, setRoles] = useState40([]);
6838
7022
  const [file, setFile] = useState40(null);
6839
7023
  const [contentType, setContentType] = useState40(null);
6840
- const t = useTranslations54();
7024
+ const t = useTranslations58();
6841
7025
  const [resetImage, setResetImage] = useState40(false);
6842
7026
  const [company, setCompany] = useState40(companyFromContext || userCompany);
6843
7027
  useEffect37(() => {
@@ -6958,17 +7142,17 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6958
7142
  }
6959
7143
  }, [file]);
6960
7144
  const canChangeRoles = !(currentUser?.id === user?.id && hasRole(getRoleId().Administrator)) && (hasPermissionToModule({ module: Modules.User, action: "update" /* Update */ }) || hasRole(getRoleId().Administrator));
6961
- return /* @__PURE__ */ jsxs69(Dialog, { open, onOpenChange: setOpen, children: [
6962
- trigger ? /* @__PURE__ */ jsx102(DialogTrigger, { asChild: true, children: trigger }) : /* @__PURE__ */ jsx102(CommonEditorTrigger, { isEdit: !!user }),
6963
- /* @__PURE__ */ jsxs69(
7145
+ return /* @__PURE__ */ jsxs71(Dialog, { open, onOpenChange: setOpen, children: [
7146
+ trigger ? /* @__PURE__ */ jsx106(DialogTrigger, { asChild: true, children: trigger }) : /* @__PURE__ */ jsx106(CommonEditorTrigger, { isEdit: !!user }),
7147
+ /* @__PURE__ */ jsxs71(
6964
7148
  DialogContent,
6965
7149
  {
6966
7150
  className: `flex max-h-[70vh] ${canChangeRoles ? `max-w-[90vw]` : `max-w-3xl`} min-h-3xl max-h-[90vh] flex-col overflow-y-auto`,
6967
7151
  children: [
6968
- /* @__PURE__ */ jsx102(CommonEditorHeader, { type: t(`types.users`, { count: 1 }), name: user?.name }),
6969
- /* @__PURE__ */ jsx102(Form, { ...form, children: /* @__PURE__ */ jsxs69("form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
6970
- /* @__PURE__ */ jsxs69("div", { className: `flex flex-row gap-x-4`, children: [
6971
- /* @__PURE__ */ jsx102("div", { className: `flex w-40 flex-col justify-start gap-y-2`, children: /* @__PURE__ */ jsx102(
7152
+ /* @__PURE__ */ jsx106(CommonEditorHeader, { type: t(`types.users`, { count: 1 }), name: user?.name }),
7153
+ /* @__PURE__ */ jsx106(Form, { ...form, children: /* @__PURE__ */ jsxs71("form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
7154
+ /* @__PURE__ */ jsxs71("div", { className: `flex flex-row gap-x-4`, children: [
7155
+ /* @__PURE__ */ jsx106("div", { className: `flex w-40 flex-col justify-start gap-y-2`, children: /* @__PURE__ */ jsx106(
6972
7156
  UserAvatarEditor,
6973
7157
  {
6974
7158
  user,
@@ -6978,8 +7162,8 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6978
7162
  setResetImage
6979
7163
  }
6980
7164
  ) }),
6981
- /* @__PURE__ */ jsxs69("div", { className: `flex w-full flex-col justify-start`, children: [
6982
- /* @__PURE__ */ jsx102(
7165
+ /* @__PURE__ */ jsxs71("div", { className: `flex w-full flex-col justify-start`, children: [
7166
+ /* @__PURE__ */ jsx106(
6983
7167
  FormInput,
6984
7168
  {
6985
7169
  form,
@@ -6988,7 +7172,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6988
7172
  placeholder: t(`foundations.user.fields.name.placeholder`)
6989
7173
  }
6990
7174
  ),
6991
- /* @__PURE__ */ jsx102(
7175
+ /* @__PURE__ */ jsx106(
6992
7176
  FormInput,
6993
7177
  {
6994
7178
  form,
@@ -6997,7 +7181,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6997
7181
  placeholder: t(`generic.fields.email.placeholder`)
6998
7182
  }
6999
7183
  ),
7000
- /* @__PURE__ */ jsx102(
7184
+ /* @__PURE__ */ jsx106(
7001
7185
  FormInput,
7002
7186
  {
7003
7187
  form,
@@ -7006,7 +7190,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
7006
7190
  placeholder: t(`foundations.user.fields.phone.placeholder`)
7007
7191
  }
7008
7192
  ),
7009
- /* @__PURE__ */ jsx102(
7193
+ /* @__PURE__ */ jsx106(
7010
7194
  FormPassword,
7011
7195
  {
7012
7196
  form,
@@ -7015,7 +7199,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
7015
7199
  placeholder: t(`foundations.user.fields.password.placeholder`)
7016
7200
  }
7017
7201
  ),
7018
- /* @__PURE__ */ jsx102(
7202
+ /* @__PURE__ */ jsx106(
7019
7203
  FormInput,
7020
7204
  {
7021
7205
  form,
@@ -7024,7 +7208,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
7024
7208
  placeholder: t(`foundations.user.fields.title.placeholder`)
7025
7209
  }
7026
7210
  ),
7027
- /* @__PURE__ */ jsx102(
7211
+ /* @__PURE__ */ jsx106(
7028
7212
  FormTextarea,
7029
7213
  {
7030
7214
  form,
@@ -7035,11 +7219,11 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
7035
7219
  }
7036
7220
  )
7037
7221
  ] }),
7038
- canChangeRoles && /* @__PURE__ */ jsxs69("div", { className: "flex w-1/3 flex-col", children: [
7039
- canChangeRoles && /* @__PURE__ */ jsx102(FormRoles, { form, id: "roleIds", name: t(`types.roles`, { count: 2 }), roles }),
7040
- !user && /* @__PURE__ */ jsxs69("div", { className: "flex flex-col gap-y-4", children: [
7041
- /* @__PURE__ */ jsx102("div", { className: "text-sm font-semibold", children: t(`foundations.user.send_activation_email`) }),
7042
- /* @__PURE__ */ jsx102(
7222
+ canChangeRoles && /* @__PURE__ */ jsxs71("div", { className: "flex w-1/3 flex-col", children: [
7223
+ canChangeRoles && /* @__PURE__ */ jsx106(FormRoles, { form, id: "roleIds", name: t(`types.roles`, { count: 2 }), roles }),
7224
+ !user && /* @__PURE__ */ jsxs71("div", { className: "flex flex-col gap-y-4", children: [
7225
+ /* @__PURE__ */ jsx106("div", { className: "text-sm font-semibold", children: t(`foundations.user.send_activation_email`) }),
7226
+ /* @__PURE__ */ jsx106(
7043
7227
  FormCheckbox,
7044
7228
  {
7045
7229
  form,
@@ -7050,8 +7234,8 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
7050
7234
  ] })
7051
7235
  ] })
7052
7236
  ] }),
7053
- /* @__PURE__ */ jsxs69("div", { className: "flex justify-end gap-x-4", children: [
7054
- user && currentUser?.roles.find((role) => role.id === getRoleId().Administrator) && /* @__PURE__ */ jsx102(
7237
+ /* @__PURE__ */ jsxs71("div", { className: "flex justify-end gap-x-4", children: [
7238
+ user && currentUser?.roles.find((role) => role.id === getRoleId().Administrator) && /* @__PURE__ */ jsx106(
7055
7239
  UserDeleter,
7056
7240
  {
7057
7241
  companyId: user.company?.id,
@@ -7062,7 +7246,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
7062
7246
  }
7063
7247
  }
7064
7248
  ),
7065
- /* @__PURE__ */ jsx102(CommonEditorButtons, { form, setOpen, isEdit: !!user })
7249
+ /* @__PURE__ */ jsx106(CommonEditorButtons, { form, setOpen, isEdit: !!user })
7066
7250
  ] })
7067
7251
  ] }) })
7068
7252
  ]
@@ -7079,18 +7263,18 @@ function UserEditor(props) {
7079
7263
  data: props.user
7080
7264
  }))
7081
7265
  return null;
7082
- return /* @__PURE__ */ jsx102(UserEditorInternal, { ...props });
7266
+ return /* @__PURE__ */ jsx106(UserEditorInternal, { ...props });
7083
7267
  }
7084
7268
  __name(UserEditor, "UserEditor");
7085
7269
 
7086
7270
  // src/features/user/components/forms/UserMultiSelect.tsx
7087
7271
  import { useCallback as useCallback14, useEffect as useEffect38, useRef as useRef15, useState as useState41 } from "react";
7088
7272
  import { useWatch as useWatch2 } from "react-hook-form";
7089
- import { jsx as jsx103, jsxs as jsxs70 } from "react/jsx-runtime";
7273
+ import { jsx as jsx107, jsxs as jsxs72 } from "react/jsx-runtime";
7090
7274
  function UserAvatarIcon({ className, url, name }) {
7091
- return /* @__PURE__ */ jsxs70(Avatar, { className: `${className || "h-4 w-4"}`, children: [
7092
- /* @__PURE__ */ jsx103(AvatarImage, { src: url }),
7093
- /* @__PURE__ */ jsx103(AvatarFallback, { children: name ? name.split(" ").map((n) => n.charAt(0).toUpperCase()).join("") : "U" })
7275
+ return /* @__PURE__ */ jsxs72(Avatar, { className: `${className || "h-4 w-4"}`, children: [
7276
+ /* @__PURE__ */ jsx107(AvatarImage, { src: url }),
7277
+ /* @__PURE__ */ jsx107(AvatarFallback, { children: name ? name.split(" ").map((n) => n.charAt(0).toUpperCase()).join("") : "U" })
7094
7278
  ] });
7095
7279
  }
7096
7280
  __name(UserAvatarIcon, "UserAvatarIcon");
@@ -7146,7 +7330,7 @@ function UserMultiSelect({
7146
7330
  const options = filteredUsers.map((user) => ({
7147
7331
  label: user.name,
7148
7332
  value: user.id,
7149
- icon: /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */ jsx103(UserAvatarIcon, { className, url: user.avatar, name: user.name }), "icon"),
7333
+ icon: /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */ jsx107(UserAvatarIcon, { className, url: user.avatar, name: user.name }), "icon"),
7150
7334
  userData: user
7151
7335
  }));
7152
7336
  setUserOptions(options);
@@ -7158,7 +7342,7 @@ function UserMultiSelect({
7158
7342
  const missingOptions = selectedUsers.filter((user) => !existingOptionIds.has(user.id)).map((user) => ({
7159
7343
  label: user.name,
7160
7344
  value: user.id,
7161
- icon: /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */ jsx103(UserAvatarIcon, { className, url: user.avatar, name: user.name }), "icon"),
7345
+ icon: /* @__PURE__ */ __name(({ className }) => /* @__PURE__ */ jsx107(UserAvatarIcon, { className, url: user.avatar, name: user.name }), "icon"),
7162
7346
  userData: user
7163
7347
  }));
7164
7348
  if (missingOptions.length > 0) {
@@ -7189,17 +7373,17 @@ function UserMultiSelect({
7189
7373
  }
7190
7374
  }, "handleValueChange");
7191
7375
  const selectedUserIds = selectedUsers.map((user) => user.id);
7192
- return /* @__PURE__ */ jsx103("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx103(
7376
+ return /* @__PURE__ */ jsx107("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx107(
7193
7377
  FormField,
7194
7378
  {
7195
7379
  control: form.control,
7196
7380
  name: id,
7197
- render: ({ field }) => /* @__PURE__ */ jsxs70(FormItem, { className: `${label ? "mb-5" : "mb-1"}`, children: [
7198
- label && /* @__PURE__ */ jsxs70(FormLabel, { className: "flex items-center", children: [
7381
+ render: ({ field }) => /* @__PURE__ */ jsxs72(FormItem, { className: `${label ? "mb-5" : "mb-1"}`, children: [
7382
+ label && /* @__PURE__ */ jsxs72(FormLabel, { className: "flex items-center", children: [
7199
7383
  label,
7200
- isRequired && /* @__PURE__ */ jsx103("span", { className: "text-destructive ml-2 font-semibold", children: "*" })
7384
+ isRequired && /* @__PURE__ */ jsx107("span", { className: "text-destructive ml-2 font-semibold", children: "*" })
7201
7385
  ] }),
7202
- /* @__PURE__ */ jsx103(FormControl, { children: /* @__PURE__ */ jsx103(
7386
+ /* @__PURE__ */ jsx107(FormControl, { children: /* @__PURE__ */ jsx107(
7203
7387
  MultiSelect,
7204
7388
  {
7205
7389
  options: userOptions,
@@ -7210,7 +7394,7 @@ function UserMultiSelect({
7210
7394
  animation: 0
7211
7395
  }
7212
7396
  ) }),
7213
- /* @__PURE__ */ jsx103(FormMessage, {})
7397
+ /* @__PURE__ */ jsx107(FormMessage, {})
7214
7398
  ] })
7215
7399
  }
7216
7400
  ) });
@@ -7219,12 +7403,12 @@ __name(UserMultiSelect, "UserMultiSelect");
7219
7403
 
7220
7404
  // src/features/user/components/forms/UserReactivator.tsx
7221
7405
  import { UserCheckIcon } from "lucide-react";
7222
- import { useTranslations as useTranslations55 } from "next-intl";
7406
+ import { useTranslations as useTranslations59 } from "next-intl";
7223
7407
  import { useState as useState42 } from "react";
7224
- import { jsx as jsx104, jsxs as jsxs71 } from "react/jsx-runtime";
7408
+ import { jsx as jsx108, jsxs as jsxs73 } from "react/jsx-runtime";
7225
7409
  function UserReactivatorInterface({ user, propagateChanges }) {
7226
7410
  const [open, setOpen] = useState42(false);
7227
- const t = useTranslations55();
7411
+ const t = useTranslations59();
7228
7412
  const reactivateUser = /* @__PURE__ */ __name(async () => {
7229
7413
  try {
7230
7414
  const updatedUser = await UserService.reactivate({ userId: user.id });
@@ -7234,20 +7418,20 @@ function UserReactivatorInterface({ user, propagateChanges }) {
7234
7418
  errorToast({ title: t(`generic.errors.error`), error });
7235
7419
  }
7236
7420
  }, "reactivateUser");
7237
- return /* @__PURE__ */ jsxs71(Dialog, { open, onOpenChange: setOpen, children: [
7238
- /* @__PURE__ */ jsx104(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs71(Button, { size: "sm", children: [
7239
- /* @__PURE__ */ jsx104(UserCheckIcon, { className: "mr-3 h-3.5 w-3.5" }),
7421
+ return /* @__PURE__ */ jsxs73(Dialog, { open, onOpenChange: setOpen, children: [
7422
+ /* @__PURE__ */ jsx108(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsxs73(Button, { size: "sm", children: [
7423
+ /* @__PURE__ */ jsx108(UserCheckIcon, { className: "mr-3 h-3.5 w-3.5" }),
7240
7424
  t(`foundations.user.buttons.reactivate`)
7241
7425
  ] }) }),
7242
- /* @__PURE__ */ jsxs71(DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
7243
- /* @__PURE__ */ jsxs71(DialogHeader, { children: [
7244
- /* @__PURE__ */ jsx104(DialogTitle, { children: t(`foundations.user.reactivate.title`) }),
7245
- /* @__PURE__ */ jsx104(DialogDescription, { children: t(`foundations.user.reactivate.subtitle`) })
7426
+ /* @__PURE__ */ jsxs73(DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
7427
+ /* @__PURE__ */ jsxs73(DialogHeader, { children: [
7428
+ /* @__PURE__ */ jsx108(DialogTitle, { children: t(`foundations.user.reactivate.title`) }),
7429
+ /* @__PURE__ */ jsx108(DialogDescription, { children: t(`foundations.user.reactivate.subtitle`) })
7246
7430
  ] }),
7247
7431
  t(`foundations.user.reactivate.description`, { name: user.name }),
7248
- /* @__PURE__ */ jsxs71("div", { className: "flex justify-end", children: [
7249
- /* @__PURE__ */ jsx104(Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`generic.buttons.cancel`) }),
7250
- /* @__PURE__ */ jsx104(
7432
+ /* @__PURE__ */ jsxs73("div", { className: "flex justify-end", children: [
7433
+ /* @__PURE__ */ jsx108(Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`generic.buttons.cancel`) }),
7434
+ /* @__PURE__ */ jsx108(
7251
7435
  Button,
7252
7436
  {
7253
7437
  type: "submit",
@@ -7266,19 +7450,19 @@ __name(UserReactivatorInterface, "UserReactivatorInterface");
7266
7450
  function UserReactivator(props) {
7267
7451
  const { hasPermissionToModule } = useCurrentUserContext();
7268
7452
  if (!hasPermissionToModule({ module: Modules.User, action: "update" /* Update */, data: props.user })) return null;
7269
- return /* @__PURE__ */ jsx104(UserReactivatorInterface, { ...props });
7453
+ return /* @__PURE__ */ jsx108(UserReactivatorInterface, { ...props });
7270
7454
  }
7271
7455
  __name(UserReactivator, "UserReactivator");
7272
7456
 
7273
7457
  // src/features/user/components/forms/UserResentInvitationEmail.tsx
7274
7458
  import { MailIcon } from "lucide-react";
7275
- import { useTranslations as useTranslations56 } from "next-intl";
7459
+ import { useTranslations as useTranslations60 } from "next-intl";
7276
7460
  import { useState as useState43 } from "react";
7277
7461
  import { toast as toast11 } from "sonner";
7278
- import { jsx as jsx105, jsxs as jsxs72 } from "react/jsx-runtime";
7462
+ import { jsx as jsx109, jsxs as jsxs74 } from "react/jsx-runtime";
7279
7463
  function UserResentInvitationEmailInternal({ user }) {
7280
7464
  const [open, setOpen] = useState43(false);
7281
- const t = useTranslations56();
7465
+ const t = useTranslations60();
7282
7466
  const sendInvitationEmail = /* @__PURE__ */ __name(async () => {
7283
7467
  try {
7284
7468
  await UserService.sendInvitation({ userId: user.id, companyId: user.company.id });
@@ -7290,20 +7474,20 @@ function UserResentInvitationEmailInternal({ user }) {
7290
7474
  errorToast({ title: t(`generic.errors.error`), error });
7291
7475
  }
7292
7476
  }, "sendInvitationEmail");
7293
- return /* @__PURE__ */ jsxs72(Dialog, { open, onOpenChange: setOpen, children: [
7294
- /* @__PURE__ */ jsxs72(Tooltip, { children: [
7295
- /* @__PURE__ */ jsx105(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx105(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx105(Button, { size: "sm", variant: `ghost`, className: "text-muted-foreground", children: /* @__PURE__ */ jsx105(MailIcon, {}) }) }) }),
7296
- /* @__PURE__ */ jsx105(TooltipContent, { children: t(`foundations.user.buttons.resend_activation`) })
7477
+ return /* @__PURE__ */ jsxs74(Dialog, { open, onOpenChange: setOpen, children: [
7478
+ /* @__PURE__ */ jsxs74(Tooltip, { children: [
7479
+ /* @__PURE__ */ jsx109(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx109(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx109(Button, { size: "sm", variant: `ghost`, className: "text-muted-foreground", children: /* @__PURE__ */ jsx109(MailIcon, {}) }) }) }),
7480
+ /* @__PURE__ */ jsx109(TooltipContent, { children: t(`foundations.user.buttons.resend_activation`) })
7297
7481
  ] }),
7298
- /* @__PURE__ */ jsxs72(DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
7299
- /* @__PURE__ */ jsxs72(DialogHeader, { children: [
7300
- /* @__PURE__ */ jsx105(DialogTitle, { children: t(`foundations.user.resend_activation.title`) }),
7301
- /* @__PURE__ */ jsx105(DialogDescription, { children: t(`foundations.user.resend_activation.subtitle`) })
7482
+ /* @__PURE__ */ jsxs74(DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
7483
+ /* @__PURE__ */ jsxs74(DialogHeader, { children: [
7484
+ /* @__PURE__ */ jsx109(DialogTitle, { children: t(`foundations.user.resend_activation.title`) }),
7485
+ /* @__PURE__ */ jsx109(DialogDescription, { children: t(`foundations.user.resend_activation.subtitle`) })
7302
7486
  ] }),
7303
7487
  t(`foundations.user.resend_activation.description`, { email: user.email }),
7304
- /* @__PURE__ */ jsxs72("div", { className: "flex justify-end", children: [
7305
- /* @__PURE__ */ jsx105(Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`generic.buttons.cancel`) }),
7306
- /* @__PURE__ */ jsx105(
7488
+ /* @__PURE__ */ jsxs74("div", { className: "flex justify-end", children: [
7489
+ /* @__PURE__ */ jsx109(Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`generic.buttons.cancel`) }),
7490
+ /* @__PURE__ */ jsx109(
7307
7491
  Button,
7308
7492
  {
7309
7493
  type: "submit",
@@ -7322,17 +7506,17 @@ __name(UserResentInvitationEmailInternal, "UserResentInvitationEmailInternal");
7322
7506
  function UserResentInvitationEmail(props) {
7323
7507
  const { hasPermissionToModule } = useCurrentUserContext();
7324
7508
  if (!hasPermissionToModule({ module: Modules.User, action: "update" /* Update */, data: props.user })) return null;
7325
- return /* @__PURE__ */ jsx105(UserResentInvitationEmailInternal, { ...props });
7509
+ return /* @__PURE__ */ jsx109(UserResentInvitationEmailInternal, { ...props });
7326
7510
  }
7327
7511
  __name(UserResentInvitationEmail, "UserResentInvitationEmail");
7328
7512
 
7329
7513
  // src/features/user/components/forms/UserSelector.tsx
7330
7514
  import { CircleX, RefreshCwIcon, SearchIcon, XIcon as XIcon2 } from "lucide-react";
7331
- import { useTranslations as useTranslations57 } from "next-intl";
7515
+ import { useTranslations as useTranslations61 } from "next-intl";
7332
7516
  import { useCallback as useCallback15, useEffect as useEffect39, useRef as useRef16, useState as useState44 } from "react";
7333
- import { Fragment as Fragment30, jsx as jsx106, jsxs as jsxs73 } from "react/jsx-runtime";
7517
+ import { Fragment as Fragment31, jsx as jsx110, jsxs as jsxs75 } from "react/jsx-runtime";
7334
7518
  function UserSelector({ id, form, label, placeholder, onChange, isRequired = false }) {
7335
- const t = useTranslations57();
7519
+ const t = useTranslations61();
7336
7520
  const [open, setOpen] = useState44(false);
7337
7521
  const searchTermRef = useRef16("");
7338
7522
  const [searchTerm, setSearchTerm] = useState44("");
@@ -7375,26 +7559,26 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
7375
7559
  setOpen(false);
7376
7560
  }, 0);
7377
7561
  }, "setUser");
7378
- return /* @__PURE__ */ jsx106("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx106(
7562
+ return /* @__PURE__ */ jsx110("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx110(
7379
7563
  FormField,
7380
7564
  {
7381
7565
  control: form.control,
7382
7566
  name: id,
7383
- render: ({ field }) => /* @__PURE__ */ jsxs73(FormItem, { className: `${label ? "mb-5" : "mb-1"}`, children: [
7384
- label && /* @__PURE__ */ jsxs73(FormLabel, { className: "flex items-center", children: [
7567
+ render: ({ field }) => /* @__PURE__ */ jsxs75(FormItem, { className: `${label ? "mb-5" : "mb-1"}`, children: [
7568
+ label && /* @__PURE__ */ jsxs75(FormLabel, { className: "flex items-center", children: [
7385
7569
  label,
7386
- isRequired && /* @__PURE__ */ jsx106("span", { className: "text-destructive ml-2 font-semibold", children: "*" })
7570
+ isRequired && /* @__PURE__ */ jsx110("span", { className: "text-destructive ml-2 font-semibold", children: "*" })
7387
7571
  ] }),
7388
- /* @__PURE__ */ jsx106(FormControl, { children: /* @__PURE__ */ jsxs73(Popover, { open, onOpenChange: setOpen, modal: true, children: [
7389
- /* @__PURE__ */ jsxs73("div", { className: "flex w-full flex-row items-center justify-between", children: [
7390
- /* @__PURE__ */ jsx106(PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ jsx106("div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ jsx106(Fragment30, { children: /* @__PURE__ */ jsxs73("div", { className: "flex w-full flex-row items-center justify-start rounded-md border p-2", children: [
7391
- /* @__PURE__ */ jsx106("div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ jsxs73(Avatar, { className: `mr-2 h-6 w-6`, children: [
7392
- /* @__PURE__ */ jsx106(AvatarImage, { src: field.value?.avatar }),
7393
- /* @__PURE__ */ jsx106(AvatarFallback, { children: field.value?.name ? field.value?.name.split(" ").map((name) => name.charAt(0).toUpperCase()) : "X" })
7572
+ /* @__PURE__ */ jsx110(FormControl, { children: /* @__PURE__ */ jsxs75(Popover, { open, onOpenChange: setOpen, modal: true, children: [
7573
+ /* @__PURE__ */ jsxs75("div", { className: "flex w-full flex-row items-center justify-between", children: [
7574
+ /* @__PURE__ */ jsx110(PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ jsx110("div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ jsx110(Fragment31, { children: /* @__PURE__ */ jsxs75("div", { className: "flex w-full flex-row items-center justify-start rounded-md border p-2", children: [
7575
+ /* @__PURE__ */ jsx110("div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ jsxs75(Avatar, { className: `mr-2 h-6 w-6`, children: [
7576
+ /* @__PURE__ */ jsx110(AvatarImage, { src: field.value?.avatar }),
7577
+ /* @__PURE__ */ jsx110(AvatarFallback, { children: field.value?.name ? field.value?.name.split(" ").map((name) => name.charAt(0).toUpperCase()) : "X" })
7394
7578
  ] }) }),
7395
- /* @__PURE__ */ jsx106("span", { className: "", children: field.value?.name ?? "" })
7396
- ] }) }) : /* @__PURE__ */ jsx106("div", { className: "text-muted-foreground mr-7 flex h-10 w-full flex-row items-center justify-start rounded-md border p-2 text-sm", children: placeholder ?? t(`generic.search.placeholder`, { type: t(`types.users`, { count: 1 }) }) }) }) }),
7397
- field.value && /* @__PURE__ */ jsx106(
7579
+ /* @__PURE__ */ jsx110("span", { className: "", children: field.value?.name ?? "" })
7580
+ ] }) }) : /* @__PURE__ */ jsx110("div", { className: "text-muted-foreground mr-7 flex h-10 w-full flex-row items-center justify-start rounded-md border p-2 text-sm", children: placeholder ?? t(`generic.search.placeholder`, { type: t(`types.users`, { count: 1 }) }) }) }) }),
7581
+ field.value && /* @__PURE__ */ jsx110(
7398
7582
  CircleX,
7399
7583
  {
7400
7584
  className: "text-muted hover:text-destructive ml-2 h-6 w-6 cursor-pointer",
@@ -7402,10 +7586,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
7402
7586
  }
7403
7587
  )
7404
7588
  ] }),
7405
- /* @__PURE__ */ jsx106(PopoverContent, { children: /* @__PURE__ */ jsxs73(Command, { shouldFilter: false, children: [
7406
- /* @__PURE__ */ jsxs73("div", { className: "relative mb-2 w-full", children: [
7407
- /* @__PURE__ */ jsx106(SearchIcon, { className: "text-muted-foreground absolute top-2.5 left-2.5 h-4 w-4" }),
7408
- /* @__PURE__ */ jsx106(
7589
+ /* @__PURE__ */ jsx110(PopoverContent, { children: /* @__PURE__ */ jsxs75(Command, { shouldFilter: false, children: [
7590
+ /* @__PURE__ */ jsxs75("div", { className: "relative mb-2 w-full", children: [
7591
+ /* @__PURE__ */ jsx110(SearchIcon, { className: "text-muted-foreground absolute top-2.5 left-2.5 h-4 w-4" }),
7592
+ /* @__PURE__ */ jsx110(
7409
7593
  Input,
7410
7594
  {
7411
7595
  placeholder: t(`generic.search.placeholder`, { type: t(`types.users`, { count: 1 }) }),
@@ -7415,7 +7599,7 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
7415
7599
  value: searchTerm
7416
7600
  }
7417
7601
  ),
7418
- isSearching ? /* @__PURE__ */ jsx106(RefreshCwIcon, { className: "text-muted-foreground absolute top-2.5 right-2.5 h-4 w-4 animate-spin" }) : searchTermRef.current ? /* @__PURE__ */ jsx106(
7602
+ isSearching ? /* @__PURE__ */ jsx110(RefreshCwIcon, { className: "text-muted-foreground absolute top-2.5 right-2.5 h-4 w-4 animate-spin" }) : searchTermRef.current ? /* @__PURE__ */ jsx110(
7419
7603
  XIcon2,
7420
7604
  {
7421
7605
  className: `absolute top-2.5 right-2.5 h-4 w-4 ${searchTermRef.current ? "cursor-pointer" : "text-muted-foreground"}`,
@@ -7424,15 +7608,15 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
7424
7608
  search("");
7425
7609
  }
7426
7610
  }
7427
- ) : /* @__PURE__ */ jsx106(Fragment30, {})
7611
+ ) : /* @__PURE__ */ jsx110(Fragment31, {})
7428
7612
  ] }),
7429
- /* @__PURE__ */ jsx106(CommandList, { children: data.data && data.data.length > 0 && data.data.map((user) => /* @__PURE__ */ jsxs73(CommandItem, { className: "cursor-pointer", onSelect: () => setUser(user), children: [
7430
- /* @__PURE__ */ jsx106(UserAvatar, { user, className: `mr-2 h-4 w-4` }),
7431
- /* @__PURE__ */ jsx106("span", { className: "", children: user.name })
7613
+ /* @__PURE__ */ jsx110(CommandList, { children: data.data && data.data.length > 0 && data.data.map((user) => /* @__PURE__ */ jsxs75(CommandItem, { className: "cursor-pointer", onSelect: () => setUser(user), children: [
7614
+ /* @__PURE__ */ jsx110(UserAvatar, { user, className: `mr-2 h-4 w-4` }),
7615
+ /* @__PURE__ */ jsx110("span", { className: "", children: user.name })
7432
7616
  ] }, user.id)) })
7433
7617
  ] }) })
7434
7618
  ] }) }),
7435
- /* @__PURE__ */ jsx106(FormMessage, {})
7619
+ /* @__PURE__ */ jsx110(FormMessage, {})
7436
7620
  ] })
7437
7621
  }
7438
7622
  ) });
@@ -7440,12 +7624,12 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
7440
7624
  __name(UserSelector, "UserSelector");
7441
7625
 
7442
7626
  // src/features/user/contexts/UserContext.tsx
7443
- import { jsx as jsx107 } from "react/jsx-runtime";
7627
+ import { jsx as jsx111 } from "react/jsx-runtime";
7444
7628
  var UserContext = createContext8(void 0);
7445
7629
  var UserProvider = /* @__PURE__ */ __name(({ children, dehydratedUser }) => {
7446
7630
  const generateUrl = usePageUrlGenerator();
7447
7631
  const { hasPermissionToModule } = useCurrentUserContext();
7448
- const t = useTranslations58();
7632
+ const t = useTranslations62();
7449
7633
  const [user, setUser] = useState45(
7450
7634
  dehydratedUser ? rehydrate(Modules.User, dehydratedUser) : void 0
7451
7635
  );
@@ -7476,18 +7660,18 @@ var UserProvider = /* @__PURE__ */ __name(({ children, dehydratedUser }) => {
7476
7660
  if (user) {
7477
7661
  response.element = `${user.name}${user.isDeleted ? ` (${t(`foundations.user.deleted`)})` : ""}`;
7478
7662
  if (user.isDeleted) {
7479
- functions.push(/* @__PURE__ */ jsx107(UserReactivator, { user, propagateChanges: setUser }, `UserReactivator`));
7663
+ functions.push(/* @__PURE__ */ jsx111(UserReactivator, { user, propagateChanges: setUser }, `UserReactivator`));
7480
7664
  } else {
7481
7665
  if (!user.isActivated)
7482
- functions.push(/* @__PURE__ */ jsx107(UserResentInvitationEmail, { user }, `UserResentInvitationEmail`));
7483
- functions.push(/* @__PURE__ */ jsx107(UserDeleter, { user }, `UserDeleter`));
7666
+ functions.push(/* @__PURE__ */ jsx111(UserResentInvitationEmail, { user }, `UserResentInvitationEmail`));
7667
+ functions.push(/* @__PURE__ */ jsx111(UserDeleter, { user }, `UserDeleter`));
7484
7668
  }
7485
- functions.push(/* @__PURE__ */ jsx107(UserEditor, { user, propagateChanges: setUser }, `UserEditor`));
7669
+ functions.push(/* @__PURE__ */ jsx111(UserEditor, { user, propagateChanges: setUser }, `UserEditor`));
7486
7670
  }
7487
7671
  if (functions.length > 0) response.functions = functions;
7488
7672
  return response;
7489
7673
  }, "title");
7490
- return /* @__PURE__ */ jsx107(SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ jsx107(
7674
+ return /* @__PURE__ */ jsx111(SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ jsx111(
7491
7675
  UserContext.Provider,
7492
7676
  {
7493
7677
  value: {
@@ -7507,7 +7691,7 @@ var useUserContext = /* @__PURE__ */ __name(() => {
7507
7691
  }, "useUserContext");
7508
7692
 
7509
7693
  // src/features/company/contexts/CompanyContext.tsx
7510
- import { jsx as jsx108 } from "react/jsx-runtime";
7694
+ import { jsx as jsx112 } from "react/jsx-runtime";
7511
7695
  var CompanyContext = createContext9(void 0);
7512
7696
  var defaultContextValue = {
7513
7697
  company: void 0,
@@ -7516,7 +7700,7 @@ var defaultContextValue = {
7516
7700
  };
7517
7701
  var CompanyProvider = /* @__PURE__ */ __name(({ children, dehydratedCompany }) => {
7518
7702
  const generateUrl = usePageUrlGenerator();
7519
- const t = useTranslations59();
7703
+ const t = useTranslations63();
7520
7704
  const { hasPermissionToModule, hasRole } = useCurrentUserContext();
7521
7705
  const [company, setCompany] = useState46(
7522
7706
  dehydratedCompany ? rehydrate(Modules.Company, dehydratedCompany) : void 0
@@ -7537,15 +7721,15 @@ var CompanyProvider = /* @__PURE__ */ __name(({ children, dehydratedCompany }) =
7537
7721
  if (company) response.element = company.name;
7538
7722
  const functions = [];
7539
7723
  if (company && hasRole(getRoleId().Administrator) && hasPermissionToModule({ module: Modules.Company, action: "delete" /* Delete */ }))
7540
- functions.push(/* @__PURE__ */ jsx108(CompanyDeleter, { company }, "companyDeleter"));
7724
+ functions.push(/* @__PURE__ */ jsx112(CompanyDeleter, { company }, "companyDeleter"));
7541
7725
  if (hasRole(getRoleId().Administrator) || hasPermissionToModule({ module: Modules.Company, action: "update" /* Update */ })) {
7542
- if (company) functions.push(/* @__PURE__ */ jsx108(CompanyConfigurationEditor, { company }, "companyConfigurationEditor"));
7543
- functions.push(/* @__PURE__ */ jsx108(CompanyEditor, { company, propagateChanges: setCompany }, "companyEditor"));
7726
+ if (company) functions.push(/* @__PURE__ */ jsx112(CompanyConfigurationEditor, { company }, "companyConfigurationEditor"));
7727
+ functions.push(/* @__PURE__ */ jsx112(CompanyEditor, { company, propagateChanges: setCompany }, "companyEditor"));
7544
7728
  }
7545
7729
  if (functions.length > 0) response.functions = functions;
7546
7730
  return response;
7547
7731
  }, "title");
7548
- return /* @__PURE__ */ jsx108(SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ jsx108(
7732
+ return /* @__PURE__ */ jsx112(SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ jsx112(
7549
7733
  CompanyContext.Provider,
7550
7734
  {
7551
7735
  value: {
@@ -7561,13 +7745,13 @@ var useCompanyContext = /* @__PURE__ */ __name(() => {
7561
7745
  }, "useCompanyContext");
7562
7746
 
7563
7747
  // src/contexts/CommonContext.tsx
7564
- import { useTranslations as useTranslations60 } from "next-intl";
7748
+ import { useTranslations as useTranslations64 } from "next-intl";
7565
7749
  import { createContext as createContext10, useContext as useContext10 } from "react";
7566
- import { jsx as jsx109 } from "react/jsx-runtime";
7750
+ import { jsx as jsx113 } from "react/jsx-runtime";
7567
7751
  var CommonContext = createContext10(void 0);
7568
7752
  var CommonProvider = /* @__PURE__ */ __name(({ children }) => {
7569
7753
  const { company } = useCurrentUserContext();
7570
- const t = useTranslations60();
7754
+ const t = useTranslations64();
7571
7755
  const breadcrumb = /* @__PURE__ */ __name(() => {
7572
7756
  const response = [];
7573
7757
  return response;
@@ -7579,7 +7763,7 @@ var CommonProvider = /* @__PURE__ */ __name(({ children }) => {
7579
7763
  if (company) response.element = company.name;
7580
7764
  return response;
7581
7765
  }, "title");
7582
- return /* @__PURE__ */ jsx109(SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ jsx109(CommonContext.Provider, { value: {}, children }) });
7766
+ return /* @__PURE__ */ jsx113(SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ jsx113(CommonContext.Provider, { value: {}, children }) });
7583
7767
  }, "CommonProvider");
7584
7768
  var useCommonContext = /* @__PURE__ */ __name(() => {
7585
7769
  const context = useContext10(CommonContext);
@@ -7591,7 +7775,7 @@ var useCommonContext = /* @__PURE__ */ __name(() => {
7591
7775
 
7592
7776
  // src/contexts/SocketContext.tsx
7593
7777
  import { createContext as createContext11, useContext as useContext11 } from "react";
7594
- import { jsx as jsx110 } from "react/jsx-runtime";
7778
+ import { jsx as jsx114 } from "react/jsx-runtime";
7595
7779
  var defaultContextValue2 = {
7596
7780
  socket: null,
7597
7781
  isConnected: false,
@@ -7623,7 +7807,7 @@ var SocketProvider = /* @__PURE__ */ __name(({ token, children }) => {
7623
7807
  ...socketHookData || {},
7624
7808
  sendMessage
7625
7809
  };
7626
- return /* @__PURE__ */ jsx110(SocketContext.Provider, { value, children });
7810
+ return /* @__PURE__ */ jsx114(SocketContext.Provider, { value, children });
7627
7811
  }, "SocketProvider");
7628
7812
  var useSocketContext = /* @__PURE__ */ __name(() => {
7629
7813
  const context = useContext11(SocketContext);
@@ -7755,6 +7939,7 @@ export {
7755
7939
  useRoleTableStructure,
7756
7940
  useUserSearch,
7757
7941
  useUserTableStructure,
7942
+ useContentTableStructure,
7758
7943
  ContentTableSearch,
7759
7944
  ContentListTable,
7760
7945
  AuthContainer,
@@ -7767,6 +7952,9 @@ export {
7767
7952
  Logout,
7768
7953
  RefreshUser,
7769
7954
  ResetPassword,
7955
+ ContentsList,
7956
+ ContentsListById,
7957
+ RelevantContentsList,
7770
7958
  NotificationErrorBoundary,
7771
7959
  NotificationsList,
7772
7960
  NotificationsListContainer,
@@ -7780,4 +7968,4 @@ export {
7780
7968
  RolesList,
7781
7969
  UserRolesList
7782
7970
  };
7783
- //# sourceMappingURL=chunk-3APORDYP.mjs.map
7971
+ //# sourceMappingURL=chunk-HP4Q5ZVG.mjs.map