scorer-ui-kit 2.9.2 → 2.10.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/Filters/FilterTypes.d.ts +2 -2
- package/dist/Filters/index.d.ts +11 -2
- package/dist/Filters/molecules/DatePicker.d.ts +4 -12
- package/dist/Filters/molecules/DropdownDatePicker.d.ts +6 -6
- package/dist/Filters/molecules/FiltersResults.d.ts +3 -3
- package/dist/Form/atoms/Button.d.ts +1 -0
- package/dist/Form/atoms/ButtonWithIcon.d.ts +0 -1
- package/dist/Form/atoms/ButtonWithLoading.d.ts +0 -1
- package/dist/Form/atoms/Switch.d.ts +2 -1
- package/dist/Form/index.d.ts +4 -3
- package/dist/helpers/index.d.ts +5 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +272 -242
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +272 -242
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IInputOptionsType } from '../Form';
|
|
2
2
|
import { IBasicSearchInput } from '../Misc/atoms/BasicSearchInput';
|
|
3
|
-
import { DateInterval } from './molecules/DatePicker';
|
|
4
3
|
import { IDropdownDatePicker } from './molecules/DropdownDatePicker';
|
|
5
4
|
import { IFilterDropdown } from './molecules/FilterDropdown';
|
|
5
|
+
import { IDateInterval } from '.';
|
|
6
6
|
declare type IFilterItem = {
|
|
7
7
|
text: string;
|
|
8
8
|
value: string | number;
|
|
@@ -18,7 +18,7 @@ declare const isFilterItem: (item: any) => item is IFilterItem;
|
|
|
18
18
|
interface IFilterResult {
|
|
19
19
|
id: string;
|
|
20
20
|
type: IFilterType;
|
|
21
|
-
selected: IFilterItem | IFilterItem[] |
|
|
21
|
+
selected: IFilterItem | IFilterItem[] | IDateInterval | Date | null;
|
|
22
22
|
}
|
|
23
23
|
interface ISearchFilter extends IBasicSearchInput {
|
|
24
24
|
id: string;
|
package/dist/Filters/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import DatePicker, {
|
|
1
|
+
import DatePicker, { IDatePicker } from './molecules/DatePicker';
|
|
2
|
+
import { isDateInterval } from '../helpers';
|
|
2
3
|
import FilterDropdownContainer from './atoms/FilterDropdownContainer';
|
|
3
4
|
import FilterButton from './atoms/FilterButton';
|
|
4
5
|
import FilterDropdown from './molecules/FilterDropdown';
|
|
@@ -8,6 +9,14 @@ import FilterInputs, { IFilterInputs } from './molecules/FilterInputs';
|
|
|
8
9
|
import FiltersResults, { IFilterLabel } from './molecules/FiltersResults';
|
|
9
10
|
import FilterBar from './organisms/FilterBar';
|
|
10
11
|
import ToggleButton from './atoms/ToggleButton';
|
|
12
|
+
export interface IDateInterval {
|
|
13
|
+
start: Date;
|
|
14
|
+
end: Date;
|
|
15
|
+
}
|
|
16
|
+
export interface IDateRange {
|
|
17
|
+
start: Date | null;
|
|
18
|
+
end: Date | null;
|
|
19
|
+
}
|
|
11
20
|
import { IFilterType, IFilterItem, IFilterResult, IFilterValue, ISearchFilter, IFilterDropdownExt, IFilterDropdownConfig, IFilterDatePicker, isFilterItem, IToggleOption, FilterButtonDesign } from './FilterTypes';
|
|
12
21
|
export { DatePicker, FilterDropdownContainer, FilterButton, FilterDropdown, SortDropdown, FilterLayout, FilterInputs, FiltersResults, FilterBar, isFilterItem, isDateInterval, ToggleButton };
|
|
13
|
-
export type { ISearchFilter, IFilterInputs, IFilterDropdownExt, IFilterLabel, IFilterDropdownConfig, IFilterType, IFilterItem, IFilterResult, IFilterValue,
|
|
22
|
+
export type { ISearchFilter, IFilterInputs, IFilterDropdownExt, IFilterLabel, IFilterDropdownConfig, IFilterType, IFilterItem, IFilterResult, IFilterValue, IFilterDatePicker, FilterButtonDesign, IToggleOption, IDatePicker };
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { IDateInterval, IDateRange } from '..';
|
|
2
3
|
declare type DateMode = "single" | "interval";
|
|
3
4
|
declare type TimeMode = "off" | "single" | "interval";
|
|
4
|
-
export declare const isDateInterval: (value: any) => value is DateInterval;
|
|
5
|
-
export interface DateInterval {
|
|
6
|
-
start: Date;
|
|
7
|
-
end: Date;
|
|
8
|
-
}
|
|
9
|
-
export interface DateRange {
|
|
10
|
-
start: Date | null;
|
|
11
|
-
end: Date | null;
|
|
12
|
-
}
|
|
13
5
|
export interface IDatePicker {
|
|
14
|
-
initialValue?: Date |
|
|
6
|
+
initialValue?: Date | IDateInterval;
|
|
15
7
|
dateMode?: DateMode;
|
|
16
8
|
timeMode?: TimeMode;
|
|
17
9
|
hasEmptyValue?: boolean;
|
|
@@ -19,14 +11,14 @@ export interface IDatePicker {
|
|
|
19
11
|
dateTimeTextLower?: string;
|
|
20
12
|
timeZoneTitle?: string;
|
|
21
13
|
timeZoneValueTitle?: string;
|
|
22
|
-
availableRange?:
|
|
14
|
+
availableRange?: IDateRange;
|
|
23
15
|
contentDays?: Date[];
|
|
24
16
|
lang?: 'en' | 'ja';
|
|
25
17
|
cancelText?: string;
|
|
26
18
|
applyText?: string;
|
|
27
19
|
hasApply?: boolean;
|
|
28
20
|
disableApply?: boolean;
|
|
29
|
-
updateCallback?: (data:
|
|
21
|
+
updateCallback?: (data: IDateInterval | Date) => void;
|
|
30
22
|
applyCallback?: () => void;
|
|
31
23
|
cancelCallback?: () => void;
|
|
32
24
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IDateInterval, IDatePicker } from '..';
|
|
3
3
|
export interface IDropdownDatePicker extends IDatePicker {
|
|
4
4
|
buttonIcon: string;
|
|
5
5
|
buttonText: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
|
-
selected?:
|
|
8
|
-
onCloseCallback?: (value:
|
|
9
|
-
onUpdateCallback?: (value:
|
|
10
|
-
onToggleCallback?: (value:
|
|
7
|
+
selected?: IDateInterval | Date | null;
|
|
8
|
+
onCloseCallback?: (value: IDateInterval | Date | null) => void;
|
|
9
|
+
onUpdateCallback?: (value: IDateInterval | Date | null) => void;
|
|
10
|
+
onToggleCallback?: (value: IDateInterval | Date | null, isOpen: boolean) => void;
|
|
11
11
|
onCancelCallback?: () => void;
|
|
12
|
-
onApplyCallback?: (data:
|
|
12
|
+
onApplyCallback?: (data: IDateInterval | Date) => void;
|
|
13
13
|
}
|
|
14
14
|
declare const DropdownDatePicker: React.FC<IDropdownDatePicker>;
|
|
15
15
|
export default DropdownDatePicker;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IFilterItem, IFilterType } from '../FilterTypes';
|
|
3
|
-
import {
|
|
3
|
+
import { IDateInterval } from '..';
|
|
4
4
|
export interface IFilterLabel {
|
|
5
5
|
filterId: string;
|
|
6
|
-
item: IFilterItem | Date |
|
|
6
|
+
item: IFilterItem | Date | IDateInterval;
|
|
7
7
|
type: IFilterType;
|
|
8
8
|
icon?: string;
|
|
9
9
|
filterName?: string;
|
|
@@ -14,7 +14,7 @@ interface IFilterResults {
|
|
|
14
14
|
resultTextTemplate?: string;
|
|
15
15
|
clearText?: string;
|
|
16
16
|
resultsDateFormat?: string;
|
|
17
|
-
onRemoveFilter?: (filterId: string, type: IFilterType, item: IFilterItem | Date |
|
|
17
|
+
onRemoveFilter?: (filterId: string, type: IFilterType, item: IFilterItem | Date | IDateInterval) => void;
|
|
18
18
|
onClearAll?: () => void;
|
|
19
19
|
}
|
|
20
20
|
declare const FiltersResults: React.FC<IFilterResults>;
|
|
@@ -5,7 +5,7 @@ declare enum SwitchPosition {
|
|
|
5
5
|
Neutral = 2,
|
|
6
6
|
Locked = 3
|
|
7
7
|
}
|
|
8
|
-
declare type TypeSwitchState = 'default' | 'loading' | 'locked' | 'disabled' | 'failure';
|
|
8
|
+
export declare type TypeSwitchState = 'default' | 'loading' | 'locked' | 'disabled' | 'failure';
|
|
9
9
|
declare type SwitchThemes = 'on' | 'off' | 'danger';
|
|
10
10
|
interface IProps {
|
|
11
11
|
labelText?: string;
|
|
@@ -13,6 +13,7 @@ interface IProps {
|
|
|
13
13
|
rightTheme?: SwitchThemes;
|
|
14
14
|
state?: TypeSwitchState;
|
|
15
15
|
checked?: boolean;
|
|
16
|
+
defaultChecked?: boolean;
|
|
16
17
|
onChangeCallback?: (checked: boolean, indeterminate?: boolean) => void;
|
|
17
18
|
}
|
|
18
19
|
declare const Switch: React.FC<IProps>;
|
package/dist/Form/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import ActionButtons from './molecules/ActionButtons';
|
|
|
6
6
|
import Input from './atoms/Input';
|
|
7
7
|
import SmallInput from './atoms/SmallInput';
|
|
8
8
|
import Label from './atoms/Label';
|
|
9
|
-
import Switch from './atoms/Switch';
|
|
9
|
+
import Switch, { TypeSwitchState } from './atoms/Switch';
|
|
10
10
|
import Checkbox from './atoms/Checkbox';
|
|
11
11
|
import RadioButton from './atoms/RadioButton';
|
|
12
12
|
import TextArea from './atoms/TextArea';
|
|
@@ -28,7 +28,7 @@ import SplitButton, { ISplitButtonProps } from './molecules/SplitButton';
|
|
|
28
28
|
import ButtonsStack, { IButtonsStack, IButtonStack } from './molecules/ButtonsStack';
|
|
29
29
|
export { Form, Button, ButtonWithIcon, ButtonWithLoading, IconButton, ActionButtons, SmallInput, Input, Label, Checkbox, Switch, PasswordField, TextField, TextArea, TextAreaField, SliderInput, DurationSlider, PercentageSlider, InputFileButton, AvatarUploader, DropArea, CropTool, SelectField, SelectWrapper, AreaUploadManager, RadioButton, SplitButton, ButtonsStack, };
|
|
30
30
|
export declare type TypeFieldState = 'default' | 'disabled' | 'required' | 'valid' | 'invalid' | 'processing';
|
|
31
|
-
export declare type TypeButtonDesigns = 'primary' | 'secondary' | 'warning' | 'danger';
|
|
31
|
+
export declare type TypeButtonDesigns = 'primary' | 'secondary' | 'warning' | 'danger' | 'text-only' | 'outline';
|
|
32
32
|
export declare type TypeButtonSizes = 'xsmall' | 'small' | 'normal' | 'large';
|
|
33
33
|
export declare type ISelectSizes = 'small' | 'normal';
|
|
34
34
|
export declare type IInputOptionsType = "text" | "checkbox" | "radio";
|
|
@@ -36,6 +36,7 @@ export declare type TypeLabelDirection = 'column' | 'row' | 'row-reverse';
|
|
|
36
36
|
interface ButtonProps {
|
|
37
37
|
size?: TypeButtonSizes;
|
|
38
38
|
design?: TypeButtonDesigns;
|
|
39
|
+
loading?: boolean;
|
|
39
40
|
}
|
|
40
41
|
export declare type IButtonProps = ButtonProps & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
41
|
-
export type { IconButtonData, ISliderMark, ISplitButtonProps, IButtonsStack, IButtonStack };
|
|
42
|
+
export type { IconButtonData, ISliderMark, ISplitButtonProps, IButtonsStack, IButtonStack, TypeSwitchState };
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ITimeUnit } from '..';
|
|
2
|
+
import { IDateInterval } from '../Filters';
|
|
2
3
|
declare const isInsideRange: (value: number, min: number, max: number) => boolean;
|
|
3
4
|
declare const clamp: (value: number, minValue: number, maxValue: number) => number;
|
|
4
5
|
/**
|
|
@@ -17,5 +18,6 @@ declare const getImageType: (img: HTMLImageElement) => string;
|
|
|
17
18
|
declare const isValidImage: (file: File) => boolean;
|
|
18
19
|
declare const uniqueID: () => string;
|
|
19
20
|
declare const isNotNumber: (value: string) => boolean;
|
|
20
|
-
declare const areDatesEqual: (storedValue:
|
|
21
|
-
|
|
21
|
+
declare const areDatesEqual: (storedValue: IDateInterval | Date | null | undefined, currentDisplay: IDateInterval | Date | null) => boolean;
|
|
22
|
+
declare const isDateInterval: (value: any) => value is IDateInterval;
|
|
23
|
+
export { clamp, isValidImage, isDateInterval, getImageType, getTextTimeUnit, isInsideRange, getShortTextTimeUnit, getTopLevelPath, uniqueID, isNotNumber, areDatesEqual };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import defaultTheme from './theme';
|
|
|
2
2
|
import ThemeVariables from './theme/ThemeVariables';
|
|
3
3
|
import { BaseStyles } from './theme/ThemeHelpers';
|
|
4
4
|
import { AlertBar, Notification, INotificationProps, AlertWrapper, Tooltip, ITooltipPosition, AlertType, ITooltipType } from './Alerts';
|
|
5
|
-
import { Form, Button, ButtonWithIcon, ButtonWithLoading, IconButton, IconButtonData, ActionButtons, SmallInput, Input, Label, Switch, Checkbox, PasswordField, TextField, TextArea, TextAreaField, SliderInput, ISliderMark, DurationSlider, PercentageSlider, InputFileButton, DropArea, CropTool, AvatarUploader, SelectField, SelectWrapper, AreaUploadManager, RadioButton, SplitButton, ISplitButtonProps, ButtonsStack, IButtonsStack, IButtonStack } from './Form';
|
|
6
|
-
import { DatePicker,
|
|
5
|
+
import { Form, Button, ButtonWithIcon, ButtonWithLoading, IconButton, IconButtonData, ActionButtons, SmallInput, Input, Label, Switch, Checkbox, PasswordField, TextField, TextArea, TextAreaField, SliderInput, ISliderMark, DurationSlider, PercentageSlider, InputFileButton, DropArea, CropTool, AvatarUploader, SelectField, SelectWrapper, AreaUploadManager, RadioButton, SplitButton, ISplitButtonProps, ButtonsStack, IButtonsStack, IButtonStack, TypeSwitchState } from './Form';
|
|
6
|
+
import { DatePicker, isDateInterval, IFilterDatePicker, FilterDropdownContainer, FilterButton, FilterDropdown, SortDropdown, FilterLayout, FilterInputs, ISearchFilter, IFilterDropdownExt, FiltersResults, IFilterLabel, FilterBar, IFilterDropdownConfig, IFilterType, IFilterItem, IFilterValue, IFilterResult, isFilterItem, FilterButtonDesign, ToggleButton, IToggleOption, IDateInterval, IDateRange } from './Filters';
|
|
7
7
|
import Icon, { IconSVGs } from './Icons/Icon';
|
|
8
8
|
import StatusIcon from './Icons/StatusIcon';
|
|
9
9
|
import { LineUI, LineUIVideo, LineUIRTC, LineSetContext, LineReducer } from './LineUI';
|
|
@@ -29,4 +29,4 @@ export declare type IFeedbackColor = 'error' | 'warning' | 'info' | 'success' |
|
|
|
29
29
|
export declare type ITimeUnit = 'seconds' | 'minutes' | 'hours';
|
|
30
30
|
export declare type IMediaType = 'img' | 'video';
|
|
31
31
|
export declare type IStatusDot = 'caution' | 'danger' | 'good' | 'neutral' | 'highlight';
|
|
32
|
-
export type { IModal, INotificationProps, IconButtonData, ITag, ITagList, ISliderMark, INotificationItem, INotificationsHistory, ICustomDrawer, ISearchFilter, IFilterDropdownExt, IFilterLabel, IFilterDropdownConfig, ITabIcon, IFilterType, IFilterItem, IFilterValue, IFilterResult,
|
|
32
|
+
export type { IModal, INotificationProps, IconButtonData, ITag, ITagList, ISliderMark, INotificationItem, INotificationsHistory, ICustomDrawer, ISearchFilter, IFilterDropdownExt, IFilterLabel, IFilterDropdownConfig, ITabIcon, IFilterType, IFilterItem, IFilterValue, IFilterResult, IFilterDatePicker, ICameraPanel, IMediaStream, IPanelMetaData, IActionsButton, ISplitButtonProps, IHeaderTag, IItemsOption, IPagination, IHeaderContent, IUtilityHeader, ITooltipPosition, IButtonsStack, IButtonStack, ISplitLayoutHandles, AlertType, ITooltipType, FilterButtonDesign, IToggleOption, IDateInterval, IDateRange, TypeSwitchState };
|