@fattureincloud/fic-design-system 0.19.2 → 0.19.3
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/assets/index-0788b002.css +626 -0
- package/dist/assets/index.esm-7d789d8e.css +626 -0
- package/dist/common/components/Label.d.ts +3 -0
- package/dist/common/types/label.d.ts +12 -0
- package/dist/common/utils/label.d.ts +5 -0
- package/dist/components/accordion-new/Accordion.d.ts +12 -0
- package/dist/components/accordion-new/accordion-new.stories.d.ts +4 -0
- package/dist/components/accordion-new/components/AccordionIcon.d.ts +3 -0
- package/dist/components/accordion-new/components/AccordionItem.d.ts +3 -0
- package/dist/components/accordion-new/components/styled.d.ts +8 -0
- package/dist/components/accordion-new/index.d.ts +3 -0
- package/dist/components/accordion-new/types.d.ts +58 -0
- package/dist/components/accordion-new/utils.d.ts +10 -0
- package/dist/components/accordions/accordions.d.ts +9 -0
- package/dist/components/accordions/accordions.stories.d.ts +8 -0
- package/dist/components/accordions/components/styledAccordionWrapper.d.ts +1 -0
- package/dist/components/accordions/index.d.ts +1 -0
- package/dist/components/accordions/types.d.ts +19 -0
- package/dist/components/banner/utils.d.ts +8 -0
- package/dist/components/carousel/components/common/styled.d.ts +2 -0
- package/dist/components/chart/components/styled.d.ts +13 -0
- package/dist/components/chart/stories/styled.d.ts +2 -20
- package/dist/components/checkbox/Checkbox.d.ts +15 -0
- package/dist/components/checkbox/checkbox.stories.d.ts +1 -0
- package/dist/components/checkbox/checkboxPalette.d.ts +16 -0
- package/dist/components/checkbox/components/Input.d.ts +9 -0
- package/dist/components/checkbox/components/Label.d.ts +8 -0
- package/dist/components/checkbox/hooks/useCheckboxValue.d.ts +11 -0
- package/dist/components/checkbox/index.d.ts +4 -0
- package/dist/components/checkbox/types.d.ts +19 -0
- package/dist/components/checkbox/utils.d.ts +24 -0
- package/dist/components/chips/chips.d.ts +7 -0
- package/dist/components/chips/chips.stories.d.ts +6 -0
- package/dist/components/chips/components/styledChipWrapper.d.ts +4 -0
- package/dist/components/chips/index.d.ts +2 -0
- package/dist/components/chips/types.d.ts +11 -0
- package/dist/components/drawer/types.d.ts +14 -0
- package/dist/components/dropdown/DropdownPopper.d.ts +1 -1
- package/dist/components/dropdown/styled.d.ts +1 -1
- package/dist/components/ficFeatures/components/featureCategory/FeatureCategory.d.ts +2 -1
- package/dist/components/ficFeatures/constants/icons.d.ts +1 -0
- package/dist/components/form/checkbox/components/Input.d.ts +9 -0
- package/dist/components/form/checkbox/components/Label.d.ts +8 -0
- package/dist/components/form/datepicker/StyledDatePicker.d.ts +1 -0
- package/dist/components/form/datepicker/components/MonthPicker.d.ts +5 -0
- package/dist/components/form/fileUploader/fileTypes.d.ts +3 -0
- package/dist/components/form/fileUploader/hooks/useIcon.d.ts +4 -0
- package/dist/components/form/fileUploader/hooks/useTexts.d.ts +3 -0
- package/dist/components/form/select/components/Placeholder.d.ts +4 -0
- package/dist/components/form/select/components/types.d.ts +10 -0
- package/dist/components/groupRadioButton/index.d.ts +23 -0
- package/dist/components/groupRadioButton/radio-group.stories.d.ts +6 -0
- package/dist/components/inlineMessages/components/styledInlineMessageWrapper.d.ts +8 -0
- package/dist/components/inlineMessages/index.d.ts +2 -0
- package/dist/components/inlineMessages/inlineMessages.d.ts +4 -0
- package/dist/components/inlineMessages/inlineMessages.stories.d.ts +7 -0
- package/dist/components/inlineMessages/types.d.ts +29 -0
- package/dist/components/inputText/components/icons.d.ts +8 -0
- package/dist/components/inputText/components/inputContainer.d.ts +1 -0
- package/dist/components/inputText/components/messages.d.ts +2 -0
- package/dist/components/inputText/components/wrapperTextArea.d.ts +1 -0
- package/dist/components/inputText/icons.d.ts +9 -0
- package/dist/components/inputText/index.d.ts +3 -0
- package/dist/components/inputText/inputText.stories.d.ts +1 -0
- package/dist/components/inputText/inputTextStyledWrapper.d.ts +2 -0
- package/dist/components/inputText/sideText.d.ts +6 -0
- package/dist/components/inputText/typings/enums.d.ts +17 -0
- package/dist/components/inputText/typings/inputText.d.ts +43 -0
- package/dist/components/inputText/utils.d.ts +8 -0
- package/dist/components/newTable/components/action/favorite/Favorite.d.ts +13 -0
- package/dist/components/newTable/components/action/favorite/index.d.ts +1 -0
- package/dist/components/newTable/components/action/favorite/styled.d.ts +3 -0
- package/dist/components/pagination/paginationStyledWrapper.d.ts +1 -0
- package/dist/components/progressbar/components/styledProgressbarWrapper.d.ts +2 -0
- package/dist/components/radioButton/components/label.d.ts +2 -0
- package/dist/components/radioButton/components/radio.d.ts +2 -0
- package/dist/components/radioButton/index.d.ts +2 -0
- package/dist/components/radioButton/radio.stories.d.ts +6 -0
- package/dist/components/radioButton/typings/radioButton.d.ts +21 -0
- package/dist/components/select/hooks/constants.d.ts +4613 -0
- package/dist/components/select/hooks/useCustomSelectStyle.d.ts +4 -0
- package/dist/components/select/index.d.ts +4 -0
- package/dist/components/select/select.stories.d.ts +1 -0
- package/dist/components/select/typings/select.d.ts +22 -0
- package/dist/components/stepBar/components/singleStep.d.ts +3 -0
- package/dist/components/stepBar/components/styledStepBarWrapper.d.ts +2 -0
- package/dist/components/stepBar/index.d.ts +2 -0
- package/dist/components/stepBar/stepBar.d.ts +7 -0
- package/dist/components/stepBar/stepBar.stories.d.ts +1 -0
- package/dist/components/stepBar/types.d.ts +15 -0
- package/dist/components/table/components/EmptyState.d.ts +7 -0
- package/dist/components/table/components/SelectedRowsCount.d.ts +7 -0
- package/dist/components/table/components/actionLink.d.ts +3 -0
- package/dist/components/table/components/actions/ActionsCell.d.ts +10 -0
- package/dist/components/table/components/actions/DropdownActions.d.ts +10 -0
- package/dist/components/table/components/actions/PrimaryAction.d.ts +12 -0
- package/dist/components/table/components/actions/actionsContainer.d.ts +1 -0
- package/dist/components/table/components/actions/actionsPopUp.d.ts +12 -0
- package/dist/components/table/components/actions/actionsPopUpButton.d.ts +8 -0
- package/dist/components/table/components/actions/actionsPopUpUnderlay.d.ts +3 -0
- package/dist/components/table/components/checkboxes/Cell.d.ts +5 -0
- package/dist/components/table/components/checkboxes/Header.d.ts +5 -0
- package/dist/components/table/components/checkboxes/useHeaderCheckboxProps.d.ts +12 -0
- package/dist/components/table/components/components/headDesktop.d.ts +15 -0
- package/dist/components/table/components/components/listMobile.d.ts +15 -0
- package/dist/components/table/components/components/rowDesktop.d.ts +18 -0
- package/dist/components/table/components/customizationModal/customizationsModal.d.ts +10 -0
- package/dist/components/table/components/customizationModal/index.d.ts +2 -0
- package/dist/components/table/components/customizationModal/styledWrapper.d.ts +3 -0
- package/dist/components/table/components/customizationModal/useDnd.d.ts +8 -0
- package/dist/components/table/components/customizationModal/utils.d.ts +6 -0
- package/dist/components/table/components/emptySet.d.ts +10 -0
- package/dist/components/table/components/linearBackground.d.ts +1 -0
- package/dist/components/table/components/loadingCell/LoadingCell.d.ts +8 -0
- package/dist/components/table/components/loadingContent.d.ts +7 -0
- package/dist/components/table/components/pagination/PageButton.d.ts +10 -0
- package/dist/components/table/components/pagination/PaginationButtons.d.ts +10 -0
- package/dist/components/table/components/pagination/utils.d.ts +14 -0
- package/dist/components/table/components/pagination.d.ts +8 -0
- package/dist/components/table/components/sortIcon.d.ts +2 -0
- package/dist/components/table/components/styledWrapper.d.ts +3 -0
- package/dist/components/table/components/tableBody/TableBody.d.ts +17 -0
- package/dist/components/table/components/tableBody/TableBodyTr.d.ts +8 -0
- package/dist/components/table/components/tableHeader/SortIndicator.d.ts +7 -0
- package/dist/components/table/components/tableHeader/TableHeader.d.ts +12 -0
- package/dist/components/table/components/tableParts/TableTd.d.ts +8 -0
- package/dist/components/table/components/tableParts/TableTh.d.ts +4 -0
- package/dist/components/table/components/tableParts/styled.d.ts +17 -0
- package/dist/components/table/components/unstyledTable.d.ts +11 -0
- package/dist/components/table/constants.d.ts +2 -0
- package/dist/components/table/hooks/useCheckboxesComponents.d.ts +4 -0
- package/dist/components/table/hooks/useRowsSelection.d.ts +4 -0
- package/dist/components/table/hooks/useTableHooks.d.ts +6 -0
- package/dist/components/table/hooks/useTableValues.d.ts +14 -0
- package/dist/components/table/index.d.ts +7 -0
- package/dist/components/table/stories/columns.d.ts +3 -0
- package/dist/components/table/stories/components/CustomPerson.d.ts +7 -0
- package/dist/components/table/stories/components/Role.d.ts +8 -0
- package/dist/components/table/stories/components/types.d.ts +14 -0
- package/dist/components/table/stories/data.d.ts +2 -0
- package/dist/components/table/table.d.ts +57 -0
- package/dist/components/table/table.stories.d.ts +6 -0
- package/dist/components/table/tablePalette.d.ts +33 -0
- package/dist/components/table/types.d.ts +28 -0
- package/dist/components/table/typings/main.d.ts +92 -0
- package/dist/components/table/utils/configPersistency.d.ts +14 -0
- package/dist/components/table/utils.d.ts +16 -0
- package/dist/components/textButton/TextButton.d.ts +12 -0
- package/dist/components/textButton/index.d.ts +2 -0
- package/dist/components/textButton/textButton.stories.d.ts +1 -0
- package/dist/components/tip/components/styledTip.d.ts +4 -0
- package/dist/components/toast/ToastContainer.d.ts +9 -0
- package/dist/components/toast/typings/toast.d.ts +32 -0
- package/dist/components/tooltips/components/message.d.ts +12 -0
- package/dist/components/tooltips/components/styledTooltipWrapper.d.ts +1 -0
- package/dist/components/tooltips/index.d.ts +2 -0
- package/dist/components/tooltips/tooltips.d.ts +15 -0
- package/dist/components/tooltips/tooltips.stories.d.ts +1 -0
- package/dist/components/tooltips/types.d.ts +25 -0
- package/dist/components/verticalTab/VerticalTab.d.ts +4 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/VerticalTabSelector.d.ts +13 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/index.d.ts +5 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/styled.d.ts +11 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/types.d.ts +37 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/verticalTabSelector.stories.d.ts +5 -0
- package/dist/components/verticalTab/components/VerticalTabSelector/verticalTabSelectorPalette.d.ts +3 -0
- package/dist/components/verticalTab/index.d.ts +2 -0
- package/dist/components/verticalTab/styled.d.ts +6 -0
- package/dist/components/verticalTab/types.d.ts +6 -0
- package/dist/components/verticalTab/verticalTab.stories.d.ts +8 -0
- package/dist/index.esm.js +9 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/styles/elevations.d.ts +7 -0
- package/dist/utils/FICNumbers.d.ts +11 -0
- package/package.json +1 -1
- package/dist/components/inlineMessage/const.d.ts +0 -2
- /package/dist/components/floatingBadge/{FloatingBadge.d.ts → floatingBadge.d.ts} +0 -0
- /package/dist/components/floatingBadge/{WithBadge.d.ts → withBadge.d.ts} +0 -0
- /package/dist/components/progressbar/{ProgressBar.d.ts → progressbar.d.ts} +0 -0
- /package/dist/components/progressbar/{progressBar.stories.d.ts → progressbar.stories.d.ts} +0 -0
- /package/dist/components/tip/{ShortcutTip.d.ts → shortcutTip.d.ts} +0 -0
- /package/dist/components/tip/{Tip.d.ts → tip.d.ts} +0 -0
- /package/dist/components/toast/components/{ToastContent.d.ts → toastContent.d.ts} +0 -0
- /package/dist/components/toast/{Toast.d.ts → toast.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { default as Select } from 'react-select';
|
|
3
|
+
import { default as AsyncSelect } from 'react-select/async';
|
|
4
|
+
import CreatableSelect from 'react-select/creatable';
|
|
5
|
+
import { InputActionMeta } from 'react-select/src/types';
|
|
6
|
+
export interface Props {
|
|
7
|
+
label?: string;
|
|
8
|
+
size?: 'medium' | 'large' | undefined;
|
|
9
|
+
inputChange?: (newValue: string, actionMeta: InputActionMeta) => void;
|
|
10
|
+
getRef?: (node: any) => any;
|
|
11
|
+
}
|
|
12
|
+
export declare type TSelectProps = React.ComponentProps<typeof Select & Props>;
|
|
13
|
+
export declare type TAsyncSelectProps = React.ComponentProps<typeof AsyncSelect & Props>;
|
|
14
|
+
export declare type TSelectPropsCreatable = React.ComponentProps<typeof CreatableSelect> & {
|
|
15
|
+
label?: string;
|
|
16
|
+
size?: 'medium' | 'large' | undefined;
|
|
17
|
+
inputChange?: (newValue: string, actionMeta: InputActionMeta) => void;
|
|
18
|
+
createOption?: (inputValue: string) => void;
|
|
19
|
+
};
|
|
20
|
+
export declare type TSelect = React.FunctionComponent<TSelectProps>;
|
|
21
|
+
export declare type TSelectCreatable = React.FunctionComponent<TSelectPropsCreatable>;
|
|
22
|
+
export declare type TSelectAsync = React.FunctionComponent<TAsyncSelectProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { TStepBar, UnstyledStepBarPropsInterface, UnstyledStepBarStateInterface } from './types';
|
|
3
|
+
export declare class UnstyledStepBar extends Component<UnstyledStepBarPropsInterface, UnstyledStepBarStateInterface> {
|
|
4
|
+
render(): JSX.Element;
|
|
5
|
+
}
|
|
6
|
+
declare const StepBar: TStepBar;
|
|
7
|
+
export default StepBar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface StepProps {
|
|
3
|
+
title: string;
|
|
4
|
+
type: 'standard' | 'current' | 'completed';
|
|
5
|
+
number: number;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
stepList: Array<StepProps>;
|
|
9
|
+
}
|
|
10
|
+
export declare type TStepBar = React.FunctionComponent<Props>;
|
|
11
|
+
export interface UnstyledStepBarPropsInterface extends Props {
|
|
12
|
+
}
|
|
13
|
+
export interface UnstyledStepBarStateInterface {
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Row } from 'react-table';
|
|
3
|
+
import { RowActions, TableData } from '../../types';
|
|
4
|
+
interface Props<T extends TableData> {
|
|
5
|
+
row: Row<T>;
|
|
6
|
+
actions?: RowActions<T>;
|
|
7
|
+
renderActions?: () => JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
declare const ActionsCell: <T extends TableData>({ row, actions, renderActions }: Props<T>) => JSX.Element;
|
|
10
|
+
export default ActionsCell;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Row } from 'react-table';
|
|
3
|
+
import { RowAction, TableData } from '../../types';
|
|
4
|
+
interface Props<T extends TableData> {
|
|
5
|
+
row: Row<T>;
|
|
6
|
+
actions: RowAction<T>[];
|
|
7
|
+
rowIsDisabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const DropdownActions: <T extends TableData>({ row, actions, rowIsDisabled }: Props<T>) => JSX.Element;
|
|
10
|
+
export default DropdownActions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Row } from 'react-table';
|
|
3
|
+
import { DropdownItemType } from '../../../dropdown/types';
|
|
4
|
+
import { RowAction, TableData } from '../../types';
|
|
5
|
+
interface Props<T extends TableData> {
|
|
6
|
+
action: RowAction<T>;
|
|
7
|
+
row: Row<T>;
|
|
8
|
+
rowIsDisabled?: boolean;
|
|
9
|
+
type?: DropdownItemType;
|
|
10
|
+
}
|
|
11
|
+
declare const PrimaryAction: <T extends TableData>({ action, row, rowIsDisabled, type, }: Props<T>) => JSX.Element | null;
|
|
12
|
+
export default PrimaryAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionsContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionType } from '../../typings/main';
|
|
3
|
+
export declare const ActionsPopUp: (props: {
|
|
4
|
+
actions: Array<ActionType>;
|
|
5
|
+
selectedRows: number[];
|
|
6
|
+
element: {
|
|
7
|
+
[key: string]: React.ReactText;
|
|
8
|
+
id: number;
|
|
9
|
+
};
|
|
10
|
+
active: boolean;
|
|
11
|
+
handlePopUpVisibility: (rowId?: number | undefined) => void;
|
|
12
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { HeaderProps, TableToggleAllRowsSelectedProps } from 'react-table';
|
|
3
|
+
import { TableData } from '../../types';
|
|
4
|
+
interface Props<T extends TableData> {
|
|
5
|
+
headerProps: PropsWithChildren<HeaderProps<T>>;
|
|
6
|
+
selectSinglePage?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface ReturnType extends TableToggleAllRowsSelectedProps {
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const useHeaderCheckboxProps: <T extends TableData>({ headerProps, selectSinglePage, }: Props<T>) => ReturnType;
|
|
12
|
+
export default useHeaderCheckboxProps;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionType, PropertyFilterInterface, TControlledProperties } from '../../typings/main';
|
|
3
|
+
interface Props {
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
allChecked: boolean;
|
|
6
|
+
handleSelectAll: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
controlledProperties: TControlledProperties;
|
|
8
|
+
setShowModalCustomizeTrue: () => void;
|
|
9
|
+
propertiesFilter: PropertyFilterInterface[];
|
|
10
|
+
handleSortOnProperty: (id: string, type: boolean | 'desc' | 'asc') => void;
|
|
11
|
+
actions?: ActionType[];
|
|
12
|
+
disableSelection?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const HeadDesktop: ({ actions, allChecked, controlledProperties, disableSelection, handleSelectAll, handleSortOnProperty, isLoading, propertiesFilter, setShowModalCustomizeTrue, }: Props) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
listSize: number;
|
|
4
|
+
isLoading?: boolean;
|
|
5
|
+
data: {
|
|
6
|
+
[key: string]: React.ReactText;
|
|
7
|
+
id: number;
|
|
8
|
+
}[];
|
|
9
|
+
renderMobileRow?: (o: {
|
|
10
|
+
[key: string]: React.ReactText;
|
|
11
|
+
id: number;
|
|
12
|
+
}) => JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
export declare const ListMobile: ({ data, isLoading, listSize, renderMobileRow }: Props) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionType, TControlledProperties } from '../../typings/main';
|
|
3
|
+
interface Props {
|
|
4
|
+
index: number;
|
|
5
|
+
selectedList?: number[];
|
|
6
|
+
element: {
|
|
7
|
+
[key: string]: React.ReactText;
|
|
8
|
+
id: number;
|
|
9
|
+
};
|
|
10
|
+
handleSelection: (id: number) => void;
|
|
11
|
+
controlledProperties: TControlledProperties;
|
|
12
|
+
actions?: ActionType[];
|
|
13
|
+
handlePopUpVisibility: (rowId?: number) => void;
|
|
14
|
+
currentActionsPopUp?: number;
|
|
15
|
+
disableSelection?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const RowDesktop: ({ actions, controlledProperties, currentActionsPopUp, disableSelection, element, handlePopUpVisibility, handleSelection, index, selectedList, }: Props) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { DropResult, ResponderProvided } from 'react-beautiful-dnd';
|
|
3
|
+
import { CustomizationsModalPropsInterface, CustomizationsModalStateInterface } from '../../typings/main';
|
|
4
|
+
export declare class CustomizationsModal extends Component<CustomizationsModalPropsInterface, CustomizationsModalStateInterface> {
|
|
5
|
+
constructor(props: CustomizationsModalPropsInterface);
|
|
6
|
+
propertiesDisplayHandler: (id: string) => void;
|
|
7
|
+
onDragEnd: (result: DropResult, provided: ResponderProvided) => void;
|
|
8
|
+
resetProperties: () => void;
|
|
9
|
+
render(): JSX.Element;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DropResult, ResponderProvided } from 'react-beautiful-dnd';
|
|
3
|
+
import { TControlledProperties } from '../../typings/main';
|
|
4
|
+
export declare const UseDnd: React.FunctionComponent<{
|
|
5
|
+
localProperties: TControlledProperties;
|
|
6
|
+
onDragEnd: (result: DropResult, provided: ResponderProvided) => void;
|
|
7
|
+
propertiesDisplayHandler: (id: string) => void;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { DraggableStateSnapshot, DraggingStyle, NotDraggingStyle } from 'react-beautiful-dnd';
|
|
3
|
+
import { TControlledProperties } from '../../typings/main';
|
|
4
|
+
export declare const getItemStyle: (snapshot: DraggableStateSnapshot, draggableStyle?: DraggingStyle | NotDraggingStyle | undefined) => React.CSSProperties;
|
|
5
|
+
export declare const getListStyle: (isDraggingOver: boolean) => CSSProperties;
|
|
6
|
+
export declare const reorder: (list: TControlledProperties, startIndex: number, endIndex: number) => import("../../typings/main").TControlledProperty[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const linearBackground: () => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("styled-components").DefaultTheme>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ColumnInstance } from 'react-table';
|
|
3
|
+
import { TableData } from '../../types';
|
|
4
|
+
interface LoadingCellProps<T extends TableData> {
|
|
5
|
+
column: ColumnInstance<T>;
|
|
6
|
+
}
|
|
7
|
+
declare const LoadingCell: <T extends TableData>({ column }: LoadingCellProps<T>) => JSX.Element;
|
|
8
|
+
export default LoadingCell;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactText } from 'react';
|
|
2
|
+
interface Props extends PageButtonWrapperProps {
|
|
3
|
+
text: ReactText;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
}
|
|
6
|
+
declare const PageButton: ({ text, onClick, isActive }: Props) => JSX.Element;
|
|
7
|
+
export interface PageButtonWrapperProps {
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
}
|
|
10
|
+
export default PageButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { UsePaginationInstanceProps } from 'react-table';
|
|
3
|
+
import { TableData } from '../../types';
|
|
4
|
+
interface Props<T extends TableData> {
|
|
5
|
+
pageCount: number;
|
|
6
|
+
pageIndex: number;
|
|
7
|
+
gotoPage: UsePaginationInstanceProps<T>['gotoPage'];
|
|
8
|
+
}
|
|
9
|
+
declare const PaginationButtons: <T extends TableData>({ pageCount, pageIndex, gotoPage }: Props<T>) => JSX.Element;
|
|
10
|
+
export default PaginationButtons;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
import { paletteColor } from '../../../../styles/types';
|
|
3
|
+
import { PageButtonWrapperProps } from './PageButton';
|
|
4
|
+
interface GetPageButtonParams extends PageButtonWrapperProps {
|
|
5
|
+
theme: DefaultTheme;
|
|
6
|
+
}
|
|
7
|
+
export interface PageButtonStyles {
|
|
8
|
+
color: paletteColor;
|
|
9
|
+
background: paletteColor;
|
|
10
|
+
hoverColor: paletteColor;
|
|
11
|
+
hoverBackground: paletteColor;
|
|
12
|
+
}
|
|
13
|
+
export declare const getPageButtonStyles: ({ theme, isActive }: GetPageButtonParams) => PageButtonStyles;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { UsePaginationInstanceProps } from 'react-table';
|
|
3
|
+
import { TableData } from '../types';
|
|
4
|
+
interface Props<T extends TableData> extends Omit<UsePaginationInstanceProps<T>, 'page' | 'pageOptions' | 'setPageSize'> {
|
|
5
|
+
pageIndex: number;
|
|
6
|
+
}
|
|
7
|
+
declare const Pagination: <T extends TableData>({ canPreviousPage, nextPage, previousPage, canNextPage, gotoPage, pageCount, pageIndex, }: Props<T>) => JSX.Element;
|
|
8
|
+
export default Pagination;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TablePropsInterface } from '../typings/main';
|
|
2
|
+
import { UnstyledTable } from './unstyledTable';
|
|
3
|
+
export declare const StyledTableWrapper: import("styled-components").StyledComponent<typeof UnstyledTable, import("styled-components").DefaultTheme, TablePropsInterface, never>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Row, UseTableInstanceProps } from 'react-table';
|
|
3
|
+
import { TableData } from '../../types';
|
|
4
|
+
interface Props<T extends TableData> {
|
|
5
|
+
rows: Row<T>[];
|
|
6
|
+
prepareRow: UseTableInstanceProps<T>['prepareRow'];
|
|
7
|
+
selectedRowsIds: string[];
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
onRowClick?: (row: Row<T>) => void;
|
|
10
|
+
rowHasFocus: boolean;
|
|
11
|
+
rowHeight: number | string;
|
|
12
|
+
selectableRows?: boolean;
|
|
13
|
+
setHighlightedRow: React.Dispatch<React.SetStateAction<number>>;
|
|
14
|
+
tableId: string;
|
|
15
|
+
}
|
|
16
|
+
declare const TableBody: <T extends TableData>({ isLoading, onRowClick, prepareRow, rowHasFocus, rowHeight, rows, selectableRows, selectedRowsIds, setHighlightedRow, tableId, }: Props<T>) => JSX.Element;
|
|
17
|
+
export default TableBody;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TableBodyTrStyles } from '../../utils';
|
|
2
|
+
export interface TableBodyTrProps {
|
|
3
|
+
isSelected?: boolean;
|
|
4
|
+
isDisabled?: boolean;
|
|
5
|
+
rowHasFocus: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const TableBodyTr: import("styled-components").StyledComponent<"tr", import("styled-components").DefaultTheme, import("../tableParts/styled").TrProps & TableBodyTrStyles & TableBodyTrProps, keyof TableBodyTrStyles>;
|
|
8
|
+
export default TableBodyTr;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { HeaderGroup, SortingRule } from 'react-table';
|
|
3
|
+
import { TableData } from '../../types';
|
|
4
|
+
interface Props<T extends TableData> {
|
|
5
|
+
scrollBar: number;
|
|
6
|
+
headerGroups: HeaderGroup<T>[];
|
|
7
|
+
headerHeight?: number | string;
|
|
8
|
+
selectedRowsIds?: string[];
|
|
9
|
+
sortBy: SortingRule<T>[];
|
|
10
|
+
}
|
|
11
|
+
declare const TableHeader: <T extends TableData>({ headerHeight, headerGroups, scrollBar }: Props<T>) => JSX.Element;
|
|
12
|
+
export default TableHeader;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type alignType = 'left' | 'center' | 'right';
|
|
3
|
+
interface Props extends React.HTMLAttributes<HTMLTableDataCellElement> {
|
|
4
|
+
align?: alignType;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const TableTd: import("styled-components").StyledComponent<({ children, align, isLoading, ...rest }: Props) => JSX.Element, import("styled-components").DefaultTheme, Props, never>;
|
|
8
|
+
export default TableTd;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = React.HTMLAttributes<HTMLTableHeaderCellElement>;
|
|
3
|
+
export declare const TableTh: import("styled-components").StyledComponent<({ children, ...rest }: Props) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export default TableTh;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const TableWrapper: import("styled-components").StyledComponent<"table", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
interface THeadProps {
|
|
3
|
+
scrollBar: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const THead: import("styled-components").StyledComponent<"thead", import("styled-components").DefaultTheme, THeadProps, never>;
|
|
6
|
+
interface TableBodyProps {
|
|
7
|
+
bodyHeight: number | string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TBody: import("styled-components").StyledComponent<"tbody", import("styled-components").DefaultTheme, TableBodyProps, never>;
|
|
10
|
+
export interface TrProps {
|
|
11
|
+
isHeader?: boolean;
|
|
12
|
+
rowHeight?: number | string;
|
|
13
|
+
headerHeight?: number | string;
|
|
14
|
+
}
|
|
15
|
+
export declare const TableTr: import("styled-components").StyledComponent<"tr", import("styled-components").DefaultTheme, TrProps, never>;
|
|
16
|
+
export declare const TFoot: import("styled-components").StyledComponent<"tfoot", import("styled-components").DefaultTheme, {}, never>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { TablePropsInterface, TableStateInterface, TControlledProperties } from '../typings/main';
|
|
3
|
+
export declare class UnstyledTable extends Component<TablePropsInterface, TableStateInterface> {
|
|
4
|
+
constructor(props: TablePropsInterface);
|
|
5
|
+
handleSelection: (id: number) => void;
|
|
6
|
+
handleSelectAll: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
handleSortOnProperty: (id: string, type: 'desc' | 'asc' | boolean) => void;
|
|
8
|
+
modifyControlledPropertiesHandler: (properties: TControlledProperties) => void;
|
|
9
|
+
handlePopUpVisibility: (rowId?: number | undefined) => void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Row } from 'react-table';
|
|
2
|
+
import { OnSelectionChange, TableData } from '../types';
|
|
3
|
+
declare const useRowsSelection: <T extends TableData>(selectedFlatRows: Row<T>[], preSelectAllRows: boolean, onSelectionChange: OnSelectionChange<T> | undefined, allRows: Row<T>[]) => string[];
|
|
4
|
+
export default useRowsSelection;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PluginHook } from 'react-table';
|
|
2
|
+
import { TableProps } from '../Table';
|
|
3
|
+
import { TableData } from '../types';
|
|
4
|
+
declare type Props<T extends TableData> = Pick<TableProps<T>, 'actions' | 'withCheckbox' | 'renderActions' | 'selectableRows' | 'actionsHeader'>;
|
|
5
|
+
declare const useTableHooks: <T extends TableData>({ actions, renderActions, withCheckbox, selectableRows, actionsHeader, }: Props<T>) => PluginHook<T>[];
|
|
6
|
+
export default useTableHooks;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { Row } from 'react-table';
|
|
3
|
+
import { TableData } from '../types';
|
|
4
|
+
interface Props {
|
|
5
|
+
initialFilter?: string;
|
|
6
|
+
}
|
|
7
|
+
interface ReturnType<DataType extends TableData> {
|
|
8
|
+
filter: string;
|
|
9
|
+
setFilter: Dispatch<SetStateAction<string>>;
|
|
10
|
+
selection: Row<DataType>[];
|
|
11
|
+
setSelection: Dispatch<SetStateAction<Row<DataType>[]>>;
|
|
12
|
+
}
|
|
13
|
+
declare const useTableValues: <DataType extends TableData>({ initialFilter }?: Props) => ReturnType<DataType>;
|
|
14
|
+
export default useTableValues;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Column, Row } from 'react-table';
|
|
2
|
+
import useTableValues from './hooks/useTableValues';
|
|
3
|
+
import Table from './Table';
|
|
4
|
+
import { TableProps } from './Table';
|
|
5
|
+
import tablePalette, { TablePalette } from './tablePalette';
|
|
6
|
+
import { ManualPagination, OnSelectionChange, OnSort, RowActions, TableData } from './types';
|
|
7
|
+
export { Table, TableProps, TableData, tablePalette, useTableValues, TablePalette, RowActions, ManualPagination, OnSelectionChange, OnSort, Row, Column, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const rolesArray: readonly ["master", "admin", undefined];
|
|
3
|
+
export declare type roleType = typeof rolesArray[number];
|
|
4
|
+
interface Props {
|
|
5
|
+
role: roleType;
|
|
6
|
+
}
|
|
7
|
+
declare const Role: ({ role }: Props) => JSX.Element | null;
|
|
8
|
+
export default Role;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { roleType } from './Role';
|
|
2
|
+
export interface CustomPersonData {
|
|
3
|
+
img: string;
|
|
4
|
+
name: string;
|
|
5
|
+
role?: roleType;
|
|
6
|
+
}
|
|
7
|
+
export interface DataType {
|
|
8
|
+
person: CustomPersonData;
|
|
9
|
+
name: string;
|
|
10
|
+
address: string;
|
|
11
|
+
date: string;
|
|
12
|
+
order: number;
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
}
|