pixel-react-excel-sheet 1.0.11 → 1.0.13
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/.yarn/install-state.gz +0 -0
- package/lib/1fb4472b34e4fe07.css +1 -0
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/types.d.ts +12 -0
- package/lib/components/AddVariables/AddVariables.d.ts +5 -0
- package/lib/components/AddVariables/index.d.ts +1 -0
- package/lib/components/AddVariables/types.d.ts +35 -0
- package/lib/components/AppHeader/types.d.ts +2 -0
- package/lib/components/AttachImage/AttachImage.d.ts +1 -6
- package/lib/components/AttachImage/types.d.ts +8 -0
- package/lib/components/Avatar/types.d.ts +9 -1
- package/lib/components/Charts/BarChart/BarChart.d.ts +1 -0
- package/lib/components/Charts/DashboardDonutChart/types.d.ts +6 -0
- package/lib/components/Checkbox/types.d.ts +4 -0
- package/lib/components/Comment/Comments.d.ts +4 -0
- package/lib/components/Comment/comment/Comment.d.ts +11 -0
- package/lib/components/Comment/comment/useNode.d.ts +7 -0
- package/lib/components/Comment/index.d.ts +1 -0
- package/lib/components/Comment/type.d.ts +25 -0
- package/lib/components/CreateVariable/CreateVariableSlider.d.ts +5 -0
- package/lib/components/CreateVariable/index.d.ts +1 -0
- package/lib/components/CreateVariable/types.d.ts +56 -0
- package/lib/components/Drawer/Types.d.ts +13 -0
- package/lib/components/Editor/constants.d.ts +1 -1
- package/lib/components/Editor/types.d.ts +10 -2
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +8 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.d.ts +2 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +13 -6
- package/lib/components/FileDropzone/RadioFilePreview.d.ts +4 -0
- package/lib/components/FileDropzone/types.d.ts +61 -0
- package/lib/components/IconButton/IconButton.d.ts +1 -2
- package/lib/components/IconButton/types.d.ts +1 -0
- package/lib/components/Input/Input.d.ts +1 -1
- package/lib/components/MenuOption/types.d.ts +3 -2
- package/lib/components/MiniModal/types.d.ts +7 -0
- package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/lib/components/PhoneInput/PhoneInput.d.ts +6 -0
- package/lib/components/PhoneInput/index.d.ts +1 -0
- package/lib/components/PhoneInput/types.d.ts +10 -0
- package/lib/components/PopUpModal/types.d.ts +1 -0
- package/lib/components/Search/Search.d.ts +1 -1
- package/lib/components/Search/types.d.ts +4 -0
- package/lib/components/Select/components/types.d.ts +1 -0
- package/lib/components/Select/types.d.ts +2 -0
- package/lib/components/Table/Types.d.ts +1 -1
- package/lib/components/TableTree/Components/TableBody.d.ts +4 -0
- package/lib/components/TableTree/Components/TableCell.d.ts +4 -0
- package/lib/components/TableTree/Components/TableHead.d.ts +4 -0
- package/lib/components/TableTree/Components/TableRow.d.ts +4 -0
- package/lib/components/TableTree/Utils/getAllChildIds.d.ts +1 -0
- package/lib/components/TableTree/types.d.ts +38 -5
- package/lib/components/TableWithAccordion/TableWithAccordion.d.ts +5 -0
- package/lib/components/TableWithAccordion/data.d.ts +8 -0
- package/lib/components/TableWithAccordion/index.d.ts +1 -0
- package/lib/components/TableWithAccordion/types.d.ts +67 -0
- package/lib/components/Tabs/types.d.ts +1 -0
- package/lib/index.d.ts +395 -39
- package/lib/index.esm.js +3859 -1017
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +3866 -1016
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/FormatString/FormatString.d.ts +1 -0
- package/lib/utils/checkDuplicates/checkDuplicates.d.ts +1 -0
- package/package.json +2 -1
- package/src/StyleGuide/ColorPalette/colorPaletteList.ts +15 -0
- package/src/assets/Themes/BaseTheme.scss +16 -0
- package/src/assets/Themes/DarkTheme.scss +71 -42
- package/src/assets/icons/add_file.svg +4 -17
- package/src/assets/icons/add_variable.svg +11 -0
- package/src/assets/icons/authorization.svg +4 -0
- package/src/assets/icons/authorization_icon.svg +1 -0
- package/src/assets/icons/backward.svg +10 -0
- package/src/assets/icons/capture_icon.svg +3 -0
- package/src/assets/icons/depends_on_script.svg +7 -0
- package/src/assets/icons/download_file_icon.svg +2 -9
- package/src/assets/icons/email_group.svg +3 -0
- package/src/assets/icons/executions_icon.svg +3 -0
- package/src/assets/icons/forward.svg +3 -0
- package/src/assets/icons/labels.svg +8 -0
- package/src/assets/icons/machine_disable_icon.svg +18 -0
- package/src/assets/icons/machine_enable_icon.svg +10 -0
- package/src/assets/icons/parameters.svg +3 -0
- package/src/assets/icons/pre_post_condition.svg +8 -0
- package/src/assets/icons/program_element.svg +8 -0
- package/src/assets/icons/project_status_icon.svg +10 -0
- package/src/assets/icons/refresh_icon.svg +4 -0
- package/src/assets/icons/rotate_icon.svg +10 -0
- package/src/assets/icons/suites_icon.svg +3 -0
- package/src/assets/icons/swipe_icon.svg +9 -0
- package/src/assets/icons/tap_icon.svg +4 -0
- package/src/assets/icons/test_data.svg +5 -0
- package/src/assets/icons/test_data_set.svg +7 -0
- package/src/assets/icons/variable_set.svg +5 -0
- package/src/assets/icons/window_maximize.svg +1 -2
- package/src/assets/icons/window_restore.svg +4 -0
- package/src/assets/styles/_colors.scss +0 -1
- package/src/components/Accordion/Accordion.stories.tsx +4 -0
- package/src/components/Accordion/Accordion.tsx +7 -1
- package/src/components/Accordion/types.ts +12 -0
- package/src/components/AddVariables/AddVariables.scss +14 -0
- package/src/components/AddVariables/AddVariables.stories.tsx +44 -0
- package/src/components/AddVariables/AddVariables.tsx +113 -0
- package/src/components/AddVariables/index.ts +1 -0
- package/src/components/AddVariables/types.ts +36 -0
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +1 -1
- package/src/components/AppHeader/AppHeader.scss +40 -1
- package/src/components/AppHeader/AppHeader.stories.tsx +133 -5
- package/src/components/AppHeader/AppHeader.tsx +111 -112
- package/src/components/AppHeader/types.ts +10 -9
- package/src/components/AttachImage/AttachImage.stories.tsx +2 -0
- package/src/components/AttachImage/AttachImage.tsx +5 -9
- package/src/components/AttachImage/types.ts +25 -18
- package/src/components/Avatar/Avatar.scss +4 -0
- package/src/components/Avatar/Avatar.stories.tsx +38 -18
- package/src/components/Avatar/Avatar.tsx +19 -3
- package/src/components/Avatar/types.ts +9 -1
- package/src/components/Charts/BarChart/BarChart.scss +4 -1
- package/src/components/Charts/BarChart/BarChart.tsx +23 -9
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.scss +10 -3
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.tsx +2 -1
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +54 -25
- package/src/components/Charts/DashboardDonutChart/types.ts +7 -1
- package/src/components/Charts/DonutChart/DonutChart.tsx +8 -3
- package/src/components/Charts/LineChart/LineChart.scss +13 -9
- package/src/components/Charts/LineChart/LineChart.tsx +6 -2
- package/src/components/Charts/RadialChart/RadialChart.scss +4 -0
- package/src/components/Charts/RadialChart/RadialChart.tsx +51 -45
- package/src/components/Checkbox/Checkbox.scss +57 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +91 -15
- package/src/components/Checkbox/Checkbox.tsx +4 -1
- package/src/components/Checkbox/types.ts +4 -0
- package/src/components/Comment/Comments.scss +166 -0
- package/src/components/Comment/Comments.stories.tsx +212 -0
- package/src/components/Comment/Comments.tsx +51 -0
- package/src/components/Comment/comment/Comment.tsx +206 -0
- package/src/components/Comment/comment/useNode.ts +51 -0
- package/src/components/Comment/index.ts +1 -0
- package/src/components/Comment/type.ts +36 -0
- package/src/components/CreateVariable/CreateVariableSlider.scss +18 -0
- package/src/components/CreateVariable/CreateVariableSlider.stories.tsx +66 -0
- package/src/components/CreateVariable/CreateVariableSlider.tsx +95 -0
- package/src/components/CreateVariable/index.ts +1 -0
- package/src/components/CreateVariable/types.ts +58 -0
- package/src/components/DatePicker/DatePicker.scss +11 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +19 -0
- package/src/components/DatePicker/DatePicker.tsx +73 -22
- package/src/components/Drawer/Drawer.scss +3 -2
- package/src/components/Drawer/Drawer.stories.tsx +0 -1
- package/src/components/Drawer/Drawer.tsx +4 -1
- package/src/components/Drawer/Types.ts +13 -0
- package/src/components/Editor/Editor.stories.tsx +2 -2
- package/src/components/Editor/Editor.tsx +4 -2
- package/src/components/Editor/VariableDropdown.scss +8 -2
- package/src/components/Editor/VariableDropdown.tsx +15 -7
- package/src/components/Editor/constants.ts +1 -1
- package/src/components/Editor/types.ts +12 -2
- package/src/components/Excel/ExcelFile/ExcelFile.scss +0 -1
- package/src/components/Excel/ExcelFile/ExcelFile.tsx +41 -25
- package/src/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.tsx +12 -0
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Cell.tsx +2 -34
- package/src/components/Excel/ExcelFile/ExcelFileComponents/FloatingRect.tsx +26 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +24 -22
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +1 -3
- package/src/components/Excel/ExcelFile/ExcelFileComponents/actions.ts +13 -0
- package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +53 -26
- package/src/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.ts +81 -14
- package/src/components/Excel/ExcelFile/ExcelFileComponents/types.ts +17 -6
- package/src/components/Excel/ExcelFile.stories.tsx +4 -4
- package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +36 -19
- package/src/components/Excel/dataConversion.ts +43 -20
- package/src/components/FieldSet/FieldSet.scss +2 -1
- package/src/components/FieldSet/FieldSet.stories.tsx +2 -1
- package/src/components/FileDropzone/Dropzone.tsx +76 -28
- package/src/components/FileDropzone/FileDropzone.scss +30 -3
- package/src/components/FileDropzone/FileDropzone.stories.tsx +125 -4
- package/src/components/FileDropzone/FileDropzone.tsx +46 -13
- package/src/components/FileDropzone/RadioFilePreview.tsx +76 -0
- package/src/components/FileDropzone/types.ts +73 -0
- package/src/components/Icon/iconList.ts +47 -2
- package/src/components/IconButton/IconButton.scss +11 -11
- package/src/components/IconButton/IconButton.stories.tsx +1 -0
- package/src/components/IconButton/IconButton.tsx +6 -8
- package/src/components/IconButton/types.ts +2 -1
- package/src/components/IconRadioGroup/IconRadioGroup.scss +2 -1
- package/src/components/Input/Input.scss +137 -125
- package/src/components/Input/Input.tsx +110 -93
- package/src/components/InputWithDropdown/InputWithDropdown.scss +9 -2
- package/src/components/InputWithDropdown/types.ts +3 -3
- package/src/components/LabelEditTextField/LabelEditTextField.tsx +1 -1
- package/src/components/MenuOption/MenuOption.stories.tsx +4 -3
- package/src/components/MenuOption/MenuOption.tsx +1 -1
- package/src/components/MenuOption/types.ts +4 -2
- package/src/components/MiniModal/MiniModal.scss +0 -4
- package/src/components/MiniModal/MiniModal.stories.tsx +3 -2
- package/src/components/MiniModal/MiniModal.tsx +28 -10
- package/src/components/MiniModal/types.ts +7 -0
- package/src/components/Modal/Modal.stories.tsx +2 -1
- package/src/components/ModulesChip/ModuleChip.scss +21 -8
- package/src/components/ModulesChip/ModuleChip.stories.tsx +2 -2
- package/src/components/ModulesChip/ModuleChip.tsx +6 -9
- package/src/components/MultiSelect/Dropdown.tsx +12 -5
- package/src/components/MultiSelect/MultiSelect.scss +29 -0
- package/src/components/MultiSelect/MultiSelect.stories.tsx +31 -14
- package/src/components/MultiSelect/MultiSelect.tsx +32 -21
- package/src/components/PhoneInput/PhoneInput.d.ts +3 -0
- package/src/components/PhoneInput/PhoneInput.stories.tsx +95 -0
- package/src/components/PhoneInput/PhoneInput.tsx +90 -0
- package/src/components/PhoneInput/index.ts +1 -0
- package/src/components/PhoneInput/phoneInput.scss +3 -0
- package/src/components/PhoneInput/types.ts +10 -0
- package/src/components/PopUpModal/PopUpModal.stories.tsx +14 -13
- package/src/components/PopUpModal/PopUpModal.tsx +2 -1
- package/src/components/PopUpModal/types.ts +14 -13
- package/src/components/Search/Search.stories.tsx +28 -9
- package/src/components/Search/Search.tsx +32 -29
- package/src/components/Search/types.ts +4 -0
- package/src/components/Select/Select.scss +20 -0
- package/src/components/Select/Select.stories.tsx +50 -1
- package/src/components/Select/Select.tsx +34 -7
- package/src/components/Select/components/Dropdown.scss +9 -0
- package/src/components/Select/components/Dropdown.tsx +20 -6
- package/src/components/Select/components/types.ts +1 -0
- package/src/components/Select/types.ts +12 -2
- package/src/components/Table/Table.scss +6 -5
- package/src/components/Table/Types.ts +1 -1
- package/src/components/TableTree/Components/TableBody.tsx +35 -0
- package/src/components/TableTree/Components/TableCell.tsx +59 -0
- package/src/components/TableTree/Components/TableHead.tsx +39 -0
- package/src/components/TableTree/Components/TableRow.tsx +37 -0
- package/src/components/TableTree/TableTree.scss +8 -5
- package/src/components/TableTree/TableTree.tsx +16 -46
- package/src/components/TableTree/Utils/getAllChildIds.ts +12 -0
- package/src/components/TableTree/Utils/renderSpaces.ts +0 -0
- package/src/components/TableTree/types.ts +43 -5
- package/src/components/TableWithAccordion/TableWithAccordion.scss +54 -0
- package/src/components/TableWithAccordion/TableWithAccordion.stories.tsx +94 -0
- package/src/components/TableWithAccordion/TableWithAccordion.tsx +174 -0
- package/src/components/TableWithAccordion/data.ts +37 -0
- package/src/components/TableWithAccordion/index.ts +1 -0
- package/src/components/TableWithAccordion/types.ts +70 -0
- package/src/components/Tabs/Tabs.scss +58 -5
- package/src/components/Tabs/Tabs.stories.tsx +31 -12
- package/src/components/Tabs/Tabs.tsx +27 -18
- package/src/components/Tabs/types.ts +1 -1
- package/src/components/TextArea/Textarea.stories.tsx +1 -1
- package/src/hooks/useFileDropzone.tsx +2 -1
- package/src/index.ts +18 -1
- package/src/utils/FormatString/FormatString.stories.tsx +58 -0
- package/src/utils/FormatString/FormatString.tsx +41 -0
- package/src/utils/checkDuplicates/CheckDuplicates.stories.tsx +40 -0
- package/src/utils/checkDuplicates/checkDuplicates.ts +13 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './Input.scss';
|
|
2
2
|
import { InputProps } from './types';
|
|
3
|
-
declare const Input: (
|
|
3
|
+
declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
4
|
export default Input;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
interface OptionClick {
|
|
2
3
|
/**
|
|
3
4
|
* The label displayed for the option.
|
|
4
5
|
* @type {string}
|
|
5
6
|
* @required
|
|
6
7
|
*/
|
|
7
|
-
label: string;
|
|
8
|
+
label: string | ReactNode;
|
|
8
9
|
/**
|
|
9
10
|
* The value(s) associated with the option, which can be a single string or an array of strings.
|
|
10
11
|
* @type {Array<string> | string}
|
|
@@ -20,7 +21,7 @@ interface OptionType extends OptionClick {
|
|
|
20
21
|
*/
|
|
21
22
|
icon?: string;
|
|
22
23
|
iconColor?: string;
|
|
23
|
-
name?: string;
|
|
24
|
+
name?: string | ReactNode;
|
|
24
25
|
/**
|
|
25
26
|
* Indicates whether the option is disabled.
|
|
26
27
|
* @type {boolean}
|
|
@@ -5,6 +5,8 @@ interface ModalDimensions {
|
|
|
5
5
|
borderRadius?: number;
|
|
6
6
|
zIndex?: number;
|
|
7
7
|
boxShadow?: string;
|
|
8
|
+
left?: number;
|
|
9
|
+
top?: number;
|
|
8
10
|
}
|
|
9
11
|
export interface MiniEditModalProps {
|
|
10
12
|
/**
|
|
@@ -94,6 +96,11 @@ export interface MiniEditModalProps {
|
|
|
94
96
|
boxShadow?: string;
|
|
95
97
|
};
|
|
96
98
|
arrowZIndex?: number;
|
|
99
|
+
arrowProperties?: {
|
|
100
|
+
left?: number;
|
|
101
|
+
top?: number;
|
|
102
|
+
size?: number;
|
|
103
|
+
};
|
|
97
104
|
overlay?: {
|
|
98
105
|
isOverlay?: boolean;
|
|
99
106
|
zIndexOverlay?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './MultiSelect.scss';
|
|
2
2
|
import { MultiSelectProps } from './MultiSelectTypes';
|
|
3
|
-
declare const MultiSelect: ({ options, type, selectedOptions, onChange, acceptNewOption, zIndex, label, onSearch, required, disabled, errorMessage, displayCount, placeholderForSearching, variant, onLabelPlusIconClick, onManageLabelsClick, className, highlightedMachine, onSelectButtonClick, labelAccessor, valueAccessor, withSelectButton, onEnter }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const MultiSelect: ({ options, type, selectedOptions, onChange, acceptNewOption, zIndex, label, onSearch, required, disabled, errorMessage, displayCount: initialDisplayCount, placeholderForSearching, variant, onLabelPlusIconClick, onManageLabelsClick, className, highlightedMachine, onSelectButtonClick, labelAccessor, valueAccessor, withSelectButton, onEnter, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default MultiSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PhoneInput';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface PhoneInputProps {
|
|
2
|
+
country: string;
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (phone: string) => void;
|
|
5
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
6
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
7
|
+
width?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
isValid: any;
|
|
10
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './Search.scss';
|
|
2
2
|
import { SearchProps } from './types';
|
|
3
|
-
declare const Search: ({ placeholder, onSearch, disabled, width, }: SearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const Search: ({ placeholder, onSearch, disabled, width, value, isExpand, onClose, onExpand, }: SearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default Search;
|
|
@@ -46,7 +46,7 @@ export interface TableProps {
|
|
|
46
46
|
/**
|
|
47
47
|
* Header type to have different background color
|
|
48
48
|
*/
|
|
49
|
-
headerType: 'default' | 'primary' | 'secondary';
|
|
49
|
+
headerType: 'default' | 'primary' | 'secondary' | 'tertiary';
|
|
50
50
|
/**
|
|
51
51
|
* withFixedHeader prop to have non-scrollable fixed table header
|
|
52
52
|
*/
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableBodyProps } from '../types';
|
|
3
|
+
declare const TableBody: React.MemoExoticComponent<({ flattenedTreeData, columnsData, selected, select, onRowClick, onToggleExpand, onCheckBoxChange, }: TableBodyProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
+
export default TableBody;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TableCellProps } from '../types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const TableCell: React.MemoExoticComponent<({ col, node, level, selected, select, onCheckBoxChange, onToggleExpand, }: TableCellProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
+
export default TableCell;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableRowProps } from '../types';
|
|
3
|
+
declare const TableRow: React.MemoExoticComponent<({ node, level, columnsData, selected, select, onRowClick, onToggleExpand, onCheckBoxChange, }: TableRowProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
+
export default TableRow;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare const getAllChildIds: (nodeId: string, data: any[]) => string[];
|
|
@@ -1,28 +1,61 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface TreeNode {
|
|
2
3
|
key: string;
|
|
3
4
|
[key: string]: any;
|
|
4
5
|
children?: TreeNode[];
|
|
5
6
|
expanded?: boolean;
|
|
6
7
|
}
|
|
8
|
+
declare type JSX = ReactNode | JSX.Element[] | string | null;
|
|
9
|
+
export interface TableCellProps {
|
|
10
|
+
col: any;
|
|
11
|
+
node: any;
|
|
12
|
+
level: number;
|
|
13
|
+
selected: string[];
|
|
14
|
+
select: string | null;
|
|
15
|
+
onCheckBoxChange: (type: string, node: any) => void;
|
|
16
|
+
onToggleExpand: (node: any) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface TableHeadProps {
|
|
19
|
+
columnsData: any[];
|
|
20
|
+
}
|
|
21
|
+
export interface TableBodyProps {
|
|
22
|
+
flattenedTreeData: any[];
|
|
23
|
+
columnsData: any[];
|
|
24
|
+
selected: string[];
|
|
25
|
+
select: string | null;
|
|
26
|
+
onRowClick: (e: any, node: any) => void;
|
|
27
|
+
onToggleExpand: (node: any) => void;
|
|
28
|
+
onCheckBoxChange: (type: string, node: any) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface TableRowProps {
|
|
31
|
+
node: any;
|
|
32
|
+
level: number;
|
|
33
|
+
columnsData: any[];
|
|
34
|
+
selected: string[];
|
|
35
|
+
select: string | null;
|
|
36
|
+
onRowClick: (e: any, node: any) => void;
|
|
37
|
+
onToggleExpand: (node: any) => void;
|
|
38
|
+
onCheckBoxChange: (type: string, node: any) => void;
|
|
39
|
+
}
|
|
7
40
|
export interface Column {
|
|
8
41
|
name: string;
|
|
9
42
|
accessor: string;
|
|
10
43
|
width: string;
|
|
11
44
|
isClickable?: boolean;
|
|
12
|
-
cell?: (row: any) => JSX
|
|
13
|
-
actions?: (row: any) => JSX
|
|
45
|
+
cell?: (row: any) => JSX;
|
|
46
|
+
actions?: (row: any) => JSX;
|
|
14
47
|
isTree?: boolean;
|
|
15
48
|
defaultValue?: string;
|
|
16
|
-
defaultActions?: () => JSX
|
|
49
|
+
defaultActions?: () => JSX;
|
|
17
50
|
}
|
|
18
51
|
export interface TreeTableProps {
|
|
19
52
|
treeData: any;
|
|
20
53
|
columnsData: Column[];
|
|
21
54
|
selected?: string[];
|
|
22
55
|
select?: 'radio' | 'checkbox' | 'none';
|
|
23
|
-
onChange?: (
|
|
56
|
+
onChange?: (e: any, node: string[]) => void;
|
|
24
57
|
onClick?: (e: React.MouseEvent<HTMLDivElement>, row: TreeNode) => void;
|
|
25
|
-
expandedNodes: string[];
|
|
26
58
|
onExpand?: (_isExpanded: boolean, node: string) => void;
|
|
27
59
|
onPagination?: (_direction: string) => void;
|
|
28
60
|
}
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './TableWithAccordion.scss';
|
|
2
|
+
import '../../../index.scss';
|
|
3
|
+
import { TableProps } from './types';
|
|
4
|
+
declare const TableWithAccordion: ({ tableMeta, tableData, accordionType, noDataContent, height, withFixedHeader, headerType, TableAccordionStateIconWidth, TableAccordionStateIconHeight, }: TableProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default TableWithAccordion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TableWithAccordion';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface ColumnProps {
|
|
3
|
+
/**
|
|
4
|
+
* column name
|
|
5
|
+
*/
|
|
6
|
+
header: string;
|
|
7
|
+
/**
|
|
8
|
+
* data key for particular column
|
|
9
|
+
*/
|
|
10
|
+
accessor: string;
|
|
11
|
+
/**
|
|
12
|
+
* className for a column
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* width of a column
|
|
17
|
+
*/
|
|
18
|
+
width?: number;
|
|
19
|
+
/**
|
|
20
|
+
* data for the column
|
|
21
|
+
*/
|
|
22
|
+
cell?: (e: any) => JSX.Element | string | ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export interface DataProps {
|
|
25
|
+
/**
|
|
26
|
+
* data for each row
|
|
27
|
+
*/
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}
|
|
30
|
+
export interface TableProps {
|
|
31
|
+
/**
|
|
32
|
+
* Column details for table
|
|
33
|
+
*/
|
|
34
|
+
tableMeta: Array<ColumnProps>;
|
|
35
|
+
/**
|
|
36
|
+
* Data for table
|
|
37
|
+
*/
|
|
38
|
+
tableData: Array<DataProps>;
|
|
39
|
+
/**
|
|
40
|
+
* Table type
|
|
41
|
+
*/
|
|
42
|
+
accordionType: 'row' | 'column';
|
|
43
|
+
/**
|
|
44
|
+
* Specific sentence to be displayed data not found
|
|
45
|
+
*/
|
|
46
|
+
noDataContent?: string | ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* withFixedHeader prop to have non-scrollable fixed accordion table header
|
|
49
|
+
*/
|
|
50
|
+
withFixedHeader?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Height of the table in string
|
|
53
|
+
*/
|
|
54
|
+
height?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Header type to have different background color
|
|
57
|
+
*/
|
|
58
|
+
headerType: 'default' | 'primary' | 'secondary';
|
|
59
|
+
/**
|
|
60
|
+
* Accordion collapse and expand Icon width
|
|
61
|
+
*/
|
|
62
|
+
TableAccordionStateIconWidth: number;
|
|
63
|
+
/**
|
|
64
|
+
* Accordion collapse and expand Icon height
|
|
65
|
+
*/
|
|
66
|
+
TableAccordionStateIconHeight: number;
|
|
67
|
+
}
|