@studiocubics/cms 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +0 -13
  2. package/dist/client/constants/pageLimits.d.ts +1 -0
  3. package/dist/client/constants/pageLimits.js +1 -1
  4. package/dist/client/constants/pageLimits.js.map +1 -1
  5. package/dist/client/index.js +1 -1
  6. package/dist/client/ui/System/Invitations/InvitationListPage.d.ts +1 -2
  7. package/dist/client/ui/System/Invitations/InvitationListPage.js +1 -1
  8. package/dist/client/ui/System/Invitations/InvitationListPage.js.map +1 -1
  9. package/dist/client/ui/System/Permissions/RolePermissionsPage.d.ts +1 -4
  10. package/dist/client/ui/System/Permissions/RolePermissionsPage.js +1 -1
  11. package/dist/client/ui/System/Permissions/RolePermissionsPage.js.map +1 -1
  12. package/dist/client/ui/System/Sessions/SessionActions.d.ts +6 -0
  13. package/dist/client/ui/System/Sessions/SessionActions.js +2 -0
  14. package/dist/client/ui/System/Sessions/SessionActions.js.map +1 -0
  15. package/dist/client/ui/System/Sessions/SessionList.d.ts +1 -0
  16. package/dist/client/ui/System/Sessions/SessionList.js +2 -0
  17. package/dist/client/ui/System/Sessions/SessionList.js.map +1 -0
  18. package/dist/client/ui/System/Sessions/SessionListCard/SessionListCard.d.ts +6 -0
  19. package/dist/client/ui/System/Sessions/SessionListCard/SessionListCard.js +2 -0
  20. package/dist/client/ui/System/Sessions/SessionListCard/SessionListCard.js.map +1 -0
  21. package/dist/client/ui/System/Sessions/SessionListCard/SessionListCard.module.css.js +2 -0
  22. package/dist/client/ui/System/Sessions/SessionListCard/SessionListCard.module.css.js.map +1 -0
  23. package/dist/client/ui/System/Sessions/SessionListPagination.d.ts +4 -0
  24. package/dist/client/ui/System/Sessions/SessionListPagination.js +2 -0
  25. package/dist/client/ui/System/Sessions/SessionListPagination.js.map +1 -0
  26. package/dist/client/ui/System/Sessions/SessionsActive/SessionsActive.d.ts +4 -0
  27. package/dist/client/ui/System/Sessions/SessionsActive/SessionsActive.js +2 -0
  28. package/dist/client/ui/System/Sessions/SessionsActive/SessionsActive.js.map +1 -0
  29. package/dist/client/ui/System/Sessions/SessionsActive/SessionsActive.module.css.js +2 -0
  30. package/dist/client/ui/System/Sessions/SessionsActive/SessionsActive.module.css.js.map +1 -0
  31. package/dist/client/ui/System/Sessions/SessionsListPage.d.ts +1 -0
  32. package/dist/client/ui/System/Sessions/SessionsListPage.js +2 -0
  33. package/dist/client/ui/System/Sessions/SessionsListPage.js.map +1 -0
  34. package/dist/client/ui/System/Sessions/_index.d.ts +6 -0
  35. package/dist/client/ui/System/SystemUser/SystemUserActions.d.ts +8 -3
  36. package/dist/client/ui/System/SystemUser/SystemUserActions.js +1 -1
  37. package/dist/client/ui/System/SystemUser/SystemUserActions.js.map +1 -1
  38. package/dist/client/ui/System/SystemUser/SystemUserBanUnbanDialog.d.ts +8 -0
  39. package/dist/client/ui/System/SystemUser/SystemUserBanUnbanDialog.js +2 -0
  40. package/dist/client/ui/System/SystemUser/SystemUserBanUnbanDialog.js.map +1 -0
  41. package/dist/client/ui/System/SystemUser/SystemUserDeleteDialog.d.ts +7 -0
  42. package/dist/client/ui/System/SystemUser/SystemUserDeleteDialog.js +2 -0
  43. package/dist/client/ui/System/SystemUser/SystemUserDeleteDialog.js.map +1 -0
  44. package/dist/client/ui/System/SystemUser/SystemUserDetails/SystemUserDetails.d.ts +3 -2
  45. package/dist/client/ui/System/SystemUser/SystemUserDetails/SystemUserDetails.js +1 -1
  46. package/dist/client/ui/System/SystemUser/SystemUserDetails/SystemUserDetails.js.map +1 -1
  47. package/dist/client/ui/System/SystemUser/SystemUserDetailsForm/SystemUserDetailsForm.d.ts +5 -3
  48. package/dist/client/ui/System/SystemUser/SystemUserDetailsForm/SystemUserDetailsForm.js +1 -1
  49. package/dist/client/ui/System/SystemUser/SystemUserDetailsForm/SystemUserDetailsForm.js.map +1 -1
  50. package/dist/client/ui/System/SystemUser/SystemUserList.js +1 -1
  51. package/dist/client/ui/System/SystemUser/SystemUserList.js.map +1 -1
  52. package/dist/client/ui/System/SystemUser/SystemUserListActions.js +1 -1
  53. package/dist/client/ui/System/SystemUser/SystemUserListActions.js.map +1 -1
  54. package/dist/client/ui/System/SystemUser/SystemUserListCard.d.ts +1 -0
  55. package/dist/client/ui/System/SystemUser/SystemUserListCard.js +1 -1
  56. package/dist/client/ui/System/SystemUser/SystemUserListCard.js.map +1 -1
  57. package/dist/client/ui/System/SystemUser/SystemUserListPage.d.ts +1 -2
  58. package/dist/client/ui/System/SystemUser/SystemUserListPage.js +1 -1
  59. package/dist/client/ui/System/SystemUser/SystemUserListPage.js.map +1 -1
  60. package/dist/client/ui/System/SystemUser/SystemUserListSort.d.ts +1 -0
  61. package/dist/client/ui/System/SystemUser/SystemUserListSort.js +2 -0
  62. package/dist/client/ui/System/SystemUser/SystemUserListSort.js.map +1 -0
  63. package/dist/client/ui/System/SystemUser/SystemUserPage.js +1 -1
  64. package/dist/client/ui/System/SystemUser/SystemUserPage.js.map +1 -1
  65. package/dist/client/ui/System/SystemUser/SystemUserPageContent.js +1 -1
  66. package/dist/client/ui/System/SystemUser/SystemUserPageContent.js.map +1 -1
  67. package/dist/client/ui/System/SystemUser/SystemUserRole/SystemUserRole.d.ts +3 -1
  68. package/dist/client/ui/System/SystemUser/SystemUserRole/SystemUserRole.js +1 -1
  69. package/dist/client/ui/System/SystemUser/SystemUserRole/SystemUserRole.js.map +1 -1
  70. package/dist/client/ui/System/SystemUser/SystemUserRoleForm/SystemUserRoleForm.d.ts +4 -2
  71. package/dist/client/ui/System/SystemUser/SystemUserRoleForm/SystemUserRoleForm.js +1 -1
  72. package/dist/client/ui/System/SystemUser/SystemUserRoleForm/SystemUserRoleForm.js.map +1 -1
  73. package/dist/client/ui/System/SystemUser/_index.d.ts +1 -0
  74. package/dist/client/ui/System/_index.d.ts +1 -1
  75. package/dist/index.css +1 -1
  76. package/dist/server/clerk/_index.d.ts +0 -1
  77. package/dist/server/clerk/actions/invitations.d.ts +0 -1
  78. package/dist/server/clerk/actions/invitations.js.map +1 -1
  79. package/dist/server/clerk/actions/sessions.d.ts +4 -0
  80. package/dist/server/clerk/actions/sessions.js +2 -0
  81. package/dist/server/clerk/actions/sessions.js.map +1 -0
  82. package/dist/server/clerk/actions/systemUsers.d.ts +4 -1
  83. package/dist/server/clerk/actions/systemUsers.js +1 -1
  84. package/dist/server/clerk/actions/systemUsers.js.map +1 -1
  85. package/dist/server/clerk/auth.d.ts +3 -3
  86. package/dist/server/clerk/auth.js.map +1 -1
  87. package/dist/server/clerk/schemas/systemUser.d.ts +3 -1
  88. package/dist/server/clerk/schemas/systemUser.js +2 -0
  89. package/dist/server/clerk/schemas/systemUser.js.map +1 -0
  90. package/dist/server/clerk/toClientSafeUser.d.ts +1 -1
  91. package/dist/server/clerk/toClientSafeUser.js +1 -1
  92. package/dist/server/clerk/toClientSafeUser.js.map +1 -1
  93. package/dist/server/index.d.ts +1 -5
  94. package/dist/server/index.js +1 -1
  95. package/package.json +9 -11
  96. package/dist/client/ui/System/types.d.ts +0 -5
package/README.md CHANGED
@@ -1,15 +1,2 @@
1
1
  # @studiocubics/cms
2
2
 
3
- To install dependencies:
4
-
5
- ```bash
6
- bun install
7
- ```
8
-
9
- To run:
10
-
11
- ```bash
12
- bun run index.ts
13
- ```
14
-
15
- This project was created using `bun init` in bun v1.3.7. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
@@ -1,2 +1,3 @@
1
1
  export declare const SYSTEM_USERS_PAGE_LIMIT = 10;
2
+ export declare const SESSIONS_PAGE_LIMIT = 10;
2
3
  export declare const INVITATIONS_PAGE_LIMIT = 10;
@@ -1,2 +1,2 @@
1
- const o=10,t=10;export{t as INVITATIONS_PAGE_LIMIT,o as SYSTEM_USERS_PAGE_LIMIT};
1
+ const o=10,t=10,c=10;export{c as INVITATIONS_PAGE_LIMIT,t as SESSIONS_PAGE_LIMIT,o as SYSTEM_USERS_PAGE_LIMIT};
2
2
  //# sourceMappingURL=pageLimits.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pageLimits.js","sources":["../../../src/client/constants/pageLimits.ts"],"sourcesContent":["export const SYSTEM_USERS_PAGE_LIMIT = 10;\nexport const INVITATIONS_PAGE_LIMIT = 10;\n"],"names":["SYSTEM_USERS_PAGE_LIMIT","INVITATIONS_PAGE_LIMIT"],"mappings":"AAAO,MAAMA,EAA0B,GAC1BC,EAAyB"}
