pixel-react 1.4.0 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. package/lib/components/Select/types.d.ts +1 -0
  2. package/lib/index.d.ts +1 -0
  3. package/lib/index.esm.js +99 -81
  4. package/lib/index.esm.js.map +1 -1
  5. package/lib/index.js +99 -81
  6. package/lib/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/rollup.config.mjs +2 -9
  9. package/src/assets/icons/add_label_icon.svg +3 -0
  10. package/src/assets/icons/label_icon.svg +8 -0
  11. package/src/assets/styles/_fonts.scss +2 -32
  12. package/src/components/Icon/iconList.ts +4 -0
  13. package/src/components/Select/Select.tsx +2 -0
  14. package/src/components/Select/types.ts +5 -0
  15. package/src/components/StateDropdown/StateDropdown.tsx +18 -6
  16. package/src/components/Typography/Typography.scss +2 -32
  17. package/lib/StyleGuide/ColorPalette/ColorPalette.stories.d.ts +0 -6
  18. package/lib/StyleGuide/Typography/Typography.stories.d.ts +0 -6
  19. package/lib/components/Accordion/Accordion.stories.d.ts +0 -6
  20. package/lib/components/AddButton/AddButton.d.ts +0 -5
  21. package/lib/components/AddButton/AddButton.stories.d.ts +0 -6
  22. package/lib/components/AddButton/index.d.ts +0 -1
  23. package/lib/components/AddButton/types.d.ts +0 -4
  24. package/lib/components/AddResourceButton/AddButton.stories.d.ts +0 -8
  25. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +0 -7
  26. package/lib/components/AppHeader/AppHeader.stories.d.ts +0 -7
  27. package/lib/components/AttachImage/AttachImage.stories.d.ts +0 -7
  28. package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +0 -9
  29. package/lib/components/Avatar/Avatar.stories.d.ts +0 -10
  30. package/lib/components/Button/Button.stories.d.ts +0 -13
  31. package/lib/components/Charts/BarChart/BarChart.stories.d.ts +0 -6
  32. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +0 -7
  33. package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +0 -6
  34. package/lib/components/Charts/IconRadialChart/IconRadialChart.stories.d.ts +0 -8
  35. package/lib/components/Charts/LineChart/LineChart.stories.d.ts +0 -7
  36. package/lib/components/Charts/MultiRadialChart/MultiRadialChart.stories.d.ts +0 -8
  37. package/lib/components/Charts/PieChart/PieChart.stories.d.ts +0 -7
  38. package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +0 -6
  39. package/lib/components/Checkbox/Checkbox.stories.d.ts +0 -8
  40. package/lib/components/Chip/Chip.stories.d.ts +0 -14
  41. package/lib/components/ConnectingBranch/ConnectingBranch.stories.d.ts +0 -6
  42. package/lib/components/DatePicker/DatePicker.stories.d.ts +0 -9
  43. package/lib/components/DragAndDrop/DragAndDrop.stories.d.ts +0 -6
  44. package/lib/components/Drawer/Drawer.stories.d.ts +0 -12
  45. package/lib/components/EditTextField/EditTextField.stories.d.ts +0 -10
  46. package/lib/components/Editor/Editor.stories.d.ts +0 -6
  47. package/lib/components/Excel/ExcelFile.stories.d.ts +0 -6
  48. package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +0 -14
  49. package/lib/components/ExcelFile/ColorBarSelector/ColorBarSelector.d.ts +0 -8
  50. package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +0 -4
  51. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +0 -7
  52. package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +0 -4
  53. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +0 -5
  54. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +0 -3
  55. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +0 -5
  56. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +0 -5
  57. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +0 -8
  58. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +0 -10
  59. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +0 -3
  60. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +0 -3
  61. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +0 -5
  62. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +0 -3
  63. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +0 -80
  64. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +0 -3
  65. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +0 -174
  66. package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +0 -1
  67. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +0 -8
  68. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +0 -22
  69. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +0 -17
  70. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +0 -2
  71. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +0 -21
  72. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +0 -3
  73. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +0 -24
  74. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +0 -13
  75. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +0 -67
  76. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +0 -22
  77. package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +0 -11
  78. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +0 -27
  79. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +0 -95
  80. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +0 -178
  81. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +0 -3
  82. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +0 -3
  83. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +0 -44
  84. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +0 -19
  85. package/lib/components/ExcelFile/ExcelFile.stories.d.ts +0 -6
  86. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -12
  87. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +0 -15
  88. package/lib/components/ExcelFile/ImportExcelStyles.d.ts +0 -24
  89. package/lib/components/ExcelFile/Types.d.ts +0 -129
  90. package/lib/components/ExcelFile/index.d.ts +0 -1
  91. package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +0 -7
  92. package/lib/components/FF_Captcha/captcha.stories.d.ts +0 -8
  93. package/lib/components/FileDropzone/FileDropzone.stories.d.ts +0 -8
  94. package/lib/components/Form/Form.stories.d.ts +0 -7
  95. package/lib/components/GridLayout/GridLayout.stories.d.ts +0 -8
  96. package/lib/components/HighlightText/HighlightText.stories.d.ts +0 -6
  97. package/lib/components/Icon/Icon.stories.d.ts +0 -8
  98. package/lib/components/IconButton/IconButton.stories.d.ts +0 -7
  99. package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +0 -7
  100. package/lib/components/Input/Input.stories.d.ts +0 -9
  101. package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +0 -9
  102. package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +0 -13
  103. package/lib/components/LazyLoad/LazyLoad.stories.d.ts +0 -6
  104. package/lib/components/MachineInputField/MachineInputField.stories.d.ts +0 -6
  105. package/lib/components/MenuOption/MenuOption.stories.d.ts +0 -16
  106. package/lib/components/MiniModal/MiniModal.stories.d.ts +0 -10
  107. package/lib/components/Modal/Modal.stories.d.ts +0 -7
  108. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +0 -6
  109. package/lib/components/MultiSelect/MultiSelect.stories.d.ts +0 -11
  110. package/lib/components/NLPInput/NlpInput.stories.d.ts +0 -7
  111. package/lib/components/Paper/Paper.stories.d.ts +0 -11
  112. package/lib/components/RadioButton/RadioButton.stories.d.ts +0 -10
  113. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +0 -9
  114. package/lib/components/Search/Search.stories.d.ts +0 -6
  115. package/lib/components/Select/Select.stories.d.ts +0 -14
  116. package/lib/components/Select/components/Dropdown/Dropdown.d.ts +0 -4
  117. package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +0 -17
  118. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +0 -6
  119. package/lib/components/StateDropdown/StateDropdown.stories.d.ts +0 -10
  120. package/lib/components/StatusButton/StatusButton.stories.d.ts +0 -14
  121. package/lib/components/StatusCard/StatusCard.stories.d.ts +0 -11
  122. package/lib/components/Table/Table.stories.d.ts +0 -13
  123. package/lib/components/TableTree/TableTree.stories.d.ts +0 -7
  124. package/lib/components/Tabs/Tabs.stories.d.ts +0 -9
  125. package/lib/components/TextArea/Textarea.stories.d.ts +0 -9
  126. package/lib/components/Toast/Toast.stories.d.ts +0 -6
  127. package/lib/components/Toastify/Toastify.stories.d.ts +0 -6
  128. package/lib/components/Toggle/Toggle.stories.d.ts +0 -12
  129. package/lib/components/Tooltip/Tooltip.stories.d.ts +0 -15
  130. package/lib/components/Typography/Typography.stories.d.ts +0 -10
  131. package/lib/components/VariableInput/VariableInput.stories.d.ts +0 -6
  132. package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +0 -6
  133. package/lib/utils/compareArrays/compareArrays.stories.d.ts +0 -6
  134. package/lib/utils/compareObjects/compareObjects.stories.d.ts +0 -6
  135. package/lib/utils/debounce/debounce.stories.d.ts +0 -6
  136. package/lib/utils/ffID/ffID.stories.d.ts +0 -6
  137. package/lib/utils/find/findAndInsert.d.ts +0 -7
  138. package/lib/utils/find/findAndInsert.stories.d.ts +0 -7
  139. package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +0 -7
  140. package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +0 -6
  141. package/lib/utils/getExtension/getExtension.stories.d.ts +0 -6
  142. package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +0 -10
  143. package/lib/utils/throttle/throttle.stories.d.ts +0 -6
  144. package/lib/utils/truncateText/truncateText.stories.d.ts +0 -6
