pixel-react 1.6.2 → 1.6.5

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.
Files changed (196) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
  3. package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
  4. package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
  5. package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
  6. package/lib/components/AttachImage/AttachImage.d.ts +1 -6
  7. package/lib/components/AttachImage/types.d.ts +8 -0
  8. package/lib/components/Avatar/types.d.ts +9 -1
  9. package/lib/components/CreateVariable/CreateVariableSlider.d.ts +5 -0
  10. package/lib/components/CreateVariable/index.d.ts +1 -0
  11. package/lib/components/CreateVariable/types.d.ts +56 -0
  12. package/lib/components/Drawer/Types.d.ts +13 -0
  13. package/lib/components/IconButton/types.d.ts +1 -0
  14. package/lib/components/MiniModal/types.d.ts +7 -0
  15. package/lib/components/Select/components/types.d.ts +1 -0
  16. package/lib/components/Select/types.d.ts +2 -0
  17. package/lib/components/TableTree/Components/TableBody.d.ts +4 -0
  18. package/lib/components/TableTree/Components/TableCell.d.ts +4 -0
  19. package/lib/components/TableTree/Components/TableHead.d.ts +4 -0
  20. package/lib/components/TableTree/Components/TableRow.d.ts +4 -0
  21. package/lib/components/TableTree/TableTree copy.d.ts +25 -0
  22. package/lib/components/TableTree/Utils/getAllChildIds.d.ts +1 -0
  23. package/lib/components/TableTree/types.d.ts +38 -5
  24. package/lib/index.d.ts +117 -7
  25. package/lib/index.esm.js +594 -324
  26. package/lib/index.esm.js.map +1 -1
  27. package/lib/index.js +594 -323
  28. package/lib/index.js.map +1 -1
  29. package/lib/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +1 -1
  31. package/src/assets/icons/authorization_icon.svg +1 -0
  32. package/src/assets/icons/backward.svg +10 -0
  33. package/src/assets/icons/capture_icon.svg +6 -0
  34. package/src/assets/icons/download_file_icon.svg +2 -9
  35. package/src/assets/icons/forward.svg +3 -0
  36. package/src/assets/icons/project_status_icon.svg +10 -0
  37. package/src/assets/icons/refresh_icon.svg +4 -0
  38. package/src/assets/icons/rotate_icon.svg +10 -0
  39. package/src/assets/icons/swipe_icon.svg +9 -0
  40. package/src/assets/icons/tap_icon.svg +4 -0
  41. package/src/components/AttachImage/AttachImage.stories.tsx +2 -0
  42. package/src/components/AttachImage/AttachImage.tsx +5 -9
  43. package/src/components/AttachImage/types.ts +25 -18
  44. package/src/components/Avatar/Avatar.scss +4 -0
  45. package/src/components/Avatar/Avatar.stories.tsx +38 -18
  46. package/src/components/Avatar/Avatar.tsx +19 -3
  47. package/src/components/Avatar/types.ts +9 -1
  48. package/src/components/Charts/DonutChart/DonutChart.tsx +8 -3
  49. package/src/components/Charts/RadialChart/RadialChart.scss +4 -0
  50. package/src/components/Charts/RadialChart/RadialChart.tsx +51 -45
  51. package/src/components/CreateVariable/CreateVariableSlider.scss +18 -0
  52. package/src/components/CreateVariable/CreateVariableSlider.stories.tsx +66 -0
  53. package/src/components/CreateVariable/CreateVariableSlider.tsx +95 -0
  54. package/src/components/CreateVariable/index.ts +1 -0
  55. package/src/components/CreateVariable/types.ts +58 -0
  56. package/src/components/Drawer/Drawer.scss +1 -1
  57. package/src/components/Drawer/Drawer.stories.tsx +0 -1
  58. package/src/components/Drawer/Drawer.tsx +4 -1
  59. package/src/components/Drawer/Types.ts +13 -0
  60. package/src/components/FileDropzone/FileDropzone.scss +0 -1
  61. package/src/components/Icon/iconList.ts +16 -0
  62. package/src/components/IconButton/IconButton.scss +11 -11
  63. package/src/components/IconButton/IconButton.tsx +2 -1
  64. package/src/components/IconButton/types.ts +1 -0
  65. package/src/components/MiniModal/MiniModal.scss +0 -4
  66. package/src/components/MiniModal/MiniModal.stories.tsx +3 -2
  67. package/src/components/MiniModal/MiniModal.tsx +28 -10
  68. package/src/components/MiniModal/types.ts +7 -0
  69. package/src/components/Select/Select.scss +20 -0
  70. package/src/components/Select/Select.stories.tsx +50 -1
  71. package/src/components/Select/Select.tsx +34 -7
  72. package/src/components/Select/components/Dropdown.scss +9 -0
  73. package/src/components/Select/components/Dropdown.tsx +20 -6
  74. package/src/components/Select/components/types.ts +1 -0
  75. package/src/components/Select/types.ts +12 -2
  76. package/src/components/TableTree/Components/TableBody.tsx +35 -0
  77. package/src/components/TableTree/Components/TableCell.tsx +59 -0
  78. package/src/components/TableTree/Components/TableHead.tsx +39 -0
  79. package/src/components/TableTree/Components/TableRow.tsx +37 -0
  80. package/src/components/TableTree/TableTree.scss +8 -5
  81. package/src/components/TableTree/TableTree.tsx +16 -46
  82. package/src/components/TableTree/Utils/getAllChildIds.ts +12 -0
  83. package/src/components/TableTree/Utils/renderSpaces.ts +0 -0
  84. package/src/components/TableTree/types.ts +43 -5
  85. package/src/index.ts +2 -0
  86. package/lib/StyleGuide/ColorPalette/ColorPalette.stories.d.ts +0 -6
  87. package/lib/StyleGuide/Typography/Typography.stories.d.ts +0 -6
  88. package/lib/components/Accordion/Accordion.stories.d.ts +0 -6
  89. package/lib/components/AddResourceButton/AddButton.stories.d.ts +0 -8
  90. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +0 -7
  91. package/lib/components/AppHeader/AppHeader.stories.d.ts +0 -7
  92. package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +0 -9
  93. package/lib/components/Avatar/Avatar.stories.d.ts +0 -10
  94. package/lib/components/Button/Button.stories.d.ts +0 -13
  95. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +0 -7
  96. package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +0 -6
  97. package/lib/components/Charts/PieChart/PieChart.stories.d.ts +0 -7
  98. package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +0 -6
  99. package/lib/components/Checkbox/Checkbox.stories.d.ts +0 -8
  100. package/lib/components/Chip/Chip.stories.d.ts +0 -14
  101. package/lib/components/DatePicker/DatePicker.stories.d.ts +0 -9
  102. package/lib/components/DragAndDrop/DragAndDrop.stories.d.ts +0 -6
  103. package/lib/components/Drawer/Drawer.stories.d.ts +0 -12
  104. package/lib/components/ExcelFile/ColorBarselector/ColorBarSelector.d.ts +0 -8
  105. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +0 -7
  106. package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +0 -4
  107. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +0 -5
  108. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +0 -3
  109. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +0 -5
  110. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +0 -5
  111. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +0 -8
  112. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +0 -10
  113. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +0 -3
  114. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +0 -3
  115. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +0 -5
  116. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +0 -3
  117. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +0 -80
  118. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +0 -3
  119. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +0 -174
  120. package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +0 -1
  121. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +0 -8
  122. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +0 -22
  123. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +0 -17
  124. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +0 -2
  125. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +0 -21
  126. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +0 -3
  127. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +0 -24
  128. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +0 -13
  129. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +0 -67
  130. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +0 -22
  131. package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +0 -11
  132. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +0 -27
  133. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +0 -95
  134. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +0 -178
  135. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +0 -3
  136. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +0 -3
  137. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +0 -44
  138. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +0 -19
  139. package/lib/components/ExcelFile/ExcelFile.stories.d.ts +0 -6
  140. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -12
  141. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +0 -15
  142. package/lib/components/ExcelFile/Types.d.ts +0 -129
  143. package/lib/components/ExcelFile/index.d.ts +0 -1
  144. package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +0 -7
  145. package/lib/components/FF_Captcha/captcha.stories.d.ts +0 -8
  146. package/lib/components/FileDropzone/FileDropzone.stories.d.ts +0 -8
  147. package/lib/components/Form/Form.stories.d.ts +0 -7
  148. package/lib/components/GridLayout/GridLayout.stories.d.ts +0 -8
  149. package/lib/components/HighlightText/HighlightText.stories.d.ts +0 -6
  150. package/lib/components/Icon/Icon.stories.d.ts +0 -8
  151. package/lib/components/IconButton/IconButton.stories.d.ts +0 -7
  152. package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +0 -7
  153. package/lib/components/Input/Input.stories.d.ts +0 -9
  154. package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +0 -9
  155. package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +0 -11
  156. package/lib/components/LazyLoad/LazyLoad.stories.d.ts +0 -6
  157. package/lib/components/MachineInputField/MachineInputField.stories.d.ts +0 -6
  158. package/lib/components/MenuOption/MenuOption.stories.d.ts +0 -16
  159. package/lib/components/MiniModal/MiniModal.stories.d.ts +0 -10
  160. package/lib/components/Modal/Modal.stories.d.ts +0 -7
  161. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +0 -6
  162. package/lib/components/MultiSelect/MultiSelect.stories.d.ts +0 -10
  163. package/lib/components/NLPInput/NlpInput.stories.d.ts +0 -7
  164. package/lib/components/Paper/Paper.stories.d.ts +0 -11
  165. package/lib/components/RadioButton/RadioButton.stories.d.ts +0 -10
  166. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +0 -9
  167. package/lib/components/Search/Search.stories.d.ts +0 -6
  168. package/lib/components/Select/Select.stories.d.ts +0 -13
  169. package/lib/components/Select/components/Dropdown/Dropdown.d.ts +0 -4
  170. package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +0 -17
  171. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +0 -6
  172. package/lib/components/StateDropdown/StateDropdown.stories.d.ts +0 -10
  173. package/lib/components/StatusButton/StatusButton.stories.d.ts +0 -14
  174. package/lib/components/Table/Table.stories.d.ts +0 -13
  175. package/lib/components/TableTree/TableTree.stories.d.ts +0 -7
  176. package/lib/components/Tabs/Tabs.stories.d.ts +0 -9
  177. package/lib/components/TextArea/Textarea.stories.d.ts +0 -9
  178. package/lib/components/Toast/Toast.stories.d.ts +0 -6
  179. package/lib/components/Toastify/Toastify.stories.d.ts +0 -6
  180. package/lib/components/Toggle/Toggle.stories.d.ts +0 -12
  181. package/lib/components/Tooltip/Tooltip.stories.d.ts +0 -15
  182. package/lib/components/Typography/Typography.stories.d.ts +0 -10
  183. package/lib/components/VariableInput/VariableInput.stories.d.ts +0 -6
  184. package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +0 -6
  185. package/lib/utils/compareArrays/compareArrays.stories.d.ts +0 -6
  186. package/lib/utils/compareObjects/compareObjects.stories.d.ts +0 -6
  187. package/lib/utils/debounce/debounce.stories.d.ts +0 -6
  188. package/lib/utils/ffID/ffID.stories.d.ts +0 -6
  189. package/lib/utils/find/findAndInsert.d.ts +0 -7
  190. package/lib/utils/find/findAndInsert.stories.d.ts +0 -7
  191. package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +0 -7
  192. package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +0 -6
  193. package/lib/utils/getExtension/getExtension.stories.d.ts +0 -6
  194. package/lib/utils/throttle/throttle.stories.d.ts +0 -6
  195. package/lib/utils/truncateText/truncateText.stories.d.ts +0 -6
  196. /package/lib/components/{ExcelFile → Excel}/ContextMenu/ContextMenu.d.ts +0 -0
