diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index 40ce92de9d..495db81270 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -1893,7 +1893,7 @@ export type { } from './internal/components/samples/models'; export type { SearchHit, SearchOptions } from './internal/components/search/actions'; export type { EntityFieldFilter } from './internal/components/search/models'; -export type { SecurityAPIWrapper } from './internal/components/security/APIWrapper'; +export type { AuthenticationConfiguration, SecurityAPIWrapper } from './internal/components/security/APIWrapper'; export type { IDataViewInfo } from './internal/DataViewInfo'; export type { BSStyle } from './internal/dropdowns'; export type { MenuSectionItem } from './internal/DropdownSection'; diff --git a/packages/components/src/internal/components/security/APIWrapper.ts b/packages/components/src/internal/components/security/APIWrapper.ts index 88c29ed062..da3acbc47a 100644 --- a/packages/components/src/internal/components/security/APIWrapper.ts +++ b/packages/components/src/internal/components/security/APIWrapper.ts @@ -56,6 +56,16 @@ export interface RemoveGroupMembersResponse { removed: number[]; } +export interface AuthenticationConfiguration { + description: string; + reauthUrl: string; +} + +interface AuthenticationConfigurationResponse { + data: AuthenticationConfiguration; + success: boolean; +} + export interface SecurityAPIWrapper { addGroupMembers: (groupId: number, principalIds: number[], projectPath: string) => Promise; createApiKey: (type?: string, description?: string) => Promise; @@ -78,6 +88,7 @@ export interface SecurityAPIWrapper { ) => Promise; fetchRoles: () => Promise>; getAuditLogDate: (filterCol: string, filterVal: number | string) => Promise; + getAuthenticationConfiguration: () => Promise; getDeletionSummaries: (containerPath?: string) => Promise; getGroupMemberships: () => Promise; getInheritedContainers: (container: Container) => Promise; @@ -262,6 +273,14 @@ export class ServerSecurityAPIWrapper implements SecurityAPIWrapper { return dateRow.formattedValue ?? dateRow.value; }; + getAuthenticationConfiguration = async (): Promise => { + const { data } = await request({ + url: ActionURL.buildURL('login', 'getAuthenticationConfiguration.api'), + }); + + return data; + }; + getDeletionSummaries = async (containerPath?: string): Promise => { const { moduleSummary } = await request<{ moduleSummary: Summary[] }>({ url: ActionURL.buildURL('core', 'getModuleSummary.api', containerPath), @@ -443,6 +462,7 @@ export function getSecurityTestAPIWrapper( fetchPolicy: mockFn(), fetchRoles: mockFn(), getAuditLogDate: mockFn(), + getAuthenticationConfiguration: mockFn(), getDeletionSummaries: mockFn(), getGroupMemberships: mockFn(), getPrincipalById: mockFn(), diff --git a/packages/components/src/theme/panel.scss b/packages/components/src/theme/panel.scss index 80cd535920..1292044005 100644 --- a/packages/components/src/theme/panel.scss +++ b/packages/components/src/theme/panel.scss @@ -67,6 +67,11 @@ margin-top: 3px; } +// Override the default margin for h* elements within a panel heading +.panel-heading:is(h1, h2, h3, h4, h5, h6) { + margin: 0; +} + // revert panel heading font-size for those within a tabbed-grid-panel .tabbed-grid-panel .panel-heading {