@schemavaults/auth-ui 0.5.56 → 0.6.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AccountCard/account_card.d.ts +1 -0
- package/dist/components/AccountCard/account_card.js +4 -2
- package/dist/components/AccountCard/account_card.js.map +1 -1
- package/dist/components/AccountCard/index.d.ts +2 -2
- package/dist/components/AccountCard/index.js +1 -1
- package/dist/components/AccountCard/index.js.map +1 -1
- package/dist/components/ApiServersCard/api_servers_card.d.ts +3 -1
- package/dist/components/ApiServersCard/api_servers_card.js +11 -2
- package/dist/components/ApiServersCard/api_servers_card.js.map +1 -1
- package/dist/components/ApiServersCard/index.d.ts +2 -2
- package/dist/components/ApiServersCard/index.js +1 -1
- package/dist/components/ApiServersCard/index.js.map +1 -1
- package/dist/components/ApiServersTable/ApiServersTable.d.ts +1 -1
- package/dist/components/ApiServersTable/ApiServersTable.js +23 -12
- package/dist/components/ApiServersTable/ApiServersTable.js.map +1 -1
- package/dist/components/ApiServersTable/columns.d.ts +1 -1
- package/dist/components/ApiServersTable/index.d.ts +4 -3
- package/dist/components/ApiServersTable/index.js +2 -1
- package/dist/components/ApiServersTable/index.js.map +1 -1
- package/dist/components/ApiServersTable/useApiServersList.d.ts +2 -3
- package/dist/components/ApiServersTable/useApiServersList.js +14 -47
- package/dist/components/ApiServersTable/useApiServersList.js.map +1 -1
- package/dist/components/AppsCard/apps_card.d.ts +3 -1
- package/dist/components/AppsCard/apps_card.js +13 -5
- package/dist/components/AppsCard/apps_card.js.map +1 -1
- package/dist/components/AppsCard/index.d.ts +3 -2
- package/dist/components/AppsCard/index.js +2 -1
- package/dist/components/AppsCard/index.js.map +1 -1
- package/dist/components/AppsTable/AppDomainsList.d.ts +2 -1
- package/dist/components/AppsTable/AppDomainsList.js +11 -5
- package/dist/components/AppsTable/AppDomainsList.js.map +1 -1
- package/dist/components/AppsTable/AppsTable.js +9 -13
- package/dist/components/AppsTable/AppsTable.js.map +1 -1
- package/dist/components/AppsTable/columns.d.ts +1 -1
- package/dist/components/AppsTable/columns.js +1 -1
- package/dist/components/AppsTable/columns.js.map +1 -1
- package/dist/components/AppsTable/frontend_app_actions.js +1 -3
- package/dist/components/AppsTable/frontend_app_actions.js.map +1 -1
- package/dist/components/AppsTable/index.d.ts +4 -3
- package/dist/components/AppsTable/index.js +2 -1
- package/dist/components/AppsTable/index.js.map +1 -1
- package/dist/components/AppsTable/send-authorize-app-request.d.ts +1 -3
- package/dist/components/AppsTable/send-authorize-app-request.js +3 -33
- package/dist/components/AppsTable/send-authorize-app-request.js.map +1 -1
- package/dist/components/AppsTable/useAppDomains.js +2 -43
- package/dist/components/AppsTable/useAppDomains.js.map +1 -1
- package/dist/components/AppsTable/useAppsList.d.ts +3 -24
- package/dist/components/AppsTable/useAppsList.js +12 -46
- package/dist/components/AppsTable/useAppsList.js.map +1 -1
- package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialog.d.ts +10 -1
- package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialog.js +24 -36
- package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialog.js.map +1 -1
- package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialogOpenDispatchContext.d.ts +2 -0
- package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialogOpenDispatchContext.js +8 -0
- package/dist/components/ConnectAppToApiDialog/ConnectAppToApiDialogOpenDispatchContext.js.map +1 -0
- package/dist/components/ConnectAppToApiDialog/index.d.ts +3 -2
- package/dist/components/ConnectAppToApiDialog/index.js +2 -1
- package/dist/components/ConnectAppToApiDialog/index.js.map +1 -1
- package/dist/components/CreateApiServerDialog/CreateApiServerDialog.d.ts +8 -1
- package/dist/components/CreateApiServerDialog/CreateApiServerDialog.js +13 -117
- package/dist/components/CreateApiServerDialog/CreateApiServerDialog.js.map +1 -1
- package/dist/components/CreateApiServerDialog/CreateApiServerDialogOpenDispatchContext.d.ts +2 -0
- package/dist/components/CreateApiServerDialog/CreateApiServerDialogOpenDispatchContext.js +8 -0
- package/dist/components/CreateApiServerDialog/CreateApiServerDialogOpenDispatchContext.js.map +1 -0
- package/dist/components/CreateApiServerDialog/CreateApiServerForm.d.ts +11 -0
- package/dist/components/CreateApiServerDialog/CreateApiServerForm.js +86 -0
- package/dist/components/CreateApiServerDialog/CreateApiServerForm.js.map +1 -0
- package/dist/components/CreateApiServerDialog/index.d.ts +3 -2
- package/dist/components/CreateApiServerDialog/index.js +2 -1
- package/dist/components/CreateApiServerDialog/index.js.map +1 -1
- package/dist/components/CreateAppDialog/CreateAppDialog.d.ts +9 -2
- package/dist/components/CreateAppDialog/CreateAppDialog.js +11 -138
- package/dist/components/CreateAppDialog/CreateAppDialog.js.map +1 -1
- package/dist/components/CreateAppDialog/CreateAppDialogOpenDispatchContext.d.ts +2 -0
- package/dist/components/CreateAppDialog/CreateAppDialogOpenDispatchContext.js +8 -0
- package/dist/components/CreateAppDialog/CreateAppDialogOpenDispatchContext.js.map +1 -0
- package/dist/components/CreateAppDialog/CreateAppForm.d.ts +10 -0
- package/dist/components/CreateAppDialog/CreateAppForm.js +119 -0
- package/dist/components/CreateAppDialog/CreateAppForm.js.map +1 -0
- package/dist/components/CreateAppDialog/index.d.ts +3 -2
- package/dist/components/CreateAppDialog/index.js +2 -1
- package/dist/components/CreateAppDialog/index.js.map +1 -1
- package/dist/components/CreateAppDomainDialog/CreateAppDomainDialog.js +3 -33
- package/dist/components/CreateAppDomainDialog/CreateAppDomainDialog.js.map +1 -1
- package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialog.d.ts +10 -2
- package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialog.js +11 -121
- package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialog.js.map +1 -1
- package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialogDispatchContext.d.ts +2 -0
- package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialogDispatchContext.js +8 -0
- package/dist/components/CreateInviteCodeDialog/CreateInviteCodeDialogDispatchContext.js.map +1 -0
- package/dist/components/CreateInviteCodeDialog/CreateInviteCodeForm.d.ts +6 -0
- package/dist/components/CreateInviteCodeDialog/CreateInviteCodeForm.js +113 -0
- package/dist/components/CreateInviteCodeDialog/CreateInviteCodeForm.js.map +1 -0
- package/dist/components/CreateInviteCodeDialog/index.d.ts +3 -1
- package/dist/components/CreateInviteCodeDialog/index.js +2 -1
- package/dist/components/CreateInviteCodeDialog/index.js.map +1 -1
- package/dist/components/CreateOrganizationDialog/CreateOrganizationDialog.d.ts +10 -6
- package/dist/components/CreateOrganizationDialog/CreateOrganizationDialog.js +12 -113
- package/dist/components/CreateOrganizationDialog/CreateOrganizationDialog.js.map +1 -1
- package/dist/components/CreateOrganizationDialog/CreateOrganizationDialogDispatchContext.d.ts +2 -0
- package/dist/components/CreateOrganizationDialog/CreateOrganizationDialogDispatchContext.js +8 -0
- package/dist/components/CreateOrganizationDialog/CreateOrganizationDialogDispatchContext.js.map +1 -0
- package/dist/components/CreateOrganizationDialog/CreateOrganizationForm.d.ts +6 -0
- package/dist/components/CreateOrganizationDialog/CreateOrganizationForm.js +113 -0
- package/dist/components/CreateOrganizationDialog/CreateOrganizationForm.js.map +1 -0
- package/dist/components/CreateOrganizationDialog/index.d.ts +3 -2
- package/dist/components/CreateOrganizationDialog/index.js +2 -1
- package/dist/components/CreateOrganizationDialog/index.js.map +1 -1
- package/dist/components/InviteCodesCard/InviteCodesCard.d.ts +2 -2
- package/dist/components/InviteCodesCard/InviteCodesCard.js +4 -65
- package/dist/components/InviteCodesCard/InviteCodesCard.js.map +1 -1
- package/dist/components/InviteCodesTable/InviteCodesTable.d.ts +5 -5
- package/dist/components/InviteCodesTable/InviteCodesTable.js +18 -7
- package/dist/components/InviteCodesTable/InviteCodesTable.js.map +1 -1
- package/dist/components/InviteCodesTable/columns.d.ts +1 -1
- package/dist/components/InviteCodesTable/index.d.ts +2 -0
- package/dist/components/InviteCodesTable/index.js +1 -0
- package/dist/components/InviteCodesTable/index.js.map +1 -1
- package/dist/components/InviteCodesTable/useAllInviteCodes.d.ts +10 -0
- package/dist/components/InviteCodesTable/useAllInviteCodes.js +56 -0
- package/dist/components/InviteCodesTable/useAllInviteCodes.js.map +1 -0
- package/dist/components/InviteMemberDialog/InviteMemberDialog.d.ts +12 -0
- package/dist/components/InviteMemberDialog/InviteMemberDialog.js +79 -0
- package/dist/components/InviteMemberDialog/InviteMemberDialog.js.map +1 -0
- package/dist/components/InviteMemberDialog/index.d.ts +2 -0
- package/dist/components/InviteMemberDialog/index.js +2 -0
- package/dist/components/InviteMemberDialog/index.js.map +1 -0
- package/dist/components/OrganizationMembersCard/OrganizationMembersCard.d.ts +2 -0
- package/dist/components/OrganizationMembersCard/OrganizationMembersCard.js +2 -23
- package/dist/components/OrganizationMembersCard/OrganizationMembersCard.js.map +1 -1
- package/dist/components/OrganizationMembersTable/OrganizationMembersTable.d.ts +4 -1
- package/dist/components/OrganizationMembersTable/OrganizationMembersTable.js +4 -3
- package/dist/components/OrganizationMembersTable/OrganizationMembersTable.js.map +1 -1
- package/dist/components/OrganizationMembersTable/columns.d.ts +1 -1
- package/dist/components/OrganizationMembersTable/columns.js +3 -3
- package/dist/components/OrganizationMembersTable/columns.js.map +1 -1
- package/dist/components/OrganizationsCard/OrganizationsCard.d.ts +2 -2
- package/dist/components/OrganizationsCard/OrganizationsCard.js +4 -65
- package/dist/components/OrganizationsCard/OrganizationsCard.js.map +1 -1
- package/dist/components/OrganizationsTable/OrganizationsTable.d.ts +2 -3
- package/dist/components/OrganizationsTable/OrganizationsTable.js +12 -8
- package/dist/components/OrganizationsTable/OrganizationsTable.js.map +1 -1
- package/dist/components/OrganizationsTable/columns.d.ts +1 -1
- package/dist/components/OrganizationsTable/columns.js.map +1 -1
- package/dist/components/OrganizationsTable/index.d.ts +3 -1
- package/dist/components/OrganizationsTable/index.js +2 -1
- package/dist/components/OrganizationsTable/index.js.map +1 -1
- package/dist/components/OrganizationsTable/useAllOrganizationsList.d.ts +8 -0
- package/dist/components/OrganizationsTable/useAllOrganizationsList.js +58 -0
- package/dist/components/OrganizationsTable/useAllOrganizationsList.js.map +1 -0
- package/dist/components/UsersCard/UsersCard.js +1 -22
- package/dist/components/UsersCard/UsersCard.js.map +1 -1
- package/dist/components/UsersTable/columns.d.ts +1 -1
- package/dist/components/UsersTable/columns.js +1 -1
- package/dist/components/UsersTable/columns.js.map +1 -1
- package/dist/components/index.d.ts +7 -5
- package/dist/components/index.js +3 -2
- package/dist/components/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, KeyValueWithSkeleton, cn, } from "@schemavaults/ui";
|
|
4
4
|
import SignOutButton from "../SignOutButton";
|
|
5
5
|
import ViewFullUserProfileButton from "./view_full_user_profile";
|
|
@@ -8,10 +8,11 @@ import { getHardcodedClientWebAppDomain, SCHEMAVAULTS_AUTH_APP_DEFINITION, } fro
|
|
|
8
8
|
import { Building2 } from "lucide-react";
|
|
9
9
|
export function AccountDetailsCard(props) {
|
|
10
10
|
const currentUser = props.user;
|
|
11
|
+
const Link = props.Link;
|
|
11
12
|
const auth_server_uri = getHardcodedClientWebAppDomain(SCHEMAVAULTS_AUTH_APP_DEFINITION.app_id, props.appEnvironment);
|
|
12
13
|
const cardClassName = cn("w-full", props.cardClassName);
|
|
13
14
|
const showLinkToAuthServerAccountPage = !props.isAuthServerAccountPage;
|
|
14
|
-
return (_jsxs(Card, { className: cardClassName, children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Account Details" }), _jsx(CardDescription, { children: "View and manage your SchemaVaults account." })] }),
|
|
15
|
+
return (_jsxs(Card, { className: cardClassName, children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: "Account Details" }), _jsx(CardDescription, { children: "View and manage your SchemaVaults account." })] }), _jsx(CardContent, { children: _jsxs("div", { className: "flex flex-col items-start justify-start gap-2", children: [_jsx(KeyValueWithSkeleton, { label: "User ID", value: currentUser?.uid }), _jsx(KeyValueWithSkeleton, { label: "Email", value: currentUser?.email }), props.isAuthServerAccountPage && (_jsxs("div", { className: "flex flex-row items-center justify-start gap-2 flex-wrap", children: [_jsx("h3", { className: "text-lg font-bold", children: "Organizations:" }), props.organizations && props.organizations.length > 0 ? (_jsx(_Fragment, { children: props.organizations.map((org) => (_jsx(Link, { href: `/org/${org.organization_id}`, children: _jsxs(Button, { variant: "outline", size: "sm", className: "flex flex-row flex-nowrap gap-2", children: [_jsx(Building2, { className: "h-4 w-4" }), org.name] }) }, org.organization_id))) })) : (_jsx("p", { className: "text-sm text-muted-foreground", children: "No organizations" }))] }))] }) }), _jsx(CardFooter, { children: _jsxs("div", { className: "flex flex-row items-start justify-start flex-wrap gap-2", children: [_jsx(SignOutButton, { Link: props.Link }), showLinkToAuthServerAccountPage && (_jsx(ViewFullUserProfileButton, { navigate: async () => {
|
|
15
16
|
const accountUrl = `${auth_server_uri}/account`;
|
|
16
17
|
await props.redirect(accountUrl);
|
|
17
18
|
} })), _jsx(ViewAdminDashboardButton, { navigate: async () => {
|
|
@@ -19,4 +20,5 @@ export function AccountDetailsCard(props) {
|
|
|
19
20
|
await props.redirect(accountUrl);
|
|
20
21
|
}, admin: props.isAdmin })] }) })] }));
|
|
21
22
|
}
|
|
23
|
+
export default AccountDetailsCard;
|
|
22
24
|
//# sourceMappingURL=account_card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account_card.js","sourceRoot":"","sources":["../../../src/components/AccountCard/account_card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,EAAE,GACH,MAAM,kBAAkB,CAAC;AAG1B,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,yBAAyB,MAAM,0BAA0B,CAAC;AACjE,OAAO,wBAAwB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,GAEjC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAazC,MAAM,UAAU,kBAAkB,CAChC,KAA8B;IAE9B,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"account_card.js","sourceRoot":"","sources":["../../../src/components/AccountCard/account_card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,EAAE,GACH,MAAM,kBAAkB,CAAC;AAG1B,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,yBAAyB,MAAM,0BAA0B,CAAC;AACjE,OAAO,wBAAwB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,GAEjC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAazC,MAAM,UAAU,kBAAkB,CAChC,KAA8B;IAE9B,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC;IAC/B,MAAM,IAAI,GAA4C,KAAK,CAAC,IAAI,CAAC;IAEjE,MAAM,eAAe,GAAW,8BAA8B,CAC5D,gCAAgC,CAAC,MAAM,EACvC,KAAK,CAAC,cAAc,CACrB,CAAC;IAEF,MAAM,aAAa,GAAW,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAEhE,MAAM,+BAA+B,GACnC,CAAC,KAAK,CAAC,uBA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UAAoC,CAAC;gCACzD,MAAM,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;4BACnC,CAAC,GACD,CACH,EACD,KAAC,wBAAwB,IACvB,QAAQ,EAAE,KAAK,IAAI,EAAE;gCACnB,MAAM,UAAU,GAAG,GAAG,eAAe,QAAiB,CAAC;gCACvD,MAAM,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;4BACnC,CAAC,EACD,KAAK,EAAE,KAAK,CAAC,OAAO,GACpB,IACE,GACK,IACR,CACR,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type * from
|
|
1
|
+
export { AccountDetailsCard, AccountDetailsCard as default, AccountDetailsCard as AccountCard, } from "./account_card";
|
|
2
|
+
export type * from "./account_card";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { AccountDetailsCard, AccountDetailsCard as default, AccountDetailsCard as AccountCard, } from "./account_card";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AccountCard/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AccountCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,IAAI,OAAO,EAC7B,kBAAkB,IAAI,WAAW,GAClC,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
2
|
import type { ListApiServersQueryType } from "@schemavaults/app-definitions";
|
|
3
3
|
import { type PreloadedApiServersTableData } from "../ApiServersTable";
|
|
4
4
|
export interface ApiServersCardProps {
|
|
@@ -8,5 +8,7 @@ export interface ApiServersCardProps {
|
|
|
8
8
|
queryType: ListApiServersQueryType;
|
|
9
9
|
organization_id?: string;
|
|
10
10
|
preloaded?: PreloadedApiServersTableData;
|
|
11
|
+
uuid: () => string;
|
|
11
12
|
}
|
|
12
13
|
export declare function ApiServersCard(props: ApiServersCardProps): ReactElement;
|
|
14
|
+
export default ApiServersCard;
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
3
4
|
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, } from "@schemavaults/ui";
|
|
4
|
-
import { ApiServersTable } from "../ApiServersTable";
|
|
5
|
+
import { ApiServersTable, clearUseApiServersCache, } from "../ApiServersTable";
|
|
6
|
+
import CreateApiServerDialog, { CreateApiServerDialogOpenDispatchContext, } from "../CreateApiServerDialog";
|
|
7
|
+
import { SCHEMAVAULTS_ORGANIZATION_ID } from "@schemavaults/auth-common";
|
|
8
|
+
import ConnectAppToApiDialog, { ConnectAppToApiDialogOpenDispatchContext, } from "../ConnectAppToApiDialog";
|
|
5
9
|
export function ApiServersCard(props) {
|
|
6
10
|
const cardTitle = props.cardTitle ?? "API Servers";
|
|
7
11
|
const cardDescription = props.cardDescription ??
|
|
8
12
|
"View and manage backend API servers accessible from client applications.";
|
|
9
13
|
const cardClassName = cn("w-full", props.cardClassName);
|
|
10
|
-
|
|
14
|
+
const [createApiServerDialogOpen, setCreateApiServerDialogOpen] = useState(false);
|
|
15
|
+
const [connectAppToApiDialogOpen, setConnectAppToApiDialogOpen] = useState(false);
|
|
16
|
+
return (_jsx(CreateApiServerDialogOpenDispatchContext.Provider, { value: setCreateApiServerDialogOpen, children: _jsxs(ConnectAppToApiDialogOpenDispatchContext.Provider, { value: setConnectAppToApiDialogOpen, children: [_jsxs(Card, { className: cardClassName, children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: cardTitle }), _jsx(CardDescription, { children: cardDescription })] }), _jsx(CardContent, { children: _jsx(ApiServersTable, { queryType: props.queryType, organization_id: props.organization_id, preloaded: props.preloaded }) }), _jsx(CardFooter, { children: _jsx("div", { className: "flex flex-row items-start justify-start gap-2" }) })] }), _jsx(CreateApiServerDialog, { clearApiServersCache: clearUseApiServersCache, owner_organization_id: props.queryType === "all"
|
|
17
|
+
? SCHEMAVAULTS_ORGANIZATION_ID
|
|
18
|
+
: props.organization_id, open: createApiServerDialogOpen, onOpenChange: setCreateApiServerDialogOpen, uuid: props.uuid }), props.queryType === "all" && (_jsx(ConnectAppToApiDialog, { open: connectAppToApiDialogOpen, onOpenChange: setConnectAppToApiDialogOpen }))] }) }));
|
|
11
19
|
}
|
|
20
|
+
export default ApiServersCard;
|
|
12
21
|
//# sourceMappingURL=api_servers_card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_servers_card.js","sourceRoot":"","sources":["../../../src/components/ApiServersCard/api_servers_card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"api_servers_card.js","sourceRoot":"","sources":["../../../src/components/ApiServersCard/api_servers_card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAqB,MAAM,OAAO,CAAC;AACpD,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,EAAE,GACH,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,eAAe,EACf,uBAAuB,GAExB,MAAM,8BAA8B,CAAC;AACtC,OAAO,qBAAqB,EAAE,EAC5B,wCAAwC,GACzC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,qBAAqB,EAAE,EAC5B,wCAAwC,GACzC,MAAM,oCAAoC,CAAC;AAY5C,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS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,CACrD,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type * from
|
|
1
|
+
export { ApiServersCard, ApiServersCard as default } from "./api_servers_card";
|
|
2
|
+
export type * from "./api_servers_card";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ApiServersCard, ApiServersCard as default } from "./api_servers_card";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ApiServersCard/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ApiServersCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
2
|
import type { ListApiServersQueryType } from "@schemavaults/app-definitions";
|
|
3
3
|
import type { PreloadedApiServersTableData } from "./preloaded_api_servers_table_data";
|
|
4
4
|
export interface ApiServersDatatableProps {
|
|
@@ -1,22 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useContext, useMemo } from "react";
|
|
4
4
|
import { Datatable } from "@schemavaults/ui";
|
|
5
5
|
import { columns } from "./columns";
|
|
6
|
-
import { SCHEMAVAULTS_ORGANIZATION_ID } from "@schemavaults/auth-common";
|
|
7
6
|
import { Loader2 } from "lucide-react";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { useApiServersList } from "./useApiServersList";
|
|
8
|
+
import { CreateApiServerDialogOpenDispatchContext, CreateApiServerDialogTrigger, } from "../CreateApiServerDialog";
|
|
9
|
+
import { ConnectAppToApiDialogOpenDispatchContext, ConnectAppToApiDialogTrigger, } from "../ConnectAppToApiDialog";
|
|
10
|
+
function ApiServersTableHeaderButtons({ queryType, }) {
|
|
11
|
+
const onOpenChangeCreateApi = useContext(CreateApiServerDialogOpenDispatchContext);
|
|
12
|
+
const onOpenChangeConnectAppToApi = useContext(ConnectAppToApiDialogOpenDispatchContext);
|
|
13
|
+
return (_jsxs(_Fragment, { children: [(queryType === "all" || queryType === "org") && (_jsx(CreateApiServerDialogTrigger, { onOpenChange: onOpenChangeCreateApi })), queryType === "all" && (_jsx(ConnectAppToApiDialogTrigger, { onOpenChange: onOpenChangeConnectAppToApi }))] }));
|
|
14
|
+
}
|
|
11
15
|
export function ApiServersTable({ queryType, organization_id, preloaded, }) {
|
|
12
|
-
const { toast } = useToast();
|
|
13
16
|
const apis = useApiServersList({
|
|
14
|
-
toast,
|
|
15
17
|
queryType,
|
|
16
18
|
initialData: preloaded ? preloaded.api_servers : undefined,
|
|
17
19
|
organization_id,
|
|
18
20
|
});
|
|
19
21
|
const { isLoading, data } = apis;
|
|
22
|
+
const HeaderButtons = useMemo(() => {
|
|
23
|
+
return function ApiServersTableHeaderButtonsWithQueryType() {
|
|
24
|
+
return _jsx(ApiServersTableHeaderButtons, { queryType: queryType });
|
|
25
|
+
};
|
|
26
|
+
}, [queryType]);
|
|
27
|
+
// Assert that 'owner_organization_id' field is present from server
|
|
28
|
+
useMemo(() => {
|
|
29
|
+
if (apis.data && Array.isArray(apis.data)) {
|
|
30
|
+
if (!apis.data.every((api_server_definition) => api_server_definition.owner_organization_id)) {
|
|
31
|
+
throw new TypeError("Received API server definition that is missing 'owner_organization_id' field!");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}, [apis.data]);
|
|
20
35
|
if (!data && isLoading) {
|
|
21
36
|
return (_jsx("div", { className: "min-h-48 w-full flex items-center justify-center", children: _jsx(Loader2, { className: "h-12 w-12 animate-spin" }) }));
|
|
22
37
|
}
|
|
@@ -27,11 +42,7 @@ export function ApiServersTable({ queryType, organization_id, preloaded, }) {
|
|
|
27
42
|
api_server_name: true,
|
|
28
43
|
api_server_description: true,
|
|
29
44
|
owner_organization_id: false,
|
|
30
|
-
}, HeaderButtons:
|
|
31
|
-
return (_jsxs(_Fragment, { children: [(queryType === "all" || queryType === "org") && (_jsx(CreateApiServerDialog, { clearApiServersCache: clearUseApiServersCache, owner_organization_id: queryType === "all"
|
|
32
|
-
? SCHEMAVAULTS_ORGANIZATION_ID
|
|
33
|
-
: organization_id })), queryType === "all" && _jsx(ConnectAppToApiDialog, {})] }));
|
|
34
|
-
}, datatypeLabel: "Server", searchColumn: [
|
|
45
|
+
}, HeaderButtons: HeaderButtons, datatypeLabel: "Server", searchColumn: [
|
|
35
46
|
"api_server_id",
|
|
36
47
|
"api_server_name",
|
|
37
48
|
"api_server_description",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiServersTable.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/ApiServersTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"ApiServersTable.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/ApiServersTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAW,UAAU,EAAE,OAAO,EAAqB,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,wCAAwC,EACxC,4BAA4B,GAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,wCAAwC,EACxC,4BAA4B,GAC7B,MAA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,+EAA+E,CAChF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAEhB,IAAI,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC;QACvB,OAAO,CACL,cAAK,SAAS,EAAC,kDAAkD,YAC/D,KAAC,OAAO,IAAC,SAAS,EAAC,wBAAwB,GAAG,GAC1C,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EACtD,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE;YACrB,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI;YACZ,aAAa,EAAE,KAAK;YACpB,eAAe,EAAE,IAAI;YACrB,sBAAsB,EAAE,IAAI;YAC5B,qBAAqB,EAAE,KAAK;SAC7B,EACD,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAC,QAAQ,EACtB,YAAY,EAAE;YACZ,eAAe;YACf,iBAAiB;YACjB,wBAAwB;SACzB,GACD,CACH,CAAC;AACJ,CAAC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ColumnDef } from "@
|
|
1
|
+
import type { ColumnDef } from "@schemavaults/ui";
|
|
2
2
|
import { type SchemaVaultsApiServerDefinition } from "@schemavaults/app-definitions";
|
|
3
3
|
export declare const columns: ColumnDef<SchemaVaultsApiServerDefinition>[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { ApiServersTable } from
|
|
2
|
-
export type { ApiServersDatatableProps } from
|
|
3
|
-
export type { PreloadedApiServersTableData } from
|
|
1
|
+
export { ApiServersTable, ApiServersTable as default } from "./ApiServersTable";
|
|
2
|
+
export type { ApiServersDatatableProps } from "./ApiServersTable";
|
|
3
|
+
export type { PreloadedApiServersTableData } from "./preloaded_api_servers_table_data";
|
|
4
|
+
export { clearUseApiServersCache, useApiServersList, } from "./useApiServersList";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIhF,OAAO,EACL,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { useToast } from "@schemavaults/ui";
|
|
2
1
|
import { useSWRConfig } from "swr";
|
|
3
2
|
import { type ListApiServersQueryType, type SchemaVaultsApiServerDefinition } from "@schemavaults/app-definitions";
|
|
4
3
|
export interface UseApiServersListOptions {
|
|
5
4
|
queryType: ListApiServersQueryType;
|
|
6
|
-
toast: ReturnType<typeof useToast>["toast"];
|
|
7
5
|
initialData?: readonly SchemaVaultsApiServerDefinition[] | undefined;
|
|
8
6
|
organization_id?: string;
|
|
9
7
|
}
|
|
10
8
|
export declare function clearUseApiServersCache(mutate: ReturnType<typeof useSWRConfig>["mutate"]): void;
|
|
11
|
-
export declare function useApiServersList({
|
|
9
|
+
export declare function useApiServersList({ queryType, initialData, organization_id, }: UseApiServersListOptions): import("swr").SWRResponse<readonly {
|
|
12
10
|
api_server_id: string;
|
|
13
11
|
api_server_name: string;
|
|
14
12
|
api_server_description: string;
|
|
@@ -27,3 +25,4 @@ export declare function useApiServersList({ toast, queryType, initialData, organ
|
|
|
27
25
|
owner_organization_id?: string | null | undefined;
|
|
28
26
|
}[] | undefined;
|
|
29
27
|
}>;
|
|
28
|
+
export default useApiServersList;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAppEnvironment,
|
|
1
|
+
import { useAppEnvironment, } from "@schemavaults/auth-react-provider";
|
|
2
|
+
import { useToast } from "@schemavaults/ui";
|
|
2
3
|
import useSWR from "swr";
|
|
3
|
-
import { SCHEMAVAULTS_AUTH_APP_DEFINITION, } from "@schemavaults/app-definitions";
|
|
4
4
|
function getApiServersListEndpoint(queryType, organization_id) {
|
|
5
5
|
const searchParams = new URLSearchParams();
|
|
6
6
|
searchParams.set("list_apis_query_type", queryType);
|
|
@@ -14,47 +14,11 @@ export function clearUseApiServersCache(mutate) {
|
|
|
14
14
|
revalidate: true,
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
export function useApiServersList({
|
|
18
|
-
const
|
|
17
|
+
export function useApiServersList({ queryType, initialData, organization_id, }) {
|
|
18
|
+
const { toast } = useToast();
|
|
19
19
|
const environment = useAppEnvironment();
|
|
20
20
|
const endpoint = getApiServersListEndpoint(queryType, organization_id);
|
|
21
21
|
return useSWR(endpoint, async () => {
|
|
22
|
-
if (!auth.ready) {
|
|
23
|
-
toast({
|
|
24
|
-
variant: "destructive",
|
|
25
|
-
title: "Auth client not ready",
|
|
26
|
-
description: "Unable to acquire access token to list API servers",
|
|
27
|
-
});
|
|
28
|
-
throw new Error("Auth client not ready");
|
|
29
|
-
}
|
|
30
|
-
const authClient = auth.client.current;
|
|
31
|
-
if (!authClient) {
|
|
32
|
-
toast({
|
|
33
|
-
variant: "destructive",
|
|
34
|
-
title: "Auth client not ready",
|
|
35
|
-
description: "Unable to acquire access token to list API servers",
|
|
36
|
-
});
|
|
37
|
-
throw new Error("Auth client not ready");
|
|
38
|
-
}
|
|
39
|
-
let auth_access_jwt;
|
|
40
|
-
try {
|
|
41
|
-
const auth_jwt = await authClient.acquireAccessToken({
|
|
42
|
-
token_id: SCHEMAVAULTS_AUTH_APP_DEFINITION.app_id,
|
|
43
|
-
audience: SCHEMAVAULTS_AUTH_APP_DEFINITION.app_id,
|
|
44
|
-
});
|
|
45
|
-
if (!auth_jwt)
|
|
46
|
-
throw new Error("Failed to acquire auth access token");
|
|
47
|
-
auth_access_jwt = auth_jwt;
|
|
48
|
-
}
|
|
49
|
-
catch (e) {
|
|
50
|
-
console.error("[useApiServersList] ", e);
|
|
51
|
-
toast({
|
|
52
|
-
variant: "destructive",
|
|
53
|
-
title: "Error loading authentication access token",
|
|
54
|
-
description: e instanceof Error ? e.message : `Failed to prepare network request`,
|
|
55
|
-
});
|
|
56
|
-
throw e;
|
|
57
|
-
}
|
|
58
22
|
try {
|
|
59
23
|
const origin = window.location.origin;
|
|
60
24
|
if (environment !== "development" && environment !== "test") {
|
|
@@ -64,15 +28,13 @@ export function useApiServersList({ toast, queryType, initialData, organization_
|
|
|
64
28
|
if (environment === "development") {
|
|
65
29
|
console.log(`[useApiServersList] Sending request to endpoint "${endpoint}" from origin "${origin}"`);
|
|
66
30
|
}
|
|
67
|
-
const
|
|
68
|
-
headers: new Headers({
|
|
69
|
-
Authorization: `Bearer ${auth_access_jwt.token}`,
|
|
70
|
-
}),
|
|
31
|
+
const listApiServersResponse = await fetch(endpoint, {
|
|
71
32
|
method: "GET",
|
|
33
|
+
credentials: "include",
|
|
72
34
|
});
|
|
73
|
-
if (!
|
|
35
|
+
if (!listApiServersResponse.ok || listApiServersResponse.status !== 200)
|
|
74
36
|
throw new Error("Network request to list-apps endpoint failed");
|
|
75
|
-
const listAppsBody = await
|
|
37
|
+
const listAppsBody = await listApiServersResponse.json();
|
|
76
38
|
if (typeof listAppsBody !== "object")
|
|
77
39
|
throw new Error("Failed to list API servers; response not an object");
|
|
78
40
|
const listAppsResponseObject = listAppsBody;
|
|
@@ -80,7 +42,11 @@ export function useApiServersList({ toast, queryType, initialData, organization_
|
|
|
80
42
|
!listAppsResponseObject.success) {
|
|
81
43
|
throw new Error("List API servers response has success = false");
|
|
82
44
|
}
|
|
83
|
-
|
|
45
|
+
const apiServersList = listAppsResponseObject.list;
|
|
46
|
+
if (environment === "development") {
|
|
47
|
+
console.log("[useApiServersList] Received list of API servers: ", apiServersList);
|
|
48
|
+
}
|
|
49
|
+
return apiServersList;
|
|
84
50
|
}
|
|
85
51
|
catch (error) {
|
|
86
52
|
toast({
|
|
@@ -94,4 +60,5 @@ export function useApiServersList({ toast, queryType, initialData, organization_
|
|
|
94
60
|
fallbackData: initialData ? [...initialData] : undefined,
|
|
95
61
|
});
|
|
96
62
|
}
|
|
63
|
+
export default useApiServersList;
|
|
97
64
|
//# sourceMappingURL=useApiServersList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useApiServersList.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/useApiServersList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"useApiServersList.js","sourceRoot":"","sources":["../../../src/components/ApiServersTable/useApiServersList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,GAElB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,MAAwB,MAAM,KAAK,CAAC;AAa3C,SAAS,yBAAyB,CAChC,SAAkC,EAClC,eAAwB;IAExB,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE,CAAC;IAC3C,YAAY,CAAC,GAAG,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC;IACpD,IAAI,SAAS,KAAK,KAAK,IAAI,eAAe,EAAE,CAAC;QAC3C,YAAY,CAAC,GAAG,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,aAAa,YAAY,CAAC,QAAQ,EAAE,EAAW,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,MAAiD;IAEjD,MAAM,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,WA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AAC,MAAM,CAAC,MAAM,CAAC,sBAAsB,EAAE,SAAS,CAAC;gBACjD,CAAC,sBAAsB,CAAC,OAAO,EAC/B,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;YACnE,CAAC;YACD,MAAM,cAAc,GAClB,sBAAsB,CAAC,IAAI,CAAC;YAE9B,IAAI,WAAW,KAAK,aAAa,EAAE,CAAC;gBAClC,OAAO,CAAC,GAAG,CACT,oDAAoD,EACpD,cAAc,CACf,CAAC;YACJ,CAAC;YAED,OAAO,cAAc,CAAC;QACxB,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,KAAK,CAAC;gBACJ,OAAO,EAAE,aAAa;gBACtB,KAAK,EAAE,mCAAmC;gBAC1C,WAAW,EAAE,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,4BAA4B,EAAE;aACxF,CAAC,CAAC;YACH,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,EACD;QACE,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;KACzD,CACF,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
2
|
import { type PreloadedAppsTableDataWithDomainRefs } from "../AppsTable";
|
|
3
3
|
import type { ListAppsQueryType } from "@schemavaults/app-definitions";
|
|
4
4
|
export interface AppsCardProps {
|
|
@@ -8,5 +8,7 @@ export interface AppsCardProps {
|
|
|
8
8
|
queryType: ListAppsQueryType;
|
|
9
9
|
preloaded?: PreloadedAppsTableDataWithDomainRefs;
|
|
10
10
|
organization_id?: string;
|
|
11
|
+
uuid: () => string;
|
|
11
12
|
}
|
|
12
13
|
export declare function AppsCard(props: AppsCardProps): ReactElement;
|
|
14
|
+
export default AppsCard;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cn, } from "@schemavaults/ui";
|
|
5
|
+
import { AppsTable, clearUseAppsListCache, } from "../AppsTable";
|
|
6
|
+
import CreateAppDialog, { CreateAppDialogOpenDispatchContext, } from "../CreateAppDialog";
|
|
7
|
+
import { SCHEMAVAULTS_ORGANIZATION_ID } from "@schemavaults/auth-common";
|
|
5
8
|
export function AppsCard(props) {
|
|
6
9
|
const cardTitle = props.cardTitle ?? "Applications";
|
|
7
|
-
const cardDescription = props.cardDescription ??
|
|
10
|
+
const cardDescription = props.cardDescription ??
|
|
11
|
+
"View and manage which applications are allowed to access SchemaVaults APIs on your behalf.";
|
|
8
12
|
const cardClassName = cn("w-full", props.cardClassName);
|
|
9
|
-
|
|
13
|
+
const [createAppDialogOpen, setCreateAppDialogOpen] = useState(false);
|
|
14
|
+
return (_jsxs(CreateAppDialogOpenDispatchContext.Provider, { value: setCreateAppDialogOpen, children: [_jsxs(Card, { className: cardClassName, children: [_jsxs(CardHeader, { children: [_jsx(CardTitle, { children: cardTitle }), _jsx(CardDescription, { children: cardDescription })] }), _jsx(CardContent, { children: _jsx(AppsTable, { queryType: props.queryType, preloaded: props.preloaded, organization_id: props.organization_id }) }), _jsx(CardFooter, { children: _jsx("div", { className: "flex flex-row items-start justify-start gap-2" }) })] }), _jsx(_Fragment, { children: (props.queryType === "all" || props.queryType === "org") && (_jsx(CreateAppDialog, { clearFrontendAppsCache: clearUseAppsListCache, owner_organization_id: props.queryType === "all"
|
|
15
|
+
? SCHEMAVAULTS_ORGANIZATION_ID
|
|
16
|
+
: props.organization_id, open: createAppDialogOpen, onOpenChange: setCreateAppDialogOpen, uuid: props.uuid })) })] }));
|
|
10
17
|
}
|
|
18
|
+
export default AppsCard;
|
|
11
19
|
//# sourceMappingURL=apps_card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps_card.js","sourceRoot":"","sources":["../../../src/components/AppsCard/apps_card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"apps_card.js","sourceRoot":"","sources":["../../../src/components/AppsCard/apps_card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAqB,MAAM,OAAO,CAAC;AACpD,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,EAAE,GACH,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EACT,qBAAqB,GAEtB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,eAAe,EAAE,EACtB,kCAAkC,GACnC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAYzE,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,cAAc,CAAC;IACpD,MAAM,eAAe,GACnB,KAAK,CAAC,eAAe;QACrB,4FAA4F,CAAC;IAE/F,MAAM,aAAa,GAAW,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAChE,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GACjD,QAAQ,CAAU,KAAK,CAAC,CAAC;IAE3B,OAAO,CACL,MAAC,kCAAkC,CAAC,QAAQ,IAAC,KAAK,EAAE,sBAAsB,aACxE,MAAC,IAAI,IAAC,SAAS,EAAE,aAAa,aAC5B,MAAC,UAAU,eACT,KAAC,SAAS,cAAE,SAAS,GAAa,EAClC,KAAC,eAAe,cAAE,eAAe,GAAmB,IACzC,EACb,KAAC,WAAW,cACV,KAAC,SAAS,IACR,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,eAAe,EAAE,KAAK,CAAC,eAAe,GACtC,GACU,EACd,KAAC,UAAU,cACT,cAAK,SAAS,EAAC,+CAA+C,GAAO,GAC1D,IACR,EACP,4BACG,CAAC,KAAK,CAAC,SAAS,KAAK,KAAK,IAAI,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,IAAI,CAC3D,KAAC,eAAe,IACd,sBAAsB,EAAE,qBAAqB,EAC7C,qBAAqB,EACnB,KAAK,CAAC,SAAS,KAAK,KAAK;wBACvB,CAAC,CAAC,4BAA4B;wBAC9B,CAAC,CAAC,KAAK,CAAC,eAAe,EAE3B,IAAI,EAAE,mBAAmB,EACzB,YAAY,EAAE,sBAAsB,EACpC,IAAI,EAAE,KAAK,CAAC,IAAI,GAChB,CACH,GACA,IACyC,CAC/C,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export type * from
|
|
1
|
+
export * from "./apps_card";
|
|
2
|
+
export type * from "./apps_card";
|
|
3
|
+
export { AppsCard as default } from "./apps_card";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AppsCard/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AppsCard/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -4,4 +4,5 @@ export interface AppDomainsListProps {
|
|
|
4
4
|
app_id: string;
|
|
5
5
|
preloaded_domains?: readonly SchemaVaultsAppDomainRef[] | undefined;
|
|
6
6
|
}
|
|
7
|
-
export declare function AppDomainsList({ app_id, preloaded_domains }: AppDomainsListProps): ReactElement;
|
|
7
|
+
export declare function AppDomainsList({ app_id, preloaded_domains, }: AppDomainsListProps): ReactElement;
|
|
8
|
+
export default AppDomainsList;
|
|
@@ -2,20 +2,26 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Loader2 } from "lucide-react";
|
|
4
4
|
import { useAppDomains } from "./useAppDomains";
|
|
5
|
-
export function AppDomainsList({ app_id, preloaded_domains }) {
|
|
6
|
-
console.log("[AppDomainsList] component initialized with:", {
|
|
5
|
+
export function AppDomainsList({ app_id, preloaded_domains, }) {
|
|
6
|
+
console.log("[AppDomainsList] component initialized with:", {
|
|
7
|
+
app_id,
|
|
8
|
+
preloaded_domains,
|
|
9
|
+
});
|
|
7
10
|
const appDomains = useAppDomains({
|
|
8
11
|
app_id,
|
|
9
|
-
initialData: Array.isArray(preloaded_domains)
|
|
12
|
+
initialData: Array.isArray(preloaded_domains)
|
|
13
|
+
? preloaded_domains
|
|
14
|
+
: undefined,
|
|
10
15
|
});
|
|
11
16
|
if (!appDomains.data || !Array.isArray(appDomains.data)) {
|
|
12
17
|
return _jsx(Loader2, { className: "animate-spin" });
|
|
13
18
|
}
|
|
14
19
|
if (appDomains.data.length === 0) {
|
|
15
|
-
return
|
|
20
|
+
return _jsx("p", { className: "text-slate-300 font-light", children: "No domains found" });
|
|
16
21
|
}
|
|
17
|
-
return (_jsx("ul", { children: appDomains.data.map(appDomain => {
|
|
22
|
+
return (_jsx("ul", { children: appDomains.data.map((appDomain) => {
|
|
18
23
|
return (_jsx("li", { className: "text-foreground", children: appDomain.domain }, `app-domain-ref-${appDomain.app_domain_ref_id}`));
|
|
19
24
|
}) }));
|
|
20
25
|
}
|
|
26
|
+
export default AppDomainsList;
|
|
21
27
|
//# sourceMappingURL=AppDomainsList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppDomainsList.js","sourceRoot":"","sources":["../../../src/components/AppsTable/AppDomainsList.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"AppDomainsList.js","sourceRoot":"","sources":["../../../src/components/AppsTable/AppDomainsList.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAShD,MAAM,UAAU,cAAc,CAAC,EAC7B,MAAM,EACN,iBAAiB,GACG;IACpB,OAAO,CAAC,GAAG,CAAC,8CAA8C,EAAE;QAC1D,MAAM;QACN,iBAAiB;KAClB,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,aAAa,CAAC;QAC/B,MAAM;QACN,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC;YAC3C,CAAC,CAAC,iBAAiB;YACnB,CAAC,CAAC,SAAS;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACxD,OAAO,KAAC,OAAO,IAAC,SAAS,EAAC,cAAc,GAAG,CAAC;IAC9C,CAAC;IAED,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,YAAG,SAAS,EAAC,2BAA2B,iCAAqB,CAAC;IACvE,CAAC;IAED,OAAO,CACL,uBACG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE;YACjC,OAAO,CACL,aACE,SAAS,EAAC,iBAAiB,YAG1B,SAAS,CAAC,MAAM,IAFZ,kBAAkB,SAAS,CAAC,iBAAiB,EAAE,CAGjD,CACN,CAAC;QACJ,CAAC,CAAC,GACC,CACN,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx
|
|
3
|
-
import { useMemo } from "react";
|
|
4
|
-
import { useToast } from "@schemavaults/ui";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useContext, useMemo } from "react";
|
|
5
4
|
import { Datatable } from "@schemavaults/ui";
|
|
6
5
|
import { getAppsTableColumns } from "./columns";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { CreateAppDialog } from "../CreateAppDialog";
|
|
6
|
+
import { useAppsList } from "./useAppsList";
|
|
7
|
+
import { CreateAppDialogOpenDispatchContext, CreateAppDialogTrigger, } from "../CreateAppDialog";
|
|
10
8
|
import { Loader2 } from "lucide-react";
|
|
9
|
+
function AppsTableHeaderButtons() {
|
|
10
|
+
const onOpenChange = useContext(CreateAppDialogOpenDispatchContext);
|
|
11
|
+
return _jsx(CreateAppDialogTrigger, { onOpenChange: onOpenChange });
|
|
12
|
+
}
|
|
11
13
|
export function AppsTable({ queryType, preloaded, organization_id, }) {
|
|
12
|
-
const { toast } = useToast();
|
|
13
14
|
const apps = useAppsList({
|
|
14
|
-
toast,
|
|
15
15
|
queryType,
|
|
16
16
|
initialData: preloaded ? preloaded.apps : undefined,
|
|
17
17
|
organization_id,
|
|
@@ -31,11 +31,7 @@ export function AppsTable({ queryType, preloaded, organization_id, }) {
|
|
|
31
31
|
app_description: true,
|
|
32
32
|
owner_organization_id: false,
|
|
33
33
|
domains: true,
|
|
34
|
-
}, searchColumn: ["app_id", "app_name"], HeaderButtons:
|
|
35
|
-
return (_jsx(_Fragment, { children: (queryType === "all" || queryType === "org") && (_jsx(CreateAppDialog, { clearFrontendAppsCache: clearUseAppsListCache, owner_organization_id: queryType === "all"
|
|
36
|
-
? SCHEMAVAULTS_ORGANIZATION_ID
|
|
37
|
-
: organization_id })) }));
|
|
38
|
-
}, datatypeLabel: "App" }));
|
|
34
|
+
}, searchColumn: ["app_id", "app_name"], HeaderButtons: AppsTableHeaderButtons, datatypeLabel: "App" }));
|
|
39
35
|
}
|
|
40
36
|
export default AppsTable;
|
|
41
37
|
//# sourceMappingURL=AppsTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppsTable.js","sourceRoot":"","sources":["../../../src/components/AppsTable/AppsTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,EAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AppsTable.js","sourceRoot":"","sources":["../../../src/components/AppsTable/AppsTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,UAAU,EAAE,OAAO,EAAqB,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5C,OAAO,EACL,kCAAkC,EAClC,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAUvC,SAAS,sBAAsB;IAC7B,MAAM,YAAY,GAAG,UAAU,CAAC,kCAAkC,CAAC,CAAC;IACpE,OAAO,KAAC,sBAAsB,IAAC,YAAY,EAAE,YAAY,GAAI,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,EACxB,SAAS,EACT,SAAS,EACT,eAAe,GACI;IACnB,MAAM,IAAI,GAAmD,WAAW,CAAC;QACvE,SAAS;QACT,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QACnD,eAAe;KAChB,CAAC,CAAC;IACH,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACjC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAiC,EAAE;QACzD,OAAO,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACnD,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;IAE3B,IAAI,CAAC,IAAI,IAAI,SAAS,EAAE,CAAC;QACvB,OAAO,CACL,cAAK,SAAS,EAAC,kDAAkD,YAC/D,KAAC,OAAO,IAAC,SAAS,EAAC,wBAAwB,GAAG,GAC1C,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EACtD,OAAO,EAAE,OAAO,EAChB,qBAAqB,EAAE;YACrB,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,IAAI;YACd,eAAe,EAAE,IAAI;YACrB,qBAAqB,EAAE,KAAK;YAC5B,OAAO,EAAE,IAAI;SACd,EACD,YAAY,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,EACpC,aAAa,EAAE,sBAAsB,EACrC,aAAa,EAAC,KAAK,GACnB,CACH,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ColumnDef } from "@
|
|
1
|
+
import type { ColumnDef } from "@schemavaults/ui";
|
|
2
2
|
import type { ListAppsQueryType, SchemaVaultsApp } from "@schemavaults/app-definitions";
|
|
3
3
|
import type { PreloadedAppsTableDataWithDomainRefs } from "./preloaded_apps_table_data";
|
|
4
4
|
export declare function getAppsTableColumns(queryType: ListAppsQueryType, preloaded?: PreloadedAppsTableDataWithDomainRefs): ColumnDef<SchemaVaultsApp>[];
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Checkbox } from "@schemavaults/ui";
|
|
4
4
|
import { FrontendApplicationActions } from "./frontend_app_actions";
|
|
5
|
-
import
|
|
5
|
+
import AppDomainsList from "./AppDomainsList";
|
|
6
6
|
export function getAppsTableColumns(queryType, preloaded) {
|
|
7
7
|
const columns = [
|
|
8
8
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columns.js","sourceRoot":"","sources":["../../../src/components/AppsTable/columns.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAKb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"columns.js","sourceRoot":"","sources":["../../../src/components/AppsTable/columns.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAKb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAK5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAG9C,MAAM,UAAU,mBAAmB,CACjC,SAA4B,EAC5B,SAAgD;IAEhD,MAAM,OAAO,GAAiC;QAC5C;YACE,EAAE,EAAE,QAAQ;YACZ,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACrB,KAAC,QAAQ,IACP,OAAO,EACL,KAAK,CAAC,wBAAwB,EAAE;oBAChC,CAAC,KAAK,CAAC,yBAAyB,EAAE,IAAI,eAAe,CAAC,EAExD,eAAe,EAAE,CAAC,KAAc,EAAE,EAAE,CAClC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,KAAK,CAAC,gBAE/B,YAAY,GACvB,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