@apicurio/common-ui-components 2.0.0 → 2.0.2

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.
@@ -1,11 +1,12 @@
1
- import React, { FunctionComponent } from "react";
1
+ import { default as React, FunctionComponent } from 'react';
2
+
2
3
  /**
3
4
  * Properties
4
5
  */
5
- export type OidcAuthProps = {
6
+ export type AuthProps = {
6
7
  children: React.ReactNode;
7
8
  };
8
9
  /**
9
10
  * Protect the application with OIDC authentication.
10
11
  */
11
- export declare const ApplicationAuth: FunctionComponent<OidcAuthProps>;
12
+ export declare const ApplicationAuth: FunctionComponent<AuthProps>;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export interface AuthConfig {
3
- type: "none" | "oidc";
3
+ type: "none" | "basic" | "oidc";
4
4
  options?: any;
5
5
  }
6
- export declare const AuthConfigContext: import("react").Context<AuthConfig>;
6
+ export declare const AuthConfigContext: import('react').Context<AuthConfig>;
@@ -1,4 +1,5 @@
1
- import React, { FunctionComponent } from "react";
1
+ import { default as React, FunctionComponent } from 'react';
2
+
2
3
  /**
3
4
  * Properties
4
5
  */
@@ -1,4 +1,4 @@
1
- export * from "./AuthConfigContext";
2
- export * from "./ApplicationAuth";
3
- export * from "./IfAuth";
4
- export * from "./useAuth";
1
+ export * from './AuthConfigContext';
2
+ export * from './ApplicationAuth';
3
+ export * from './IfAuth';
4
+ export * from './useAuth';
@@ -1,12 +1,18 @@
1
1
  /** ********************************
2
2
  * AuthService interface and hook.
3
3
  ** ******************************** */
4
+ export interface UsernameAndPassword {
5
+ username: string;
6
+ password: string;
7
+ }
4
8
  export interface AuthService {
5
- isAuthEnabled: () => boolean;
9
+ isOidcAuthEnabled: () => boolean;
10
+ isBasicAuthEnabled: () => boolean;
6
11
  isAuthenticated: () => Promise<boolean>;
7
12
  getUsername: () => Promise<string | undefined>;
8
13
  getToken: () => Promise<string | undefined>;
9
- login: () => Promise<void>;
14
+ getUsernameAndPassword: () => UsernameAndPassword | undefined;
15
+ login: (username: string, password: string) => Promise<void>;
10
16
  logout: () => Promise<void>;
11
17
  }
12
18
  /**
@@ -1,4 +1,5 @@
1
- import { FunctionComponent } from "react";
1
+ import { FunctionComponent } from 'react';
2
+
2
3
  /**
3
4
  * Properties
4
5
  */
@@ -1,4 +1,5 @@
1
- import { FunctionComponent } from "react";
1
+ import { FunctionComponent } from 'react';
2
+
2
3
  export type FromNowProps = {
3
4
  date: Date | string | undefined;
4
5
  };
@@ -1,4 +1,5 @@
1
- import React, { FunctionComponent } from "react";
1
+ import { default as React, FunctionComponent } from 'react';
2
+
2
3
  /**
3
4
  * Properties
4
5
  */
@@ -1,4 +1,5 @@
1
- import React, { FunctionComponent } from "react";
1
+ import { default as React, FunctionComponent } from 'react';
2
+
2
3
  /**
3
4
  * Properties
4
5
  */
@@ -1,4 +1,5 @@
1
- import React, { FunctionComponent } from "react";
1
+ import { default as React, FunctionComponent } from 'react';
2
+
2
3
  /**
3
4
  * Properties
4
5
  */
@@ -1,4 +1,5 @@
1
- import React, { FunctionComponent } from "react";
1
+ import { default as React, FunctionComponent } from 'react';
2
+
2
3
  /**
3
4
  * Properties
4
5
  */
@@ -1,5 +1,6 @@
1
- import { FunctionComponent } from "react";
2
- import { DropdownPopperProps } from "@patternfly/react-core";
1
+ import { DropdownPopperProps } from '@patternfly/react-core';
2
+ import { FunctionComponent } from 'react';
3
+
3
4
  /**
4
5
  * Properties
5
6
  */
@@ -1,4 +1,5 @@
1
- import { FunctionComponent } from "react";
1
+ import { FunctionComponent } from 'react';
2
+
2
3
  /**
3
4
  * Properties
4
5
  */
@@ -13,6 +14,7 @@ export type ObjectSelectProps = {
13
14
  toggleId?: string;
14
15
  toggleClassname?: string;
15
16
  testId?: string;
17
+ appendTo?: "inline" | "document";
16
18
  };
17
19
  /**
18
20
  * A generic control that makes it easier to create a <Select> from an array of objects.
@@ -1,4 +1,5 @@
1
- import { FunctionComponent } from "react";
1
+ import { FunctionComponent } from 'react';
2
+
2
3
  /**
3
4
  * Properties
4
5
  */
@@ -1,4 +1,5 @@
1
- import { FunctionComponent } from "react";
1
+ import { FunctionComponent } from 'react';
2
+
2
3
  /**
3
4
  * Properties
4
5
  */
@@ -1,10 +1,10 @@
1
- export * from "./DateTime";
2
- export * from "./FromNow";
3
- export * from "./If";
4
- export * from "./IfNotEmpty";
5
- export * from "./IfNotLoading";
6
- export * from "./ListWithToolbar";
7
- export * from "./ObjectDropdown";
8
- export * from "./ObjectSelect";
9
- export * from "./ToggleIcon";
10
- export * from "./UrlUpload";
1
+ export * from './DateTime';
2
+ export * from './FromNow';
3
+ export * from './If';
4
+ export * from './IfNotEmpty';
5
+ export * from './IfNotLoading';
6
+ export * from './ListWithToolbar';
7
+ export * from './ObjectDropdown';
8
+ export * from './ObjectSelect';
9
+ export * from './ToggleIcon';
10
+ export * from './UrlUpload';
package/dist/main.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from "./auth";
2
- export * from "./common";
3
- export * from "./modals";
4
- export * from "./table";
1
+ export * from './auth';
2
+ export * from './common';
3
+ export * from './modals';
4
+ export * from './table';