1
+ {"version":3,"file":"pageLimits.js","sources":["../../../src/client/constants/pageLimits.ts"],"sourcesContent":["export const SYSTEM_USERS_PAGE_LIMIT = 10;\nexport const SESSIONS_PAGE_LIMIT = 10;\nexport const INVITATIONS_PAGE_LIMIT = 10;\n"],"names":["SYSTEM_USERS_PAGE_LIMIT","SESSIONS_PAGE_LIMIT","INVITATIONS_PAGE_LIMIT"],"mappings":"AAAO,MAAMA,EAA0B,GAC1BC,EAAsB,GACtBC,EAAyB"}
@@ -1,2 +1,2 @@
1
- export{RBAC_CONFIG,getInvitationPublicMetadata,resources,roles}from"./clerk/rbacConfig.js";export{INVITATIONS_PAGE_LIMIT,SYSTEM_USERS_PAGE_LIMIT}from"./constants/pageLimits.js";export{defaultNavLinks,defaultSecurityLinks}from"./constants/defaults.js";export{CMSRootProviders}from"./providers/CMSRootProviders.js";export{ThemedMonacoEditor}from"./ui/Inputs/ThemedMonacoEditor/ThemedMonacoEditor.js";export{CMSSecurityLayout}from"./ui/Layout/CMSSecurityLayout.js";export{CMSSidebar}from"./ui/Layout/CMSSidebar/CMSSidebar.js";export{CMSSidebarBody}from"./ui/Layout/CMSSidebar/CMSSidebarBody.js";export{CMSSidebarFooter}from"./ui/Layout/CMSSidebar/CMSSidebarFooter/CMSSidebarFooter.js";export{CMSSidebarHeader}from"./ui/Layout/CMSSidebar/CMSSidebarHeader/CMSSidebarHeader.js";export{SignIn}from"./ui/System/Auth/SignIn/SignIn.js";export{useSignInForm}from"./ui/System/Auth/SignIn/useSignInForm.js";export{SignUp}from"./ui/System/Auth/SignUp/SignUp.js";export{useSignUpForm}from"./ui/System/Auth/SignUp/useSignUpForm.js";export{InvitationList}from"./ui/System/Invitations/InvitationList.js";export{InvitationCreateDialog,InvitationListActions,InvitationRevokeDialog}from"./ui/System/Invitations/InvitationListActions.js";export{InvitationListCard}from"./ui/System/Invitations/InvitationListCard.js";export{InvitationListPage}from"./ui/System/Invitations/InvitationListPage.js";export{InvitationListPagination}from"./ui/System/Invitations/InvitationListPagination.js";export{RoleListCard}from"./ui/System/Permissions/RoleListCard.js";export{RolePermissionsPage}from"./ui/System/Permissions/RolePermissionsPage.js";export{RolePermissionsTable}from"./ui/System/Permissions/RolePermissionsTable.js";export{CurrentSystemUserButton,Logout}from"./ui/System/SystemUser/CurrentSystemUserButton/CurrentSystemUserButton.js";export{CurrentSystemUserPage}from"./ui/System/SystemUser/CurrentSystemUserPage.js";export{SystemUserDeleteListItem}from"./ui/System/SystemUser/SystemUserActions.js";export{SystemUserDetails}from"./ui/System/SystemUser/SystemUserDetails/SystemUserDetails.js";export{SystemUserDetailsForm}from"./ui/System/SystemUser/SystemUserDetailsForm/SystemUserDetailsForm.js";export{SystemUserList}from"./ui/System/SystemUser/SystemUserList.js";export{SystemUserListActions}from"./ui/System/SystemUser/SystemUserListActions.js";export{SystemUserListCard}from"./ui/System/SystemUser/SystemUserListCard.js";export{SystemUserListPage}from"./ui/System/SystemUser/SystemUserListPage.js";export{SystemUserListPagination}from"./ui/System/SystemUser/SystemUserListPagination.js";export{SystemUserPage}from"./ui/System/SystemUser/SystemUserPage.js";export{SystemUserPageContent}from"./ui/System/SystemUser/SystemUserPageContent.js";export{SystemUserRole}from"./ui/System/SystemUser/SystemUserRole/SystemUserRole.js";export{CurrentSystemUserTimestamps,SystemUserTimestamps}from"./ui/System/SystemUser/SystemUserTimestamps.js";export{WelcomePage}from"./ui/System/WelcomePage/WelcomePage.js";
1
+ export{RBAC_CONFIG,getInvitationPublicMetadata,resources,roles}from"./clerk/rbacConfig.js";export{INVITATIONS_PAGE_LIMIT,SESSIONS_PAGE_LIMIT,SYSTEM_USERS_PAGE_LIMIT}from"./constants/pageLimits.js";export{defaultNavLinks,defaultSecurityLinks}from"./constants/defaults.js";export{CMSRootProviders}from"./providers/CMSRootProviders.js";export{ThemedMonacoEditor}from"./ui/Inputs/ThemedMonacoEditor/ThemedMonacoEditor.js";export{CMSSecurityLayout}from"./ui/Layout/CMSSecurityLayout.js";export{CMSSidebar}from"./ui/Layout/CMSSidebar/CMSSidebar.js";export{CMSSidebarBody}from"./ui/Layout/CMSSidebar/CMSSidebarBody.js";export{CMSSidebarFooter}from"./ui/Layout/CMSSidebar/CMSSidebarFooter/CMSSidebarFooter.js";export{CMSSidebarHeader}from"./ui/Layout/CMSSidebar/CMSSidebarHeader/CMSSidebarHeader.js";export{SignIn}from"./ui/System/Auth/SignIn/SignIn.js";export{useSignInForm}from"./ui/System/Auth/SignIn/useSignInForm.js";export{SignUp}from"./ui/System/Auth/SignUp/SignUp.js";export{useSignUpForm}from"./ui/System/Auth/SignUp/useSignUpForm.js";export{InvitationList}from"./ui/System/Invitations/InvitationList.js";export{InvitationCreateDialog,InvitationListActions,InvitationRevokeDialog}from"./ui/System/Invitations/InvitationListActions.js";export{InvitationListCard}from"./ui/System/Invitations/InvitationListCard.js";export{InvitationListPage}from"./ui/System/Invitations/InvitationListPage.js";export{InvitationListPagination}from"./ui/System/Invitations/InvitationListPagination.js";export{RoleListCard}from"./ui/System/Permissions/RoleListCard.js";export{RolePermissionsPage}from"./ui/System/Permissions/RolePermissionsPage.js";export{RolePermissionsTable}from"./ui/System/Permissions/RolePermissionsTable.js";export{SessionRevokeButton}from"./ui/System/Sessions/SessionActions.js";export{SessionList}from"./ui/System/Sessions/SessionList.js";export{SessionListCard,errorSessions,primarySessions}from"./ui/System/Sessions/SessionListCard/SessionListCard.js";export{SessionListPagination}from"./ui/System/Sessions/SessionListPagination.js";export{SessionsActive}from"./ui/System/Sessions/SessionsActive/SessionsActive.js";export{SessionsListPage}from"./ui/System/Sessions/SessionsListPage.js";export{CurrentSystemUserButton,Logout}from"./ui/System/SystemUser/CurrentSystemUserButton/CurrentSystemUserButton.js";export{CurrentSystemUserPage}from"./ui/System/SystemUser/CurrentSystemUserPage.js";export{SystemUserBanListItem,SystemUserDeleteListItem}from"./ui/System/SystemUser/SystemUserActions.js";export{SystemUserDetails}from"./ui/System/SystemUser/SystemUserDetails/SystemUserDetails.js";export{SystemUserDetailsForm}from"./ui/System/SystemUser/SystemUserDetailsForm/SystemUserDetailsForm.js";export{SystemUserList}from"./ui/System/SystemUser/SystemUserList.js";export{SystemUserListActions}from"./ui/System/SystemUser/SystemUserListActions.js";export{SystemUserListCard}from"./ui/System/SystemUser/SystemUserListCard.js";export{SystemUserListPage}from"./ui/System/SystemUser/SystemUserListPage.js";export{SystemUserListPagination}from"./ui/System/SystemUser/SystemUserListPagination.js";export{SystemUserPage}from"./ui/System/SystemUser/SystemUserPage.js";export{SystemUserPageContent}from"./ui/System/SystemUser/SystemUserPageContent.js";export{SystemUserRole}from"./ui/System/SystemUser/SystemUserRole/SystemUserRole.js";export{SystemUserRoleForm}from"./ui/System/SystemUser/SystemUserRoleForm/SystemUserRoleForm.js";export{CurrentSystemUserTimestamps,SystemUserTimestamps}from"./ui/System/SystemUser/SystemUserTimestamps.js";export{WelcomePage}from"./ui/System/WelcomePage/WelcomePage.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1 @@
1
- import type { SecurityPageProps } from "../types";
2
- export declare function InvitationListPage({ searchParams, securityLinks, }: SecurityPageProps): Promise<import("react/jsx-runtime").JSX.Element>;
1
+ export declare function InvitationListPage({ searchParams, }: PageProps<"/dashboard/security/invitations">): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -1,2 +1,2 @@
1
- import{jsx as t}from"react/jsx-runtime";import{INVITATIONS_PAGE_LIMIT as i}from"../../../constants/pageLimits.js";import{PageLayoutPagination as s}from"@studiocubics/components";import{InvitationListPagination as o}from"./InvitationListPagination.js";import{InvitationList as n}from"./InvitationList.js";import{InvitationListActions as r}from"./InvitationListActions.js";async function a({searchParams:a,securityLinks:m}){const e=await a,c=e.status,p=Number(e.page??1),u={limit:i,offset:(p-1)*i,status:c};return t(s,{size:"sm",title:m[3]?.children,actions:t(r,{status:c}),paginationComponent:t(o,{page:p,...u}),children:t(n,{...u})})}export{a as InvitationListPage};
1
+ import{jsx as t}from"react/jsx-runtime";import{INVITATIONS_PAGE_LIMIT as i}from"../../../constants/pageLimits.js";import{PageLayoutPagination as s}from"@studiocubics/components";import{InvitationListPagination as o}from"./InvitationListPagination.js";import{InvitationList as n}from"./InvitationList.js";import{InvitationListActions as a}from"./InvitationListActions.js";import{defaultSecurityLinks as r}from"../../../constants/defaults.js";async function m({searchParams:m}){const e=await m,c=e.status,p=Number(e.page??1),f={limit:i,offset:(p-1)*i,status:c};return t(s,{size:"sm",title:r[3]?.children,actions:t(a,{status:c}),paginationComponent:t(o,{page:p,...f}),children:t(n,{...f})})}export{m as InvitationListPage};
2
2
  //# sourceMappingURL=InvitationListPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvitationListPage.js","sources":["../../../../../src/client/ui/System/Invitations/InvitationListPage.tsx"],"sourcesContent":["import { INVITATIONS_PAGE_LIMIT as limit } from \"../../../constants/pageLimits\";\nimport { PageLayoutPagination } from \"@studiocubics/components\";\nimport { InvitationListPagination } from \"./InvitationListPagination\";\nimport { InvitationList } from \"./InvitationList\";\nimport type { SecurityPageProps } from \"../types\";\nimport { InvitationListActions } from \"./InvitationListActions\";\n\nexport async function InvitationListPage({\n searchParams,\n securityLinks,\n}: SecurityPageProps) {\n const sp = await searchParams;\n const status = sp.status as ClerkInvitationListParams[\"status\"];\n const page = Number(sp.page ?? 1);\n const offset = (page - 1) * limit;\n const params = {\n limit,\n offset,\n status,\n };\n\n return (\n <PageLayoutPagination\n size=\"sm\"\n title={securityLinks[3]?.children}\n actions={<InvitationListActions status={status} />}\n paginationComponent={<InvitationListPagination page={page} {...params} />}\n >\n <InvitationList {...params} />\n </PageLayoutPagination>\n );\n}\n"],"names":["async","InvitationListPage","searchParams","securityLinks","sp","status","page","Number","params","limit","offset","_jsx","PageLayoutPagination","size","title","children","actions","InvitationListActions","paginationComponent","InvitationListPagination","InvitationList"],"mappings":"mXAOOA,eAAeC,GAAmBC,aACvCA,EAAYC,cACZA,IAEA,MAAMC,QAAWF,EACXG,EAASD,EAAGC,OACZC,EAAOC,OAAOH,EAAGE,MAAQ,GAEzBE,EAAS,OACbC,EACAC,QAHcJ,EAAO,GAAKG,EAI1BJ,UAGF,OACEM,EAACC,EAAoB,CACnBC,KAAK,KACLC,MAAOX,EAAc,IAAIY,SACzBC,QAASL,EAACM,EAAqB,CAACZ,OAAQA,IACxCa,oBAAqBP,EAACQ,EAAwB,CAACb,KAAMA,KAAUE,aAE/DG,EAACS,MAAmBZ,KAG1B"}
1
+ {"version":3,"file":"InvitationListPage.js","sources":["../../../../../src/client/ui/System/Invitations/InvitationListPage.tsx"],"sourcesContent":["import { INVITATIONS_PAGE_LIMIT as limit } from \"../../../constants/pageLimits\";\nimport { PageLayoutPagination } from \"@studiocubics/components\";\nimport { InvitationListPagination } from \"./InvitationListPagination\";\nimport { InvitationList } from \"./InvitationList\";\nimport { InvitationListActions } from \"./InvitationListActions\";\nimport { defaultSecurityLinks } from \"../../../constants/defaults\";\n\nexport async function InvitationListPage({\n searchParams,\n}: PageProps<\"/dashboard/security/invitations\">) {\n const sp = await searchParams;\n const status = sp.status as ClerkInvitationListParams[\"status\"];\n const page = Number(sp.page ?? 1);\n const offset = (page - 1) * limit;\n const params = {\n limit,\n offset,\n status,\n };\n\n return (\n <PageLayoutPagination\n size=\"sm\"\n title={defaultSecurityLinks[3]?.children}\n actions={<InvitationListActions status={status} />}\n paginationComponent={<InvitationListPagination page={page} {...params} />}\n >\n <InvitationList {...params} />\n </PageLayoutPagination>\n );\n}\n"],"names":["async","InvitationListPage","searchParams","sp","status","page","Number","params","limit","offset","_jsx","PageLayoutPagination","size","title","defaultSecurityLinks","children","actions","InvitationListActions","paginationComponent","InvitationListPagination","InvitationList"],"mappings":"ybAOOA,eAAeC,GAAmBC,aACvCA,IAEA,MAAMC,QAAWD,EACXE,EAASD,EAAGC,OACZC,EAAOC,OAAOH,EAAGE,MAAQ,GAEzBE,EAAS,OACbC,EACAC,QAHcJ,EAAO,GAAKG,EAI1BJ,UAGF,OACEM,EAACC,EAAoB,CACnBC,KAAK,KACLC,MAAOC,EAAqB,IAAIC,SAChCC,QAASN,EAACO,EAAqB,CAACb,OAAQA,IACxCc,oBAAqBR,EAACS,EAAwB,CAACd,KAAMA,KAAUE,aAE/DG,EAACU,MAAmBb,KAG1B"}
@@ -1,4 +1 @@
1
- import { type TabProps } from "@studiocubics/components";
2
- export declare function RolePermissionsPage({ securityLinks, }: {
3
- securityLinks: TabProps[];
4
- }): import("react/jsx-runtime").JSX.Element;
1
+ export declare function RolePermissionsPage(): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import{PageLayoutPagination as o}from"@studiocubics/components";import{RoleListCard as t}from"./RoleListCard.js";import{RBAC_CONFIG as i}from"../../../clerk/rbacConfig.js";function e({securityLinks:e}){return r(o,{size:"sm",title:e[1]?.children,children:Object.keys(i).map(o=>{const e=i[o];return r(t,{role:o,rbacConfig:e},o)})})}export{e as RolePermissionsPage};
1
+ import{jsx as r}from"react/jsx-runtime";import{PageLayoutPagination as o}from"@studiocubics/components";import{RoleListCard as t}from"./RoleListCard.js";import{RBAC_CONFIG as e}from"../../../clerk/rbacConfig.js";import{defaultSecurityLinks as i}from"../../../constants/defaults.js";function s(){return r(o,{size:"sm",title:i[1].children,children:Object.keys(e).map(o=>{const i=e[o];return r(t,{role:o,rbacConfig:i},o)})})}export{s as RolePermissionsPage};
2
2
  //# sourceMappingURL=RolePermissionsPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RolePermissionsPage.js","sources":["../../../../../src/client/ui/System/Permissions/RolePermissionsPage.tsx"],"sourcesContent":["import { PageLayoutPagination, type TabProps } from \"@studiocubics/components\";\nimport { RoleListCard } from \"./RoleListCard\";\nimport { RBAC_CONFIG } from \"../../../clerk/rbacConfig\";\n\nexport function RolePermissionsPage({\n securityLinks,\n}: {\n securityLinks: TabProps[];\n}) {\n return (\n <PageLayoutPagination size=\"sm\" title={securityLinks[1]?.children}>\n {(Object.keys(RBAC_CONFIG) as (keyof typeof RBAC_CONFIG)[]).map((k) => {\n const item = RBAC_CONFIG[k];\n return <RoleListCard key={k} role={k} rbacConfig={item} />;\n })}\n </PageLayoutPagination>\n );\n}\n"],"names":["RolePermissionsPage","securityLinks","_jsx","PageLayoutPagination","size","title","children","Object","keys","RBAC_CONFIG","map","k","item","RoleListCard","role","rbacConfig"],"mappings":"oNAIM,SAAUA,GAAoBC,cAClCA,IAIA,OACEC,EAACC,EAAoB,CAACC,KAAK,KAAKC,MAAOJ,EAAc,IAAIK,SAAQA,SAC7DC,OAAOC,KAAKC,GAA8CC,IAAKC,IAC/D,MAAMC,EAAOH,EAAYE,GACzB,OAAOT,EAACW,EAAY,CAASC,KAAMH,EAAGI,WAAYH,GAAxBD,MAIlC"}