@@ -4,7 +4,13 @@ import { prepareData } from '../../utils/TableCell/TableCell';
4
4
  import Arrow from '../../assets/icons/arrows_down_icon.svg?react';
5
5
  import Checkbox from '../Checkbox';
6
6
  import RadioButton from '../RadioButton';
7
- import { TreeTableProps } from './types';
7
+ import {
8
+ TableBodyProps,
9
+ TableCellProps,
10
+ TableHeadProps,
11
+ TableRowProps,
12
+ TreeTableProps,
13
+ } from './types';
8
14
 
9
15
  // Helper to render spaces for levels
10
16
  const renderSpaces = (level: number) =>
@@ -32,27 +38,17 @@ const TableCell = React.memo(
32
38
  col,
33
39
  node,
34
40
  level,
35
- isExpanded,
36
41
  selected,
37
42
  select,
38
43
  onCheckBoxChange,
39
44
  onToggleExpand,
40
- }: {
41
- col: any;
42
- node: any;
43
- level: number;
44
- isExpanded: boolean;
45
- selected: string[];
46
- select: string | null;
47
- onCheckBoxChange: (type: string, node: any) => void;
48
- onToggleExpand: (node: any) => void;
49
- }) => (
45
+ }: TableCellProps) => (
50
46
  <td>
51
47
  {col.isTree && renderSpaces(level + 1)}
52
48
  {col.isTree && (
53
49
  <span
54
50
  className={`tree-table-space-block last-block ${
55
- isExpanded ? 'tree-row-expanded' : 'tree-row-collapsed'
51
+ node.isExpanded ? 'tree-row-expanded' : 'tree-row-collapsed'
56
52
  } ${node.folder ? '' : 'no-folder'}`}
57
53
  onClick={() => onToggleExpand(node)}
58
54
  >
@@ -89,23 +85,12 @@ const TableRow = React.memo(
89
85
  node,
90
86
  level,
91
87
  columnsData,
92
- isExpanded,
93
88
  selected,
94
89
  select,
95
90
  onRowClick,
96
91
  onToggleExpand,
97
92
  onCheckBoxChange,
98
- }: {
99
- node: any;
100
- level: number;
101
- columnsData: any[];
102
- isExpanded: boolean;
103
- selected: string[];
104
- select: string | null;
105
- onRowClick: (e: any, node: any) => void;
106
- onToggleExpand: (node: any) => void;
107
- onCheckBoxChange: (type: string, node: any) => void;
108
- }) => (
93
+ }: TableRowProps) => (
109
94
  <tr
110
95
  data-level={level}
111
96
  className="show"
@@ -117,7 +102,6 @@ const TableRow = React.memo(
117
102
  col={col}
118
103
  node={node}
119
104
  level={level}
120
- isExpanded={isExpanded}
121
105
  selected={selected}
122
106
  select={select}
123
107
  onCheckBoxChange={onCheckBoxChange}
@@ -129,7 +113,7 @@ const TableRow = React.memo(
129
113
  );
130
114
 
131
115
  // Component: TableHead
132
- const TableHead = React.memo(({ columnsData }: { columnsData: any[] }) => {
116
+ const TableHead = React.memo(({ columnsData }: TableHeadProps) => {
133
117
  const hasDefaultValues = useMemo(
134
118
  () => columnsData.some(({ defaultValue }) => !!defaultValue),
135
119
  [columnsData]
@@ -169,32 +153,20 @@ const TableBody = React.memo(
169
153
  ({
170
154
  flattenedTreeData,
171
155
  columnsData,
172
- expandedNodes,
173
156
  selected,
174
157
  select,
175
158
  onRowClick,
176
159
  onToggleExpand,
177
160
  onCheckBoxChange,
178
- }: {
179
- flattenedTreeData: any[];
180
- columnsData: any[];
181
- expandedNodes: string[];
182
- selected: string[];
183
- select: string | null;
184
- onRowClick: (e: any, node: any) => void;
185
- onToggleExpand: (node: any) => void;
186
- onCheckBoxChange: (type: string, node: any) => void;
187
- }) => (
161
+ }: TableBodyProps) => (
188
162
  <tbody>
189
163
  {flattenedTreeData.map(({ node, level }) => {
190
- const isExpanded = expandedNodes.includes(node?.id);
191
164
  return (
192
165
  <TableRow
193
166
  key={node.id}
194
167
  node={node}
195
168
  level={level}
196
169
  columnsData={columnsData}
197
- isExpanded={isExpanded}
198
170
  selected={selected}
199
171
  select={select}
200
172
  onRowClick={onRowClick}
@@ -215,12 +187,11 @@ const TreeTable: React.FC<TreeTableProps> = ({
215
187
  select = null,
216
188
  onChange,
217
189
  onClick,
218
- expandedNodes = [],
219
190
  onExpand,
220
191
  }) => {
221
192
  const handleToggleExpand = useCallback(
222
- (node: any) => onExpand?.(!expandedNodes.includes(node?.id), node?.id),
223
- [expandedNodes, onExpand]
193
+ (node: any) => onExpand?.(true, node?.id),
194
+ [onExpand]
224
195
  );
225
196
 
226
197
  const handleCheckBoxChange = useCallback(
@@ -228,7 +199,7 @@ const TreeTable: React.FC<TreeTableProps> = ({
228
199
  const nodeId = node.id;
229
200
 
230
201
  if (type === 'radio') {
231
- onChange?.([nodeId]);
202
+ onChange?.('true', [nodeId]);
232
203
  } else {
233
204
  let updatedSelected = [...selected];
234
205
 
@@ -242,7 +213,7 @@ const TreeTable: React.FC<TreeTableProps> = ({
242
213
  );
243
214
  }
244
215
 
245
- onChange?.(updatedSelected);
216
+ onChange?.('true', updatedSelected);
246
217
  }
247
218
  },
248
219
  [selected, treeData, onChange]
@@ -260,7 +231,6 @@ const TreeTable: React.FC<TreeTableProps> = ({
260
231
  <TableBody
261
232
  flattenedTreeData={treeData}
262
233
  columnsData={columnsData}
263
- expandedNodes={expandedNodes}
264
234
  selected={selected}
265
235
  select={select}
266
236
  onRowClick={handleRowClick}
@@ -0,0 +1,12 @@
1
+ const getAllChildIds = (nodeId: string, data: any[]): string[] => {
2
+ let result = [nodeId];
3
+
4
+ // Traverse the tree and find children based on parentId
5
+ data.forEach(({ node }) => {
6
+ if (node.parentId === nodeId) {
7
+ result = result.concat(getAllChildIds(node.id, data)); // Add children recursively
8
+ }
9
+ });
10
+
11
+ return result;
12
+ };
File without changes
@@ -1,3 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+
1
3
  export interface TreeNode {
2
4
  key: string;
3
5
  [key: string]: any;
@@ -5,16 +7,53 @@ export interface TreeNode {
5
7
  expanded?: boolean;
6
8
  }
7
9
 
10
+ declare type JSX = ReactNode | JSX.Element[] | string | null;
11
+
12
+ export interface TableCellProps {
13
+ col: any;
14
+ node: any;
15
+ level: number;
16
+ selected: string[];
17
+ select: string | null;
18
+ onCheckBoxChange: (type: string, node: any) => void;
19
+ onToggleExpand: (node: any) => void;
20
+ }
21
+
22
+ export interface TableHeadProps {
23
+ columnsData: any[];
24
+ }
25
+
26
+ export interface TableBodyProps {
27
+ flattenedTreeData: any[];
28
+ columnsData: any[];
29
+ selected: string[];
30
+ select: string | null;
31
+ onRowClick: (e: any, node: any) => void;
32
+ onToggleExpand: (node: any) => void;
33
+ onCheckBoxChange: (type: string, node: any) => void;
34
+ }
35
+
36
+ export interface TableRowProps {
37
+ node: any;
38
+ level: number;
39
+ columnsData: any[];
40
+ selected: string[];
41
+ select: string | null;
42
+ onRowClick: (e: any, node: any) => void;
43
+ onToggleExpand: (node: any) => void;
44
+ onCheckBoxChange: (type: string, node: any) => void;
45
+ }
46
+
8
47
  export interface Column {
9
48
  name: string;
10
49
  accessor: string;
11
50
  width: string;
12
51
  isClickable?: boolean;
13
- cell?: (row: any) => JSX.Element | string | null;
14
- actions?: (row: any) => JSX.Element[];
52
+ cell?: (row: any) => JSX
53
+ actions?: (row: any) => JSX
15
54
  isTree?: boolean;
16
55
  defaultValue?: string;
17
- defaultActions?: () => JSX.Element[];
56
+ defaultActions?: () => JSX
18
57
  }
19
58
 
20
59
  export interface TreeTableProps {
@@ -22,9 +61,8 @@ export interface TreeTableProps {
22
61
  columnsData: Column[];
23
62
  selected?: string[];
24
63
  select?: 'radio' | 'checkbox' | 'none';
25
- onChange?: (nodes: string[]) => void;
64
+ onChange?: (e: any, node: string[]) => void;
26
65
  onClick?: (e: React.MouseEvent<HTMLDivElement>, row: TreeNode) => void;
27
- expandedNodes: string[];
28
66
  onExpand?: (_isExpanded: boolean, node: string) => void;
29
67
  onPagination?: (_direction: string) => void;
30
68
  }
package/src/index.ts CHANGED
@@ -68,6 +68,7 @@ import VariableDropdown from './components/Editor/VariableDropdown';
68
68
  import LineChart from './components/Charts/LineChart';
69
69
  import DownloadClient from './components/DownloadClient/DownloadClient';
70
70
  import FieldSet from './components/FieldSet';
71
+ import CreateVariableSlider from './components/CreateVariable/CreateVariableSlider';
71
72
  // Utils imports
72
73
  import { checkEmpty } from './utils/checkEmpty/checkEmpty';
73
74
  import {
@@ -168,6 +169,7 @@ export {
168
169
  DownloadClient,
169
170
  FieldSet,
170
171
  PopUpModal,
172
+ CreateVariableSlider,
171
173
 
172
174
  // utils exports
173
175
  checkEmpty,
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import StyleGuide from './ColorPalette';
3
- declare const meta: Meta<typeof StyleGuide>;
4
- type Story = StoryObj<typeof StyleGuide>;
5
- export declare const ColorList: Story;
6
- export default meta;
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Typography from './Typography';
3
- declare const meta: Meta<typeof Typography>;
4
- type Story = StoryObj<typeof Typography>;
5
- export declare const AllFonts: Story;
6
- export default meta;
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Accordion from './Accordion';
3
- declare const meta: Meta<typeof Accordion>;
4
- type Story = StoryObj<typeof Accordion>;
5
- export declare const SampleAccordion: Story;
6
- export default meta;
@@ -1,8 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import AddButton from './AddButton';
3
- declare const meta: Meta<typeof AddButton>;
4
- type Story = StoryObj<typeof AddButton>;
5
- export declare const Default: Story;
6
- export declare const TwoArrowsButtons: Story;
7
- export declare const ThreeArrowsButton: Story;
8
- export default meta;
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import AllProjectsDropdown from './AllProjectsDropdown';
3
- declare const meta: Meta<typeof AllProjectsDropdown>;
4
- type Story = StoryObj<typeof AllProjectsDropdown>;
5
- export declare const Default: Story;
6
- export declare const PrimaryIconButton: Story;
7
- export default meta;
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import AppHeader from './AppHeader';
3
- declare const meta: Meta<typeof AppHeader>;
4
- type Story = StoryObj<typeof AppHeader>;
5
- export declare const SampleAppHeader: Story;
6
- export declare const Controlled: Story;
7
- export default meta;
@@ -1,9 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import AttachmentButton from './AttachmentButton';
3
- declare const meta: Meta<typeof AttachmentButton>;
4
- type Story = StoryObj<typeof AttachmentButton>;
5
- export declare const Default: Story;
6
- export declare const SmallFileLimit: Story;
7
- export declare const LargeFileLimit: Story;
8
- export declare const DisabledUploader: Story;
9
- export default meta;
@@ -1,10 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import Avatar from './Avatar';
3
- declare const meta: Meta<typeof Avatar>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Small: Story;
7
- export declare const Medium: Story;
8
- export declare const Large: Story;
9
- export declare const CustomAvatarSize: Story;
10
- export declare const CustomIconSize: Story;
@@ -1,13 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Button from './Button';
3
- declare const meta: Meta<typeof Button>;
4
- type Story = StoryObj<typeof Button>;
5
- export declare const Primary: Story;
6
- export declare const Secondary: Story;
7
- export declare const Tertiary: Story;
8
- export declare const Delete: Story;
9
- export declare const Warning: Story;
10
- export declare const PrimaryWithIcon: Story;
11
- export declare const SecondaryWithIcon: Story;
12
- export declare const TertiaryWithIcon: Story;
13
- export default meta;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react/*';
2
- import DashboardDonutChart from './DashboardDonutChart';
3
- declare const meta: Meta<typeof DashboardDonutChart>;
4
- export default meta;
5
- type Story = StoryObj<typeof DashboardDonutChart>;
6
- export declare const Default: Story;
7
- export declare const MemoryLegend: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react/*';
2
- import DonutChart from './DonutChart';
3
- declare const meta: Meta<typeof DonutChart>;
4
- export default meta;
5
- type Story = StoryObj<typeof DonutChart>;
6
- export declare const Default: Story;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import PieChart from './PieChart';
3
- declare const meta: Meta<typeof PieChart>;
4
- export default meta;
5
- type Story = StoryObj<typeof PieChart>;
6
- export declare const PieChartDashBoard: Story;
7
- export declare const PieChartDashBoardWithBorder: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import RadialChart from './RadialChart';
3
- declare const meta: Meta<typeof RadialChart>;
4
- export default meta;
5
- type Story = StoryObj<typeof RadialChart>;
6
- export declare const ChartWithStatus: Story;
@@ -1,8 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import Checkbox from './Checkbox';
3
- declare const meta: Meta<typeof Checkbox>;
4
- export default meta;
5
- type Story = StoryObj<typeof meta>;
6
- export declare const Default: Story;
7
- export declare const Partial: Story;
8
- export declare const Controlled: Story;
@@ -1,14 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Chip from './Chip';
3
- import '../../assets/styles/_colors.scss';
4
- import './Chip.scss';
5
- declare const meta: Meta<typeof Chip>;
6
- type Story = StoryObj<typeof Chip>;
7
- export declare const Primary: Story;
8
- export declare const withoutExpand: Story;
9
- export declare const Group: Story;
10
- export declare const CustomChip: Story;
11
- export declare const Success: Story;
12
- export declare const Errors: Story;
13
- export declare const Warning: Story;
14
- export default meta;
@@ -1,9 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import CustomDatePicker from './DatePicker';
3
- declare const meta: Meta<typeof CustomDatePicker>;
4
- export default meta;
5
- type Story = StoryObj<typeof CustomDatePicker>;
6
- export declare const Default: Story;
7
- export declare const StartDateFilter: Story;
8
- export declare const EndDateInput: Story;
9
- export declare const ScheduleDateInput: Story;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import DragAndDropList from './DragAndDropList';
3
- declare const meta: Meta<typeof DragAndDropList>;
4
- type Story = StoryObj<typeof DragAndDropList>;
5
- export declare const Primary: Story;
6
- export default meta;
@@ -1,12 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Drawer from './Drawer';
3
- declare const meta: Meta<typeof Drawer>;
4
- export default meta;
5
- type Story = StoryObj<typeof Drawer>;
6
- export declare const Default: Story;
7
- export declare const WithoutHeader: Story;
8
- export declare const WithCustomHeader: Story;
9
- export declare const WithCustomFooter: Story;
10
- export declare const WithTertiaryButtons: Story;
11
- export declare const WithCustomZIndex: Story;
12
- export declare const Controlled: Story;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import './ColorBarSelector.scss';
3
- interface ColorBarSelectorProps {
4
- getColorValue: (color: string) => void;
5
- disabled: boolean;
6
- }
7
- declare const ColorBarSelector: React.FC<ColorBarSelectorProps>;
8
- export default ColorBarSelector;
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import * as Types from './types';
3
- type Props = {
4
- DataEditor: Types.DataEditorComponent;
5
- };
6
- declare const ActiveCell: React.FC<Props>;
7
- export default ActiveCell;
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import * as Types from './types';
3
- export declare const Cell: React.FC<Types.CellComponentProps>;
4
- export declare const enhance: (CellComponent: React.ComponentType<Types.CellComponentProps>) => React.FC<Omit<Types.CellComponentProps, "selected" | "active" | "copied" | "dragging" | "mode" | "data" | "select" | "activate" | "setCellDimensions">>;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import * as Types from './types';
3
- declare const ColumnIndicator: Types.ColumnIndicatorComponent;
4
- export default ColumnIndicator;
5
- export declare const enhance: (ColumnIndicatorComponent: Types.ColumnIndicatorComponent) => React.FC<Omit<Types.ColumnIndicatorProps, "selected" | "onSelect">>;
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- declare const Copied: React.FC;
3
- export default Copied;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import * as Types from './types';
3
- declare const CornerIndicator: Types.CornerIndicatorComponent;
4
- export default CornerIndicator;
5
- export declare const enhance: (CornerIndicatorComponent: Types.CornerIndicatorComponent) => React.FC<Omit<Types.CornerIndicatorProps, "selected" | "onSelect">>;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import * as Types from './types';
3
- /** The default Spreadsheet DataEditor component */
4
- declare const DataEditor: React.FC<Types.DataEditorProps>;
5
- export default DataEditor;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import * as Types from './types';
3
- export declare const TRUE_TEXT = "TRUE";
4
- export declare const FALSE_TEXT = "FALSE";
5
- /** The default Spreadsheet DataViewer component */
6
- declare const DataViewer: <Cell extends Types.CellBase<Value>, Value>({ cell, evaluatedCell, }: Types.DataViewerProps<Cell>) => React.ReactElement;
7
- export default DataViewer;
8
- export declare function convertBooleanToText(value: boolean): string;
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- import * as Types from './types';
3
- export type Props = {
4
- variant?: string;
5
- dimensions?: Types.Dimensions | null | undefined;
6
- hidden?: boolean;
7
- dragging?: boolean;
8
- };
9
- declare const FloatingRect: React.FC<Props>;
10
- export default FloatingRect;
@@ -1,3 +0,0 @@
1
- import * as Types from './types';
2
- declare const HeaderRow: Types.HeaderRowComponent;
3
- export default HeaderRow;
@@ -1,3 +0,0 @@
1
- import * as Types from './types';
2
- declare const Row: Types.RowComponent;
3
- export default Row;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import * as Types from './types';
3
- declare const RowIndicator: Types.RowIndicatorComponent;
4
- export default RowIndicator;
5
- export declare const enhance: (RowIndicatorComponent: Types.RowIndicatorComponent) => React.FC<Omit<Types.RowIndicatorProps, "selected" | "onSelect">>;
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- declare const Selected: React.FC;
3
- export default Selected;
@@ -1,80 +0,0 @@
1
- import * as React from 'react';
2
- import * as Types from './types';
3
- import * as Matrix from './matrix';
4
- import * as Point from './point';
5
- import { Selection } from './selection';
6
- import './Spreadsheet.scss';
7
- /** The Spreadsheet component props */
8
- export type Props<CellType extends Types.CellBase> = {
9
- /** The spreadsheet's data */
10
- data: Matrix.Matrix<CellType>;
11
- /** Class name to be added to the spreadsheet's root element */
12
- className?: string;
13
- /**
14
- * Use dark colors that complement dark mode
15
- * @defaultValue `false`
16
- */
17
- /**
18
- * Function used to create the formula parser (instance of
19
- * "fast-formula-parser") used by the Spreadsheet by getting the spreadsheet's
20
- * data.
21
- * @defaultValue function which creates a formula parser bound to the
22
- * Spreadsheet's data.
23
- * @see `createFormulaParser`
24
- * @see https://www.npmjs.com/package/fast-formula-parser
25
- */
26
- createFormulaParser?: Types.CreateFormulaParser;
27
- /**
28
- * Labels to use in column indicators.
29
- * @defaultValue alphabetical labels.
30
- */
31
- columnLabels?: string[];
32
- /**
33
- * Labels to use in row indicators.
34
- * @defaultValue row index labels.
35
- */
36
- rowLabels?: string[];
37
- /**
38
- * If set to true, hides the row indicators of the spreadsheet.
39
- * @defaultValue `false`.
40
- */
41
- hideRowIndicators?: boolean;
42
- /**
43
- * If set to true, hides the column indicators of the spreadsheet.
44
- * @defaultValue `false`.
45
- */
46
- hideColumnIndicators?: boolean;
47
- /** The selected cells in the worksheet. */
48
- selected?: Selection;
49
- /** Component rendered above each column. */
50
- ColumnIndicator?: Types.ColumnIndicatorComponent;
51
- /** Component rendered in the corner of row and column indicators. */
52
- CornerIndicator?: Types.CornerIndicatorComponent;
53
- /** Component rendered next to each row. */
54
- RowIndicator?: Types.RowIndicatorComponent;
55
- /** The Spreadsheet's table component. */
56
- Table?: Types.TableComponent;
57
- /** The Spreadsheet's row component. */
58
- Row?: Types.RowComponent;
59
- /** The spreadsheet's header row component */
60
- HeaderRow?: Types.HeaderRowComponent;
61
- /** The Spreadsheet's cell component. */
62
- Cell?: Types.CellComponent<CellType>;
63
- /** Component rendered for cells in view mode. */
64
- DataViewer?: Types.DataViewerComponent<CellType>;
65
- /** Component rendered for cells in edit mode. */
66
- DataEditor?: Types.DataEditorComponent<CellType>;
67
- /** Callback called on key down inside the spreadsheet. */
68
- onKeyDown?: (event: React.KeyboardEvent) => void;
69
- /** Callback called when the Spreadsheet's selection changes. */
70
- onSelect?: (selected: Selection) => void;
71
- /** Callback called when Spreadsheet's active cell changes. */
72
- onActivate?: (active: Point.Point) => void;
73
- /** Callback called when the Spreadsheet's evaluated data changes. */
74
- onEvaluatedDataChange?: (data: Matrix.Matrix<CellType>) => void;
75
- };
76
- /**
77
- * The Spreadsheet component
78
- */
79
- declare const Spreadsheet: <CellType extends Types.CellBase>(props: Props<CellType>) => React.ReactElement;
80
- export default Spreadsheet;
@@ -1,3 +0,0 @@
1
- import * as Types from './types';
2
- declare const Table: Types.TableComponent;
3
- export default Table;