scorer-ui-kit 1.7.4 → 1.8.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/Filters/FilterTypes.d.ts +43 -4
- package/dist/Filters/atoms/FilterDropHandler.d.ts +12 -0
- package/dist/Filters/index.d.ts +6 -6
- package/dist/Filters/molecules/DatePicker.d.ts +7 -3
- package/dist/Filters/molecules/DropdownDatePicker.d.ts +13 -0
- package/dist/Filters/molecules/FilterInputs.d.ts +4 -13
- package/dist/Filters/molecules/FiltersResults.d.ts +5 -3
- package/dist/Filters/organisms/FilterBar.d.ts +7 -19
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1328 -658
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1329 -660
- package/dist/index.modern.js.map +1 -1
- package/dist/themes/dark/colors.d.ts +16 -0
- package/dist/themes/dark/custom.d.ts +209 -0
- package/dist/themes/dark/dark.d.ts +17 -0
- package/dist/themes/dark/styles.d.ts +49 -0
- package/dist/themes/dark/typography.d.ts +175 -0
- package/package.json +1 -1
- package/dist/themes/dark.d.ts +0 -167
package/README.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# scorer-ui-kit
|
|
2
2
|
|
|
3
|
+
This project is prefered to be run using npm 6, usually you can find it in node version 12 [(Why?)](https://github.com/nodejs/node/discussions/37689) [(How to downgrade?)](https://www.geeksforgeeks.org/how-to-install-the-previous-version-of-node-js-and-npm/).
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm --version # verify your npm version
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
|
|
3
10
|
## Development
|
|
4
11
|
|
|
5
12
|
Local development is broken into two parts (ideally using two tabs).
|
|
@@ -7,6 +14,7 @@ Local development is broken into two parts (ideally using two tabs).
|
|
|
7
14
|
First, run rollup to watch your `src/` module and automatically recompile it into `dist/` whenever you make changes.
|
|
8
15
|
|
|
9
16
|
```bash
|
|
17
|
+
npm ci # if you are missing or need to update node modules
|
|
10
18
|
npm start # runs rollup with watch flag
|
|
11
19
|
```
|
|
12
20
|
|
|
@@ -15,6 +23,7 @@ The second part will be running the `example/` create-react-app that's linked to
|
|
|
15
23
|
```bash
|
|
16
24
|
# (in another tab)
|
|
17
25
|
cd example
|
|
26
|
+
npm ci # if you are missing or need to update node modules
|
|
18
27
|
npm start # runs create-react-app dev server
|
|
19
28
|
```
|
|
20
29
|
|
|
@@ -1,12 +1,51 @@
|
|
|
1
|
-
|
|
1
|
+
import { IInputOptionsType } from '../Form';
|
|
2
|
+
import { IBasicSearchInput } from '../Misc/atoms/BasicSearchInput';
|
|
3
|
+
import { DateInterval } from './molecules/DatePicker';
|
|
4
|
+
import { IDropdownDatePicker } from './molecules/DropdownDatePicker';
|
|
5
|
+
import { IFilterDropdown } from './molecules/FilterDropdown';
|
|
2
6
|
declare type IFilterItem = {
|
|
3
7
|
text: string;
|
|
4
8
|
value: string | number;
|
|
5
9
|
};
|
|
6
10
|
declare type IFilterValue = IFilterItem | IFilterItem[] | null;
|
|
11
|
+
declare type IFilterType = 'search' | 'dropdown' | 'datepicker';
|
|
12
|
+
declare const isFilterItem: (item: any) => item is IFilterItem;
|
|
7
13
|
interface IFilterResult {
|
|
8
14
|
id: string;
|
|
9
|
-
|
|
15
|
+
type: IFilterType;
|
|
16
|
+
selected: IFilterItem | IFilterItem[] | DateInterval | Date | null;
|
|
10
17
|
}
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
interface ISearchFilter extends IBasicSearchInput {
|
|
19
|
+
id: string;
|
|
20
|
+
canHide?: boolean;
|
|
21
|
+
showFieldText?: string;
|
|
22
|
+
selected?: IFilterItem;
|
|
23
|
+
}
|
|
24
|
+
interface IFilterDropdownExt extends IFilterDropdown {
|
|
25
|
+
id: string;
|
|
26
|
+
canHide?: boolean;
|
|
27
|
+
}
|
|
28
|
+
interface IFilterDatePicker extends IDropdownDatePicker {
|
|
29
|
+
id: string;
|
|
30
|
+
canHide?: boolean;
|
|
31
|
+
name?: string;
|
|
32
|
+
}
|
|
33
|
+
interface IFilterDropdownConfig {
|
|
34
|
+
id: string;
|
|
35
|
+
canHide?: boolean;
|
|
36
|
+
buttonIcon: string;
|
|
37
|
+
buttonText: string;
|
|
38
|
+
list: IFilterItem[];
|
|
39
|
+
selected?: IFilterValue;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
optionType?: IInputOptionsType;
|
|
42
|
+
isLoading?: boolean;
|
|
43
|
+
loadingText?: string;
|
|
44
|
+
hasOptionsFilter?: boolean;
|
|
45
|
+
searchPlaceholder?: string;
|
|
46
|
+
maxDisplayedItems?: number;
|
|
47
|
+
searchResultText?: string;
|
|
48
|
+
name?: string;
|
|
49
|
+
}
|
|
50
|
+
export { isFilterItem };
|
|
51
|
+
export type { IFilterType, IFilterItem, IFilterResult, IFilterValue, ISearchFilter, IFilterDropdownExt, IFilterDatePicker, IFilterDropdownConfig };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IFilterDropHandler {
|
|
3
|
+
buttonIcon: string;
|
|
4
|
+
buttonText: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
min_width?: number;
|
|
7
|
+
min_height?: number;
|
|
8
|
+
onToggleOpenCallback?: (isOpen: boolean) => void;
|
|
9
|
+
onCloseCallback?: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const FilterDropHandler: React.FC<IFilterDropHandler>;
|
|
12
|
+
export default FilterDropHandler;
|
package/dist/Filters/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import DatePicker from './molecules/DatePicker';
|
|
1
|
+
import DatePicker, { DateInterval, isDateInterval } from './molecules/DatePicker';
|
|
2
2
|
import FilterDropdownContainer from './atoms/FilterDropdownContainer';
|
|
3
3
|
import FilterButton from './atoms/FilterButton';
|
|
4
4
|
import FilterDropdown from './molecules/FilterDropdown';
|
|
5
|
-
import FilterInputs, {
|
|
5
|
+
import FilterInputs, { IFilterInputs } from './molecules/FilterInputs';
|
|
6
6
|
import FiltersResults, { IFilterLabel } from './molecules/FiltersResults';
|
|
7
|
-
import FilterBar
|
|
8
|
-
import { IFilterType, IFilterItem, IFilterResult, IFilterValue, isFilterItem } from './FilterTypes';
|
|
9
|
-
export { DatePicker, FilterDropdownContainer, FilterButton, FilterDropdown, FilterInputs, FiltersResults, FilterBar, isFilterItem, };
|
|
10
|
-
export type { ISearchFilter, IFilterInputs, IFilterDropdownExt, IFilterLabel, IFilterDropdownConfig, IFilterType, IFilterItem, IFilterResult, IFilterValue, };
|
|
7
|
+
import FilterBar from './organisms/FilterBar';
|
|
8
|
+
import { IFilterType, IFilterItem, IFilterResult, IFilterValue, ISearchFilter, IFilterDropdownExt, IFilterDropdownConfig, IFilterDatePicker, isFilterItem } from './FilterTypes';
|
|
9
|
+
export { DatePicker, FilterDropdownContainer, FilterButton, FilterDropdown, FilterInputs, FiltersResults, FilterBar, isFilterItem, isDateInterval, };
|
|
10
|
+
export type { ISearchFilter, IFilterInputs, IFilterDropdownExt, IFilterLabel, IFilterDropdownConfig, IFilterType, IFilterItem, IFilterResult, IFilterValue, DateInterval, IFilterDatePicker };
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare type DateMode = "single" | "interval";
|
|
3
3
|
declare type TimeMode = "off" | "single" | "interval";
|
|
4
|
-
|
|
4
|
+
export declare const isDateInterval: (value: any) => value is DateInterval;
|
|
5
|
+
export interface DateInterval {
|
|
5
6
|
start: Date;
|
|
6
7
|
end: Date;
|
|
7
8
|
}
|
|
8
|
-
interface
|
|
9
|
+
export interface IDatePicker {
|
|
9
10
|
initialValue?: Date | DateInterval;
|
|
10
11
|
dateMode?: DateMode;
|
|
11
12
|
timeMode?: TimeMode;
|
|
13
|
+
hasEmptyValue?: boolean;
|
|
14
|
+
dateTimeTextUpper?: string;
|
|
15
|
+
dateTimeTextLower?: string;
|
|
12
16
|
updateCallback?: (data: DateInterval | Date) => void;
|
|
13
17
|
}
|
|
14
|
-
declare const DatePicker: React.FC<
|
|
18
|
+
declare const DatePicker: React.FC<IDatePicker>;
|
|
15
19
|
export default DatePicker;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DateInterval, IDatePicker } from './DatePicker';
|
|
3
|
+
export interface IDropdownDatePicker extends IDatePicker {
|
|
4
|
+
buttonIcon: string;
|
|
5
|
+
buttonText: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
selected?: DateInterval | Date | null;
|
|
8
|
+
onCloseCallback?: (value: DateInterval | Date | null) => void;
|
|
9
|
+
onUpdateCallback?: (value: DateInterval | Date | null) => void;
|
|
10
|
+
onToggleCallback?: (value: DateInterval | Date | null, isOpen: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const DropdownDatePicker: React.FC<IDropdownDatePicker>;
|
|
13
|
+
export default DropdownDatePicker;
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { IFilterDropdown } from '../../Filters/molecules/FilterDropdown';
|
|
4
|
-
export interface ISearchFilter extends IBasicSearchInput {
|
|
5
|
-
id: string;
|
|
6
|
-
canHide?: boolean;
|
|
7
|
-
showFieldText?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface IFilterDropdownExt extends IFilterDropdown {
|
|
10
|
-
id: string;
|
|
11
|
-
canHide?: boolean;
|
|
12
|
-
}
|
|
2
|
+
import { IFilterDatePicker, IFilterDropdownExt, ISearchFilter } from '../FilterTypes';
|
|
13
3
|
export interface IFilterInputs {
|
|
14
|
-
searchFilters
|
|
15
|
-
dropdownFilters
|
|
4
|
+
searchFilters?: ISearchFilter[];
|
|
5
|
+
dropdownFilters?: IFilterDropdownExt[];
|
|
6
|
+
datePickerFilters?: IFilterDatePicker[];
|
|
16
7
|
hasShowMore?: boolean;
|
|
17
8
|
showMoreText?: string;
|
|
18
9
|
showLessText?: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IFilterItem, IFilterType } from '../
|
|
2
|
+
import { IFilterItem, IFilterType } from '../FilterTypes';
|
|
3
|
+
import { DateInterval } from './DatePicker';
|
|
3
4
|
export interface IFilterLabel {
|
|
4
5
|
filterId: string;
|
|
5
|
-
item: IFilterItem;
|
|
6
|
+
item: IFilterItem | Date | DateInterval;
|
|
6
7
|
type: IFilterType;
|
|
7
8
|
icon?: string;
|
|
8
9
|
filterName?: string;
|
|
@@ -12,7 +13,8 @@ interface IFilterResults {
|
|
|
12
13
|
totalResults: number;
|
|
13
14
|
resultTextTemplate?: string;
|
|
14
15
|
clearText?: string;
|
|
15
|
-
|
|
16
|
+
resultsDateFormat?: string;
|
|
17
|
+
onRemoveFilter?: (filterId: string, type: IFilterType, item: IFilterItem | Date | DateInterval) => void;
|
|
16
18
|
onClearAll?: () => void;
|
|
17
19
|
}
|
|
18
20
|
declare const FiltersResults: React.FC<IFilterResults>;
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ISearchFilter } from '../molecules/FilterInputs';
|
|
5
|
-
export interface IFilterDropdownConfig {
|
|
6
|
-
id: string;
|
|
7
|
-
canHide?: boolean;
|
|
8
|
-
buttonIcon: string;
|
|
9
|
-
buttonText: string;
|
|
10
|
-
list: IFilterItem[];
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
optionType?: IInputOptionsType;
|
|
13
|
-
loadingText?: string;
|
|
14
|
-
searchPlaceholder?: string;
|
|
15
|
-
maxDisplayedItems?: number;
|
|
16
|
-
searchResultText?: string;
|
|
17
|
-
}
|
|
2
|
+
import { IFilterResult, IFilterDropdownConfig } from '../FilterTypes';
|
|
3
|
+
import { ISearchFilter, IFilterDatePicker } from '../FilterTypes';
|
|
18
4
|
interface IFilterBar {
|
|
19
5
|
filtersTitle?: string;
|
|
20
|
-
searchersConfig
|
|
21
|
-
dropdownsConfig
|
|
6
|
+
searchersConfig?: ISearchFilter[];
|
|
7
|
+
dropdownsConfig?: IFilterDropdownConfig[];
|
|
8
|
+
datePickersConfig?: IFilterDatePicker[];
|
|
22
9
|
hasShowMore?: boolean;
|
|
23
10
|
showMoreText?: string;
|
|
24
11
|
showLessText?: string;
|
|
@@ -26,7 +13,8 @@ interface IFilterBar {
|
|
|
26
13
|
totalResults: number;
|
|
27
14
|
clearText?: string;
|
|
28
15
|
isLoading?: boolean;
|
|
29
|
-
|
|
16
|
+
singleFilter?: boolean;
|
|
17
|
+
resultsDateFormat?: string;
|
|
30
18
|
onChangeCallback?: (currentSelected: IFilterResult[]) => void;
|
|
31
19
|
}
|
|
32
20
|
declare const FilterBar: React.FC<IFilterBar>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import lightTheme from './themes/light/light';
|
|
2
|
-
import darkTheme from './themes/dark';
|
|
2
|
+
import darkTheme from './themes/dark/dark';
|
|
3
3
|
import themeFallbackHelper from './themes/themeFallbackHelper';
|
|
4
4
|
import { AlertBar, Notification, INotificationProps, AlertWrapper } from './Alerts';
|
|
5
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 } from './Form';
|
|
6
|
-
import { DatePicker, FilterDropdownContainer, FilterButton, FilterDropdown, FilterInputs, ISearchFilter, IFilterDropdownExt, FiltersResults, IFilterLabel, FilterBar, IFilterDropdownConfig, IFilterType, IFilterItem, IFilterValue, IFilterResult, isFilterItem } from './Filters';
|
|
6
|
+
import { DatePicker, DateInterval, isDateInterval, IFilterDatePicker, FilterDropdownContainer, FilterButton, FilterDropdown, FilterInputs, ISearchFilter, IFilterDropdownExt, FiltersResults, IFilterLabel, FilterBar, IFilterDropdownConfig, IFilterType, IFilterItem, IFilterValue, IFilterResult, isFilterItem } 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';
|
|
@@ -19,7 +19,7 @@ import Spinner from './Indicators/Spinner';
|
|
|
19
19
|
import WebRTCClient from './WebRTCClient';
|
|
20
20
|
import { MainMenu, TopBar, Content, Layout, MainContainer, SidebarBox, SidebarLink, SidebarHeading, Logo, SidebarLinkHeading, BackLink, Sidebar, GlobalUI, INotificationItem, INotificationsHistory, ICustomDrawer } from './Global';
|
|
21
21
|
import { Tabs, Tab, TabList, TabContent, TabWithIcon, TabsWithIconBar, ITabIcon } from './Tabs';
|
|
22
|
-
export { darkTheme, lightTheme, themeFallbackHelper, AlertBar, Notification, AlertWrapper, LineUI, LineUIVideo, LineUIRTC, LineSetContext, LineReducer, Form, Button, ButtonWithIcon, ButtonWithLoading, IconButton, ActionButtons, Input, SmallInput, Label, Switch, Checkbox, PasswordField, TextField, TextArea, TextAreaField, SliderInput, DurationSlider, PercentageSlider, InputFileButton, DropArea, CropTool, AvatarUploader, SelectField, SelectWrapper, AreaUploadManager, RadioButton, ConfirmationModal, DatePicker, FilterDropdownContainer, FilterButton, FilterDropdown, FilterInputs, FiltersResults, FilterBar, isFilterItem, Icon, IconSVGs, StatusIcon, IntroductionText, PageHeader, PageTitle, MultilineContent, Controls, PTZProvider, PTZContext, PTZReducer, usePTZ, TypeTable, TableRowThumbnail, TableHeaderTitle, EditCell, useInterval, useTo, useTitle, useCopyToClipboard, useClickOutside, usePoll, useMediaModal, resetButtonStyles, Spinner, WebRTCClient, MainMenu, TopBar, MainContainer, Layout, Content, SidebarBox, SidebarLink, SidebarHeading, Logo, SidebarLinkHeading, BackLink, Sidebar, GlobalUI, Tabs, Tab, TabList, TabContent, TabWithIcon, TabsWithIconBar, Tag, TagList, TagListWrapper, MediaBox, BasicSearchInput, NotificationProvider, useNotification, ModalContext, ModalProvider, useModal };
|
|
22
|
+
export { darkTheme, lightTheme, themeFallbackHelper, AlertBar, Notification, AlertWrapper, LineUI, LineUIVideo, LineUIRTC, LineSetContext, LineReducer, Form, Button, ButtonWithIcon, ButtonWithLoading, IconButton, ActionButtons, Input, SmallInput, Label, Switch, Checkbox, PasswordField, TextField, TextArea, TextAreaField, SliderInput, DurationSlider, PercentageSlider, InputFileButton, DropArea, CropTool, AvatarUploader, SelectField, SelectWrapper, AreaUploadManager, RadioButton, ConfirmationModal, DatePicker, FilterDropdownContainer, FilterButton, FilterDropdown, FilterInputs, FiltersResults, FilterBar, isFilterItem, isDateInterval, Icon, IconSVGs, StatusIcon, IntroductionText, PageHeader, PageTitle, MultilineContent, Controls, PTZProvider, PTZContext, PTZReducer, usePTZ, TypeTable, TableRowThumbnail, TableHeaderTitle, EditCell, useInterval, useTo, useTitle, useCopyToClipboard, useClickOutside, usePoll, useMediaModal, resetButtonStyles, Spinner, WebRTCClient, MainMenu, TopBar, MainContainer, Layout, Content, SidebarBox, SidebarLink, SidebarHeading, Logo, SidebarLinkHeading, BackLink, Sidebar, GlobalUI, Tabs, Tab, TabList, TabContent, TabWithIcon, TabsWithIconBar, Tag, TagList, TagListWrapper, MediaBox, BasicSearchInput, NotificationProvider, useNotification, ModalContext, ModalProvider, useModal };
|
|
23
23
|
/**
|
|
24
24
|
* Values based on colors.feedback from theme
|
|
25
25
|
*/
|
|
@@ -27,4 +27,4 @@ export declare type IFeedbackColor = 'error' | 'warning' | 'info' | 'success' |
|
|
|
27
27
|
export declare type ITimeUnit = 'seconds' | 'minutes' | 'hours';
|
|
28
28
|
export declare type IMediaType = 'img' | 'video';
|
|
29
29
|
export declare type IStatusDot = 'caution' | 'danger' | 'good' | 'neutral' | 'highlight';
|
|
30
|
-
export type { IModal, INotificationProps, IconButtonData, ITag, ITagList, ISliderMark, INotificationItem, INotificationsHistory, ICustomDrawer, ISearchFilter, IFilterDropdownExt, IFilterLabel, IFilterDropdownConfig, ITabIcon, IFilterType, IFilterItem, IFilterValue, IFilterResult, };
|
|
30
|
+
export type { IModal, INotificationProps, IconButtonData, ITag, ITagList, ISliderMark, INotificationItem, INotificationsHistory, ICustomDrawer, ISearchFilter, IFilterDropdownExt, IFilterLabel, IFilterDropdownConfig, ITabIcon, IFilterType, IFilterItem, IFilterValue, IFilterResult, DateInterval, IFilterDatePicker, };
|