@boomerang-io/carbon-addons-boomerang-react
Version:
Carbon Addons for Boomerang apps
1,487 lines (1,426 loc) • 47.6 kB
TypeScript
import React, { Component } from 'react';
import AutoSuggest, { ChangeEvent } from 'react-autosuggest';
import { TippyProps } from '@tippyjs/react';
import { DownshiftProps } from 'downshift';
import ReactModal from 'react-modal';
import { FormikProps } from 'formik';
import { NavLinkProps, RouteProps } from 'react-router-dom';
import * as react_toastify from 'react-toastify';
type DynamicInput = FormInput & InputGovernor;
type FormInput = {
acceptsUserInput?: boolean;
conditionallyRender?: boolean;
customComponent?: React.FC<any>;
defaultValues?: any[];
id?: string;
invalid?: boolean;
invalidText?: string;
invalidValues?: any[];
governingOptions?: any[];
governingDisabled?: boolean;
minValueLength?: string;
maxValueLength?: string;
name?: string;
onBlur?: (...args: any[]) => any;
onChange?: (...args: any[]) => any;
requiredForKey?: string;
requiredValueOf?: string[];
required?: boolean;
placeholder?: string;
language?: string;
disabled?: boolean;
defaultValue?: any;
defaultOptionLabel?: any;
value?: any;
values?: any[];
readOnly?: boolean;
dateFormat?: string;
pattern?: string;
patternInvalidText?: string;
government?: InputGovernor;
description?: string;
key: string;
label?: string;
type: string;
min?: string;
max?: string;
options?: {
key: string;
value: string;
}[];
helperText?: string;
helperTextOff?: string;
isDefaultLabel?: boolean;
cannotEditLabel?: boolean;
};
type InputGovernor = {
governingJson: string;
governingJsonKey: string;
jsonKey: string;
jsonLabel: string;
governingKey: string;
governing: boolean;
governed: boolean;
isGoverning: boolean;
isGoverned: boolean;
};
type ModalTrigger = (props: {
openModal: () => void;
}) => React.ReactNode;
type ModalFunctionChildrenProps = {
closeModal: () => void;
};
type SimpleIdNameMap = {
id: string;
name: string;
isTeamMember?: boolean;
privateTeam?: boolean;
displayName?: string;
services?: Array<{
id: string;
templateId: string;
name: string;
url: string;
}>;
};
type SimpleTeamService = {
id: string;
templateId: string;
name: string;
url: string;
};
interface SideNavTeam extends SimpleIdNameMap {
services: Array<SimpleTeamService>;
isPersonal?: boolean;
}
interface SideNavAccount extends SimpleIdNameMap {
projectTeams: Array<SimpleIdNameMap>;
}
type Team = {
id: string;
name: string;
shortName: string;
owners: TeamOwner[];
purpose: string;
dateCreated: string;
isActive: boolean;
newRelicRestApiKey: string;
newRelicQueryKey: string;
newRelicAccountId: string;
autoApproveRequests: boolean;
privateTeam: boolean;
ldapName: string;
labels: FormInput[];
description: string;
logo: {
id: string;
name: string;
};
restrictInvitationByDomain: boolean;
domains: string[];
allowInvitationToPartner: boolean;
userProperties: FormInput[];
displayName: string;
sidebarSelectedKey: string;
pendingRemoval: boolean;
pendingRemovalDate: string;
pendingRemovalRequestIds: string[];
copyTeamOwners: boolean;
customInviteMessage: string;
type: string;
organizationId: string;
subhead: string;
accountTeamId: string;
hero: {
id: string;
name: string;
};
statements: TeamStatement[];
allowMembersCreateProjectTeam: boolean;
canLeaveTeam: boolean;
unassignedCatalogItems: UnassignedCatalogItems;
};
type TeamStatement = {
id: number;
name: string;
jobTitle: string;
content: string;
image: {
id: string;
name: string;
};
};
type TeamOwner = {
ownerId: string;
ownerEmail: string;
ownerName: string;
};
type Service = {
id: string;
name?: any;
order?: number;
};
type UnassignedCatalogItems = {
name: string;
description: string;
services: Service[];
order?: any;
linkedResource?: any;
};
type User = {
email: string;
emailPreferences: {
receiveCoOwnerAddMember: boolean;
receiveJoinTeamApproved: boolean;
receiveNewMemberInvite: boolean;
receiveRequestLeaveTeam: boolean;
};
favouriteCatalogItems: [
{
catalogItemId: string;
order: number;
}
];
firstLoginDate: string;
globalServices?: [any];
hasConsented: boolean;
defaultTeamHasAssistantsAccess: boolean;
id: string;
isFirstVisit: boolean | null;
isShowHelp: boolean | null;
showSupport: boolean | null;
lastLoginDate: string;
approvedDate?: string;
launchpadTutorialState: null | -1 | 0 | 1 | 2 | 3;
isTeamOwner?: boolean;
isAllowToRemove?: boolean;
lowerLevelGroups: [
{
id: string;
userProperties: [any];
visible: boolean;
}
];
name: string;
displayName?: string;
notificationSettings: any;
personalizations: any;
projects: null | any;
requestSummary: {
requireUserAction: number;
submittedByUser: number;
};
pendingLeaveRequests?: any[];
pendingRemoveToolRequests?: any[];
status: "active" | "inactive" | "pending_deletion" | "deleted" | "archived" | "pending_invite";
teams: any[];
type: string;
inviter?: {
id: string;
name: string;
};
approver?: {
id: string;
name: string;
};
hasPersonalTeam?: boolean;
hasOpenPersonalTeamRequest?: boolean;
personalTeamAssistantsAccess?: boolean;
personalTeamAssistantsAccessRequested?: boolean;
teamInstanceSwitcherDefault?: string | null;
};
type UserTeams = {
accountTeams: {
id: string;
name: string;
isAccountTeamMember: boolean;
services?: Array<{
name: string;
url: string;
}>;
projectTeams: SimpleIdNameMap[];
}[];
standardTeams: SimpleIdNameMap[];
personalTeam: SimpleIdNameMap[];
};
type PlatformNotification = {
creator: string;
date: string;
detail: string;
eventId: string;
id: string;
priority: string;
read: boolean;
severity: string;
target: string;
title: string;
type: string;
userId: string;
};
type NavLink = {
name: string;
url: string;
isExternal?: boolean;
};
type Props$I = {
accounts?: Array<SideNavAccount> | null;
app?: string;
appLink: any;
agentStudioPath?: string;
agenticAppsPath?: string;
regionalTeam?: any;
baseEnvUrl?: string;
className?: string;
defaultAssistantLink?: string;
enableChatButton?: boolean;
showChatButton?: boolean;
showSelectTeamPurpose?: boolean;
joinCreateTrigger?: (props: any) => void;
isLoading?: boolean;
isOpen?: boolean;
navLinks?: NavLink[];
personalTeamEnabled?: boolean;
personalTeams?: Array<SideNavTeam> | null;
showChatTooltip?: boolean;
sideNavUrls?: {
key: string;
name: string;
url: string;
icon: string;
}[];
teams?: Array<SideNavTeam> | null;
templateMeteringEvent?: (props: any) => void;
tooltipMessage?: string;
triggerEvent?: (props: any) => void;
user: User;
isLaunchpad?: boolean;
userTeamsError?: boolean;
userTeamsLoading?: boolean;
history?: any;
children?: React.ReactNode;
};
declare function AdvantageSideNav(props: Props$I): React.JSX.Element;
interface Suggestion {
label: string;
value: string;
}
type AutoSuggestProps = Omit<AutoSuggest.AutosuggestPropsBase<Suggestion>, "getSuggestionValue" | "onSuggestionsFetchRequested" | "renderSuggestion" | "inputProps"> & {
autoSuggestions: Suggestion[];
children: React.ReactElement;
initialValue?: string;
onChange: (newValue: string) => void;
inputProps: any;
};
interface AutoSuggestState {
value: string;
caretIndex: number;
suggestions: Suggestion[];
}
declare class AutoSuggestBmrg extends Component<AutoSuggestProps, AutoSuggestState> {
inputRef: React.RefObject<HTMLInputElement>;
state: {
value: string;
caretIndex: number;
suggestions: never[];
};
componentDidUpdate(_: AutoSuggestProps, prevState: AutoSuggestState): void;
renderSuggestion: (suggestion: Suggestion) => string;
onSuggestionsFetchRequested: () => void;
/**
* More logic here for handling a user cycling through suggestions
* Move the caret to the new suggestion location or use the reference to the DOM element.
* Shift based on the change in length of the value b/c of different length suggestions
*/
onInputChange: (event: React.FormEvent<HTMLElement>, { newValue, method }: ChangeEvent) => void;
/**
* Return the new value for the input
* Find the current caret position
* get the string up to that point
* find the last word (space-delimited) and replace it in input
*/
getSuggestionValue: (suggestion: Suggestion) => string;
getSuggestions: () => Suggestion[];
findWordsBeforeCurrentLocation: () => string[];
onSuggestionsClearRequested: () => void;
render(): React.JSX.Element;
}
type Props$H = React.ComponentPropsWithoutRef<"img"> & {
className?: string;
size?: "small" | "medium" | "large";
src: string;
style?: React.CSSProperties;
userName?: string;
plainTooltip?: boolean;
};
declare function Avatar({ alt, className, size, src, style, title, userName, plainTooltip, ...rest }: Props$H): React.JSX.Element;
type Props$G = {
analyticsHelpers?: any;
baseServicesUrl?: string;
baseEnvUrl?: string;
carbonTheme?: "white" | "g10" | "g90" | "g100";
className?: string;
createJoinTeamTrigger?: Function;
enableAppSwitcher?: boolean;
instanceSwitcherEnabled?: boolean;
enableNotifications?: boolean;
enableNotificationsCount?: boolean;
history?: any;
isLaunchpad?: boolean;
isLoadingTeamSwitcher?: boolean;
isSuccessTeamSwitcher?: boolean;
setIsSuccessTeamSwitcher?: Function;
leftPanel?: (args: {
close: () => void;
isOpen: boolean;
navLinks?: NavLink[];
}) => React.ReactNode;
navLinks?: NavLink[];
platform?: any;
platformMessage?: string;
prefixName?: string;
productName: string;
profileMenuItems?: React.ReactNode[];
rightPanel?: {
icon?: React.ReactNode;
component: React.ReactNode;
};
requestSummary?: {
requireUserAction: number;
submittedByUser: number;
};
refetchUser?: Function;
refetchNavigation?: Function;
skipToContentProps?: {
href?: string;
children?: string;
className?: string;
};
supportMenuItems?: React.ReactNode[];
instanceSwitcherMenuItems?: React.ReactNode[];
templateMeteringEvent?: (props: any) => void;
trackEvent?: Function;
triggerEvent?: (props: any) => any;
user?: User;
userTeams?: {
data: any;
isLoading: boolean;
error: any;
};
userTeamsAssets?: {
data: any;
isLoading: boolean;
error: any;
};
};
declare function Header(props: Props$G): React.JSX.Element;
type Shared = {
className?: string;
children?: React.ReactNode;
disabled?: boolean;
element?: React.FC<any>;
icon?: React.ReactNode;
style?: React.CSSProperties;
variant?: "danger" | "default";
};
type Props$F = (Shared & {
href: string;
kind: "app" | "internal" | "external";
onClick?: () => void;
text: string;
type: "link";
}) | (Shared & {
onClick: () => void;
text: string;
type: "button";
}) | (Shared & {
onClick: () => void;
src: string;
type: "user";
userName?: string;
});
declare const _default: React.ForwardRefExoticComponent<Props$F & React.RefAttributes<HTMLLinkElement>>;
type Alignment = "start" | "end";
type Direction = "auto" | "top" | "bottom" | "left" | "right";
type Placement = Direction | `${Direction}-${Alignment}`;
type TooltipHoverProps = TippyProps & {
align?: Alignment;
direction?: Direction;
placement?: Placement;
tooltipContent?: React.ReactNode;
tooltipText?: React.ReactNode;
[key: string]: any;
};
/**
* TooltipHover to replace TooltipDefintion in most situations.
* Uses https://github.com/atomiks/tippyjs-react
*/
declare function TooltipHover({ align, direction, children, className, content, placement, tooltipContent, tooltipText, ...rest }: TooltipHoverProps): React.JSX.Element;
type CheckboxListItem = {
id: string;
labelText: React.ReactNode;
};
type Props$E = {
checkboxProps?: Record<string, any>;
disabled?: boolean;
helperText?: string;
id?: string;
initialSelectedItems?: string[];
label?: string;
labelText?: string;
onChange?: (value: boolean, id: string, event: React.ChangeEvent<HTMLInputElement>, newSelectedItems: string[]) => void;
options: CheckboxListItem[];
selectedItems?: string[];
tooltipClassName?: string;
tooltipContent?: React.ReactNode;
tooltipProps?: TooltipHoverProps;
};
declare function CheckboxListComponent({ checkboxProps, disabled, helperText, id, initialSelectedItems, label, labelText, onChange, options, selectedItems: propsSelectedItems, tooltipClassName, tooltipContent, tooltipProps, }: Props$E): React.JSX.Element;
type ListBoxType = "default" | "inline";
type ListBoxSize = "sm" | "md" | "lg";
type Props$D = {
disableClear?: boolean;
labelText?: React.ReactNode;
label?: React.ReactNode;
shouldFilterItem?: ((...args: any[]) => any) | boolean;
tooltipClassName?: string;
tooltipContent?: React.ReactNode;
tooltipProps?: TooltipHoverProps;
ariaLabel?: string;
className?: string;
direction?: "top" | "bottom";
disabled?: boolean;
downshiftProps?: DownshiftProps<any>;
helperText?: string;
id: string;
initialSelectedItem?: any | string | number;
invalid?: boolean;
invalidText?: React.ReactNode;
itemToElement?: (...args: any[]) => React.ReactNode;
itemToString?: (...args: any[]) => string;
items: any[];
light?: boolean;
name?: string;
onBlur?: (...args: any[]) => any;
onChange: (...args: any[]) => any;
onInputChange?: (...args: any[]) => any;
onKeyUp?: (...args: any[]) => any;
onStateChange?: (...args: any[]) => any;
onToggleClick?: (...args: any[]) => any;
placeholder?: string;
readOnly?: boolean;
selectedItem?: any | string | number;
size?: ListBoxSize;
style?: React.CSSProperties;
titleText?: React.ReactNode;
translateWithId?: (id: string) => string;
type?: ListBoxType;
warn?: boolean;
warnText?: React.ReactNode;
};
declare function ComboBoxComponent({ disableClear, id, label, labelText, titleText, tooltipClassName, tooltipContent, tooltipProps, onChange, onInputChange, shouldFilterItem, ...restComboBoxProps }: Props$D): React.JSX.Element;
type MultiSelectComboBoxProps = {
ariaLabel?: string;
className?: string;
disabled?: boolean;
direction?: "top" | "bottom";
id: string;
initialSelectedItems?: any[];
selectedItems?: any[];
items?: any[];
itemToString?: (...args: any[]) => string;
itemToElement?: React.FC;
titleText?: any;
helperText?: string;
tagProps?: any;
onChange?: (...args: any[]) => any;
onKeyUp?: (...args: any[]) => any;
onInputBlur?: (...args: any[]) => any;
onToggleClick?: (event: any) => any;
open?: boolean;
placeholder: string;
shouldFilterItem?: (...args: any[]) => any;
invalid?: boolean;
invalidText?: string;
translateWithId?: (...args: any[]) => any;
onInputChange?: (...args: any[]) => any;
type?: ListBoxType;
light?: boolean;
downshiftProps?: DownshiftProps<any>;
size?: ListBoxSize;
};
type Props$C = Omit<MultiSelectComboBoxProps, "initialSelectedItems"> & {
disableClear?: boolean;
id: string;
labelText?: string;
label?: string;
initialSelectedItems?: string | any[];
items?: any;
readOnly?: boolean;
selectedItems?: string | any[];
titleText?: string;
tooltipClassName?: string;
tooltipContent?: React.ReactNode;
tooltipProps?: TooltipHoverProps;
};
declare function ComboBoxMultiSelect({ disableClear, id, initialSelectedItems, items, label, labelText, selectedItems, titleText, tooltipClassName, tooltipContent, tooltipProps, ...multiSelectProps }: Props$C): React.JSX.Element;
type Props$B = {
appElement?: string;
children?: (args: {
closeModal: () => void;
forceCloseModal: () => void;
resetInitialState: (arg: Record<string, any>) => void;
setShouldConfirmModalClose: (shouldConfirmModalClose: boolean) => void;
shouldConfirmModalClose: boolean;
}) => React.ReactNode;
composedModalProps?: Record<string, any>;
confirmModalProps?: Record<string, any>;
initialState?: Record<string, any>;
isOpen?: boolean;
modalHeaderChildren?: React.ReactNode;
modalHeaderProps?: Record<string, any>;
modalTrigger?: ModalTrigger;
onCloseModal?: () => void;
size?: "xs" | "sm" | "md" | "lg";
};
declare function ComposedModal(props: Props$B): React.JSX.Element;
type Props$A = Omit<ReactModal.Props, "appElement"> & {
appElement?: string;
children: React.ReactNode;
className?: string;
containerClassName?: string;
isOpen?: boolean;
};
declare function Modal(props: Props$A): React.JSX.Element;
type Props$z = {
affirmativeAction?: () => any;
affirmativeButtonProps?: any;
affirmativeText?: React.ReactNode;
appElement?: string;
children?: React.ReactNode;
containerClassName?: string;
isExternallyControlled?: boolean;
isOpen?: boolean;
label?: string;
modalHeaderProps?: Record<string, any>;
modalProps?: Omit<Props$A, "isOpen">;
modalTrigger?: ModalTrigger;
negativeAction?: () => any;
negativeButtonProps?: any;
negativeText?: React.ReactNode;
onCloseModal?: () => any;
selectorPrimaryFocus?: string;
title?: string;
};
declare function ConfirmModal(props: Props$z): React.JSX.Element;
type Props$y = {
buttonClassName?: string;
buttonContent?: React.ReactNode;
buttonProps?: any;
createKeyValuePair?: boolean;
disabled?: boolean;
id?: string;
initialValues?: string | string[];
invalid?: boolean;
trimInput?: boolean;
removeOnlyFirst?: boolean;
invalidText?: string;
helperText?: string;
key?: string;
keyHelperText?: string;
keyLabel?: string;
keyLabelText?: string;
keyPlaceholder?: string;
label?: string;
labelText?: string;
nonDeletable?: boolean;
max?: number;
onKeyBlur?: (e: React.FocusEvent<HTMLInputElement>) => any;
onValueBlur?: (e: React.FocusEvent<HTMLInputElement>) => any;
onInputBlur?: (e: React.FocusEvent<HTMLInputElement>) => any;
onChange?: (items: string[]) => void;
placeholder?: string;
readOnly?: boolean;
tagProps?: any;
tagType?: string;
textInputProps?: any;
tooltipClassName?: string;
tooltipContent?: React.ReactNode;
tooltipProps?: TooltipHoverProps;
type?: string;
valueHelperText?: string;
valueLabel?: string;
valueLabelText?: string;
valuePlaceholder?: string;
value?: string | string[];
values?: string | string[];
};
declare function CreatableComponent({ buttonClassName, buttonContent, buttonProps, createKeyValuePair, disabled, id, initialValues: externalInitialValues, invalid, invalidText, helperText, key, keyHelperText, keyLabel, keyLabelText, keyPlaceholder, label, labelText, max, nonDeletable, onKeyBlur, onValueBlur, onInputBlur, onChange, placeholder, tagProps, tagType, textInputProps, tooltipClassName, tooltipContent, tooltipProps, type, valueHelperText, valueLabel, valueLabelText, valuePlaceholder, value: externalValues, values, trimInput, removeOnlyFirst, }: Props$y): React.JSX.Element;
type OwnDataDrivenInputProps = {
id?: string;
CheckboxList?: React.FC<any>;
Creatable?: React.FC<any>;
CustomComponent?: React.FC<any>;
DateInput?: React.FC<any>;
MultiSelect?: React.FC<any>;
RadioGroup?: React.FC<any>;
Select?: React.FC<any>;
TextArea?: React.FC<any>;
TextEditor?: React.FC<any>;
TextInput?: React.FC<any>;
Toggle?: React.FC<any>;
formikProps?: any;
onChange?: (...args: any[]) => any;
};
type DataDrivenInputProps = OwnDataDrivenInputProps & FormInput;
declare function DataDrivenInput(props: DataDrivenInputProps): React.JSX.Element | null;
declare const DATE_TYPES: {
DATE: string;
DATE_RANGE: string;
};
type DATE_TYPE = typeof DATE_TYPES[keyof typeof DATE_TYPES];
type Props$x = {
id: string;
dateFormat?: string;
datePickerProps?: any;
disabled?: boolean;
helperText?: string;
invalid?: boolean;
max?: string;
min?: string;
label?: string;
labelText?: string;
name?: string;
onCalendarChange?: (...args: any[]) => any;
onChange?: (...args: any[]) => any;
readOnly?: boolean;
tooltipClassName?: string;
tooltipContent?: React.ReactNode;
tooltipProps?: TooltipHoverProps;
type?: DATE_TYPE;
value: string | string[];
};
declare const DateInputComponent: React.ForwardRefExoticComponent<Props$x & React.RefAttributes<any>>;
type Props$w = {
canUncheck?: boolean;
children?: React.ReactNode;
className?: string;
defaultSelected?: string | number;
disabled?: boolean;
helperText?: string;
id?: string;
items: any[];
label?: string;
labelPosition?: string;
labelText?: string;
name: string;
onChange?: (...args: any[]) => any;
orientation?: "horizontal" | "vertical";
tooltipClassName?: string;
tooltipContent?: React.ReactNode;
tooltipProps?: TooltipHoverProps;
selectedItem?: string | number;
};
declare function DecisionButtons({ canUncheck, className, defaultSelected, disabled, helperText, id, items, label, labelPosition, labelText, name, onChange, orientation, tooltipClassName, tooltipContent, tooltipProps, selectedItem: propsSelectedItem, }: Props$w): React.JSX.Element;
type Props$v = {
children: React.ReactNode;
delay?: number;
};
declare function DelayedRender({ children, delay }: Props$v): React.JSX.Element | null;
type OwnDynamicFormikProps<Values = any> = {
children: (args: {
inputs: React.ReactNode[];
formikProps: FormikProps<any>;
}) => React.ReactNode;
additionalInitialValues?: {
[key: string]: any;
};
allowCustomPropertySyntax?: boolean;
customPropertyStartsWithPattern?: string | RegExp;
customPropertySyntaxPattern?: string | RegExp;
dataDrivenInputProps?: any;
enableReinitialize?: boolean;
inputProps?: any;
initialErrors?: {
[key: string]: any;
};
initialValues?: Partial<Values>;
inputs: DynamicInput[];
onSubmit?: (...args: any[]) => any;
useCSVforArrays?: boolean;
validateOnBlur?: boolean;
validateOnMount?: boolean;
validationSchema?: any;
validationSchemaExtension?: any;
allProps?: (...args: any[]) => {
[key: string]: any;
};
checkboxListProps?: (...args: any[]) => {
[key: string]: any;
};
creatableProps?: (...args: any[]) => {
[key: string]: any;
};
dateProps?: (...args: any[]) => {
[key: string]: any;
};
multiSelectProps?: (...args: any[]) => {
[key: string]: any;
};
radioProps?: (...args: any[]) => {
[key: string]: any;
};
selectProps?: (...args: any[]) => {
[key: string]: any;
};
textAreaProps?: (...args: any[]) => {
[key: string]: any;
};
textEditorProps?: (...args: any[]) => {
[key: string]: any;
};
textInputProps?: (...args: any[]) => {
[key: string]: any;
};
toggleProps?: (...args: any[]) => {
[key: string]: any;
};
};
type DynamicFormikProps<Values> = OwnDynamicFormikProps<Values> & typeof DynamicFormik.defaultProps;
declare function DynamicFormik<Values = any>({ additionalInitialValues, allowCustomPropertySyntax, customPropertySyntaxPattern, customPropertyStartsWithPattern, children, dataDrivenInputProps, inputProps, initialValues, inputs, onSubmit, useCSVforArrays, validationSchema, validationSchemaExtension, ...otherProps }: DynamicFormikProps<Values>): React.JSX.Element;
declare namespace DynamicFormik {
var defaultProps: {
checkboxListProps: (...args: any[]) => {};
creatableProps: (...args: any[]) => {};
dateProps: (...args: any[]) => {};
multiSelectProps: (...args: any[]) => {};
radioProps: (...args: any[]) => {};
selectProps: (...args: any[]) => {};
textAreaProps: (...args: any[]) => {};
textEditorProps: (...args: any[]) => {};
textInputProps: (...args: any[]) => {};
toggleProps: (...args: any[]) => {};
};
}
type Props$u = {
className?: string;
style?: React.CSSProperties;
status?: React.ReactNode;
statusText?: React.ReactNode;
};
declare function Error({ status, statusText, className, style, ...rest }: Props$u): React.JSX.Element;
type Props$t = {
className?: string;
graphic?: React.ReactNode;
header?: React.ReactNode;
message?: React.ReactNode;
style?: React.CSSProperties;
title?: React.ReactNode;
};
declare function ErrorPage({ className, graphic, header, message, style, title }: Props$t): React.JSX.Element;
type Props$s = {
className?: string;
graphic?: React.ReactNode;
header?: React.ReactNode;
message?: React.ReactNode;
statusUrl?: string;
style?: React.CSSProperties;
title?: React.ReactNode;
};
declare function ErrorPageCore({ className, graphic, header, style, message, statusUrl, title, }: Props$s): React.JSX.Element;
type Props$r = ({
theme?: "core";
} & Props$s) | ({
theme: "boomerang";
} & Props$t);
declare function Error403(props: Props$r): React.JSX.Element;
type Props$q = ({
theme?: "core";
} & Props$s) | ({
theme: "boomerang";
} & Props$t);
declare function Error404(props: Props$q): React.JSX.Element;
interface Props$p {
className?: string;
style?: React.CSSProperties;
errorProps?: any;
[key: string]: any;
errorComponent?: React.FC<Pick<Props$p, "errorProps">>;
}
type State$2 = {
hasError: boolean;
error: any;
};
/**
* todo: convert this to hooks in the future.
* As of now getDerivedStateFromError not available via hooks
*/
declare class ErrorBoundary extends Component<Props$p, State$2> {
state: {
hasError: boolean;
error: {};
};
static defaultProps: {
className: string;
};
static getDerivedStateFromError(error: any): {
hasError: boolean;
error: any;
};
componentDidCatch(error: any, info: any): void;
render(): React.JSX.Element;
}
type Props$o = {
className?: string;
header?: React.ReactNode;
message?: React.ReactNode;
style?: React.CSSProperties;
statusText?: React.ReactNode;
statusUrl: string;
title?: React.ReactNode;
};
declare function ErrorDragon({ className, header, message, statusText, title, statusUrl, style, ...rest }: Props$o): React.JSX.Element;
type Props$n = ({
theme?: "core";
} & Props$s) | ({
theme?: "boomerang";
} & Props$o);
declare function ErrorFullPage({ theme, ...rest }: Props$n): React.JSX.Element;
type FeatureHeaderProps = {
actions?: React.ReactNode;
children?: React.ReactNode;
className?: string;
footer?: React.ReactNode;
header?: React.ReactNode;
includeBorder?: boolean;
isLoading?: boolean;
nav?: React.ReactNode;
style?: React.CSSProperties;
title?: string;
contentClassName?: string;
skeletonClassName?: string;
navClassName?: string;
headerClassName?: string;
footerClassName?: string;
[key: string]: any;
};
declare function FeatureHeader({ actions, children, className, footer, header, includeBorder, isLoading, nav, style, contentClassName, footerClassName, headerClassName, navClassName, skeletonClassName, ...rest }: FeatureHeaderProps): React.JSX.Element;
type FeatureHeaderTitleProps = {
children?: React.ReactNode;
className?: string;
element?: any;
style?: React.CSSProperties;
[key: string]: any;
};
declare function FeatureHeaderTitle({ element: Element, children, className, style, ...rest }: FeatureHeaderTitleProps): React.JSX.Element;
declare function FeatureHeaderSubtitle(props: any): React.JSX.Element;
type Props$m = NavLinkProps & React.HTMLAttributes<HTMLAnchorElement> & {
activeClassName?: string;
className?: string;
disabled?: boolean;
isLoading?: boolean;
label?: string;
style?: React.CSSProperties;
[key: string]: any;
};
declare function FeatureNavTab({ activeClassName, className, disabled, isLoading, label, style, ...rest }: Props$m): React.JSX.Element;
type Props$l = {
ariaLabel: string;
children?: React.ReactNode;
className?: string;
contained?: boolean;
light?: boolean;
style?: React.CSSProperties;
};
declare function FeatureNavTabs({ ariaLabel, children, className, contained, light, style, ...rest }: Props$l): React.JSX.Element;
type State$1 = {
formData: {
[key: string]: any;
};
isConfirmModalOpen: boolean;
isOpen: boolean;
shouldConfirmModalClose: boolean;
step: number;
[key: string]: any;
};
type OwnProps$1 = {
appElement?: string;
children?: React.ReactNode;
components?: any[];
composedModalProps?: Omit<Props$A, "isOpen">;
confirmModalProps?: Props$z;
initialState?: Record<string, any>;
isOpen?: boolean;
modalHeaderChildren?: React.ReactElement;
modalHeaderProps?: any;
modalTrigger?: ModalTrigger;
onCloseModal?: (...args: any[]) => any;
onFormDataChange?: (formData: State$1["formData"]) => any;
progressSteps?: {
label?: string;
}[];
};
type Props$k = OwnProps$1 & typeof FlowModalContainer.defaultProps;
declare function FlowModalContainer(props: Props$k): React.JSX.Element;
declare namespace FlowModalContainer {
var defaultProps: {
composedModalProps: {};
isOpen: boolean;
modalHeaderProps: {};
};
}
type Props$j = {
children?: React.ReactNode;
className?: string;
element?: any;
title?: string;
[k: string]: any;
};
declare const FlowModalForm: React.ForwardRefExoticComponent<Omit<Props$j, "ref"> & React.RefAttributes<any>>;
type Props$i = {
border?: "left" | "right";
children: React.ReactNode;
className?: string;
isLoading?: boolean;
small?: boolean;
};
declare function FeatureSideNav(props: Props$i): React.JSX.Element;
type Props$h = {
children?: React.ReactNode;
className?: string;
isLoading?: boolean;
};
declare function FeatureSideNavFooter(props: Props$h): React.JSX.Element;
type Props$g = {
children: React.ReactNode;
className?: string;
isLoading?: boolean;
};
declare function FeatureSideNavHeader(props: Props$g): React.JSX.Element;
type FeatureSideNavLinksProps = {
children: React.ReactNode;
className?: string;
isLoading?: boolean;
};
declare function FeatureSideNavLinks(props: FeatureSideNavLinksProps): React.JSX.Element;
type Props$f = NavLinkProps & {
activeClassName?: string;
className?: string;
children?: string | number | ((...args: any[]) => any) | any | React.ReactNode;
hasDivider?: boolean;
icon?: React.FC<any>;
iconProps?: any;
to: string;
style?: React.CSSProperties;
[key: string]: any;
};
declare function FeatureSideNavLink(props: Props$f): React.JSX.Element;
type Props$e = Omit<ReactModal.Props, "appElement"> & {
appElement?: string;
children?: React.ReactNode;
className?: string;
containerClassName?: string;
imageClassName?: string;
isOpen?: boolean;
modalProps?: any;
imageProps?: any;
imageSrc?: string;
};
declare function ImageModal(props: Props$e): React.JSX.Element;
interface LoadingProps {
/** Time to delay in milliseconds before rendering the component */
delay?: number;
[k: string]: any;
}
declare function Loading({ delay, ...rest }: LoadingProps): React.JSX.Element;
type Props$d = {
addUser?: (id?: string) => any;
avatarProps?: any;
avatarSrc?: string;
buttonClassName?: string;
buttonProps?: any;
email?: string;
id: string;
isDetail?: boolean;
isPartner?: boolean;
isUserNotAllowed?: boolean;
liProps?: any;
name?: string;
notAllowedMessage?: string;
removeUser?: (id: string) => any;
};
declare function MemberBar({ addUser, avatarProps, avatarSrc, buttonClassName, buttonProps, email, id, isDetail, isPartner, isUserNotAllowed, liProps, name, notAllowedMessage, removeUser, }: Props$d): React.JSX.Element;
declare const TYPES: {
readonly DETAILS: "details";
readonly ARRAY: "array";
};
type TYPE = typeof TYPES[keyof typeof TYPES];
type Props$c = {
onEdit?: (...args: any[]) => any;
items?: string[] | {
name: string;
value: string;
}[];
style?: React.CSSProperties;
title?: string;
type?: TYPE;
};
declare function ModalConfirmEdit({ items, onEdit, style, title, type, ...rest }: Props$c): React.JSX.Element;
type Props$b = {
children?: React.ReactNode;
className?: string;
element?: any;
title?: string;
[key: string]: any;
};
declare const ModalForm: React.ForwardRefExoticComponent<Omit<Props$b, "ref"> & React.RefAttributes<any>>;
type OwnNotificationsContainerProps = {
containerId?: string;
enableMultiContainer?: boolean;
transition?: (...args: any[]) => any;
autoClose?: number;
closeOnClick?: boolean;
pauseOnHover?: boolean;
draggablePercent?: number;
hideProgressBar?: boolean;
};
type NotificationsContainerProps = OwnNotificationsContainerProps & typeof NotificationsContainer.defaultProps;
declare class NotificationsContainer extends Component<NotificationsContainerProps> {
static defaultProps: {
autoClose: number;
closeOnClick: boolean;
draggablePercent: number;
hideProgressBar: boolean;
pauseOnHover: boolean;
transition: ({ children, position, preventExitTransition, done, nodeRef, isIn }: react_toastify.ToastTransitionProps) => JSX.Element;
};
render(): React.JSX.Element;
}
/** Create notifcation wrapper around react-toastify with default component for basic notification
* @param {*} notification notifcation content
* @param {Object} config custom configuration for ToastContainer
*/
declare const notify: (notification: any, config?: any) => void;
type OwnProps = {
children?: React.ReactNode;
className?: string;
closeToast?: (...args: any[]) => any;
kind?: "error" | "info" | "success" | "warning";
title: string;
subtitle?: React.ReactNode;
role?: string;
caption?: React.ReactNode;
lowContrast?: boolean;
onCloseButtonClick?: (...args: any[]) => any;
iconDescription?: string;
notificationType?: string;
hideCloseButton?: boolean;
timeout?: number;
toastProps?: any;
[index: string]: any;
};
type Props$a = OwnProps;
declare function ToastNotification({ iconDescription, closeToast, toastProps, notificationType, ...rest }: Props$a): React.JSX.Element;
declare namespace ToastNotification {
var defaultProps: {
kind: string;
title: string;
subtitle: string;
caption: undefined;
role: string;
notificationType: string;
iconDescription: string;
onCloseButtonClick: () => void;
hideCloseButton: boolean;
timeout: number;
};
}
type Props$9 = {
kind?: "error" | "info" | "success" | "warning";
message?: string;
title?: string;
};
declare function PlatformBanner({ kind, message, title }: Props$9): React.JSX.Element;
type Props$8 = {
["aria-labelledby"]: string;
baseEnvUrl?: string;
baseServicesUrl?: string;
id: string;
initialNotifications?: PlatformNotification[];
isOpen: boolean;
setHasNewNotifications: (hasNewNotifications: boolean) => void;
setNotificationsCount: (notificationsCount: number) => void;
};
type State = {
currentNotifications: PlatformNotification[];
numNotifications: number;
error: boolean;
};
declare class PlatformNotificationsContainer extends React.Component<Props$8, State> {
ws: any;
articleRef: React.RefObject<unknown>;
state: {
error: boolean;
currentNotifications: PlatformNotification[];
numNotifications: number;
};
componentDidMount(): void;
connect: () => void;
componentWillUnmount(): void;
/**
* recieve x amount of new notifications and pass them into state of current notifications
*
*/
receiveNewNotifications: (incomingNotifications: {
body: string;
}) => void;
/**
* overwrite current notifications, the param represents all unread notifications
*/
recieveAllUnreadNotifications: (incomingNotifications: any) => void;
/**
* @param {Object} readResponse - list of notificationIds that have been read
* the function removes the notifications from current state that are returned as "read"
*/
replyRead: (readResponse: any) => void;
/**
* notificationId - a single notification that the user has marked as read
* @returns {Function} - makes network request, then after waiting for it to return, setState is called to update currentNotifications and numNotifications
*/
handleReadNotification(notificationId: string): void;
/**
* @returns {Function} - makes network request with all remaining notification IDs, then after waiting for it to return, setState is called to empty out currentNotifications and numNotifications
*/
handleReadAllNotifications(): void;
renderNotifications(): React.JSX.Element[];
render(): React.JSX.Element;
}
/**
* @example
* <Portal>
* <p>Thinking with portals</p>
* </Portal>
*/
declare const Portal: any;
type Props$7 = {
baseServicesUrl: string;
closeModal: () => void;
isOpen: boolean;
organization?: string;
platformEmail?: string;
};
declare function PrivacyStatement({ baseServicesUrl, closeModal, isOpen, organization, platformEmail, }: Props$7): React.JSX.Element;
type Props$6 = Omit<RouteProps, "component"> & {
allowedUserRoles: string[];
component: React.ReactNode;
message?: string;
title?: string;
userRole: string | string[];
};
declare function ProtectedRoute({ allowedUserRoles, component, message, title, userRole, ...rest }: Props$6): React.JSX.Element;
type RadioButtonOption = {
disabled?: boolean;
labelText: string;
value: string;
};
type Props$5 = {
columnHeight?: string;
defaultSelected?: string;
disabled?: boolean;
helperText?: string;
id?: string;
key?: string;
label?: string;
labelText?: string;
name: string;
onChange: (selectedValue: string, radioGroup: string, e: React.ChangeEvent<HTMLInputElement>) => void;
options: RadioButtonOption[];
orientation?: "horizontal" | "vertical";
radioGroupProps?: Record<string, any>;
radioButtonProps?: Record<string, any>;
tooltipClassName?: string;
tooltipContent?: React.ReactNode;
tooltipProps?: TooltipHoverProps;
value?: string;
verticalWrapped?: boolean;
};
declare function RadioGroupComponent({ defaultSelected, disabled, helperText, id, label, labelText, name, onChange, options, orientation, radioGroupProps, radioButtonProps, tooltipClassName, tooltipContent, tooltipProps, value, columnHeight, verticalWrapped, }: Props$5): React.JSX.Element;
type Props$4 = React.ComponentPropsWithRef<"input"> & {
tooltipClassName?: string;
tooltipContent?: React.ReactNode;
tooltipProps?: TooltipHoverProps;
cols?: number;
defaultValue?: string | number;
enableCounter?: boolean;
helperText?: React.ReactNode;
hideLabel?: boolean;
invalid?: boolean;
invalidText?: React.ReactNode;
label?: string;
labelText: React.ReactNode;
light?: boolean;
max?: string | number;
maxCount?: number;
rows?: number;
};
declare const TextAreaComponent: React.ForwardRefExoticComponent<Omit<Props$4, "ref"> & React.RefAttributes<any>>;
type Props$3 = React.ComponentPropsWithRef<"input"> & {
value?: string;
onChange?: (...args: any) => any;
setError?: (...args: any) => any;
helperText?: React.ReactNode;
invalid?: boolean;
label?: string;
customError?: string;
labelText?: React.ReactNode;
maxWordCount?: number;
readonly?: boolean;
quillProps?: any;
};
declare const RichTextAreaComponent: React.ForwardRefExoticComponent<Omit<Props$3, "ref"> & React.RefAttributes<any>>;
type Props$2 = React.ComponentPropsWithRef<"input"> & {
tooltipClassName?: string;
tooltipContent?: React.ReactNode;
tooltipProps?: TooltipHoverProps;
defaultValue?: string | number;
helperText?: React.ReactNode;
hideLabel?: boolean;
inline?: boolean;
invalid?: boolean;
invalidText?: React.ReactNode;
label?: React.ReactNode;
labelText?: React.ReactNode;
light?: boolean;
readOnly?: boolean;
size?: "sm" | "md" | "lg";
warn?: boolean;
warnText?: React.ReactNode;
};
declare const TextInputComponent: React.ForwardRefExoticComponent<Omit<Props$2, "ref"> & React.RefAttributes<any>>;
type Props$1 = {
helperText?: React.ReactNode;
label?: React.ReactNode;
orientation?: "vertical" | "horizontal";
reversed?: boolean;
tooltipClassName?: string;
tooltipContent?: React.ReactNode;
tooltipProps?: TooltipHoverProps;
className?: string;
defaultToggled?: boolean;
disabled?: boolean;
hideLabel?: boolean;
id: string;
labelA?: React.ReactNode;
labelB?: React.ReactNode;
labelText?: React.ReactNode;
name?: string;
onClick?: (...args: any[]) => any;
onChange?: (...args: any[]) => any;
onToggle?: (...args: any[]) => any;
readOnly?: boolean;
size?: "sm" | "md";
toggled?: boolean;
invalid?: boolean;
invalidText?: string;
};
declare function ToggleComponent({ helperText, id, invalid, invalidText, reversed, label, labelText, labelA, labelB, orientation, tooltipClassName, tooltipContent, tooltipProps, ...toggleProps }: Props$1): React.JSX.Element;
type Props = {
analyticsHelpers?: any;
carbonTheme?: "white" | "g10" | "g90" | "g100";
createJoinTeamTrigger?: Function;
baseEnvUrl?: string;
config?: {
features?: {
"appSwitcher.enabled"?: boolean;
"consent.enabled"?: boolean;
"docs.enabled"?: boolean;
"eventing.enabled"?: boolean;
"feedback.enabled"?: boolean;
"homePage.enabled"?: boolean;
"partner.enabled"?: boolean;
"metering.enabled"?: boolean;
"notifications.enabled"?: boolean;
"notificationsCount.enabled"?: boolean;
"support.enabled"?: boolean;
"welcome.enabled"?: boolean;
};
navigation?: NavLink[];
platform: {
baseEnvUrl: string;
baseServicesUrl: string;
communityUrl?: string;
releaseNotesUrl?: string;
legalTermsUrl?: string;
feedbackUrl?: string;
name?: string;
platformEmail?: string;
platformName: string;
platformVersion: string;
platformVersionError: boolean;
platformOrganization?: string;
docs?: {
url: string;
};
privateTeams?: boolean;
sendIdeasUrl?: string;
sendBluePointsAwardUrl?: string;
sendMail?: boolean;
askICAEnabled?: boolean;
signOutUrl?: string;
version?: string;
instanceSwitcherEnabled?: boolean;
instances?: any[];
assistantVersion?: string;
agentsVersion?: string;
scribeFlowVersion?: string;
askICAUrl?: string;
supportUrl?: string;
};
platformMessage?: any;
};
history?: any;
isLaunchpad?: boolean;
isLoadingTeamSwitcher?: boolean;
isSuccessTeamSwitcher?: boolean;
setIsSuccessTeamSwitcher?: Function;
leftPanel?: (args: {
close: () => void;
isOpen: boolean;
navLinks?: NavLink[];
}) => React.ReactNode;
platformName?: string;
productName?: string;
profileMenuItems?: React.ReactNode[];
renderPrivacyRedirect?: boolean;
renderPrivacyStatement?: boolean;
rightPanel?: {
icon?: React.ReactNode;
component: React.ReactNode;
};
refetchUser?: Function;
refetchNavigation?: Function;
skipToContentProps?: {
href?: string;
children?: string;
className?: string;
};
supportMenuItems?: React.ReactNode[];
templateMeteringEvent?: (props: any) => void;
trackEvent?: Function;
triggerEvent?: (props: any) => any;
user?: User;
userTeams?: {
data: any;
isLoading: boolean;
error: any;
};
userTeamsAssets?: {
data: any;
isLoading: boolean;
error: any;
};
enableIcaMacs?: boolean;
handleShowTutorial?: Function;
tutorialScreenToShow?: string;
};
declare function UIShell({ analyticsHelpers, baseEnvUrl, carbonTheme, config, createJoinTeamTrigger, history, isLaunchpad, isLoadingTeamSwitcher, isSuccessTeamSwitcher, setIsSuccessTeamSwitcher, leftPanel, platformName, productName, profileMenuItems, supportMenuItems, renderPrivacyRedirect, renderPrivacyStatement, rightPanel, handleShowTutorial, refetchUser, refetchNavigation, skipToContentProps, templateMeteringEvent, trackEvent, triggerEvent, tutorialScreenToShow, user, userTeams, userTeamsAssets, enableIcaMacs, }: Props): React.JSX.Element;
export { AdvantageSideNav, AutoSuggestBmrg as AutoSuggest, Avatar, CheckboxListComponent as CheckboxList, ComboBoxComponent as ComboBox, ComboBoxMultiSelect, ComposedModal, ConfirmModal, CreatableComponent as Creatable, DataDrivenInput, DateInputComponent as DateInput, DecisionButtons, DelayedRender, DynamicFormik, DynamicInput, Error, Error403, Error404, ErrorBoundary, ErrorDragon, ErrorFullPage, Error as ErrorMessage, ErrorPage, ErrorPageCore, FeatureHeader, FeatureHeaderSubtitle, FeatureHeaderTitle, FeatureNavTab, FeatureNavTabs, FeatureSideNav, FeatureSideNavFooter, FeatureSideNavHeader, FeatureSideNavLink, FeatureSideNavLinks, FlowModalContainer as FlowModal, FlowModalForm, FormInput, Header, _default as HeaderMenuItem, ImageModal, InputGovernor, Loading, MemberBar, Modal, ModalConfirmEdit, FlowModalContainer as ModalFlow, FlowModalForm as ModalFlowForm, ModalForm, ModalFunctionChildrenProps, ModalTrigger, NotificationsContainer, PlatformBanner, PlatformNotificationsContainer, Portal, PrivacyStatement, ProtectedRoute, RadioGroupComponent as RadioGroup, RichTextAreaComponent as RichTextArea, SimpleTeamService, Team, TextAreaComponent as TextArea, TextInputComponent as TextInput, ToastNotification, ToggleComponent as Toggle, TooltipHover, UIShell, User, UserTeams, notify };