@@ -1,95 +0,0 @@
1
- import { PointRange } from './point-range';
2
- import * as Point from './point';
3
- import * as Matrix from './matrix';
4
- /** Selection from a spreadsheet */
5
- export declare abstract class Selection {
6
- /** Get concrete range of the selection in the given data */
7
- abstract toRange(data: Matrix.Matrix<unknown>): PointRange | null;
8
- /** Normalize the selection according to the given data */
9
- abstract normalizeTo(data: Matrix.Matrix<unknown>): this;
10
- /** Determines whether the given row is entirely selected in given selection */
11
- abstract hasEntireRow(row: number): boolean;
12
- /** Determines whether the given column is entirely selected in given selection */
13
- abstract hasEntireColumn(column: number): boolean;
14
- /** Get the number of selected points according to given data */
15
- abstract size(data: Matrix.Matrix<unknown>): number;
16
- /** Determines whether the given point is within the selection */
17
- abstract has(data: Matrix.Matrix<unknown>, point: Point.Point): boolean;
18
- /** Determines whether the given selection is equal to this selection */
19
- abstract equals(selection: Selection): boolean;
20
- }
21
- /** Selection of no cells */
22
- export declare class EmptySelection extends Selection {
23
- toRange(data: Matrix.Matrix<unknown>): PointRange | null;
24
- normalizeTo(_: Matrix.Matrix<unknown>): this;
25
- hasEntireRow(): boolean;
26
- hasEntireColumn(): boolean;
27
- size(): number;
28
- has(): boolean;
29
- equals(selection: Selection): boolean;
30
- }
31
- /** Selection of a range of cells */
32
- export declare class RangeSelection extends Selection {
33
- range: PointRange;
34
- constructor(range: PointRange);
35
- toRange(_: Matrix.Matrix<unknown>): PointRange | null;
36
- normalizeTo(data: Matrix.Matrix<unknown>): this;
37
- hasEntireRow(): boolean;
38
- hasEntireColumn(): boolean;
39
- size(data: Matrix.Matrix<unknown>): number;
40
- has(data: Matrix.Matrix<unknown>, point: Point.Point): boolean;
41
- equals(selection: Selection): boolean;
42
- }
43
- /** Selection of an entire part of the spreadsheet */
44
- export declare abstract class EntireSelection extends Selection {
45
- }
46
- /** Selection of the entire worksheet */
47
- export declare class EntireWorksheetSelection extends EntireSelection {
48
- toRange(data: Matrix.Matrix<unknown>): PointRange;
49
- normalizeTo(): this;
50
- hasEntireColumn(): boolean;
51
- hasEntireRow(): boolean;
52
- size(data: Matrix.Matrix<unknown>): number;
53
- has(): boolean;
54
- equals(selection: Selection): boolean;
55
- }
56
- /** Selection of an entire axis in the spreadsheet */
57
- export declare abstract class EntireAxisSelection extends EntireSelection {
58
- /** Selection start index, integer */
59
- readonly start: number;
60
- /** Selection end index, integer */
61
- readonly end: number;
62
- /**
63
- * @param start - row index where the selection starts, integer
64
- * @param end - row index where the selection ends, integer
65
- * @throws {@link InvalidIndexError}
66
- */
67
- constructor(start: number, end: number);
68
- equals(selection: Selection): boolean;
69
- }
70
- /** Selection of entire rows in the spreadsheet */
71
- export declare class EntireRowsSelection extends EntireAxisSelection {
72
- toRange(data: Matrix.Matrix<unknown>): PointRange;
73
- normalizeTo(data: Matrix.Matrix<unknown>): this;
74
- hasEntireRow(row: number): boolean;
75
- hasEntireColumn(): boolean;
76
- size(data: Matrix.Matrix<unknown>): number;
77
- has(_: Matrix.Matrix<unknown>, point: Point.Point): boolean;
78
- }
79
- /** Selection of entire columns in the spreadsheet */
80
- export declare class EntireColumnsSelection extends EntireAxisSelection {
81
- toRange(data: Matrix.Matrix<unknown>): PointRange;
82
- normalizeTo(data: Matrix.Matrix<unknown>): this;
83
- hasEntireRow(): boolean;
84
- hasEntireColumn(column: number): boolean;
85
- size(data: Matrix.Matrix<unknown>): number;
86
- has(_: Matrix.Matrix<unknown>, point: Point.Point): boolean;
87
- }
88
- /** Get the point range of given matrix */
89
- export declare function getMatrixRange(data: Matrix.Matrix<unknown>): PointRange;
90
- /** Determines whether the given value is a valid index */
91
- export declare function isIndex(value: number): boolean;
92
- /** Error thrown when passing a non-index value where an index value is expected */
93
- export declare class InvalidIndexError extends Error {
94
- constructor(name: string);
95
- }
@@ -1,178 +0,0 @@
1
- import * as React from 'react';
2
- import FormulaParser from 'fast-formula-parser';
3
- import { Point } from './point';
4
- import { Selection } from './selection';
5
- import { Model } from './engine';
6
- import { PointRange } from './point-range';
7
- import { Matrix } from './matrix';
8
- /** The base type of cell data in Spreadsheet */
9
- export type CellBase<Value = any> = {
10
- /** Whether the cell should not be editable */
11
- readOnly?: boolean;
12
- /** Class to be given for the cell element */
13
- className?: string;
14
- /** The value of the cell */
15
- value: Value;
16
- style?: React.CSSProperties | undefined;
17
- type?: boolean;
18
- /** Custom component to render when the cell is edited, if not defined would default to the component defined for the Spreadsheet */
19
- DataEditor?: DataEditorComponent<CellBase<Value>>;
20
- /** Custom component to render when the cell is viewed, if not defined would default to the component defined for the Spreadsheet */
21
- DataViewer?: DataViewerComponent<CellBase<Value>>;
22
- };
23
- /**
24
- * A cell with it's coordinates
25
- * @deprecated the component does not use cell descriptors anymore. Instead it passes cell point and cell value explicitly.
26
- */
27
- export type CellDescriptor<Cell extends CellBase> = {
28
- /** The cell's data */
29
- data: Cell | undefined;
30
- } & Point;
31
- /** The spreadsheet's write mode */
32
- export type Mode = 'view' | 'edit';
33
- /** Dimensions of an element */
34
- export type Dimensions = {
35
- /** The element's width in pixels */
36
- width: number;
37
- /** The element's height in pixels */
38
- height: number;
39
- /** The distance of the element from it's container top border in pixels */
40
- top: number;
41
- /** The distance of the element from it's container left border in pixels */
42
- left: number;
43
- };
44
- export type StoreState<Cell extends CellBase = CellBase> = {
45
- model: Model<Cell>;
46
- selected: Selection;
47
- copied: PointRange | null;
48
- hasPasted: boolean;
49
- cut: boolean;
50
- active: Point | null;
51
- mode: Mode;
52
- rowDimensions: Record<number, Pick<Dimensions, 'height' | 'top'> | undefined>;
53
- columnDimensions: Record<number, Pick<Dimensions, 'width' | 'left'> | undefined>;
54
- dragging: boolean;
55
- lastChanged: Point | null;
56
- lastCommit: null | CellChange<Cell>[];
57
- };
58
- export type CellChange<Cell extends CellBase = CellBase> = {
59
- prevCell: Cell | null;
60
- nextCell: Cell | null;
61
- };
62
- /** Type of Spreadsheet Cell component props */
63
- export type CellComponentProps<Cell extends CellBase = CellBase> = {
64
- /** The row of the cell */
65
- row: number;
66
- /** The column of the cell */
67
- column: number;
68
- /** The DataViewer component to be used by the cell */
69
- DataViewer: DataViewerComponent<Cell>;
70
- /** Whether the cell is selected */
71
- selected: boolean;
72
- /** Whether the cell is active */
73
- active: boolean;
74
- /** Whether the cell is copied */
75
- copied: boolean;
76
- /** Whether the user is dragging */
77
- dragging: boolean;
78
- /** The mode of the cell */
79
- mode: Mode;
80
- /** The data of the cell */
81
- data: Cell | undefined;
82
- /** The evaluated data of the cell */
83
- evaluatedData: Cell | undefined;
84
- /** Select the cell at the given point */
85
- select: (point: Point) => void;
86
- /** Activate the cell at the given point */
87
- activate: (point: Point) => void;
88
- /** Set the dimensions of the cell at the given point with the given dimensions */
89
- setCellDimensions: (point: Point, dimensions: Dimensions) => void;
90
- /** Set data of the cell */
91
- setCellData: (cell: Cell) => void;
92
- };
93
- /** Type of the Spreadsheet Cell component */
94
- export type CellComponent<Cell extends CellBase = CellBase> = React.ComponentType<CellComponentProps<Cell>>;
95
- type DataComponentProps<Cell extends CellBase> = {
96
- /** The rendered cell by the component */
97
- cell: Cell | undefined;
98
- } & Point;
99
- /** Type of the Spreadsheet DataViewer component props */
100
- export type DataViewerProps<Cell extends CellBase = CellBase> = DataComponentProps<Cell> & {
101
- /** Set data of the cell */
102
- setCellData: (cell: Cell) => void;
103
- evaluatedCell: Cell | undefined;
104
- };
105
- /** Type of the Spreadsheet DataViewer component */
106
- export type DataViewerComponent<Cell extends CellBase = CellBase> = React.ComponentType<DataViewerProps<Cell>>;
107
- /** Type of the Spreadsheet DataEditor component props */
108
- export type DataEditorProps<Cell extends CellBase = CellBase> = DataComponentProps<Cell> & {
109
- /** Callback to be called when the cell's value is changed */
110
- onChange: (cell: Cell) => void;
111
- /** Callback to be called when edit mode should be exited */
112
- exitEditMode: () => void;
113
- };
114
- /** Type of the Spreadsheet DataEditor component */
115
- export type DataEditorComponent<Cell extends CellBase = CellBase> = React.ComponentType<DataEditorProps<Cell>>;
116
- /** Type of the Spreadsheet Table component props */
117
- export type TableProps = React.PropsWithChildren<{
118
- /** Number of columns the table should render */
119
- columns: number;
120
- /** Whether column indicators are hidden */
121
- hideColumnIndicators?: boolean | null;
122
- }>;
123
- /** Type of the Spreadsheet Table component */
124
- export type TableComponent = React.ComponentType<TableProps>;
125
- /** Type of the Spreadsheet Row component props */
126
- export type RowProps = React.PropsWithChildren<{
127
- /** The row index of the table */
128
- row: number;
129
- }>;
130
- /** Type of the Row component */
131
- export type RowComponent = React.ComponentType<RowProps>;
132
- /** Type of the Spreadsheet HeaderRow component props */
133
- export type HeaderRowProps = React.PropsWithChildren<{}>;
134
- /** Type of the HeaderRow component */
135
- export type HeaderRowComponent = React.ComponentType<HeaderRowProps>;
136
- /** Type of the Spreadsheet RowIndicator component props */
137
- export type RowIndicatorProps = {
138
- /** The row the indicator indicates */
139
- row: number;
140
- /** A custom label for the indicator as provided in rowLabels */
141
- label?: React.ReactNode | null;
142
- /** Whether the entire row is selected */
143
- selected: boolean;
144
- /** Callback to be called when the row is selected */
145
- onSelect: (row: number, extend: boolean) => void;
146
- };
147
- /** Type of the RowIndicator component */
148
- export type RowIndicatorComponent = React.ComponentType<RowIndicatorProps>;
149
- /** Type of the Spreadsheet ColumnIndicator component props */
150
- export type ColumnIndicatorProps = {
151
- /** The column the indicator indicates */
152
- column: number;
153
- /** A custom label for the indicator as provided in columnLabels */
154
- label?: React.ReactNode | null;
155
- /** Whether the entire column in selected */
156
- selected: boolean;
157
- /** Whether the entire column in Fixed */
158
- fixed?: boolean;
159
- /** Callback to be called when the column is selected */
160
- onSelect: (column: number, extend: boolean) => void;
161
- };
162
- /** Type of the ColumnIndicator component */
163
- export type ColumnIndicatorComponent = React.ComponentType<ColumnIndicatorProps>;
164
- /** Type of the Spreadsheet CornerIndicator component props */
165
- export type CornerIndicatorProps = {
166
- /** Whether the entire table is selected */
167
- selected: boolean;
168
- /** Callback to select the entire table */
169
- onSelect: () => void;
170
- };
171
- /** Type of the CornerIndicator component */
172
- export type CornerIndicatorComponent = React.ComponentType<CornerIndicatorProps>;
173
- export type CommitChanges<Cell extends CellBase = CellBase> = Array<{
174
- prevCell: Cell | null;
175
- nextCell: Cell | null;
176
- }>;
177
- export type CreateFormulaParser = (data: Matrix<CellBase>) => FormulaParser;
178
- export {};
@@ -1,3 +0,0 @@
1
- import { Dispatch } from './context';
2
- declare function useDispatch(): Dispatch;
3
- export default useDispatch;
@@ -1,3 +0,0 @@
1
- import * as Types from './types';
2
- declare function useSelector<T>(selector: (state: Types.StoreState) => T): T;
3
- export default useSelector;
@@ -1,44 +0,0 @@
1
- import * as Types from './types';
2
- import * as Matrix from './matrix';
3
- import * as Point from './point';
4
- import { PointRange } from './point-range';
5
- import { Selection } from './selection';
6
- export { createEmpty as createEmptyMatrix } from './matrix';
7
- export declare const PLAIN_TEXT_MIME = "text/plain";
8
- export declare const FOCUS_WITHIN_SELECTOR = ":focus-within";
9
- /** Move the cursor of given input element to the input's end */
10
- export declare function moveCursorToEnd(el: HTMLInputElement): void;
11
- /**
12
- * Creates an array of numbers (positive and/or negative) progressing from start up to, but not including, end. A step of -1 is used if a negative start is specified without an end or step. If end is not specified, it's set to start with start then set to 0.
13
- * @param end - an integer number specifying at which position to stop (not included).
14
- * @param start - An integer number specifying at which position to start.
15
- * @param step - An integer number specifying the Increment */
16
- export declare function range(end: number, start?: number, step?: number): number[];
17
- /** Return whether given point is active */
18
- export declare function isActive(active: Types.StoreState['active'], point: Point.Point): boolean;
19
- /** Get the offset values of given element */
20
- export declare function getOffsetRect(element: HTMLElement): Types.Dimensions;
21
- /** Write given data to clipboard with given event */
22
- export declare function writeTextToClipboard(event: ClipboardEvent, data: string): void;
23
- /** Read text from given clipboard event */
24
- export declare function readTextFromClipboard(event: ClipboardEvent): string;
25
- /** Get the dimensions of cell at point from state */
26
- export declare function getCellDimensions(point: Point.Point, rowDimensions: Types.StoreState['rowDimensions'] | undefined, columnDimensions: Types.StoreState['columnDimensions'] | undefined): Types.Dimensions | undefined;
27
- /** Get the dimensions of a range of cells */
28
- export declare function getRangeDimensions(rowDimensions: Types.StoreState['rowDimensions'], columnDimensions: Types.StoreState['columnDimensions'], range: PointRange): Types.Dimensions | undefined;
29
- /** Get the dimensions of selected */
30
- export declare function getSelectedDimensions(rowDimensions: Types.StoreState['rowDimensions'], columnDimensions: Types.StoreState['columnDimensions'], data: Matrix.Matrix<unknown>, selected: Selection): Types.Dimensions | undefined;
31
- /** Get given data as CSV */
32
- export declare function getCSV(data: Matrix.Matrix<Types.CellBase>): string;
33
- /**
34
- * Calculate the rows and columns counts of a spreadsheet
35
- * @param data - the spreadsheet's data
36
- * @param rowLabels - the spreadsheet's row labels (if defined)
37
- * @param columnLabels - the spreadsheet's column labels (if defined)
38
- * @returns the rows and columns counts of a spreadsheet
39
- */
40
- export declare function calculateSpreadsheetSize(data: Matrix.Matrix<unknown>, rowLabels?: string[], columnLabels?: string[]): Matrix.Size;
41
- /** Should spreadsheet handle clipboard event */
42
- export declare function shouldHandleClipboardEvent(root: Element | null, mode: Types.Mode): boolean;
43
- export declare function isFocusedWithin(element: Element): boolean;
44
- export declare function hasLineBreaker(value: unknown): boolean;
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- interface ExcelFileProps {
3
- /** The Excel data containing sheets and their content */
4
- excelData: {
5
- sheets: WorkSheet[];
6
- };
7
- /** Optional: Provide context menu options for actions like right-click */
8
- contextOption?: {
9
- name: string;
10
- title: React.ReactNode;
11
- action: () => void;
12
- }[];
13
- /** Controls whether the toolbar is shown, disabled, or hidden */
14
- toolbar?: 'show' | 'disable' | 'hide';
15
- /** Callback function to save the Excel data */
16
- onSave?: (excelData?: any) => void;
17
- }
18
- declare const ExcelFile: React.FC<ExcelFileProps>;
19
- export default ExcelFile;
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import ExcelFile from './ExcelFile/ExcelFile';
3
- declare const meta: Meta<typeof ExcelFile>;
4
- type Story = StoryObj<typeof ExcelFile>;
5
- export declare const Default: Story;
6
- export default meta;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- interface ExcelSheetBarProps {
3
- fileDetails: {
4
- sheetNames: string[];
5
- };
6
- handleSheetChange: (name: string, index: number) => void;
7
- selectedSheet: {
8
- name: string;
9
- };
10
- }
11
- declare const ExcelSheetBar: React.FC<ExcelSheetBarProps>;
12
- export default ExcelSheetBar;
@@ -1,15 +0,0 @@
1
- import './ExcelToolBar.scss';
2
- import { CellBase } from '../ExcelFile/Excel';
3
- import * as Matrix from '../ExcelFile/Excel/matrix';
4
- interface ExcelToolBarProps {
5
- toolbar?: 'show' | 'disable' | 'hide';
6
- data: Matrix.Matrix<CellBase>;
7
- onBold: (data: Matrix.Matrix<CellBase>) => void;
8
- onItalic: (data: Matrix.Matrix<CellBase>) => void;
9
- onUnderline: (data: Matrix.Matrix<CellBase>) => void;
10
- setColor: (data: Matrix.Matrix<CellBase>, value: string) => void;
11
- setBackgroundColor: (data: Matrix.Matrix<CellBase>, value: string) => void;
12
- setFormatePainter: (data: Matrix.Matrix<CellBase>) => void;
13
- }
14
- declare const ExcelToolBar: React.FC<ExcelToolBarProps>;
15
- export default ExcelToolBar;
@@ -1,24 +0,0 @@
1
- interface CellStyle {
2
- color?: string;
3
- backgroundColor?: string;
4
- bold?: boolean;
5
- italic?: boolean;
6
- name?: string;
7
- border: {
8
- top: string;
9
- bottom: string;
10
- left: string;
11
- right: string;
12
- };
13
- alignment: {
14
- horizontal?: string;
15
- vertical?: string;
16
- wrapText?: boolean;
17
- };
18
- }
19
- interface CellData {
20
- style?: CellStyle;
21
- }
22
- type ImportExcelStylesData = Array<Array<CellData>>;
23
- export default function ImportExcelStyles(data: ImportExcelStylesData | null): void;
24
- export {};
@@ -1,129 +0,0 @@
1
- interface ExcelFileProps {
2
- /** The Excel data containing sheets and their content */
3
- excelData: {
4
- sheets: WorkSheet[];
5
- };
6
- /** Optional: Provide context menu options for actions like right-click */
7
- contextOption?: {
8
- name: string;
9
- title: React.ReactNode;
10
- action: () => void;
11
- }[];
12
- /** Controls whether the toolbar is shown, disabled, or hidden */
13
- toolbar?: 'show' | 'disable' | 'hide';
14
- /** Callback function to save the Excel data */
15
- onSave?: (excelData?: any) => void;
16
- }
17
- interface WorkSheet {
18
- /** The name of the worksheet */
19
- sheetName: string;
20
- /** 2D array of worksheet data (cells) */
21
- data: WorkData[][];
22
- }
23
- interface WorkData {
24
- /** Value of the cell */
25
- value: string;
26
- /** Styling options for the cell */
27
- style: React.CSSProperties;
28
- type?: boolean;
29
- }
30
- /** A generic type to represent a 2D matrix of any type (or undefined values) */
31
- type Matrix<T> = (T | undefined)[][];
32
- interface ContextAction {
33
- /** Name of the right-click option */
34
- name: string;
35
- /** Display title of the right-click menu option */
36
- title: React.ReactNode;
37
- /** The action that occurs when the right-click menu option is selected */
38
- action: () => void;
39
- }
40
- interface ContextOption {
41
- /** Type of the context option ('cell', 'row', 'column') */
42
- name: string;
43
- /** Array of context menu actions for right-click options */
44
- value: ContextAction[];
45
- }
46
- interface ContextMenuState {
47
- /** Whether the context menu is visible */
48
- visible: boolean;
49
- /** X-coordinate position for the context menu */
50
- x: number;
51
- /** Y-coordinate position for the context menu */
52
- y: number;
53
- /** Type of the context menu ('cell', 'row', 'column', or 'sheet_options') */
54
- type: 'cell' | 'row' | 'column' | 'sheet_options' | null;
55
- }
56
- interface SelectedCell {
57
- /** The row index of the selected cell */
58
- row: number;
59
- /** The column index of the selected cell */
60
- column: number;
61
- }
62
- interface ColorContainer {
63
- /** The color used for the text (hex code) */
64
- color: string;
65
- /** The background color used for the cell (hex code) */
66
- backgroundColor: string;
67
- /** The border color used for the cell (hex code) */
68
- borderColor: string;
69
- }
70
- interface SelectedValue {
71
- /** The value inside the selected cell */
72
- value: string;
73
- /** The row index of the selected cell */
74
- row: number;
75
- /** The column index of the selected cell */
76
- column: number;
77
- /** The column represented as an alphabetical string ('A', 'B') */
78
- alphaCol: string;
79
- /** The style applied to the selected cell */
80
- style: React.CSSProperties;
81
- /** The sheet name where the cell is located */
82
- sheet: string;
83
- }
84
- interface ExcelSheetBarProps {
85
- /** Object containing details about the file, including sheet names */
86
- fileDetails: {
87
- sheetNames: string[];
88
- };
89
- /** Function to handle sheet change events */
90
- handleSheetChange: (name: string, index: number) => void;
91
- /** Function to open the context menu on a sheet */
92
- contextMenu: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, name: string, index: number) => void;
93
- /** Function to add a new sheet */
94
- addSheet: () => void;
95
- /** Object representing the currently selected sheet */
96
- selectedSheet: {
97
- name: string;
98
- index: number;
99
- };
100
- /** Function to update the context Type */
101
- contextSelect: (event: React.MouseEvent) => void;
102
- }
103
- interface ContextMenuProps {
104
- /** Custom context menu options */
105
- customContext: {
106
- name: string;
107
- title: React.ReactNode;
108
- action: () => void;
109
- }[];
110
- /** Object that holds different context actions based on the type (cell, row, column, sheet_options) */
111
- contextAction: {
112
- /** Function to add a row */
113
- addRow: () => void;
114
- /** Function to delete a row */
115
- deleteRow: () => void;
116
- /** Function to add a column */
117
- addColumn: () => void;
118
- /** Function to delete a column */
119
- deleteColumn: () => void;
120
- /** Function to add a new sheet */
121
- addSheet: () => void;
122
- /** Function to delete a sheet */
123
- deleteSheet: () => void;
124
- };
125
- /** The state of the context menu, controlling its visibility and position */
126
- contextData: ContextMenuState;
127
- /** Function to update the context menu state */
128
- setContextData: React.Dispatch<React.SetStateAction<ContextMenuState>>;
129
- }
@@ -1 +0,0 @@
1
- export { default } from './ExcelFile/ExcelFile';
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import ExpandableMenu from './ExpandableMenu';
3
- declare const meta: Meta<typeof ExpandableMenu>;
4
- type Story = StoryObj<typeof ExpandableMenu>;
5
- export declare const Primary: Story;
6
- export declare const Controlled: Story;
7
- export default meta;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Recaptcha from './Recaptcha';
3
- declare const meta: Meta<typeof Recaptcha>;
4
- type Story = StoryObj<typeof Recaptcha>;
5
- export declare const Default: Story;
6
- export declare const WithError: Story;
7
- export declare const WithCustomTheme: Story;
8
- export default meta;
@@ -1,8 +0,0 @@
1
- import { StoryObj, Meta } from '@storybook/react';
2
- import FileDropzone from './FileDropzone';
3
- declare const meta: Meta<typeof FileDropzone>;
4
- type Story = StoryObj<typeof FileDropzone>;
5
- export declare const Primary: Story;
6
- export declare const withMIMEValidation: Story;
7
- export declare const Controlled: Story;
8
- export default meta;
@@ -1,7 +0,0 @@
1
- import Forms from './Forms';
2
- import { Meta, StoryObj } from '@storybook/react/*';
3
- import './Form.scss';
4
- declare const meta: Meta<typeof Forms>;
5
- type Story = StoryObj<typeof Forms>;
6
- export declare const WithDefaultValues: Story;
7
- export default meta;
@@ -1,8 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { Container } from './GridLayout';
3
- import './GridLayoutStory.scss';
4
- declare const meta: Meta<typeof Container>;
5
- type ContainerStory = StoryObj<typeof Container>;
6
- export declare const Grid: ContainerStory;
7
- export declare const Grid2: ContainerStory;
8
- export default meta;
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import HighlightText from './HighlightText';
3
- declare const meta: Meta<typeof HighlightText>;
4
- type Story = StoryObj<typeof HighlightText>;
5
- export declare const Primary: Story;
6
- export default meta;
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Icon from './Icon';
3
- declare const meta: Meta<typeof Icon>;
4
- type Story = StoryObj<typeof Icon>;
5
- export declare const Icons: Story;
6
- export declare const AllIcons: Story;
7
- export declare const DarkVariantIcons: Story;
8
- export default meta;
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import IconButton from './IconButton';
3
- declare const meta: Meta<typeof IconButton>;
4
- type Story = StoryObj<typeof IconButton>;
5
- export declare const Default: Story;
6
- export declare const PrimaryIconButton: Story;
7
- export default meta;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import IconRadioGroup from './IconRadioGroup';
3
- declare const meta: Meta<typeof IconRadioGroup>;
4
- type Story = StoryObj<typeof IconRadioGroup>;
5
- export declare const Default: Story;
6
- export declare const WithDisabledOption: Story;
7
- export default meta;
@@ -1,9 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import Input from './Input';
3
- declare const meta: Meta<typeof Input>;
4
- type Story = StoryObj<typeof Input>;
5
- export declare const Default: Story;
6
- export declare const Primary: Story;
7
- export declare const DisabledWithValue: Story;
8
- export declare const Controlled: Story;
9
- export default meta;
@@ -1,9 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import InputWithDropdown from './InputWithDropdown';
3
- declare const meta: Meta<typeof InputWithDropdown>;
4
- type Story = StoryObj<typeof InputWithDropdown>;
5
- export declare const Default: Story;
6
- export declare const DisabledWithValue: Story;
7
- export declare const Controlled: Story;
8
- export declare const InputWithStaticLabelWithoutOptions: Story;
9
- export default meta;
@@ -1,13 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import LabelEditTextField from './LabelEditTextField';
3
- import '../../assets/styles/_colors.scss';
4
- import './LabelEditTextField.scss';
5
- declare const meta: Meta<typeof LabelEditTextField>;
6
- type Story = StoryObj<typeof LabelEditTextField>;
7
- export declare const textField: Story;
8
- export declare const textFieldWithOutLabel: Story;
9
- export declare const openTextFieldWithOutLabel: Story;
10
- export declare const textFieldWithDropdown: Story;
11
- export declare const textFieldWithHighlight: Story;
12
- export declare const openLabelEditTextField: Story;
13
- export default meta;