/// import { TypeIcon, TypeLink, TypeLoader, TypeText } from "@material-ui/core/styles/createPalette"; import { AvatarProps, BackdropProps, IconButtonProps, SlideProps, TextFieldProps, SvgIconProps, TypographyProps, SnackbarProps } from "@material-ui/core"; import { colors } from "./shared/colors"; import { ButtonProps } from "@material-ui/core"; import { FormControlLabelProps, CheckboxProps } from "@material-ui/core"; import { DayPickerProps } from "react-day-picker"; import { BoxProps, PopperProps } from "@material-ui/core"; import { LinkProps } from "react-router-dom"; import { TemplateProps } from "react-draggable-list"; import { NumberFormatProps } from "react-number-format"; import { Column, Row } from "react-table"; import { RESET_TABLE, UPDATE_TABLE } from "./components/FTLTable/ContextTable"; import { ActionMeta } from "react-select"; import Select from "react-select"; import { ListChildComponentProps, ListOnScrollProps } from "react-window"; import { typography } from "./shared/theme"; import { TabsProps } from "@material-ui/core"; export { FTLTabs, FTLTab } from "./components/FTLTabs"; export { FTLSegmentedControls, FTLSegmentedControl, } from "./components/FTLSegmentedControls"; export { FTLAvatar } from "./components/FTLAvatar"; export { FTLBadge } from "./components/FTLBadge"; export { FTLBreadcrumbs } from "./components/FTLBreadcrumbs"; export { FTLButton } from "./components/FTLButton"; export { FTLCheckbox } from "./components/FTLCheckbox"; export { FTLDayPicker } from "./components/FTLDayPicker"; export { FTLDialog } from "./components/FTLDialog"; export { FTLDots } from "./components/FTLDots"; export { FTLFakeTextField } from "./components/FTLFakeTextField"; export { FTLSideMenu } from "./components/FTLSideMenu"; export { FTLTextField } from "./components/FTLTextField"; export { FTLHiddenMenu } from "./components/FTLHiddenMenu"; export { FTLPageHeader } from "./components/FTLPageHeader"; export { FTLHeader } from "./components/FTLHeader"; export { FTLIconButton } from "./components/FTLIconButton"; export { FTLJsonLogger } from "./components/FTLJsonLogger"; export { FTLLabel } from "./components/FTLLabel"; export { FTLLoader } from "./components/FTLLoader"; export { FTLModal } from "./components/FTLModal"; export { FTLPasswordField } from "./components/FTLPasswordField"; export { FTLPhoneField } from "./components/FTLPhoneField"; export { FTLSearchField } from "./components/FTLSearchField"; export { FTLSelect, FTLSelectAsync, FTLSelectCreatable, FTLCheckboxSelector, } from "./components/FTLSelect"; export { FTLSnackbar } from "./components/FTLSnackbar"; export { FTLStatusTag } from "./components/FTLStatusTag"; export { FTLTable, ContextTable, CachedTableContextProvider, FTLPaginationButton, FTLTableBody, FTLTableCell, FTLTableRow, } from "./components/FTLTable"; export { FTLToolbar } from "./components/FTLToolbar"; export { FTLTooltipPopover } from "./components/FTLTooltipPopover"; export { FTLDraggableList } from "./components/FTLDraggableList"; export { FTLTypography } from "./components/FTLTypography"; export { FTLUnderlinedBox } from "./components/FTLUnderlinedBox"; export { FTLLink } from "./components/FTLLink"; export { FTLDropdown } from "./components/FTLDropdown"; export { FTLPictureUpload } from "./components/FTLPictureUpload"; export { IconWrapper, EditIcon, LockIcon, SearchIcon, ClearIcon, ChevronIcon, OrderIcon, CityIcon, OrganizationIcon, AreaIcon, TimeIcon, CourierIcon, MapIcon, FlashIcon, InfoIcon, UpdateIcon, WarningIcon, FilterIcon, CameraIcon, TrashIcon, BubbleIcon, CountryIcon, BrandIcon, PeopleIcon, GearIcon, DragIndicatorIcon, AvatarPlaceholderIcon, BrandPlaceholderIcon, ArrowDownIcon, VisibilityIcon, CloseIcon, ErrorIcon, SuccessIcon, SortIcon, OrderServiceIcon, NotificationsIcon, FTLLogoIcon, } from "./components/icons"; export * from "./shared/theme"; export { colors } from "./shared/colors"; export { useVisibleColumns } from "./shared/hooks/useVisibleColumns"; export { useLayout } from "./shared/hooks/useLayout"; export declare type FTLPictureUploadProps = { onDelete?: React.MouseEventHandler; onUpload?: React.MouseEventHandler; onFileSelect?: (event: React.ChangeEvent) => void; onError?: React.ReactEventHandler; imageUrl?: string; inputRef?: React.LegacyRef | undefined; }; export declare type FTLAvatarProps = { size?: "xsmall" | "small" | "normal" | "large"; type: "avatar" | "brand"; } & Omit; export declare type FTLBadgeProps = Omit & Partial<{ backgroundColor: keyof typeof colors; textColor: FTLTypographyProps["color"]; }>; export declare type FTLBreadcrumbsProps = { children?: React.ReactNode; items: BreadcrumbsState; }; export declare type BreadcrumbType = { to: string; label: string; }; export declare type BreadcrumbsState = BreadcrumbType[]; export declare type BreadcrumbsAction = { type: "ADD_BREADCRUMB"; breadcrumb: BreadcrumbType; } | { type: "REMOVE_BREADCRUMB"; breadcrumb: BreadcrumbType; }; export declare type FTLButtonProps = Omit & { async?: boolean; isSelected?: boolean; size?: "small" | "large"; }; export declare type FTLCheckboxProps = Omit & { label?: React.ReactNode; size?: "small" | "medium" | "large"; FormControlLabelProps?: Omit; }; export declare type FTLDayPickerProps = DayPickerProps & { popperPlacement?: PopperProps["placement"]; placeholder?: string; value?: Date | string | null; label?: FTLLabelProps["label"]; required?: FTLLabelProps["required"]; isFormattingValue?: boolean; isDisabled?: boolean; isError?: boolean; isInline?: boolean; BoxProps?: BoxProps; menuWidth?: number; onClear?: () => void; onClick?: (e: React.MouseEvent | React.TouchEvent) => void; }; declare type ItemKeyFunction = (item: ListItemType) => string; export declare type SpringConfigType = { stiffness: number; damping: number; }; export declare type FTLDraggableListItemProps = TemplateProps & { componentConstructor: (props: TemplateProps) => React.ReactNode; }; export declare type FTLDraggableListProps = { list: readonly ListItemType[]; itemKey: keyof ListItemType | ItemKeyFunction; springConfig?: SpringConfigType; unsetZIndex?: boolean; constrainDrag?: boolean; autoScrollMaxSpeed?: number; autoScrollRegionSize?: number; commonProps?: any; children?: React.ReactNode; className?: string; onMoveEnd: (newList: readonly ListItemType[], movedItem: ListItemType, oldIndex: number, newIndex: number) => void; componentConstructor: (item: FTLDraggableListItemProps["item"]) => React.ReactNode; ComponentWrapperProps?: React.ComponentProps<"div">; }; export declare type FTLFakeTextFieldProps = Omit & { startIcon?: React.ReactNode; endIcon?: React.ReactNode; loaded?: boolean; value?: string; } & FTLLabelProps; export declare type FTLPageHeaderProps = { title?: string; primaryButton?: FTLButtonProps & { label: string; onClick: () => void; }; secondaryButton?: FTLButtonProps & { label: string; onClick: () => void; }; BoxProps?: BoxProps; }; export declare type FTLHeaderProps = { title?: string; /** * Url профиля, по умолчанию "/profile" */ toProfileUrl?: string; /** * Url картинки профиля */ profileImageUrl?: string; /** * Коллбэк, запускающийся при нажатии на кнопку "Выйти" */ onSignOut?: () => void; }; export declare type FTLHiddenMenuProps = { toolbar?: React.ReactNode; children?: React.ReactNode; open: boolean; onClose?: (action: "backdropClick" | "escapeKeyDown") => void; SlideProps?: SlideProps; BackdropProps?: BackdropProps; height?: React.CSSProperties["height"]; }; export declare type FTLIconButtonProps = Omit & { disableBackground?: boolean; color?: keyof TypeIcon | "inherit"; }; export declare type FTLDialogProps = { open?: boolean; onClose?: (event: React.MouseEvent) => void | ((event: {}, reason: "backdropClick" | "escapeKeyDown") => void); onCancel?: (event: React.MouseEvent) => void; onSubmit?: (event: React.MouseEvent) => void; title?: string | React.ReactNode; children?: React.ReactNode; size?: "small" | "large"; showActions?: boolean; style?: React.CSSProperties; }; export declare type FTLJsonLoggerProps = FTLTypographyProps & { /** * Значение передаётся в виде объекта, которое потом сериализуется в JSON */ value?: any; /** * Заголовок */ label?: string; backgroundColor?: string; }; export declare type FTLTypographyProps = Partial & { component: any; color: keyof TypeText | "inherit"; variant: keyof typeof typography.unsupportedSemanticTags | keyof typeof typography.supportedTags; }>; export declare type FTLLinkProps = Omit & Partial<{ color: keyof TypeLink | "inherit"; variant: FTLTypographyProps["variant"]; }>; export declare type FTLLoaderProps = Omit & { color?: keyof TypeLoader | "inherit"; }; export declare type FTLTextFieldProps = Omit; export declare type FTLModalProps = { open: boolean; children?: React.ReactNode; size?: "small" | "large"; TypographyProps?: FTLTypographyProps; }; export declare type FTLPasswordFieldProps = { isVisible?: boolean; } & FTLTextFieldProps; export declare type FTLPhoneFieldProps = NumberFormatProps & Omit & Omit & { code?: string; phoneCodeComponent?: React.ReactNode; value?: React.ReactNode; defaultValue?: React.ReactNode; BoxProps?: BoxProps; }; export declare type FTLSearchFieldProps = { onChange?: (value: string) => void; } & Omit & { value?: string; sizeIcon?: string; }; export interface ListItemRendererProps extends ListChildComponentProps { } export declare type NormalizeFunc = (item: ItemType) => string; export declare type NormalizeScheme = { value: string | NormalizeFunc; label: string | NormalizeFunc; [prop: string]: string | NormalizeFunc; }; export declare type SelectOption = { label: string; value: string; [key: string]: any; }; export declare type InfiniteLoaderProps = { itemSize: number; loadItems: (startIndex: number, stopIndex: number) => Promise<{ items: ItemType[]; count: number; }> | { items: ItemType[]; count: number; }; normalizeScheme?: NormalizeScheme; itemRenderer(props: ListItemRendererProps): React.ReactElement; onScroll?: (props: ListOnScrollProps) => void; fullHeight?: boolean; initialScrollOffset?: number; itemKey?: string; records?: number; width?: number; height?: number; itemCount?: number; queryValue: string | undefined; isNextPageLoading?: boolean; items?: SelectOption[]; hasNextPage?: boolean; type?: "sync" | "async"; }; export declare type FTLSelectProps = Omit["props"], "onChange" | "maxWidthMenu"> & { label?: string; size?: "small" | "default"; width?: "small" | "default"; /** * Кол-во элементов */ records?: number; /** * Показывать ли меню при отсутствии данных */ showEmptyMenu?: boolean; isError?: boolean; isInfinite?: boolean; isRequired?: boolean; isSearchInList?: boolean; isMulti?: boolean; value?: SelectOption[] | SelectOption | null; /** * Высота элемента меню в списке. Необходимо для того, чтобы правильно работала динамическая подгрузка. По умолчанию 32 пикселя. */ itemSize?: number; onClick?: (e: React.MouseEvent | React.TouchEvent) => void; onClickOutside?: () => void; BoxProps?: BoxProps; withCheckboxes?: boolean; type?: "default" | "filter"; searchPlaceholder?: string; onChange?: (option: SelectOption | null, actionMeta: ActionMeta) => void; popperPlacement?: PopperProps["placement"]; menuWidth?: number; placeholder?: string; component?: (props: Select["props"]) => React.ReactNode; }; export declare type FTLSelectAsyncProps = FTLSelectProps & { loadData: { promiseFn: (args: { query?: string; offset?: number; [prop: string]: any; }) => Promise; normalizeScheme: NormalizeScheme; }; showLoader?: boolean; meta?: any; }; export declare type FTLSelectCreatableProps = Omit; export declare type FTLDotsProps = { color?: keyof TypeLoader | "inherit"; className?: string; style?: React.CSSProperties; }; export declare type FTLCheckboxSelectorProps = Omit & { children?: React.ReactNode; buttonIcon?: React.ReactNode; toolbar?: React.ReactNode; DraggableListProps: FTLDraggableListProps; }; export declare type FTLDropdownMenuProps = PopperProps & { menuWidth?: number | string; menuHeight?: number | string; containerRef: React.MutableRefObject; }; export interface ListItemRendererProps extends ListChildComponentProps { } export declare type TooltipProps = { wait: number; title?: string; }; export declare type FTLTooltipPopoverProps = React.ComponentProps<"div"> & { wait: number; title?: string; style?: React.CSSProperties; }; export declare type MenuItem = { label: string; icon: React.ReactNode; items?: NestedMenuItem[]; to?: string; }; export declare type NestedMenuItem = { to: string; label: string; }; export declare type FTLSideMenuProps = { items: MenuItem[]; onMinimize?: (width: number) => void; }; export declare type FTLToolbarProps = { currentTabIndex?: number; position?: "sticky" | "absolute" | "relative" | "static"; length?: number; disabled?: boolean; onSaveMessage?: string; onSaveBtnId?: string; hasCheckbox?: boolean; async?: boolean; children?: React.ReactNode; onSave?: () => void; onCancel?: () => void; goToPrevTab?: () => void; goToNextTab?: () => void; }; export declare type FTLSnackbarProps = Omit & { open?: boolean; hideDuration?: number; icon?: React.ReactNode; onClose?: () => void; message?: string; variant?: "error" | "success"; }; export declare type FTLStatusTagProps = { status?: "new" | "neutral" | "success" | "error" | "disabled" | "info" | "warning" | "delete"; children?: React.ReactNode; isDisabled?: boolean; isCloseable?: boolean; onClose?: () => void; icon?: React.ReactNode; closeIcon?: React.ReactNode; size?: "small" | "medium" | "large"; style?: React.CSSProperties; TypographyProps?: FTLTypographyProps; }; export declare type FTLTabsProps = { onChange: (e: React.ChangeEvent<{}>, value: number) => void; value: number; } & Omit; export declare type FTLTableProps = { columns: Column[]; data: any[]; pageCount?: number; isSearching?: boolean; hasData?: boolean; isFetching?: boolean; skipPageReset?: boolean; rowHeight?: number; showHeader?: boolean; showFooter?: boolean; type?: "simple" | "fixedColumns"; initialVisibleColumns?: string[]; context?: TableContext; rowDisable?: (row: Row) => boolean; onRowClick?: (row: Row, event: React.MouseEvent) => void; setIsFetching?: React.Dispatch>; onFetchData?: (args: { limit: number; offset: number; }) => Promise; }; export declare type FTLSegmentedControlsProps = Omit & { variant?: "scrollable" | "standard"; }; export declare type FTLTableRowProps = React.ComponentProps<"tr"> & Partial<{ isDisabled: boolean; isFocusable: boolean; height: React.CSSProperties["height"]; type: "head" | "default"; }>; export declare type FTLTableFooterProps = { pageIndex: number; pageSize: number; pageCount: number; setPageSize: (value: number) => void; onFetchPage?: (...args: any) => void; gotoPage: (pageNumber: number) => void; }; export declare type FTLTableCellProps = Omit, "ref"> & Partial<{ textAlign: "left" | "right" | "center" | "justify"; action: boolean; isDisabled: boolean; isFocusable: boolean; minWidth: number; type: "head" | "default"; ref: React.ForwardedRef; }>; export declare type FTLTableBodyProps = React.ComponentProps<"tbody"> & { showHeader?: boolean; showFooter?: boolean; }; export declare type FTLPaginationButtonProps = FTLButtonProps; export declare type SortDirectionKeys = "asc" | "desc"; export declare type TableAction = UpdateTableAction | ResetTableAction; export declare type TableContext = { state: TableState; dispatch: React.Dispatch; }; export declare type UpdateTableAction = { type: typeof UPDATE_TABLE; payload?: Partial; }; export declare type ResetTableAction = { type: typeof RESET_TABLE; }; export declare type TableState = { pageIndex: number; pageSize: number; sortName: string; sortDirection: "desc" | "asc"; components?: { [prop: string]: React.ReactNode; }; visibleColumns: string[]; orderedColumns: readonly Column[]; [prop: string]: any; }; export declare type FTLLabelProps = Omit & { label: string; required?: boolean; color?: FTLTypographyProps["color"]; variant?: FTLTypographyProps["variant"]; }; export declare type BasicIconProps = Partial<{ color: keyof TypeIcon | "inherit"; sizeRatio: number; }> & Omit; export declare type IconWrapperProps = BasicIconProps & { width: number; height: number; } & Pick; export declare type LockIconProps = BasicIconProps & { open: boolean; }; export declare type MapIconProps = BasicIconProps & { size?: "small" | "large"; }; export declare type SortIconProps = Omit & { sort?: "desc" | "asc"; }; export declare type VisibilityIconProps = BasicIconProps & { open: boolean; };