@carlonicora/nextjs-jsonapi 1.29.2 → 1.29.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BlockNoteEditor-GNFK7ZVR.mjs → BlockNoteEditor-G532N3N7.mjs} +6 -6
- package/dist/BlockNoteEditor-G532N3N7.mjs.map +1 -0
- package/dist/{BlockNoteEditor-BEWKLGW3.js → BlockNoteEditor-XWHUG6VH.js} +10 -10
- package/dist/BlockNoteEditor-XWHUG6VH.js.map +1 -0
- package/dist/billing/index.js +291 -291
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-XU4MY6OG.js → chunk-ALGMJ4JS.js} +666 -688
- package/dist/chunk-ALGMJ4JS.js.map +1 -0
- package/dist/{chunk-IJSB4FH6.mjs → chunk-CWY6AL4V.mjs} +501 -523
- package/dist/chunk-CWY6AL4V.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/details/AllowedUsersDetails.tsx +1 -1
- package/src/components/editors/BlockNoteEditor.tsx +5 -5
- package/src/components/forms/CommonAssociationForm.tsx +9 -9
- package/src/components/forms/CommonDeleter.tsx +14 -8
- package/src/components/forms/CommonEditorButtons.tsx +2 -2
- package/src/components/forms/CommonEditorHeader.tsx +4 -4
- package/src/components/forms/CommonEditorTrigger.tsx +1 -1
- package/src/components/forms/FileUploader.tsx +8 -8
- package/src/components/forms/FormDateTime.tsx +6 -12
- package/src/components/forms/FormInput.tsx +4 -20
- package/src/components/forms/PasswordInput.tsx +1 -1
- package/src/components/navigations/Breadcrumb.tsx +1 -1
- package/src/components/navigations/Header.tsx +2 -2
- package/src/components/navigations/RecentPagesNavigator.tsx +3 -3
- package/src/components/tables/ContentTableSearch.tsx +1 -1
- package/src/contexts/CommonContext.tsx +2 -2
- package/src/features/auth/components/details/LandingComponent.tsx +5 -5
- package/src/features/auth/components/forms/AcceptInvitation.tsx +16 -22
- package/src/features/auth/components/forms/ActivateAccount.tsx +8 -8
- package/src/features/auth/components/forms/ForgotPassword.tsx +9 -9
- package/src/features/auth/components/forms/Login.tsx +12 -12
- package/src/features/auth/components/forms/Register.tsx +19 -21
- package/src/features/auth/components/forms/ResetPassword.tsx +12 -18
- package/src/features/company/components/details/TokenStatusIndicator.tsx +7 -7
- package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +2 -2
- package/src/features/company/components/forms/CompanyDeleter.tsx +13 -11
- package/src/features/company/components/forms/CompanyEditor.tsx +7 -13
- package/src/features/company/components/lists/CompaniesList.tsx +1 -1
- package/src/features/company/contexts/CompanyContext.tsx +1 -1
- package/src/features/company/hooks/useCompanyTableStructure.tsx +2 -2
- package/src/features/content/components/lists/ContentsList.tsx +1 -1
- package/src/features/content/components/lists/ContentsListById.tsx +1 -1
- package/src/features/content/components/lists/RelevantContentsList.tsx +1 -1
- package/src/features/content/hooks/useContentTableStructure.tsx +5 -5
- package/src/features/notification/components/containers/NotificationsListContainer.tsx +2 -2
- package/src/features/notification/components/lists/NotificationsList.tsx +3 -3
- package/src/features/notification/components/modals/NotificationModal.tsx +3 -5
- package/src/features/notification/components/notifications/Notification.tsx +4 -4
- package/src/features/notification/contexts/NotificationContext.tsx +2 -2
- package/src/features/role/components/details/RoleDetails.tsx +1 -1
- package/src/features/role/components/forms/FormRoles.tsx +2 -2
- package/src/features/role/components/forms/RemoveUserFromRole.tsx +9 -11
- package/src/features/role/components/forms/UserRoleAdd.tsx +18 -18
- package/src/features/role/components/lists/RolesList.tsx +1 -1
- package/src/features/role/components/lists/UserRolesList.tsx +1 -1
- package/src/features/role/contexts/RoleContext.tsx +2 -2
- package/src/features/role/hooks/useRoleTableStructure.tsx +3 -3
- package/src/features/user/components/containers/UsersListContainer.tsx +2 -2
- package/src/features/user/components/details/UserDetails.tsx +6 -6
- package/src/features/user/components/forms/RoleUserAdd.tsx +8 -8
- package/src/features/user/components/forms/UserAvatarEditor.tsx +2 -2
- package/src/features/user/components/forms/UserEditor.tsx +21 -25
- package/src/features/user/components/forms/UserReactivator.tsx +7 -7
- package/src/features/user/components/forms/UserResentInvitationEmail.tsx +9 -9
- package/src/features/user/components/forms/UserSelector.tsx +4 -9
- package/src/features/user/components/lists/AdminUsersList.tsx +1 -1
- package/src/features/user/components/lists/CompanyUsersList.tsx +1 -1
- package/src/features/user/components/lists/RelevantUsersList.tsx +1 -1
- package/src/features/user/components/lists/RoleUsersList.tsx +1 -1
- package/src/features/user/components/lists/UsersList.tsx +1 -1
- package/src/features/user/components/lists/UsersListByContentIds.tsx +1 -1
- package/src/features/user/components/widgets/UserSearchPopover.tsx +3 -3
- package/src/features/user/contexts/UserContext.tsx +5 -5
- package/src/features/user/hooks/useUserTableStructure.tsx +6 -6
- package/src/hooks/useDataListRetriever.ts +12 -0
- package/dist/BlockNoteEditor-BEWKLGW3.js.map +0 -1
- package/dist/BlockNoteEditor-GNFK7ZVR.mjs.map +0 -1
- package/dist/chunk-IJSB4FH6.mjs.map +0 -1
- package/dist/chunk-XU4MY6OG.js.map +0 -1
|
@@ -180,6 +180,7 @@ function useDataListRetriever(params) {
|
|
|
180
180
|
const requestIdRef = _react.useRef.call(void 0, 0);
|
|
181
181
|
const abortControllerRef = _react.useRef.call(void 0, null);
|
|
182
182
|
const isFetchingRef = _react.useRef.call(void 0, false);
|
|
183
|
+
const isPaginatingRef = _react.useRef.call(void 0, false);
|
|
183
184
|
const resolvedType = params.module;
|
|
184
185
|
const resolvedService = _chunkUYBCHXXLjs.ClientAbstractService;
|
|
185
186
|
const parsePageParams = _react.useCallback.call(void 0, (url) => {
|
|
@@ -235,13 +236,19 @@ function useDataListRetriever(params) {
|
|
|
235
236
|
const fetchData = _react.useCallback.call(void 0,
|
|
236
237
|
async (fetchParams) => {
|
|
237
238
|
if (ready === false) return;
|
|
238
|
-
if (
|
|
239
|
+
if ((_optionalChain([fetchParams, 'optionalAccess', _2 => _2.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _3 => _3.callPrevious])) && isPaginatingRef.current) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (isFetchingRef.current && !_optionalChain([fetchParams, 'optionalAccess', _4 => _4.callNext]) && !_optionalChain([fetchParams, 'optionalAccess', _5 => _5.callPrevious])) return;
|
|
243
|
+
if (_optionalChain([fetchParams, 'optionalAccess', _6 => _6.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _7 => _7.callPrevious])) {
|
|
244
|
+
isPaginatingRef.current = true;
|
|
245
|
+
}
|
|
239
246
|
const thisRequestId = ++requestIdRef.current;
|
|
240
247
|
isFetchingRef.current = true;
|
|
241
|
-
if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess',
|
|
248
|
+
if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess', _8 => _8.isRefine]) !== true && _optionalChain([fetchParams, 'optionalAccess', _9 => _9.isRefresh]) !== true) {
|
|
242
249
|
return;
|
|
243
250
|
}
|
|
244
|
-
if (!nextPage && !previousPage && isLoaded && _optionalChain([fetchParams, 'optionalAccess',
|
|
251
|
+
if (!nextPage && !previousPage && isLoaded && _optionalChain([fetchParams, 'optionalAccess', _10 => _10.callNext]) !== true && _optionalChain([fetchParams, 'optionalAccess', _11 => _11.callPrevious]) !== true && params.search === searchTermRef.current) {
|
|
245
252
|
return;
|
|
246
253
|
}
|
|
247
254
|
const currentSearchTerm = searchTermRef.current;
|
|
@@ -251,7 +258,7 @@ function useDataListRetriever(params) {
|
|
|
251
258
|
const nextRef = { next: void 0 };
|
|
252
259
|
const previousRef = { previous: void 0 };
|
|
253
260
|
const selfRef = { self: void 0 };
|
|
254
|
-
if (nextPage && _optionalChain([fetchParams, 'optionalAccess',
|
|
261
|
+
if (nextPage && _optionalChain([fetchParams, 'optionalAccess', _12 => _12.callNext]) && _optionalChain([fetchParams, 'optionalAccess', _13 => _13.isRefine]) !== true) {
|
|
255
262
|
const ServiceClass = stableParams.service;
|
|
256
263
|
response = await ServiceClass.next({
|
|
257
264
|
type: stableParams.type,
|
|
@@ -260,7 +267,7 @@ function useDataListRetriever(params) {
|
|
|
260
267
|
previous: previousRef,
|
|
261
268
|
self: selfRef
|
|
262
269
|
});
|
|
263
|
-
} else if (previousPage && _optionalChain([fetchParams, 'optionalAccess',
|
|
270
|
+
} else if (previousPage && _optionalChain([fetchParams, 'optionalAccess', _14 => _14.callPrevious]) && _optionalChain([fetchParams, 'optionalAccess', _15 => _15.isRefine]) !== true) {
|
|
264
271
|
const ServiceClass = stableParams.service;
|
|
265
272
|
response = await ServiceClass.previous({
|
|
266
273
|
type: stableParams.type,
|
|
@@ -281,8 +288,8 @@ function useDataListRetriever(params) {
|
|
|
281
288
|
retrieverParams.self = selfRef;
|
|
282
289
|
response = await stableParams.retriever(retrieverParams);
|
|
283
290
|
}
|
|
284
|
-
if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access',
|
|
285
|
-
if (_optionalChain([fetchParams, 'optionalAccess',
|
|
291
|
+
if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access', _16 => _16.current, 'optionalAccess', _17 => _17.signal, 'access', _18 => _18.aborted])) {
|
|
292
|
+
if (_optionalChain([fetchParams, 'optionalAccess', _19 => _19.isRefresh]) === true) {
|
|
286
293
|
setData(response);
|
|
287
294
|
} else {
|
|
288
295
|
setData((prevData) => [...prevData ? prevData : [], ...response]);
|
|
@@ -299,6 +306,7 @@ function useDataListRetriever(params) {
|
|
|
299
306
|
} finally {
|
|
300
307
|
if (thisRequestId === requestIdRef.current) {
|
|
301
308
|
isFetchingRef.current = false;
|
|
309
|
+
isPaginatingRef.current = false;
|
|
302
310
|
}
|
|
303
311
|
}
|
|
304
312
|
},
|
|
@@ -525,7 +533,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
525
533
|
});
|
|
526
534
|
const typeColorMap = /* @__PURE__ */ new Map();
|
|
527
535
|
Array.from(groupTypes).forEach((type, index) => {
|
|
528
|
-
if (type === _optionalChain([nodes, 'access',
|
|
536
|
+
if (type === _optionalChain([nodes, 'access', _20 => _20[0], 'optionalAccess', _21 => _21.instanceType])) {
|
|
529
537
|
typeColorMap.set(type, accentColor);
|
|
530
538
|
} else if (type === "documents" || type === "articles" || type === "hyperlinks") {
|
|
531
539
|
typeColorMap.set(type, contentColor);
|
|
@@ -568,7 +576,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
568
576
|
});
|
|
569
577
|
const svg = d3.select(svgRef.current);
|
|
570
578
|
svg.selectAll("*").remove();
|
|
571
|
-
const container = _optionalChain([svgRef, 'access',
|
|
579
|
+
const container = _optionalChain([svgRef, 'access', _22 => _22.current, 'optionalAccess', _23 => _23.parentElement]);
|
|
572
580
|
if (!container) return;
|
|
573
581
|
const width = container.clientWidth;
|
|
574
582
|
const height = container.clientHeight;
|
|
@@ -611,7 +619,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
611
619
|
sourceNode.children.push(targetId);
|
|
612
620
|
}
|
|
613
621
|
});
|
|
614
|
-
const rootChildren = _optionalChain([nodeHierarchy, 'access',
|
|
622
|
+
const rootChildren = _optionalChain([nodeHierarchy, 'access', _24 => _24.get, 'call', _25 => _25(centralNodeId), 'optionalAccess', _26 => _26.children]) || [];
|
|
615
623
|
const childAngleStep = 2 * Math.PI / Math.max(rootChildren.length, 1);
|
|
616
624
|
rootChildren.forEach((childId, index) => {
|
|
617
625
|
const childNode = nodeHierarchy.get(childId);
|
|
@@ -727,7 +735,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, loadingNode
|
|
|
727
735
|
if (d.instanceType === "root") return;
|
|
728
736
|
const currentNode = d3.select(this);
|
|
729
737
|
currentNode.raise();
|
|
730
|
-
const currentZoom = _optionalChain([zoomRef, 'access',
|
|
738
|
+
const currentZoom = _optionalChain([zoomRef, 'access', _27 => _27.current, 'optionalAccess', _28 => _28.k]) || 1;
|
|
731
739
|
const targetScreenFontSize = 20;
|
|
732
740
|
const baseFontSize = 12;
|
|
733
741
|
const textScale = targetScreenFontSize / (baseFontSize * currentZoom);
|
|
@@ -934,23 +942,23 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
934
942
|
);
|
|
935
943
|
const matchedModuleKey = moduleKeys.find((key) => {
|
|
936
944
|
const descriptor2 = Object.getOwnPropertyDescriptor(_chunkUYBCHXXLjs.Modules, key);
|
|
937
|
-
if (!_optionalChain([descriptor2, 'optionalAccess',
|
|
945
|
+
if (!_optionalChain([descriptor2, 'optionalAccess', _29 => _29.get])) return false;
|
|
938
946
|
const selectedModule = descriptor2.get.call(_chunkUYBCHXXLjs.Modules);
|
|
939
|
-
return path.toLowerCase().startsWith(_optionalChain([selectedModule, 'access',
|
|
947
|
+
return path.toLowerCase().startsWith(_optionalChain([selectedModule, 'access', _30 => _30.pageUrl, 'optionalAccess', _31 => _31.toLowerCase, 'call', _32 => _32()]));
|
|
940
948
|
});
|
|
941
949
|
if (!matchedModuleKey) return void 0;
|
|
942
950
|
const descriptor = Object.getOwnPropertyDescriptor(_chunkUYBCHXXLjs.Modules, matchedModuleKey);
|
|
943
|
-
return _optionalChain([descriptor, 'optionalAccess',
|
|
951
|
+
return _optionalChain([descriptor, 'optionalAccess', _33 => _33.get, 'optionalAccess', _34 => _34.call, 'call', _35 => _35(_chunkUYBCHXXLjs.Modules)]);
|
|
944
952
|
}, "matchUrlToModule");
|
|
945
953
|
const currentUser = dehydratedUser ? _chunkUYBCHXXLjs.rehydrate.call(void 0, _chunkUYBCHXXLjs.Modules.User, dehydratedUser) : null;
|
|
946
|
-
const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess',
|
|
954
|
+
const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _36 => _36.company]), () => ( null));
|
|
947
955
|
const setUser = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (user) => {
|
|
948
956
|
if (user) setDehydratedUser(user.dehydrate());
|
|
949
957
|
else setDehydratedUser(null);
|
|
950
958
|
}, "setUser");
|
|
951
959
|
const hasRole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (roleId) => {
|
|
952
960
|
if (!currentUser) return false;
|
|
953
|
-
return !!_optionalChain([currentUser, 'access',
|
|
961
|
+
return !!_optionalChain([currentUser, 'access', _37 => _37.roles, 'optionalAccess', _38 => _38.some, 'call', _39 => _39((userRole) => userRole.id === roleId)]);
|
|
954
962
|
}, "hasRole");
|
|
955
963
|
const hasAccesToFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (featureIdentifier) => {
|
|
956
964
|
if (hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator)) return true;
|
|
@@ -1000,9 +1008,9 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
1000
1008
|
refreshUserRef.current = refreshUser;
|
|
1001
1009
|
const isRefreshingRef = _react.useRef.call(void 0, false);
|
|
1002
1010
|
_react.useEffect.call(void 0, () => {
|
|
1003
|
-
if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess',
|
|
1011
|
+
if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _40 => _40.company, 'optionalAccess', _41 => _41.id])) return;
|
|
1004
1012
|
const handleTokensUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
|
|
1005
|
-
if (data.companyId === _optionalChain([currentUser, 'access',
|
|
1013
|
+
if (data.companyId === _optionalChain([currentUser, 'access', _42 => _42.company, 'optionalAccess', _43 => _43.id]) && !isRefreshingRef.current) {
|
|
1006
1014
|
isRefreshingRef.current = true;
|
|
1007
1015
|
refreshUserRef.current().finally(() => {
|
|
1008
1016
|
isRefreshingRef.current = false;
|
|
@@ -1013,7 +1021,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
1013
1021
|
return () => {
|
|
1014
1022
|
socket.off("company:tokens_updated", handleTokensUpdated);
|
|
1015
1023
|
};
|
|
1016
|
-
}, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess',
|
|
1024
|
+
}, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _44 => _44.company, 'optionalAccess', _45 => _45.id])]);
|
|
1017
1025
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1018
1026
|
CurrentUserContext.Provider,
|
|
1019
1027
|
{
|
|
@@ -1074,17 +1082,17 @@ function AddUserToRoleInternal({ role, refresh }) {
|
|
|
1074
1082
|
setUsers(users.filter((u) => u.id !== user.id));
|
|
1075
1083
|
triggerAssociationToast({
|
|
1076
1084
|
t,
|
|
1077
|
-
source: t(`
|
|
1078
|
-
destination: t(`
|
|
1085
|
+
source: t(`entities.users`, { count: 1 }),
|
|
1086
|
+
destination: t(`entities.roles`, { count: 1 }),
|
|
1079
1087
|
source_name: user.name,
|
|
1080
|
-
destination_name: t(`
|
|
1088
|
+
destination_name: t(`role.roles`, { role: role.id.replaceAll(`-`, ``) })
|
|
1081
1089
|
});
|
|
1082
1090
|
refresh();
|
|
1083
1091
|
}, "addUserToRole");
|
|
1084
1092
|
const data = useDataListRetriever({
|
|
1085
1093
|
ready: !!company && show,
|
|
1086
1094
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkUYBCHXXLjs.UserService.findAllUsers(params), "retriever"),
|
|
1087
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
1095
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _46 => _46.id]) },
|
|
1088
1096
|
module: _chunkUYBCHXXLjs.Modules.User
|
|
1089
1097
|
});
|
|
1090
1098
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1096,8 +1104,8 @@ function AddUserToRoleInternal({ role, refresh }) {
|
|
|
1096
1104
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1097
1105
|
CommonAssociationTrigger,
|
|
1098
1106
|
{
|
|
1099
|
-
sourceType: t(`
|
|
1100
|
-
destinationType: t(`
|
|
1107
|
+
sourceType: t(`entities.users`, { count: 1 }),
|
|
1108
|
+
destinationType: t(`entities.roles`, { count: 1 }),
|
|
1101
1109
|
onTrigger: () => setShow(true)
|
|
1102
1110
|
}
|
|
1103
1111
|
),
|
|
@@ -1107,9 +1115,9 @@ function AddUserToRoleInternal({ role, refresh }) {
|
|
|
1107
1115
|
show,
|
|
1108
1116
|
setShow,
|
|
1109
1117
|
data,
|
|
1110
|
-
source: t(`
|
|
1111
|
-
destination: t(`
|
|
1112
|
-
destinationName: t(`
|
|
1118
|
+
source: t(`entities.users`, { count: 1 }),
|
|
1119
|
+
destination: t(`entities.roles`, { count: 1 }),
|
|
1120
|
+
destinationName: t(`role.roles`, { role: role.id.replaceAll(`-`, ``) }),
|
|
1113
1121
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserListInAdd, { data, existingUsers, setSelectedUser: addUserToRole })
|
|
1114
1122
|
}
|
|
1115
1123
|
)
|
|
@@ -1915,7 +1923,7 @@ function CalendarDayButton({
|
|
|
1915
1923
|
const defaultClassNames = _reactdaypicker.getDefaultClassNames.call(void 0, );
|
|
1916
1924
|
const ref = React3.useRef(null);
|
|
1917
1925
|
React3.useEffect(() => {
|
|
1918
|
-
if (modifiers.focused) _optionalChain([ref, 'access',
|
|
1926
|
+
if (modifiers.focused) _optionalChain([ref, 'access', _47 => _47.current, 'optionalAccess', _48 => _48.focus, 'call', _49 => _49()]);
|
|
1919
1927
|
}, [modifiers.focused]);
|
|
1920
1928
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1921
1929
|
Button,
|
|
@@ -2067,10 +2075,10 @@ function Carousel({
|
|
|
2067
2075
|
setCanScrollNext(api2.canScrollNext());
|
|
2068
2076
|
}, []);
|
|
2069
2077
|
const scrollPrev = React4.useCallback(() => {
|
|
2070
|
-
_optionalChain([api, 'optionalAccess',
|
|
2078
|
+
_optionalChain([api, 'optionalAccess', _50 => _50.scrollPrev, 'call', _51 => _51()]);
|
|
2071
2079
|
}, [api]);
|
|
2072
2080
|
const scrollNext = React4.useCallback(() => {
|
|
2073
|
-
_optionalChain([api, 'optionalAccess',
|
|
2081
|
+
_optionalChain([api, 'optionalAccess', _52 => _52.scrollNext, 'call', _53 => _53()]);
|
|
2074
2082
|
}, [api]);
|
|
2075
2083
|
const handleKeyDown = React4.useCallback(
|
|
2076
2084
|
(event) => {
|
|
@@ -2094,7 +2102,7 @@ function Carousel({
|
|
|
2094
2102
|
api.on("reInit", onSelect);
|
|
2095
2103
|
api.on("select", onSelect);
|
|
2096
2104
|
return () => {
|
|
2097
|
-
_optionalChain([api, 'optionalAccess',
|
|
2105
|
+
_optionalChain([api, 'optionalAccess', _54 => _54.off, 'call', _55 => _55("select", onSelect)]);
|
|
2098
2106
|
};
|
|
2099
2107
|
}, [api, onSelect]);
|
|
2100
2108
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2104,7 +2112,7 @@ function Carousel({
|
|
|
2104
2112
|
carouselRef,
|
|
2105
2113
|
api,
|
|
2106
2114
|
opts,
|
|
2107
|
-
orientation: orientation || (_optionalChain([opts, 'optionalAccess',
|
|
2115
|
+
orientation: orientation || (_optionalChain([opts, 'optionalAccess', _56 => _56.axis]) === "y" ? "vertical" : "horizontal"),
|
|
2108
2116
|
scrollPrev,
|
|
2109
2117
|
scrollNext,
|
|
2110
2118
|
canScrollPrev,
|
|
@@ -2288,7 +2296,7 @@ var ChartStyle = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ id, con
|
|
|
2288
2296
|
([theme, prefix]) => `
|
|
2289
2297
|
${prefix} [data-chart=${id}] {
|
|
2290
2298
|
${colorConfig.map(([key, itemConfig]) => {
|
|
2291
|
-
const color = _optionalChain([itemConfig, 'access',
|
|
2299
|
+
const color = _optionalChain([itemConfig, 'access', _57 => _57.theme, 'optionalAccess', _58 => _58[theme]]) || itemConfig.color;
|
|
2292
2300
|
return color ? ` --color-${key}: ${color};` : null;
|
|
2293
2301
|
}).join("\n")}
|
|
2294
2302
|
}
|
|
@@ -2316,13 +2324,13 @@ function ChartTooltipContent({
|
|
|
2316
2324
|
}) {
|
|
2317
2325
|
const { config } = useChart();
|
|
2318
2326
|
const tooltipLabel = React5.useMemo(() => {
|
|
2319
|
-
if (hideLabel || !_optionalChain([payload, 'optionalAccess',
|
|
2327
|
+
if (hideLabel || !_optionalChain([payload, 'optionalAccess', _59 => _59.length])) {
|
|
2320
2328
|
return null;
|
|
2321
2329
|
}
|
|
2322
2330
|
const [item] = payload;
|
|
2323
|
-
const key = `${labelKey || _optionalChain([item, 'optionalAccess',
|
|
2331
|
+
const key = `${labelKey || _optionalChain([item, 'optionalAccess', _60 => _60.dataKey]) || _optionalChain([item, 'optionalAccess', _61 => _61.name]) || "value"}`;
|
|
2324
2332
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
2325
|
-
const value = !labelKey && typeof label === "string" ? _optionalChain([config, 'access',
|
|
2333
|
+
const value = !labelKey && typeof label === "string" ? _optionalChain([config, 'access', _62 => _62[label], 'optionalAccess', _63 => _63.label]) || label : _optionalChain([itemConfig, 'optionalAccess', _64 => _64.label]);
|
|
2326
2334
|
if (labelFormatter) {
|
|
2327
2335
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkUYBCHXXLjs.cn.call(void 0, "font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
2328
2336
|
}
|
|
@@ -2339,7 +2347,7 @@ function ChartTooltipContent({
|
|
|
2339
2347
|
config,
|
|
2340
2348
|
labelKey
|
|
2341
2349
|
]);
|
|
2342
|
-
if (!active || !_optionalChain([payload, 'optionalAccess',
|
|
2350
|
+
if (!active || !_optionalChain([payload, 'optionalAccess', _65 => _65.length])) {
|
|
2343
2351
|
return null;
|
|
2344
2352
|
}
|
|
2345
2353
|
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
@@ -2355,7 +2363,7 @@ function ChartTooltipContent({
|
|
|
2355
2363
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
2356
2364
|
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
2357
2365
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
2358
|
-
const indicatorColor = color || _optionalChain([item, 'access',
|
|
2366
|
+
const indicatorColor = color || _optionalChain([item, 'access', _66 => _66.payload, 'optionalAccess', _67 => _67.fill]) || item.color;
|
|
2359
2367
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2360
2368
|
"div",
|
|
2361
2369
|
{
|
|
@@ -2363,8 +2371,8 @@ function ChartTooltipContent({
|
|
|
2363
2371
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
2364
2372
|
indicator === "dot" && "items-center"
|
|
2365
2373
|
),
|
|
2366
|
-
children: formatter && _optionalChain([item, 'optionalAccess',
|
|
2367
|
-
_optionalChain([itemConfig, 'optionalAccess',
|
|
2374
|
+
children: formatter && _optionalChain([item, 'optionalAccess', _68 => _68.value]) !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
2375
|
+
_optionalChain([itemConfig, 'optionalAccess', _69 => _69.icon]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2368
2376
|
"div",
|
|
2369
2377
|
{
|
|
2370
2378
|
className: _chunkUYBCHXXLjs.cn.call(void 0,
|
|
@@ -2392,7 +2400,7 @@ function ChartTooltipContent({
|
|
|
2392
2400
|
children: [
|
|
2393
2401
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid gap-1.5", children: [
|
|
2394
2402
|
nestLabel ? tooltipLabel : null,
|
|
2395
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: _optionalChain([itemConfig, 'optionalAccess',
|
|
2403
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: _optionalChain([itemConfig, 'optionalAccess', _70 => _70.label]) || item.name })
|
|
2396
2404
|
] }),
|
|
2397
2405
|
item.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() })
|
|
2398
2406
|
]
|
|
@@ -2417,7 +2425,7 @@ function ChartLegendContent({
|
|
|
2417
2425
|
nameKey
|
|
2418
2426
|
}) {
|
|
2419
2427
|
const { config } = useChart();
|
|
2420
|
-
if (!_optionalChain([payload, 'optionalAccess',
|
|
2428
|
+
if (!_optionalChain([payload, 'optionalAccess', _71 => _71.length])) {
|
|
2421
2429
|
return null;
|
|
2422
2430
|
}
|
|
2423
2431
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -2438,7 +2446,7 @@ function ChartLegendContent({
|
|
|
2438
2446
|
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
2439
2447
|
),
|
|
2440
2448
|
children: [
|
|
2441
|
-
_optionalChain([itemConfig, 'optionalAccess',
|
|
2449
|
+
_optionalChain([itemConfig, 'optionalAccess', _72 => _72.icon]) && !hideIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, itemConfig.icon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2442
2450
|
"div",
|
|
2443
2451
|
{
|
|
2444
2452
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
@@ -2447,7 +2455,7 @@ function ChartLegendContent({
|
|
|
2447
2455
|
}
|
|
2448
2456
|
}
|
|
2449
2457
|
),
|
|
2450
|
-
_optionalChain([itemConfig, 'optionalAccess',
|
|
2458
|
+
_optionalChain([itemConfig, 'optionalAccess', _73 => _73.label])
|
|
2451
2459
|
]
|
|
2452
2460
|
},
|
|
2453
2461
|
item.value
|
|
@@ -2749,7 +2757,7 @@ function InputGroupAddon({
|
|
|
2749
2757
|
if (e.target.closest("button")) {
|
|
2750
2758
|
return;
|
|
2751
2759
|
}
|
|
2752
|
-
_optionalChain([e, 'access',
|
|
2760
|
+
_optionalChain([e, 'access', _74 => _74.currentTarget, 'access', _75 => _75.parentElement, 'optionalAccess', _76 => _76.querySelector, 'call', _77 => _77("input"), 'optionalAccess', _78 => _78.focus, 'call', _79 => _79()]);
|
|
2753
2761
|
},
|
|
2754
2762
|
...props
|
|
2755
2763
|
}
|
|
@@ -3795,17 +3803,17 @@ function FieldError({
|
|
|
3795
3803
|
if (children) {
|
|
3796
3804
|
return children;
|
|
3797
3805
|
}
|
|
3798
|
-
if (!_optionalChain([errors, 'optionalAccess',
|
|
3806
|
+
if (!_optionalChain([errors, 'optionalAccess', _80 => _80.length])) {
|
|
3799
3807
|
return null;
|
|
3800
3808
|
}
|
|
3801
3809
|
const uniqueErrors = [
|
|
3802
|
-
...new Map(errors.map((error) => [_optionalChain([error, 'optionalAccess',
|
|
3810
|
+
...new Map(errors.map((error) => [_optionalChain([error, 'optionalAccess', _81 => _81.message]), error])).values()
|
|
3803
3811
|
];
|
|
3804
|
-
if (_optionalChain([uniqueErrors, 'optionalAccess',
|
|
3805
|
-
return _optionalChain([uniqueErrors, 'access',
|
|
3812
|
+
if (_optionalChain([uniqueErrors, 'optionalAccess', _82 => _82.length]) == 1) {
|
|
3813
|
+
return _optionalChain([uniqueErrors, 'access', _83 => _83[0], 'optionalAccess', _84 => _84.message]);
|
|
3806
3814
|
}
|
|
3807
3815
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
3808
|
-
(error, index) => _optionalChain([error, 'optionalAccess',
|
|
3816
|
+
(error, index) => _optionalChain([error, 'optionalAccess', _85 => _85.message]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: error.message }, index)
|
|
3809
3817
|
) });
|
|
3810
3818
|
}, [children, errors]);
|
|
3811
3819
|
if (!content) {
|
|
@@ -3916,7 +3924,7 @@ function InputOTPSlot({
|
|
|
3916
3924
|
...props
|
|
3917
3925
|
}) {
|
|
3918
3926
|
const inputOTPContext = React6.useContext(_inputotp.OTPInputContext);
|
|
3919
|
-
const { char, hasFakeCaret, isActive } = _nullishCoalesce(_optionalChain([inputOTPContext, 'optionalAccess',
|
|
3927
|
+
const { char, hasFakeCaret, isActive } = _nullishCoalesce(_optionalChain([inputOTPContext, 'optionalAccess', _86 => _86.slots, 'access', _87 => _87[index]]), () => ( {}));
|
|
3920
3928
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
3921
3929
|
"div",
|
|
3922
3930
|
{
|
|
@@ -4994,7 +5002,7 @@ function SidebarTrigger({
|
|
|
4994
5002
|
size: "icon-sm",
|
|
4995
5003
|
className: _chunkUYBCHXXLjs.cn.call(void 0, className),
|
|
4996
5004
|
onClick: (event) => {
|
|
4997
|
-
_optionalChain([onClick, 'optionalCall',
|
|
5005
|
+
_optionalChain([onClick, 'optionalCall', _88 => _88(event)]);
|
|
4998
5006
|
toggleSidebar();
|
|
4999
5007
|
},
|
|
5000
5008
|
...props,
|
|
@@ -5816,14 +5824,14 @@ var coordinateGetter = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (eve
|
|
|
5816
5824
|
if (!active || !collisionRect) return;
|
|
5817
5825
|
const filteredContainers = [];
|
|
5818
5826
|
for (const entry of droppableContainers.getEnabled()) {
|
|
5819
|
-
if (!entry || _optionalChain([entry, 'optionalAccess',
|
|
5827
|
+
if (!entry || _optionalChain([entry, 'optionalAccess', _89 => _89.disabled])) return;
|
|
5820
5828
|
const rect = droppableRects.get(entry.id);
|
|
5821
5829
|
if (!rect) return;
|
|
5822
5830
|
const data = entry.data.current;
|
|
5823
5831
|
if (data) {
|
|
5824
5832
|
const { type, children } = data;
|
|
5825
|
-
if (type === "container" && _optionalChain([children, 'optionalAccess',
|
|
5826
|
-
if (_optionalChain([active, 'access',
|
|
5833
|
+
if (type === "container" && _optionalChain([children, 'optionalAccess', _90 => _90.length]) > 0) {
|
|
5834
|
+
if (_optionalChain([active, 'access', _91 => _91.data, 'access', _92 => _92.current, 'optionalAccess', _93 => _93.type]) !== "container") {
|
|
5827
5835
|
return;
|
|
5828
5836
|
}
|
|
5829
5837
|
}
|
|
@@ -5861,8 +5869,8 @@ var coordinateGetter = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (eve
|
|
|
5861
5869
|
const closestId = _core.getFirstCollision.call(void 0, collisions, "id");
|
|
5862
5870
|
if (closestId != null) {
|
|
5863
5871
|
const newDroppable = droppableContainers.get(closestId);
|
|
5864
|
-
const newNode = _optionalChain([newDroppable, 'optionalAccess',
|
|
5865
|
-
const newRect = _optionalChain([newDroppable, 'optionalAccess',
|
|
5872
|
+
const newNode = _optionalChain([newDroppable, 'optionalAccess', _94 => _94.node, 'access', _95 => _95.current]);
|
|
5873
|
+
const newRect = _optionalChain([newDroppable, 'optionalAccess', _96 => _96.rect, 'access', _97 => _97.current]);
|
|
5866
5874
|
if (newNode && newRect) {
|
|
5867
5875
|
if (newDroppable.id === "placeholder") {
|
|
5868
5876
|
return {
|
|
@@ -5870,7 +5878,7 @@ var coordinateGetter = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (eve
|
|
|
5870
5878
|
y: newRect.top + (newRect.height - collisionRect.height) / 2
|
|
5871
5879
|
};
|
|
5872
5880
|
}
|
|
5873
|
-
if (_optionalChain([newDroppable, 'access',
|
|
5881
|
+
if (_optionalChain([newDroppable, 'access', _98 => _98.data, 'access', _99 => _99.current, 'optionalAccess', _100 => _100.type]) === "container") {
|
|
5874
5882
|
return {
|
|
5875
5883
|
x: newRect.left + 20,
|
|
5876
5884
|
y: newRect.top + 74
|
|
@@ -5974,7 +5982,7 @@ function KanbanRoot(props) {
|
|
|
5974
5982
|
)
|
|
5975
5983
|
});
|
|
5976
5984
|
if (closestItem.length > 0) {
|
|
5977
|
-
overId = _nullishCoalesce(_optionalChain([closestItem, 'access',
|
|
5985
|
+
overId = _nullishCoalesce(_optionalChain([closestItem, 'access', _101 => _101[0], 'optionalAccess', _102 => _102.id]), () => ( overId));
|
|
5978
5986
|
}
|
|
5979
5987
|
}
|
|
5980
5988
|
}
|
|
@@ -5985,7 +5993,7 @@ function KanbanRoot(props) {
|
|
|
5985
5993
|
);
|
|
5986
5994
|
const onDragStart = React9.useCallback(
|
|
5987
5995
|
(event) => {
|
|
5988
|
-
_optionalChain([kanbanProps, 'access',
|
|
5996
|
+
_optionalChain([kanbanProps, 'access', _103 => _103.onDragStart, 'optionalCall', _104 => _104(event)]);
|
|
5989
5997
|
if (event.activatorEvent.defaultPrevented) return;
|
|
5990
5998
|
setActiveId(event.active.id);
|
|
5991
5999
|
},
|
|
@@ -5993,7 +6001,7 @@ function KanbanRoot(props) {
|
|
|
5993
6001
|
);
|
|
5994
6002
|
const onDragOver = React9.useCallback(
|
|
5995
6003
|
(event) => {
|
|
5996
|
-
_optionalChain([kanbanProps, 'access',
|
|
6004
|
+
_optionalChain([kanbanProps, 'access', _105 => _105.onDragOver, 'optionalCall', _106 => _106(event)]);
|
|
5997
6005
|
if (event.activatorEvent.defaultPrevented) return;
|
|
5998
6006
|
const { active, over } = event;
|
|
5999
6007
|
if (!over) return;
|
|
@@ -6008,7 +6016,7 @@ function KanbanRoot(props) {
|
|
|
6008
6016
|
if (activeIndex !== overIndex) {
|
|
6009
6017
|
const newColumns = { ...value };
|
|
6010
6018
|
newColumns[activeColumn] = _sortable.arrayMove.call(void 0, items, activeIndex, overIndex);
|
|
6011
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
6019
|
+
_optionalChain([onValueChange, 'optionalCall', _107 => _107(newColumns)]);
|
|
6012
6020
|
}
|
|
6013
6021
|
} else {
|
|
6014
6022
|
const activeItems = value[activeColumn];
|
|
@@ -6023,7 +6031,7 @@ function KanbanRoot(props) {
|
|
|
6023
6031
|
[activeColumn]: activeItems.filter((item) => getItemValue(item) !== active.id),
|
|
6024
6032
|
[overColumn]: [...overItems, activeItem]
|
|
6025
6033
|
};
|
|
6026
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
6034
|
+
_optionalChain([onValueChange, 'optionalCall', _108 => _108(updatedItems)]);
|
|
6027
6035
|
hasMovedRef.current = true;
|
|
6028
6036
|
}
|
|
6029
6037
|
},
|
|
@@ -6031,7 +6039,7 @@ function KanbanRoot(props) {
|
|
|
6031
6039
|
);
|
|
6032
6040
|
const onDragEnd = React9.useCallback(
|
|
6033
6041
|
(event) => {
|
|
6034
|
-
_optionalChain([kanbanProps, 'access',
|
|
6042
|
+
_optionalChain([kanbanProps, 'access', _109 => _109.onDragEnd, 'optionalCall', _110 => _110(event)]);
|
|
6035
6043
|
if (event.activatorEvent.defaultPrevented) return;
|
|
6036
6044
|
const { active, over } = event;
|
|
6037
6045
|
if (!over) {
|
|
@@ -6054,7 +6062,7 @@ function KanbanRoot(props) {
|
|
|
6054
6062
|
if (onMove) {
|
|
6055
6063
|
onMove({ ...event, activeIndex, overIndex });
|
|
6056
6064
|
} else {
|
|
6057
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
6065
|
+
_optionalChain([onValueChange, 'optionalCall', _111 => _111(newColumns)]);
|
|
6058
6066
|
}
|
|
6059
6067
|
}
|
|
6060
6068
|
} else {
|
|
@@ -6082,7 +6090,7 @@ function KanbanRoot(props) {
|
|
|
6082
6090
|
overIndex
|
|
6083
6091
|
});
|
|
6084
6092
|
} else {
|
|
6085
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
6093
|
+
_optionalChain([onValueChange, 'optionalCall', _112 => _112(newColumns)]);
|
|
6086
6094
|
}
|
|
6087
6095
|
}
|
|
6088
6096
|
}
|
|
@@ -6094,7 +6102,7 @@ function KanbanRoot(props) {
|
|
|
6094
6102
|
);
|
|
6095
6103
|
const onDragCancel = React9.useCallback(
|
|
6096
6104
|
(event) => {
|
|
6097
|
-
_optionalChain([kanbanProps, 'access',
|
|
6105
|
+
_optionalChain([kanbanProps, 'access', _113 => _113.onDragCancel, 'optionalCall', _114 => _114(event)]);
|
|
6098
6106
|
if (event.activatorEvent.defaultPrevented) return;
|
|
6099
6107
|
setActiveId(null);
|
|
6100
6108
|
hasMovedRef.current = false;
|
|
@@ -6113,7 +6121,7 @@ function KanbanRoot(props) {
|
|
|
6113
6121
|
})();
|
|
6114
6122
|
const total = isColumn ? Object.keys(value).length : (() => {
|
|
6115
6123
|
const column = getColumn(active.id);
|
|
6116
|
-
return column ? _nullishCoalesce(_optionalChain([value, 'access',
|
|
6124
|
+
return column ? _nullishCoalesce(_optionalChain([value, 'access', _115 => _115[column], 'optionalAccess', _116 => _116.length]), () => ( 0)) : 0;
|
|
6117
6125
|
})();
|
|
6118
6126
|
return `Picked up ${itemType} at position ${position} of ${total}`;
|
|
6119
6127
|
},
|
|
@@ -6128,7 +6136,7 @@ function KanbanRoot(props) {
|
|
|
6128
6136
|
})();
|
|
6129
6137
|
const total = isColumn ? Object.keys(value).length : (() => {
|
|
6130
6138
|
const column = getColumn(over.id);
|
|
6131
|
-
return column ? _nullishCoalesce(_optionalChain([value, 'access',
|
|
6139
|
+
return column ? _nullishCoalesce(_optionalChain([value, 'access', _117 => _117[column], 'optionalAccess', _118 => _118.length]), () => ( 0)) : 0;
|
|
6132
6140
|
})();
|
|
6133
6141
|
const overColumn = getColumn(over.id);
|
|
6134
6142
|
const activeColumn = getColumn(active.id);
|
|
@@ -6151,7 +6159,7 @@ function KanbanRoot(props) {
|
|
|
6151
6159
|
})();
|
|
6152
6160
|
const total = isColumn ? Object.keys(value).length : (() => {
|
|
6153
6161
|
const column = getColumn(over.id);
|
|
6154
|
-
return column ? _nullishCoalesce(_optionalChain([value, 'access',
|
|
6162
|
+
return column ? _nullishCoalesce(_optionalChain([value, 'access', _119 => _119[column], 'optionalAccess', _120 => _120.length]), () => ( 0)) : 0;
|
|
6155
6163
|
})();
|
|
6156
6164
|
const overColumn = getColumn(over.id);
|
|
6157
6165
|
const activeColumn = getColumn(active.id);
|
|
@@ -6497,7 +6505,7 @@ function KanbanOverlay(props) {
|
|
|
6497
6505
|
const context = useKanbanContext(OVERLAY_NAME);
|
|
6498
6506
|
const [mounted, setMounted] = React9.useState(false);
|
|
6499
6507
|
React9.useLayoutEffect(() => setMounted(true), []);
|
|
6500
|
-
const container = _nullishCoalesce(containerProp, () => ( (mounted ? _optionalChain([globalThis, 'access',
|
|
6508
|
+
const container = _nullishCoalesce(containerProp, () => ( (mounted ? _optionalChain([globalThis, 'access', _121 => _121.document, 'optionalAccess', _122 => _122.body]) : null)));
|
|
6501
6509
|
if (!container) return null;
|
|
6502
6510
|
const variant = context.activeId && context.activeId in context.items ? "column" : "item";
|
|
6503
6511
|
return ReactDOM.createPortal(
|
|
@@ -6629,7 +6637,7 @@ var MultiSelect = React11.forwardRef(
|
|
|
6629
6637
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center", children: [
|
|
6630
6638
|
selectedValues.slice(0, maxCount).map((value2) => {
|
|
6631
6639
|
const option = options.find((o) => o.value === value2);
|
|
6632
|
-
const IconComponent = _optionalChain([option, 'optionalAccess',
|
|
6640
|
+
const IconComponent = _optionalChain([option, 'optionalAccess', _123 => _123.icon]);
|
|
6633
6641
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
6634
6642
|
Badge,
|
|
6635
6643
|
{
|
|
@@ -6637,7 +6645,7 @@ var MultiSelect = React11.forwardRef(
|
|
|
6637
6645
|
style: { animationDuration: `${animation}s` },
|
|
6638
6646
|
children: [
|
|
6639
6647
|
IconComponent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, IconComponent, { className: "mr-2 h-4 w-4" }),
|
|
6640
|
-
_optionalChain([option, 'optionalAccess',
|
|
6648
|
+
_optionalChain([option, 'optionalAccess', _124 => _124.label]),
|
|
6641
6649
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6642
6650
|
_lucidereact.XCircle,
|
|
6643
6651
|
{
|
|
@@ -6817,18 +6825,18 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
6817
6825
|
onValueChange: setFiles,
|
|
6818
6826
|
dropzoneOptions: dropzone2,
|
|
6819
6827
|
className: "h-40 w-40 rounded-full p-0",
|
|
6820
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || _optionalChain([user, 'optionalAccess',
|
|
6828
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || _optionalChain([user, 'optionalAccess', _125 => _125.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6821
6829
|
_image2.default,
|
|
6822
6830
|
{
|
|
6823
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess',
|
|
6824
|
-
alt: t(`
|
|
6831
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _126 => _126.avatar]) || "",
|
|
6832
|
+
alt: t(`common.avatar`),
|
|
6825
6833
|
width: 200,
|
|
6826
6834
|
height: 200
|
|
6827
6835
|
}
|
|
6828
6836
|
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
|
|
6829
6837
|
}
|
|
6830
6838
|
),
|
|
6831
|
-
!resetImage && (file || _optionalChain([user, 'optionalAccess',
|
|
6839
|
+
!resetImage && (file || _optionalChain([user, 'optionalAccess', _127 => _127.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
6832
6840
|
Button,
|
|
6833
6841
|
{
|
|
6834
6842
|
className: "",
|
|
@@ -6840,7 +6848,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
|
|
|
6840
6848
|
setFile(null);
|
|
6841
6849
|
setResetImage(true);
|
|
6842
6850
|
},
|
|
6843
|
-
children: t(`
|
|
6851
|
+
children: t(`ui.buttons.remove`)
|
|
6844
6852
|
}
|
|
6845
6853
|
)
|
|
6846
6854
|
] });
|
|
@@ -6856,7 +6864,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
|
|
|
6856
6864
|
const router = _chunkEW6QPMN3js.useI18nRouter.call(void 0, );
|
|
6857
6865
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
6858
6866
|
let cId;
|
|
6859
|
-
if (_optionalChain([currentUser, 'optionalAccess',
|
|
6867
|
+
if (_optionalChain([currentUser, 'optionalAccess', _128 => _128.roles, 'access', _129 => _129.find, 'call', _130 => _130((role) => role.id === _chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator)]) && companyId) {
|
|
6860
6868
|
cId = companyId;
|
|
6861
6869
|
} else {
|
|
6862
6870
|
if (!company) return;
|
|
@@ -6911,8 +6919,8 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
6911
6919
|
}, [company]);
|
|
6912
6920
|
const formSchema = _zod3.z.object({
|
|
6913
6921
|
id: _zod3.z.uuidv4(),
|
|
6914
|
-
name: _zod3.z.string().min(1, { message: t(`
|
|
6915
|
-
email: _zod3.z.string().min(1, { message: t(`
|
|
6922
|
+
name: _zod3.z.string().min(1, { message: t(`user.fields.name.error`) }),
|
|
6923
|
+
email: _zod3.z.string().min(1, { message: t(`common.fields.email.error`) }),
|
|
6916
6924
|
password: _zod3.z.string().optional(),
|
|
6917
6925
|
title: _zod3.z.string().optional(),
|
|
6918
6926
|
bio: _zod3.z.string().optional(),
|
|
@@ -6924,16 +6932,16 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
6924
6932
|
const form = _reacthookform.useForm.call(void 0, {
|
|
6925
6933
|
resolver: _zod.zodResolver.call(void 0, formSchema),
|
|
6926
6934
|
defaultValues: {
|
|
6927
|
-
id: _optionalChain([user, 'optionalAccess',
|
|
6928
|
-
name: _optionalChain([user, 'optionalAccess',
|
|
6929
|
-
title: _optionalChain([user, 'optionalAccess',
|
|
6930
|
-
bio: _optionalChain([user, 'optionalAccess',
|
|
6931
|
-
email: _optionalChain([user, 'optionalAccess',
|
|
6932
|
-
phone: _optionalChain([user, 'optionalAccess',
|
|
6935
|
+
id: _optionalChain([user, 'optionalAccess', _131 => _131.id]) || _uuid.v4.call(void 0, ),
|
|
6936
|
+
name: _optionalChain([user, 'optionalAccess', _132 => _132.name]) || "",
|
|
6937
|
+
title: _optionalChain([user, 'optionalAccess', _133 => _133.title]) || "",
|
|
6938
|
+
bio: _optionalChain([user, 'optionalAccess', _134 => _134.bio]) || "",
|
|
6939
|
+
email: _optionalChain([user, 'optionalAccess', _135 => _135.email]) || "",
|
|
6940
|
+
phone: _optionalChain([user, 'optionalAccess', _136 => _136.phone]) || "",
|
|
6933
6941
|
password: "",
|
|
6934
|
-
roleIds: _optionalChain([user, 'optionalAccess',
|
|
6942
|
+
roleIds: _optionalChain([user, 'optionalAccess', _137 => _137.roles, 'access', _138 => _138.map, 'call', _139 => _139((role) => role.id)]) || [],
|
|
6935
6943
|
sendInvitationEmail: false,
|
|
6936
|
-
avatar: _optionalChain([user, 'optionalAccess',
|
|
6944
|
+
avatar: _optionalChain([user, 'optionalAccess', _140 => _140.avatarUrl]) || ""
|
|
6937
6945
|
}
|
|
6938
6946
|
});
|
|
6939
6947
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
@@ -6943,9 +6951,9 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
6943
6951
|
if (existingUser) {
|
|
6944
6952
|
form.setError("email", {
|
|
6945
6953
|
type: "manual",
|
|
6946
|
-
message: t(`
|
|
6954
|
+
message: t(`user.errors.email_exists`)
|
|
6947
6955
|
});
|
|
6948
|
-
errorToast({ title: t(`
|
|
6956
|
+
errorToast({ title: t(`user.errors.email_exists`), error: "" });
|
|
6949
6957
|
return;
|
|
6950
6958
|
}
|
|
6951
6959
|
} catch (error) {
|
|
@@ -6979,7 +6987,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
6979
6987
|
};
|
|
6980
6988
|
try {
|
|
6981
6989
|
const updatedUser = user ? await _chunkUYBCHXXLjs.UserService.update(payload) : await _chunkUYBCHXXLjs.UserService.create(payload);
|
|
6982
|
-
if (_optionalChain([currentUser, 'optionalAccess',
|
|
6990
|
+
if (_optionalChain([currentUser, 'optionalAccess', _141 => _141.id]) === updatedUser.id) setUser(updatedUser);
|
|
6983
6991
|
if (onRevalidate) {
|
|
6984
6992
|
await onRevalidate(generateUrl({ page: _chunkUYBCHXXLjs.Modules.User, id: updatedUser.id, language: `[locale]` }));
|
|
6985
6993
|
}
|
|
@@ -6990,19 +6998,19 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
6990
6998
|
router.push(generateUrl({ page: _chunkUYBCHXXLjs.Modules.User, id: updatedUser.id }));
|
|
6991
6999
|
}
|
|
6992
7000
|
} catch (error) {
|
|
6993
|
-
errorToast({ title: user ? t(`
|
|
7001
|
+
errorToast({ title: user ? t(`common.errors.update`) : t(`common.errors.create`), error });
|
|
6994
7002
|
}
|
|
6995
7003
|
}, "onSubmit");
|
|
6996
7004
|
_react.useEffect.call(void 0, () => {
|
|
6997
7005
|
async function fetchRoles() {
|
|
6998
7006
|
const roles2 = await _chunkUYBCHXXLjs.RoleService.findAllRoles({});
|
|
6999
7007
|
const availableRoles = roles2.filter(
|
|
7000
|
-
(role) => role.id !== _chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess',
|
|
7008
|
+
(role) => role.id !== _chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _142 => _142.features, 'access', _143 => _143.some, 'call', _144 => _144((feature) => feature.id === _optionalChain([role, 'access', _145 => _145.requiredFeature, 'optionalAccess', _146 => _146.id]))]))
|
|
7001
7009
|
);
|
|
7002
7010
|
setRoles(availableRoles);
|
|
7003
7011
|
}
|
|
7004
7012
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
|
|
7005
|
-
if (open && (company || _optionalChain([currentUser, 'optionalAccess',
|
|
7013
|
+
if (open && (company || _optionalChain([currentUser, 'optionalAccess', _147 => _147.roles, 'access', _148 => _148.find, 'call', _149 => _149((role) => role.id === _chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0)
|
|
7006
7014
|
fetchRoles();
|
|
7007
7015
|
}, [company, open]);
|
|
7008
7016
|
_react.useEffect.call(void 0, () => {
|
|
@@ -7023,7 +7031,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
7023
7031
|
setContentType(null);
|
|
7024
7032
|
}
|
|
7025
7033
|
}, [file]);
|
|
7026
|
-
const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess',
|
|
7034
|
+
const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _150 => _150.id]) === _optionalChain([user, 'optionalAccess', _151 => _151.id]) && hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkUYBCHXXLjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator));
|
|
7027
7035
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog, { open, onOpenChange: setOpen, children: [
|
|
7028
7036
|
trigger ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { children: trigger }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorTrigger, { isEdit: !!user }),
|
|
7029
7037
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -7031,7 +7039,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
7031
7039
|
{
|
|
7032
7040
|
className: `flex max-h-[70vh] ${canChangeRoles ? `max-w-[90vw]` : `max-w-3xl`} min-h-3xl max-h-[90vh] flex-col overflow-y-auto`,
|
|
7033
7041
|
children: [
|
|
7034
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorHeader, { type: t(`
|
|
7042
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorHeader, { type: t(`entities.users`, { count: 1 }), name: _optionalChain([user, 'optionalAccess', _152 => _152.name]) }),
|
|
7035
7043
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
|
|
7036
7044
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex flex-row gap-x-4`, children: [
|
|
7037
7045
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `flex w-40 flex-col justify-start gap-y-2`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7050,8 +7058,8 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
7050
7058
|
{
|
|
7051
7059
|
form,
|
|
7052
7060
|
id: "name",
|
|
7053
|
-
name: t(`
|
|
7054
|
-
placeholder: t(`
|
|
7061
|
+
name: t(`user.fields.name.label`),
|
|
7062
|
+
placeholder: t(`user.fields.name.placeholder`)
|
|
7055
7063
|
}
|
|
7056
7064
|
),
|
|
7057
7065
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7059,8 +7067,8 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
7059
7067
|
{
|
|
7060
7068
|
form,
|
|
7061
7069
|
id: "email",
|
|
7062
|
-
name: t(`
|
|
7063
|
-
placeholder: t(`
|
|
7070
|
+
name: t(`common.fields.email.label`),
|
|
7071
|
+
placeholder: t(`common.fields.email.placeholder`)
|
|
7064
7072
|
}
|
|
7065
7073
|
),
|
|
7066
7074
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7068,8 +7076,8 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
7068
7076
|
{
|
|
7069
7077
|
form,
|
|
7070
7078
|
id: "phone",
|
|
7071
|
-
name: t(`
|
|
7072
|
-
placeholder: t(`
|
|
7079
|
+
name: t(`user.fields.phone.label`),
|
|
7080
|
+
placeholder: t(`user.fields.phone.placeholder`)
|
|
7073
7081
|
}
|
|
7074
7082
|
),
|
|
7075
7083
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7077,8 +7085,8 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
7077
7085
|
{
|
|
7078
7086
|
form,
|
|
7079
7087
|
id: "password",
|
|
7080
|
-
name: t(`
|
|
7081
|
-
placeholder: t(`
|
|
7088
|
+
name: t(`user.fields.password.label`),
|
|
7089
|
+
placeholder: t(`user.fields.password.placeholder`)
|
|
7082
7090
|
}
|
|
7083
7091
|
),
|
|
7084
7092
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7086,8 +7094,8 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
7086
7094
|
{
|
|
7087
7095
|
form,
|
|
7088
7096
|
id: "title",
|
|
7089
|
-
name: t(`
|
|
7090
|
-
placeholder: t(`
|
|
7097
|
+
name: t(`user.fields.title.label`),
|
|
7098
|
+
placeholder: t(`user.fields.title.placeholder`)
|
|
7091
7099
|
}
|
|
7092
7100
|
),
|
|
7093
7101
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7095,32 +7103,25 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
|
|
|
7095
7103
|
{
|
|
7096
7104
|
form,
|
|
7097
7105
|
id: "bio",
|
|
7098
|
-
name: t(`
|
|
7099
|
-
placeholder: t(`
|
|
7106
|
+
name: t(`user.fields.bio.label`),
|
|
7107
|
+
placeholder: t(`user.fields.bio.placeholder`),
|
|
7100
7108
|
className: "min-h-40"
|
|
7101
7109
|
}
|
|
7102
7110
|
)
|
|
7103
7111
|
] }),
|
|
7104
7112
|
canChangeRoles && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-1/3 flex-col", children: [
|
|
7105
|
-
canChangeRoles && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormRoles, { form, id: "roleIds", name: t(`
|
|
7113
|
+
canChangeRoles && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormRoles, { form, id: "roleIds", name: t(`entities.roles`, { count: 2 }), roles }),
|
|
7106
7114
|
!user && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
|
|
7107
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm font-semibold", children: t(`
|
|
7108
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7109
|
-
FormCheckbox,
|
|
7110
|
-
{
|
|
7111
|
-
form,
|
|
7112
|
-
id: "sendInvitationEmail",
|
|
7113
|
-
name: t(`foundations.user.send_activation_email`)
|
|
7114
|
-
}
|
|
7115
|
-
)
|
|
7115
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm font-semibold", children: t(`user.send_activation_email`) }),
|
|
7116
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormCheckbox, { form, id: "sendInvitationEmail", name: t(`user.send_activation_email`) })
|
|
7116
7117
|
] })
|
|
7117
7118
|
] })
|
|
7118
7119
|
] }),
|
|
7119
7120
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-x-4", children: [
|
|
7120
|
-
user && _optionalChain([currentUser, 'optionalAccess',
|
|
7121
|
+
user && _optionalChain([currentUser, 'optionalAccess', _153 => _153.roles, 'access', _154 => _154.find, 'call', _155 => _155((role) => role.id === _chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator)]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7121
7122
|
UserDeleter,
|
|
7122
7123
|
{
|
|
7123
|
-
companyId: _optionalChain([user, 'access',
|
|
7124
|
+
companyId: _optionalChain([user, 'access', _156 => _156.company, 'optionalAccess', _157 => _157.id]),
|
|
7124
7125
|
user,
|
|
7125
7126
|
onDeleted: () => {
|
|
7126
7127
|
setOpen(false);
|
|
@@ -7167,7 +7168,7 @@ function CommonAssociationTrigger({
|
|
|
7167
7168
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
7168
7169
|
if (hasDestination)
|
|
7169
7170
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "hover:text-accent cursor-pointer", onClick: onTrigger, children: "Join" });
|
|
7170
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: `outline`, size: `sm`, onClick: onTrigger, children: t(`
|
|
7171
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: `outline`, size: `sm`, onClick: onTrigger, children: t(`common.association.label`, {
|
|
7171
7172
|
source: sourceType,
|
|
7172
7173
|
destination: destinationType
|
|
7173
7174
|
}) });
|
|
@@ -7199,11 +7200,11 @@ function CommonAssociationCommandDialog({
|
|
|
7199
7200
|
}, [show, searchTerm]);
|
|
7200
7201
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CommandDialog, { open: show, onOpenChange: setShow, children: [
|
|
7201
7202
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogHeader, { className: "flex flex-col items-start p-4 pb-0", children: [
|
|
7202
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`
|
|
7203
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`common.association.label`, {
|
|
7203
7204
|
source,
|
|
7204
7205
|
destination
|
|
7205
7206
|
}) }),
|
|
7206
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`
|
|
7207
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`common.association.description`, {
|
|
7207
7208
|
source,
|
|
7208
7209
|
destination,
|
|
7209
7210
|
destination_name: destinationName
|
|
@@ -7213,13 +7214,13 @@ function CommonAssociationCommandDialog({
|
|
|
7213
7214
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7214
7215
|
CommandInput,
|
|
7215
7216
|
{
|
|
7216
|
-
placeholder: t(`
|
|
7217
|
+
placeholder: t(`ui.search.placeholder`, { type: source }),
|
|
7217
7218
|
value: searchTerm,
|
|
7218
7219
|
onValueChange: setSearchTerm
|
|
7219
7220
|
}
|
|
7220
7221
|
),
|
|
7221
7222
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CommandList, { className: "mt-3 h-auto max-h-96 min-h-96 max-w-full overflow-y-auto overflow-x-hidden", children: [
|
|
7222
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandEmpty, { children: t(`
|
|
7223
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandEmpty, { children: t(`ui.search.no_results`, { type: source }) }),
|
|
7223
7224
|
children
|
|
7224
7225
|
] })
|
|
7225
7226
|
] })
|
|
@@ -7229,12 +7230,12 @@ _chunk7QVYU63Ejs.__name.call(void 0, CommonAssociationCommandDialog, "CommonAsso
|
|
|
7229
7230
|
var triggerAssociationToast = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
7230
7231
|
if (params.level) {
|
|
7231
7232
|
_sonner.toast.message(
|
|
7232
|
-
params.t(`
|
|
7233
|
+
params.t(`common.association.label`, {
|
|
7233
7234
|
source: params.source,
|
|
7234
7235
|
destination: params.destination
|
|
7235
7236
|
}),
|
|
7236
7237
|
{
|
|
7237
|
-
description: params.t(`
|
|
7238
|
+
description: params.t(`common.association.success_level`, {
|
|
7238
7239
|
source: params.source,
|
|
7239
7240
|
destination: params.destination,
|
|
7240
7241
|
source_name: params.source_name,
|
|
@@ -7245,12 +7246,12 @@ var triggerAssociationToast = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
7245
7246
|
);
|
|
7246
7247
|
} else {
|
|
7247
7248
|
_sonner.toast.message(
|
|
7248
|
-
params.t(`
|
|
7249
|
+
params.t(`common.association.label`, {
|
|
7249
7250
|
source: params.source,
|
|
7250
7251
|
destination: params.destination
|
|
7251
7252
|
}),
|
|
7252
7253
|
{
|
|
7253
|
-
description: params.t(`
|
|
7254
|
+
description: params.t(`common.association.success`, {
|
|
7254
7255
|
source: params.source,
|
|
7255
7256
|
destination: params.destination,
|
|
7256
7257
|
source_name: params.source_name,
|
|
@@ -7297,7 +7298,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ErrorDetails, "ErrorDetails");
|
|
|
7297
7298
|
// src/components/errors/errorToast.ts
|
|
7298
7299
|
|
|
7299
7300
|
function errorToast(params) {
|
|
7300
|
-
_sonner.toast.error(_nullishCoalesce(_optionalChain([params, 'optionalAccess',
|
|
7301
|
+
_sonner.toast.error(_nullishCoalesce(_optionalChain([params, 'optionalAccess', _158 => _158.title]), () => ( "Error")), {
|
|
7301
7302
|
description: params.error instanceof Error ? params.error.message : String(params.error)
|
|
7302
7303
|
});
|
|
7303
7304
|
}
|
|
@@ -7317,18 +7318,28 @@ function CommonDeleter({ deleteFunction, redirectTo, type, forceShow }) {
|
|
|
7317
7318
|
setOpen(false);
|
|
7318
7319
|
if (redirectTo) router.push(redirectTo);
|
|
7319
7320
|
} catch (error) {
|
|
7320
|
-
errorToast({ title: t(`
|
|
7321
|
+
errorToast({ title: t(`common.errors.delete`), error });
|
|
7321
7322
|
}
|
|
7322
7323
|
setIsDeleting(false);
|
|
7323
7324
|
}, "handleDelete");
|
|
7324
7325
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialog, { open, onOpenChange: setOpen, children: [
|
|
7325
|
-
forceShow ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7326
|
+
forceShow ? null : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7327
|
+
Button,
|
|
7328
|
+
{
|
|
7329
|
+
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
|
|
7330
|
+
nativeButton: false,
|
|
7331
|
+
size: "sm",
|
|
7332
|
+
variant: "ghost",
|
|
7333
|
+
className: "text-muted-foreground hover:text-destructive",
|
|
7334
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Trash2Icon, {})
|
|
7335
|
+
}
|
|
7336
|
+
) }),
|
|
7326
7337
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
|
|
7327
7338
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogHeader, { children: [
|
|
7328
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTitle, { children: t(`
|
|
7329
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogDescription, { children: t(`
|
|
7339
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTitle, { children: t(`common.delete.title`, { type: t(`entities.${type}`, { count: 1 }) }) }),
|
|
7340
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogDescription, { children: t(`common.delete.subtitle`, { type: t(`entities.${type}`, { count: 1 }) }) })
|
|
7330
7341
|
] }),
|
|
7331
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-destructive p-4 text-sm", children: t(`
|
|
7342
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-destructive p-4 text-sm", children: t(`common.delete.description`, { type: t(`entities.${type}`, { count: 1 }) }) }),
|
|
7332
7343
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end", children: [
|
|
7333
7344
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7334
7345
|
Button,
|
|
@@ -7338,7 +7349,7 @@ function CommonDeleter({ deleteFunction, redirectTo, type, forceShow }) {
|
|
|
7338
7349
|
type: `button`,
|
|
7339
7350
|
onClick: () => setOpen(false),
|
|
7340
7351
|
disabled: isDeleting,
|
|
7341
|
-
children: t(`
|
|
7352
|
+
children: t(`ui.buttons.cancel`)
|
|
7342
7353
|
}
|
|
7343
7354
|
),
|
|
7344
7355
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -7352,9 +7363,9 @@ function CommonDeleter({ deleteFunction, redirectTo, type, forceShow }) {
|
|
|
7352
7363
|
variant: "destructive",
|
|
7353
7364
|
disabled: isDeleting,
|
|
7354
7365
|
children: isDeleting ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
7355
|
-
t(`
|
|
7366
|
+
t(`ui.buttons.is_deleting`),
|
|
7356
7367
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.LoaderCircleIcon, { className: "animate-spin-slow h-5 w-5" })
|
|
7357
|
-
] }) : t(`
|
|
7368
|
+
] }) : t(`ui.buttons.delete`)
|
|
7358
7369
|
}
|
|
7359
7370
|
)
|
|
7360
7371
|
] })
|
|
@@ -7377,10 +7388,10 @@ function CommonEditorButtons({ isEdit, form, disabled, setOpen }) {
|
|
|
7377
7388
|
type: `button`,
|
|
7378
7389
|
onClick: () => setOpen(false),
|
|
7379
7390
|
"data-testid": `modal-button-cancel`,
|
|
7380
|
-
children: t(`
|
|
7391
|
+
children: t(`ui.buttons.cancel`)
|
|
7381
7392
|
}
|
|
7382
7393
|
),
|
|
7383
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: isEdit ? t(`
|
|
7394
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) })
|
|
7384
7395
|
] });
|
|
7385
7396
|
}
|
|
7386
7397
|
_chunk7QVYU63Ejs.__name.call(void 0, CommonEditorButtons, "CommonEditorButtons");
|
|
@@ -7391,13 +7402,13 @@ _chunk7QVYU63Ejs.__name.call(void 0, CommonEditorButtons, "CommonEditorButtons")
|
|
|
7391
7402
|
function CommonEditorHeader({ type, name }) {
|
|
7392
7403
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
7393
7404
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogHeader, { children: [
|
|
7394
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: name ? t(`
|
|
7405
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: name ? t(`common.edit.update.title`, {
|
|
7395
7406
|
type
|
|
7396
|
-
}) : t(`
|
|
7397
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: name ? t(`
|
|
7407
|
+
}) : t(`common.edit.create.title`, { type }) }),
|
|
7408
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: name ? t(`common.edit.update.description`, {
|
|
7398
7409
|
type,
|
|
7399
7410
|
name
|
|
7400
|
-
}) : t(`
|
|
7411
|
+
}) : t(`common.edit.create.description`, {
|
|
7401
7412
|
type
|
|
7402
7413
|
}) })
|
|
7403
7414
|
] });
|
|
@@ -7410,7 +7421,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, CommonEditorHeader, "CommonEditorHeader");
|
|
|
7410
7421
|
|
|
7411
7422
|
function CommonEditorTrigger({ isEdit, edit, create }) {
|
|
7412
7423
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
7413
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { children: isEdit ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: `ghost`, className: "text-muted-foreground", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, {}) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: `outline`, children: create ? create : t(`
|
|
7424
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { children: isEdit ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: `ghost`, className: "text-muted-foreground", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, {}) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: `outline`, children: create ? create : t(`ui.buttons.create`) }) });
|
|
7414
7425
|
}
|
|
7415
7426
|
_chunk7QVYU63Ejs.__name.call(void 0, CommonEditorTrigger, "CommonEditorTrigger");
|
|
7416
7427
|
|
|
@@ -7590,7 +7601,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
7590
7601
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
7591
7602
|
const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
|
|
7592
7603
|
_react.useEffect.call(void 0, () => {
|
|
7593
|
-
if (_optionalChain([date, 'optionalAccess',
|
|
7604
|
+
if (_optionalChain([date, 'optionalAccess', _159 => _159.from]) && _optionalChain([date, 'optionalAccess', _160 => _160.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _161 => _161.from, 'optionalAccess', _162 => _162.getTime, 'call', _163 => _163()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _164 => _164.to, 'optionalAccess', _165 => _165.getTime, 'call', _166 => _166()]) !== date.to.getTime())) {
|
|
7594
7605
|
onDateChange(date);
|
|
7595
7606
|
setPrevRange(date);
|
|
7596
7607
|
setOpen(false);
|
|
@@ -7601,7 +7612,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
7601
7612
|
setDate(void 0);
|
|
7602
7613
|
return;
|
|
7603
7614
|
}
|
|
7604
|
-
if (range.from && (!_optionalChain([date, 'optionalAccess',
|
|
7615
|
+
if (range.from && (!_optionalChain([date, 'optionalAccess', _167 => _167.from]) || range.from.getTime() !== date.from.getTime())) {
|
|
7605
7616
|
setDate({ from: range.from, to: void 0 });
|
|
7606
7617
|
} else {
|
|
7607
7618
|
setDate(range);
|
|
@@ -7616,7 +7627,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
7616
7627
|
className: _chunkUYBCHXXLjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
|
|
7617
7628
|
children: [
|
|
7618
7629
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
|
|
7619
|
-
_optionalChain([date, 'optionalAccess',
|
|
7630
|
+
_optionalChain([date, 'optionalAccess', _168 => _168.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
7620
7631
|
_datefns.format.call(void 0, date.from, "LLL dd, y"),
|
|
7621
7632
|
" - ",
|
|
7622
7633
|
_datefns.format.call(void 0, date.to, "LLL dd, y")
|
|
@@ -7629,7 +7640,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
|
|
|
7629
7640
|
Calendar,
|
|
7630
7641
|
{
|
|
7631
7642
|
mode: "range",
|
|
7632
|
-
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess',
|
|
7643
|
+
defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _169 => _169.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
|
|
7633
7644
|
selected: date,
|
|
7634
7645
|
onSelect: handleSelect,
|
|
7635
7646
|
numberOfMonths: 2
|
|
@@ -7717,7 +7728,7 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
7717
7728
|
movePrev();
|
|
7718
7729
|
} else if (e.key === "Enter" || e.key === "Space") {
|
|
7719
7730
|
if (activeIndex === -1) {
|
|
7720
|
-
_optionalChain([dropzoneState, 'access',
|
|
7731
|
+
_optionalChain([dropzoneState, 'access', _170 => _170.inputRef, 'access', _171 => _171.current, 'optionalAccess', _172 => _172.click, 'call', _173 => _173()]);
|
|
7721
7732
|
}
|
|
7722
7733
|
} else if (e.key === "Delete" || e.key === "Backspace") {
|
|
7723
7734
|
if (activeIndex !== -1) {
|
|
@@ -7738,8 +7749,8 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
7738
7749
|
(acceptedFiles, rejectedFiles) => {
|
|
7739
7750
|
const files = acceptedFiles;
|
|
7740
7751
|
if (!files) {
|
|
7741
|
-
_sonner.toast.error(t("
|
|
7742
|
-
description: t("
|
|
7752
|
+
_sonner.toast.error(t("common.errors.file"), {
|
|
7753
|
+
description: t("common.errors.file_large")
|
|
7743
7754
|
});
|
|
7744
7755
|
return;
|
|
7745
7756
|
}
|
|
@@ -7755,14 +7766,14 @@ var FileUploader = _react.forwardRef.call(void 0,
|
|
|
7755
7766
|
onValueChange(newValues);
|
|
7756
7767
|
if (rejectedFiles.length > 0) {
|
|
7757
7768
|
for (let i = 0; i < rejectedFiles.length; i++) {
|
|
7758
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
7759
|
-
_sonner.toast.error(t("
|
|
7760
|
-
description: t(`
|
|
7769
|
+
if (_optionalChain([rejectedFiles, 'access', _174 => _174[i], 'access', _175 => _175.errors, 'access', _176 => _176[0], 'optionalAccess', _177 => _177.code]) === "file-too-large") {
|
|
7770
|
+
_sonner.toast.error(t("common.errors.file"), {
|
|
7771
|
+
description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
|
|
7761
7772
|
});
|
|
7762
7773
|
break;
|
|
7763
7774
|
}
|
|
7764
|
-
if (_optionalChain([rejectedFiles, 'access',
|
|
7765
|
-
_sonner.toast.error(t(`
|
|
7775
|
+
if (_optionalChain([rejectedFiles, 'access', _178 => _178[i], 'access', _179 => _179.errors, 'access', _180 => _180[0], 'optionalAccess', _181 => _181.message])) {
|
|
7776
|
+
_sonner.toast.error(t(`common.errors.file`), {
|
|
7766
7777
|
description: rejectedFiles[i].errors[0].message
|
|
7767
7778
|
});
|
|
7768
7779
|
break;
|
|
@@ -7871,7 +7882,7 @@ var FileUploaderItem = _react.forwardRef.call(void 0,
|
|
|
7871
7882
|
className: _chunkUYBCHXXLjs.cn.call(void 0, "absolute", direction === "rtl" ? "top-1 left-1" : "top-1 right-1"),
|
|
7872
7883
|
onClick: () => removeFileFromSet(index),
|
|
7873
7884
|
children: [
|
|
7874
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: t(`
|
|
7885
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: t(`common.remove_item`, { index }) }),
|
|
7875
7886
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Trash2, { className: "hover:stroke-destructive h-4 w-4 duration-200 ease-in-out" })
|
|
7876
7887
|
]
|
|
7877
7888
|
}
|
|
@@ -8222,126 +8233,118 @@ function FormDateTime({
|
|
|
8222
8233
|
if (onChange) onChange(updatedDate);
|
|
8223
8234
|
}
|
|
8224
8235
|
}, "handleTimeChange");
|
|
8225
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
8233
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
8234
|
-
PopoverTrigger,
|
|
8236
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label: name, children: (field) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "relative flex flex-row", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, modal: true, children: [
|
|
8237
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
8238
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
8239
|
+
PopoverTrigger,
|
|
8240
|
+
{
|
|
8241
|
+
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8242
|
+
Button,
|
|
8235
8243
|
{
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
{
|
|
8239
|
-
variant: "outline",
|
|
8240
|
-
className: _chunkUYBCHXXLjs.cn.call(void 0, "w-full pl-3 text-left font-normal", !field.value && "text-muted-foreground")
|
|
8241
|
-
}
|
|
8242
|
-
),
|
|
8243
|
-
children: [
|
|
8244
|
-
field.value ? formatDateTime(field.value) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t(`generic.pick_date_time`) }),
|
|
8245
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Calendar, { className: "ml-auto h-4 w-4 opacity-50" })
|
|
8246
|
-
]
|
|
8244
|
+
variant: "outline",
|
|
8245
|
+
className: _chunkUYBCHXXLjs.cn.call(void 0, "w-full pl-3 text-left font-normal", !field.value && "text-muted-foreground")
|
|
8247
8246
|
}
|
|
8248
8247
|
),
|
|
8249
|
-
|
|
8250
|
-
|
|
8251
|
-
{
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8248
|
+
children: [
|
|
8249
|
+
field.value ? formatDateTime(field.value) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t(`common.pick_date_time`) }),
|
|
8250
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Calendar, { className: "ml-auto h-4 w-4 opacity-50" })
|
|
8251
|
+
]
|
|
8252
|
+
}
|
|
8253
|
+
),
|
|
8254
|
+
field.value && allowEmpty !== false && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8255
|
+
_lucidereact.CircleXIcon,
|
|
8256
|
+
{
|
|
8257
|
+
className: "text-muted hover:text-destructive ml-2 h-6 w-6 cursor-pointer",
|
|
8258
|
+
onClick: () => {
|
|
8259
|
+
if (onChange) onChange(void 0);
|
|
8260
|
+
form.setValue(id, "");
|
|
8261
|
+
}
|
|
8262
|
+
}
|
|
8263
|
+
)
|
|
8264
|
+
] }),
|
|
8265
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { className: "w-auto p-4", align: "start", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col space-y-4", children: [
|
|
8266
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8267
|
+
Calendar,
|
|
8268
|
+
{
|
|
8269
|
+
mode: "single",
|
|
8270
|
+
selected: field.value,
|
|
8271
|
+
onSelect: (date) => {
|
|
8272
|
+
if (date) {
|
|
8273
|
+
const newDate = new Date(date);
|
|
8274
|
+
if (field.value) {
|
|
8275
|
+
const currentDate = new Date(field.value);
|
|
8276
|
+
newDate.setHours(currentDate.getHours(), currentDate.getMinutes());
|
|
8277
|
+
} else {
|
|
8278
|
+
newDate.setHours(selectedHours, selectedMinutes);
|
|
8256
8279
|
}
|
|
8280
|
+
form.setValue(id, newDate);
|
|
8281
|
+
if (onChange) onChange(newDate);
|
|
8282
|
+
setSelectedHours(newDate.getHours());
|
|
8283
|
+
setSelectedMinutes(roundToNearestFiveMinutes(newDate.getMinutes()));
|
|
8257
8284
|
}
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8285
|
+
},
|
|
8286
|
+
disabled: (date) => minDate && date < minDate ? true : false,
|
|
8287
|
+
locale: dateFnsLocale
|
|
8288
|
+
}
|
|
8289
|
+
),
|
|
8290
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-row items-end justify-center space-x-4", children: [
|
|
8291
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col space-y-2", children: [
|
|
8292
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { htmlFor: "hours-select", children: t(`common.hours`) }),
|
|
8293
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
8294
|
+
Select,
|
|
8263
8295
|
{
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
newDate.setHours(selectedHours, selectedMinutes);
|
|
8274
|
-
}
|
|
8275
|
-
form.setValue(id, newDate);
|
|
8276
|
-
if (onChange) onChange(newDate);
|
|
8277
|
-
setSelectedHours(newDate.getHours());
|
|
8278
|
-
setSelectedMinutes(roundToNearestFiveMinutes(newDate.getMinutes()));
|
|
8279
|
-
}
|
|
8296
|
+
value: String(field.value ? new Date(field.value).getHours() : selectedHours),
|
|
8297
|
+
onValueChange: (value) => {
|
|
8298
|
+
if (!value) return;
|
|
8299
|
+
const hours = parseInt(value);
|
|
8300
|
+
setSelectedHours(hours);
|
|
8301
|
+
handleTimeChange(
|
|
8302
|
+
hours,
|
|
8303
|
+
field.value ? roundToNearestFiveMinutes(new Date(field.value).getMinutes()) : selectedMinutes
|
|
8304
|
+
);
|
|
8280
8305
|
},
|
|
8281
|
-
|
|
8282
|
-
|
|
8306
|
+
children: [
|
|
8307
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { id: "hours-select", className: "w-[70px]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
|
|
8308
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: hoursOptions.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: String(option.value), children: option.label }, option.value)) })
|
|
8309
|
+
]
|
|
8283
8310
|
}
|
|
8284
|
-
)
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
value: String(field.value ? new Date(field.value).getHours() : selectedHours),
|
|
8292
|
-
onValueChange: (value) => {
|
|
8293
|
-
if (!value) return;
|
|
8294
|
-
const hours = parseInt(value);
|
|
8295
|
-
setSelectedHours(hours);
|
|
8296
|
-
handleTimeChange(
|
|
8297
|
-
hours,
|
|
8298
|
-
field.value ? roundToNearestFiveMinutes(new Date(field.value).getMinutes()) : selectedMinutes
|
|
8299
|
-
);
|
|
8300
|
-
},
|
|
8301
|
-
children: [
|
|
8302
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { id: "hours-select", className: "w-[70px]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
|
|
8303
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: hoursOptions.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: String(option.value), children: option.label }, option.value)) })
|
|
8304
|
-
]
|
|
8305
|
-
}
|
|
8306
|
-
)
|
|
8307
|
-
] }),
|
|
8308
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-[9px] text-xl", children: ":" }),
|
|
8309
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col space-y-2", children: [
|
|
8310
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { htmlFor: "minutes-select", children: t(`generic.minutes`) }),
|
|
8311
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
8312
|
-
Select,
|
|
8313
|
-
{
|
|
8314
|
-
value: String(
|
|
8315
|
-
field.value ? roundToNearestFiveMinutes(new Date(field.value).getMinutes()) : selectedMinutes
|
|
8316
|
-
),
|
|
8317
|
-
onValueChange: (value) => {
|
|
8318
|
-
if (!value) return;
|
|
8319
|
-
const minutes = parseInt(value);
|
|
8320
|
-
setSelectedMinutes(minutes);
|
|
8321
|
-
handleTimeChange(field.value ? new Date(field.value).getHours() : selectedHours, minutes);
|
|
8322
|
-
},
|
|
8323
|
-
children: [
|
|
8324
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { id: "minutes-select", className: "w-[70px]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
|
|
8325
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: minutesOptions.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: String(option.value), children: option.label }, option.value)) })
|
|
8326
|
-
]
|
|
8327
|
-
}
|
|
8328
|
-
)
|
|
8329
|
-
] })
|
|
8330
|
-
] }),
|
|
8331
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8332
|
-
Button,
|
|
8311
|
+
)
|
|
8312
|
+
] }),
|
|
8313
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-[9px] text-xl", children: ":" }),
|
|
8314
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col space-y-2", children: [
|
|
8315
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { htmlFor: "minutes-select", children: t(`common.minutes`) }),
|
|
8316
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
8317
|
+
Select,
|
|
8333
8318
|
{
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8319
|
+
value: String(
|
|
8320
|
+
field.value ? roundToNearestFiveMinutes(new Date(field.value).getMinutes()) : selectedMinutes
|
|
8321
|
+
),
|
|
8322
|
+
onValueChange: (value) => {
|
|
8323
|
+
if (!value) return;
|
|
8324
|
+
const minutes = parseInt(value);
|
|
8325
|
+
setSelectedMinutes(minutes);
|
|
8326
|
+
handleTimeChange(field.value ? new Date(field.value).getHours() : selectedHours, minutes);
|
|
8337
8327
|
},
|
|
8338
|
-
children:
|
|
8328
|
+
children: [
|
|
8329
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { id: "minutes-select", className: "w-[70px]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, {}) }),
|
|
8330
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: minutesOptions.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: String(option.value), children: option.label }, option.value)) })
|
|
8331
|
+
]
|
|
8339
8332
|
}
|
|
8340
8333
|
)
|
|
8341
|
-
] })
|
|
8342
|
-
] })
|
|
8343
|
-
|
|
8344
|
-
|
|
8334
|
+
] })
|
|
8335
|
+
] }),
|
|
8336
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8337
|
+
Button,
|
|
8338
|
+
{
|
|
8339
|
+
className: "mt-2",
|
|
8340
|
+
onClick: () => {
|
|
8341
|
+
setOpen(false);
|
|
8342
|
+
},
|
|
8343
|
+
children: t(`ui.buttons.select_date`)
|
|
8344
|
+
}
|
|
8345
|
+
)
|
|
8346
|
+
] }) })
|
|
8347
|
+
] }) }) }) });
|
|
8345
8348
|
}
|
|
8346
8349
|
_chunk7QVYU63Ejs.__name.call(void 0, FormDateTime, "FormDateTime");
|
|
8347
8350
|
|
|
@@ -8363,66 +8366,57 @@ function FormInput({
|
|
|
8363
8366
|
isRequired = false
|
|
8364
8367
|
}) {
|
|
8365
8368
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
8366
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
new URL(value);
|
|
8383
|
-
form.clearErrors(id);
|
|
8384
|
-
} catch (error) {
|
|
8385
|
-
form.setError(id, {
|
|
8386
|
-
type: "validate",
|
|
8387
|
-
message: t(`generic.errors.valid_url`)
|
|
8388
|
-
});
|
|
8389
|
-
}
|
|
8390
|
-
}
|
|
8391
|
-
if (onBlur) await onBlur();
|
|
8392
|
-
field.onBlur();
|
|
8393
|
-
}, "handleBlur");
|
|
8394
|
-
const handleChange = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
8395
|
-
if (type === "number" || type === "currency") {
|
|
8396
|
-
const value = e.target.value.replace(/[^0-9]/g, "");
|
|
8397
|
-
field.onChange(+value);
|
|
8398
|
-
if (onChange) onChange(+value);
|
|
8399
|
-
} else {
|
|
8400
|
-
field.onChange(e.target.value);
|
|
8401
|
-
if (onChange) onChange(e.target.value);
|
|
8402
|
-
}
|
|
8403
|
-
}, "handleChange");
|
|
8404
|
-
const inputProps = {
|
|
8405
|
-
...field,
|
|
8406
|
-
autoFocus: autoFocus === true,
|
|
8407
|
-
type: type === "number" || type === "currency" ? "number" : type === "password" ? "password" : "text",
|
|
8408
|
-
className: `w-full ${type === "number" || type === "currency" ? "text-end" : ""}`,
|
|
8409
|
-
disabled: disabled === true || form.formState.isSubmitting,
|
|
8410
|
-
placeholder: placeholder || "",
|
|
8411
|
-
onBlur: handleBlur,
|
|
8412
|
-
onKeyDown,
|
|
8413
|
-
onChange: handleChange,
|
|
8414
|
-
"data-testid": testId
|
|
8415
|
-
};
|
|
8416
|
-
if (type === "currency") {
|
|
8417
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputGroup, { children: [
|
|
8418
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupAddon, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupText, { children: "\u20AC" }) }),
|
|
8419
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupInput, { ...inputProps })
|
|
8420
|
-
] });
|
|
8369
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label: name, isRequired, children: (field) => {
|
|
8370
|
+
const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (e) => {
|
|
8371
|
+
let value = e.target.value;
|
|
8372
|
+
if (type === "link" && value) {
|
|
8373
|
+
if (!/^https?:\/\//i.test(value)) {
|
|
8374
|
+
value = "https://" + value;
|
|
8375
|
+
field.onChange(value);
|
|
8376
|
+
}
|
|
8377
|
+
try {
|
|
8378
|
+
new URL(value);
|
|
8379
|
+
form.clearErrors(id);
|
|
8380
|
+
} catch (error) {
|
|
8381
|
+
form.setError(id, {
|
|
8382
|
+
type: "validate",
|
|
8383
|
+
message: t(`common.errors.valid_url`)
|
|
8384
|
+
});
|
|
8421
8385
|
}
|
|
8422
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Input, { ...inputProps });
|
|
8423
8386
|
}
|
|
8387
|
+
if (onBlur) await onBlur();
|
|
8388
|
+
field.onBlur();
|
|
8389
|
+
}, "handleBlur");
|
|
8390
|
+
const handleChange = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
|
|
8391
|
+
if (type === "number" || type === "currency") {
|
|
8392
|
+
const value = e.target.value.replace(/[^0-9]/g, "");
|
|
8393
|
+
field.onChange(+value);
|
|
8394
|
+
if (onChange) onChange(+value);
|
|
8395
|
+
} else {
|
|
8396
|
+
field.onChange(e.target.value);
|
|
8397
|
+
if (onChange) onChange(e.target.value);
|
|
8398
|
+
}
|
|
8399
|
+
}, "handleChange");
|
|
8400
|
+
const inputProps = {
|
|
8401
|
+
...field,
|
|
8402
|
+
autoFocus: autoFocus === true,
|
|
8403
|
+
type: type === "number" || type === "currency" ? "number" : type === "password" ? "password" : "text",
|
|
8404
|
+
className: `w-full ${type === "number" || type === "currency" ? "text-end" : ""}`,
|
|
8405
|
+
disabled: disabled === true || form.formState.isSubmitting,
|
|
8406
|
+
placeholder: placeholder || "",
|
|
8407
|
+
onBlur: handleBlur,
|
|
8408
|
+
onKeyDown,
|
|
8409
|
+
onChange: handleChange,
|
|
8410
|
+
"data-testid": testId
|
|
8411
|
+
};
|
|
8412
|
+
if (type === "currency") {
|
|
8413
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, InputGroup, { children: [
|
|
8414
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupAddon, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupText, { children: "\u20AC" }) }),
|
|
8415
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, InputGroupInput, { ...inputProps })
|
|
8416
|
+
] });
|
|
8424
8417
|
}
|
|
8425
|
-
|
|
8418
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Input, { ...inputProps });
|
|
8419
|
+
} }) });
|
|
8426
8420
|
}
|
|
8427
8421
|
_chunk7QVYU63Ejs.__name.call(void 0, FormInput, "FormInput");
|
|
8428
8422
|
|
|
@@ -8448,7 +8442,7 @@ var PasswordInput = React12.forwardRef(({ className, type, ...props }, ref) => {
|
|
|
8448
8442
|
disabled,
|
|
8449
8443
|
children: [
|
|
8450
8444
|
showPassword && !disabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.EyeIcon, { className: "h-4 w-4", "aria-hidden": "true" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.EyeOffIcon, { className: "h-4 w-4", "aria-hidden": "true" }),
|
|
8451
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: showPassword ? t(`
|
|
8445
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: showPassword ? t(`common.hide_password`) : t(`common.show_password`) })
|
|
8452
8446
|
]
|
|
8453
8447
|
}
|
|
8454
8448
|
),
|
|
@@ -8560,11 +8554,11 @@ function FormPlaceAutocomplete({
|
|
|
8560
8554
|
const data = await response.json();
|
|
8561
8555
|
if (data.suggestions) {
|
|
8562
8556
|
const formattedSuggestions = data.suggestions.map((suggestion) => ({
|
|
8563
|
-
place_id: _optionalChain([suggestion, 'access',
|
|
8564
|
-
description: _optionalChain([suggestion, 'access',
|
|
8557
|
+
place_id: _optionalChain([suggestion, 'access', _182 => _182.placePrediction, 'optionalAccess', _183 => _183.placeId]) || "",
|
|
8558
|
+
description: _optionalChain([suggestion, 'access', _184 => _184.placePrediction, 'optionalAccess', _185 => _185.text, 'optionalAccess', _186 => _186.text]) || "",
|
|
8565
8559
|
structured_formatting: {
|
|
8566
|
-
main_text: _optionalChain([suggestion, 'access',
|
|
8567
|
-
secondary_text: _optionalChain([suggestion, 'access',
|
|
8560
|
+
main_text: _optionalChain([suggestion, 'access', _187 => _187.placePrediction, 'optionalAccess', _188 => _188.structuredFormat, 'optionalAccess', _189 => _189.mainText, 'optionalAccess', _190 => _190.text]) || "",
|
|
8561
|
+
secondary_text: _optionalChain([suggestion, 'access', _191 => _191.placePrediction, 'optionalAccess', _192 => _192.structuredFormat, 'optionalAccess', _193 => _193.secondaryText, 'optionalAccess', _194 => _194.text]) || ""
|
|
8568
8562
|
}
|
|
8569
8563
|
}));
|
|
8570
8564
|
setSuggestions(formattedSuggestions);
|
|
@@ -8659,8 +8653,8 @@ function FormPlaceAutocomplete({
|
|
|
8659
8653
|
className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
|
|
8660
8654
|
onClick: () => handleSuggestionSelect(suggestion),
|
|
8661
8655
|
children: [
|
|
8662
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access',
|
|
8663
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access',
|
|
8656
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _195 => _195.structured_formatting, 'optionalAccess', _196 => _196.main_text]) }),
|
|
8657
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _197 => _197.structured_formatting, 'optionalAccess', _198 => _198.secondary_text]) })
|
|
8664
8658
|
]
|
|
8665
8659
|
},
|
|
8666
8660
|
suggestion.place_id || index
|
|
@@ -8869,7 +8863,7 @@ function UserMultiSelect({
|
|
|
8869
8863
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
8870
8864
|
return _chunkUYBCHXXLjs.UserService.findAllUsers(params);
|
|
8871
8865
|
}, "retriever"),
|
|
8872
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
8866
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _199 => _199.id]) },
|
|
8873
8867
|
module: _chunkUYBCHXXLjs.Modules.User
|
|
8874
8868
|
});
|
|
8875
8869
|
_react.useEffect.call(void 0, () => {
|
|
@@ -8896,7 +8890,7 @@ function UserMultiSelect({
|
|
|
8896
8890
|
_react.useEffect.call(void 0, () => {
|
|
8897
8891
|
if (data.data && data.data.length > 0) {
|
|
8898
8892
|
const users = data.data;
|
|
8899
|
-
const filteredUsers = users.filter((user) => user.id !== _optionalChain([currentUser, 'optionalAccess',
|
|
8893
|
+
const filteredUsers = users.filter((user) => user.id !== _optionalChain([currentUser, 'optionalAccess', _200 => _200.id]));
|
|
8900
8894
|
const options = filteredUsers.map((user) => ({
|
|
8901
8895
|
label: user.name,
|
|
8902
8896
|
value: user.id,
|
|
@@ -8927,7 +8921,7 @@ function UserMultiSelect({
|
|
|
8927
8921
|
return existingUser;
|
|
8928
8922
|
}
|
|
8929
8923
|
const option = userOptions.find((option2) => option2.value === id2);
|
|
8930
|
-
if (_optionalChain([option, 'optionalAccess',
|
|
8924
|
+
if (_optionalChain([option, 'optionalAccess', _201 => _201.userData])) {
|
|
8931
8925
|
return {
|
|
8932
8926
|
id: option.userData.id,
|
|
8933
8927
|
name: option.userData.name,
|
|
@@ -8938,7 +8932,7 @@ function UserMultiSelect({
|
|
|
8938
8932
|
});
|
|
8939
8933
|
form.setValue(id, updatedSelectedUsers);
|
|
8940
8934
|
if (onChange) {
|
|
8941
|
-
const fullSelectedUsers = selectedIds.map((id2) => _optionalChain([userOptions, 'access',
|
|
8935
|
+
const fullSelectedUsers = selectedIds.map((id2) => _optionalChain([userOptions, 'access', _202 => _202.find, 'call', _203 => _203((option) => option.value === id2), 'optionalAccess', _204 => _204.userData])).filter(Boolean);
|
|
8942
8936
|
onChange(fullSelectedUsers);
|
|
8943
8937
|
}
|
|
8944
8938
|
}, "handleValueChange");
|
|
@@ -8971,22 +8965,22 @@ function UserReactivatorInterface({ user, propagateChanges }) {
|
|
|
8971
8965
|
setOpen(false);
|
|
8972
8966
|
propagateChanges(updatedUser);
|
|
8973
8967
|
} catch (error) {
|
|
8974
|
-
errorToast({ title: t(`
|
|
8968
|
+
errorToast({ title: t(`common.errors.error`), error });
|
|
8975
8969
|
}
|
|
8976
8970
|
}, "reactivateUser");
|
|
8977
8971
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog, { open, onOpenChange: setOpen, children: [
|
|
8978
8972
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", children: [
|
|
8979
8973
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UserCheckIcon, { className: "mr-3 h-3.5 w-3.5" }),
|
|
8980
|
-
t(`
|
|
8974
|
+
t(`user.buttons.reactivate`)
|
|
8981
8975
|
] }) }),
|
|
8982
8976
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
|
|
8983
8977
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogHeader, { children: [
|
|
8984
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`
|
|
8985
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`
|
|
8978
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`user.reactivate.title`) }),
|
|
8979
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`user.reactivate.subtitle`) })
|
|
8986
8980
|
] }),
|
|
8987
|
-
t(`
|
|
8981
|
+
t(`user.reactivate.description`, { name: user.name }),
|
|
8988
8982
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end", children: [
|
|
8989
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`
|
|
8983
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
|
|
8990
8984
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8991
8985
|
Button,
|
|
8992
8986
|
{
|
|
@@ -8995,7 +8989,7 @@ function UserReactivatorInterface({ user, propagateChanges }) {
|
|
|
8995
8989
|
e.preventDefault();
|
|
8996
8990
|
reactivateUser();
|
|
8997
8991
|
},
|
|
8998
|
-
children: t(`
|
|
8992
|
+
children: t(`user.buttons.reactivate`)
|
|
8999
8993
|
}
|
|
9000
8994
|
)
|
|
9001
8995
|
] })
|
|
@@ -9023,26 +9017,26 @@ function UserResentInvitationEmailInternal({ user }) {
|
|
|
9023
9017
|
try {
|
|
9024
9018
|
await _chunkUYBCHXXLjs.UserService.sendInvitation({ userId: user.id, companyId: user.company.id });
|
|
9025
9019
|
setOpen(false);
|
|
9026
|
-
_sonner.toast.message(t(`
|
|
9027
|
-
description: t(`
|
|
9020
|
+
_sonner.toast.message(t(`user.resend_activation.email_sent`), {
|
|
9021
|
+
description: t(`user.resend_activation.email_sent_description`, { email: user.email })
|
|
9028
9022
|
});
|
|
9029
9023
|
} catch (error) {
|
|
9030
|
-
errorToast({ title: t(`
|
|
9024
|
+
errorToast({ title: t(`common.errors.error`), error });
|
|
9031
9025
|
}
|
|
9032
9026
|
}, "sendInvitationEmail");
|
|
9033
9027
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog, { open, onOpenChange: setOpen, children: [
|
|
9034
9028
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Tooltip2, { children: [
|
|
9035
9029
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { size: "sm", variant: `ghost`, className: "text-muted-foreground", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MailIcon, {}) }) }) }),
|
|
9036
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { children: t(`
|
|
9030
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { children: t(`user.buttons.resend_activation`) })
|
|
9037
9031
|
] }),
|
|
9038
9032
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
|
|
9039
9033
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogHeader, { children: [
|
|
9040
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`
|
|
9041
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`
|
|
9034
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`user.resend_activation.title`) }),
|
|
9035
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`user.resend_activation.subtitle`) })
|
|
9042
9036
|
] }),
|
|
9043
|
-
t(`
|
|
9037
|
+
t(`user.resend_activation.description`, { email: user.email }),
|
|
9044
9038
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end", children: [
|
|
9045
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`
|
|
9039
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
|
|
9046
9040
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9047
9041
|
Button,
|
|
9048
9042
|
{
|
|
@@ -9051,7 +9045,7 @@ function UserResentInvitationEmailInternal({ user }) {
|
|
|
9051
9045
|
e.preventDefault();
|
|
9052
9046
|
sendInvitationEmail();
|
|
9053
9047
|
},
|
|
9054
|
-
children: t(`
|
|
9048
|
+
children: t(`user.buttons.resend_activation`)
|
|
9055
9049
|
}
|
|
9056
9050
|
)
|
|
9057
9051
|
] })
|
|
@@ -9086,7 +9080,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
|
|
|
9086
9080
|
}, "getInitials");
|
|
9087
9081
|
const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
9088
9082
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `h-6 w-6 ${className}`, children: [
|
|
9089
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess',
|
|
9083
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _205 => _205.avatar]) }),
|
|
9090
9084
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials(user.name) })
|
|
9091
9085
|
] }) });
|
|
9092
9086
|
}, "getAvatar");
|
|
@@ -9164,70 +9158,61 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
|
|
|
9164
9158
|
setOpen(false);
|
|
9165
9159
|
}, 0);
|
|
9166
9160
|
}, "setUser");
|
|
9167
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9161
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label, isRequired, children: (field) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, modal: true, children: [
|
|
9162
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
|
|
9163
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md border p-2", children: [
|
|
9164
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `mr-2 h-6 w-6`, children: [
|
|
9165
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _206 => _206.value, 'optionalAccess', _207 => _207.avatar]) }),
|
|
9166
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _208 => _208.value, 'optionalAccess', _209 => _209.name]) ? _optionalChain([field, 'access', _210 => _210.value, 'optionalAccess', _211 => _211.name, 'access', _212 => _212.split, 'call', _213 => _213(" "), 'access', _214 => _214.map, 'call', _215 => _215((name) => name.charAt(0).toUpperCase())]) : "X" })
|
|
9167
|
+
] }) }),
|
|
9168
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "", children: _nullishCoalesce(_optionalChain([field, 'access', _216 => _216.value, 'optionalAccess', _217 => _217.name]), () => ( "")) })
|
|
9169
|
+
] }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "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: _nullishCoalesce(placeholder, () => ( t(`ui.search.placeholder`, { type: t(`entities.users`, { count: 1 }) }))) }) }) }),
|
|
9170
|
+
field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9171
|
+
_lucidereact.CircleX,
|
|
9172
|
+
{
|
|
9173
|
+
className: "text-muted hover:text-destructive ml-2 h-6 w-6 cursor-pointer",
|
|
9174
|
+
onClick: () => setUser()
|
|
9175
|
+
}
|
|
9176
|
+
)
|
|
9177
|
+
] }),
|
|
9178
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Command, { shouldFilter: false, children: [
|
|
9179
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative mb-2 w-full", children: [
|
|
9180
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SearchIcon, { className: "text-muted-foreground absolute top-2.5 left-2.5 h-4 w-4" }),
|
|
9181
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9182
|
+
Input,
|
|
9183
|
+
{
|
|
9184
|
+
placeholder: t(`ui.search.placeholder`, { type: t(`entities.users`, { count: 1 }) }),
|
|
9185
|
+
type: "text",
|
|
9186
|
+
className: "w-full pr-8 pl-8",
|
|
9187
|
+
onChange: (e) => setSearchTerm(e.target.value),
|
|
9188
|
+
value: searchTerm
|
|
9189
|
+
}
|
|
9190
|
+
),
|
|
9191
|
+
isSearching ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCwIcon, { className: "text-muted-foreground absolute top-2.5 right-2.5 h-4 w-4 animate-spin" }) : searchTermRef.current ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9192
|
+
_lucidereact.XIcon,
|
|
9193
|
+
{
|
|
9194
|
+
className: `absolute top-2.5 right-2.5 h-4 w-4 ${searchTermRef.current ? "cursor-pointer" : "text-muted-foreground"}`,
|
|
9195
|
+
onClick: () => {
|
|
9196
|
+
setSearchTerm("");
|
|
9197
|
+
search("");
|
|
9188
9198
|
}
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
{
|
|
9207
|
-
className: `absolute top-2.5 right-2.5 h-4 w-4 ${searchTermRef.current ? "cursor-pointer" : "text-muted-foreground"}`,
|
|
9208
|
-
onClick: () => {
|
|
9209
|
-
setSearchTerm("");
|
|
9210
|
-
search("");
|
|
9211
|
-
}
|
|
9212
|
-
}
|
|
9213
|
-
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {})
|
|
9214
|
-
] }),
|
|
9215
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandList, { children: data.data && data.data.length > 0 && data.data.map((user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9216
|
-
CommandItem,
|
|
9217
|
-
{
|
|
9218
|
-
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
9219
|
-
onSelect: () => setUser(user),
|
|
9220
|
-
children: [
|
|
9221
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user, className: `mr-2 h-4 w-4` }),
|
|
9222
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "", children: user.name })
|
|
9223
|
-
]
|
|
9224
|
-
},
|
|
9225
|
-
user.id
|
|
9226
|
-
)) })
|
|
9227
|
-
] }) })
|
|
9228
|
-
] })
|
|
9229
|
-
}
|
|
9230
|
-
) });
|
|
9199
|
+
}
|
|
9200
|
+
) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {})
|
|
9201
|
+
] }),
|
|
9202
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandList, { children: data.data && data.data.length > 0 && data.data.map((user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9203
|
+
CommandItem,
|
|
9204
|
+
{
|
|
9205
|
+
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
9206
|
+
onSelect: () => setUser(user),
|
|
9207
|
+
children: [
|
|
9208
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user, className: `mr-2 h-4 w-4` }),
|
|
9209
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "", children: user.name })
|
|
9210
|
+
]
|
|
9211
|
+
},
|
|
9212
|
+
user.id
|
|
9213
|
+
)) })
|
|
9214
|
+
] }) })
|
|
9215
|
+
] }) }) });
|
|
9231
9216
|
}
|
|
9232
9217
|
_chunk7QVYU63Ejs.__name.call(void 0, UserSelector, "UserSelector");
|
|
9233
9218
|
|
|
@@ -9245,28 +9230,28 @@ var UserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ child
|
|
|
9245
9230
|
const response = [];
|
|
9246
9231
|
if (hasPermissionToModule({ module: _chunkUYBCHXXLjs.Modules.User, action: "update" /* Update */ })) {
|
|
9247
9232
|
response.push({
|
|
9248
|
-
name: t(`
|
|
9233
|
+
name: t(`common.settings`),
|
|
9249
9234
|
href: generateUrl({ page: `/settings` })
|
|
9250
9235
|
});
|
|
9251
9236
|
response.push({
|
|
9252
|
-
name: t(`
|
|
9237
|
+
name: t(`entities.users`, { count: 2 }),
|
|
9253
9238
|
href: generateUrl({ page: `/settings`, id: _chunkUYBCHXXLjs.Modules.User.pageUrl })
|
|
9254
9239
|
});
|
|
9255
9240
|
}
|
|
9256
9241
|
if (user)
|
|
9257
9242
|
response.push({
|
|
9258
|
-
name: `${user.name}${user.isDeleted ? ` (${t(`
|
|
9243
|
+
name: `${user.name}${user.isDeleted ? ` (${t(`user.deleted`)})` : ""}`,
|
|
9259
9244
|
href: generateUrl({ page: _chunkUYBCHXXLjs.Modules.User, id: user.id })
|
|
9260
9245
|
});
|
|
9261
9246
|
return response;
|
|
9262
9247
|
}, "breadcrumb");
|
|
9263
9248
|
const title = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
9264
9249
|
const response = {
|
|
9265
|
-
type: t(`
|
|
9250
|
+
type: t(`entities.users`, { count: user ? 1 : 2 })
|
|
9266
9251
|
};
|
|
9267
9252
|
const functions = [];
|
|
9268
9253
|
if (user) {
|
|
9269
|
-
response.element = `${user.name}${user.isDeleted ? ` (${t(`
|
|
9254
|
+
response.element = `${user.name}${user.isDeleted ? ` (${t(`user.deleted`)})` : ""}`;
|
|
9270
9255
|
if (user.isDeleted) {
|
|
9271
9256
|
functions.push(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserReactivator, { user, propagateChanges: setUser }, `UserReactivator`));
|
|
9272
9257
|
} else {
|
|
@@ -9311,7 +9296,7 @@ function UserDetails({ user }) {
|
|
|
9311
9296
|
const { title } = useSharedContext();
|
|
9312
9297
|
let roles = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {});
|
|
9313
9298
|
if (user.roles && user.roles.length > 0) {
|
|
9314
|
-
roles = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-4 w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: user.roles.map((role, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: _chunkUYBCHXXLjs.Modules.Role, id: role.id }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { className: "mr-2", variant: `default`, children: t(`
|
|
9299
|
+
roles = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-4 w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: user.roles.map((role, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: _chunkUYBCHXXLjs.Modules.Role, id: role.id }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { className: "mr-2", variant: `default`, children: t(`role.roles`, { role: role.id.replaceAll(`-`, ``) }) }) }, role.id)) }) });
|
|
9315
9300
|
}
|
|
9316
9301
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-2", children: [
|
|
9317
9302
|
user.avatar && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "relative aspect-auto w-full max-w-md overflow-hidden rounded-lg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -9325,11 +9310,11 @@ function UserDetails({ user }) {
|
|
|
9325
9310
|
}
|
|
9326
9311
|
) }),
|
|
9327
9312
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContentTitle, { module: _chunkUYBCHXXLjs.Modules.User, type: title.type, element: title.element, functions: title.functions }),
|
|
9328
|
-
user.isDeleted ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "destructive", children: t(`
|
|
9313
|
+
user.isDeleted ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "destructive", children: t(`user.errors.deleted`) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: !user.isActivated && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "destructive", children: t(`user.errors.inactive`) }) }) }),
|
|
9329
9314
|
roles,
|
|
9330
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AttributeElement, { inline: true, title: t(`
|
|
9331
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AttributeElement, { inline: true, title: t(`
|
|
9332
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AttributeElement, { inline: false, title: t(`
|
|
9315
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AttributeElement, { inline: true, title: t(`user.fields.title.label`), value: user.title }),
|
|
9316
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AttributeElement, { inline: true, title: t(`common.fields.email.label`), value: user.email }),
|
|
9317
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AttributeElement, { inline: false, title: t(`user.fields.bio.label`), value: user.bio })
|
|
9333
9318
|
] });
|
|
9334
9319
|
}
|
|
9335
9320
|
_chunk7QVYU63Ejs.__name.call(void 0, UserDetails, "UserDetails");
|
|
@@ -9381,13 +9366,13 @@ function UsersListContainerInternal() {
|
|
|
9381
9366
|
if (!hasPermissionToModule({ module: _chunkUYBCHXXLjs.Modules.User, action: "delete" /* Delete */ })) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CompanyUsersList, {});
|
|
9382
9367
|
const tabs = [
|
|
9383
9368
|
{
|
|
9384
|
-
label: t(`
|
|
9369
|
+
label: t(`entities.users`, { count: 2 }),
|
|
9385
9370
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CompanyUsersList, {}),
|
|
9386
9371
|
modules: [_chunkUYBCHXXLjs.Modules.Company],
|
|
9387
9372
|
action: "read" /* Read */
|
|
9388
9373
|
},
|
|
9389
9374
|
{
|
|
9390
|
-
label: t(`
|
|
9375
|
+
label: t(`user.deleted`),
|
|
9391
9376
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CompanyUsersList, { isDeleted: true }),
|
|
9392
9377
|
modules: [_chunkUYBCHXXLjs.Modules.Company],
|
|
9393
9378
|
action: "update" /* Update */
|
|
@@ -9414,7 +9399,7 @@ function AdminUsersListInternal({ company }) {
|
|
|
9414
9399
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9415
9400
|
ContentListTable,
|
|
9416
9401
|
{
|
|
9417
|
-
title: t(`
|
|
9402
|
+
title: t(`entities.users`, { count: 2 }),
|
|
9418
9403
|
data,
|
|
9419
9404
|
fields: ["name" /* name */, "email" /* email */, "createdAt" /* createdAt */],
|
|
9420
9405
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.User,
|
|
@@ -9440,7 +9425,7 @@ function CompanyUsersList({ isDeleted }) {
|
|
|
9440
9425
|
const data = useDataListRetriever({
|
|
9441
9426
|
ready: !!company,
|
|
9442
9427
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkUYBCHXXLjs.UserService.findAllUsers(params), "retriever"),
|
|
9443
|
-
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess',
|
|
9428
|
+
retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _218 => _218.id]), isDeleted },
|
|
9444
9429
|
module: _chunkUYBCHXXLjs.Modules.User
|
|
9445
9430
|
});
|
|
9446
9431
|
_react.useEffect.call(void 0, () => {
|
|
@@ -9456,7 +9441,7 @@ function CompanyUsersList({ isDeleted }) {
|
|
|
9456
9441
|
fields: ["name" /* name */, "email" /* email */],
|
|
9457
9442
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.User,
|
|
9458
9443
|
functions,
|
|
9459
|
-
title: t(`
|
|
9444
|
+
title: t(`entities.users`, { count: 2 })
|
|
9460
9445
|
}
|
|
9461
9446
|
);
|
|
9462
9447
|
}
|
|
@@ -9505,7 +9490,7 @@ function RelevantUsersList({ id }) {
|
|
|
9505
9490
|
data,
|
|
9506
9491
|
fields: ["name" /* name */, "email" /* email */, "relevance" /* relevance */],
|
|
9507
9492
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.User,
|
|
9508
|
-
title: t(`
|
|
9493
|
+
title: t(`common.relevant_users`)
|
|
9509
9494
|
}
|
|
9510
9495
|
);
|
|
9511
9496
|
}
|
|
@@ -9527,7 +9512,7 @@ function RoleUsersList({ role }) {
|
|
|
9527
9512
|
data,
|
|
9528
9513
|
fields: ["name" /* name */, "email" /* email */],
|
|
9529
9514
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.User,
|
|
9530
|
-
title: t(`
|
|
9515
|
+
title: t(`entities.users`, { count: 2 })
|
|
9531
9516
|
}
|
|
9532
9517
|
);
|
|
9533
9518
|
}
|
|
@@ -9546,11 +9531,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
|
|
|
9546
9531
|
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
9547
9532
|
onClick: (e) => {
|
|
9548
9533
|
setSelectedUser(user);
|
|
9549
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
9534
|
+
_optionalChain([setLevelOpen, 'optionalCall', _219 => _219(true)]);
|
|
9550
9535
|
},
|
|
9551
9536
|
onSelect: (e) => {
|
|
9552
9537
|
setSelectedUser(user);
|
|
9553
|
-
_optionalChain([setLevelOpen, 'optionalCall',
|
|
9538
|
+
_optionalChain([setLevelOpen, 'optionalCall', _220 => _220(true)]);
|
|
9554
9539
|
},
|
|
9555
9540
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
|
|
9556
9541
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
|
|
@@ -9577,7 +9562,7 @@ function UsersList({ data, optionComponents, removeFunction, hideOptions, showRe
|
|
|
9577
9562
|
data,
|
|
9578
9563
|
fields: ["name" /* name */, "email" /* email */],
|
|
9579
9564
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.User,
|
|
9580
|
-
title: t(`
|
|
9565
|
+
title: t(`entities.users`, { count: 2 })
|
|
9581
9566
|
}
|
|
9582
9567
|
);
|
|
9583
9568
|
}
|
|
@@ -9599,7 +9584,7 @@ function UsersListByContentIds({ contentIds }) {
|
|
|
9599
9584
|
data,
|
|
9600
9585
|
fields: ["name" /* name */, "email" /* email */],
|
|
9601
9586
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.User,
|
|
9602
|
-
title: t(`
|
|
9587
|
+
title: t(`common.relevant_users`)
|
|
9603
9588
|
}
|
|
9604
9589
|
);
|
|
9605
9590
|
}
|
|
@@ -9702,11 +9687,11 @@ function TokenStatusIndicator({ className, size = "md", showExtraPages = true })
|
|
|
9702
9687
|
}
|
|
9703
9688
|
}, "getStatusColor");
|
|
9704
9689
|
const tooltipContent = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-2 p-1", children: [
|
|
9705
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-semibold text-sm", children: t("
|
|
9690
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-semibold text-sm", children: t("billing.tokens.status", { defaultValue: "Page Status" }) }),
|
|
9706
9691
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-1 text-xs", children: [
|
|
9707
9692
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-4", children: [
|
|
9708
9693
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-muted-foreground", children: [
|
|
9709
|
-
t("
|
|
9694
|
+
t("billing.tokens.monthly", { defaultValue: "Monthly Pages" }),
|
|
9710
9695
|
":"
|
|
9711
9696
|
] }),
|
|
9712
9697
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUYBCHXXLjs.cn.call(void 0, "font-medium", getStatusColor()), children: [
|
|
@@ -9717,7 +9702,7 @@ function TokenStatusIndicator({ className, size = "md", showExtraPages = true })
|
|
|
9717
9702
|
] }),
|
|
9718
9703
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-4", children: [
|
|
9719
9704
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-muted-foreground", children: [
|
|
9720
|
-
t("
|
|
9705
|
+
t("billing.tokens.available", { defaultValue: "Available" }),
|
|
9721
9706
|
":"
|
|
9722
9707
|
] }),
|
|
9723
9708
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkUYBCHXXLjs.cn.call(void 0, "font-medium", getStatusColor()), children: [
|
|
@@ -9725,16 +9710,16 @@ function TokenStatusIndicator({ className, size = "md", showExtraPages = true })
|
|
|
9725
9710
|
"%"
|
|
9726
9711
|
] })
|
|
9727
9712
|
] }),
|
|
9728
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/settings/billing?action=subscribe", className: "w-full flex justify-end my-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: "outline", size: "sm", children: t("
|
|
9713
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/settings/billing?action=subscribe", className: "w-full flex justify-end my-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: "outline", size: "sm", children: t("billing.tokens.upgrade_plan", { defaultValue: "Upgrade plan" }) }) }),
|
|
9729
9714
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
|
|
9730
9715
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-4 pt-1 mt-1", children: [
|
|
9731
9716
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-muted-foreground", children: [
|
|
9732
|
-
t("
|
|
9717
|
+
t("billing.tokens.available_extra", { defaultValue: "Extra Pages" }),
|
|
9733
9718
|
":"
|
|
9734
9719
|
] }),
|
|
9735
9720
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium text-blue-500", children: availableExtraTokens })
|
|
9736
9721
|
] }),
|
|
9737
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/settings/billing?action=subscribe", className: "w-full flex justify-end my-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: "outline", size: "sm", children: t("
|
|
9722
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/settings/billing?action=subscribe", className: "w-full flex justify-end my-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: "outline", size: "sm", children: t("billing.tokens.purchase_extra", { defaultValue: "Purchase additional analysis" }) }) })
|
|
9738
9723
|
] })
|
|
9739
9724
|
] });
|
|
9740
9725
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Tooltip2, { children: [
|
|
@@ -9742,7 +9727,7 @@ function TokenStatusIndicator({ className, size = "md", showExtraPages = true })
|
|
|
9742
9727
|
"div",
|
|
9743
9728
|
{
|
|
9744
9729
|
className: _chunkUYBCHXXLjs.cn.call(void 0, "inline-flex items-center gap-1.5 cursor-default", className),
|
|
9745
|
-
"aria-label": t("
|
|
9730
|
+
"aria-label": t("billing.tokens.status", { defaultValue: "Page Status" }),
|
|
9746
9731
|
children: [
|
|
9747
9732
|
getBatteryIcon(),
|
|
9748
9733
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkUYBCHXXLjs.cn.call(void 0, textSize, "text-muted-foreground font-medium"), children: availableMonthlyTokens }),
|
|
@@ -9832,8 +9817,8 @@ function CompanyConfigurationEditorInternal({ company }) {
|
|
|
9832
9817
|
const { setUser } = useCurrentUserContext();
|
|
9833
9818
|
const defaultValues = _react.useMemo.call(void 0, () => {
|
|
9834
9819
|
return {
|
|
9835
|
-
isManagedKnowledge: _nullishCoalesce(_optionalChain([company, 'access',
|
|
9836
|
-
allowPublicBot: _nullishCoalesce(_optionalChain([company, 'access',
|
|
9820
|
+
isManagedKnowledge: _nullishCoalesce(_optionalChain([company, 'access', _221 => _221.configurations, 'optionalAccess', _222 => _222.isManagedKnowledge]), () => ( false)),
|
|
9821
|
+
allowPublicBot: _nullishCoalesce(_optionalChain([company, 'access', _223 => _223.configurations, 'optionalAccess', _224 => _224.allowPublicBot]), () => ( false))
|
|
9837
9822
|
};
|
|
9838
9823
|
}, [company.configurations]);
|
|
9839
9824
|
const close = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
@@ -9852,8 +9837,8 @@ function CompanyConfigurationEditorInternal({ company }) {
|
|
|
9852
9837
|
_react.useEffect.call(void 0, () => {
|
|
9853
9838
|
if (open) {
|
|
9854
9839
|
form.reset({
|
|
9855
|
-
isManagedKnowledge: _nullishCoalesce(_optionalChain([company, 'access',
|
|
9856
|
-
allowPublicBot: _nullishCoalesce(_optionalChain([company, 'access',
|
|
9840
|
+
isManagedKnowledge: _nullishCoalesce(_optionalChain([company, 'access', _225 => _225.configurations, 'optionalAccess', _226 => _226.isManagedKnowledge]), () => ( false)),
|
|
9841
|
+
allowPublicBot: _nullishCoalesce(_optionalChain([company, 'access', _227 => _227.configurations, 'optionalAccess', _228 => _228.allowPublicBot]), () => ( false))
|
|
9857
9842
|
});
|
|
9858
9843
|
}
|
|
9859
9844
|
}, [company, open]);
|
|
@@ -9877,7 +9862,7 @@ function CompanyConfigurationEditorInternal({ company }) {
|
|
|
9877
9862
|
close();
|
|
9878
9863
|
} catch (error) {
|
|
9879
9864
|
errorToast({
|
|
9880
|
-
title: t(`
|
|
9865
|
+
title: t(`common.errors.update`),
|
|
9881
9866
|
error
|
|
9882
9867
|
});
|
|
9883
9868
|
}
|
|
@@ -9886,7 +9871,7 @@ function CompanyConfigurationEditorInternal({ company }) {
|
|
|
9886
9871
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { size: "sm", variant: `ghost`, className: "cursor-pointer", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Settings2Icon, { className: "h-3.5 w-3.5" }) }) }),
|
|
9887
9872
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: `flex max-h-[70vh] max-w-4xl flex-col overflow-y-auto`, children: [
|
|
9888
9873
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogHeader, { children: [
|
|
9889
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`
|
|
9874
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`entities.configuration`, { count: 2 }) }),
|
|
9890
9875
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { className: "text-destructive", children: t(`features.configuration.warning_description`) })
|
|
9891
9876
|
] }),
|
|
9892
9877
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
|
|
@@ -9925,33 +9910,33 @@ function CompanyDeleterInternal({ company }) {
|
|
|
9925
9910
|
await _chunkUYBCHXXLjs.CompanyService.delete({ companyId: company.id });
|
|
9926
9911
|
router.push("/");
|
|
9927
9912
|
} catch (error) {
|
|
9928
|
-
errorToast({ title: t(`
|
|
9913
|
+
errorToast({ title: t(`common.errors.delete`), error });
|
|
9929
9914
|
}
|
|
9930
9915
|
setIsDeleting(false);
|
|
9931
9916
|
}, "handleDelete");
|
|
9932
9917
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialog, { open, onOpenChange: setOpen, children: [
|
|
9933
9918
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTrigger, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", variant: "destructive", children: [
|
|
9934
9919
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Trash2Icon, { className: "mr-3 h-3.5 w-3.5" }),
|
|
9935
|
-
t(`
|
|
9920
|
+
t(`ui.buttons.delete`)
|
|
9936
9921
|
] }) }),
|
|
9937
9922
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
|
|
9938
9923
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, AlertDialogHeader, { children: [
|
|
9939
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTitle, { children: t(`
|
|
9940
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogDescription, { children: t(`
|
|
9924
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogTitle, { children: t(`common.delete.title`, { type: t(`entities.companies`, { count: 1 }) }) }),
|
|
9925
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDialogDescription, { children: t(`common.delete.subtitle`, { type: t(`entities.companies`, { count: 1 }) }) })
|
|
9941
9926
|
] }),
|
|
9942
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-destructive p-4 text-sm", children: t(`
|
|
9927
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-destructive p-4 text-sm", children: t(`common.delete.description`, { type: t(`entities.companies`, { count: 1 }) }) }),
|
|
9943
9928
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-2", children: [
|
|
9944
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: t(`
|
|
9929
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: t(`common.delete.confirmation`, { type: t(`entities.companies`, { count: 1 }) }) }),
|
|
9945
9930
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
9946
9931
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Label, { className: "flex items-center", children: [
|
|
9947
|
-
t(`
|
|
9932
|
+
t(`company.fields.name.label`),
|
|
9948
9933
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-destructive ml-2 font-semibold", children: "*" })
|
|
9949
9934
|
] }),
|
|
9950
9935
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9951
9936
|
Input,
|
|
9952
9937
|
{
|
|
9953
9938
|
className: `w-full`,
|
|
9954
|
-
placeholder: t(`
|
|
9939
|
+
placeholder: t(`company.fields.name.placeholder`),
|
|
9955
9940
|
onChange: (e) => setCompanyName(e.target.value)
|
|
9956
9941
|
}
|
|
9957
9942
|
)
|
|
@@ -9966,7 +9951,7 @@ function CompanyDeleterInternal({ company }) {
|
|
|
9966
9951
|
type: `button`,
|
|
9967
9952
|
onClick: () => setOpen(false),
|
|
9968
9953
|
disabled: isDeleting,
|
|
9969
|
-
children: t(`
|
|
9954
|
+
children: t(`ui.buttons.cancel`)
|
|
9970
9955
|
}
|
|
9971
9956
|
),
|
|
9972
9957
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -9980,9 +9965,9 @@ function CompanyDeleterInternal({ company }) {
|
|
|
9980
9965
|
variant: "destructive",
|
|
9981
9966
|
disabled: company.name !== companyName || isDeleting,
|
|
9982
9967
|
children: isDeleting ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
9983
|
-
t(`
|
|
9968
|
+
t(`ui.buttons.is_deleting`),
|
|
9984
9969
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.LoaderCircleIcon, { className: "animate-spin-slow h-5 w-5" })
|
|
9985
|
-
] }) : t(`
|
|
9970
|
+
] }) : t(`ui.buttons.delete`)
|
|
9986
9971
|
}
|
|
9987
9972
|
)
|
|
9988
9973
|
] })
|
|
@@ -10022,7 +10007,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
|
|
|
10022
10007
|
const formSchema = _zod3.z.object({
|
|
10023
10008
|
id: _zod3.z.uuidv4(),
|
|
10024
10009
|
name: _zod3.z.string().min(1, {
|
|
10025
|
-
message: t(`
|
|
10010
|
+
message: t(`company.fields.name.error`)
|
|
10026
10011
|
}),
|
|
10027
10012
|
featureIds: _zod3.z.array(_zod3.z.string()).optional(),
|
|
10028
10013
|
moduleIds: _zod3.z.array(_zod3.z.string()).optional(),
|
|
@@ -10031,11 +10016,11 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
|
|
|
10031
10016
|
const form = _reacthookform.useForm.call(void 0, {
|
|
10032
10017
|
resolver: _zod.zodResolver.call(void 0, formSchema),
|
|
10033
10018
|
defaultValues: {
|
|
10034
|
-
id: _optionalChain([company, 'optionalAccess',
|
|
10035
|
-
name: _optionalChain([company, 'optionalAccess',
|
|
10036
|
-
featureIds: _optionalChain([company, 'optionalAccess',
|
|
10037
|
-
moduleIds: _optionalChain([company, 'optionalAccess',
|
|
10038
|
-
logo: _optionalChain([company, 'optionalAccess',
|
|
10019
|
+
id: _optionalChain([company, 'optionalAccess', _229 => _229.id]) || _uuid.v4.call(void 0, ),
|
|
10020
|
+
name: _optionalChain([company, 'optionalAccess', _230 => _230.name]) || "",
|
|
10021
|
+
featureIds: _optionalChain([company, 'optionalAccess', _231 => _231.features, 'access', _232 => _232.map, 'call', _233 => _233((feature) => feature.id)]) || [],
|
|
10022
|
+
moduleIds: _optionalChain([company, 'optionalAccess', _234 => _234.modules, 'access', _235 => _235.map, 'call', _236 => _236((module) => module.id)]) || [],
|
|
10023
|
+
logo: _optionalChain([company, 'optionalAccess', _237 => _237.logo]) || ""
|
|
10039
10024
|
}
|
|
10040
10025
|
});
|
|
10041
10026
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
@@ -10052,7 +10037,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
|
|
|
10052
10037
|
});
|
|
10053
10038
|
}
|
|
10054
10039
|
const payload = {
|
|
10055
|
-
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess',
|
|
10040
|
+
id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _238 => _238.id]), () => ( _uuid.v4.call(void 0, ))),
|
|
10056
10041
|
name: values.name,
|
|
10057
10042
|
logo: files && contentType ? values.logo : void 0,
|
|
10058
10043
|
featureIds: values.featureIds,
|
|
@@ -10072,7 +10057,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
|
|
|
10072
10057
|
}
|
|
10073
10058
|
} catch (error) {
|
|
10074
10059
|
errorToast({
|
|
10075
|
-
title: company ? t(`
|
|
10060
|
+
title: company ? t(`common.errors.update`) : t(`common.errors.create`),
|
|
10076
10061
|
error
|
|
10077
10062
|
});
|
|
10078
10063
|
}
|
|
@@ -10087,7 +10072,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
|
|
|
10087
10072
|
}
|
|
10088
10073
|
}
|
|
10089
10074
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
|
|
10090
|
-
if (open && features.length === 0 && (hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access',
|
|
10075
|
+
if (open && features.length === 0 && (hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _239 => _239.env, 'access', _240 => _240.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _241 => _241.toLowerCase, 'call', _242 => _242()]) === "true"))
|
|
10091
10076
|
fetchFeatures();
|
|
10092
10077
|
}, [open, features]);
|
|
10093
10078
|
_react.useEffect.call(void 0, () => {
|
|
@@ -10121,7 +10106,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
|
|
|
10121
10106
|
"application/images": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"]
|
|
10122
10107
|
}
|
|
10123
10108
|
};
|
|
10124
|
-
const canAccessFeatures = hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access',
|
|
10109
|
+
const canAccessFeatures = hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _243 => _243.env, 'access', _244 => _244.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _245 => _245.toLowerCase, 'call', _246 => _246()]) === "true";
|
|
10125
10110
|
const isAdministrator = hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator);
|
|
10126
10111
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog, { open, onOpenChange: setOpen, children: [
|
|
10127
10112
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorTrigger, { isEdit: !!company }),
|
|
@@ -10130,38 +10115,31 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
|
|
|
10130
10115
|
{
|
|
10131
10116
|
className: `flex max-h-[70vh] w-full ${isAdministrator || canAccessFeatures ? `max-w-5xl` : `max-w-4xl`} flex-col overflow-y-auto`,
|
|
10132
10117
|
children: [
|
|
10133
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorHeader, { type: t(`
|
|
10118
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorHeader, { type: t(`entities.companies`, { count: 1 }), name: _optionalChain([company, 'optionalAccess', _247 => _247.name]) }),
|
|
10134
10119
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
|
|
10135
10120
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
|
|
10136
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `flex w-96 flex-col justify-start gap-y-4`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-neutral-300 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess',
|
|
10121
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `flex w-96 flex-col justify-start gap-y-4`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-neutral-300 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess', _248 => _248.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10137
10122
|
_image2.default,
|
|
10138
10123
|
{
|
|
10139
|
-
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess',
|
|
10124
|
+
src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _249 => _249.logo]) || "",
|
|
10140
10125
|
alt: "Company Logo",
|
|
10141
10126
|
width: 200,
|
|
10142
10127
|
height: 200
|
|
10143
10128
|
}
|
|
10144
10129
|
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
10145
10130
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }),
|
|
10146
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-1 flex w-full text-center text-sm", children: t(`
|
|
10131
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-1 flex w-full text-center text-sm", children: t(`company.click_drag_logo`) })
|
|
10147
10132
|
] }) }) }) }) }) }),
|
|
10148
10133
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `flex w-full flex-col justify-start gap-y-4`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10149
10134
|
FormInput,
|
|
10150
10135
|
{
|
|
10151
10136
|
form,
|
|
10152
10137
|
id: "name",
|
|
10153
|
-
name: t(`
|
|
10154
|
-
placeholder: t(`
|
|
10138
|
+
name: t(`company.fields.name.label`),
|
|
10139
|
+
placeholder: t(`company.fields.name.placeholder`)
|
|
10155
10140
|
}
|
|
10156
10141
|
) }),
|
|
10157
|
-
canAccessFeatures && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `flex w-96 flex-col justify-start gap-y-4`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-max", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
10158
|
-
FormFeatures,
|
|
10159
|
-
{
|
|
10160
|
-
form,
|
|
10161
|
-
name: t(`foundations.company.features_and_modules`),
|
|
10162
|
-
features
|
|
10163
|
-
}
|
|
10164
|
-
) }) })
|
|
10142
|
+
canAccessFeatures && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `flex w-96 flex-col justify-start gap-y-4`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-max", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFeatures, { form, name: t(`company.features_and_modules`), features }) }) })
|
|
10165
10143
|
] }),
|
|
10166
10144
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorButtons, { form, setOpen, isEdit: !!company })
|
|
10167
10145
|
] }) })
|
|
@@ -10194,7 +10172,7 @@ function CompaniesList() {
|
|
|
10194
10172
|
fields: ["name" /* name */, "createdAt" /* createdAt */],
|
|
10195
10173
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.Company,
|
|
10196
10174
|
functions,
|
|
10197
|
-
title: t(`
|
|
10175
|
+
title: t(`entities.companies`, { count: 2 })
|
|
10198
10176
|
}
|
|
10199
10177
|
);
|
|
10200
10178
|
}
|
|
@@ -10226,7 +10204,7 @@ var CompanyProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
|
|
|
10226
10204
|
}, "breadcrumb");
|
|
10227
10205
|
const title = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10228
10206
|
const response = {
|
|
10229
|
-
type: t(`
|
|
10207
|
+
type: t(`entities.companies`, { count: company ? 1 : 2 })
|
|
10230
10208
|
};
|
|
10231
10209
|
if (company) response.element = company.name;
|
|
10232
10210
|
const functions = [];
|
|
@@ -10272,13 +10250,13 @@ var generateNotificationData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
10272
10250
|
function NotificationToast(notification, t, generateUrl, reouter) {
|
|
10273
10251
|
const data = generateNotificationData({ notification, generateUrl });
|
|
10274
10252
|
return {
|
|
10275
|
-
title: t(`
|
|
10253
|
+
title: t(`notification.${notification.notificationType}.title`),
|
|
10276
10254
|
description: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex w-full flex-row items-center p-2`, children: [
|
|
10277
10255
|
data.actor ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user: data.actor, className: "h-8 w-8" }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-14 max-w-14 px-2" }),
|
|
10278
10256
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
10279
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`
|
|
10257
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
10280
10258
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
10281
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
10259
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _250 => _250.actor, 'optionalAccess', _251 => _251.name]), () => ( "")),
|
|
10282
10260
|
title: data.title,
|
|
10283
10261
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
10284
10262
|
}) }),
|
|
@@ -10286,7 +10264,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
|
|
|
10286
10264
|
] })
|
|
10287
10265
|
] }),
|
|
10288
10266
|
action: data.url ? {
|
|
10289
|
-
label: t(`
|
|
10267
|
+
label: t(`notification.${notification.notificationType}.buttons.action`),
|
|
10290
10268
|
onClick: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10291
10269
|
reouter.push(data.url);
|
|
10292
10270
|
}, "onClick")
|
|
@@ -10305,9 +10283,9 @@ function NotificationMenuItem({ notification, closePopover }) {
|
|
|
10305
10283
|
const response = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex w-full flex-row p-2 ${isRead ? "" : "bg-muted"} items-center`, children: [
|
|
10306
10284
|
data.actor ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user: data.actor, className: "h-8 w-8" }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-14 max-w-14 px-2" }),
|
|
10307
10285
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
10308
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`
|
|
10286
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
10309
10287
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
10310
|
-
actor: _nullishCoalesce(_optionalChain([data, 'access',
|
|
10288
|
+
actor: _nullishCoalesce(_optionalChain([data, 'access', _252 => _252.actor, 'optionalAccess', _253 => _253.name]), () => ( "")),
|
|
10311
10289
|
title: data.title,
|
|
10312
10290
|
message: _nullishCoalesce(notification.message, () => ( ""))
|
|
10313
10291
|
}) }),
|
|
@@ -10395,13 +10373,13 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
|
|
|
10395
10373
|
const breadcrumb = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10396
10374
|
const response = [];
|
|
10397
10375
|
response.push({
|
|
10398
|
-
name: t(`
|
|
10376
|
+
name: t(`entities.notifications`, { count: 2 })
|
|
10399
10377
|
});
|
|
10400
10378
|
return response;
|
|
10401
10379
|
}, "breadcrumb");
|
|
10402
10380
|
const title = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10403
10381
|
const response = {
|
|
10404
|
-
type: t(`
|
|
10382
|
+
type: t(`entities.notifications`, { count: 2 })
|
|
10405
10383
|
};
|
|
10406
10384
|
return response;
|
|
10407
10385
|
}, "title");
|
|
@@ -10448,7 +10426,7 @@ var RoleProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ child
|
|
|
10448
10426
|
const breadcrumb = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10449
10427
|
const response = [];
|
|
10450
10428
|
response.push({
|
|
10451
|
-
name: t(`
|
|
10429
|
+
name: t(`entities.roles`, { count: 2 }),
|
|
10452
10430
|
href: generateUrl({ page: _chunkUYBCHXXLjs.Modules.Role })
|
|
10453
10431
|
});
|
|
10454
10432
|
if (role)
|
|
@@ -10460,7 +10438,7 @@ var RoleProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ child
|
|
|
10460
10438
|
}, "breadcrumb");
|
|
10461
10439
|
const title = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10462
10440
|
const response = {
|
|
10463
|
-
type: t(`
|
|
10441
|
+
type: t(`entities.roles`, { count: role ? 1 : 2 })
|
|
10464
10442
|
};
|
|
10465
10443
|
const functions = [];
|
|
10466
10444
|
if (role) {
|
|
@@ -10519,7 +10497,7 @@ var CommonProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ chi
|
|
|
10519
10497
|
}, "breadcrumb");
|
|
10520
10498
|
const title = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
10521
10499
|
const response = {
|
|
10522
|
-
type: t(`
|
|
10500
|
+
type: t(`common.title`)
|
|
10523
10501
|
};
|
|
10524
10502
|
if (company) response.element = company.name;
|
|
10525
10503
|
return response;
|
|
@@ -10581,7 +10559,7 @@ function usePageTracker() {
|
|
|
10581
10559
|
if (typeof document !== "undefined") {
|
|
10582
10560
|
const titleParts = document.title.split("]");
|
|
10583
10561
|
if (titleParts[1]) {
|
|
10584
|
-
const cleanTitle = _optionalChain([titleParts, 'access',
|
|
10562
|
+
const cleanTitle = _optionalChain([titleParts, 'access', _254 => _254[1], 'access', _255 => _255.split, 'call', _256 => _256("|"), 'access', _257 => _257[0], 'optionalAccess', _258 => _258.trim, 'call', _259 => _259()]);
|
|
10585
10563
|
pageTitle = cleanTitle || foundModule.name;
|
|
10586
10564
|
}
|
|
10587
10565
|
}
|
|
@@ -10618,7 +10596,7 @@ function usePushNotifications() {
|
|
|
10618
10596
|
const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
10619
10597
|
if ("serviceWorker" in navigator && "PushManager" in window) {
|
|
10620
10598
|
try {
|
|
10621
|
-
const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess',
|
|
10599
|
+
const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _260 => _260.id])}`;
|
|
10622
10600
|
const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
|
|
10623
10601
|
const registration = await navigator.serviceWorker.register(`${_chunkEW6QPMN3js.getAppUrl.call(void 0, )}/sw.js`);
|
|
10624
10602
|
let permission = Notification.permission;
|
|
@@ -10672,7 +10650,7 @@ function useSocket({ token }) {
|
|
|
10672
10650
|
const socketRef = _react.useRef.call(void 0, null);
|
|
10673
10651
|
_react.useEffect.call(void 0, () => {
|
|
10674
10652
|
if (!token) return;
|
|
10675
|
-
const globalSocketKey = `__socket_${_optionalChain([process, 'access',
|
|
10653
|
+
const globalSocketKey = `__socket_${_optionalChain([process, 'access', _261 => _261.env, 'access', _262 => _262.NEXT_PUBLIC_API_URL, 'optionalAccess', _263 => _263.replace, 'call', _264 => _264(/[^a-zA-Z0-9]/g, "_")])}`;
|
|
10676
10654
|
if (typeof window !== "undefined") {
|
|
10677
10655
|
const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
|
|
10678
10656
|
const existingSocket = window[globalSocketKey];
|
|
@@ -10810,7 +10788,7 @@ function BreadcrumbNavigation({ items }) {
|
|
|
10810
10788
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
10811
10789
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
10812
10790
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Breadcrumb, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, BreadcrumbList, { children: [
|
|
10813
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: `/` }), children: t(`
|
|
10791
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: `/` }), children: t(`common.home`) }) }),
|
|
10814
10792
|
items.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbSeparator, {}),
|
|
10815
10793
|
items.length > ITEMS_TO_DISPLAY ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
10816
10794
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BreadcrumbItem, { children: items[0].href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: items[0].href, children: items[0].name }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: items[0].name }) }),
|
|
@@ -10883,13 +10861,13 @@ function Header({ children }) {
|
|
|
10883
10861
|
className: "h-6 w-6",
|
|
10884
10862
|
onClick: () => refreshUser(),
|
|
10885
10863
|
disabled: isRefreshing,
|
|
10886
|
-
"aria-label": t("
|
|
10864
|
+
"aria-label": t("common.refresh", { defaultValue: "Refresh" })
|
|
10887
10865
|
}
|
|
10888
10866
|
),
|
|
10889
10867
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCwIcon, { className: `h-3.5 w-3.5 ${isRefreshing ? "animate-spin" : ""}` })
|
|
10890
10868
|
}
|
|
10891
10869
|
),
|
|
10892
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { side: "bottom", children: t("
|
|
10870
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { side: "bottom", children: t("common.refresh", { defaultValue: "Refresh" }) })
|
|
10893
10871
|
] })
|
|
10894
10872
|
] }),
|
|
10895
10873
|
children ? children : null
|
|
@@ -10972,13 +10950,13 @@ function RecentPagesNavigator() {
|
|
|
10972
10950
|
return null;
|
|
10973
10951
|
}
|
|
10974
10952
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { children: [
|
|
10975
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full cursor-pointer items-center gap-2", children: state === "collapsed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.HistoryIcon, { className: "h-4 w-4" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t(`
|
|
10953
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full cursor-pointer items-center gap-2", children: state === "collapsed" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.HistoryIcon, { className: "h-4 w-4" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t(`common.recent_pages`) }) }) }),
|
|
10976
10954
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenuContent, { align: "start", className: "w-96", children: [
|
|
10977
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuLabel, { children: t(`
|
|
10955
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuLabel, { children: t(`common.recent_pages`) }),
|
|
10978
10956
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuSeparator, {}),
|
|
10979
10957
|
recentPages.map((page, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuItem, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: page.url, className: "flex items-center gap-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
|
|
10980
10958
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "truncate text-sm", children: page.title }),
|
|
10981
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground text-xs font-normal", children: t(`
|
|
10959
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground text-xs font-normal", children: t(`entities.${page.moduleType}`, { count: 1 }) })
|
|
10982
10960
|
] }) }) }, `${page.url}-${index}`))
|
|
10983
10961
|
] })
|
|
10984
10962
|
] });
|
|
@@ -11141,7 +11119,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, AttributeElement, "AttributeElement");
|
|
|
11141
11119
|
function AllowedUsersDetails({ showTitle, content }) {
|
|
11142
11120
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
11143
11121
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-2 flex w-full flex-col gap-y-2", children: [
|
|
11144
|
-
showTitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-xs font-semibold", children: t("
|
|
11122
|
+
showTitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-xs font-semibold", children: t("common.permissions") }),
|
|
11145
11123
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full items-center justify-start gap-x-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContributorsList, { content }) })
|
|
11146
11124
|
] });
|
|
11147
11125
|
}
|
|
@@ -11151,7 +11129,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, AllowedUsersDetails, "AllowedUsersDetails")
|
|
|
11151
11129
|
var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
|
|
11152
11130
|
|
|
11153
11131
|
|
|
11154
|
-
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-
|
|
11132
|
+
var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-XWHUG6VH.js"))), {
|
|
11155
11133
|
ssr: false
|
|
11156
11134
|
});
|
|
11157
11135
|
var BlockNoteEditorContainer = React3.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
|
|
@@ -11276,10 +11254,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
|
11276
11254
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11277
11255
|
Checkbox,
|
|
11278
11256
|
{
|
|
11279
|
-
checked: _optionalChain([params, 'access',
|
|
11257
|
+
checked: _optionalChain([params, 'access', _265 => _265.checkedIds, 'optionalAccess', _266 => _266.includes, 'call', _267 => _267(row.getValue(params.name))]) || false,
|
|
11280
11258
|
onCheckedChange: (value) => {
|
|
11281
11259
|
row.toggleSelected(!!value);
|
|
11282
|
-
_optionalChain([params, 'access',
|
|
11260
|
+
_optionalChain([params, 'access', _268 => _268.toggleId, 'optionalCall', _269 => _269(row.getValue(params.name))]);
|
|
11283
11261
|
},
|
|
11284
11262
|
"aria-label": "Select row"
|
|
11285
11263
|
}
|
|
@@ -11338,7 +11316,7 @@ function useJsonApiGet(params) {
|
|
|
11338
11316
|
const [response, setResponse] = _react.useState.call(void 0, null);
|
|
11339
11317
|
const isMounted = _react.useRef.call(void 0, true);
|
|
11340
11318
|
const fetchData = _react.useCallback.call(void 0, async () => {
|
|
11341
|
-
if (_optionalChain([params, 'access',
|
|
11319
|
+
if (_optionalChain([params, 'access', _270 => _270.options, 'optionalAccess', _271 => _271.enabled]) === false) return;
|
|
11342
11320
|
setLoading(true);
|
|
11343
11321
|
setError(null);
|
|
11344
11322
|
try {
|
|
@@ -11365,9 +11343,9 @@ function useJsonApiGet(params) {
|
|
|
11365
11343
|
setLoading(false);
|
|
11366
11344
|
}
|
|
11367
11345
|
}
|
|
11368
|
-
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access',
|
|
11346
|
+
}, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _272 => _272.options, 'optionalAccess', _273 => _273.enabled])]);
|
|
11369
11347
|
const fetchNextPage = _react.useCallback.call(void 0, async () => {
|
|
11370
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
11348
|
+
if (!_optionalChain([response, 'optionalAccess', _274 => _274.nextPage])) return;
|
|
11371
11349
|
setLoading(true);
|
|
11372
11350
|
try {
|
|
11373
11351
|
const nextResponse = await response.nextPage();
|
|
@@ -11388,7 +11366,7 @@ function useJsonApiGet(params) {
|
|
|
11388
11366
|
}
|
|
11389
11367
|
}, [response]);
|
|
11390
11368
|
const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
|
|
11391
|
-
if (!_optionalChain([response, 'optionalAccess',
|
|
11369
|
+
if (!_optionalChain([response, 'optionalAccess', _275 => _275.prevPage])) return;
|
|
11392
11370
|
setLoading(true);
|
|
11393
11371
|
try {
|
|
11394
11372
|
const prevResponse = await response.prevPage();
|
|
@@ -11414,15 +11392,15 @@ function useJsonApiGet(params) {
|
|
|
11414
11392
|
return () => {
|
|
11415
11393
|
isMounted.current = false;
|
|
11416
11394
|
};
|
|
11417
|
-
}, [fetchData, ..._optionalChain([params, 'access',
|
|
11395
|
+
}, [fetchData, ..._optionalChain([params, 'access', _276 => _276.options, 'optionalAccess', _277 => _277.deps]) || []]);
|
|
11418
11396
|
return {
|
|
11419
11397
|
data,
|
|
11420
11398
|
loading,
|
|
11421
11399
|
error,
|
|
11422
11400
|
response,
|
|
11423
11401
|
refetch: fetchData,
|
|
11424
|
-
hasNextPage: !!_optionalChain([response, 'optionalAccess',
|
|
11425
|
-
hasPreviousPage: !!_optionalChain([response, 'optionalAccess',
|
|
11402
|
+
hasNextPage: !!_optionalChain([response, 'optionalAccess', _278 => _278.next]),
|
|
11403
|
+
hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _279 => _279.prev]),
|
|
11426
11404
|
fetchNextPage,
|
|
11427
11405
|
fetchPreviousPage
|
|
11428
11406
|
};
|
|
@@ -11500,17 +11478,17 @@ function useJsonApiMutation(config) {
|
|
|
11500
11478
|
if (apiResponse.ok) {
|
|
11501
11479
|
const resultData = apiResponse.data;
|
|
11502
11480
|
setData(resultData);
|
|
11503
|
-
_optionalChain([config, 'access',
|
|
11481
|
+
_optionalChain([config, 'access', _280 => _280.onSuccess, 'optionalCall', _281 => _281(resultData)]);
|
|
11504
11482
|
return resultData;
|
|
11505
11483
|
} else {
|
|
11506
11484
|
setError(apiResponse.error);
|
|
11507
|
-
_optionalChain([config, 'access',
|
|
11485
|
+
_optionalChain([config, 'access', _282 => _282.onError, 'optionalCall', _283 => _283(apiResponse.error)]);
|
|
11508
11486
|
return null;
|
|
11509
11487
|
}
|
|
11510
11488
|
} catch (err) {
|
|
11511
11489
|
const errorMessage = err instanceof Error ? err.message : "Unknown error";
|
|
11512
11490
|
setError(errorMessage);
|
|
11513
|
-
_optionalChain([config, 'access',
|
|
11491
|
+
_optionalChain([config, 'access', _284 => _284.onError, 'optionalCall', _285 => _285(errorMessage)]);
|
|
11514
11492
|
return null;
|
|
11515
11493
|
} finally {
|
|
11516
11494
|
setLoading(false);
|
|
@@ -11575,7 +11553,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
11575
11553
|
["name" /* name */]: () => ({
|
|
11576
11554
|
id: "name",
|
|
11577
11555
|
accessorKey: "name",
|
|
11578
|
-
header: t(`
|
|
11556
|
+
header: t(`user.fields.name.label`),
|
|
11579
11557
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
11580
11558
|
const company = row.original.jsonApiData;
|
|
11581
11559
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -11583,7 +11561,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
11583
11561
|
{
|
|
11584
11562
|
href: hasRole(_chunkEW6QPMN3js.getRoleId.call(void 0, ).Administrator) ? generateUrl({
|
|
11585
11563
|
page: "/administration",
|
|
11586
|
-
id: _optionalChain([_chunkUYBCHXXLjs.Modules, 'access',
|
|
11564
|
+
id: _optionalChain([_chunkUYBCHXXLjs.Modules, 'access', _286 => _286.Company, 'access', _287 => _287.pageUrl, 'optionalAccess', _288 => _288.substring, 'call', _289 => _289(1)]),
|
|
11587
11565
|
childPage: company.id
|
|
11588
11566
|
}) : generateUrl({ page: _chunkUYBCHXXLjs.Modules.Company, id: company.id }),
|
|
11589
11567
|
children: row.getValue("name")
|
|
@@ -11595,11 +11573,11 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
11595
11573
|
}),
|
|
11596
11574
|
["createdAt" /* createdAt */]: () => cellDate({
|
|
11597
11575
|
name: "createdAt",
|
|
11598
|
-
title: t(`
|
|
11576
|
+
title: t(`common.date.create`)
|
|
11599
11577
|
})
|
|
11600
11578
|
};
|
|
11601
11579
|
const columns = _react.useMemo.call(void 0, () => {
|
|
11602
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
11580
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _290 => _290[field], 'optionalCall', _291 => _291()])).filter((col) => col !== void 0);
|
|
11603
11581
|
}, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
|
|
11604
11582
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
11605
11583
|
}, "useCompanyTableStructure");
|
|
@@ -11683,7 +11661,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
11683
11661
|
["name" /* name */]: () => ({
|
|
11684
11662
|
id: "name",
|
|
11685
11663
|
accessorKey: "name",
|
|
11686
|
-
header: t(`
|
|
11664
|
+
header: t(`role.fields.name.label`),
|
|
11687
11665
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
11688
11666
|
const role = row.original.jsonApiData;
|
|
11689
11667
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: _chunkUYBCHXXLjs.Modules.Role, id: role.id }), children: row.getValue("name") });
|
|
@@ -11694,18 +11672,18 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
11694
11672
|
["description" /* description */]: () => ({
|
|
11695
11673
|
id: "description",
|
|
11696
11674
|
accessorKey: "description",
|
|
11697
|
-
header: t(`
|
|
11675
|
+
header: t(`role.fields.description.label`),
|
|
11698
11676
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: row.getValue("description") }), "cell"),
|
|
11699
11677
|
enableSorting: false,
|
|
11700
11678
|
enableHiding: false
|
|
11701
11679
|
}),
|
|
11702
11680
|
["createdAt" /* createdAt */]: () => cellDate({
|
|
11703
11681
|
name: "createdAt",
|
|
11704
|
-
title: t(`
|
|
11682
|
+
title: t(`common.date.create`)
|
|
11705
11683
|
})
|
|
11706
11684
|
};
|
|
11707
11685
|
const columns = _react.useMemo.call(void 0, () => {
|
|
11708
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
11686
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _292 => _292[field], 'optionalCall', _293 => _293()])).filter((col) => col !== void 0);
|
|
11709
11687
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
11710
11688
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
11711
11689
|
}, "useRoleTableStructure");
|
|
@@ -11783,7 +11761,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
11783
11761
|
["name" /* name */]: () => ({
|
|
11784
11762
|
id: "name",
|
|
11785
11763
|
accessorKey: "name",
|
|
11786
|
-
header: t(`
|
|
11764
|
+
header: t(`user.fields.name.label`),
|
|
11787
11765
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
11788
11766
|
const user = row.original.jsonApiData;
|
|
11789
11767
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -11797,8 +11775,8 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
11797
11775
|
children: [
|
|
11798
11776
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
|
|
11799
11777
|
user.name,
|
|
11800
|
-
user.isDeleted ? ` - ${t("
|
|
11801
|
-
!user.isActivated ? ` - ${t("
|
|
11778
|
+
user.isDeleted ? ` - ${t("user.errors.deleted")}` : "",
|
|
11779
|
+
!user.isActivated ? ` - ${t("user.errors.inactive")}` : ""
|
|
11802
11780
|
]
|
|
11803
11781
|
}
|
|
11804
11782
|
);
|
|
@@ -11809,7 +11787,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
11809
11787
|
["email" /* email */]: () => ({
|
|
11810
11788
|
id: "email",
|
|
11811
11789
|
accessorKey: "email",
|
|
11812
|
-
header: t(`
|
|
11790
|
+
header: t(`common.fields.email.label`),
|
|
11813
11791
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: row.getValue("email") }), "cell"),
|
|
11814
11792
|
enableSorting: false,
|
|
11815
11793
|
enableHiding: false
|
|
@@ -11817,7 +11795,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
11817
11795
|
["relevance" /* relevance */]: () => ({
|
|
11818
11796
|
id: "relevance",
|
|
11819
11797
|
accessorKey: "relevance",
|
|
11820
|
-
header: t(`
|
|
11798
|
+
header: t(`common.relevance`),
|
|
11821
11799
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
11822
11800
|
const user = row.original.jsonApiData;
|
|
11823
11801
|
if (!user.relevance) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {});
|
|
@@ -11844,11 +11822,11 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
11844
11822
|
}),
|
|
11845
11823
|
["createdAt" /* createdAt */]: () => cellDate({
|
|
11846
11824
|
name: "createdAt",
|
|
11847
|
-
title: t(`
|
|
11825
|
+
title: t(`common.date.create`)
|
|
11848
11826
|
})
|
|
11849
11827
|
};
|
|
11850
11828
|
const columns = _react.useMemo.call(void 0, () => {
|
|
11851
|
-
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access',
|
|
11829
|
+
return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _294 => _294[field], 'optionalCall', _295 => _295()])).filter((col) => col !== void 0);
|
|
11852
11830
|
}, [params.fields, fieldColumnMap, t, generateUrl]);
|
|
11853
11831
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
11854
11832
|
}, "useUserTableStructure");
|
|
@@ -11881,7 +11859,7 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
11881
11859
|
["name" /* name */]: () => ({
|
|
11882
11860
|
id: "name",
|
|
11883
11861
|
accessorKey: "name",
|
|
11884
|
-
header: t(`
|
|
11862
|
+
header: t(`content.fields.name.label`),
|
|
11885
11863
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
11886
11864
|
const content = row.original.jsonApiData;
|
|
11887
11865
|
const contentModule = content.contentType ? _chunkUYBCHXXLjs.Modules.findByModelName(content.contentType) : void 0;
|
|
@@ -11900,7 +11878,7 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
11900
11878
|
["relevance" /* relevance */]: () => ({
|
|
11901
11879
|
id: "relevance",
|
|
11902
11880
|
accessorKey: "relevance",
|
|
11903
|
-
header: t(`
|
|
11881
|
+
header: t(`common.relevance`),
|
|
11904
11882
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
11905
11883
|
const content = row.original.jsonApiData;
|
|
11906
11884
|
if (!content.relevance) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {});
|
|
@@ -11928,7 +11906,7 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
11928
11906
|
["authors" /* authors */]: () => ({
|
|
11929
11907
|
id: "authors",
|
|
11930
11908
|
accessorKey: "authors",
|
|
11931
|
-
header: t(`
|
|
11909
|
+
header: t(`common.relationships.author.label`),
|
|
11932
11910
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
11933
11911
|
const content = row.original.jsonApiData;
|
|
11934
11912
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContributorsList, { content });
|
|
@@ -11938,22 +11916,22 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
|
|
|
11938
11916
|
}),
|
|
11939
11917
|
["createdAt" /* createdAt */]: () => cellDate({
|
|
11940
11918
|
name: "createdAt",
|
|
11941
|
-
title: t(`
|
|
11919
|
+
title: t(`common.date.create`)
|
|
11942
11920
|
}),
|
|
11943
11921
|
["updatedAt" /* updatedAt */]: () => cellDate({
|
|
11944
11922
|
name: "updatedAt",
|
|
11945
|
-
title: t(`
|
|
11923
|
+
title: t(`common.date.update`)
|
|
11946
11924
|
})
|
|
11947
11925
|
};
|
|
11948
11926
|
const columns = _react.useMemo.call(void 0, () => {
|
|
11949
11927
|
return params.fields.map((field) => {
|
|
11950
11928
|
const localHandler = fieldColumnMap[field];
|
|
11951
11929
|
if (localHandler) return localHandler();
|
|
11952
|
-
const customHandler = _optionalChain([params, 'access',
|
|
11930
|
+
const customHandler = _optionalChain([params, 'access', _296 => _296.context, 'optionalAccess', _297 => _297.customCells, 'optionalAccess', _298 => _298[field]]);
|
|
11953
11931
|
if (customHandler) return customHandler({ t });
|
|
11954
11932
|
return void 0;
|
|
11955
11933
|
}).filter((col) => col !== void 0);
|
|
11956
|
-
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access',
|
|
11934
|
+
}, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _299 => _299.context, 'optionalAccess', _300 => _300.customCells])]);
|
|
11957
11935
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
11958
11936
|
}, "useContentTableStructure");
|
|
11959
11937
|
|
|
@@ -12288,7 +12266,7 @@ function ContentTableSearch({ data }) {
|
|
|
12288
12266
|
const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
12289
12267
|
if (!isExpanded) {
|
|
12290
12268
|
setIsFocused(true);
|
|
12291
|
-
setTimeout(() => _optionalChain([inputRef, 'access',
|
|
12269
|
+
setTimeout(() => _optionalChain([inputRef, 'access', _301 => _301.current, 'optionalAccess', _302 => _302.focus, 'call', _303 => _303()]), 50);
|
|
12292
12270
|
}
|
|
12293
12271
|
}, "handleSearchIconClick");
|
|
12294
12272
|
const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
@@ -12324,7 +12302,7 @@ function ContentTableSearch({ data }) {
|
|
|
12324
12302
|
},
|
|
12325
12303
|
onFocus: () => setIsFocused(true),
|
|
12326
12304
|
onBlur: handleBlur,
|
|
12327
|
-
placeholder: t(`
|
|
12305
|
+
placeholder: t(`ui.search.placeholder_global`),
|
|
12328
12306
|
type: "text",
|
|
12329
12307
|
className: "border-border/50 focus-visible:border-border h-10 w-full pr-8 pl-8 text-xs shadow-none focus-visible:ring-0",
|
|
12330
12308
|
onChange: (e) => setSearchTerm(e.target.value),
|
|
@@ -12351,7 +12329,7 @@ var EMPTY_ARRAY = [];
|
|
|
12351
12329
|
var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function ContentListTable2(props) {
|
|
12352
12330
|
const { data, fields, checkedIds, toggleId, allowSearch, filters } = props;
|
|
12353
12331
|
const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
|
|
12354
|
-
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
12332
|
+
data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _304 => _304.data]), () => ( EMPTY_ARRAY)),
|
|
12355
12333
|
fields,
|
|
12356
12334
|
checkedIds,
|
|
12357
12335
|
toggleId,
|
|
@@ -12392,7 +12370,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
12392
12370
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
|
|
12393
12371
|
}) }, headerGroup.id))
|
|
12394
12372
|
] }),
|
|
12395
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access',
|
|
12373
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _305 => _305.rows, 'optionalAccess', _306 => _306.length]) ? rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "h-24 text-center", children: "No results." }) }) }),
|
|
12396
12374
|
showFooter && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-card py-4 text-right", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-end space-x-2", children: [
|
|
12397
12375
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12398
12376
|
Button,
|
|
@@ -12401,7 +12379,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
12401
12379
|
size: "sm",
|
|
12402
12380
|
onClick: (e) => {
|
|
12403
12381
|
e.preventDefault();
|
|
12404
|
-
_optionalChain([data, 'access',
|
|
12382
|
+
_optionalChain([data, 'access', _307 => _307.previous, 'optionalCall', _308 => _308(true)]);
|
|
12405
12383
|
},
|
|
12406
12384
|
disabled: !data.previous,
|
|
12407
12385
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" })
|
|
@@ -12419,7 +12397,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
|
|
|
12419
12397
|
size: "sm",
|
|
12420
12398
|
onClick: (e) => {
|
|
12421
12399
|
e.preventDefault();
|
|
12422
|
-
_optionalChain([data, 'access',
|
|
12400
|
+
_optionalChain([data, 'access', _309 => _309.next, 'optionalCall', _310 => _310(true)]);
|
|
12423
12401
|
},
|
|
12424
12402
|
disabled: !data.next,
|
|
12425
12403
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" })
|
|
@@ -12450,16 +12428,16 @@ function Register() {
|
|
|
12450
12428
|
const [showConfirmation, setShowConfirmation] = _react.useState.call(void 0, false);
|
|
12451
12429
|
const formSchema = _zod3.z.object({
|
|
12452
12430
|
company: _zod3.z.string().min(1, {
|
|
12453
|
-
message: t(`
|
|
12431
|
+
message: t(`common.errors.missing_company_name`)
|
|
12454
12432
|
}),
|
|
12455
12433
|
name: _zod3.z.string().min(1, {
|
|
12456
|
-
message: t("
|
|
12434
|
+
message: t("common.errors.missing_name")
|
|
12457
12435
|
}),
|
|
12458
12436
|
email: _zod3.z.string().email({
|
|
12459
|
-
message: t(`
|
|
12437
|
+
message: t(`common.errors.invalid_email`)
|
|
12460
12438
|
}),
|
|
12461
|
-
password: _zod3.z.string().min(8, t(`
|
|
12462
|
-
message: t(`
|
|
12439
|
+
password: _zod3.z.string().min(8, t(`auth.errors.password_too_short`)).regex(/^(?=.*[0-9])(?=.*[^a-zA-Z0-9]).*$/, {
|
|
12440
|
+
message: t(`auth.errors.password_invalid_format`)
|
|
12463
12441
|
})
|
|
12464
12442
|
});
|
|
12465
12443
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -12490,11 +12468,11 @@ function Register() {
|
|
|
12490
12468
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardHeader, { children: [
|
|
12491
12469
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
12492
12470
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _image2.default, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
12493
|
-
t(`
|
|
12471
|
+
t(`auth.register`)
|
|
12494
12472
|
] }),
|
|
12495
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: " " }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t(`
|
|
12473
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: " " }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t(`auth.register_description`) }) })
|
|
12496
12474
|
] }),
|
|
12497
|
-
showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: t("
|
|
12475
|
+
showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: t("auth.register_confirmation") }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
12498
12476
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardContent, { children: [
|
|
12499
12477
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12500
12478
|
FormInput,
|
|
@@ -12502,8 +12480,8 @@ function Register() {
|
|
|
12502
12480
|
isRequired: true,
|
|
12503
12481
|
form,
|
|
12504
12482
|
id: "company",
|
|
12505
|
-
name: t(`
|
|
12506
|
-
placeholder: t(`
|
|
12483
|
+
name: t(`company.fields.name.label`),
|
|
12484
|
+
placeholder: t(`company.fields.name.placeholder`)
|
|
12507
12485
|
}
|
|
12508
12486
|
),
|
|
12509
12487
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -12512,8 +12490,8 @@ function Register() {
|
|
|
12512
12490
|
isRequired: true,
|
|
12513
12491
|
form,
|
|
12514
12492
|
id: "name",
|
|
12515
|
-
name: t(`
|
|
12516
|
-
placeholder: t(`
|
|
12493
|
+
name: t(`user.fields.name.label`),
|
|
12494
|
+
placeholder: t(`user.fields.name.placeholder`)
|
|
12517
12495
|
}
|
|
12518
12496
|
),
|
|
12519
12497
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -12522,8 +12500,8 @@ function Register() {
|
|
|
12522
12500
|
isRequired: true,
|
|
12523
12501
|
form,
|
|
12524
12502
|
id: "email",
|
|
12525
|
-
name: t(`
|
|
12526
|
-
placeholder: t(`
|
|
12503
|
+
name: t(`common.fields.email.label`),
|
|
12504
|
+
placeholder: t(`common.fields.email.placeholder`)
|
|
12527
12505
|
}
|
|
12528
12506
|
),
|
|
12529
12507
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -12532,11 +12510,11 @@ function Register() {
|
|
|
12532
12510
|
isRequired: true,
|
|
12533
12511
|
form,
|
|
12534
12512
|
id: "password",
|
|
12535
|
-
name: t(`
|
|
12536
|
-
placeholder: t(`
|
|
12513
|
+
name: t(`user.fields.password.label`),
|
|
12514
|
+
placeholder: t(`user.fields.password.placeholder`)
|
|
12537
12515
|
}
|
|
12538
12516
|
),
|
|
12539
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mt-4 w-full", type: "submit", children: t(`
|
|
12517
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mt-4 w-full", type: "submit", children: t(`auth.buttons.register`) })
|
|
12540
12518
|
] }),
|
|
12541
12519
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardFooter, { className: "flex w-full flex-row justify-between", children: [
|
|
12542
12520
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -12545,7 +12523,7 @@ function Register() {
|
|
|
12545
12523
|
href: "#",
|
|
12546
12524
|
className: "flex w-full justify-start",
|
|
12547
12525
|
onClick: () => setComponentType(0 /* Login */),
|
|
12548
|
-
children: t(`
|
|
12526
|
+
children: t(`auth.buttons.login`)
|
|
12549
12527
|
}
|
|
12550
12528
|
),
|
|
12551
12529
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -12554,7 +12532,7 @@ function Register() {
|
|
|
12554
12532
|
href: "#",
|
|
12555
12533
|
className: "flex w-full justify-end",
|
|
12556
12534
|
onClick: () => setComponentType(1 /* ForgotPassword */),
|
|
12557
|
-
children: t(`
|
|
12535
|
+
children: t(`auth.buttons.forgot_password`)
|
|
12558
12536
|
}
|
|
12559
12537
|
)
|
|
12560
12538
|
] })
|
|
@@ -12638,9 +12616,9 @@ function LandingComponent() {
|
|
|
12638
12616
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardHeader, { className: "mb-4", "data-testid": "page-pre-login-container", children: [
|
|
12639
12617
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardTitle, { className: "text-primary flex flex-col items-center gap-y-8 pb-8 text-4xl", children: [
|
|
12640
12618
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _image2.default, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
12641
|
-
t(`
|
|
12619
|
+
t(`common.title`)
|
|
12642
12620
|
] }),
|
|
12643
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "flex w-full justify-center text-center text-sm", children: t(`
|
|
12621
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "flex w-full justify-center text-center text-sm", children: t(`common.description`) })
|
|
12644
12622
|
] }),
|
|
12645
12623
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardFooter, { className: "mt-4 flex w-full flex-col justify-between gap-y-4", children: [
|
|
12646
12624
|
_chunkEW6QPMN3js.isInternalAuthEnabled.call(void 0, ) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
@@ -12650,10 +12628,10 @@ function LandingComponent() {
|
|
|
12650
12628
|
href: "#",
|
|
12651
12629
|
className: "flex w-full justify-start",
|
|
12652
12630
|
onClick: () => setComponentType(5 /* Register */),
|
|
12653
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "w-full", variant: `default`, children: t(`
|
|
12631
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "w-full", variant: `default`, children: t(`auth.buttons.register`) })
|
|
12654
12632
|
}
|
|
12655
12633
|
),
|
|
12656
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: "#", className: "flex w-full justify-end", onClick: () => setComponentType(0 /* Login */), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: t(`
|
|
12634
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: "#", className: "flex w-full justify-end", onClick: () => setComponentType(0 /* Login */), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: t(`auth.buttons.login`) }) })
|
|
12657
12635
|
] }),
|
|
12658
12636
|
_chunkEW6QPMN3js.isDiscordAuthEnabled.call(void 0, ) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: `${_chunkEW6QPMN3js.getApiUrl.call(void 0, )}auth/discord`, className: "flex w-full justify-end", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: "Login with Discord" }) })
|
|
12659
12637
|
] })
|
|
@@ -12684,25 +12662,25 @@ function AcceptInvitation() {
|
|
|
12684
12662
|
await _chunkUYBCHXXLjs.AuthService.validateCode(payload);
|
|
12685
12663
|
} catch (e) {
|
|
12686
12664
|
setError(e instanceof Error ? e.message : String(e));
|
|
12687
|
-
errorToast({ title: t(`
|
|
12665
|
+
errorToast({ title: t(`common.errors.error`), error: e });
|
|
12688
12666
|
}
|
|
12689
12667
|
}
|
|
12690
12668
|
_chunk7QVYU63Ejs.__name.call(void 0, validateCode, "validateCode");
|
|
12691
12669
|
if (params && params.code) {
|
|
12692
12670
|
validateCode(params.code);
|
|
12693
12671
|
} else {
|
|
12694
|
-
setError(t(`
|
|
12672
|
+
setError(t(`auth.errors.invalid_invitation_code`));
|
|
12695
12673
|
}
|
|
12696
12674
|
}, []);
|
|
12697
12675
|
const formSchema = _zod3.z.object({
|
|
12698
12676
|
password: _zod3.z.string().min(1, {
|
|
12699
|
-
message: t(`
|
|
12677
|
+
message: t(`user.fields.password.error`)
|
|
12700
12678
|
}),
|
|
12701
12679
|
passwordRetype: _zod3.z.string().min(1, {
|
|
12702
|
-
message: t("
|
|
12680
|
+
message: t("auth.errors.password_retype_required")
|
|
12703
12681
|
})
|
|
12704
12682
|
}).refine((data) => data.password === data.passwordRetype, {
|
|
12705
|
-
message: t("
|
|
12683
|
+
message: t("auth.fields.retype_password.error_not_match"),
|
|
12706
12684
|
path: ["passwordRetype"]
|
|
12707
12685
|
});
|
|
12708
12686
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -12714,40 +12692,40 @@ function AcceptInvitation() {
|
|
|
12714
12692
|
});
|
|
12715
12693
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
12716
12694
|
try {
|
|
12717
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
12695
|
+
if (!_optionalChain([params, 'optionalAccess', _311 => _311.code])) return;
|
|
12718
12696
|
const payload = {
|
|
12719
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
12697
|
+
code: _optionalChain([params, 'optionalAccess', _312 => _312.code]),
|
|
12720
12698
|
password: values.password
|
|
12721
12699
|
};
|
|
12722
12700
|
await _chunkUYBCHXXLjs.AuthService.acceptInvitation(payload);
|
|
12723
12701
|
setShowConfirmation(true);
|
|
12724
|
-
_sonner.toast.success(t("
|
|
12725
|
-
description: t("
|
|
12702
|
+
_sonner.toast.success(t("auth.account_activated"), {
|
|
12703
|
+
description: t("auth.account_activated_description")
|
|
12726
12704
|
});
|
|
12727
12705
|
setTimeout(() => {
|
|
12728
12706
|
setComponentType(0 /* Login */);
|
|
12729
12707
|
setParams(void 0);
|
|
12730
12708
|
}, 2e3);
|
|
12731
12709
|
} catch (e) {
|
|
12732
|
-
errorToast({ title: t(`
|
|
12710
|
+
errorToast({ title: t(`common.errors.error`), error });
|
|
12733
12711
|
}
|
|
12734
12712
|
}, "onSubmit");
|
|
12735
12713
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
12736
12714
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardHeader, { children: [
|
|
12737
12715
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
12738
12716
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _image2.default, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
12739
|
-
t("
|
|
12717
|
+
t("auth.accept_invitation")
|
|
12740
12718
|
] }),
|
|
12741
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t("
|
|
12719
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t("auth.errors.activating_account") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t("auth.select_password") }) })
|
|
12742
12720
|
] }),
|
|
12743
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: t("
|
|
12721
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: t("auth.activation_description") }) : error ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
12744
12722
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12745
12723
|
FormPassword,
|
|
12746
12724
|
{
|
|
12747
12725
|
form,
|
|
12748
12726
|
id: "password",
|
|
12749
|
-
name: t(`
|
|
12750
|
-
placeholder: t(`
|
|
12727
|
+
name: t(`user.fields.password.label`),
|
|
12728
|
+
placeholder: t(`user.fields.password.placeholder`)
|
|
12751
12729
|
}
|
|
12752
12730
|
),
|
|
12753
12731
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -12755,11 +12733,11 @@ function AcceptInvitation() {
|
|
|
12755
12733
|
{
|
|
12756
12734
|
form,
|
|
12757
12735
|
id: "passwordRetype",
|
|
12758
|
-
name: t("
|
|
12759
|
-
placeholder: t(`
|
|
12736
|
+
name: t("auth.fields.retype_password.label"),
|
|
12737
|
+
placeholder: t(`auth.fields.retype_password.placeholder`)
|
|
12760
12738
|
}
|
|
12761
12739
|
),
|
|
12762
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mt-4 w-full", type: "submit", children: t("
|
|
12740
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mt-4 w-full", type: "submit", children: t("auth.accept_invitation") })
|
|
12763
12741
|
] }) }) })
|
|
12764
12742
|
] });
|
|
12765
12743
|
}
|
|
@@ -12785,33 +12763,33 @@ function ActivateAccount() {
|
|
|
12785
12763
|
await _chunkUYBCHXXLjs.AuthService.activate(payload);
|
|
12786
12764
|
setShowConfirmation(true);
|
|
12787
12765
|
setParams(void 0);
|
|
12788
|
-
_sonner.toast.success(t("
|
|
12789
|
-
description: t("
|
|
12766
|
+
_sonner.toast.success(t("auth.account_activated"), {
|
|
12767
|
+
description: t("auth.account_activated_description")
|
|
12790
12768
|
});
|
|
12791
12769
|
setTimeout(() => {
|
|
12792
12770
|
setComponentType(0 /* Login */);
|
|
12793
12771
|
}, 2e3);
|
|
12794
12772
|
} catch (e) {
|
|
12795
12773
|
setError(e instanceof Error ? e.message : String(e));
|
|
12796
|
-
errorToast({ title: t(`
|
|
12774
|
+
errorToast({ title: t(`common.errors.error`), error: e });
|
|
12797
12775
|
}
|
|
12798
12776
|
}
|
|
12799
12777
|
_chunk7QVYU63Ejs.__name.call(void 0, ActivateAccount2, "ActivateAccount");
|
|
12800
12778
|
if (params && params.code) {
|
|
12801
12779
|
ActivateAccount2(params.code);
|
|
12802
12780
|
} else {
|
|
12803
|
-
setError(t(`
|
|
12781
|
+
setError(t(`auth.errors.invalid_invitation_code`));
|
|
12804
12782
|
}
|
|
12805
12783
|
}, []);
|
|
12806
12784
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
12807
12785
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardHeader, { children: [
|
|
12808
12786
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
12809
12787
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _image2.default, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
12810
|
-
t("
|
|
12788
|
+
t("auth.accept_invitation")
|
|
12811
12789
|
] }),
|
|
12812
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t("
|
|
12790
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t("auth.errors.activating_account") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: " " }) })
|
|
12813
12791
|
] }),
|
|
12814
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t("
|
|
12792
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t("auth.activation_description") }) : error ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: error }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t("auth.activation_wait") }) }) })
|
|
12815
12793
|
] });
|
|
12816
12794
|
}
|
|
12817
12795
|
_chunk7QVYU63Ejs.__name.call(void 0, ActivateAccount, "ActivateAccount");
|
|
@@ -12855,7 +12833,7 @@ function ForgotPassword() {
|
|
|
12855
12833
|
const [showConfirmation, setShowConfirmation] = _react.useState.call(void 0, false);
|
|
12856
12834
|
const formSchema = _zod3.z.object({
|
|
12857
12835
|
email: _zod3.z.string().email({
|
|
12858
|
-
message: t(`
|
|
12836
|
+
message: t(`common.errors.invalid_email`)
|
|
12859
12837
|
})
|
|
12860
12838
|
});
|
|
12861
12839
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -12879,23 +12857,23 @@ function ForgotPassword() {
|
|
|
12879
12857
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardHeader, { "data-testid": "page-forgot-password-container", children: [
|
|
12880
12858
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
12881
12859
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _image2.default, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
12882
|
-
t("
|
|
12860
|
+
t("auth.forgot_password")
|
|
12883
12861
|
] }),
|
|
12884
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: " " }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t(`
|
|
12862
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-sm", children: showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: " " }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t(`auth.add_email_to_reset`) }) })
|
|
12885
12863
|
] }),
|
|
12886
|
-
showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: t(`
|
|
12864
|
+
showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: t(`auth.reset_confirmation`) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
12887
12865
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardContent, { children: [
|
|
12888
12866
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12889
12867
|
FormInput,
|
|
12890
12868
|
{
|
|
12891
12869
|
form,
|
|
12892
12870
|
id: "email",
|
|
12893
|
-
name: t(`
|
|
12894
|
-
placeholder: t(`
|
|
12871
|
+
name: t(`common.fields.email.label`),
|
|
12872
|
+
placeholder: t(`common.fields.email.placeholder`),
|
|
12895
12873
|
testId: "form-forgot-password-input-email"
|
|
12896
12874
|
}
|
|
12897
12875
|
),
|
|
12898
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-forgot-password-button-reset", children: t(`
|
|
12876
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-forgot-password-button-reset", children: t(`auth.buttons.reset_password`) })
|
|
12899
12877
|
] }),
|
|
12900
12878
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardFooter, { className: "flex w-full flex-row justify-between", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12901
12879
|
Link,
|
|
@@ -12904,7 +12882,7 @@ function ForgotPassword() {
|
|
|
12904
12882
|
className: "flex w-full justify-end",
|
|
12905
12883
|
onClick: () => setComponentType(0 /* Login */),
|
|
12906
12884
|
"data-testid": "form-forgot-password-link-login",
|
|
12907
|
-
children: t(`
|
|
12885
|
+
children: t(`auth.buttons.login`)
|
|
12908
12886
|
}
|
|
12909
12887
|
) })
|
|
12910
12888
|
] }) })
|
|
@@ -12927,9 +12905,9 @@ function Login() {
|
|
|
12927
12905
|
const router = _chunkEW6QPMN3js.useI18nRouter.call(void 0, );
|
|
12928
12906
|
const formSchema = _zod3.z.object({
|
|
12929
12907
|
email: _zod3.z.string().email({
|
|
12930
|
-
message: t(`
|
|
12908
|
+
message: t(`common.errors.invalid_email`)
|
|
12931
12909
|
}),
|
|
12932
|
-
password: _zod3.z.string().min(3, { message: t(`
|
|
12910
|
+
password: _zod3.z.string().min(3, { message: t(`auth.errors.password_too_short`) })
|
|
12933
12911
|
});
|
|
12934
12912
|
const form = _reacthookform.useForm.call(void 0, {
|
|
12935
12913
|
resolver: _zod.zodResolver.call(void 0, formSchema),
|
|
@@ -12948,7 +12926,7 @@ function Login() {
|
|
|
12948
12926
|
router.replace(generateUrl({ page: `/` }));
|
|
12949
12927
|
} catch (e) {
|
|
12950
12928
|
errorToast({
|
|
12951
|
-
title: t(`
|
|
12929
|
+
title: t(`common.errors.error`),
|
|
12952
12930
|
error: e
|
|
12953
12931
|
});
|
|
12954
12932
|
}
|
|
@@ -12957,9 +12935,9 @@ function Login() {
|
|
|
12957
12935
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardHeader, { "data-testid": "page-login-container", children: [
|
|
12958
12936
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
12959
12937
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _image2.default, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
12960
|
-
t("
|
|
12938
|
+
t("auth.login")
|
|
12961
12939
|
] }),
|
|
12962
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-sm", children: t(`
|
|
12940
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-sm", children: t(`auth.login_description`) })
|
|
12963
12941
|
] }),
|
|
12964
12942
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
12965
12943
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: _chunkEW6QPMN3js.isInternalAuthEnabled.call(void 0, ) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
@@ -12969,8 +12947,8 @@ function Login() {
|
|
|
12969
12947
|
autoFocus: true,
|
|
12970
12948
|
form,
|
|
12971
12949
|
id: "email",
|
|
12972
|
-
name: t(`
|
|
12973
|
-
placeholder: t(`
|
|
12950
|
+
name: t(`common.fields.email.label`),
|
|
12951
|
+
placeholder: t(`common.fields.email.placeholder`),
|
|
12974
12952
|
testId: "form-login-input-email"
|
|
12975
12953
|
}
|
|
12976
12954
|
),
|
|
@@ -12979,12 +12957,12 @@ function Login() {
|
|
|
12979
12957
|
{
|
|
12980
12958
|
form,
|
|
12981
12959
|
id: "password",
|
|
12982
|
-
name: t(`
|
|
12983
|
-
placeholder: t(`
|
|
12960
|
+
name: t(`user.fields.password.label`),
|
|
12961
|
+
placeholder: t(`user.fields.password.placeholder`),
|
|
12984
12962
|
testId: "form-login-input-password"
|
|
12985
12963
|
}
|
|
12986
12964
|
),
|
|
12987
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-login-button-submit", children: t(`
|
|
12965
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mt-4 w-full", type: "submit", "data-testid": "form-login-button-submit", children: t(`auth.login`) })
|
|
12988
12966
|
] }) }),
|
|
12989
12967
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardFooter, { className: "flex w-full flex-col gap-y-4 mt-4", children: [
|
|
12990
12968
|
_chunkEW6QPMN3js.isDiscordAuthEnabled.call(void 0, ) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: `${_chunkEW6QPMN3js.getApiUrl.call(void 0, )}auth/discord`, className: "flex w-full justify-end", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "w-full", variant: `outline`, "data-testid": "page-login-button-initial-login", children: "Login with Discord" }) }),
|
|
@@ -12995,7 +12973,7 @@ function Login() {
|
|
|
12995
12973
|
href: "#",
|
|
12996
12974
|
className: "flex w-full justify-start",
|
|
12997
12975
|
onClick: () => setComponentType(5 /* Register */),
|
|
12998
|
-
children: t(`
|
|
12976
|
+
children: t(`auth.register`)
|
|
12999
12977
|
}
|
|
13000
12978
|
),
|
|
13001
12979
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -13005,7 +12983,7 @@ function Login() {
|
|
|
13005
12983
|
className: "flex w-full justify-end",
|
|
13006
12984
|
onClick: () => setComponentType(1 /* ForgotPassword */),
|
|
13007
12985
|
"data-testid": "form-login-link-forgot-password",
|
|
13008
|
-
children: t(`
|
|
12986
|
+
children: t(`auth.forgot_password`)
|
|
13009
12987
|
}
|
|
13010
12988
|
)
|
|
13011
12989
|
] })
|
|
@@ -13042,14 +13020,14 @@ function RefreshUser() {
|
|
|
13042
13020
|
setUser(fullUser);
|
|
13043
13021
|
const token = {
|
|
13044
13022
|
userId: fullUser.id,
|
|
13045
|
-
companyId: _optionalChain([fullUser, 'access',
|
|
13023
|
+
companyId: _optionalChain([fullUser, 'access', _313 => _313.company, 'optionalAccess', _314 => _314.id]),
|
|
13046
13024
|
roles: fullUser.roles.map((role) => role.id),
|
|
13047
|
-
features: _nullishCoalesce(_optionalChain([fullUser, 'access',
|
|
13025
|
+
features: _nullishCoalesce(_optionalChain([fullUser, 'access', _315 => _315.company, 'optionalAccess', _316 => _316.features, 'optionalAccess', _317 => _317.map, 'call', _318 => _318((feature) => feature.id)]), () => ( [])),
|
|
13048
13026
|
modules: fullUser.modules.map((module) => {
|
|
13049
13027
|
return { id: module.id, permissions: module.permissions };
|
|
13050
13028
|
})
|
|
13051
13029
|
};
|
|
13052
|
-
await _optionalChain([_chunkUYBCHXXLjs.getTokenHandler.call(void 0, ), 'optionalAccess',
|
|
13030
|
+
await _optionalChain([_chunkUYBCHXXLjs.getTokenHandler.call(void 0, ), 'optionalAccess', _319 => _319.updateToken, 'call', _320 => _320(token)]);
|
|
13053
13031
|
_cookiesnext.deleteCookie.call(void 0, "reloadData");
|
|
13054
13032
|
}
|
|
13055
13033
|
}, "loadFullUser");
|
|
@@ -13084,25 +13062,25 @@ function ResetPassword() {
|
|
|
13084
13062
|
await _chunkUYBCHXXLjs.AuthService.validateCode(payload);
|
|
13085
13063
|
} catch (e) {
|
|
13086
13064
|
setError(e instanceof Error ? e.message : String(e));
|
|
13087
|
-
errorToast({ title: t(`
|
|
13065
|
+
errorToast({ title: t(`common.errors.error`), error: e });
|
|
13088
13066
|
}
|
|
13089
13067
|
}
|
|
13090
13068
|
_chunk7QVYU63Ejs.__name.call(void 0, validateResetPasswordCode, "validateResetPasswordCode");
|
|
13091
13069
|
if (params && params.code) {
|
|
13092
13070
|
validateResetPasswordCode(params.code);
|
|
13093
13071
|
} else {
|
|
13094
|
-
setError(t(`
|
|
13072
|
+
setError(t(`auth.errors.invalid_password_reset_code`));
|
|
13095
13073
|
}
|
|
13096
13074
|
}, []);
|
|
13097
13075
|
const formSchema = _zod3.z.object({
|
|
13098
13076
|
password: _zod3.z.string().min(1, {
|
|
13099
|
-
message: t(`
|
|
13077
|
+
message: t(`user.fields.password.error`)
|
|
13100
13078
|
}),
|
|
13101
13079
|
passwordRetype: _zod3.z.string().min(1, {
|
|
13102
|
-
message: t(`
|
|
13080
|
+
message: t(`auth.fields.retype_password.error`)
|
|
13103
13081
|
})
|
|
13104
13082
|
}).refine((data) => data.password === data.passwordRetype, {
|
|
13105
|
-
message: t(`
|
|
13083
|
+
message: t(`auth.fields.retype_password.error_not_match`),
|
|
13106
13084
|
path: ["passwordRetype"]
|
|
13107
13085
|
});
|
|
13108
13086
|
const form = _reacthookform.useForm.call(void 0, {
|
|
@@ -13114,36 +13092,36 @@ function ResetPassword() {
|
|
|
13114
13092
|
});
|
|
13115
13093
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
|
|
13116
13094
|
try {
|
|
13117
|
-
if (!_optionalChain([params, 'optionalAccess',
|
|
13095
|
+
if (!_optionalChain([params, 'optionalAccess', _321 => _321.code])) return;
|
|
13118
13096
|
const payload = {
|
|
13119
|
-
code: _optionalChain([params, 'optionalAccess',
|
|
13097
|
+
code: _optionalChain([params, 'optionalAccess', _322 => _322.code]),
|
|
13120
13098
|
password: values.password
|
|
13121
13099
|
};
|
|
13122
13100
|
await _chunkUYBCHXXLjs.AuthService.resetPassword(payload);
|
|
13123
13101
|
setShowConfirmation(true);
|
|
13124
|
-
_sonner.toast.success(t(`
|
|
13125
|
-
description: t(`
|
|
13102
|
+
_sonner.toast.success(t(`auth.reset_success`), {
|
|
13103
|
+
description: t(`auth.reset_success_description`)
|
|
13126
13104
|
});
|
|
13127
13105
|
setTimeout(() => {
|
|
13128
13106
|
setComponentType(0 /* Login */);
|
|
13129
13107
|
setParams(void 0);
|
|
13130
13108
|
}, 2e3);
|
|
13131
13109
|
} catch (e) {
|
|
13132
|
-
errorToast({ title: t(`
|
|
13110
|
+
errorToast({ title: t(`common.errors.error`), error });
|
|
13133
13111
|
}
|
|
13134
13112
|
}, "onSubmit");
|
|
13135
13113
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
13136
13114
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardHeader, { children: [
|
|
13137
13115
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardTitle, { className: "text-primary flex flex-col items-center pb-10 text-4xl", children: [
|
|
13138
13116
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _image2.default, { src: "/logo.webp", alt: "Logo", width: 100, height: 100, priority: true }),
|
|
13139
|
-
t(`
|
|
13117
|
+
t(`auth.password_reset`)
|
|
13140
13118
|
] }),
|
|
13141
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t(`
|
|
13119
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-sm", children: error ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t(`auth.errors.password_reset_error`) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t(`auth.reset_password`) }) })
|
|
13142
13120
|
] }),
|
|
13143
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: t(`
|
|
13121
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { children: showConfirmation ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: t(`auth.reset_success_description`) }) : error ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardDescription, { className: "text-center text-xl", children: error }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), children: [
|
|
13144
13122
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormPassword, { form, id: "password", name: "Password" }),
|
|
13145
13123
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormPassword, { form, id: "passwordRetype", name: "Retype Password" }),
|
|
13146
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mt-4 w-full", type: "submit", children: t(`
|
|
13124
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mt-4 w-full", type: "submit", children: t(`auth.buttons.reset_password`) })
|
|
13147
13125
|
] }) }) })
|
|
13148
13126
|
] });
|
|
13149
13127
|
}
|
|
@@ -13155,7 +13133,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ResetPassword, "ResetPassword");
|
|
|
13155
13133
|
function ContentsList({ contentList }) {
|
|
13156
13134
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
13157
13135
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-h-0 w-full flex-col overflow-y-auto", children: [
|
|
13158
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-xl font-semibold", children: t(`
|
|
13136
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h2", { className: "text-xl font-semibold", children: t(`content.news`) }),
|
|
13159
13137
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col", children: contentList.map((content) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContentsListElement, { content }, content.id)) })
|
|
13160
13138
|
] });
|
|
13161
13139
|
}
|
|
@@ -13196,7 +13174,7 @@ function ContentsListById({ contentIds }) {
|
|
|
13196
13174
|
data,
|
|
13197
13175
|
fields: ["name" /* name */, "authors" /* authors */, "updatedAt" /* updatedAt */],
|
|
13198
13176
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.Content,
|
|
13199
|
-
title: t(`
|
|
13177
|
+
title: t(`common.relevant`)
|
|
13200
13178
|
}
|
|
13201
13179
|
);
|
|
13202
13180
|
}
|
|
@@ -13218,7 +13196,7 @@ function RelevantContentsList({ id }) {
|
|
|
13218
13196
|
data,
|
|
13219
13197
|
fields: ["name" /* name */, "authors" /* authors */, "relevance" /* relevance */, "updatedAt" /* updatedAt */],
|
|
13220
13198
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.Content,
|
|
13221
|
-
title: t(`
|
|
13199
|
+
title: t(`common.relevant`)
|
|
13222
13200
|
}
|
|
13223
13201
|
);
|
|
13224
13202
|
}
|
|
@@ -13286,20 +13264,20 @@ function NotificationsList({ archived }) {
|
|
|
13286
13264
|
] }),
|
|
13287
13265
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "h-8 w-20" })
|
|
13288
13266
|
] }) }) }, i)) }), "LoadingSkeleton");
|
|
13289
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access',
|
|
13267
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _323 => _323.data, 'optionalAccess', _324 => _324.map, 'call', _325 => _325((notification) => {
|
|
13290
13268
|
const notificationData = generateNotificationData({ notification, generateUrl });
|
|
13291
13269
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex w-full flex-row items-center p-2`, children: [
|
|
13292
13270
|
notificationData.actor ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: _chunkUYBCHXXLjs.Modules.User, id: notificationData.actor.id }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user: notificationData.actor, className: "h-8 w-8" }) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-14 max-w-14 px-2" }),
|
|
13293
13271
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
|
|
13294
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`
|
|
13272
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
|
|
13295
13273
|
strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
|
|
13296
|
-
actor: _nullishCoalesce(_optionalChain([notificationData, 'access',
|
|
13274
|
+
actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _326 => _326.actor, 'optionalAccess', _327 => _327.name]), () => ( "")),
|
|
13297
13275
|
title: notificationData.title
|
|
13298
13276
|
}) }),
|
|
13299
13277
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
|
|
13300
13278
|
] }),
|
|
13301
13279
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-row items-center", children: [
|
|
13302
|
-
notificationData.url ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: notificationData.url, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: `outline`, size: `sm`, onClick: (e) => e.stopPropagation(), children: t(`
|
|
13280
|
+
notificationData.url ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: notificationData.url, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { variant: `outline`, size: `sm`, onClick: (e) => e.stopPropagation(), children: t(`notification.${notification.notificationType}.buttons.action`) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, {}),
|
|
13303
13281
|
!archived && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Tooltip2, { children: [
|
|
13304
13282
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13305
13283
|
Button,
|
|
@@ -13314,7 +13292,7 @@ function NotificationsList({ archived }) {
|
|
|
13314
13292
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, { className: "h-4 w-4 cursor-pointer" })
|
|
13315
13293
|
}
|
|
13316
13294
|
) }),
|
|
13317
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { children: t(`
|
|
13295
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { children: t(`notification.buttons.archive`) })
|
|
13318
13296
|
] })
|
|
13319
13297
|
] })
|
|
13320
13298
|
] }) }) }, notification.id);
|
|
@@ -13338,11 +13316,11 @@ function NotificationsListContainerContent() {
|
|
|
13338
13316
|
}
|
|
13339
13317
|
const tabs = [
|
|
13340
13318
|
{
|
|
13341
|
-
label: t(`
|
|
13319
|
+
label: t(`notification.inbox`),
|
|
13342
13320
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NotificationsList, { archived: false })
|
|
13343
13321
|
},
|
|
13344
13322
|
{
|
|
13345
|
-
label: t(`
|
|
13323
|
+
label: t(`notification.archived`),
|
|
13346
13324
|
content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NotificationsList, { archived: true })
|
|
13347
13325
|
}
|
|
13348
13326
|
];
|
|
@@ -13497,11 +13475,11 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
13497
13475
|
className: `h-5 w-5 cursor-pointer ${unreadNotifications ? "text-destructive" : ""} ${isLoading ? "animate-pulse" : ""}`
|
|
13498
13476
|
}
|
|
13499
13477
|
),
|
|
13500
|
-
t(`
|
|
13478
|
+
t(`entities.notifications`, { count: 2 })
|
|
13501
13479
|
] }) }),
|
|
13502
13480
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { className: "relative left-10 w-80 border-0 p-0 shadow-none", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
|
|
13503
13481
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CardHeader, { className: "p-4", children: [
|
|
13504
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardTitle, { children: t(`
|
|
13482
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardTitle, { children: t(`entities.notifications`, { count: 2 }) }),
|
|
13505
13483
|
isLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground text-xs", children: "Loading..." }),
|
|
13506
13484
|
error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive text-xs", children: [
|
|
13507
13485
|
"Error: ",
|
|
@@ -13509,7 +13487,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
|
|
|
13509
13487
|
] })
|
|
13510
13488
|
] }),
|
|
13511
13489
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
|
|
13512
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-96", children: notifications.length > 0 ? notifications.map((notification) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: generateNotification(notification, () => setIsOpen(false)) }, notification.id)) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4 text-center text-sm text-gray-500", children: t(`
|
|
13490
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-96", children: notifications.length > 0 ? notifications.map((notification) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: generateNotification(notification, () => setIsOpen(false)) }, notification.id)) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "p-4 text-center text-sm text-gray-500", children: t(`notification.empty`) }) })
|
|
13513
13491
|
] }) })
|
|
13514
13492
|
] });
|
|
13515
13493
|
}
|
|
@@ -13534,7 +13512,7 @@ function RoleDetails() {
|
|
|
13534
13512
|
const { role } = useRoleContext();
|
|
13535
13513
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
13536
13514
|
if (!role) return null;
|
|
13537
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AttributeElement, { title: t(`
|
|
13515
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AttributeElement, { title: t(`role.fields.description.label`), value: role.description }) }) });
|
|
13538
13516
|
}
|
|
13539
13517
|
_chunk7QVYU63Ejs.__name.call(void 0, RoleDetails, "RoleDetails");
|
|
13540
13518
|
|
|
@@ -13576,8 +13554,8 @@ function FormRoles({ form, id, name, roles }) {
|
|
|
13576
13554
|
}
|
|
13577
13555
|
),
|
|
13578
13556
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Tooltip2, { children: [
|
|
13579
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FieldLabel, { className: "ml-3 font-normal", children: t(`
|
|
13580
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { children: t(`
|
|
13557
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FieldLabel, { className: "ml-3 font-normal", children: t(`role.roles`, { role: role.id.replaceAll(`-`, ``) }) }) }),
|
|
13558
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, TooltipContent, { children: t(`role.roles_descriptions`, { role: role.id.replaceAll(`-`, ``) }) })
|
|
13581
13559
|
] })
|
|
13582
13560
|
] }, role.id);
|
|
13583
13561
|
}) }) }) });
|
|
@@ -13615,10 +13593,10 @@ function RemoveUserFromRole({ role, user, refresh }) {
|
|
|
13615
13593
|
setOpen(false);
|
|
13616
13594
|
refresh();
|
|
13617
13595
|
} catch (error) {
|
|
13618
|
-
errorToast({ title: t(`
|
|
13596
|
+
errorToast({ title: t(`common.errors.error`), error });
|
|
13619
13597
|
}
|
|
13620
13598
|
}, "remove");
|
|
13621
|
-
const roleName = t(`
|
|
13599
|
+
const roleName = t(`role.roles`, { role: role.id.replaceAll(`-`, ``) });
|
|
13622
13600
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog, { open, onOpenChange: setOpen, children: [
|
|
13623
13601
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13624
13602
|
DialogTrigger,
|
|
@@ -13628,18 +13606,18 @@ function RemoveUserFromRole({ role, user, refresh }) {
|
|
|
13628
13606
|
e.preventDefault();
|
|
13629
13607
|
setOpen(true);
|
|
13630
13608
|
},
|
|
13631
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "hover:text-destructive cursor-pointer", children: t(`
|
|
13609
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "hover:text-destructive cursor-pointer", children: t(`role.remove_user.title`) })
|
|
13632
13610
|
}
|
|
13633
13611
|
),
|
|
13634
13612
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
|
|
13635
13613
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DialogHeader, { children: [
|
|
13636
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`
|
|
13637
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: canRemove ? t(`
|
|
13614
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`role.remove_user.title`) }),
|
|
13615
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: canRemove ? t(`role.remove_user.subtitle_allowed`) : t(`role.remove_user.subtitle_not_allowed`) })
|
|
13638
13616
|
] }),
|
|
13639
13617
|
canRemove ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
13640
|
-
t(`
|
|
13618
|
+
t(`role.remove_user.description_allowed`, { role: roleName, user: user.name }),
|
|
13641
13619
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end", children: [
|
|
13642
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`
|
|
13620
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { className: "mr-2", variant: "outline", type: `button`, onClick: () => setOpen(false), children: t(`ui.buttons.cancel`) }),
|
|
13643
13621
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13644
13622
|
Button,
|
|
13645
13623
|
{
|
|
@@ -13649,11 +13627,11 @@ function RemoveUserFromRole({ role, user, refresh }) {
|
|
|
13649
13627
|
remove();
|
|
13650
13628
|
},
|
|
13651
13629
|
variant: "destructive",
|
|
13652
|
-
children: t(`
|
|
13630
|
+
children: t(`ui.buttons.confirm_delete`)
|
|
13653
13631
|
}
|
|
13654
13632
|
)
|
|
13655
13633
|
] })
|
|
13656
|
-
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t(`
|
|
13634
|
+
] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: t(`role.remove_user.description_not_allowed`, { role: roleName, user: user.name }) })
|
|
13657
13635
|
] })
|
|
13658
13636
|
] });
|
|
13659
13637
|
}
|
|
@@ -13678,14 +13656,14 @@ function UserRoleAdd({ user, refresh }) {
|
|
|
13678
13656
|
});
|
|
13679
13657
|
setRoles(roles.filter((u) => u.id !== role.id));
|
|
13680
13658
|
_sonner.toast.message(
|
|
13681
|
-
t(`
|
|
13682
|
-
source: t(`
|
|
13683
|
-
destination: t(`
|
|
13659
|
+
t(`common.association.label`, {
|
|
13660
|
+
source: t(`entities.roles`, { count: 1 }),
|
|
13661
|
+
destination: t(`entities.users`, { count: 1 })
|
|
13684
13662
|
}),
|
|
13685
13663
|
{
|
|
13686
|
-
description: t(`
|
|
13687
|
-
source: t(`
|
|
13688
|
-
destination: t(`
|
|
13664
|
+
description: t(`common.association.success`, {
|
|
13665
|
+
source: t(`entities.roles`, { count: 1 }),
|
|
13666
|
+
destination: t(`entities.users`, { count: 1 }),
|
|
13689
13667
|
source_name: role.name,
|
|
13690
13668
|
destination_name: user.name
|
|
13691
13669
|
})
|
|
@@ -13714,40 +13692,40 @@ function UserRoleAdd({ user, refresh }) {
|
|
|
13714
13692
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
13715
13693
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { size: "sm", onClick: () => setOpen(true), children: [
|
|
13716
13694
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PlusCircle, { className: "mr-3 h-3.5 w-3.5" }),
|
|
13717
|
-
t(`
|
|
13718
|
-
source: t(`
|
|
13719
|
-
destination: t(`
|
|
13695
|
+
t(`common.association.label`, {
|
|
13696
|
+
source: t(`entities.roles`, { count: 1 }),
|
|
13697
|
+
destination: t(`entities.users`, { count: 1 })
|
|
13720
13698
|
})
|
|
13721
13699
|
] }),
|
|
13722
13700
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CommandDialog, { open, onOpenChange: setOpen, children: [
|
|
13723
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`
|
|
13724
|
-
source: t(`
|
|
13725
|
-
destination: t(`
|
|
13701
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTitle, { children: t(`common.association.label`, {
|
|
13702
|
+
source: t(`entities.roles`, { count: 1 }),
|
|
13703
|
+
destination: t(`entities.users`, { count: 1 })
|
|
13726
13704
|
}) }),
|
|
13727
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`
|
|
13728
|
-
source: t(`
|
|
13729
|
-
destination: t(`
|
|
13705
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogDescription, { children: t(`common.association.description`, {
|
|
13706
|
+
source: t(`entities.roles`, { count: 1 }),
|
|
13707
|
+
destination: t(`entities.users`, { count: 1 }),
|
|
13730
13708
|
destination_name: user.name
|
|
13731
13709
|
}) }),
|
|
13732
13710
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Command, { shouldFilter: false, children: [
|
|
13733
13711
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13734
13712
|
CommandInput,
|
|
13735
13713
|
{
|
|
13736
|
-
placeholder: t(`
|
|
13714
|
+
placeholder: t(`ui.search.placeholder`, { type: t(`entities.roles`, { count: 1 }) }),
|
|
13737
13715
|
value: searchTerm,
|
|
13738
13716
|
onValueChange: setSearchTerm,
|
|
13739
13717
|
ref: inputRef
|
|
13740
13718
|
}
|
|
13741
13719
|
),
|
|
13742
13720
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CommandList, { className: "mt-3 h-auto max-h-96 min-h-96 max-w-full overflow-x-hidden overflow-y-auto", children: [
|
|
13743
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandEmpty, { children: t(`
|
|
13721
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandEmpty, { children: t(`ui.search.no_results`, { type: t(`entities.roles`, { count: 1 }) }) }),
|
|
13744
13722
|
roles.map((role) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13745
13723
|
CommandItem,
|
|
13746
13724
|
{
|
|
13747
13725
|
className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
|
|
13748
13726
|
onSelect: () => addUserToRole(role),
|
|
13749
13727
|
onClick: () => addUserToRole(role),
|
|
13750
|
-
children: t(`
|
|
13728
|
+
children: t(`role.roles`, { role: role.id.replaceAll(`-`, ``) })
|
|
13751
13729
|
},
|
|
13752
13730
|
role.id
|
|
13753
13731
|
))
|
|
@@ -13774,7 +13752,7 @@ function RolesList() {
|
|
|
13774
13752
|
data,
|
|
13775
13753
|
fields: ["name" /* name */, "description" /* description */],
|
|
13776
13754
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.Role,
|
|
13777
|
-
title: t(`
|
|
13755
|
+
title: t(`entities.roles`, { count: 2 })
|
|
13778
13756
|
}
|
|
13779
13757
|
);
|
|
13780
13758
|
}
|
|
@@ -13796,7 +13774,7 @@ function UserRolesList({ user }) {
|
|
|
13796
13774
|
data,
|
|
13797
13775
|
fields: ["name" /* name */, "description" /* description */],
|
|
13798
13776
|
tableGeneratorType: _chunkUYBCHXXLjs.Modules.Role,
|
|
13799
|
-
title: t(`
|
|
13777
|
+
title: t(`entities.roles`, { count: 2 })
|
|
13800
13778
|
}
|
|
13801
13779
|
);
|
|
13802
13780
|
}
|
|
@@ -14188,7 +14166,7 @@ function OAuthClientList({
|
|
|
14188
14166
|
OAuthClientCard,
|
|
14189
14167
|
{
|
|
14190
14168
|
client,
|
|
14191
|
-
onClick: () => _optionalChain([onClientClick, 'optionalCall',
|
|
14169
|
+
onClick: () => _optionalChain([onClientClick, 'optionalCall', _328 => _328(client)]),
|
|
14192
14170
|
onEdit: onEditClick ? () => onEditClick(client) : void 0,
|
|
14193
14171
|
onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
|
|
14194
14172
|
},
|
|
@@ -14209,11 +14187,11 @@ function OAuthClientForm({
|
|
|
14209
14187
|
}) {
|
|
14210
14188
|
const isEditMode = !!client;
|
|
14211
14189
|
const [formState, setFormState] = _react.useState.call(void 0, {
|
|
14212
|
-
name: _optionalChain([client, 'optionalAccess',
|
|
14213
|
-
description: _optionalChain([client, 'optionalAccess',
|
|
14214
|
-
redirectUris: _optionalChain([client, 'optionalAccess',
|
|
14215
|
-
allowedScopes: _optionalChain([client, 'optionalAccess',
|
|
14216
|
-
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess',
|
|
14190
|
+
name: _optionalChain([client, 'optionalAccess', _329 => _329.name]) || "",
|
|
14191
|
+
description: _optionalChain([client, 'optionalAccess', _330 => _330.description]) || "",
|
|
14192
|
+
redirectUris: _optionalChain([client, 'optionalAccess', _331 => _331.redirectUris, 'optionalAccess', _332 => _332.length]) ? client.redirectUris : [""],
|
|
14193
|
+
allowedScopes: _optionalChain([client, 'optionalAccess', _333 => _333.allowedScopes]) || [],
|
|
14194
|
+
isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _334 => _334.isConfidential]), () => ( true))
|
|
14217
14195
|
});
|
|
14218
14196
|
const [errors, setErrors] = _react.useState.call(void 0, {});
|
|
14219
14197
|
const validate = _react.useCallback.call(void 0, () => {
|
|
@@ -14441,7 +14419,7 @@ function OAuthClientDetail({
|
|
|
14441
14419
|
] }),
|
|
14442
14420
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
14443
14421
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Allowed Scopes" }),
|
|
14444
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: client.allowedScopes.map((scope) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "secondary", children: _optionalChain([_chunkUYBCHXXLjs.OAUTH_SCOPE_DISPLAY, 'access',
|
|
14422
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: client.allowedScopes.map((scope) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "secondary", children: _optionalChain([_chunkUYBCHXXLjs.OAUTH_SCOPE_DISPLAY, 'access', _335 => _335[scope], 'optionalAccess', _336 => _336.name]) || scope }, scope)) })
|
|
14445
14423
|
] }),
|
|
14446
14424
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
|
|
14447
14425
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Grant Types" }),
|
|
@@ -14642,7 +14620,7 @@ function OAuthConsentScreen({
|
|
|
14642
14620
|
if (error || !clientInfo) {
|
|
14643
14621
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-screen flex items-center justify-center p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "w-full max-w-md", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "py-8", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Alert, { variant: "destructive", children: [
|
|
14644
14622
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
|
|
14645
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess',
|
|
14623
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _337 => _337.message]) || "Invalid authorization request. Please try again." })
|
|
14646
14624
|
] }) }) }) });
|
|
14647
14625
|
}
|
|
14648
14626
|
const { client, scopes } = clientInfo;
|
|
@@ -15106,4 +15084,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, OAuthConsentScreen, "OAuthConsentScreen");
|
|
|
15106
15084
|
|
|
15107
15085
|
|
|
15108
15086
|
exports.JsonApiProvider = JsonApiProvider; exports.useJsonApiGet = useJsonApiGet; exports.useJsonApiMutation = useJsonApiMutation; exports.useRehydration = useRehydration; exports.useRehydrationList = useRehydrationList; exports.TableGeneratorRegistry = TableGeneratorRegistry; exports.tableGeneratorRegistry = tableGeneratorRegistry; exports.usePageUrlGenerator = usePageUrlGenerator; exports.useUrlRewriter = useUrlRewriter; exports.useDataListRetriever = useDataListRetriever; exports.useDebounce = useDebounce; exports.registerTableGenerator = registerTableGenerator; exports.useTableGenerator = useTableGenerator; exports.useCustomD3Graph = useCustomD3Graph; exports.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; exports.Accordion = Accordion; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.AccordionContent = AccordionContent; exports.Alert = Alert; exports.AlertTitle = AlertTitle; exports.AlertDescription = AlertDescription; exports.AlertAction = AlertAction; exports.buttonVariants = buttonVariants; exports.Button = Button; exports.AlertDialog = AlertDialog; exports.AlertDialogTrigger = AlertDialogTrigger; exports.AlertDialogPortal = AlertDialogPortal; exports.AlertDialogOverlay = AlertDialogOverlay; exports.AlertDialogContent = AlertDialogContent; exports.AlertDialogHeader = AlertDialogHeader; exports.AlertDialogFooter = AlertDialogFooter; exports.AlertDialogMedia = AlertDialogMedia; exports.AlertDialogTitle = AlertDialogTitle; exports.AlertDialogDescription = AlertDialogDescription; exports.AlertDialogAction = AlertDialogAction; exports.AlertDialogCancel = AlertDialogCancel; exports.Avatar = Avatar; exports.AvatarImage = AvatarImage; exports.AvatarFallback = AvatarFallback; exports.AvatarBadge = AvatarBadge; exports.AvatarGroup = AvatarGroup; exports.AvatarGroupCount = AvatarGroupCount; exports.badgeVariants = badgeVariants; exports.Badge = Badge; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis; exports.Calendar = Calendar; exports.CalendarDayButton = CalendarDayButton; exports.Card = Card; exports.CardHeader = CardHeader; exports.CardTitle = CardTitle; exports.CardDescription = CardDescription; exports.CardAction = CardAction; exports.CardContent = CardContent; exports.CardFooter = CardFooter; exports.useCarousel = useCarousel; exports.Carousel = Carousel; exports.CarouselContent = CarouselContent; exports.CarouselItem = CarouselItem; exports.CarouselPrevious = CarouselPrevious; exports.CarouselNext = CarouselNext; exports.ChartContainer = ChartContainer; exports.ChartStyle = ChartStyle; exports.ChartTooltip = ChartTooltip; exports.ChartTooltipContent = ChartTooltipContent; exports.ChartLegend = ChartLegend; exports.ChartLegendContent = ChartLegendContent; exports.Checkbox = Checkbox; exports.Collapsible = Collapsible; exports.CollapsibleTrigger = CollapsibleTrigger; exports.CollapsibleContent = CollapsibleContent; exports.Dialog = Dialog; exports.DialogTrigger = DialogTrigger; exports.DialogPortal = DialogPortal; exports.DialogClose = DialogClose; exports.DialogOverlay = DialogOverlay; exports.DialogContent = DialogContent; exports.DialogHeader = DialogHeader; exports.DialogFooter = DialogFooter; exports.DialogTitle = DialogTitle; exports.DialogDescription = DialogDescription; exports.Input = Input; exports.Textarea = Textarea; exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea; exports.Command = Command; exports.CommandDialog = CommandDialog; exports.CommandInput = CommandInput; exports.CommandList = CommandList; exports.CommandEmpty = CommandEmpty; exports.CommandGroup = CommandGroup; exports.CommandSeparator = CommandSeparator; exports.CommandItem = CommandItem; exports.CommandShortcut = CommandShortcut; exports.ContextMenu = ContextMenu; exports.ContextMenuPortal = ContextMenuPortal; exports.ContextMenuTrigger = ContextMenuTrigger; exports.ContextMenuContent = ContextMenuContent; exports.ContextMenuGroup = ContextMenuGroup; exports.ContextMenuLabel = ContextMenuLabel; exports.ContextMenuItem = ContextMenuItem; exports.ContextMenuSub = ContextMenuSub; exports.ContextMenuSubTrigger = ContextMenuSubTrigger; exports.ContextMenuSubContent = ContextMenuSubContent; exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem; exports.ContextMenuRadioGroup = ContextMenuRadioGroup; exports.ContextMenuRadioItem = ContextMenuRadioItem; exports.ContextMenuSeparator = ContextMenuSeparator; exports.ContextMenuShortcut = ContextMenuShortcut; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerPortal = DrawerPortal; exports.DrawerClose = DrawerClose; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerFooter = DrawerFooter; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DropdownMenu = DropdownMenu; exports.DropdownMenuPortal = DropdownMenuPortal; exports.DropdownMenuTrigger = DropdownMenuTrigger; exports.DropdownMenuContent = DropdownMenuContent; exports.DropdownMenuGroup = DropdownMenuGroup; exports.DropdownMenuLabel = DropdownMenuLabel; exports.DropdownMenuItem = DropdownMenuItem; exports.DropdownMenuSub = DropdownMenuSub; exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger; exports.DropdownMenuSubContent = DropdownMenuSubContent; exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem; exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = DropdownMenuRadioItem; exports.DropdownMenuSeparator = DropdownMenuSeparator; exports.DropdownMenuShortcut = DropdownMenuShortcut; exports.Label = Label; exports.Separator = Separator; exports.FieldSet = FieldSet; exports.FieldLegend = FieldLegend; exports.FieldGroup = FieldGroup; exports.Field = Field; exports.FieldContent = FieldContent; exports.FieldLabel = FieldLabel; exports.FieldTitle = FieldTitle; exports.FieldDescription = FieldDescription; exports.FieldSeparator = FieldSeparator; exports.FieldError = FieldError; exports.Form = Form; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.InputOTP = InputOTP; exports.InputOTPGroup = InputOTPGroup; exports.InputOTPSlot = InputOTPSlot; exports.InputOTPSeparator = InputOTPSeparator; exports.NavigationMenu = NavigationMenu; exports.NavigationMenuList = NavigationMenuList; exports.NavigationMenuItem = NavigationMenuItem; exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle; exports.NavigationMenuTrigger = NavigationMenuTrigger; exports.NavigationMenuContent = NavigationMenuContent; exports.NavigationMenuPositioner = NavigationMenuPositioner; exports.NavigationMenuLink = NavigationMenuLink; exports.NavigationMenuIndicator = NavigationMenuIndicator; exports.Popover = Popover; exports.PopoverTrigger = PopoverTrigger; exports.PopoverContent = PopoverContent; exports.PopoverHeader = PopoverHeader; exports.PopoverTitle = PopoverTitle; exports.PopoverDescription = PopoverDescription; exports.Progress = Progress; exports.ProgressTrack = ProgressTrack; exports.ProgressIndicator = ProgressIndicator; exports.ProgressLabel = ProgressLabel; exports.ProgressValue = ProgressValue; exports.RadioGroup = RadioGroup; exports.RadioGroupItem = RadioGroupItem; exports.ResizablePanelGroup = ResizablePanelGroup; exports.ResizablePanel = ResizablePanel; exports.ResizableHandle = ResizableHandle; exports.ScrollArea = ScrollArea; exports.ScrollBar = ScrollBar; exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.Sheet = Sheet; exports.SheetTrigger = SheetTrigger; exports.SheetClose = SheetClose; exports.SheetContent = SheetContent; exports.SheetHeader = SheetHeader; exports.SheetFooter = SheetFooter; exports.SheetTitle = SheetTitle; exports.SheetDescription = SheetDescription; exports.Skeleton = Skeleton; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip2; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.useSidebar = useSidebar; exports.SidebarProvider = SidebarProvider; exports.Sidebar = Sidebar; exports.SidebarTrigger = SidebarTrigger; exports.SidebarRail = SidebarRail; exports.SidebarInset = SidebarInset; exports.SidebarInput = SidebarInput; exports.SidebarHeader = SidebarHeader; exports.SidebarFooter = SidebarFooter; exports.SidebarSeparator = SidebarSeparator; exports.SidebarContent = SidebarContent; exports.SidebarGroup = SidebarGroup; exports.SidebarGroupLabel = SidebarGroupLabel; exports.SidebarGroupAction = SidebarGroupAction; exports.SidebarGroupContent = SidebarGroupContent; exports.SidebarMenu = SidebarMenu; exports.SidebarMenuItem = SidebarMenuItem; exports.SidebarMenuButton = SidebarMenuButton; exports.SidebarMenuAction = SidebarMenuAction; exports.SidebarMenuBadge = SidebarMenuBadge; exports.SidebarMenuSkeleton = SidebarMenuSkeleton; exports.SidebarMenuSub = SidebarMenuSub; exports.SidebarMenuSubItem = SidebarMenuSubItem; exports.SidebarMenuSubButton = SidebarMenuSubButton; exports.Slider = Slider; exports.Toaster = Toaster; exports.Switch = Switch; exports.Table = Table; exports.TableHeader = TableHeader; exports.TableBody = TableBody; exports.TableFooter = TableFooter; exports.TableRow = TableRow; exports.TableHead = TableHead; exports.TableCell = TableCell; exports.TableCaption = TableCaption; exports.Tabs = Tabs; exports.tabsListVariants = tabsListVariants; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.toggleVariants = toggleVariants; exports.Toggle = Toggle; exports.KanbanRoot = KanbanRoot; exports.KanbanBoard = KanbanBoard; exports.KanbanColumn = KanbanColumn; exports.KanbanColumnHandle = KanbanColumnHandle; exports.KanbanItem = KanbanItem; exports.KanbanItemHandle = KanbanItemHandle; exports.KanbanOverlay = KanbanOverlay; exports.Link = Link; exports.MultiSelect = MultiSelect; exports.BreadcrumbNavigation = BreadcrumbNavigation; exports.ContentTitle = ContentTitle; exports.SharedProvider = SharedProvider; exports.useSharedContext = useSharedContext; exports.CompanyDetails = CompanyDetails; exports.TokenStatusIndicator = TokenStatusIndicator; exports.Header = Header; exports.ModeToggleSwitch = ModeToggleSwitch; exports.PageSection = PageSection; exports.recentPagesAtom = recentPagesAtom; exports.RecentPagesNavigator = RecentPagesNavigator; exports.PageContainer = PageContainer; exports.ReactMarkdownContainer = ReactMarkdownContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.UserDetails = UserDetails; exports.UserAvatar = UserAvatar; exports.UserIndexDetails = UserIndexDetails; exports.UserContainer = UserContainer; exports.UserIndexContainer = UserIndexContainer; exports.UsersListContainer = UsersListContainer; exports.AdminUsersList = AdminUsersList; exports.CompanyUsersList = CompanyUsersList; exports.ContributorsList = ContributorsList; exports.RelevantUsersList = RelevantUsersList; exports.RoleUsersList = RoleUsersList; exports.UserListInAdd = UserListInAdd; exports.UsersList = UsersList; exports.UsersListByContentIds = UsersListByContentIds; exports.AllowedUsersDetails = AllowedUsersDetails; exports.ErrorDetails = ErrorDetails; exports.errorToast = errorToast; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorTrigger = CommonEditorTrigger; exports.DatePickerPopover = DatePickerPopover; exports.DateRangeSelector = DateRangeSelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.FormFieldWrapper = FormFieldWrapper; exports.FormCheckbox = FormCheckbox; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; exports.PasswordInput = PasswordInput; exports.FormPassword = FormPassword; exports.FormPlaceAutocomplete = FormPlaceAutocomplete; exports.FormSelect = FormSelect; exports.FormSlider = FormSlider; exports.FormSwitch = FormSwitch; exports.FormTextarea = FormTextarea; exports.FormFeatures = FormFeatures; exports.PageContainerContentDetails = PageContainerContentDetails; exports.PageContentContainer = PageContentContainer; exports.cellComponent = cellComponent; exports.cellDate = cellDate; exports.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; exports.AuthContainer = AuthContainer; exports.LandingComponent = LandingComponent; exports.AcceptInvitation = AcceptInvitation; exports.ActivateAccount = ActivateAccount; exports.Cookies = Cookies; exports.ForgotPassword = ForgotPassword; exports.Login = Login; exports.Logout = Logout; exports.RefreshUser = RefreshUser; exports.ResetPassword = ResetPassword; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyContainer = CompanyContainer; exports.CompanyConfigurationSecurityForm = CompanyConfigurationSecurityForm; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; exports.NotificationErrorBoundary = NotificationErrorBoundary; exports.generateNotificationData = generateNotificationData; exports.NotificationToast = NotificationToast; exports.NotificationMenuItem = NotificationMenuItem; exports.NotificationContextProvider = NotificationContextProvider; exports.useNotificationContext = useNotificationContext; exports.NotificationsList = NotificationsList; exports.NotificationsListContainer = NotificationsListContainer; exports.NotificationModal = NotificationModal; exports.PushNotificationProvider = PushNotificationProvider; exports.RoleProvider = RoleProvider; exports.useRoleContext = useRoleContext; exports.RoleDetails = RoleDetails; exports.RoleContainer = RoleContainer; exports.FormRoles = FormRoles; exports.RemoveUserFromRole = RemoveUserFromRole; exports.UserRoleAdd = UserRoleAdd; exports.useRoleTableStructure = useRoleTableStructure; exports.RolesList = RolesList; exports.UserRolesList = UserRolesList; exports.OAuthRedirectUriInput = OAuthRedirectUriInput; exports.OAuthScopeSelector = OAuthScopeSelector; exports.OAuthClientSecretDisplay = OAuthClientSecretDisplay; exports.OAuthClientCard = OAuthClientCard; exports.OAuthClientList = OAuthClientList; exports.OAuthClientForm = OAuthClientForm; exports.OAuthClientDetail = OAuthClientDetail; exports.OAuthConsentHeader = OAuthConsentHeader; exports.OAuthScopeList = OAuthScopeList; exports.OAuthConsentActions = OAuthConsentActions; exports.useOAuthConsent = useOAuthConsent; exports.OAuthConsentScreen = OAuthConsentScreen; exports.AddUserToRole = AddUserToRole; exports.UserAvatarEditor = UserAvatarEditor; exports.UserDeleter = UserDeleter; exports.UserEditor = UserEditor; exports.UserMultiSelect = UserMultiSelect; exports.UserReactivator = UserReactivator; exports.UserResentInvitationEmail = UserResentInvitationEmail; exports.UserSelector = UserSelector; exports.UserProvider = UserProvider; exports.useUserContext = useUserContext; exports.CompanyProvider = CompanyProvider; exports.useCompanyContext = useCompanyContext; exports.CommonProvider = CommonProvider; exports.useCommonContext = useCommonContext; exports.useNotificationSync = useNotificationSync; exports.usePageTracker = usePageTracker; exports.useSocket = useSocket; exports.useSubscriptionStatus = useSubscriptionStatus; exports.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
|
|
15109
|
-
//# sourceMappingURL=chunk-
|
|
15087
|
+
//# sourceMappingURL=chunk-ALGMJ4JS.js.map
|