1
+ {"version":3,"file":"RolePermissionsPage.js","sources":["../../../../../src/client/ui/System/Permissions/RolePermissionsPage.tsx"],"sourcesContent":["import { PageLayoutPagination } from \"@studiocubics/components\";\nimport { RoleListCard } from \"./RoleListCard\";\nimport { RBAC_CONFIG } from \"../../../clerk/rbacConfig\";\nimport { defaultSecurityLinks } from \"../../../constants/defaults\";\n\nexport function RolePermissionsPage() {\n return (\n <PageLayoutPagination size=\"sm\" title={defaultSecurityLinks[1].children}>\n {(Object.keys(RBAC_CONFIG) as (keyof typeof RBAC_CONFIG)[]).map((k) => {\n const item = RBAC_CONFIG[k];\n return <RoleListCard key={k} role={k} rbacConfig={item} />;\n })}\n </PageLayoutPagination>\n );\n}\n"],"names":["RolePermissionsPage","_jsx","PageLayoutPagination","size","title","defaultSecurityLinks","children","Object","keys","RBAC_CONFIG","map","k","item","RoleListCard","role","rbacConfig"],"mappings":"mSAKgBA,IACd,OACEC,EAACC,EAAoB,CAACC,KAAK,KAAKC,MAAOC,EAAqB,GAAGC,SAAQA,SACnEC,OAAOC,KAAKC,GAA8CC,IAAKC,IAC/D,MAAMC,EAAOH,EAAYE,GACzB,OAAOV,EAACY,EAAY,CAASC,KAAMH,EAAGI,WAAYH,GAAxBD,MAIlC"}
@@ -0,0 +1,6 @@
1
+ import type { Session } from "@clerk/nextjs/server";
2
+ import { type ButtonProps } from "@studiocubics/components";
3
+ export declare function SessionRevokeButton(props: ButtonProps & {
4
+ id: Session["id"];
5
+ userId: Session["userId"];
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ "use client";import{jsxs as r,Fragment as e,jsx as o}from"react/jsx-runtime";import{Button as i,Dialog as n,ConfirmationForm as s,CopyableText as t,InputErrors as c}from"@studiocubics/components";import{useDisclosure as l}from"@studiocubics/hooks";import{LogOut as d}from"lucide-react";import{useActionState as m}from"react";import{sessionDeleteAction as u}from"../../../../server/clerk/actions/sessions.js";import{initialiseForm as a}from"@studiocubics/utils";function h(h){const{userId:p,id:f,...b}=h,{open:g,handleOpen:v,handleStrictClose:w,handleClose:C}=l(),[k,y,S]=m(u.bind(null,f),a());return r(e,{children:[o(i,{...b,color:"error",square:!0,onClick:v,children:o(d,{})}),o(n,{open:g,onClose:w,children:r(s,{formTitle:"Delete System User",variant:"danger",onCancel:C,action:y,disabled:S,children:["Are you sure you want to revoke this session? User with id:",o("br",{}),o(t,{children:p}),o("br",{}),"will have to log in again in this device.",!k.success&&k.error&&o(c,{error:k.error??"Something went wrong"})]})})]})}export{h as SessionRevokeButton};
2
+ //# sourceMappingURL=SessionActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionActions.js","sources":["../../../../../src/client/ui/System/Sessions/SessionActions.tsx"],"sourcesContent":["\"use client\";\n\nimport type { Session } from \"@clerk/nextjs/server\";\nimport {\n Button,\n ConfirmationForm,\n CopyableText,\n Dialog,\n InputErrors,\n type ButtonProps,\n} from \"@studiocubics/components\";\nimport { useDisclosure } from \"@studiocubics/hooks\";\nimport { LogOut } from \"lucide-react\";\nimport { useActionState } from \"react\";\nimport { sessionDeleteAction } from \"../../../../server/clerk/actions/sessions\";\nimport { initialiseForm } from \"@studiocubics/utils\";\n\nexport function SessionRevokeButton(\n props: ButtonProps & { id: Session[\"id\"]; userId: Session[\"userId\"] },\n) {\n const { userId, id, ...rest } = props;\n const { open, handleOpen, handleStrictClose, handleClose } = useDisclosure();\n\n const [state, action, pending] = useActionState(\n sessionDeleteAction.bind(null, id),\n initialiseForm(),\n );\n\n return (\n <>\n <Button {...rest} color=\"error\" square onClick={handleOpen}>\n <LogOut />\n </Button>\n <Dialog open={open} onClose={handleStrictClose}>\n <ConfirmationForm\n formTitle=\"Delete System User\"\n variant=\"danger\"\n onCancel={handleClose}\n action={action}\n disabled={pending}\n >\n Are you sure you want to revoke this session? User with id:\n <br />\n <CopyableText>{userId}</CopyableText>\n <br />\n will have to log in again in this device.\n {!state.success && state.error && (\n <InputErrors error={state.error ?? \"Something went wrong\"} />\n )}\n </ConfirmationForm>\n </Dialog>\n </>\n );\n}\n"],"names":["SessionRevokeButton","props","userId","id","rest","open","handleOpen","handleStrictClose","handleClose","useDisclosure","state","action","pending","useActionState","sessionDeleteAction","bind","initialiseForm","_jsxs","_jsx","Button","color","square","onClick","LogOut","Dialog","onClose","children","ConfirmationForm","formTitle","variant","onCancel","disabled","CopyableText","success","error","InputErrors"],"mappings":"6cAiBM,SAAUA,EACdC,GAEA,MAAMC,OAAEA,EAAMC,GAAEA,KAAOC,GAASH,GAC1BI,KAAEA,EAAIC,WAAEA,EAAUC,kBAAEA,EAAiBC,YAAEA,GAAgBC,KAEtDC,EAAOC,EAAQC,GAAWC,EAC/BC,EAAoBC,KAAK,KAAMZ,GAC/Ba,KAGF,OACEC,eACEC,EAACC,MAAWf,EAAMgB,MAAM,QAAQC,QAAM,EAACC,QAAShB,WAC9CY,EAACK,QAEHL,EAACM,EAAM,CAACnB,KAAMA,EAAMoB,QAASlB,EAAiBmB,SAC5CT,EAACU,EAAgB,CACfC,UAAU,qBACVC,QAAQ,SACRC,SAAUtB,EACVG,OAAQA,EACRoB,SAAUnB,0EAGVM,EAAA,KAAA,CAAA,GACAA,EAACc,EAAY,CAAAN,SAAExB,IACfgB,WAAM,6CAEJR,EAAMuB,SAAWvB,EAAMwB,OACvBhB,EAACiB,EAAW,CAACD,MAAOxB,EAAMwB,OAAS,gCAM/C"}
@@ -0,0 +1 @@
1
+ export declare function SessionList(params: ClerkUserSessionListParams): Promise<import("react/jsx-runtime").JSX.Element | import("react/jsx-runtime").JSX.Element[]>;
@@ -0,0 +1,2 @@
1
+ import{jsx as s}from"react/jsx-runtime";import{sessionListReadAction as o}from"../../../../server/clerk/actions/sessions.js";import{SessionListCard as i}from"./SessionListCard/SessionListCard.js";import{VoidText as r}from"@studiocubics/components";async function t(t){const n=await o(t);return n.data.length?n.data.map(o=>s(i,{session:o},o.id)):s(r,{children:"No Sessions Found!"})}export{t as SessionList};
2
+ //# sourceMappingURL=SessionList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionList.js","sources":["../../../../../src/client/ui/System/Sessions/SessionList.tsx"],"sourcesContent":["import { sessionListReadAction } from \"../../../../server/clerk/actions/sessions\";\nimport { SessionListCard } from \"./SessionListCard/SessionListCard\";\nimport { VoidText } from \"@studiocubics/components\";\n\nexport async function SessionList(params: ClerkUserSessionListParams) {\n const sessionList = await sessionListReadAction(params);\n if (!sessionList.data.length) return <VoidText>No Sessions Found!</VoidText>;\n\n return sessionList.data.map((d) => (\n <SessionListCard key={d.id} session={d} />\n ));\n}\n"],"names":["async","SessionList","params","sessionList","sessionListReadAction","data","length","map","d","_jsx","SessionListCard","session","id","VoidText","children"],"mappings":"wPAIOA,eAAeC,EAAYC,GAChC,MAAMC,QAAoBC,EAAsBF,GAChD,OAAKC,EAAYE,KAAKC,OAEfH,EAAYE,KAAKE,IAAKC,GAC3BC,EAACC,EAAe,CAAYC,QAASH,GAAfA,EAAEI,KAHWH,EAACI,EAAQ,CAAAC,SAAA,sBAKhD"}
@@ -0,0 +1,6 @@
1
+ import type { Session } from "@clerk/nextjs/server";
2
+ export declare const errorSessions: string[];
3
+ export declare const primarySessions: string[];
4
+ export declare function SessionListCard({ session }: {
5
+ session: Session;
6
+ }): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as s}from"react/jsx-runtime";import{CollectionItemCard as i,CollectionItemCardActions as t,LabeledValue as r,Chip as o}from"@studiocubics/components";import c from"./SessionListCard.module.css.js";import{cn as n,relativeTime as a,toCapitalised as l}from"@studiocubics/utils";import{TabletSmartphone as d,Computer as m}from"lucide-react";import{SessionRevokeButton as p}from"../SessionActions.js";import"../../../../../server/clerk/actions/invitations.js";import"../../../../../server/clerk/actions/systemUsers.js";import{auth as u}from"../../../../../server/clerk/auth.js";import"@clerk/nextjs/server";import"../../../../../server/clerk/schemas/invitation.js";const v=["ended","revoked","abandoned","expired"],h=["active"];async function b({session:b}){const{latestActivity:f}=b,y=(await u()).sessionId==b.id,j=v.includes(b.status)?"error":h.includes(b.status)?"primary":void 0,k=[{label:"Revoke Session",actionType:"node",children:!y&&"active"==b.status&&e(p,{userId:b.userId,id:b.id})}];return e(i,{thumbnail:e(f?.isMobile?d:m,{fontSize:32}),chip:e(o,{color:j,size:"sm",children:l(b.status)}),title:s("span",{className:c.title,children:[f?.deviceType," ",s("p",{children:[f?.browserName," ",f?.browserVersion]}),y&&e(o,{size:"sm",children:"This Device"})]}),description:s("span",{className:c.desc,children:[e(r,{label:"Location",children:`${f?.ipAddress} (${f?.country}${f?.city?`, ${f.city}`:""})`}),e(r,{label:"Last Active",children:a(b.lastActiveAt)})]}),footer:e(t,{actions:k}),slotProps:{thumbnail:{className:n(c.thumb,j?c[j]:"")}}})}export{b as SessionListCard,v as errorSessions,h as primarySessions};
2
+ //# sourceMappingURL=SessionListCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionListCard.js","sources":["../../../../../../src/client/ui/System/Sessions/SessionListCard/SessionListCard.tsx"],"sourcesContent":["import type { Session } from \"@clerk/nextjs/server\";\nimport {\n Chip,\n CollectionItemCard,\n CollectionItemCardActions,\n LabeledValue,\n type DocumentAction,\n} from \"@studiocubics/components\";\nimport styles from \"./SessionListCard.module.css\";\nimport { cn, relativeTime, toCapitalised } from \"@studiocubics/utils\";\nimport { Computer, TabletSmartphone } from \"lucide-react\";\nimport { SessionRevokeButton } from \"../SessionActions\";\nimport { auth } from \"../../../../../server\";\n\nexport const errorSessions = [\"ended\", \"revoked\", \"abandoned\", \"expired\"];\nexport const primarySessions = [\"active\"];\nexport async function SessionListCard({ session }: { session: Session }) {\n const { latestActivity } = session;\n const currentSession = await auth();\n const isCurrentSessionCard = currentSession.sessionId == session.id;\n const chipColor = errorSessions.includes(session.status)\n ? \"error\"\n : primarySessions.includes(session.status)\n ? \"primary\"\n : undefined;\n\n const actions: DocumentAction[] = [\n {\n label: \"Revoke Session\",\n actionType: \"node\",\n children: !isCurrentSessionCard && session.status == \"active\" && (\n <SessionRevokeButton userId={session.userId} id={session.id} />\n ),\n },\n ];\n\n return (\n <CollectionItemCard\n thumbnail={\n latestActivity?.isMobile ? (\n <TabletSmartphone fontSize={32} />\n ) : (\n <Computer fontSize={32} />\n )\n }\n chip={\n <Chip color={chipColor} size=\"sm\">\n {toCapitalised(session.status)}\n </Chip>\n }\n title={\n <span className={styles.title}>\n {latestActivity?.deviceType}{\" \"}\n <p>\n {latestActivity?.browserName} {latestActivity?.browserVersion}\n </p>\n {isCurrentSessionCard && <Chip size=\"sm\">This Device</Chip>}\n </span>\n }\n description={\n <span className={styles.desc}>\n <LabeledValue\n label={\"Location\"}\n >{`${latestActivity?.ipAddress} (${latestActivity?.country}${\n latestActivity?.city ? `, ${latestActivity.city}` : \"\"\n })`}</LabeledValue>\n <LabeledValue label={\"Last Active\"}>\n {relativeTime(session.lastActiveAt)}\n </LabeledValue>\n </span>\n }\n footer={<CollectionItemCardActions actions={actions} />}\n slotProps={{\n thumbnail: {\n className: cn(styles.thumb, chipColor ? styles[chipColor] : \"\"),\n },\n }}\n />\n );\n}\n"],"names":["errorSessions","primarySessions","async","SessionListCard","session","latestActivity","isCurrentSessionCard","auth","sessionId","id","chipColor","includes","status","undefined","actions","label","actionType","children","_jsx","SessionRevokeButton","userId","CollectionItemCard","thumbnail","isMobile","TabletSmartphone","Computer","fontSize","chip","Chip","color","size","toCapitalised","title","_jsxs","className","styles","deviceType","browserName","browserVersion","description","desc","LabeledValue","ipAddress","country","city","relativeTime","lastActiveAt","footer","CollectionItemCardActions","slotProps","cn","thumb"],"mappings":"yqBAcO,MAAMA,EAAgB,CAAC,QAAS,UAAW,YAAa,WAClDC,EAAkB,CAAC,UACzBC,eAAeC,GAAgBC,QAAEA,IACtC,MAAMC,eAAEA,GAAmBD,EAErBE,SADuBC,KACeC,WAAaJ,EAAQK,GAC3DC,EAAYV,EAAcW,SAASP,EAAQQ,QAC7C,QACAX,EAAgBU,SAASP,EAAQQ,QAC/B,eACAC,EAEAC,EAA4B,CAChC,CACEC,MAAO,iBACPC,WAAY,OACZC,UAAWX,GAA0C,UAAlBF,EAAQQ,QACzCM,EAACC,GAAoBC,OAAQhB,EAAQgB,OAAQX,GAAIL,EAAQK,OAK/D,OACES,EAACG,EAAkB,CACjBC,UAEIJ,EADFb,GAAgBkB,SACbC,EAEAC,GAFiBC,SAAU,KAKhCC,KACET,EAACU,EAAI,CAACC,MAAOnB,EAAWoB,KAAK,cAC1BC,EAAc3B,EAAQQ,UAG3BoB,MACEC,EAAA,OAAA,CAAMC,UAAWC,EAAOH,MAAKf,SAAA,CAC1BZ,GAAgB+B,WAAY,IAC7BH,EAAA,IAAA,CAAAhB,SAAA,CACGZ,GAAgBgC,gBAAchC,GAAgBiC,kBAEhDhC,GAAwBY,EAACU,EAAI,CAACE,KAAK,KAAIb,SAAA,mBAG5CsB,YACEN,EAAA,OAAA,CAAMC,UAAWC,EAAOK,KAAIvB,SAAA,CAC1BC,EAACuB,GACC1B,MAAO,WAAUE,SACjB,GAAGZ,GAAgBqC,cAAcrC,GAAgBsC,UACjDtC,GAAgBuC,KAAO,KAAKvC,EAAeuC,OAAS,QAEtD1B,EAACuB,GAAa1B,MAAO,cAAaE,SAC/B4B,EAAazC,EAAQ0C,mBAI5BC,OAAQ7B,EAAC8B,GAA0BlC,QAASA,IAC5CmC,UAAW,CACT3B,UAAW,CACTY,UAAWgB,EAAGf,EAAOgB,MAAOzC,EAAYyB,EAAOzB,GAAa,OAKtE"}
@@ -0,0 +1,2 @@
1
+ var r={title:"SessionListCard-module_title__rvGVQ",desc:"SessionListCard-module_desc__26-hF",thumb:"SessionListCard-module_thumb__mfBlO",error:"SessionListCard-module_error__rdAIR",primary:"SessionListCard-module_primary__JUrYc"};export{r as default};
2
+ //# sourceMappingURL=SessionListCard.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionListCard.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare function SessionListPagination({ page, ...params }: {
2
+ page: number;
3
+ limit?: number;
4
+ } & ClerkUserSessionListParams): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,2 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{NextSSRPagination as o}from"@studiocubics/next";import{sessionListReadAction as i}from"../../../../server/clerk/actions/sessions.js";import{SESSIONS_PAGE_LIMIT as r}from"../../../constants/pageLimits.js";async function s({page:s,...e}){const m=await i(e);return t(o,{page:s,limit:e.limit??r,total:m.totalCount})}export{s as SessionListPagination};
2
+ //# sourceMappingURL=SessionListPagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionListPagination.js","sources":["../../../../../src/client/ui/System/Sessions/SessionListPagination.tsx"],"sourcesContent":["import { NextSSRPagination } from \"@studiocubics/next\";\nimport { sessionListReadAction } from \"../../../../server/clerk/actions/sessions\";\nimport { SESSIONS_PAGE_LIMIT } from \"../../../constants/pageLimits\";\n\nexport async function SessionListPagination({\n page,\n ...params\n}: {\n page: number;\n limit?: number;\n} & ClerkUserSessionListParams) {\n const systemUsersList = await sessionListReadAction(params);\n return (\n <NextSSRPagination\n page={page}\n limit={params.limit ?? SESSIONS_PAGE_LIMIT}\n total={systemUsersList.totalCount}\n />\n );\n}\n"],"names":["async","SessionListPagination","page","params","systemUsersList","sessionListReadAction","_jsx","NextSSRPagination","limit","SESSIONS_PAGE_LIMIT","total","totalCount"],"mappings":"2PAIOA,eAAeC,GAAsBC,KAC1CA,KACGC,IAKH,MAAMC,QAAwBC,EAAsBF,GACpD,OACEG,EAACC,EAAiB,CAChBL,KAAMA,EACNM,MAAOL,EAAOK,OAASC,EACvBC,MAAON,EAAgBO,YAG7B"}
@@ -0,0 +1,4 @@
1
+ import type { User } from "@clerk/nextjs/server";
2
+ export declare function SessionsActive({ userId }: {
3
+ userId: User["id"];
4
+ }): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,2 @@
1
+ import{jsxs as s,jsx as o}from"react/jsx-runtime";import{sessionListReadAction as i}from"../../../../../server/clerk/actions/sessions.js";import{SessionListCard as t}from"../SessionListCard/SessionListCard.js";import r from"./SessionsActive.module.css.js";import{VoidText as e}from"@studiocubics/components";async function n({userId:n}){const a=await i({userId:n,status:"active"});return s("div",{className:r.root,children:[!a.data.length&&o(e,{children:"No Active Sessions"}),a.data.map(s=>o(t,{session:s},s.id))]})}export{n as SessionsActive};
2
+ //# sourceMappingURL=SessionsActive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionsActive.js","sources":["../../../../../../src/client/ui/System/Sessions/SessionsActive/SessionsActive.tsx"],"sourcesContent":["import type { User } from \"@clerk/nextjs/server\";\nimport { sessionListReadAction } from \"../../../../../server/clerk/actions/sessions\";\nimport { SessionListCard } from \"../SessionListCard/SessionListCard\";\nimport styles from \"./SessionsActive.module.css\";\nimport { VoidText } from \"@studiocubics/components\";\n\nexport async function SessionsActive({ userId }: { userId: User[\"id\"] }) {\n const activeSessions = await sessionListReadAction({\n userId,\n status: \"active\",\n });\n return (\n <div className={styles.root}>\n {!activeSessions.data.length && <VoidText>No Active Sessions</VoidText>}\n {activeSessions.data.map((d) => (\n <SessionListCard key={d.id} session={d} />\n ))}\n </div>\n );\n}\n"],"names":["async","SessionsActive","userId","activeSessions","sessionListReadAction","status","_jsxs","className","styles","root","data","length","_jsx","VoidText","children","map","d","SessionListCard","session","id"],"mappings":"oTAMOA,eAAeC,GAAeC,OAAEA,IACrC,MAAMC,QAAuBC,EAAsB,CACjDF,SACAG,OAAQ,WAEV,OACEC,SAAKC,UAAWC,EAAOC,gBACnBN,EAAeO,KAAKC,QAAUC,EAACC,EAAQ,CAAAC,SAAA,uBACxCX,EAAeO,KAAKK,IAAKC,GACxBJ,EAACK,EAAe,CAAYC,QAASF,GAAfA,EAAEG,OAIhC"}
@@ -0,0 +1,2 @@
1
+ var o={root:"SessionsActive-module_root__oCUdG"};export{o as default};
2
+ //# sourceMappingURL=SessionsActive.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionsActive.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export declare function SessionsListPage({ params: pageParams, searchParams, }: PageProps<"/dashboard/security/systemUsers/[userId]">): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,2 @@
1
+ import{jsx as s,Fragment as e,jsxs as t}from"react/jsx-runtime";import{PageLayoutPagination as r,Breadcrumbs as i}from"@studiocubics/components";import n from"next/link";import{systemUserReadAction as o}from"../../../../server/clerk/actions/systemUsers.js";import{SessionListPagination as a}from"./SessionListPagination.js";import{SESSIONS_PAGE_LIMIT as m}from"../../../constants/pageLimits.js";import{SessionList as c}from"./SessionList.js";async function d({params:d,searchParams:l}){const h=(await d).userId,p=await l,u=Number(p.page??1),f=(u-1)*m,y={clientId:p.clientId,userId:h,status:p.status,limit:m,offset:f},g=await o(h);return s(e,{children:s(r,{size:"sm",title:t(i,{defaultActive:2,children:[s("h4",{children:s(n,{href:"/dashboard/security/systemUsers",children:"System Users"})}),s("h4",{children:t(n,{href:`/dashboard/security/systemUsers/${h}`,children:[g.fullName,"'s Account"]})}),s("h4",{children:"Sessions"})]}),paginationComponent:s(a,{page:u,...y}),children:s(c,{...y})})})}export{d as SessionsListPage};
2
+ //# sourceMappingURL=SessionsListPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionsListPage.js","sources":["../../../../../src/client/ui/System/Sessions/SessionsListPage.tsx"],"sourcesContent":["import { Breadcrumbs, PageLayoutPagination } from \"@studiocubics/components\";\nimport Link from \"next/link\";\nimport { systemUserReadAction } from \"../../../../server/clerk/actions/systemUsers\";\nimport { SessionListPagination } from \"./SessionListPagination\";\nimport { SESSIONS_PAGE_LIMIT as limit } from \"../../../constants/pageLimits\";\nimport { SessionList } from \"./SessionList\";\n\nexport async function SessionsListPage({\n params: pageParams,\n searchParams,\n}: PageProps<\"/dashboard/security/systemUsers/[userId]\">) {\n const userId = (await pageParams).userId;\n const sp: ClerkUserSessionListParams & { page?: number } = await searchParams;\n const page = Number(sp.page ?? 1);\n const offset = (page - 1) * limit;\n const clientId = sp.clientId;\n const status = sp.status as ClerkUserSessionListParams[\"status\"];\n const params: ClerkUserSessionListParams = {\n clientId,\n userId,\n status,\n limit,\n offset,\n };\n const user = await systemUserReadAction(userId);\n return (\n <>\n <PageLayoutPagination\n size=\"sm\"\n title={\n <Breadcrumbs defaultActive={2}>\n <h4>\n <Link href={\"/dashboard/security/systemUsers\"}>System Users</Link>\n </h4>\n <h4>\n <Link href={`/dashboard/security/systemUsers/${userId}`}>\n {user.fullName}&apos;s Account\n </Link>\n </h4>\n <h4>Sessions</h4>\n </Breadcrumbs>\n }\n paginationComponent={<SessionListPagination page={page} {...params} />}\n >\n <SessionList {...params} />\n </PageLayoutPagination>\n </>\n );\n}\n"],"names":["async","SessionsListPage","params","pageParams","searchParams","userId","sp","page","Number","offset","limit","clientId","status","user","systemUserReadAction","_jsx","_Fragment","children","PageLayoutPagination","size","title","_jsxs","Breadcrumbs","defaultActive","Link","href","fullName","paginationComponent","SessionListPagination","SessionList"],"mappings":"0bAOOA,eAAeC,GACpBC,OAAQC,EAAUC,aAClBA,IAEA,MAAMC,SAAgBF,GAAYE,OAC5BC,QAA2DF,EAC3DG,EAAOC,OAAOF,EAAGC,MAAQ,GACzBE,GAAUF,EAAO,GAAKG,EAGtBR,EAAqC,CACzCS,SAHeL,EAAGK,SAIlBN,SACAO,OAJaN,EAAGM,aAKhBF,EACAD,UAEII,QAAaC,EAAqBT,GACxC,OACEU,EAAAC,EAAA,CAAAC,SACEF,EAACG,EAAoB,CACnBC,KAAK,KACLC,MACEC,EAACC,EAAW,CAACC,cAAe,EAACN,SAAA,CAC3BF,EAAA,KAAA,CAAAE,SACEF,EAACS,GAAKC,KAAM,kCAAiCR,SAAA,mBAE/CF,EAAA,KAAA,CAAAE,SACEI,EAACG,EAAI,CAACC,KAAM,mCAAmCpB,IAAQY,SAAA,CACpDJ,EAAKa,SAAQ,kBAGlBX,EAAA,KAAA,CAAAE,SAAA,gBAGJU,oBAAqBZ,EAACa,EAAqB,CAACrB,KAAMA,KAAUL,IAAUe,SAEtEF,EAACc,EAAW,IAAK3B,OAIzB"}
@@ -0,0 +1,6 @@
1
+ export * from "./SessionActions";
2
+ export * from "./SessionList";
3
+ export * from "./SessionListCard/SessionListCard";
4
+ export * from "./SessionListPagination";
5
+ export * from "./SessionsActive/SessionsActive";
6
+ export * from "./SessionsListPage";
@@ -1,6 +1,11 @@
1
1
  import type { User } from "@clerk/nextjs/server";
