@skedulo/sked-ui 21.8.2 → 21.9.0
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/dist/components/IntersectionObserverWrapper/IntersectionObserverWrapper.d.ts +1 -1
- package/dist/components/avatar/Avatar.d.ts +3 -3
- package/dist/components/avatar/AvatarDetail.d.ts +4 -4
- package/dist/components/avatar/AvatarGroup.d.ts +1 -1
- package/dist/components/badge/Badge.d.ts +3 -3
- package/dist/components/badge/Badge.stories.d.ts +3 -3
- package/dist/components/button-group/ButtonGroup.d.ts +1 -1
- package/dist/components/buttons/button/Button.d.ts +2 -2
- package/dist/components/buttons/button-dropdown/ButtonDropdown.d.ts +1 -1
- package/dist/components/buttons/icon-button/IconButton.d.ts +2 -2
- package/dist/components/buttons/icon-button-dropdown/IconButtonDropdown.d.ts +2 -2
- package/dist/components/calendar-controls/CalendarControls-utils.d.ts +2 -2
- package/dist/components/calendar-controls/CalendarControls.d.ts +2 -2
- package/dist/components/calendar-controls/elements/DateSelector.d.ts +1 -1
- package/dist/components/calendar-controls/elements/NavigationButtons.d.ts +2 -2
- package/dist/components/calendar-controls/elements/RangePicker.d.ts +1 -1
- package/dist/components/datepicker/DateTime.d.ts +2 -2
- package/dist/components/datepicker/Datepicker.d.ts +8 -9
- package/dist/components/datepicker/Time.d.ts +3 -2
- package/dist/components/dynamic-table/DynamicTable-utils.d.ts +8 -8
- package/dist/components/dynamic-table/DynamicTable.d.ts +3 -3
- package/dist/components/dynamic-table/interfaces.d.ts +4 -4
- package/dist/components/emptystate/EmptyState.d.ts +1 -1
- package/dist/components/filter-bar/FilterBar.d.ts +7 -7
- package/dist/components/filter-bar/filter-list/FilterList.d.ts +2 -2
- package/dist/components/filter-bar/filter-list/FilterListWithApply.d.ts +2 -2
- package/dist/components/filter-bar/filter-list/FilterSearch.d.ts +3 -3
- package/dist/components/filter-bar/filter-list/RemoteSearch.d.ts +3 -3
- package/dist/components/filter-bar/filter-pill/FilterPill.d.ts +3 -3
- package/dist/components/filter-bar/interfaces.d.ts +1 -1
- package/dist/components/forms/SkedFormValidation.d.ts +7 -7
- package/dist/components/forms/elements/AsyncMultiSearchSelect.d.ts +2 -2
- package/dist/components/forms/elements/AsyncSearchSelect.d.ts +2 -2
- package/dist/components/forms/elements/FormElements.d.ts +9 -9
- package/dist/components/forms/elements/MultiSearchSelect.d.ts +2 -2
- package/dist/components/forms/elements/SearchSelect.d.ts +2 -2
- package/dist/components/forms/elements/interfaces.d.ts +7 -7
- package/dist/components/forms/elements/select-components.d.ts +3 -3
- package/dist/components/forms/elements/select-hooks.d.ts +3 -3
- package/dist/components/icon/Icon.d.ts +2 -2
- package/dist/components/info-card/InfoCard.d.ts +1 -1
- package/dist/components/inline-banner/InlineBanner.d.ts +1 -1
- package/dist/components/link/Link.d.ts +1 -1
- package/dist/components/link/Link.stories.d.ts +3 -3
- package/dist/components/lozenge/CustomLozenge.d.ts +1 -1
- package/dist/components/lozenge/Lozenge.d.ts +3 -3
- package/dist/components/modals/Modals.d.ts +5 -4
- package/dist/components/pagination/PaginationPages/PaginationPages.d.ts +3 -3
- package/dist/components/popout/PopOut.d.ts +3 -3
- package/dist/components/popout/usePopOut.d.ts +1 -1
- package/dist/components/popups/info-window/InfoWindow.d.ts +4 -4
- package/dist/components/popups/info-window/LegacyInfoWindow.d.ts +5 -3
- package/dist/components/popups/info-window/info-window-utils.d.ts +1 -1
- package/dist/components/popups/overflow-tooltip/OverflowTooltip.d.ts +3 -2
- package/dist/components/popups/tooltip/Tooltip.d.ts +5 -5
- package/dist/components/portal/Portal.d.ts +1 -1
- package/dist/components/search-box/SearchBox.d.ts +1 -1
- package/dist/components/status-icon/StatusIcon.d.ts +2 -2
- package/dist/components/table/Table.d.ts +5 -5
- package/dist/components/tabs/Tabs/Tabs.d.ts +3 -3
- package/dist/components/tabs/Tabs/interfaces.d.ts +2 -1
- package/dist/index.js +6920 -5655
- package/package.json +20 -16
- package/yarn.lock +2135 -301
- package/dist/components/avatar/__tests__/Avatar.spec.d.ts +0 -1
- package/dist/components/avatar/__tests__/AvatarDetail.spec.d.ts +0 -1
- package/dist/components/badge/__tests__/Badge.spec.d.ts +0 -1
- package/dist/components/button-group/__tests__/ButtonGroup.spec.d.ts +0 -1
- package/dist/components/buttons/button/__tests__/Button.spec.d.ts +0 -1
- package/dist/components/filter-bar/filter-list/__tests__/FilterList.spec.d.ts +0 -1
- package/dist/components/forms/elements/TextArea.spec.d.ts +0 -1
- package/dist/components/forms/elements/__tests__/AsyncMultiSearchSelect.spec.d.ts +0 -1
|
@@ -35,5 +35,5 @@ interface IIntersectionObserverWrapper {
|
|
|
35
35
|
* function when the element is visible within the specified viewport
|
|
36
36
|
* based on supplied props. Useful for creating infinite scrolling behaviour.
|
|
37
37
|
*/
|
|
38
|
-
export declare const IntersectionObserverWrapper: React.FC<IIntersectionObserverWrapper
|
|
38
|
+
export declare const IntersectionObserverWrapper: React.FC<React.PropsWithChildren<IIntersectionObserverWrapper>>;
|
|
39
39
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type AvatarSizes = 'tiny' | 'small' | 'medium' | 'large';
|
|
3
3
|
export interface IAvatar extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/** This will be used for the 'letter' display and be the
|
|
5
5
|
* default tooltip text if showTooltip is true
|
|
@@ -41,6 +41,6 @@ export declare const avatarSizeClassMap: {
|
|
|
41
41
|
*/
|
|
42
42
|
export declare class Avatar extends React.PureComponent<IAvatar, {}> {
|
|
43
43
|
getInitials(name?: string): string;
|
|
44
|
-
renderAvatar(): JSX.Element;
|
|
45
|
-
render(): JSX.Element;
|
|
44
|
+
renderAvatar(): React.JSX.Element;
|
|
45
|
+
render(): React.JSX.Element;
|
|
46
46
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { IAvatar } from './Avatar';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type AvatarDetailGroupSize = 'tiny' | 'small' | 'medium' | 'large';
|
|
4
|
+
type AvatarProps = Pick<IAvatar, 'name' | 'imageUrl'>;
|
|
5
5
|
export interface IAvatarDetailProps extends AvatarProps {
|
|
6
6
|
/**
|
|
7
7
|
* 'medium' is the default
|
|
@@ -15,5 +15,5 @@ export interface IAvatarDetailProps extends AvatarProps {
|
|
|
15
15
|
linkUrl?: string;
|
|
16
16
|
target?: string;
|
|
17
17
|
}
|
|
18
|
-
export declare const AvatarDetail: ({ name, imageUrl, size, subtitle, className, linkUrl, target }: IAvatarDetailProps) => JSX.Element;
|
|
18
|
+
export declare const AvatarDetail: ({ name, imageUrl, size, subtitle, className, linkUrl, target }: IAvatarDetailProps) => React.JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IAvatar, AvatarSizes } from './Avatar';
|
|
3
|
-
export
|
|
3
|
+
export type IAvatarInfo = Partial<Pick<IAvatar, 'name' | 'imageUrl' | 'tooltipText'> & {
|
|
4
4
|
onClick: () => void;
|
|
5
5
|
}>;
|
|
6
6
|
export interface IAvatarGroupProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type BadgeTypes = 'default' | 'primary' | 'important';
|
|
3
3
|
export declare const DEFAULT_BADGE_CLASSES = "sked-badge-min-w sk-text-xxs sk-font-medium sk-tracking-wide sk-h-5 sk-pb-px sk-rounded-full sk-inline-flex sk-items-center sk-justify-center";
|
|
4
4
|
export interface IBadgeProps {
|
|
5
5
|
/**
|
|
@@ -15,4 +15,4 @@ export interface IBadgeProps {
|
|
|
15
15
|
*/
|
|
16
16
|
badgeType?: BadgeTypes;
|
|
17
17
|
}
|
|
18
|
-
export declare const Badge: ({ count, countLimiter, badgeType }: IBadgeProps) => JSX.Element;
|
|
18
|
+
export declare const Badge: ({ count, countLimiter, badgeType }: IBadgeProps) => React.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ComponentStory } from '@storybook/react';
|
|
3
3
|
import { IBadgeProps } from './Badge';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: (props: IBadgeProps) => JSX.Element;
|
|
6
|
+
component: (props: IBadgeProps) => React.JSX.Element;
|
|
7
7
|
argTypes: {
|
|
8
8
|
badgeType: {
|
|
9
9
|
options: string[];
|
|
@@ -14,4 +14,4 @@ declare const _default: {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export default _default;
|
|
17
|
-
export declare const Basic: ComponentStory<({ count, countLimiter, badgeType }: IBadgeProps) => JSX.Element>;
|
|
17
|
+
export declare const Basic: ComponentStory<({ count, countLimiter, badgeType }: IBadgeProps) => React.JSX.Element>;
|
|
@@ -2,5 +2,5 @@ import * as React from 'react';
|
|
|
2
2
|
interface IButtonGroup extends React.HTMLProps<HTMLDivElement> {
|
|
3
3
|
compact?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const ButtonGroup: React.FC<IButtonGroup
|
|
5
|
+
export declare const ButtonGroup: React.FC<React.PropsWithChildren<IButtonGroup>>;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconNames } from '../../icon/Icon';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ButtonTypes = 'primary' | 'secondary' | 'transparent';
|
|
4
|
+
export type IButtonProps = {
|
|
5
5
|
/**
|
|
6
6
|
* The type of button to be displayed. Primary | Secondary | Transparent
|
|
7
7
|
*/
|
|
@@ -10,5 +10,5 @@ interface IButtonDropdownProps extends IButtonDropdownCommon {
|
|
|
10
10
|
* The DropdownButton component displays/hides children as a dropdown when clicked. The Menu and MenuItem
|
|
11
11
|
components are strongly recommended to be used in conjunction with this component to enforce correct styling of the dropdown menu.
|
|
12
12
|
*/
|
|
13
|
-
export declare const ButtonDropdown: React.FC<IButtonDropdownProps
|
|
13
|
+
export declare const ButtonDropdown: React.FC<React.PropsWithChildren<IButtonDropdownProps>>;
|
|
14
14
|
export {};
|
|
@@ -8,6 +8,6 @@ interface IconButtonProps {
|
|
|
8
8
|
tooltipDelay?: ITooltipProps['delayShow'];
|
|
9
9
|
disableTooltip?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
12
|
-
export declare const IconButton: React.FC<IIconButton
|
|
11
|
+
export type IIconButton = IconButtonProps & Partial<IButtonProps>;
|
|
12
|
+
export declare const IconButton: React.FC<React.PropsWithChildren<IIconButton>>;
|
|
13
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IIconButton } from '../icon-button/IconButton';
|
|
3
3
|
import { IButtonDropdownCommon } from '../interfaces';
|
|
4
|
-
export
|
|
5
|
-
export declare const IconButtonDropdown: React.FC<IconButtonDropdown
|
|
4
|
+
export type IconButtonDropdown = IIconButton & IButtonDropdownCommon;
|
|
5
|
+
export declare const IconButtonDropdown: React.FC<React.PropsWithChildren<IconButtonDropdown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RangeType } from './elements/RangePicker';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type DateDirection = 'forward' | 'backward';
|
|
3
|
+
export type DateFormat = 'MonthDayYear' | 'DayMonthYear';
|
|
4
4
|
export declare const moveDate: (selected: Date, days: RangeType, direction: DateDirection) => Date;
|
|
5
5
|
export declare const endOfPeriod: (selected: Date, selectedRange: RangeType) => Date;
|
|
6
6
|
export declare const formatLongDate: (date: Date, dateFormat?: DateFormat) => string;
|
|
@@ -20,10 +20,10 @@ export interface ICalendarControlProps extends React.HTMLAttributes<HTMLDivEleme
|
|
|
20
20
|
onTodayClick?: () => void;
|
|
21
21
|
}
|
|
22
22
|
export declare function useCalendarControlsContext(): ICalendarControlProps;
|
|
23
|
-
declare function CalendarControls(props: ICalendarControlProps): JSX.Element;
|
|
23
|
+
declare function CalendarControls(props: ICalendarControlProps): React.JSX.Element;
|
|
24
24
|
declare namespace CalendarControls {
|
|
25
25
|
var TodayButton: React.FC<import("./elements/TodayButton").ITodayButtonProps>;
|
|
26
|
-
var NavigationButtons: (props: INavigationButtonProps) => JSX.Element;
|
|
26
|
+
var NavigationButtons: (props: INavigationButtonProps) => React.JSX.Element;
|
|
27
27
|
var DateSelector: React.FC<IDateSelectorProps>;
|
|
28
28
|
var RangePicker: React.FC<IRangeProps>;
|
|
29
29
|
}
|
|
@@ -3,7 +3,7 @@ import { ReactDatePickerProps } from 'react-datepicker';
|
|
|
3
3
|
import { ButtonTypes } from '../../..';
|
|
4
4
|
import { IBaseCalendarControlProps } from '../CalendarControls';
|
|
5
5
|
import { DateFormat } from '../CalendarControls-utils';
|
|
6
|
-
export
|
|
6
|
+
export type SelectDateHandler = (date: Date) => void;
|
|
7
7
|
export interface IBaseDateSelectorProps extends IBaseCalendarControlProps {
|
|
8
8
|
/**
|
|
9
9
|
* Whenever the date is changed, either through direct select, clicking to or navigating, the new date is provided to this function
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { IBaseDateSelectorProps } from './DateSelector';
|
|
3
3
|
export interface INavigationButtonProps extends IBaseDateSelectorProps {
|
|
4
4
|
hideTooltipIfDisabled?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const NavigationButtons: (props: INavigationButtonProps) => JSX.Element;
|
|
6
|
+
export declare const NavigationButtons: (props: INavigationButtonProps) => React.JSX.Element;
|
|
@@ -10,7 +10,7 @@ export interface IRangeProps extends IBaseCalendarControlProps {
|
|
|
10
10
|
*/
|
|
11
11
|
rangeOptions?: RangeType[];
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type RangeType = 'day' | '3-days' | '2-weeks' | 'week' | 'month';
|
|
14
14
|
export declare const dateRangeLabel: {
|
|
15
15
|
day: string;
|
|
16
16
|
'3-days': string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface IDateTimeProps {
|
|
3
3
|
dateTime?: Date;
|
|
4
4
|
/**
|
|
@@ -52,4 +52,4 @@ export declare const convertTimeStringTo24Hr: (value: string) => {
|
|
|
52
52
|
hours: number;
|
|
53
53
|
minutes: number;
|
|
54
54
|
};
|
|
55
|
-
export declare const DateTime: ({ timeIncrement, onChange, onDateChange, onTimeChange, dateTime, disabled, openToDate, dateFormat, timeValueSelection, timePlaceholder, datePlaceholder, id }: IDateTimeProps) => JSX.Element;
|
|
55
|
+
export declare const DateTime: ({ timeIncrement, onChange, onDateChange, onTimeChange, dateTime, disabled, openToDate, dateFormat, timeValueSelection, timePlaceholder, datePlaceholder, id }: IDateTimeProps) => React.JSX.Element;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
/// <reference types="@emotion/core" />
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { ReactDatePickerProps } from 'react-datepicker';
|
|
4
3
|
import { RangeType } from '../calendar-controls/elements/RangePicker';
|
|
5
|
-
export
|
|
4
|
+
export type LocaleType = 'AU' | 'US' | 'UK';
|
|
5
|
+
type CustomInputType = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
6
|
+
onBlurCustom: (event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
7
|
+
openCalendar: (open: boolean) => void;
|
|
8
|
+
onBackspace: () => void;
|
|
9
|
+
Component: (props: React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>) => JSX.Element;
|
|
10
|
+
};
|
|
6
11
|
export interface DatepickerProps {
|
|
7
12
|
/**
|
|
8
13
|
* The currently selected date.
|
|
@@ -110,17 +115,11 @@ export interface DatepickerProps {
|
|
|
110
115
|
onCalendarClose?: () => void;
|
|
111
116
|
inputRef?: React.MutableRefObject<HTMLInputElement>;
|
|
112
117
|
}
|
|
113
|
-
declare type CustomInputType = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
114
|
-
onBlurCustom: (event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
115
|
-
openCalendar: (open: boolean) => void;
|
|
116
|
-
onBackspace: () => void;
|
|
117
|
-
Component: (props: React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>) => JSX.Element;
|
|
118
|
-
};
|
|
119
118
|
export declare const CustomInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
120
119
|
onBlurCustom: (event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
121
120
|
openCalendar: (open: boolean) => void;
|
|
122
121
|
onBackspace: () => void;
|
|
123
122
|
Component: (props: React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>) => JSX.Element;
|
|
124
123
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
125
|
-
export declare const Datepicker: React.FC<DatepickerProps
|
|
124
|
+
export declare const Datepicker: React.FC<React.PropsWithChildren<DatepickerProps>>;
|
|
126
125
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @format */
|
|
2
|
+
import React from 'react';
|
|
2
3
|
export declare const TIME_FORMAT = "h:mma";
|
|
3
4
|
export declare const formatTime: (date: Date | number) => string;
|
|
4
5
|
export declare const readonlyTimeFormat: ({ value, suffix }: {
|
|
@@ -40,4 +41,4 @@ export interface ITimeProps {
|
|
|
40
41
|
*/
|
|
41
42
|
onChange?: (value: string) => void;
|
|
42
43
|
}
|
|
43
|
-
export declare const Time: ({ value, increment, suffix, onChange, placeholder, valueSelection, ...rest }: ITimeProps) => JSX.Element;
|
|
44
|
+
export declare const Time: ({ value, increment, suffix, onChange, placeholder, valueSelection, ...rest }: ITimeProps) => React.JSX.Element;
|
|
@@ -26,14 +26,14 @@ export declare const getSortArgs: (sortByControl: ControlStates) => {
|
|
|
26
26
|
manualSortBy: boolean;
|
|
27
27
|
};
|
|
28
28
|
export declare const wrapperProps: ITableWrapper['getWrapperProps'];
|
|
29
|
-
export
|
|
30
|
-
export declare const SortIcon: <T extends object>({ canSort, isSorted, isSortedDesc, getSortByToggleProps, displayType }: SortIconProps<T>) => JSX.Element;
|
|
31
|
-
export declare const SelectCell: (props: Partial<TableToggleRowsSelectedProps>) => JSX.Element;
|
|
32
|
-
export declare const TableHeaderCell: <T extends object>(props: ITableHeaderCell<T>) => JSX.Element;
|
|
29
|
+
export type SortIconProps<T extends object> = Pick<ITableHeaderCell<T>, 'canSort' | 'isSorted' | 'isSortedDesc' | 'getSortByToggleProps' | 'displayType'>;
|
|
30
|
+
export declare const SortIcon: <T extends object>({ canSort, isSorted, isSortedDesc, getSortByToggleProps, displayType }: SortIconProps<T>) => React.JSX.Element;
|
|
31
|
+
export declare const SelectCell: (props: Partial<TableToggleRowsSelectedProps>) => React.JSX.Element;
|
|
32
|
+
export declare const TableHeaderCell: <T extends object>(props: ITableHeaderCell<T>) => React.JSX.Element;
|
|
33
33
|
export declare const ExpandedTableCell: <T extends object>(props: UseTableCellProps<T, any> & {
|
|
34
34
|
children?: React.ReactNode;
|
|
35
|
-
}) => JSX.Element;
|
|
36
|
-
export declare const CondensedTableCell: <T extends object>(props: UseTableCellProps<T, any>) => JSX.Element;
|
|
35
|
+
}) => React.JSX.Element;
|
|
36
|
+
export declare const CondensedTableCell: <T extends object>(props: UseTableCellProps<T, any>) => React.JSX.Element;
|
|
37
37
|
export declare const DefaultRenderer: <T extends object>(instance: import("react-table").TableInstance<T> & {
|
|
38
38
|
column: import("react-table").ColumnInstance<T>;
|
|
39
39
|
row: Row<T>;
|
|
@@ -41,5 +41,5 @@ export declare const DefaultRenderer: <T extends object>(instance: import("react
|
|
|
41
41
|
value: any;
|
|
42
42
|
} & {
|
|
43
43
|
column: IDynamicTableColumn<T>;
|
|
44
|
-
}) => JSX.Element;
|
|
45
|
-
export declare const DefaultWrapper: (wrapperClassName?: string) => React.FC<ITableWrapper
|
|
44
|
+
}) => React.JSX.Element;
|
|
45
|
+
export declare const DefaultWrapper: (wrapperClassName?: string) => React.FC<React.PropsWithChildren<ITableWrapper>>;
|
|
@@ -72,8 +72,8 @@ interface IDynamicTableProps<T extends object> {
|
|
|
72
72
|
* </div>
|
|
73
73
|
* )
|
|
74
74
|
*/
|
|
75
|
-
TableWrapper?: React.FC<ITableWrapper
|
|
75
|
+
TableWrapper?: React.FC<React.PropsWithChildren<ITableWrapper>>;
|
|
76
76
|
}
|
|
77
|
-
export
|
|
78
|
-
export declare const DynamicTable: <T extends object>(props: IDynamicTable<T>) => JSX.Element;
|
|
77
|
+
export type IDynamicTable<T extends object> = Pick<TableOptions<T>, 'getRowId' | 'data' | 'initialState' | 'autoResetSortBy' | 'autoResetSelectedRows' | 'manualRowSelectedKey'> & UseRowClickOptions<T> & IDynamicTableProps<T>;
|
|
78
|
+
export declare const DynamicTable: <T extends object>(props: IDynamicTable<T>) => React.JSX.Element;
|
|
79
79
|
export {};
|
|
@@ -35,14 +35,14 @@ declare module 'react-table' {
|
|
|
35
35
|
export interface IDynamicTableColumn<T extends object> extends Omit<ColumnInterface<T>, 'Header'>, ColumnInterfaceBasedOnValue<T> {
|
|
36
36
|
Header?: Renderer<HeaderProps<T>> | undefined;
|
|
37
37
|
}
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
38
|
+
export type ControlStates = 'controlled' | 'uncontrolled' | 'disabled';
|
|
39
|
+
export type RowControlStates = 'rowOnly' | 'allRows' | 'disabled';
|
|
40
|
+
export type DisplayType = 'expanded' | 'condensed';
|
|
41
41
|
export interface ITableHeaderCell<T extends object> extends ColumnInstance<T> {
|
|
42
42
|
sticky: boolean;
|
|
43
43
|
displayType: DisplayType;
|
|
44
44
|
}
|
|
45
|
-
export
|
|
45
|
+
export type ICellContentRenderer<T extends object> = Pick<IDynamicTableColumn<T>, 'Header' | 'emptyCellText' | 'id'> & Pick<UseTableCellProps<T>, 'value'>;
|
|
46
46
|
interface IGetWrapperProps {
|
|
47
47
|
className: string;
|
|
48
48
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IFilter, IAppliedFilter as AppliedFilter, IFilterItem as FilterItem, IAddedFilter } from './interfaces';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type IAppliedFilter<T extends FilterItem> = AppliedFilter<T>;
|
|
4
|
+
export type IFilterItem = FilterItem;
|
|
5
5
|
export interface IFilterBarProps<T extends IFilterItem> {
|
|
6
6
|
/**
|
|
7
7
|
* An array of filter options. If a filter item is set to 'static' then it is permanently fixed and unable to be edited.
|
|
@@ -35,20 +35,20 @@ export declare class FilterBar<T extends IFilterItem> extends React.PureComponen
|
|
|
35
35
|
applySelectedItemsToFilter: (filter: IFilter<T>, selectedFilterItems: T[]) => IAppliedFilter<T>[];
|
|
36
36
|
applyAndSaveFilters: (filter: IFilter<T>) => (selectedFilterItems: T[]) => void;
|
|
37
37
|
saveFilters: (filters: IAppliedFilter<T>[]) => void;
|
|
38
|
-
renderAddFilterButton: () => JSX.Element;
|
|
38
|
+
renderAddFilterButton: () => React.JSX.Element;
|
|
39
39
|
/**
|
|
40
40
|
* Render the add filter control button.
|
|
41
41
|
*/
|
|
42
|
-
renderAddFilterControl: () => JSX.Element;
|
|
42
|
+
renderAddFilterControl: () => React.JSX.Element;
|
|
43
43
|
clearTemporaryPill: () => void;
|
|
44
44
|
closeTemporaryPill: () => () => void;
|
|
45
|
-
renderFilterItemSearch: (filter: IFilter<T>, preSelectedItems: T[], scrollableContentClasses?: string) => JSX.Element;
|
|
45
|
+
renderFilterItemSearch: (filter: IFilter<T>, preSelectedItems: T[], scrollableContentClasses?: string) => React.JSX.Element;
|
|
46
46
|
/**
|
|
47
47
|
* After we 'add' a filter, we want to render this 'temporary' pill in the filter bar. This temporary pill will be removed once we hit apply or exit out of the dropdown.
|
|
48
48
|
*/
|
|
49
|
-
renderTemporaryPill: (filterName: string, filterId: string, preSelectedItems: T[]) => JSX.Element;
|
|
49
|
+
renderTemporaryPill: (filterName: string, filterId: string, preSelectedItems: T[]) => React.JSX.Element;
|
|
50
50
|
removeFilter: (filterId: string) => void;
|
|
51
51
|
editFilter: (filterId: string) => void;
|
|
52
|
-
render(): JSX.Element;
|
|
52
|
+
render(): React.JSX.Element;
|
|
53
53
|
}
|
|
54
54
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { IFilterItem } from '../interfaces';
|
|
3
3
|
export interface IFilterListProps<T> {
|
|
4
4
|
items: T[];
|
|
@@ -7,4 +7,4 @@ export interface IFilterListProps<T> {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
scrollableContentClasses?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const FilterList: <T extends IFilterItem>({ items, itemRenderer, loading, className, scrollableContentClasses }: IFilterListProps<T>) => JSX.Element;
|
|
10
|
+
export declare const FilterList: <T extends IFilterItem>({ items, itemRenderer, loading, className, scrollableContentClasses }: IFilterListProps<T>) => React.JSX.Element;
|
|
@@ -17,8 +17,8 @@ export declare class FilterListWithApply<T extends IFilterItem> extends React.Pu
|
|
|
17
17
|
constructor(props: IFilterListWithApplyProps<T>);
|
|
18
18
|
getSelectedItems: (item: T, checked?: boolean) => T[];
|
|
19
19
|
onItemChange: (item: T) => ({ target }: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
-
itemRenderer: (item: T) => JSX.Element;
|
|
20
|
+
itemRenderer: (item: T) => React.JSX.Element;
|
|
21
21
|
applyFilters: () => void;
|
|
22
|
-
render(): JSX.Element;
|
|
22
|
+
render(): React.JSX.Element;
|
|
23
23
|
}
|
|
24
24
|
export {};
|
|
@@ -2,9 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { IFilterItem } from '../interfaces';
|
|
3
3
|
export interface IFilterSearchProps<T> {
|
|
4
4
|
items: T[];
|
|
5
|
-
children: React.FC<{
|
|
5
|
+
children: React.FC<React.PropsWithChildren<{
|
|
6
6
|
filteredItems: T[];
|
|
7
|
-
}
|
|
7
|
+
}>>;
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
@@ -16,6 +16,6 @@ export declare class FilterSearch<T extends IFilterItem> extends React.PureCompo
|
|
|
16
16
|
componentDidUpdate(prevProps: IFilterSearchProps<T>): void;
|
|
17
17
|
updateItemsState: (items: T[]) => void;
|
|
18
18
|
onFilterSearch: (value: string) => void;
|
|
19
|
-
render(): JSX.Element;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
@@ -2,11 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import { IFilterItem } from '../interfaces';
|
|
3
3
|
export interface IRemoteSearchProps<T> {
|
|
4
4
|
useFetch: (searchTerm: string) => Promise<T[]>;
|
|
5
|
-
children: React.FC<{
|
|
5
|
+
children: React.FC<React.PropsWithChildren<{
|
|
6
6
|
fetchedItems: T[];
|
|
7
7
|
searchTerm: string;
|
|
8
8
|
isFetching: boolean;
|
|
9
|
-
}
|
|
9
|
+
}>>;
|
|
10
10
|
preSelectedItems: T[];
|
|
11
11
|
placeholder?: string;
|
|
12
12
|
className?: string;
|
|
@@ -21,5 +21,5 @@ export declare class RemoteSearch<T extends IFilterItem> extends React.PureCompo
|
|
|
21
21
|
private _debouncedSearch;
|
|
22
22
|
constructor(props: IRemoteSearchProps<T>);
|
|
23
23
|
onFilterSearch: (value: string) => void;
|
|
24
|
-
render(): JSX.Element;
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
25
|
}
|
|
@@ -7,7 +7,7 @@ interface IFilterPillProps {
|
|
|
7
7
|
removable?: boolean;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type FilterPillProps<T extends IFilterItem> = IFilterPillProps & Omit<IAppliedFilter<T>, 'isReadonly' | 'removable'>;
|
|
11
11
|
export declare class FilterPill<T extends IFilterItem> extends React.PureComponent<FilterPillProps<T>, {}> {
|
|
12
12
|
static defaultProps: {
|
|
13
13
|
onRemove: (...args: any[]) => void;
|
|
@@ -17,7 +17,7 @@ export declare class FilterPill<T extends IFilterItem> extends React.PureCompone
|
|
|
17
17
|
renderedSelectedItems: (selected: IFilterItem[]) => string;
|
|
18
18
|
removeFilter: (filterId: string, onRemove: IFilterPillProps['onRemove']) => (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
19
19
|
editFilter: (filterId: string, onEdit: IFilterPillProps['onRemove'], isReadonly: boolean) => () => void;
|
|
20
|
-
renderCloseButton: (name: string, onRemove: IFilterPillProps['onRemove'], selected: IFilterItem[], removable: boolean, isReadonly?: boolean) => JSX.Element;
|
|
21
|
-
render(): JSX.Element;
|
|
20
|
+
renderCloseButton: (name: string, onRemove: IFilterPillProps['onRemove'], selected: IFilterItem[], removable: boolean, isReadonly?: boolean) => React.JSX.Element;
|
|
21
|
+
render(): React.JSX.Element;
|
|
22
22
|
}
|
|
23
23
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FormContext, FormProps, ValidationContext, Transforms, FieldsConfig, CustomValidatorFunction, ValueValidatorConfig } from 'calidation';
|
|
3
3
|
export { Dirty, Errors, Fields, Transform, Transforms, FieldsConfig, Validator, FormContext, CustomValidatorFunction, SimpleValidator, SimpleValidatorConfig, FieldConfig, ValueValidatorConfig, ValueValidator, ValidatorContext } from 'calidation';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type FormSubmission<T extends object> = FormContext<T>;
|
|
5
|
+
export type FormConfig<T extends object> = FieldsConfig<T>;
|
|
6
|
+
export type CustomValueValidatorFunction<T extends object, P = any> = (config: ValueValidatorConfig<P, T>) => (value: P) => string | null;
|
|
7
7
|
interface IBehaviourOptions {
|
|
8
8
|
clickToEdit: boolean;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type SkedFormChildren<T extends object> = Omit<ValidationContext<T>, 'dirty'> & {
|
|
11
11
|
isFormReadonly: boolean;
|
|
12
12
|
fieldsModified: Set<keyof T>;
|
|
13
13
|
setFormReadonly: (event?: React.FormEvent<HTMLElement>) => void;
|
|
@@ -88,11 +88,11 @@ export declare class SkedFormValidation<T extends object> extends React.PureComp
|
|
|
88
88
|
* for instance - input has onchange and will bubble up, needs a way of adding name)
|
|
89
89
|
*/
|
|
90
90
|
customFormFieldUpdate: (setField: SkedFormChildren<T>['setField'], fields: T, setModified?: (name: keyof T) => void) => (fieldName: keyof T, runOnUpdate?: (fields: T) => T) => (value: any) => void;
|
|
91
|
-
wrapInValidatorProvider: (customValidators: SkedFormValidationProps<T>['customValidators']) => JSX.Element;
|
|
91
|
+
wrapInValidatorProvider: (customValidators: SkedFormValidationProps<T>['customValidators']) => React.JSX.Element;
|
|
92
92
|
handleClick: (evt: React.FormEvent<HTMLElement>) => void;
|
|
93
93
|
handleFormSubmit: (formData: FormContext<T>) => Promise<void>;
|
|
94
94
|
setFormReadonly: (event?: React.FormEvent<HTMLElement>) => void;
|
|
95
95
|
resetFieldsToInitialValues: () => void;
|
|
96
|
-
renderFormValidation: () => JSX.Element;
|
|
97
|
-
render(): JSX.Element;
|
|
96
|
+
renderFormValidation: () => React.JSX.Element;
|
|
97
|
+
render(): React.JSX.Element;
|
|
98
98
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ISelectItem, AsyncMultiSearchSelectBox } from './interfaces';
|
|
3
|
-
export declare const AsyncMultiSearchSelect: <T extends ISelectItem<any>>({ fetchItems, debounceTime, fetchStrategy, useCache, minChars, onSelectedItemsChange, disabled, ...rest }: AsyncMultiSearchSelectBox<T>) => JSX.Element;
|
|
3
|
+
export declare const AsyncMultiSearchSelect: <T extends ISelectItem<any>>({ fetchItems, debounceTime, fetchStrategy, useCache, minChars, onSelectedItemsChange, disabled, ...rest }: AsyncMultiSearchSelectBox<T>) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ISelectItem, AsyncSelectBox } from './interfaces';
|
|
3
3
|
/**
|
|
4
4
|
* Asynchronous version of SearchSelect for use with remote fetching
|
|
5
5
|
*/
|
|
6
|
-
export declare const AsyncSearchSelect: <T extends ISelectItem<any>>({ fetchItems, debounceTime, fetchStrategy, useCache, minChars, icon, id, name, placeholder, autoFocus, className, onSelectedItemChange, disabled, itemToString, ItemRenderer, ...rest }: AsyncSelectBox<T>) => JSX.Element;
|
|
6
|
+
export declare const AsyncSearchSelect: <T extends ISelectItem<any>>({ fetchItems, debounceTime, fetchStrategy, useCache, minChars, icon, id, name, placeholder, autoFocus, className, onSelectedItemChange, disabled, itemToString, ItemRenderer, ...rest }: AsyncSelectBox<T>) => React.JSX.Element;
|
|
@@ -6,7 +6,7 @@ interface InputFormValidationProps {
|
|
|
6
6
|
inputAndInlineLabelWrapperClassName?: string;
|
|
7
7
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
type InputSize = 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'full';
|
|
10
10
|
interface FormElementWrapperProps {
|
|
11
11
|
readOnlyValue?: string;
|
|
12
12
|
isReadOnly?: boolean;
|
|
@@ -21,7 +21,7 @@ export interface ValidationProps {
|
|
|
21
21
|
error?: string | null;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
type FormElementProps = InputFormValidationProps & React.InputHTMLAttributes<HTMLInputElement>;
|
|
25
25
|
/**
|
|
26
26
|
* Standard form inputs should be created using FormElement. It is responsible for creating the type of input you need as well as
|
|
27
27
|
* displaying validation errors. Radio’s and Checkboxes can utilise the inlineLabel prop to show a label inline with the input.
|
|
@@ -30,25 +30,25 @@ declare type FormElementProps = InputFormValidationProps & React.InputHTMLAttrib
|
|
|
30
30
|
export declare class FormInputElement extends React.PureComponent<FormElementProps, {}> {
|
|
31
31
|
private _inputClassNames;
|
|
32
32
|
isOfTextType: () => boolean;
|
|
33
|
-
withInlineLabel: (inputComponent: React.ReactElement, props: FormElementProps) => JSX.Element;
|
|
34
|
-
render(): JSX.Element;
|
|
33
|
+
withInlineLabel: (inputComponent: React.ReactElement, props: FormElementProps) => React.JSX.Element;
|
|
34
|
+
render(): React.JSX.Element;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
type LabelStatus = 'required' | 'optional';
|
|
37
37
|
/**
|
|
38
38
|
* Will render a form label and apply ‘required’ styling if required
|
|
39
39
|
*/
|
|
40
|
-
export declare const FormLabel: React.FunctionComponent<{
|
|
40
|
+
export declare const FormLabel: React.FunctionComponent<React.PropsWithChildren<{
|
|
41
41
|
status?: LabelStatus;
|
|
42
42
|
inline?: boolean;
|
|
43
|
-
} & React.LabelHTMLAttributes<HTMLLabelElement
|
|
43
|
+
} & React.LabelHTMLAttributes<HTMLLabelElement>>>;
|
|
44
44
|
/**
|
|
45
45
|
* FormElementWrapper should be used to wrap custom input components (such as Autocomplete). It will ensure that errors
|
|
46
46
|
* are displayed in a consistent fashion. The resulting input will need to have the class form-element__outline applied
|
|
47
47
|
* to it for us to hook into it to apply appropriate styling.
|
|
48
48
|
*/
|
|
49
|
-
export declare const FormElementWrapper: React.FC<FormElementWrapperProps & ValidationProps & React.HTMLAttributes<HTMLDivElement
|
|
49
|
+
export declare const FormElementWrapper: React.FC<React.PropsWithChildren<FormElementWrapperProps & ValidationProps & React.HTMLAttributes<HTMLDivElement>>>;
|
|
50
50
|
/**
|
|
51
51
|
* Use when a validation error isn’t tied to a particular field
|
|
52
52
|
*/
|
|
53
|
-
export declare const FormValidationCallout: React.FunctionComponent<ValidationProps & React.HTMLAttributes<HTMLDivElement
|
|
53
|
+
export declare const FormValidationCallout: React.FunctionComponent<React.PropsWithChildren<ValidationProps & React.HTMLAttributes<HTMLDivElement>>>;
|
|
54
54
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ISelectItem, MultiSearchSelectBox } from './interfaces';
|
|
3
|
-
export declare const MultiSearchSelect: <T extends ISelectItem<any>>({ initialSelectedItems, items, id, name, placeholder, autoFocus, className, onSelectedItemsChange, disabled, loading, itemToString, ItemRenderer, MenuItemsRenderer, selectAll, onInputValueChange, onMenuToggle, getKey, ...rest }: MultiSearchSelectBox<T>) => JSX.Element;
|
|
3
|
+
export declare const MultiSearchSelect: <T extends ISelectItem<any>>({ initialSelectedItems, items, id, name, placeholder, autoFocus, className, onSelectedItemsChange, disabled, loading, itemToString, ItemRenderer, MenuItemsRenderer, selectAll, onInputValueChange, onMenuToggle, getKey, ...rest }: MultiSearchSelectBox<T>) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ISelectItem, SelectBox } from './interfaces';
|
|
3
3
|
/**
|
|
4
4
|
* A searchable select component. Just like it's native counterpart, only a valid listed option is allowed.
|
|
5
5
|
*/
|
|
6
|
-
export declare const SearchSelect: <T extends ISelectItem<any>>({ id, name, items, placeholder, autoFocus, className, icon, onSelectedItemChange, disabled, onMenuToggle, loading, itemToString, ItemRenderer, filterHandler, itemIsValid, getNewItemData, inputProps, ...rest }: SelectBox<T>) => JSX.Element;
|
|
6
|
+
export declare const SearchSelect: <T extends ISelectItem<any>>({ id, name, items, placeholder, autoFocus, className, icon, onSelectedItemChange, disabled, onMenuToggle, loading, itemToString, ItemRenderer, filterHandler, itemIsValid, getNewItemData, inputProps: restInputProps, ...rest }: SelectBox<T>) => React.JSX.Element;
|