@digital-ai/dot-components 2.0.1 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGE_LOG.md +49 -5
- package/index.esm.js +1248 -491
- package/index.umd.js +1436 -569
- package/lib/components/app-switcher/AppSwitcher.d.ts +24 -0
- package/lib/components/app-switcher/AppSwitcher.styles.d.ts +2 -0
- package/lib/components/avatar/Avatar.d.ts +2 -2
- package/lib/components/button-toggle/ButtonToggle.d.ts +3 -1
- package/lib/components/core-api/CancelablePromise.d.ts +7 -0
- package/lib/components/core-api/CoreApiProvider.d.ts +16 -0
- package/lib/components/core-api/mocks.d.ts +23 -0
- package/lib/components/core-api/openapi/core/ApiError.d.ts +8 -0
- package/lib/components/core-api/openapi/core/ApiRequestOptions.d.ts +12 -0
- package/lib/components/core-api/openapi/core/ApiResult.d.ts +7 -0
- package/lib/components/core-api/openapi/core/OpenAPI.d.ts +15 -0
- package/lib/components/core-api/openapi/core/request.d.ts +9 -0
- package/lib/components/core-api/openapi/index.d.ts +12 -0
- package/lib/components/core-api/openapi/models/AccountModel.d.ts +50 -0
- package/lib/components/core-api/openapi/models/AccountModelWrapper.d.ts +4 -0
- package/lib/components/core-api/openapi/models/AccountModelsWrapper.d.ts +6 -0
- package/lib/components/core-api/openapi/models/ApplicationInstanceStates.d.ts +4 -0
- package/lib/components/core-api/openapi/models/ApplicationModel.d.ts +67 -0
- package/lib/components/core-api/openapi/models/ApplicationModelWrapper.d.ts +4 -0
- package/lib/components/core-api/openapi/models/ApplicationModelsWrapper.d.ts +6 -0
- package/lib/components/core-api/openapi/models/PaginationModel.d.ts +22 -0
- package/lib/components/core-api/openapi/services/AccountsService.d.ts +25 -0
- package/lib/components/core-api/openapi/services/ApplicationsService.d.ts +38 -0
- package/lib/components/index.d.ts +4 -0
- package/lib/components/linear-progress/LinearProgress.d.ts +14 -0
- package/lib/components/linear-progress/LinearProgress.styles.d.ts +3 -0
- package/lib/components/linear-progress/index.d.ts +2 -0
- package/lib/components/menu/utils/constants.d.ts +2 -2
- package/lib/components/menu/utils/helpers.d.ts +1 -1
- package/lib/components/table/TablePagination.styles.d.ts +1 -0
- package/lib/theme-provider/ThemeProvider.d.ts +14 -1
- package/package.json +3 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { KeyboardEvent, MouseEvent } from 'react';
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
3
|
+
interface CommonAppSwitcherProps extends CommonProps {
|
|
4
|
+
anchorEl: Element;
|
|
5
|
+
onLeave?: (event: KeyboardEvent | MouseEvent) => void;
|
|
6
|
+
onSelect?: (event: MouseEvent | KeyboardEvent, menuId: string, itemKey: string) => void;
|
|
7
|
+
open: boolean;
|
|
8
|
+
platformConsoleUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
interface AppSwitcherViewProps extends CommonAppSwitcherProps {
|
|
11
|
+
apps: {
|
|
12
|
+
id: string;
|
|
13
|
+
instance_state?: number;
|
|
14
|
+
logo?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
url: string;
|
|
17
|
+
}[];
|
|
18
|
+
}
|
|
19
|
+
export declare const DotAppSwitcherView: ({ apps, anchorEl, className, onLeave, onSelect, open, platformConsoleUrl, }: AppSwitcherViewProps) => JSX.Element;
|
|
20
|
+
interface AppSwitcherProps extends CommonAppSwitcherProps {
|
|
21
|
+
accountId?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const DotAppSwitcher: ({ accountId, open, ...commonProps }: AppSwitcherProps) => JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const rootClassName = "dot-app-switcher";
|
|
2
|
+
export declare const StyledAppSwitcher: import("styled-components").StyledComponent<({ anchorEl, ariaLabel, className, "data-testid": dataTestId, dense, disablePortal, id, loading, maxVisibleItems, menuItemHeight, menuItems, menuPlacement, onLeave, onSelect, open, selectedKey, }: import("../menu/Menu").MenuProps) => JSX.Element, any, {}, never>;
|
|
@@ -3,11 +3,11 @@ import { CommonProps } from '../CommonProps';
|
|
|
3
3
|
export declare type AvatarSize = 'small' | 'medium' | 'large';
|
|
4
4
|
export declare type AvatarType = 'image' | 'text' | 'icon';
|
|
5
5
|
export declare type AvatarVariant = 'circular' | 'square';
|
|
6
|
-
export declare type AvatarColor = 'default' | 'green' | 'blue' | 'orange' | 'purple' | 'yellow' | 'red' | 'darkGrey' | 'lightGrey';
|
|
6
|
+
export declare type AvatarColor = 'default' | 'green' | 'blue' | 'orange' | 'purple' | 'yellow' | 'red' | 'darkGrey' | 'lightGrey' | 'transparent';
|
|
7
7
|
export interface AvatarProps extends CommonProps {
|
|
8
8
|
/** Text displayed on hover */
|
|
9
9
|
alt: string;
|
|
10
|
-
/** Color for avatar
|
|
10
|
+
/** Color for avatar */
|
|
11
11
|
color?: AvatarColor;
|
|
12
12
|
/** Used for the root node; button is used when onClick is passed. */
|
|
13
13
|
component?: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
3
|
import { ButtonToggleOption, ButtonToggleOrientation, ButtonToggleSize, ButtonToggleValue } from './utils/models';
|
|
4
|
+
export declare type ButtonToggleColor = 'standard' | 'primary';
|
|
4
5
|
export interface ButtonToggleProps extends CommonProps {
|
|
5
6
|
/** button props for each toggle button options*/
|
|
6
7
|
buttonOptions: ButtonToggleOption[];
|
|
8
|
+
color?: ButtonToggleColor;
|
|
7
9
|
/** If true, the keyboard focus ripple will be disabled */
|
|
8
10
|
disableFocusRipple?: boolean;
|
|
9
11
|
/** If true, the ripple effect will be disabled. */
|
|
@@ -19,4 +21,4 @@ export interface ButtonToggleProps extends CommonProps {
|
|
|
19
21
|
/** The value to associate with the button when selected in a ToggleButtonGroup */
|
|
20
22
|
value?: ButtonToggleValue;
|
|
21
23
|
}
|
|
22
|
-
export declare const DotButtonToggle: ({ ariaLabel, buttonOptions, className, "data-testid": dataTestId, disableFocusRipple, disableRipple, exclusive, onChange, orientation, size, value, }: ButtonToggleProps) => JSX.Element;
|
|
24
|
+
export declare const DotButtonToggle: ({ ariaLabel, buttonOptions, className, color, "data-testid": dataTestId, disableFocusRipple, disableRipple, exclusive, onChange, orientation, size, value, }: ButtonToggleProps) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare type CancelablePromise = Promise<any> & {
|
|
2
|
+
cancel: () => void;
|
|
3
|
+
};
|
|
4
|
+
export declare function makeCancelable(promise: Promise<any>): CancelablePromise;
|
|
5
|
+
export declare function useCancelablePromise(): {
|
|
6
|
+
cancelablePromise: (p: Promise<any>) => CancelablePromise;
|
|
7
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ApiError, ApplicationModel } from './openapi';
|
|
3
|
+
interface CoreApiProviderProps {
|
|
4
|
+
apiUrl: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
token?: string;
|
|
7
|
+
}
|
|
8
|
+
interface DotCoreApiContextProps {
|
|
9
|
+
applications: ApplicationModel[];
|
|
10
|
+
applicationsError: ApiError;
|
|
11
|
+
applicationsLoading: boolean;
|
|
12
|
+
loadApplications: (accountId: string, force?: boolean) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const DotCoreApiProvider: ({ apiUrl, token, children, }: CoreApiProviderProps) => JSX.Element;
|
|
15
|
+
export declare const useDotCoreApiContext: () => DotCoreApiContextProps;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const getApplicationsMock: {
|
|
2
|
+
applications: {
|
|
3
|
+
id: string;
|
|
4
|
+
product_instance_id: string;
|
|
5
|
+
account_id: string;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
created_date: string;
|
|
8
|
+
modified_date: string;
|
|
9
|
+
name: string;
|
|
10
|
+
url: string;
|
|
11
|
+
description: string;
|
|
12
|
+
alternate_label: string;
|
|
13
|
+
logo: string;
|
|
14
|
+
needs_authentication: boolean;
|
|
15
|
+
logo_product_name: string;
|
|
16
|
+
instance_state: number;
|
|
17
|
+
}[];
|
|
18
|
+
pagination: {
|
|
19
|
+
total_available: number;
|
|
20
|
+
start: number;
|
|
21
|
+
count: number;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare type ApiRequestOptions = {
|
|
2
|
+
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly cookies?: Record<string, any>;
|
|
5
|
+
readonly headers?: Record<string, any>;
|
|
6
|
+
readonly query?: Record<string, any>;
|
|
7
|
+
readonly formData?: Record<string, any>;
|
|
8
|
+
readonly body?: any;
|
|
9
|
+
readonly mediaType?: string;
|
|
10
|
+
readonly responseHeader?: string;
|
|
11
|
+
readonly errors?: Record<number, string>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ApiRequestOptions } from './ApiRequestOptions';
|
|
2
|
+
declare type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
3
|
+
declare type Headers = Record<string, string>;
|
|
4
|
+
declare type Config = {
|
|
5
|
+
BASE: string;
|
|
6
|
+
VERSION: string;
|
|
7
|
+
WITH_CREDENTIALS: boolean;
|
|
8
|
+
TOKEN?: string | Resolver<string>;
|
|
9
|
+
USERNAME?: string | Resolver<string>;
|
|
10
|
+
PASSWORD?: string | Resolver<string>;
|
|
11
|
+
HEADERS?: Headers | Resolver<Headers>;
|
|
12
|
+
ENCODE_PATH?: (path: string) => string;
|
|
13
|
+
};
|
|
14
|
+
export declare const OpenAPI: Config;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ApiRequestOptions } from './ApiRequestOptions';
|
|
2
|
+
import type { ApiResult } from './ApiResult';
|
|
3
|
+
/**
|
|
4
|
+
* Request using fetch client
|
|
5
|
+
* @param options The request options from the the service
|
|
6
|
+
* @returns ApiResult
|
|
7
|
+
* @throws ApiError
|
|
8
|
+
*/
|
|
9
|
+
export declare function request(options: ApiRequestOptions): Promise<ApiResult>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { ApiError } from './core/ApiError';
|
|
2
|
+
export { OpenAPI } from './core/OpenAPI';
|
|
3
|
+
export type { AccountModel } from './models/AccountModel';
|
|
4
|
+
export type { AccountModelsWrapper } from './models/AccountModelsWrapper';
|
|
5
|
+
export type { AccountModelWrapper } from './models/AccountModelWrapper';
|
|
6
|
+
export { ApplicationInstanceStates } from './models/ApplicationInstanceStates';
|
|
7
|
+
export { ApplicationModel } from './models/ApplicationModel';
|
|
8
|
+
export type { ApplicationModelsWrapper } from './models/ApplicationModelsWrapper';
|
|
9
|
+
export type { ApplicationModelWrapper } from './models/ApplicationModelWrapper';
|
|
10
|
+
export type { PaginationModel } from './models/PaginationModel';
|
|
11
|
+
export { AccountsService } from './services/AccountsService';
|
|
12
|
+
export { ApplicationsService } from './services/ApplicationsService';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare type AccountModel = {
|
|
2
|
+
/**
|
|
3
|
+
* Flag representing if the account has been activated and can create users, clients, and identity providers
|
|
4
|
+
*/
|
|
5
|
+
activated?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Flag representing if the account allows user self-registration
|
|
8
|
+
*/
|
|
9
|
+
allow_self_registration: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* The account creation date in ISO format
|
|
12
|
+
*/
|
|
13
|
+
created_date: string;
|
|
14
|
+
/**
|
|
15
|
+
* Flag representing if the account is enabled or not
|
|
16
|
+
*/
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* External account identifier provided
|
|
20
|
+
*/
|
|
21
|
+
external_id: string;
|
|
22
|
+
/**
|
|
23
|
+
* A dictionary of features and their enabled status on the account
|
|
24
|
+
*/
|
|
25
|
+
features?: any;
|
|
26
|
+
/**
|
|
27
|
+
* UUID Account Identifier
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
/**
|
|
31
|
+
* Custom data for the account
|
|
32
|
+
*/
|
|
33
|
+
metadata?: any;
|
|
34
|
+
/**
|
|
35
|
+
* The date that the account was last modified on in ISO format
|
|
36
|
+
*/
|
|
37
|
+
modified_date: string;
|
|
38
|
+
/**
|
|
39
|
+
* Account name (unique)
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Account vanity domain (unique)
|
|
44
|
+
*/
|
|
45
|
+
vanity_domain?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Whitelisted domains for the account
|
|
48
|
+
*/
|
|
49
|
+
whitelist_domains?: Array<string>;
|
|
50
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export declare type ApplicationModel = {
|
|
2
|
+
/**
|
|
3
|
+
* UUID Account Identifier
|
|
4
|
+
*/
|
|
5
|
+
account_id: string;
|
|
6
|
+
/**
|
|
7
|
+
* application alternate label (optional)
|
|
8
|
+
*/
|
|
9
|
+
alternate_label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The account creation date in ISO format
|
|
12
|
+
*/
|
|
13
|
+
created_date: string;
|
|
14
|
+
/**
|
|
15
|
+
* application description (optional)
|
|
16
|
+
*/
|
|
17
|
+
description?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the application is currently enabled.
|
|
20
|
+
*/
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* UUID Application Identifier
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the application requires authentication. 0 - Non-production instance, 1 - Production instance
|
|
28
|
+
*/
|
|
29
|
+
instance_state?: ApplicationModel.instance_state;
|
|
30
|
+
/**
|
|
31
|
+
* A logo image for the application encoded as a base64 string.
|
|
32
|
+
*/
|
|
33
|
+
logo?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Name of the product that this application's logo is associated with.
|
|
36
|
+
*/
|
|
37
|
+
logo_product_name?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The date that the account was last modified on in ISO format
|
|
40
|
+
*/
|
|
41
|
+
modified_date: string;
|
|
42
|
+
/**
|
|
43
|
+
* application name
|
|
44
|
+
*/
|
|
45
|
+
name: string;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the application requires authentication.
|
|
48
|
+
*/
|
|
49
|
+
needs_authentication: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* UUID Product_Instance Identifier
|
|
52
|
+
*/
|
|
53
|
+
product_instance_id?: string;
|
|
54
|
+
/**
|
|
55
|
+
* application URL
|
|
56
|
+
*/
|
|
57
|
+
url: string;
|
|
58
|
+
};
|
|
59
|
+
export declare namespace ApplicationModel {
|
|
60
|
+
/**
|
|
61
|
+
* Whether the application requires authentication. 0 - Non-production instance, 1 - Production instance
|
|
62
|
+
*/
|
|
63
|
+
enum instance_state {
|
|
64
|
+
'_0' = 0,
|
|
65
|
+
'_1' = 1
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare type PaginationModel = {
|
|
2
|
+
/**
|
|
3
|
+
* limit (number of records requested to be in the page)
|
|
4
|
+
*/
|
|
5
|
+
count?: number;
|
|
6
|
+
/**
|
|
7
|
+
* offset for the next page (number of records requested to be skipped)
|
|
8
|
+
*/
|
|
9
|
+
next_start?: number;
|
|
10
|
+
/**
|
|
11
|
+
* offset for the previous page (number of records requested to be skipped)
|
|
12
|
+
*/
|
|
13
|
+
previous_start?: number;
|
|
14
|
+
/**
|
|
15
|
+
* offset (number of records requested to be skipped)
|
|
16
|
+
*/
|
|
17
|
+
start?: number;
|
|
18
|
+
/**
|
|
19
|
+
* total number of records available in the system
|
|
20
|
+
*/
|
|
21
|
+
total_available: number;
|
|
22
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AccountModelsWrapper } from '../models/AccountModelsWrapper';
|
|
2
|
+
import type { AccountModelWrapper } from '../models/AccountModelWrapper';
|
|
3
|
+
export declare class AccountsService {
|
|
4
|
+
/**
|
|
5
|
+
* Gets all accounts.
|
|
6
|
+
* __Sortable field names__: name, external_id, vanity_domain, enabled, source, activated, created_date, modified_date
|
|
7
|
+
* __Filterable field names__: name, external_id, vanity_domain, enabled, source, activated, created_date, modified_date
|
|
8
|
+
* __Searchable field names__: name, external_id, vanity_domain (to be used with filter _search_ operator)
|
|
9
|
+
*
|
|
10
|
+
* @param start offset (number of records to skip)
|
|
11
|
+
* @param count limit (number of records to include in response)
|
|
12
|
+
* @param sort comma separated field names (prefix field name with "-" to reverse order direction)
|
|
13
|
+
* @param filter List of filters (each filter is a separate query param, and they are OR'ed)
|
|
14
|
+
* @returns AccountModelsWrapper All available accounts are returned.
|
|
15
|
+
* @throws ApiError
|
|
16
|
+
*/
|
|
17
|
+
static getAccounts(start?: number, count?: number, sort?: string, filter?: Array<string>): Promise<AccountModelsWrapper>;
|
|
18
|
+
/**
|
|
19
|
+
* Gets single account by id.
|
|
20
|
+
* @param accountId
|
|
21
|
+
* @returns AccountModelWrapper Account is returned.
|
|
22
|
+
* @throws ApiError
|
|
23
|
+
*/
|
|
24
|
+
static getAccountById(accountId: string): Promise<AccountModelWrapper>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ApplicationModelsWrapper } from '../models/ApplicationModelsWrapper';
|
|
2
|
+
import type { ApplicationModelWrapper } from '../models/ApplicationModelWrapper';
|
|
3
|
+
export declare class ApplicationsService {
|
|
4
|
+
/**
|
|
5
|
+
* Retrieves existing applications for accounts and product_instances
|
|
6
|
+
* The results can be filtered by an account and/or a product_instance.
|
|
7
|
+
* - To filter by an account. provide ***account_id*** query parameter.
|
|
8
|
+
* - To filter by a product_instance, provide ***product_instance_id*** query parameter,
|
|
9
|
+
*
|
|
10
|
+
* For example:
|
|
11
|
+
* ```
|
|
12
|
+
* GET /applications?account_id=<UUID for account>&product_instance_id=<UUID for product_instance>
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* __Sortable field names__: product_instance_id, account_id, name, url, status, description, alternate_label, created_date, modified_date
|
|
16
|
+
*
|
|
17
|
+
* __Filterable field names__: product_instance_id, account_id, name, url, status, description, alternate_label, created_date, modified_date, needs_authentication, enabled
|
|
18
|
+
*
|
|
19
|
+
* __Searchable field names__: name, url, status, description, alternate_label (to be used with filter _search_ operator)
|
|
20
|
+
*
|
|
21
|
+
* @param accountId UUID Account identifier to filter results by
|
|
22
|
+
* @param productInstanceId UUID Product_Instance identifier to filter results by
|
|
23
|
+
* @param start offset (number of records to skip)
|
|
24
|
+
* @param count limit (number of records to include in response)
|
|
25
|
+
* @param sort comma separated field names (prefix field name with "-" to reverse order direction)
|
|
26
|
+
* @param filter List of filters (each filter is a separate query param, and they are OR'ed)
|
|
27
|
+
* @returns ApplicationModelsWrapper applications are returned.
|
|
28
|
+
* @throws ApiError
|
|
29
|
+
*/
|
|
30
|
+
static retrieveApplications(accountId?: string, productInstanceId?: string, start?: number, count?: number, sort?: string, filter?: Array<string>): Promise<ApplicationModelsWrapper>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves a application by id
|
|
33
|
+
* @param applicationId
|
|
34
|
+
* @returns ApplicationModelWrapper application is returned.
|
|
35
|
+
* @throws ApiError
|
|
36
|
+
*/
|
|
37
|
+
static retrieveApplicationById(applicationId: string): Promise<ApplicationModelWrapper>;
|
|
38
|
+
}
|
|
@@ -32,10 +32,12 @@ export type { SnackbarProps, SnackbarSeverity, SnackbarOrigin, } from './snackba
|
|
|
32
32
|
export type { CharactersLimit, InlineEditProps } from './inline-edit';
|
|
33
33
|
export type { progressColorOptions, progressVariantOptions, ProgressProps, } from './progress';
|
|
34
34
|
export type { FileItemProps, FileUploadError, FileUploadProps, ListItemFile, MappedFile, MappedListItemFile, } from './file-upload';
|
|
35
|
+
export type { LinearProgressColor, LinearProgressProps, LinearProgressVariant, } from './linear-progress';
|
|
35
36
|
export { DotAccordion } from './accordion/Accordion';
|
|
36
37
|
export { DotActionToolbar } from './action-toolbar/ActionToolbar';
|
|
37
38
|
export { DotAlertBanner } from './alert-banner/AlertBanner';
|
|
38
39
|
export { DotAppLogo } from './app-logo/AppLogo';
|
|
40
|
+
export { DotAppSwitcher } from './app-switcher/AppSwitcher';
|
|
39
41
|
export { DotAppToolbar } from './app-toolbar/AppToolbar';
|
|
40
42
|
export { DotAutoComplete, parseAutoCompleteValue } from './auto-complete';
|
|
41
43
|
export { DotAvatar } from './avatar/Avatar';
|
|
@@ -52,6 +54,7 @@ export { DotCheckbox } from './checkbox/Checkbox';
|
|
|
52
54
|
export { DotCheckboxGroup } from './checkbox/CheckboxGroup';
|
|
53
55
|
export { DotChip } from './chip/Chip';
|
|
54
56
|
export { DotConfirmationDialog } from './confirmation-dialog/ConfirmationDialog';
|
|
57
|
+
export { DotCoreApiProvider } from './core-api/CoreApiProvider';
|
|
55
58
|
export { Cell, CssCell } from './css-grid/CssCell';
|
|
56
59
|
export { CssGrid } from './css-grid/CssGrid';
|
|
57
60
|
export { CssGridDebug } from './css-grid/CssGridDebug';
|
|
@@ -88,4 +91,5 @@ export { DotDivider } from './divider';
|
|
|
88
91
|
export { DotPopper } from './popper';
|
|
89
92
|
export { DotTruncateWithTooltip } from './truncate-with-tooltip';
|
|
90
93
|
export { DotDraggableList } from './draggable-list';
|
|
94
|
+
export { DotLinearProgress } from './linear-progress';
|
|
91
95
|
export { CreateUUID } from './createUUID';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CommonProps } from '../CommonProps';
|
|
2
|
+
export declare type LinearProgressColor = 'primary' | 'secondary' | 'error' | 'warning' | 'purple';
|
|
3
|
+
export declare type LinearProgressVariant = 'buffer' | 'determinate' | 'indeterminate' | 'query';
|
|
4
|
+
export interface LinearProgressProps extends CommonProps {
|
|
5
|
+
/** The color of the component. */
|
|
6
|
+
color?: LinearProgressColor;
|
|
7
|
+
/** The value of the progress indicator for the determinate and buffer variants. Value between 0 and 100. */
|
|
8
|
+
value?: number;
|
|
9
|
+
/** The value for the buffer variant. Value between 0 and 100. **/
|
|
10
|
+
valueBuffer?: number;
|
|
11
|
+
/** The variant to use. Use indeterminate or query when there is no progress value. */
|
|
12
|
+
variant?: LinearProgressVariant;
|
|
13
|
+
}
|
|
14
|
+
export declare const DotLinearProgress: ({ ariaLabel, color, className, "data-testid": dataTestId, value, valueBuffer, variant, }: LinearProgressProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const MENU_ITEM_HEIGHT_NORMAL =
|
|
2
|
-
export declare const MENU_ITEM_HEIGHT_DENSE =
|
|
1
|
+
export declare const MENU_ITEM_HEIGHT_NORMAL = 48;
|
|
2
|
+
export declare const MENU_ITEM_HEIGHT_DENSE = 36;
|
|
3
3
|
export declare const DEFAULT_MAX_VISIBLE_ITEMS = 7;
|
|
@@ -5,7 +5,7 @@ interface MaxHeightCalculationArgs {
|
|
|
5
5
|
menuItemHeight?: number | string;
|
|
6
6
|
menuItems: MenuItemProps[];
|
|
7
7
|
}
|
|
8
|
-
export declare const getDefaultItemHeight: (isDense: boolean) =>
|
|
8
|
+
export declare const getDefaultItemHeight: (isDense: boolean) => 36 | 48;
|
|
9
9
|
export declare const calculateItemHeight: (isDense: boolean, customItemHeight?: number, menuItemHeight?: number | string) => number | string;
|
|
10
10
|
export declare const getNumberOfVisibleItems: (numberOfItems: number, maxVisibleItems?: number) => number;
|
|
11
11
|
export declare const calculateMaxHeight: ({ isDense, maxVisibleItems, menuItems, menuItemHeight, }: MaxHeightCalculationArgs) => number | string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TypographyVariant } from '../typography/Typography';
|
|
2
2
|
export declare const rootClassName = "dot-table-pagination";
|
|
3
|
+
export declare const paginationItemClassName = "dot-pagination-menu-item";
|
|
3
4
|
export interface StyledTablePaginationProps {
|
|
4
5
|
typography: TypographyVariant;
|
|
5
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Theme } from '@mui/material';
|
|
3
3
|
import { TypographyOptions } from '@mui/material/styles/createTypography';
|
|
4
|
-
import { AvatarPaletteColorOptions } from '../../../../../typings/material
|
|
4
|
+
import { AvatarPaletteColorOptions } from '../../../../../typings/material';
|
|
5
5
|
export declare type ThemeOptions = 'light' | 'dark';
|
|
6
6
|
export declare const typographyOptions: TypographyOptions;
|
|
7
7
|
export declare const avatarColors: AvatarPaletteColorOptions;
|
|
@@ -12,3 +12,16 @@ export interface ThemeProviderProps {
|
|
|
12
12
|
theme?: Theme | ThemeOptions;
|
|
13
13
|
}
|
|
14
14
|
export declare function DotThemeProvider({ children, theme, }: ThemeProviderProps): JSX.Element;
|
|
15
|
+
declare module '@mui/material/LinearProgress' {
|
|
16
|
+
interface LinearProgressPropsColorOverrides {
|
|
17
|
+
purple: true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
declare module '@mui/material/styles/createPalette' {
|
|
21
|
+
interface Palette {
|
|
22
|
+
purple?: PaletteColorOptions;
|
|
23
|
+
}
|
|
24
|
+
interface PaletteOptions {
|
|
25
|
+
purple?: PaletteColorOptions;
|
|
26
|
+
}
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-ai/dot-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE.md>",
|
|
6
6
|
"contributors": [
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^17.0.2 || ^18.0.0",
|
|
37
|
-
"react-
|
|
37
|
+
"react-dom": "^17.0.2",
|
|
38
|
+
"react-router-dom": "6.4.4"
|
|
38
39
|
}
|
|
39
40
|
}
|