2
2
  import { type ListItemProps } from "@studiocubics/components";
3
- export declare function SystemUserDeleteListItem(props: ListItemProps & {
4
- uid: User["id"];
5
- fullName?: User["fullName"];
3
+ type SystemUserActionProps = ListItemProps & {
4
+ userId: User["id"];
5
+ fullName: User["fullName"];
6
+ };
7
+ export declare function SystemUserDeleteListItem(props: SystemUserActionProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function SystemUserBanListItem(props: SystemUserActionProps & {
9
+ banned: User["banned"];
6
10
  }): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -1,2 +1,2 @@
1
- "use client";import{jsxs as e,Fragment as o,jsx as r}from"react/jsx-runtime";import{useDisclosure as t}from"@studiocubics/hooks";import{ListItem as n,Dialog as i,ConfirmationForm as l,TextInput as c}from"@studiocubics/components";import{Trash as s}from"lucide-react";function d(d){const{uid:a,fullName:u,...m}=d,{open:h,handleOpen:f,handleStrictClose:p,handleClose:b}=t();return e(o,{children:[r(n,{...m,color:"error",startIcon:r(s,{}),onClick:f,children:"Delete User"}),r(i,{open:h,onClose:p,children:e(l,{formTitle:"Delete System User",variant:"danger",onCancel:b,children:["Are you sure you want to delete ",u?`${u}'s`:"this"," ","system account?",r("br",{}),"All information will be deleted, this action is irreversible and cannot be undone.",r(c,{fullWidth:!0})]})})]})}export{d as SystemUserDeleteListItem};
1
+ "use client";import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useDisclosure as n}from"@studiocubics/hooks";import{ListItem as t}from"@studiocubics/components";import{Trash as s,OctagonX as i,DoorOpen as l}from"lucide-react";import{SystemUserDeleteDialog as c}from"./SystemUserDeleteDialog.js";import{SystemUserBanUnbanDialog as m}from"./SystemUserBanUnbanDialog.js";function u(i){const{userId:l,fullName:m,...u}=i,a=n();return e(r,{children:[o(t,{...u,color:"error",startIcon:o(s,{}),onClick:a.handleOpen,children:"Delete User"}),o(c,{...a,fullName:m,userId:l})]})}function a(s){const{userId:c,fullName:u,banned:a,...d}=s,f=n();return e(r,{children:[o(t,{...d,color:a?void 0:"error",startIcon:o(a?l:i,{}),onClick:f.handleOpen,children:a?"Unban User":"Ban User"}),o(m,{...f,banned:a,fullName:u,userId:c})]})}export{a as SystemUserBanListItem,u as SystemUserDeleteListItem};
2
2
  //# sourceMappingURL=SystemUserActions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SystemUserActions.js","sources":["../../../../../src/client/ui/System/SystemUser/SystemUserActions.tsx"],"sourcesContent":["\"use client\";\n\nimport type { User } from \"@clerk/nextjs/server\";\nimport { useDisclosure } from \"@studiocubics/hooks\";\nimport {\n ConfirmationForm,\n Dialog,\n ListItem,\n type ListItemProps,\n TextInput,\n} from \"@studiocubics/components\";\nimport { Trash } from \"lucide-react\";\n\nexport function SystemUserDeleteListItem(\n props: ListItemProps & { uid: User[\"id\"]; fullName?: User[\"fullName\"] },\n) {\n const { uid, fullName, ...rest } = props;\n const { open, handleOpen, handleStrictClose, handleClose } = useDisclosure();\n return (\n <>\n <ListItem\n {...rest}\n color=\"error\"\n startIcon={<Trash />}\n onClick={handleOpen}\n >\n Delete User\n </ListItem>\n <Dialog open={open} onClose={handleStrictClose}>\n <ConfirmationForm\n formTitle=\"Delete System User\"\n variant=\"danger\"\n onCancel={handleClose}\n >\n Are you sure you want to delete {fullName ? `${fullName}'s` : \"this\"}{\" \"}\n system account?\n <br />\n All information will be deleted, this action is irreversible and\n cannot be undone.\n <TextInput fullWidth />\n </ConfirmationForm>\n </Dialog>\n </>\n );\n}\n"],"names":["SystemUserDeleteListItem","props","uid","fullName","rest","open","handleOpen","handleStrictClose","handleClose","useDisclosure","_jsxs","_Fragment","children","_jsx","ListItem","color","startIcon","Trash","onClick","Dialog","onClose","ConfirmationForm","formTitle","variant","onCancel","TextInput","fullWidth"],"mappings":"2QAaM,SAAUA,EACdC,GAEA,MAAMC,IAAEA,EAAGC,SAAEA,KAAaC,GAASH,GAC7BI,KAAEA,EAAIC,WAAEA,EAAUC,kBAAEA,EAAiBC,YAAEA,GAAgBC,IAC7D,OACEC,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,MACKV,EACJW,MAAM,QACNC,UAAWH,EAACI,EAAK,CAAA,GACjBC,QAASZ,EAAUM,SAAA,gBAIrBC,EAACM,EAAM,CAACd,KAAMA,EAAMe,QAASb,EAAiBK,SAC5CF,EAACW,EAAgB,CACfC,UAAU,qBACVC,QAAQ,SACRC,SAAUhB,+CAEuBL,EAAW,GAAGA,MAAe,OAAQ,IAAG,kBAEzEU,WAAM,qFAGNA,EAACY,EAAS,CAACC,WAAS,WAK9B"}
1
+ {"version":3,"file":"SystemUserActions.js","sources":["../../../../../src/client/ui/System/SystemUser/SystemUserActions.tsx"],"sourcesContent":["\"use client\";\n\nimport type { User } from \"@clerk/nextjs/server\";\nimport { useDisclosure } from \"@studiocubics/hooks\";\nimport { ListItem, type ListItemProps } from \"@studiocubics/components\";\nimport { DoorOpen, OctagonX, Trash } from \"lucide-react\";\nimport { SystemUserDeleteDialog } from \"./SystemUserDeleteDialog\";\nimport { SystemUserBanUnbanDialog } from \"./SystemUserBanUnbanDialog\";\n\ntype SystemUserActionProps = ListItemProps & {\n userId: User[\"id\"];\n fullName: User[\"fullName\"];\n};\n\nexport function SystemUserDeleteListItem(props: SystemUserActionProps) {\n const { userId, fullName, ...rest } = props;\n const disclosure = useDisclosure();\n return (\n <>\n <ListItem\n {...rest}\n color=\"error\"\n startIcon={<Trash />}\n onClick={disclosure.handleOpen}\n >\n Delete User\n </ListItem>\n <SystemUserDeleteDialog\n {...disclosure}\n fullName={fullName}\n userId={userId}\n />\n </>\n );\n}\n\nexport function SystemUserBanListItem(\n props: SystemUserActionProps & { banned: User[\"banned\"] },\n) {\n const { userId, fullName, banned, ...rest } = props;\n const disclosure = useDisclosure();\n return (\n <>\n <ListItem\n {...rest}\n color={!banned ? \"error\" : undefined}\n startIcon={!banned ? <OctagonX /> : <DoorOpen />}\n onClick={disclosure.handleOpen}\n >\n {banned ? \"Unban User\" : \"Ban User\"}\n </ListItem>\n <SystemUserBanUnbanDialog\n {...disclosure}\n banned={banned}\n fullName={fullName}\n userId={userId}\n />\n </>\n );\n}\n"],"names":["SystemUserDeleteListItem","props","userId","fullName","rest","disclosure","useDisclosure","_jsxs","_Fragment","children","_jsx","ListItem","color","startIcon","Trash","onClick","handleOpen","SystemUserDeleteDialog","SystemUserBanListItem","banned","undefined","DoorOpen","OctagonX","SystemUserBanUnbanDialog"],"mappings":"oYAcM,SAAUA,EAAyBC,GACvC,MAAMC,OAAEA,EAAMC,SAAEA,KAAaC,GAASH,EAChCI,EAAaC,IACnB,OACEC,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,EAAQ,IACHP,EACJQ,MAAM,QACNC,UAAWH,EAACI,EAAK,CAAA,GACjBC,QAASV,EAAWW,WAAUP,SAAA,gBAIhCC,EAACO,EAAsB,IACjBZ,EACJF,SAAUA,EACVD,OAAQA,MAIhB,CAEM,SAAUgB,EACdjB,GAEA,MAAMC,OAAEA,EAAMC,SAAEA,EAAQgB,OAAEA,KAAWf,GAASH,EACxCI,EAAaC,IACnB,OACEC,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,MACKP,EACJQ,MAAQO,OAAmBC,EAAV,QACjBP,UAAoCH,EAAxBS,EAAyBE,EAAfC,EAAuB,CAAA,GAC7CP,QAASV,EAAWW,oBAEnBG,EAAS,aAAe,aAE3BT,EAACa,EAAwB,IACnBlB,EACJc,OAAQA,EACRhB,SAAUA,EACVD,OAAQA,MAIhB"}
@@ -0,0 +1,8 @@
1
+ import type { User } from "@clerk/nextjs/server";
2
+ import { type DialogProps } from "@studiocubics/components";
3
+ import { type useDisclosure } from "@studiocubics/hooks";
4
+ export declare function SystemUserBanUnbanDialog(props: Omit<DialogProps, "onClose"> & ReturnType<typeof useDisclosure> & {
5
+ fullName: User["fullName"];
6
+ userId: User["id"];
7
+ banned: User["banned"];
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Dialog as n,ConfirmationForm as o,InputErrors as t}from"@studiocubics/components";import{useFormHelpers as s}from"@studiocubics/hooks";import"react";import"../../../../server/clerk/actions/invitations.js";import{systemUserUnbanAction as i,systemUserBanAction as a}from"../../../../server/clerk/actions/systemUsers.js";import"@clerk/nextjs/server";import"../../../../server/clerk/schemas/invitation.js";function c(c){const{open:l,handleOpen:m,handleClose:u,handleStrictClose:d,handleToggle:p,fullName:f,userId:h,banned:v,...b}=c,{loading:g,error:y,setLoading:j,setError:k}=s();return e(n,{...b,open:l,onClose:d,children:r(o,{formTitle:(v?"Unban":"Ban")+" System User",variant:v?"info":"danger",onSubmit:async function(e){e.preventDefault(),j(!0);try{v?await i(h):await a(h),u()}catch(e){e instanceof Error&&k(e.message),console.error(e)}finally{j(!1)}},onCancel:u,disabled:g,children:["Are you sure you want to ",v?"Unban":"Ban"," this account?",e("strong",{children:f}),e(t,{error:y})]})})}export{c as SystemUserBanUnbanDialog};
2
+ //# sourceMappingURL=SystemUserBanUnbanDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SystemUserBanUnbanDialog.js","sources":["../../../../../src/client/ui/System/SystemUser/SystemUserBanUnbanDialog.tsx"],"sourcesContent":["\"use client\";\n\nimport type { User } from \"@clerk/nextjs/server\";\nimport {\n ConfirmationForm,\n Dialog,\n InputErrors,\n type DialogProps,\n} from \"@studiocubics/components\";\nimport { useFormHelpers, type useDisclosure } from \"@studiocubics/hooks\";\nimport { type FormEvent } from \"react\";\nimport { systemUserBanAction, systemUserUnbanAction } from \"../../../../server\";\n\nexport function SystemUserBanUnbanDialog(\n props: Omit<DialogProps, \"onClose\"> &\n ReturnType<typeof useDisclosure> & {\n fullName: User[\"fullName\"];\n userId: User[\"id\"];\n banned: User[\"banned\"];\n },\n) {\n const {\n open,\n handleOpen: _,\n handleClose,\n handleStrictClose,\n handleToggle: __,\n fullName,\n userId,\n banned,\n ...rest\n } = props;\n const { loading, error, setLoading, setError } = useFormHelpers();\n\n async function handleSubmit(e: FormEvent) {\n e.preventDefault();\n setLoading(true);\n try {\n if (banned) await systemUserUnbanAction(userId);\n else await systemUserBanAction(userId);\n handleClose();\n } catch (e) {\n if (e instanceof Error) setError(e.message);\n console.error(e);\n } finally {\n setLoading(false);\n }\n }\n return (\n <Dialog {...rest} open={open} onClose={handleStrictClose}>\n <ConfirmationForm\n formTitle={`${banned ? \"Unban\" : \"Ban\"} System User`}\n variant={!banned ? \"danger\" : \"info\"}\n onSubmit={handleSubmit}\n onCancel={handleClose}\n disabled={loading}\n >\n Are you sure you want to {banned ? \"Unban\" : \"Ban\"} this account?\n <strong>{fullName}</strong>\n <InputErrors error={error as string} />\n </ConfirmationForm>\n </Dialog>\n );\n}\n"],"names":["SystemUserBanUnbanDialog","props","open","handleOpen","_","handleClose","handleStrictClose","handleToggle","__","fullName","userId","banned","rest","loading","error","setLoading","setError","useFormHelpers","_jsx","Dialog","onClose","_jsxs","ConfirmationForm","formTitle","variant","onSubmit","async","e","preventDefault","systemUserUnbanAction","systemUserBanAction","Error","message","console","onCancel","disabled","children","InputErrors"],"mappings":"wdAaM,SAAUA,EACdC,GAOA,MAAMC,KACJA,EACAC,WAAYC,EAACC,YACbA,EAAWC,kBACXA,EACAC,aAAcC,EAAEC,SAChBA,EAAQC,OACRA,EAAMC,OACNA,KACGC,GACDX,GACEY,QAAEA,EAAOC,MAAEA,EAAKC,WAAEA,EAAUC,SAAEA,GAAaC,IAgBjD,OACEC,EAACC,EAAM,IAAKP,EAAMV,KAAMA,EAAMkB,QAASd,WACrCe,EAACC,GACCC,WAAcZ,EAAS,QAAU,OAAtB,eACXa,QAAUb,EAAoB,OAAX,SACnBc,SAnBNC,eAA4BC,GAC1BA,EAAEC,iBACFb,GAAW,GACX,IACMJ,QAAckB,EAAsBnB,SAC7BoB,EAAoBpB,GAC/BL,GACF,CAAE,MAAOsB,GACHA,aAAaI,OAAOf,EAASW,EAAEK,SACnCC,QAAQnB,MAAMa,EAChB,SACEZ,GAAW,EACb,CACF,EAOMmB,SAAU7B,EACV8B,SAAUtB,wCAEgBF,EAAS,QAAU,MAAK,iBAClDO,EAAA,SAAA,CAAAkB,SAAS3B,IACTS,EAACmB,EAAW,CAACvB,MAAOA,QAI5B"}
@@ -0,0 +1,7 @@
1
+ import type { User } from "@clerk/nextjs/server";
2
+ import { type DialogProps } from "@studiocubics/components";
3
+ import { type useDisclosure } from "@studiocubics/hooks";
4
+ export declare function SystemUserDeleteDialog(props: Omit<DialogProps, "onClose"> & ReturnType<typeof useDisclosure> & {
5
+ fullName: User["fullName"];
6
+ userId: User["id"];
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Dialog as o,ConfirmationForm as t,TextInput as n,InputErrors as i}from"@studiocubics/components";import{useFormHelpers as s}from"@studiocubics/hooks";import{useState as l}from"react";import"../../../../server/clerk/actions/invitations.js";import{systemUserDeleteAction as a}from"../../../../server/clerk/actions/systemUsers.js";import"@clerk/nextjs/server";import"../../../../server/clerk/schemas/invitation.js";function c(c){const{open:d,handleOpen:m,handleClose:u,handleStrictClose:f,handleToggle:h,fullName:p,userId:b,...v}=c,[g,y]=l(""),{loading:j,error:k,setLoading:C,setError:w}=s();return e(o,{...v,open:d,onClose:f,children:r(t,{formTitle:"Delete System User",variant:"danger",onSubmit:async function(e){e.preventDefault(),C(!0);try{await a(b)}catch(e){e instanceof Error&&w(e.message),console.error(e)}finally{C(!1)}},onCancel:u,disabled:j,slotProps:{confirmButton:{disabled:j||!(g==p)}},children:["Are you sure you want to delete this account?",e("strong",{children:p}),e("br",{}),"All information will be deleted, this action is irreversible and cannot be undone.",e("br",{}),e(n,{fullWidth:!0,required:!0,label:"Enter the name of the user before deleting",onChange:e=>y(e.target.value),value:g}),e(i,{error:k})]})})}export{c as SystemUserDeleteDialog};
2
+ //# sourceMappingURL=SystemUserDeleteDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SystemUserDeleteDialog.js","sources":["../../../../../src/client/ui/System/SystemUser/SystemUserDeleteDialog.tsx"],"sourcesContent":["\"use client\";\n\nimport type { User } from \"@clerk/nextjs/server\";\nimport {\n ConfirmationForm,\n Dialog,\n InputErrors,\n TextInput,\n type DialogProps,\n} from \"@studiocubics/components\";\nimport { useFormHelpers, type useDisclosure } from \"@studiocubics/hooks\";\nimport { useState, type FormEvent } from \"react\";\nimport { systemUserDeleteAction } from \"../../../../server\";\n\nexport function SystemUserDeleteDialog(\n props: Omit<DialogProps, \"onClose\"> &\n ReturnType<typeof useDisclosure> & {\n fullName: User[\"fullName\"];\n userId: User[\"id\"];\n },\n) {\n const {\n open,\n handleOpen: _,\n handleClose,\n handleStrictClose,\n handleToggle: __,\n fullName,\n userId,\n ...rest\n } = props;\n const [verification, setVerification] = useState(\"\");\n const { loading, error, setLoading, setError } = useFormHelpers();\n const isAllowed = verification == fullName;\n\n async function handleSubmit(e: FormEvent) {\n e.preventDefault();\n setLoading(true);\n try {\n await systemUserDeleteAction(userId);\n } catch (e) {\n if (e instanceof Error) setError(e.message);\n console.error(e);\n } finally {\n setLoading(false);\n }\n }\n return (\n <Dialog {...rest} open={open} onClose={handleStrictClose}>\n <ConfirmationForm\n formTitle=\"Delete System User\"\n variant=\"danger\"\n onSubmit={handleSubmit}\n onCancel={handleClose}\n disabled={loading}\n slotProps={{ confirmButton: { disabled: loading || !isAllowed } }}\n >\n Are you sure you want to delete this account?\n <strong>{fullName}</strong>\n <br />\n All information will be deleted, this action is irreversible and cannot\n be undone.\n <br />\n <TextInput\n fullWidth\n required\n label=\"Enter the name of the user before deleting\"\n onChange={(e) => setVerification(e.target.value)}\n value={verification}\n />\n <InputErrors error={error as string} />\n </ConfirmationForm>\n </Dialog>\n );\n}\n"],"names":["SystemUserDeleteDialog","props","open","handleOpen","_","handleClose","handleStrictClose","handleToggle","__","fullName","userId","rest","verification","setVerification","useState","loading","error","setLoading","setError","useFormHelpers","_jsx","Dialog","onClose","children","_jsxs","ConfirmationForm","formTitle","variant","onSubmit","async","e","preventDefault","systemUserDeleteAction","Error","message","console","onCancel","disabled","slotProps","confirmButton","TextInput","fullWidth","required","label","onChange","target","value","InputErrors"],"mappings":"keAcM,SAAUA,EACdC,GAMA,MAAMC,KACJA,EACAC,WAAYC,EAACC,YACbA,EAAWC,kBACXA,EACAC,aAAcC,EAAEC,SAChBA,EAAQC,OACRA,KACGC,GACDV,GACGW,EAAcC,GAAmBC,EAAS,KAC3CC,QAAEA,EAAOC,MAAEA,EAAKC,WAAEA,EAAUC,SAAEA,GAAaC,IAejD,OACEC,EAACC,EAAM,IAAKV,EAAMT,KAAMA,EAAMoB,QAAShB,EAAiBiB,SACtDC,EAACC,EAAgB,CACfC,UAAU,qBACVC,QAAQ,SACRC,SAjBNC,eAA4BC,GAC1BA,EAAEC,iBACFd,GAAW,GACX,UACQe,EAAuBtB,EAC/B,CAAE,MAAOoB,GACHA,aAAaG,OAAOf,EAASY,EAAEI,SACnCC,QAAQnB,MAAMc,EAChB,SACEb,GAAW,EACb,CACF,EAOMmB,SAAU/B,EACVgC,SAAUtB,EACVuB,UAAW,CAAEC,cAAe,CAAEF,SAAUtB,KAtB5BH,GAAgBH,+DAyB5BW,EAAA,SAAA,CAAAG,SAASd,IACTW,EAAA,KAAA,CAAA,wFAGAA,EAAA,KAAA,CAAA,GACAA,EAACoB,EAAS,CACRC,aACAC,UAAQ,EACRC,MAAM,6CACNC,SAAWd,GAAMjB,EAAgBiB,EAAEe,OAAOC,OAC1CA,MAAOlC,IAETQ,EAAC2B,EAAW,CAAC/B,MAAOA,QAI5B"}
@@ -1,12 +1,13 @@
1
1
  import { type User } from "@clerk/nextjs/server";
2
2
  interface SystemUserDetailsProps {
3
- id: User["id"];
3
+ userId: User["id"];
4
4
  fullName: User["fullName"];
5
5
  firstName: User["firstName"];
6
6
  lastName?: User["lastName"];
7
7
  imageUrl: User["imageUrl"];
8
+ hasImage: User["hasImage"];
8
9
  emailAddress?: NonNullable<User["primaryEmailAddress"]>["emailAddress"];
9
10
  editable?: boolean;
10
11
  }
11
- export declare function SystemUserDetails({ id, fullName, firstName, lastName, imageUrl, emailAddress, editable, }: SystemUserDetailsProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function SystemUserDetails({ userId, fullName, firstName, lastName, imageUrl, hasImage, emailAddress, editable, }: SystemUserDetailsProps): import("react/jsx-runtime").JSX.Element;
12
13
  export {};
@@ -1,2 +1,2 @@
1
- "use client";import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{TransitionAnimation as t,IdentityDisplay as o,Button as s}from"@studiocubics/components";import n from"./SystemUserDetails.module.css.js";import{Edit as m}from"lucide-react";import{useDisclosure as l}from"@studiocubics/hooks";import"@clerk/nextjs/server";import{SystemUserDetailsForm as a}from"../SystemUserDetailsForm/SystemUserDetailsForm.js";function c({id:c,fullName:d,firstName:u,lastName:p,imageUrl:f,emailAddress:h,editable:g}){const{open:N,handleOpen:O,handleClose:x}=l();return e(r,{children:[i(t,{in:N,transformOrigin:"top right",mountOnly:!0,unmountOnExit:!0,children:i(a,{imageUrl:f,firstName:u,lastName:p,onClose:x})}),i(t,{in:!N,transformOrigin:"top",mountOnly:!0,unmountOnExit:!0,children:e("div",{className:n.root,children:[i(o,{profileName:d,profileImage:f,role:e("p",{children:[h,i("br",{}),i("strong",{children:c})]})}),g&&i(s,{size:"sm",startIcon:i(m,{}),onClick:O,children:"Edit Details"})]})})]})}export{c as SystemUserDetails};
1
+ "use client";import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{TransitionAnimation as t,IdentityDisplay as s,Button as o}from"@studiocubics/components";import m from"./SystemUserDetails.module.css.js";import{Edit as n}from"lucide-react";import{useDisclosure as l}from"@studiocubics/hooks";import"@clerk/nextjs/server";import{SystemUserDetailsForm as a}from"../SystemUserDetailsForm/SystemUserDetailsForm.js";function c({userId:c,fullName:d,firstName:u,lastName:p,imageUrl:f,hasImage:h,emailAddress:g,editable:N}){const{open:O,handleOpen:I,handleClose:x}=l();return e(r,{children:[i(t,{in:O,transformOrigin:"top right",mountOnly:!0,unmountOnExit:!0,children:i(a,{userId:c,imageUrl:f,firstName:u,lastName:p,hasImage:h,handleClose:x})}),i(t,{in:!O,transformOrigin:"top",mountOnly:!0,unmountOnExit:!0,children:e("div",{className:m.root,children:[i(s,{profileName:d,profileImage:f,role:e("p",{children:[g,i("br",{}),i("strong",{children:c})]})}),N&&i(o,{size:"sm",startIcon:i(n,{}),onClick:I,children:"Edit Details"})]})})]})}export{c as SystemUserDetails};
2
2
  //# sourceMappingURL=SystemUserDetails.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SystemUserDetails.js","sources":["../../../../../../src/client/ui/System/SystemUser/SystemUserDetails/SystemUserDetails.tsx"],"sourcesContent":["\"use client\";\n\nimport { Button, IdentityDisplay, TransitionAnimation } from \"@studiocubics/components\";\nimport styles from \"./SystemUserDetails.module.css\";\nimport { Edit } from \"lucide-react\";\nimport { useDisclosure } from \"@studiocubics/hooks\";\nimport { type User } from \"@clerk/nextjs/server\";\nimport { SystemUserDetailsForm } from \"../SystemUserDetailsForm/SystemUserDetailsForm\";\n\ninterface SystemUserDetailsProps {\n id: User[\"id\"];\n fullName: User[\"fullName\"];\n firstName: User[\"firstName\"];\n lastName?: User[\"lastName\"];\n imageUrl: User[\"imageUrl\"];\n emailAddress?: NonNullable<User[\"primaryEmailAddress\"]>[\"emailAddress\"];\n editable?: boolean;\n}\nexport function SystemUserDetails({\n id,\n fullName,\n firstName,\n lastName,\n imageUrl,\n emailAddress,\n editable,\n}: SystemUserDetailsProps) {\n const { open, handleOpen, handleClose } = useDisclosure();\n return (\n <>\n <TransitionAnimation\n in={open}\n transformOrigin={\"top right\"}\n mountOnly\n unmountOnExit\n >\n <SystemUserDetailsForm\n imageUrl={imageUrl}\n firstName={firstName}\n lastName={lastName}\n onClose={handleClose}\n />\n </TransitionAnimation>\n <TransitionAnimation\n in={!open}\n transformOrigin={\"top\"}\n mountOnly\n unmountOnExit\n >\n <div className={styles.root}>\n <IdentityDisplay\n profileName={fullName}\n profileImage={imageUrl}\n role={\n <p>\n {emailAddress}\n <br />\n <strong>{id}</strong>\n </p>\n }\n />\n {editable && (\n <Button size=\"sm\" startIcon={<Edit />} onClick={handleOpen}>\n Edit Details\n </Button>\n )}\n </div>\n </TransitionAnimation>\n </>\n );\n}\n"],"names":["SystemUserDetails","id","fullName","firstName","lastName","imageUrl","emailAddress","editable","open","handleOpen","handleClose","useDisclosure","_jsxs","_Fragment","children","_jsx","TransitionAnimation","in","transformOrigin","mountOnly","unmountOnExit","SystemUserDetailsForm","onClose","className","styles","root","IdentityDisplay","profileName","profileImage","role","Button","size","startIcon","Edit","onClick"],"mappings":"sbAkBgBA,GAAkBC,GAChCA,EAAEC,SACFA,EAAQC,UACRA,EAASC,SACTA,EAAQC,SACRA,EAAQC,aACRA,EAAYC,SACZA,IAEA,MAAMC,KAAEA,EAAIC,WAAEA,EAAUC,YAAEA,GAAgBC,IAC1C,OACEC,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,EAAmB,CAClBC,GAAIT,EACJU,gBAAiB,YACjBC,WAAS,EACTC,eAAa,EAAAN,SAEbC,EAACM,GACChB,SAAUA,EACVF,UAAWA,EACXC,SAAUA,EACVkB,QAASZ,MAGbK,EAACC,GACCC,IAAKT,EACLU,gBAAiB,MACjBC,WAAS,EACTC,eAAa,EAAAN,SAEbF,EAAA,MAAA,CAAKW,UAAWC,EAAOC,KAAIX,SAAA,CACzBC,EAACW,EAAe,CACdC,YAAazB,EACb0B,aAAcvB,EACdwB,KACEjB,EAAA,IAAA,CAAAE,SAAA,CACGR,EACDS,EAAA,KAAA,IACAA,EAAA,SAAA,CAAAD,SAASb,SAIdM,GACCQ,EAACe,GAAOC,KAAK,KAAKC,UAAWjB,EAACkB,EAAI,CAAA,GAAKC,QAASzB,EAAUK,SAAA,wBAQtE"}
1
+ {"version":3,"file":"SystemUserDetails.js","sources":["../../../../../../src/client/ui/System/SystemUser/SystemUserDetails/SystemUserDetails.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n Button,\n IdentityDisplay,\n TransitionAnimation,\n} from \"@studiocubics/components\";\nimport styles from \"./SystemUserDetails.module.css\";\nimport { Edit } from \"lucide-react\";\nimport { useDisclosure } from \"@studiocubics/hooks\";\nimport { type User } from \"@clerk/nextjs/server\";\nimport { SystemUserDetailsForm } from \"../SystemUserDetailsForm/SystemUserDetailsForm\";\n\ninterface SystemUserDetailsProps {\n userId: User[\"id\"];\n fullName: User[\"fullName\"];\n firstName: User[\"firstName\"];\n lastName?: User[\"lastName\"];\n imageUrl: User[\"imageUrl\"];\n hasImage: User[\"hasImage\"];\n emailAddress?: NonNullable<User[\"primaryEmailAddress\"]>[\"emailAddress\"];\n editable?: boolean;\n}\nexport function SystemUserDetails({\n userId,\n fullName,\n firstName,\n lastName,\n imageUrl,\n hasImage,\n emailAddress,\n editable,\n}: SystemUserDetailsProps) {\n const { open, handleOpen, handleClose } = useDisclosure();\n return (\n <>\n <TransitionAnimation\n in={open}\n transformOrigin={\"top right\"}\n mountOnly\n unmountOnExit\n >\n <SystemUserDetailsForm\n userId={userId}\n imageUrl={imageUrl}\n firstName={firstName}\n lastName={lastName}\n hasImage={hasImage}\n handleClose={handleClose}\n />\n </TransitionAnimation>\n <TransitionAnimation\n in={!open}\n transformOrigin={\"top\"}\n mountOnly\n unmountOnExit\n >\n <div className={styles.root}>\n <IdentityDisplay\n profileName={fullName}\n profileImage={imageUrl}\n role={\n <p>\n {emailAddress}\n <br />\n <strong>{userId}</strong>\n </p>\n }\n />\n {editable && (\n <Button size=\"sm\" startIcon={<Edit />} onClick={handleOpen}>\n Edit Details\n </Button>\n )}\n </div>\n </TransitionAnimation>\n </>\n );\n}\n"],"names":["SystemUserDetails","userId","fullName","firstName","lastName","imageUrl","hasImage","emailAddress","editable","open","handleOpen","handleClose","useDisclosure","_jsxs","_Fragment","children","_jsx","TransitionAnimation","in","transformOrigin","mountOnly","unmountOnExit","SystemUserDetailsForm","className","styles","root","IdentityDisplay","profileName","profileImage","role","Button","size","startIcon","Edit","onClick"],"mappings":"sbAuBgBA,GAAkBC,OAChCA,EAAMC,SACNA,EAAQC,UACRA,EAASC,SACTA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,aACRA,EAAYC,SACZA,IAEA,MAAMC,KAAEA,EAAIC,WAAEA,EAAUC,YAAEA,GAAgBC,IAC1C,OACEC,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,EAAmB,CAClBC,GAAIT,EACJU,gBAAiB,YACjBC,WAAS,EACTC,eAAa,EAAAN,SAEbC,EAACM,EAAqB,CACpBrB,OAAQA,EACRI,SAAUA,EACVF,UAAWA,EACXC,SAAUA,EACVE,SAAUA,EACVK,YAAaA,MAGjBK,EAACC,EAAmB,CAClBC,IAAKT,EACLU,gBAAiB,MACjBC,aACAC,eAAa,EAAAN,SAEbF,EAAA,MAAA,CAAKU,UAAWC,EAAOC,KAAIV,SAAA,CACzBC,EAACU,EAAe,CACdC,YAAazB,EACb0B,aAAcvB,EACdwB,KACEhB,EAAA,IAAA,CAAAE,SAAA,CACGR,EACDS,EAAA,KAAA,CAAA,GACAA,EAAA,SAAA,CAAAD,SAASd,SAIdO,GACCQ,EAACc,EAAM,CAACC,KAAK,KAAKC,UAAWhB,EAACiB,EAAI,CAAA,GAAKC,QAASxB,EAAUK,SAAA,wBAQtE"}
@@ -2,10 +2,12 @@ import type { User } from "@clerk/nextjs/server";
2
2
  import { type CardProps } from "@studiocubics/components";
3
3
  declare const initialSystemUserDetailsUpdateState: import("@studiocubics/utils").ActionResponse<"firstName" | "lastName" | "imageUrl", ("firstName" | "lastName" | "imageUrl")[]>;
4
4
  export type SystemUserDetailsUpdateState = typeof initialSystemUserDetailsUpdateState;
5
- export declare function SystemUserDetailsForm({ imageUrl, firstName, lastName, onClose, ...rest }: {
6
- imageUrl?: User["imageUrl"];
5
+ export declare function SystemUserDetailsForm({ userId, firstName, lastName, imageUrl, hasImage, handleClose, ...rest }: {
6
+ userId: User["id"];
7
7
  firstName?: User["firstName"];
8
8
  lastName?: User["lastName"];
9
- onClose(): void;
9
+ imageUrl?: User["imageUrl"];
10
+ hasImage?: User["hasImage"];
11
+ handleClose(): void;
10
12
  } & CardProps): import("react/jsx-runtime").JSX.Element;
11
13
  export {};
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Card as i,ConfirmationForm as l,IdentityDisplay as s,Button as t,toast as a,TextInput as o}from"@studiocubics/components";import m from"./SystemUserDetailsForm.module.css.js";import{initialiseForm as n}from"@studiocubics/utils";import"../../../../../server/clerk/actions/invitations.js";import{systemUserDetailsUpdateAction as c}from"../../../../../server/clerk/actions/systemUsers.js";import"@clerk/nextjs/server";import"../../../../../server/clerk/schemas/invitation.js";import{useActionState as d,useState as f,useRef as u,useEffect as p}from"react";const h=n("firstName","lastName","imageUrl");function N({imageUrl:n,firstName:N,lastName:b,onClose:g,...v}){const[j,k,U]=d(c.bind(null,"hello"),h),[R,C]=f(n),[x,y]=f(),z=u(null);return p(()=>{x&&C(URL.createObjectURL(x))},[x]),e(i,{fullWidth:!0,...v,children:r(l,{formTitle:"Edit Details",onCancel:g,action:k,disabled:U,children:[e(s,{profileImage:R,profileName:r("div",{className:m.formRow,children:[e(t,{size:"sm",variant:"outlined",disabled:U,onClick:()=>z.current?.click(),children:"Upload"}),e("input",{type:"file",accept:"image/jpg, image/png",ref:z,name:"imageFile",onChange:e=>e.target?.files&&y(e.target.files[0]),hidden:!0,disabled:U}),e(t,{size:"sm",color:"error",onClick:()=>a("hello"),disabled:U,children:"Remove"})]}),role:"Recommended size 1:1, up to 10MB."}),r("div",{className:m.formRow,children:[e(o,{fullWidth:!0,label:"First Name",defaultValue:N,name:"firstName",error:j.fieldErrors?.firstName,disabled:U}),e(o,{fullWidth:!0,label:"Last Name",defaultValue:b,name:"lastName",error:j.fieldErrors?.lastName,disabled:U})]})]})})}export{N as SystemUserDetailsForm};
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Card as i,ConfirmationForm as t,IdentityDisplay as a,Button as s,InputErrors as o,TextInput as l}from"@studiocubics/components";import m from"./SystemUserDetailsForm.module.css.js";import{initialiseForm as d}from"@studiocubics/utils";import"../../../../../server/clerk/actions/invitations.js";import{systemUserDetailsUpdateAction as c,systemUserProfileImageDeleteAction as n}from"../../../../../server/clerk/actions/systemUsers.js";import"@clerk/nextjs/server";import"../../../../../server/clerk/schemas/invitation.js";import{useActionState as u,useState as f,useRef as v,useCallback as p,useEffect as b}from"react";import{useUser as h}from"@clerk/nextjs";const g=d("firstName","lastName","imageUrl");function N({userId:d,firstName:N,lastName:R,imageUrl:U,hasImage:j,handleClose:k,...y}){const[z,C,L]=u(c.bind(null,d),g),[W,x]=f(U),[F,I]=f(),[w,B]=f(),M=v(null),{user:E}=h(),O=U!==W,q=!O||!W,D=O&&!!W,S=j&&!O,V=p(e=>{const r=e.target.files?.[0];if(r)return B(void 0),r.size>2097152?(B("Image size must be less than 2MB"),void(e.target.value="")):r.type.startsWith("image/")?void I(r):(B("Please select a valid image file"),void(e.target.value=""))},[]),$=p(()=>{W!==U&&(I(void 0),x(U),B(void 0),M.current&&(M.current.value=""))},[W,U]),P=p(async()=>{if(j)try{await n(d),I(void 0),x(void 0),B(void 0),M.current&&(M.current.value=""),d===E?.id&&await(E?.reload())}catch(e){B("Failed to remove image")}},[j,d,E]),T=p(e=>`${(e/1048576).toFixed(2)}MB`,[]);b(()=>(F&&(W&&W.startsWith("blob:")&&URL.revokeObjectURL(W),x(URL.createObjectURL(F))),()=>{W&&W.startsWith("blob:")&&URL.revokeObjectURL(W)}),[F]),b(()=>{z.success&&(d===E?.id&&E?.reload(),k())},[z.success,d,E,k]);const A=F?`Recommended size 1:1, up to 2MB. Currently: ${T(F.size)}`:"Recommended size 1:1, up to 2MB";return e(i,{fullWidth:!0,...y,children:r(t,{formTitle:"Edit Details",onCancel:k,action:C,disabled:L,children:[e(a,{profileImage:W,profileName:r("div",{className:m.formRow,children:[q&&e(s,{type:"button",size:"sm",variant:"outlined",disabled:L,onClick:()=>M.current?.click(),children:"Upload Image"}),e("input",{type:"file",accept:"image/jpeg, image/png",ref:M,name:"imageFile",onChange:V,hidden:!0,disabled:L,"aria-label":"Upload profile image"}),D&&e(s,{type:"button",size:"sm",color:"error",onClick:$,disabled:L,variant:"contained",children:"Remove Selected"}),S&&e(s,{type:"button",size:"sm",color:"error",onClick:P,disabled:L,children:"Remove"})]}),role:A}),w&&e(o,{error:w}),e(o,{error:z.error}),r("div",{className:m.formRow,children:[e(l,{fullWidth:!0,label:"First Name",defaultValue:N??"",name:"firstName",error:z.fieldErrors?.firstName,disabled:L,required:!0}),e(l,{fullWidth:!0,label:"Last Name",defaultValue:R??"",name:"lastName",error:z.fieldErrors?.lastName,disabled:L,required:!0})]})]})})}export{N as SystemUserDetailsForm};
2
2
  //# sourceMappingURL=SystemUserDetailsForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SystemUserDetailsForm.js","sources":["../../../../../../src/client/ui/System/SystemUser/SystemUserDetailsForm/SystemUserDetailsForm.tsx"],"sourcesContent":["\"use client\";\n\nimport type { User } from \"@clerk/nextjs/server\";\nimport {\n type CardProps,\n Card,\n ConfirmationForm,\n IdentityDisplay,\n Button,\n TextInput,\n toast,\n} from \"@studiocubics/components\";\nimport styles from \"./SystemUserDetailsForm.module.css\";\nimport { initialiseForm } from \"@studiocubics/utils\";\nimport { systemUserDetailsUpdateAction } from \"../../../../../server/clerk/_index\";\nimport { useActionState, useEffect, useRef, useState } from \"react\";\n\nconst initialSystemUserDetailsUpdateState = initialiseForm(\n \"firstName\",\n \"lastName\",\n \"imageUrl\",\n);\nexport type SystemUserDetailsUpdateState =\n typeof initialSystemUserDetailsUpdateState;\n\nexport function SystemUserDetailsForm({\n imageUrl,\n firstName,\n lastName,\n onClose,\n ...rest\n}: {\n imageUrl?: User[\"imageUrl\"];\n firstName?: User[\"firstName\"];\n lastName?: User[\"lastName\"];\n onClose(): void;\n} & CardProps) {\n const [state, action, pending] = useActionState(\n systemUserDetailsUpdateAction.bind(null, \"hello\"),\n initialSystemUserDetailsUpdateState,\n );\n const [imagePreview, setImagePreview] = useState(imageUrl);\n const [inputImage, setInputImage] = useState<File>();\n const imageInputRef = useRef<HTMLInputElement | null>(null);\n\n useEffect(() => {\n if (inputImage) setImagePreview(URL.createObjectURL(inputImage));\n }, [inputImage]);\n\n return (\n <Card fullWidth {...rest}>\n <ConfirmationForm\n formTitle=\"Edit Details\"\n onCancel={onClose}\n action={action}\n disabled={pending}\n >\n <IdentityDisplay\n profileImage={imagePreview}\n profileName={\n <div className={styles.formRow}>\n <Button\n size=\"sm\"\n variant=\"outlined\"\n disabled={pending}\n onClick={() => imageInputRef.current?.click()}\n >\n Upload\n </Button>\n <input\n type=\"file\"\n accept=\"image/jpg, image/png\"\n ref={imageInputRef}\n name={\"imageFile\"}\n onChange={(e) =>\n e.target?.files && setInputImage(e.target.files[0])\n }\n hidden\n disabled={pending}\n />\n <Button\n size=\"sm\"\n color=\"error\"\n onClick={() => toast(\"hello\")}\n disabled={pending}\n >\n Remove\n </Button>\n </div>\n }\n role={\"Recommended size 1:1, up to 10MB.\"}\n />\n <div className={styles.formRow}>\n <TextInput\n fullWidth\n label=\"First Name\"\n defaultValue={firstName!}\n name=\"firstName\"\n error={state.fieldErrors?.firstName}\n disabled={pending}\n />\n <TextInput\n fullWidth\n label=\"Last Name\"\n defaultValue={lastName!}\n name=\"lastName\"\n error={state.fieldErrors?.lastName}\n disabled={pending}\n />\n </div>\n </ConfirmationForm>\n </Card>\n );\n}\n"],"names":["initialSystemUserDetailsUpdateState","initialiseForm","SystemUserDetailsForm","imageUrl","firstName","lastName","onClose","rest","state","action","pending","useActionState","systemUserDetailsUpdateAction","bind","imagePreview","setImagePreview","useState","inputImage","setInputImage","imageInputRef","useRef","useEffect","URL","createObjectURL","_jsx","Card","fullWidth","children","_jsxs","ConfirmationForm","formTitle","onCancel","disabled","IdentityDisplay","profileImage","profileName","className","styles","formRow","Button","size","variant","onClick","current","click","type","accept","ref","name","onChange","e","target","files","hidden","color","toast","role","TextInput","label","defaultValue","error","fieldErrors"],"mappings":"+mBAiBA,MAAMA,EAAsCC,EAC1C,YACA,WACA,YAKI,SAAUC,GAAsBC,SACpCA,EAAQC,UACRA,EAASC,SACTA,EAAQC,QACRA,KACGC,IAOH,MAAOC,EAAOC,EAAQC,GAAWC,EAC/BC,EAA8BC,KAAK,KAAM,SACzCb,IAEKc,EAAcC,GAAmBC,EAASb,IAC1Cc,EAAYC,GAAiBF,IAC9BG,EAAgBC,EAAgC,MAMtD,OAJAC,EAAU,KACJJ,GAAYF,EAAgBO,IAAIC,gBAAgBN,KACnD,CAACA,IAGFO,EAACC,EAAI,CAACC,gBAAcnB,EAAIoB,SACtBC,EAACC,EAAgB,CACfC,UAAU,eACVC,SAAUzB,EACVG,OAAQA,EACRuB,SAAUtB,YAEVc,EAACS,EAAe,CACdC,aAAcpB,EACdqB,YACEP,EAAA,MAAA,CAAKQ,UAAWC,EAAOC,QAAOX,SAAA,CAC5BH,EAACe,EAAM,CACLC,KAAK,KACLC,QAAQ,WACRT,SAAUtB,EACVgC,QAAS,IAAMvB,EAAcwB,SAASC,QAAOjB,SAAA,WAI/CH,EAAA,QAAA,CACEqB,KAAK,OACLC,OAAO,uBACPC,IAAK5B,EACL6B,KAAM,YACNC,SAAWC,GACTA,EAAEC,QAAQC,OAASlC,EAAcgC,EAAEC,OAAOC,MAAM,IAElDC,QAAM,EACNrB,SAAUtB,IAEZc,EAACe,EAAM,CACLC,KAAK,KACLc,MAAM,QACNZ,QAAS,IAAMa,EAAM,SACrBvB,SAAUtB,EAAOiB,SAAA,cAMvB6B,KAAM,sCAER5B,EAAA,MAAA,CAAKQ,UAAWC,EAAOC,QAAOX,SAAA,CAC5BH,EAACiC,EAAS,CACR/B,WAAS,EACTgC,MAAM,aACNC,aAAcvD,EACd4C,KAAK,YACLY,MAAOpD,EAAMqD,aAAazD,UAC1B4B,SAAUtB,IAEZc,EAACiC,EAAS,CACR/B,WAAS,EACTgC,MAAM,YACNC,aAActD,EACd2C,KAAK,WACLY,MAAOpD,EAAMqD,aAAaxD,SAC1B2B,SAAUtB,WAMtB"}
1
+ {"version":3,"file":"SystemUserDetailsForm.js","sources":["../../../../../../src/client/ui/System/SystemUser/SystemUserDetailsForm/SystemUserDetailsForm.tsx"],"sourcesContent":["\"use client\";\n\nimport type { User } from \"@clerk/nextjs/server\";\nimport {\n type CardProps,\n Card,\n ConfirmationForm,\n IdentityDisplay,\n Button,\n TextInput,\n InputErrors,\n} from \"@studiocubics/components\";\nimport styles from \"./SystemUserDetailsForm.module.css\";\nimport { initialiseForm } from \"@studiocubics/utils\";\nimport {\n systemUserDetailsUpdateAction,\n systemUserProfileImageDeleteAction,\n} from \"../../../../../server/clerk/_index\";\nimport { useActionState, useEffect, useRef, useState, useCallback } from \"react\";\nimport { useUser } from \"@clerk/nextjs\";\n\nconst initialSystemUserDetailsUpdateState = initialiseForm(\n \"firstName\",\n \"lastName\",\n \"imageUrl\",\n);\nexport type SystemUserDetailsUpdateState =\n typeof initialSystemUserDetailsUpdateState;\n\nconst MAX_FILE_SIZE_MB = 2;\nconst MAX_FILE_SIZE_BYTES = MAX_FILE_SIZE_MB * 1024 * 1024;\n\nexport function SystemUserDetailsForm({\n userId,\n firstName,\n lastName,\n imageUrl,\n hasImage,\n handleClose,\n ...rest\n}: {\n userId: User[\"id\"];\n firstName?: User[\"firstName\"];\n lastName?: User[\"lastName\"];\n imageUrl?: User[\"imageUrl\"];\n hasImage?: User[\"hasImage\"];\n handleClose(): void;\n} & CardProps) {\n const [state, action, pending] = useActionState(\n systemUserDetailsUpdateAction.bind(null, userId),\n initialSystemUserDetailsUpdateState,\n );\n const [imagePreview, setImagePreview] = useState<string | undefined>(\n imageUrl,\n );\n const [inputImage, setInputImage] = useState<File>();\n const [imageError, setImageError] = useState<string>();\n const imageInputRef = useRef<HTMLInputElement | null>(null);\n const { user } = useUser();\n\n const isImageChanged = imageUrl !== imagePreview;\n const showUploadButton = !isImageChanged || !imagePreview;\n const showRemoveSelectedButton = isImageChanged && !!imagePreview;\n const showRemoveButton = hasImage && !isImageChanged;\n\n const handleImageSelect = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {\n const file = e.target.files?.[0];\n if (!file) return;\n\n setImageError(undefined);\n\n // Validate file size\n if (file.size > MAX_FILE_SIZE_BYTES) {\n setImageError(`Image size must be less than ${MAX_FILE_SIZE_MB}MB`);\n e.target.value = \"\"; // Reset input\n return;\n }\n\n // Validate file type\n if (!file.type.startsWith(\"image/\")) {\n setImageError(\"Please select a valid image file\");\n e.target.value = \"\"; // Reset input\n return;\n }\n\n setInputImage(file);\n }, []);\n\n const removeSelectedImage = useCallback(() => {\n if (imagePreview === imageUrl) return;\n \n setInputImage(undefined);\n setImagePreview(imageUrl);\n setImageError(undefined);\n \n // Reset file input\n if (imageInputRef.current) {\n imageInputRef.current.value = \"\";\n }\n }, [imagePreview, imageUrl]);\n\n const removeImage = useCallback(async () => {\n if (!hasImage) return;\n \n try {\n await systemUserProfileImageDeleteAction(userId);\n setInputImage(undefined);\n setImagePreview(undefined);\n setImageError(undefined);\n \n // Reset file input\n if (imageInputRef.current) {\n imageInputRef.current.value = \"\";\n }\n \n if (userId === user?.id) {\n await user?.reload();\n }\n } catch (error) {\n setImageError(\"Failed to remove image\");\n }\n }, [hasImage, userId, user]);\n\n const formatFileSize = useCallback((bytes: number): string => {\n return `${(bytes / (1024 * 1024)).toFixed(2)}MB`;\n }, []);\n\n useEffect(() => {\n if (inputImage) {\n // Revoke previous object URL to avoid memory leaks\n if (imagePreview && imagePreview.startsWith(\"blob:\")) {\n URL.revokeObjectURL(imagePreview);\n }\n setImagePreview(URL.createObjectURL(inputImage));\n }\n\n // Cleanup function to revoke object URL on unmount\n return () => {\n if (imagePreview && imagePreview.startsWith(\"blob:\")) {\n URL.revokeObjectURL(imagePreview);\n }\n };\n }, [inputImage]);\n\n useEffect(() => {\n if (state.success) {\n if (userId === user?.id) {\n user?.reload();\n }\n handleClose();\n }\n }, [state.success, userId, user, handleClose]);\n\n const roleText = inputImage\n ? `Recommended size 1:1, up to ${MAX_FILE_SIZE_MB}MB. Currently: ${formatFileSize(inputImage.size)}`\n : `Recommended size 1:1, up to ${MAX_FILE_SIZE_MB}MB`;\n\n return (\n <Card fullWidth {...rest}>\n <ConfirmationForm\n formTitle=\"Edit Details\"\n onCancel={handleClose}\n action={action}\n disabled={pending}\n >\n <IdentityDisplay\n profileImage={imagePreview}\n profileName={\n <div className={styles.formRow}>\n {showUploadButton && (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outlined\"\n disabled={pending}\n onClick={() => imageInputRef.current?.click()}\n >\n Upload Image\n </Button>\n )}\n <input\n type=\"file\"\n accept=\"image/jpeg, image/png\"\n ref={imageInputRef}\n name=\"imageFile\"\n onChange={handleImageSelect}\n hidden\n disabled={pending}\n aria-label=\"Upload profile image\"\n />\n {showRemoveSelectedButton && (\n <Button\n type=\"button\"\n size=\"sm\"\n color=\"error\"\n onClick={removeSelectedImage}\n disabled={pending}\n variant=\"contained\"\n >\n Remove Selected\n </Button>\n )}\n {showRemoveButton && (\n <Button\n type=\"button\"\n size=\"sm\"\n color=\"error\"\n onClick={removeImage}\n disabled={pending}\n >\n Remove\n </Button>\n )}\n </div>\n }\n role={roleText}\n />\n {imageError && <InputErrors error={imageError} />}\n <InputErrors error={state.error} />\n <div className={styles.formRow}>\n <TextInput\n fullWidth\n label=\"First Name\"\n defaultValue={firstName ?? \"\"}\n name=\"firstName\"\n error={state.fieldErrors?.firstName}\n disabled={pending}\n required\n />\n <TextInput\n fullWidth\n label=\"Last Name\"\n defaultValue={lastName ?? \"\"}\n name=\"lastName\"\n error={state.fieldErrors?.lastName}\n disabled={pending}\n required\n />\n </div>\n </ConfirmationForm>\n </Card>\n );\n}"],"names":["initialSystemUserDetailsUpdateState","initialiseForm","SystemUserDetailsForm","userId","firstName","lastName","imageUrl","hasImage","handleClose","rest","state","action","pending","useActionState","systemUserDetailsUpdateAction","bind","imagePreview","setImagePreview","useState","inputImage","setInputImage","imageError","setImageError","imageInputRef","useRef","user","useUser","isImageChanged","showUploadButton","showRemoveSelectedButton","showRemoveButton","handleImageSelect","useCallback","e","file","target","files","undefined","size","MAX_FILE_SIZE_MB","value","type","startsWith","removeSelectedImage","current","removeImage","async","systemUserProfileImageDeleteAction","id","reload","error","formatFileSize","bytes","toFixed","useEffect","URL","revokeObjectURL","createObjectURL","success","roleText","_jsx","Card","fullWidth","children","_jsxs","ConfirmationForm","formTitle","onCancel","disabled","IdentityDisplay","profileImage","profileName","className","styles","formRow","Button","variant","onClick","click","accept","ref","name","onChange","hidden","color","role","InputErrors","TextInput","label","defaultValue","fieldErrors","required"],"mappings":"stBAqBA,MAAMA,EAAsCC,EAC1C,YACA,WACA,qBAQcC,GAAsBC,OACpCA,EAAMC,UACNA,EAASC,SACTA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,YACRA,KACGC,IASH,MAAOC,EAAOC,EAAQC,GAAWC,EAC/BC,EAA8BC,KAAK,KAAMZ,GACzCH,IAEKgB,EAAcC,GAAmBC,EACtCZ,IAEKa,EAAYC,GAAiBF,KAC7BG,EAAYC,GAAiBJ,IAC9BK,EAAgBC,EAAgC,OAChDC,KAAEA,GAASC,IAEXC,EAAiBrB,IAAaU,EAC9BY,GAAoBD,IAAmBX,EACvCa,EAA2BF,KAAoBX,EAC/Cc,EAAmBvB,IAAaoB,EAEhCI,EAAoBC,EAAaC,IACrC,MAAMC,EAAOD,EAAEE,OAAOC,QAAQ,GAC9B,GAAKF,EAKL,OAHAZ,OAAce,GAGVH,EAAKI,KA1CeC,SA2CtBjB,EAAc,yCACdW,EAAEE,OAAOK,MAAQ,KAKdN,EAAKO,KAAKC,WAAW,eAM1BtB,EAAcc,IALZZ,EAAc,yCACdW,EAAEE,OAAOK,MAAQ,MAKlB,IAEGG,EAAsBX,EAAY,KAClChB,IAAiBV,IAErBc,OAAciB,GACdpB,EAAgBX,GAChBgB,OAAce,GAGVd,EAAcqB,UAChBrB,EAAcqB,QAAQJ,MAAQ,MAE/B,CAACxB,EAAcV,IAEZuC,EAAcb,EAAYc,UAC9B,GAAKvC,EAEL,UACQwC,EAAmC5C,GACzCiB,OAAciB,GACdpB,OAAgBoB,GAChBf,OAAce,GAGVd,EAAcqB,UAChBrB,EAAcqB,QAAQJ,MAAQ,IAG5BrC,IAAWsB,GAAMuB,UACbvB,GAAMwB,SAEhB,CAAE,MAAOC,GACP5B,EAAc,yBAChB,GACC,CAACf,EAAUJ,EAAQsB,IAEhB0B,EAAiBnB,EAAaoB,GAC3B,IAAIA,WAAuBC,QAAQ,OACzC,IAEHC,EAAU,KACJnC,IAEEH,GAAgBA,EAAa0B,WAAW,UAC1Ca,IAAIC,gBAAgBxC,GAEtBC,EAAgBsC,IAAIE,gBAAgBtC,KAI/B,KACDH,GAAgBA,EAAa0B,WAAW,UAC1Ca,IAAIC,gBAAgBxC,KAGvB,CAACG,IAEJmC,EAAU,KACJ5C,EAAMgD,UACJvD,IAAWsB,GAAMuB,IACnBvB,GAAMwB,SAERzC,MAED,CAACE,EAAMgD,QAASvD,EAAQsB,EAAMjB,IAEjC,MAAMmD,EAAWxC,EACb,+CAAiEgC,EAAehC,EAAWmB,QAC3F,kCAEJ,OACEsB,EAACC,EAAI,CAACC,WAAS,KAAKrD,EAAIsD,SACtBC,EAACC,EAAgB,CACfC,UAAU,eACVC,SAAU3D,EACVG,OAAQA,EACRyD,SAAUxD,EAAOmD,SAAA,CAEjBH,EAACS,GACCC,aAActD,EACduD,YACEP,EAAA,MAAA,CAAKQ,UAAWC,EAAOC,QAAOX,SAAA,CAC3BnC,GACCgC,EAACe,EAAM,CACLlC,KAAK,SACLH,KAAK,KACLsC,QAAQ,WACRR,SAAUxD,EACViE,QAAS,IAAMtD,EAAcqB,SAASkC,QAAOf,SAAA,iBAKjDH,EAAA,QAAA,CACEnB,KAAK,OACLsC,OAAO,wBACPC,IAAKzD,EACL0D,KAAK,YACLC,SAAUnD,EACVoD,QAAM,EACNf,SAAUxD,EAAO,aACN,yBAEZiB,GACC+B,EAACe,EAAM,CACLlC,KAAK,SACLH,KAAK,KACL8C,MAAM,QACNP,QAASlC,EACTyB,SAAUxD,EACVgE,QAAQ,YAAWb,SAAA,oBAKtBjC,GACC8B,EAACe,EAAM,CACLlC,KAAK,SACLH,KAAK,KACL8C,MAAM,QACNP,QAAShC,EACTuB,SAAUxD,EAAOmD,SAAA,cAOzBsB,KAAM1B,IAEPtC,GAAcuC,EAAC0B,EAAW,CAACpC,MAAO7B,IACnCuC,EAAC0B,EAAW,CAACpC,MAAOxC,EAAMwC,QAC1Bc,EAAA,MAAA,CAAKQ,UAAWC,EAAOC,QAAOX,SAAA,CAC5BH,EAAC2B,EAAS,CACRzB,WAAS,EACT0B,MAAM,aACNC,aAAcrF,GAAa,GAC3B6E,KAAK,YACL/B,MAAOxC,EAAMgF,aAAatF,UAC1BgE,SAAUxD,EACV+E,UAAQ,IAEV/B,EAAC2B,EAAS,CACRzB,WAAS,EACT0B,MAAM,YACNC,aAAcpF,GAAY,GAC1B4E,KAAK,WACL/B,MAAOxC,EAAMgF,aAAarF,SAC1B+D,SAAUxD,EACV+E,UAAQ,WAMpB"}
@@ -1,2 +1,2 @@
1
- import{jsx as r}from"react/jsx-runtime";import{systemUserListReadAction as e}from"../../../../server/clerk/actions/systemUsers.js";import{SystemUserListCard as a}from"./SystemUserListCard.js";async function s(s){return(await e(s)).data.map(e=>r(a,{id:e.id,fullName:e.fullName,imageUrl:e.imageUrl,emailAddress:e.primaryEmailAddress?.emailAddress,role:e.publicMetadata.role,lastSignInAt:e.lastSignInAt},e.id))}export{s as SystemUserList};
1
+ import{jsx as r}from"react/jsx-runtime";import{systemUserListReadAction as e}from"../../../../server/clerk/actions/systemUsers.js";import{SystemUserListCard as a}from"./SystemUserListCard.js";async function s(s){return(await e(s)).data.map(e=>r(a,{id:e.id,fullName:e.fullName,imageUrl:e.imageUrl,emailAddress:e.primaryEmailAddress?.emailAddress,role:e.publicMetadata.role,lastSignInAt:e.lastSignInAt,banned:e.banned},e.id))}export{s as SystemUserList};
2
2
  //# sourceMappingURL=SystemUserList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SystemUserList.js","sources":["../../../../../src/client/ui/System/SystemUser/SystemUserList.tsx"],"sourcesContent":["import { systemUserListReadAction } from \"../../../../server/clerk/actions/systemUsers\";\nimport type { Role } from \"../../../clerk/rbacConfig\";\nimport { SystemUserListCard } from \"./SystemUserListCard\";\n\nexport async function SystemUserList(params: ClerkUserListParams) {\n const systemUserList = await systemUserListReadAction(params);\n return systemUserList.data.map((user) => (\n <SystemUserListCard\n key={user.id}\n id={user.id}\n fullName={user.fullName}\n imageUrl={user.imageUrl}\n emailAddress={user.primaryEmailAddress?.emailAddress}\n role={user.publicMetadata.role as Role}\n lastSignInAt={user.lastSignInAt}\n />\n ));\n}\n"],"names":["async","SystemUserList","params","systemUserListReadAction","data","map","user","_jsx","SystemUserListCard","id","fullName","imageUrl","emailAddress","primaryEmailAddress","role","publicMetadata","lastSignInAt"],"mappings":"gMAIOA,eAAeC,EAAeC,GAEnC,aAD6BC,EAAyBD,IAChCE,KAAKC,IAAKC,GAC9BC,EAACC,EAAkB,CAEjBC,GAAIH,EAAKG,GACTC,SAAUJ,EAAKI,SACfC,SAAUL,EAAKK,SACfC,aAAcN,EAAKO,qBAAqBD,aACxCE,KAAMR,EAAKS,eAAeD,KAC1BE,aAAcV,EAAKU,cANdV,EAAKG,IAShB"}
1
+ {"version":3,"file":"SystemUserList.js","sources":["../../../../../src/client/ui/System/SystemUser/SystemUserList.tsx"],"sourcesContent":["import { systemUserListReadAction } from \"../../../../server/clerk/actions/systemUsers\";\nimport type { Role } from \"../../../clerk/rbacConfig\";\nimport { SystemUserListCard } from \"./SystemUserListCard\";\n\nexport async function SystemUserList(params: ClerkUserListParams) {\n const systemUserList = await systemUserListReadAction(params);\n return systemUserList.data.map((user) => (\n <SystemUserListCard\n key={user.id}\n id={user.id}\n fullName={user.fullName}\n imageUrl={user.imageUrl}\n emailAddress={user.primaryEmailAddress?.emailAddress}\n role={user.publicMetadata.role as Role}\n lastSignInAt={user.lastSignInAt}\n banned={user.banned}\n />\n ));\n}\n"],"names":["async","SystemUserList","params","systemUserListReadAction","data","map","user","_jsx","SystemUserListCard","id","fullName","imageUrl","emailAddress","primaryEmailAddress","role","publicMetadata","lastSignInAt","banned"],"mappings":"gMAIOA,eAAeC,EAAeC,GAEnC,aAD6BC,EAAyBD,IAChCE,KAAKC,IAAKC,GAC9BC,EAACC,EAAkB,CAEjBC,GAAIH,EAAKG,GACTC,SAAUJ,EAAKI,SACfC,SAAUL,EAAKK,SACfC,aAAcN,EAAKO,qBAAqBD,aACxCE,KAAMR,EAAKS,eAAeD,KAC1BE,aAAcV,EAAKU,aACnBC,OAAQX,EAAKW,QAPRX,EAAKG,IAUhB"}
@@ -1,2 +1,2 @@
1
- import{jsxs as i,Fragment as r,jsx as t}from"react/jsx-runtime";import{Button as o}from"@studiocubics/components";import{Search as e,ChartNoAxesGantt as n}from"lucide-react";import{InvitationCreateDialog as s}from"../Invitations/InvitationListActions.js";function m(){return i(r,{children:[t(s,{}),t(o,{size:"sm",square:!0,children:t(e,{})}),t(o,{size:"sm",square:!0,children:t(n,{})})]})}export{m as SystemUserListActions};
1
+ import{jsxs as t,Fragment as r,jsx as i}from"react/jsx-runtime";import{InvitationCreateDialog as o}from"../Invitations/InvitationListActions.js";import{NextSSRSearchInput as e}from"@studiocubics/next";import{SystemUserListSort as n}from"./SystemUserListSort.js";function m(){return t(r,{children:[i(o,{}),i(n,{}),i(e,{variant:"collapsible",placeholder:"Enter name or email"})]})}export{m as SystemUserListActions};
2
2
  //# sourceMappingURL=SystemUserListActions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SystemUserListActions.js","sources":["../../../../../src/client/ui/System/SystemUser/SystemUserListActions.tsx"],"sourcesContent":["import { Button } from \"@studiocubics/components\";\nimport { Search, ChartNoAxesGantt } from \"lucide-react\";\nimport { InvitationCreateDialog } from \"../Invitations/InvitationListActions\";\n\nexport function SystemUserListActions() {\n return (\n <>\n <InvitationCreateDialog />\n <Button size=\"sm\" square>\n <Search />\n </Button>\n <Button size=\"sm\" square>\n <ChartNoAxesGantt />\n </Button>\n </>\n );\n}\n"],"names":["SystemUserListActions","_jsxs","_Fragment","children","_jsx","InvitationCreateDialog","Button","size","square","Search","ChartNoAxesGantt"],"mappings":"wQAIgBA,IACd,OACEC,EAAAC,EAAA,CAAAC,SAAA,CACEC,EAACC,MACDD,EAACE,EAAM,CAACC,KAAK,KAAKC,mBAChBJ,EAACK,EAAM,CAAA,KAETL,EAACE,EAAM,CAACC,KAAK,KAAKC,QAAM,EAAAL,SACtBC,EAACM,EAAgB,CAAA,OAIzB"}
1
+ {"version":3,"file":"SystemUserListActions.js","sources":["../../../../../src/client/ui/System/SystemUser/SystemUserListActions.tsx"],"sourcesContent":["import { InvitationCreateDialog } from \"../Invitations/InvitationListActions\";\nimport { NextSSRSearchInput } from \"@studiocubics/next\";\nimport { SystemUserListSort } from \"./SystemUserListSort\";\n\nexport function SystemUserListActions() {\n return (\n <>\n <InvitationCreateDialog />\n <SystemUserListSort />\n <NextSSRSearchInput\n variant=\"collapsible\"\n placeholder=\"Enter name or email\"\n />\n </>\n );\n}\n"],"names":["SystemUserListActions","_jsxs","_jsx","InvitationCreateDialog","SystemUserListSort","NextSSRSearchInput","variant","placeholder"],"mappings":"+QAIgBA,IACd,OACEC,eACEC,EAACC,MACDD,EAACE,EAAkB,CAAA,GACnBF,EAACG,EAAkB,CACjBC,QAAQ,cACRC,YAAY,0BAIpB"}
@@ -7,5 +7,6 @@ export interface SystemUserListCardProps {
7
7
  emailAddress?: NonNullable<User["primaryEmailAddress"]>["emailAddress"];
8
8
  role?: Role;
9
9
  lastSignInAt?: User["lastActiveAt"];
10
+ banned: User["banned"];
10
11
  }
11
12
  export declare function SystemUserListCard(props: SystemUserListCardProps): import("react/jsx-runtime").JSX.Element;