@ansible/ansible-ui-framework 2.4.672 → 2.4.1113
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/README.md +3 -105
- package/assets/editor.worker-CKha-MBL.js +11 -0
- package/assets/json.worker-BXgpME0S.js +42 -0
- package/assets/yaml.worker-DhJ2nZ1S.js +466 -0
- package/framework/PageActions/PageAction.d.ts +2 -0
- package/framework/PageCells/DateTimeCell.d.ts +0 -1
- package/framework/PageCells/LabelsCell.d.ts +4 -0
- package/framework/PageDashboard/PageDashboardCard.d.ts +3 -1
- package/framework/PageDetails/PageDetails.d.ts +2 -0
- package/framework/PageDetails/PageDetailsFromColumns.d.ts +2 -2
- package/framework/PageDialogs/BulkActionDialog.d.ts +3 -1
- package/framework/PageDialogs/BulkConfirmationDialog.d.ts +3 -1
- package/framework/PageDialogs/MultiSelectDialog.d.ts +1 -0
- package/framework/PageDialogs/PageDialog.d.ts +8 -3
- package/framework/PageDialogs/{SelectSingleDialog.d.ts → SingleSelectDialog.d.ts} +3 -2
- package/framework/PageForm/Inputs/FormGroupTypeAheadMultiSelect.d.ts +1 -0
- package/framework/PageForm/Inputs/PageFormAsyncMultiSelect.d.ts +1 -1
- package/framework/PageForm/Inputs/PageFormCheckbox.d.ts +3 -0
- package/framework/PageForm/Inputs/PageFormDataEditor.d.ts +30 -14
- package/framework/PageForm/Inputs/PageFormMarkdown.d.ts +19 -0
- package/framework/PageForm/Inputs/PageFormMarkdownEditor.cy.d.ts +1 -0
- package/framework/PageForm/Inputs/PageFormMultiInput.d.ts +1 -0
- package/framework/PageForm/Inputs/PageFormSecret.cy.d.ts +1 -0
- package/framework/{PageInputs/PageHiddenInput.d.ts → PageForm/Inputs/PageFormSecret.d.ts} +2 -2
- package/framework/PageForm/Inputs/PageFormSwitch.d.ts +2 -0
- package/framework/PageForm/Inputs/validation-hooks.d.ts +4 -0
- package/framework/PageForm/PageForm.d.ts +2 -0
- package/framework/PageForm/Utils/PageFormSection.d.ts +1 -0
- package/framework/PageForm/Utils/PageFormSetError.d.ts +5 -0
- package/framework/PageForm/Utils/PageFormSetValue.d.ts +5 -0
- package/framework/PageForm/Utils/PageFormWatch.d.ts +4 -3
- package/framework/PageForm/typesErrorAdapter.d.ts +1 -1
- package/framework/PageHeader.d.ts +1 -0
- package/framework/PageInputs/PageMultiSelect.d.ts +2 -0
- package/framework/PageInputs/PageSelectOption.d.ts +2 -1
- package/framework/PageInputs/PageSingleSelect.d.ts +15 -0
- package/framework/PageMasonry.d.ts +6 -0
- package/framework/PageMasthead/PageMasthead.d.ts +1 -3
- package/framework/PageMasthead/PageNotificationsIcon.d.ts +1 -4
- package/framework/PageNavigation/PageNavigationItem.d.ts +4 -0
- package/framework/PageNotifications/PageNotificationsProvider.cy.d.ts +1 -0
- package/framework/PageNotifications/PageNotificationsProvider.d.ts +27 -0
- package/framework/PageTable/PageTable.d.ts +1 -0
- package/framework/PageTable/PageTableCard.d.ts +3 -3
- package/framework/PageTable/PageTableColumn.d.ts +103 -80
- package/framework/PageTable/useTableItems.d.ts +2 -5
- package/framework/PageTabs/PageBreadcrumbs.d.ts +11 -0
- package/framework/PageTabs/PageRoutedTabs.d.ts +6 -0
- package/framework/PageTabs/PageTabs.d.ts +1 -0
- package/framework/PageToolbar/PageToolbar.d.ts +2 -0
- package/framework/PageToolbar/PageToolbarFilter.d.ts +10 -8
- package/framework/PageToolbar/PageToolbarFilters/ToolbarAsyncMultiSelectFilter.d.ts +7 -2
- package/framework/PageToolbar/PageToolbarFilters/ToolbarAsyncSelectFilterBuilder.d.ts +4 -2
- package/framework/PageToolbar/PageToolbarFilters/ToolbarAsyncSingleSelectFilter.d.ts +2 -1
- package/framework/PageToolbar/PageToolbarFilters/ToolbarTextFilter.d.ts +16 -5
- package/framework/PageWizard/PageWizard.d.ts +3 -1
- package/framework/PageWizard/PageWizardBody.d.ts +2 -6
- package/framework/PageWizard/PageWizardFooter.d.ts +1 -1
- package/framework/PageWizard/PageWizardHeader.d.ts +5 -0
- package/framework/PageWizard/PageWizardNavigation.d.ts +1 -1
- package/framework/PageWizard/PageWizardProvider.d.ts +1 -0
- package/framework/PageWizard/PageWizardToggle.d.ts +1 -1
- package/framework/PageWizard/index.d.ts +1 -1
- package/framework/PageWizard/types.d.ts +12 -1
- package/framework/Settings.d.ts +2 -0
- package/framework/components/DataEditor.d.ts +12 -0
- package/framework/components/DropZone.d.ts +7 -0
- package/framework/components/ErrorBoundary.d.ts +3 -3
- package/framework/components/IconButton.d.ts +2 -0
- package/framework/components/Scrollable.d.ts +3 -1
- package/framework/components/icons/ExpandIcon.d.ts +4 -0
- package/framework/components/icons/RunningIcon.d.ts +1 -1
- package/framework/hooks/useID.d.ts +1 -0
- package/framework/index.d.ts +0 -1
- package/framework/publish/assets/editor.worker-CKha-MBL.d.ts +0 -0
- package/framework/publish/assets/json.worker-BXgpME0S.d.ts +3 -0
- package/framework/publish/assets/yaml.worker-DhJ2nZ1S.d.ts +3 -0
- package/framework/publish/index.d.ts +166 -141
- package/framework/utils/codeEditorUtils.d.ts +0 -4
- package/framework/utils/download-file.d.ts +1 -1
- package/index.js +28505 -25209
- package/index.umd.cjs +336 -281
- package/package.json +1 -1
- package/style.css +1 -1
- package/framework/PageCells/CapacityCell.d.ts +0 -5
- package/framework/PageForm/Inputs/DataEditor.d.ts +0 -12
- /package/framework/{PageInputs/PageHiddenInput.cy.d.ts → PageDialogs/PageDialog.cy.d.ts} +0 -0
|
@@ -67,6 +67,7 @@ export interface IPageActionSwitch extends IPageActionNoneCommon {
|
|
|
67
67
|
isSwitchOn: () => boolean;
|
|
68
68
|
showPinnedLabel?: boolean;
|
|
69
69
|
labelOff?: string;
|
|
70
|
+
isReversed?: boolean;
|
|
70
71
|
ariaLabel: (isEnabled: boolean) => string;
|
|
71
72
|
}
|
|
72
73
|
export interface IPageActionSwitchSingle<T extends object> extends IPageActionSingleCommon<T> {
|
|
@@ -75,6 +76,7 @@ export interface IPageActionSwitchSingle<T extends object> extends IPageActionSi
|
|
|
75
76
|
isSwitchOn: (item: T) => boolean;
|
|
76
77
|
showPinnedLabel?: boolean;
|
|
77
78
|
labelOff?: string;
|
|
79
|
+
isReversed?: boolean;
|
|
78
80
|
ariaLabel: (isEnabled: boolean) => string;
|
|
79
81
|
}
|
|
80
82
|
export interface IPageActionDropdown<T extends object> extends IPageActionNoneCommon {
|
|
@@ -5,10 +5,14 @@ type LabelWithLink = {
|
|
|
5
5
|
type LabelsWithLinksProps = {
|
|
6
6
|
labels?: never;
|
|
7
7
|
labelsWithLinks: LabelWithLink[];
|
|
8
|
+
numLabels?: number;
|
|
9
|
+
wrapLabels?: boolean;
|
|
8
10
|
};
|
|
9
11
|
type LabelsProps = {
|
|
10
12
|
labels: string[];
|
|
11
13
|
labelsWithLinks?: never;
|
|
14
|
+
numLabels?: number;
|
|
15
|
+
wrapLabels?: boolean;
|
|
12
16
|
};
|
|
13
17
|
export declare function LabelsCell(props: LabelsProps | LabelsWithLinksProps): import("react/jsx-runtime").JSX.Element;
|
|
14
18
|
export {};
|
|
@@ -2,6 +2,7 @@ import { CSSProperties, ReactNode } from 'react';
|
|
|
2
2
|
export type PageDashboardCardWidth = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
3
3
|
export type PageDashboardCardHeight = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
4
4
|
export declare function PageDashboardCard(props: {
|
|
5
|
+
id?: string;
|
|
5
6
|
supertitle?: string;
|
|
6
7
|
title?: string;
|
|
7
8
|
subtitle?: string;
|
|
@@ -18,9 +19,10 @@ export declare function PageDashboardCard(props: {
|
|
|
18
19
|
height?: PageDashboardCardHeight;
|
|
19
20
|
maxHeight?: PageDashboardCardHeight;
|
|
20
21
|
style?: CSSProperties;
|
|
21
|
-
help?: string
|
|
22
|
+
help?: string;
|
|
22
23
|
helpTitle?: string;
|
|
23
24
|
helpDocLink?: string;
|
|
24
25
|
headerControls?: ReactNode;
|
|
25
26
|
isCompact?: boolean;
|
|
27
|
+
canCollapse?: boolean;
|
|
26
28
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,7 @@ export declare function PageDetails(props: {
|
|
|
3
3
|
children?: ReactNode;
|
|
4
4
|
disablePadding?: boolean;
|
|
5
5
|
numberOfColumns?: 'multiple' | 'single';
|
|
6
|
+
labelOrientation?: 'horizontal' | 'vertical';
|
|
6
7
|
alertPrompts?: string[];
|
|
8
|
+
isCompact?: boolean;
|
|
7
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { ITableColumn } from '../PageTable/PageTableColumn';
|
|
2
3
|
export declare function PageDetailsFromColumns<T extends object>(props: {
|
|
3
4
|
item: T | undefined;
|
|
4
5
|
columns: ITableColumn<T>[];
|
|
5
|
-
|
|
6
|
-
numberOfColumns?: 'multiple' | 'single';
|
|
6
|
+
children?: ReactNode;
|
|
7
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ErrorAdapter } from '../PageForm/typesErrorAdapter';
|
|
2
3
|
import { ITableColumn } from '../PageTable/PageTableColumn';
|
|
3
4
|
export interface BulkActionDialogProps<T extends object> {
|
|
4
5
|
title: string;
|
|
@@ -10,6 +11,7 @@ export interface BulkActionDialogProps<T extends object> {
|
|
|
10
11
|
onClose?: () => void;
|
|
11
12
|
processingText?: string;
|
|
12
13
|
isDanger?: boolean;
|
|
14
|
+
errorAdapter?: ErrorAdapter;
|
|
13
15
|
}
|
|
14
16
|
export declare function BulkActionDialog<T extends object>(props: BulkActionDialogProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare function useBulkActionDialog<T extends object>(): import("react").Dispatch<import("react").SetStateAction<BulkActionDialogProps<T> | undefined>>;
|
|
17
|
+
export declare function useBulkActionDialog<T extends object>(defaultErrorAdapter?: ErrorAdapter): import("react").Dispatch<import("react").SetStateAction<BulkActionDialogProps<T> | undefined>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ErrorAdapter } from '../PageForm/typesErrorAdapter';
|
|
1
2
|
import { ITableColumn } from '../PageTable/PageTableColumn';
|
|
2
3
|
import { BulkActionDialogProps } from './BulkActionDialog';
|
|
3
4
|
export interface BulkConfirmationDialog<T extends object> {
|
|
@@ -13,7 +14,8 @@ export interface BulkConfirmationDialog<T extends object> {
|
|
|
13
14
|
confirmText: string;
|
|
14
15
|
actionButtonText: string;
|
|
15
16
|
isDanger?: boolean;
|
|
17
|
+
errorAdapter?: ErrorAdapter;
|
|
16
18
|
}
|
|
17
19
|
declare function BulkConfirmationDialog<T extends object>(props: BulkConfirmationDialog<T>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare function useBulkConfirmation<T extends object>(): (options: Omit<BulkConfirmationDialog<T>, 'onConfirm' | 'onClose'> & Omit<BulkActionDialogProps<T>, 'onClose'>) => void;
|
|
20
|
+
export declare function useBulkConfirmation<T extends object>(errorAdapter?: ErrorAdapter): (options: Omit<BulkConfirmationDialog<T>, 'onConfirm' | 'onClose'> & Omit<BulkActionDialogProps<T>, 'onClose'>) => void;
|
|
19
21
|
export {};
|
|
@@ -19,5 +19,6 @@ export type MultiSelectDialogProps<T extends object> = {
|
|
|
19
19
|
defaultSort?: string;
|
|
20
20
|
maxSelections?: number;
|
|
21
21
|
allowZeroSelections?: boolean;
|
|
22
|
+
onClose?: () => void;
|
|
22
23
|
};
|
|
23
24
|
export declare function MultiSelectDialog<T extends object>(props: MultiSelectDialogProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const DialogContext: import("react").Context<ReactNode>;
|
|
1
|
+
import { ReactNode } from 'react';
|
|
3
2
|
export declare function PageDialogProvider(props: {
|
|
4
3
|
children: ReactNode;
|
|
5
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function usePageDialogs(): {
|
|
6
|
+
dialogs: ReactNode[];
|
|
7
|
+
clearDialogs: () => void;
|
|
8
|
+
pushDialog: (_dialog: ReactNode) => void;
|
|
9
|
+
popDialog: () => void;
|
|
10
|
+
};
|
|
6
11
|
export declare function usePageDialog(): [
|
|
7
12
|
dialog: ReactNode | undefined,
|
|
8
|
-
setDialog:
|
|
13
|
+
setDialog: (dialog: ReactNode | undefined) => void
|
|
9
14
|
];
|
|
@@ -2,7 +2,7 @@ import { ITableColumn } from '../PageTable/PageTableColumn';
|
|
|
2
2
|
import { ISelected } from '../PageTable/useTableItems';
|
|
3
3
|
import { IToolbarFilter } from '../PageToolbar/PageToolbarFilter';
|
|
4
4
|
import { IView } from '../useView';
|
|
5
|
-
export type
|
|
5
|
+
export type SingleSelectDialogProps<T extends object> = {
|
|
6
6
|
title: string;
|
|
7
7
|
view: IView & ISelected<T> & {
|
|
8
8
|
itemCount?: number;
|
|
@@ -15,5 +15,6 @@ export type SelectSingleDialogProps<T extends object> = {
|
|
|
15
15
|
cancelText?: string;
|
|
16
16
|
emptyStateTitle?: string;
|
|
17
17
|
errorStateTitle?: string;
|
|
18
|
+
onClose?: () => void;
|
|
18
19
|
};
|
|
19
|
-
export declare function
|
|
20
|
+
export declare function SingleSelectDialog<T extends object>(props: SingleSelectDialogProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -24,5 +24,6 @@ export type FormGroupTypeAheadMultiSelectProps = {
|
|
|
24
24
|
name: string;
|
|
25
25
|
}>[];
|
|
26
26
|
onHandleClear: (chip?: string) => void;
|
|
27
|
+
isRequired?: boolean;
|
|
27
28
|
};
|
|
28
29
|
export declare function FormGroupTypeAheadMultiSelect(props: FormGroupTypeAheadMultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,5 +5,5 @@ export type PageFormAsyncMultiSelectProps<TFieldValues extends FieldValues = Fie
|
|
|
5
5
|
name: TFieldName;
|
|
6
6
|
validate?: Validate<FieldPathValue<TFieldValues, TFieldName>, TFieldValues> | Record<string, Validate<FieldPathValue<TFieldValues, TFieldName>, TFieldValues>>;
|
|
7
7
|
isReadOnly?: boolean;
|
|
8
|
-
} & Pick<PageAsyncMultiSelectProps<ValueT>, 'id' | 'placeholder' | 'footer' | 'isDisabled' | 'queryOptions' | 'queryPlaceholder' | 'queryErrorText'> & Pick<PageFormGroupProps, 'label' | 'labelHelp' | 'labelHelpTitle' | 'additionalControls' | 'isRequired' | 'helperText'>;
|
|
8
|
+
} & Pick<PageAsyncMultiSelectProps<ValueT>, 'id' | 'placeholder' | 'footer' | 'isDisabled' | 'queryOptions' | 'queryPlaceholder' | 'queryErrorText' | 'disableClearChips' | 'disableClearSelection'> & Pick<PageFormGroupProps, 'label' | 'labelHelp' | 'labelHelpTitle' | 'additionalControls' | 'isRequired' | 'helperText'>;
|
|
9
9
|
export declare function PageFormAsyncMultiSelect<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: PageFormAsyncMultiSelectProps<TFieldValues, TFieldName>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { CheckboxProps } from '@patternfly/react-core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import { FieldPath, FieldValues, Validate } from 'react-hook-form';
|
|
3
4
|
export type PageFormCheckboxProps<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
|
|
4
5
|
id?: string;
|
|
5
6
|
name: TFieldName;
|
|
6
7
|
validate?: Validate<boolean, TFieldValues> | Record<string, Validate<boolean, TFieldValues>>;
|
|
8
|
+
labelHelpTitle?: string;
|
|
9
|
+
labelHelp?: string | string[] | ReactNode;
|
|
7
10
|
} & Omit<CheckboxProps, 'id' | 'onChange' | 'value'>;
|
|
8
11
|
export declare function PageFormCheckbox<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: PageFormCheckboxProps<TFieldValues, TFieldName>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,36 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { FieldPathByValue, FieldValues, Validate } from 'react-hook-form';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
validate?: Validate<string, TFieldValues> | Record<string, Validate<string, TFieldValues>>;
|
|
6
|
-
toggleLanguages?: string[];
|
|
7
|
-
isExpandable?: boolean;
|
|
8
|
-
allowUpload?: boolean;
|
|
9
|
-
allowCopy?: boolean;
|
|
10
|
-
allowDownload?: boolean;
|
|
11
|
-
defaultExpanded?: boolean;
|
|
3
|
+
import { DataEditorLanguages } from '../../components/DataEditor';
|
|
4
|
+
export type PageFormDataEditorInputProps<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPathByValue<TFieldValues, object | string | undefined | null> = FieldPathByValue<TFieldValues, object | string | undefined | null>> = {
|
|
12
5
|
id?: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
isRequired?: boolean;
|
|
16
|
-
additionalControls?: ReactNode;
|
|
6
|
+
name: TFieldName;
|
|
7
|
+
label: string;
|
|
17
8
|
labelHelp?: string | string[] | ReactNode;
|
|
18
9
|
labelHelpTitle?: string;
|
|
10
|
+
additionalControls?: ReactNode;
|
|
11
|
+
format: DataEditorLanguages | 'object';
|
|
12
|
+
disableCopy?: boolean;
|
|
13
|
+
disableUpload?: boolean;
|
|
14
|
+
disableDownload?: boolean;
|
|
15
|
+
disableExpand?: boolean;
|
|
16
|
+
defaultCollapsed?: boolean;
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
validate?: Validate<string, TFieldValues> | Record<string, Validate<string, TFieldValues>>;
|
|
19
|
+
isReadOnly?: boolean;
|
|
20
|
+
isArray?: boolean;
|
|
19
21
|
};
|
|
20
|
-
export declare function PageFormDataEditor<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPathByValue<TFieldValues, undefined |
|
|
22
|
+
export declare function PageFormDataEditor<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPathByValue<TFieldValues, object | string | undefined | null> = FieldPathByValue<TFieldValues, object | string | undefined | null>>(props: PageFormDataEditorInputProps<TFieldValues, TFieldName>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function DataEditorButtons(props: {
|
|
24
|
+
handleCopy: (() => void) | false;
|
|
25
|
+
handleDownload: (() => void) | false;
|
|
26
|
+
handleUpload: (() => void) | false;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function DataEditorActions(props: {
|
|
30
|
+
handleCopy: (() => void) | false;
|
|
31
|
+
handleDownload: (() => void) | false;
|
|
32
|
+
handleUpload: (() => void) | false;
|
|
33
|
+
language: string;
|
|
34
|
+
setLanguage: (language: DataEditorLanguages) => void;
|
|
35
|
+
children?: ReactNode;
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FieldPathByValue, FieldValues, Validate } from 'react-hook-form';
|
|
3
|
+
export type PageFormMarkdownInputProps<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPathByValue<TFieldValues, object | string | undefined | null> = FieldPathByValue<TFieldValues, object | string | undefined | null>> = {
|
|
4
|
+
id?: string;
|
|
5
|
+
name: TFieldName;
|
|
6
|
+
label: string;
|
|
7
|
+
labelHelp?: string | string[] | ReactNode;
|
|
8
|
+
labelHelpTitle?: string;
|
|
9
|
+
additionalControls?: ReactNode;
|
|
10
|
+
disableCopy?: boolean;
|
|
11
|
+
disableUpload?: boolean;
|
|
12
|
+
disableDownload?: boolean;
|
|
13
|
+
disableExpand?: boolean;
|
|
14
|
+
defaultCollapsed?: boolean;
|
|
15
|
+
isRequired?: boolean;
|
|
16
|
+
validate?: Validate<string, TFieldValues> | Record<string, Validate<string, TFieldValues>>;
|
|
17
|
+
isReadOnly?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare function PageFormMarkdown<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPathByValue<TFieldValues, object | string | undefined | null> = FieldPathByValue<TFieldValues, object | string | undefined | null>>(props: PageFormMarkdownInputProps<TFieldValues, TFieldName>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -16,6 +16,7 @@ interface FieldValuesWithArray<T> extends FieldValues {
|
|
|
16
16
|
[key: string]: T[];
|
|
17
17
|
}
|
|
18
18
|
export declare function PageFormMultiInput<T extends {
|
|
19
|
+
hostname?: string;
|
|
19
20
|
id: number | string;
|
|
20
21
|
name: string;
|
|
21
22
|
}, TFieldValues extends FieldValuesWithArray<T> = FieldValuesWithArray<T>, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: PageFormMultiInputProps<T, TFieldValues, TFieldName>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,11 +4,11 @@ interface ChildProps {
|
|
|
4
4
|
label?: string;
|
|
5
5
|
}
|
|
6
6
|
interface IProps {
|
|
7
|
-
shouldHideField: boolean;
|
|
7
|
+
shouldHideField: boolean | undefined;
|
|
8
8
|
onClear: () => void;
|
|
9
9
|
children: ReactElement<ChildProps>;
|
|
10
10
|
labelHelp?: string;
|
|
11
11
|
label?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function PageFormSecret({ onClear, shouldHideField, label, labelHelp, children }: IProps): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -12,5 +12,7 @@ export type PageFormSwitchProps<TFieldValues extends FieldValues = FieldValues,
|
|
|
12
12
|
pattern?: ValidationRule<RegExp>;
|
|
13
13
|
validate?: Validate<string, TFieldValues> | Record<string, Validate<string, TFieldValues>>;
|
|
14
14
|
autoFocus?: boolean;
|
|
15
|
+
labelOn?: string;
|
|
16
|
+
labelOff?: string;
|
|
15
17
|
};
|
|
16
18
|
export declare function PageFormSwitch<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: PageFormSwitchProps<TFieldValues, TFieldName>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,6 +17,7 @@ export interface PageFormProps<T extends object> {
|
|
|
17
17
|
autoComplete?: 'on' | 'off';
|
|
18
18
|
footer?: ReactNode;
|
|
19
19
|
errorAdapter?: ErrorAdapter;
|
|
20
|
+
disableSubmitOnEnter?: boolean;
|
|
20
21
|
}
|
|
21
22
|
export declare function useFormErrors<T extends object>(defaultValue: DefaultValues<T> | undefined, errorAdapter: ErrorAdapter): {
|
|
22
23
|
form: UseFormReturn<T, any, undefined>;
|
|
@@ -32,4 +33,5 @@ export declare function PageFormGrid(props: {
|
|
|
32
33
|
children?: ReactNode;
|
|
33
34
|
isVertical?: boolean;
|
|
34
35
|
singleColumn?: boolean;
|
|
36
|
+
className?: string;
|
|
35
37
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FieldValues, UseFormSetError } from 'react-hook-form';
|
|
3
|
+
export declare function PageFormSetError<TFieldValues extends FieldValues = FieldValues>(props: {
|
|
4
|
+
children: (setError: UseFormSetError<TFieldValues>) => ReactNode;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FieldValues, UseFormSetValue } from 'react-hook-form';
|
|
3
|
+
export declare function PageFormSetValue<TFieldValues extends FieldValues = FieldValues>(props: {
|
|
4
|
+
children: (setValue: UseFormSetValue<TFieldValues>) => ReactNode;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { FieldValues, Path, PathValue, UseFormSetError } from 'react-hook-form';
|
|
3
|
+
export declare function PageFormWatch<TFieldValues extends FieldValues = FieldValues, TFieldName extends Path<TFieldValues> = Path<TFieldValues>, TValue = PathValue<TFieldValues, TFieldName>>(props: {
|
|
4
|
+
watch: TFieldName;
|
|
5
|
+
children: (value: TValue, setError: UseFormSetError<TFieldValues>) => ReactNode;
|
|
5
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,4 +9,4 @@ export interface ErrorOutput {
|
|
|
9
9
|
genericErrors: GenericErrorDetail[];
|
|
10
10
|
fieldErrors: FieldErrorDetail[];
|
|
11
11
|
}
|
|
12
|
-
export type ErrorAdapter = (error: unknown) => ErrorOutput;
|
|
12
|
+
export type ErrorAdapter = (error: unknown, mappedKeys?: Record<string, string>) => ErrorOutput;
|
|
@@ -11,5 +11,7 @@ export interface PageMultiSelectProps<ValueT> {
|
|
|
11
11
|
variant?: 'chips' | 'count';
|
|
12
12
|
footer?: ReactNode;
|
|
13
13
|
disableClearSelection?: boolean;
|
|
14
|
+
disableClearChips?: boolean;
|
|
15
|
+
maxChipSize?: string;
|
|
14
16
|
}
|
|
15
17
|
export declare function PageMultiSelect<ValueT>(props: PageMultiSelectProps<ValueT>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,3 +12,18 @@ export interface PageSingleSelectProps<ValueT> {
|
|
|
12
12
|
isDisabled?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare function PageSingleSelect<ValueT>(props: PageSingleSelectProps<ValueT>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function PageSingleSelectList(props: {
|
|
16
|
+
searchRef: React.RefObject<HTMLInputElement>;
|
|
17
|
+
options: PageSelectOption<unknown>[];
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const PageSingleSelectContext: import("react").Context<{
|
|
20
|
+
open: boolean;
|
|
21
|
+
setOpen: (open: boolean) => void;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function usePageSingleSelectContext(): {
|
|
24
|
+
open: boolean;
|
|
25
|
+
setOpen: (open: boolean) => void;
|
|
26
|
+
};
|
|
27
|
+
export declare function PageSingleSelectProvider(props: {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export declare function PageMasthead(props: {
|
|
3
|
-
|
|
4
|
-
brand?: string;
|
|
5
|
-
title: string;
|
|
3
|
+
brand: ReactNode;
|
|
6
4
|
children?: ReactNode;
|
|
7
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
6
|
export declare function PageMastheadToggle(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
interface PageNavigationGroup {
|
|
3
3
|
id?: string;
|
|
4
4
|
label?: string;
|
|
5
|
+
subtitle?: string;
|
|
5
6
|
path: string;
|
|
6
7
|
children: PageNavigationItem[];
|
|
8
|
+
hidden?: boolean;
|
|
7
9
|
}
|
|
8
10
|
interface PageNavigationComponent {
|
|
9
11
|
id?: string;
|
|
10
12
|
label?: string;
|
|
13
|
+
subtitle?: string;
|
|
11
14
|
path: string;
|
|
12
15
|
element: JSX.Element;
|
|
16
|
+
hidden?: boolean;
|
|
13
17
|
}
|
|
14
18
|
export type PageNavigationItem = PageNavigationGroup | PageNavigationComponent;
|
|
15
19
|
export declare function removeLeadingSlash(path: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
|
+
interface IPageNotifications {
|
|
3
|
+
notificationsDrawerOpen: boolean;
|
|
4
|
+
setNotificationsDrawerOpen: Dispatch<SetStateAction<boolean>>;
|
|
5
|
+
notificationGroups: Record<string, IPageNotificationGroup>;
|
|
6
|
+
setNotificationGroups: Dispatch<SetStateAction<Record<string, IPageNotificationGroup>>>;
|
|
7
|
+
}
|
|
8
|
+
export interface IPageNotificationGroup {
|
|
9
|
+
title: string;
|
|
10
|
+
notifications: IPageNotification[];
|
|
11
|
+
}
|
|
12
|
+
export interface IPageNotification {
|
|
13
|
+
title: string;
|
|
14
|
+
description?: string | undefined;
|
|
15
|
+
timestamp?: string;
|
|
16
|
+
variant?: 'success' | 'danger' | 'warning' | 'info';
|
|
17
|
+
to: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const PageNotificationsContext: import("react").Context<IPageNotifications>;
|
|
20
|
+
export declare function usePageNotifications(): IPageNotifications;
|
|
21
|
+
export declare function PageNotificationsProvider(props: {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function PageNotificationsDrawer(props: {
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -60,5 +60,6 @@ export type PageTableProps<T extends object> = {
|
|
|
60
60
|
topContent?: React.ReactNode;
|
|
61
61
|
toolbarContent?: React.ReactNode;
|
|
62
62
|
scrollTopContent?: boolean;
|
|
63
|
+
limitFiltersToOneOrOperation?: boolean;
|
|
63
64
|
};
|
|
64
65
|
export declare function PageTable<T extends object>(props: PageTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { IPageAction } from '../PageActions/PageAction';
|
|
3
3
|
import { LabelColor } from '../components/pfcolors';
|
|
4
4
|
import { ITableColumn } from './PageTableColumn';
|
|
5
|
-
export declare const Small: import("styled-components").
|
|
5
|
+
export declare const Small: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>>;
|
|
6
6
|
export interface IPageTableCard {
|
|
7
7
|
id: string | number;
|
|
8
8
|
icon?: ReactNode;
|
|
@@ -24,8 +24,8 @@ export interface IPageTableCard {
|
|
|
24
24
|
alertContent?: ReactNode;
|
|
25
25
|
alertVariant?: 'success' | 'danger' | 'warning' | 'info' | 'custom';
|
|
26
26
|
}
|
|
27
|
-
export declare const PageDetailDiv: import("styled-components").
|
|
28
|
-
export declare const ColumnsDiv: import("styled-components").
|
|
27
|
+
export declare const PageDetailDiv: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
28
|
+
export declare const ColumnsDiv: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
29
29
|
export declare function PageTableCard<T extends object>(props: {
|
|
30
30
|
item: T;
|
|
31
31
|
itemToCardFn: (item: T) => IPageTableCard;
|