pixel-react 1.2.1 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. package/lib/components/AppHeader/types.d.ts +11 -2
  2. package/lib/components/Avatar/Avatar.d.ts +5 -0
  3. package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
  4. package/lib/components/Avatar/index.d.ts +1 -0
  5. package/lib/components/Avatar/types.d.ts +26 -0
  6. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +2 -2
  7. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +2 -2
  8. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +1 -1
  9. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +2 -2
  10. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +2 -2
  11. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +2 -2
  12. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +2 -2
  13. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +1 -1
  14. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +1 -1
  15. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +2 -2
  16. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +1 -1
  17. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +6 -7
  18. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +1 -1
  19. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +49 -5
  20. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +3 -3
  21. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +5 -5
  22. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +6 -6
  23. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -2
  24. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +2 -2
  25. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +1 -1
  26. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +1 -1
  27. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +11 -11
  28. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +1 -1
  29. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +1 -1
  30. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +5 -5
  31. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +3 -3
  32. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +11 -48
  33. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +1 -1
  34. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +1 -1
  35. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +11 -12
  36. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +16 -0
  37. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +0 -3
  38. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +12 -0
  39. package/lib/components/ExcelFile/Types.d.ts +2 -49
  40. package/lib/components/Form/Form.d.ts +1 -15
  41. package/lib/components/Form/Form.stories.d.ts +6 -5
  42. package/lib/components/Form/Forms.d.ts +8 -0
  43. package/lib/components/Form/index.d.ts +1 -1
  44. package/lib/components/Icon/types.d.ts +1 -1
  45. package/lib/components/MenuOption/types.d.ts +7 -7
  46. package/lib/components/MiniModal/MiniModal.stories.d.ts +1 -0
  47. package/lib/components/MiniModal/types.d.ts +6 -6
  48. package/lib/components/ModulesChip/ModuleChip.d.ts +4 -0
  49. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
  50. package/lib/components/ModulesChip/index.d.ts +1 -0
  51. package/lib/components/ModulesChip/types.d.ts +14 -0
  52. package/lib/components/MultiSelect/MultiSelectTypes.d.ts +1 -0
  53. package/lib/components/Toastify/Toastify.d.ts +8 -0
  54. package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
  55. package/lib/components/Toastify/index.d.ts +1 -0
  56. package/lib/components/Toastify/types.d.ts +7 -0
  57. package/lib/components/Tooltip/types.d.ts +6 -0
  58. package/lib/components/Typography/types.d.ts +1 -0
  59. package/lib/index.d.ts +84 -31
  60. package/lib/index.esm.js +26720 -881
  61. package/lib/index.esm.js.map +1 -1
  62. package/lib/index.js +26718 -875
  63. package/lib/index.js.map +1 -1
  64. package/lib/tsconfig.tsbuildinfo +1 -1
  65. package/package.json +1 -1
  66. package/src/StyleGuide/ColorPalette/colorPaletteList.ts +10 -0
  67. package/src/assets/Themes/BaseTheme.scss +2 -0
  68. package/src/assets/Themes/DarkTheme.scss +2 -0
  69. package/src/assets/icons/add_testcase.svg +3 -0
  70. package/src/assets/icons/add_variable_icon.svg +3 -4
  71. package/src/assets/icons/attachment_icon.svg +3 -0
  72. package/src/assets/icons/authorization_icon.svg +3 -0
  73. package/src/assets/icons/automation_testcase.svg +4 -0
  74. package/src/assets/icons/back_icon.svg +3 -0
  75. package/src/assets/icons/client_profile.svg +4 -0
  76. package/src/assets/icons/fireflink_finder_logo.svg +7 -0
  77. package/src/assets/icons/fireflink_platform.svg +4 -0
  78. package/src/assets/icons/license_expired.svg +20 -0
  79. package/src/assets/icons/manual_testcase.svg +3 -0
  80. package/src/assets/icons/variable_icon.svg +4 -0
  81. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +2 -2
  82. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +1 -1
  83. package/src/components/AppHeader/AppHeader.stories.tsx +24 -3
  84. package/src/components/AppHeader/AppHeader.tsx +29 -11
  85. package/src/components/AppHeader/types.ts +11 -3
  86. package/src/components/Avatar/Avatar.scss +24 -0
  87. package/src/components/Avatar/Avatar.stories.tsx +56 -0
  88. package/src/components/Avatar/Avatar.tsx +25 -0
  89. package/src/components/Avatar/index.ts +1 -0
  90. package/src/components/Avatar/types.ts +27 -0
  91. package/src/components/Button/types.ts +1 -1
  92. package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +0 -2
  93. package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +1 -4
  94. package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +0 -1
  95. package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +13 -13
  96. package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +13 -12
  97. package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +40 -32
  98. package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +4 -4
  99. package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +10 -10
  100. package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +5 -5
  101. package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +10 -10
  102. package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +6 -6
  103. package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +1 -1
  104. package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +1 -1
  105. package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +34 -27
  106. package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +5 -5
  107. package/src/components/ExcelFile/ExcelFile/Excel/{Spreadsheet.css → Spreadsheet.scss} +21 -37
  108. package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +87 -78
  109. package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +2 -2
  110. package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +121 -31
  111. package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +1 -1
  112. package/src/components/ExcelFile/ExcelFile/Excel/context.ts +4 -4
  113. package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +7 -7
  114. package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +11 -11
  115. package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -2
  116. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +3 -3
  117. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +2 -2
  118. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +2 -2
  119. package/src/components/ExcelFile/ExcelFile/Excel/index.ts +12 -11
  120. package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +18 -24
  121. package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +1 -1
  122. package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +311 -41
  123. package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +5 -5
  124. package/src/components/ExcelFile/ExcelFile/Excel/types.ts +14 -66
  125. package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +8 -8
  126. package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +2 -2
  127. package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +3 -3
  128. package/src/components/ExcelFile/ExcelFile/Excel/util.ts +21 -22
  129. package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +0 -3
  130. package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +45 -403
  131. package/src/components/ExcelFile/ExcelFile.stories.tsx +10 -29
  132. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +1 -12
  133. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +0 -3
  134. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +147 -127
  135. package/src/components/ExcelFile/Types.ts +3 -70
  136. package/src/components/ExcelFile/index.ts +1 -1
  137. package/src/components/Form/Form.d.ts +3 -0
  138. package/src/components/Form/Form.scss +48 -4
  139. package/src/components/Form/Form.stories.tsx +244 -137
  140. package/src/components/Form/Form.ts +2 -0
  141. package/src/components/Form/Forms.tsx +25 -0
  142. package/src/components/Form/index.ts +1 -1
  143. package/src/components/Icon/iconList.ts +23 -0
  144. package/src/components/Icon/types.ts +1 -1
  145. package/src/components/IconButton/IconButton.scss +1 -1
  146. package/src/components/MenuOption/types.ts +7 -6
  147. package/src/components/MiniModal/MiniModal.scss +5 -0
  148. package/src/components/MiniModal/MiniModal.stories.tsx +95 -0
  149. package/src/components/MiniModal/MiniModal.tsx +11 -6
  150. package/src/components/MiniModal/types.ts +6 -6
  151. package/src/components/ModulesChip/ModuleChip.scss +20 -0
  152. package/src/components/ModulesChip/ModuleChip.stories.tsx +41 -0
  153. package/src/components/ModulesChip/ModuleChip.tsx +31 -0
  154. package/src/components/ModulesChip/index.ts +1 -0
  155. package/src/components/ModulesChip/types.ts +14 -0
  156. package/src/components/MultiSelect/Dropdown.tsx +6 -1
  157. package/src/components/MultiSelect/MultiSelect.scss +17 -10
  158. package/src/components/MultiSelect/MultiSelect.stories.tsx +16 -4
  159. package/src/components/MultiSelect/MultiSelect.tsx +11 -4
  160. package/src/components/MultiSelect/MultiSelectTypes.ts +4 -3
  161. package/src/components/Select/Select.scss +4 -0
  162. package/src/components/Select/Select.tsx +2 -2
  163. package/src/components/Toastify/Toastify.stories.tsx +52 -0
  164. package/src/components/Toastify/Toastify.tsx +66 -0
  165. package/src/components/Toastify/index.ts +1 -0
  166. package/src/components/Toastify/types.ts +8 -0
  167. package/src/components/Tooltip/Tooltip.tsx +2 -1
  168. package/src/components/Tooltip/types.ts +6 -0
  169. package/src/components/Typography/Typography.scss +12 -4
  170. package/src/components/Typography/Typography.stories.tsx +2 -0
  171. package/src/components/Typography/Typography.tsx +2 -0
  172. package/src/components/Typography/types.ts +1 -0
  173. package/src/index.ts +9 -1
  174. package/src/components/ExcelFile/ChangeExcelStyles.tsx +0 -78
  175. package/src/components/ExcelFile/ImportExcelStyles.tsx +0 -86
  176. package/src/components/Form/Form.tsx +0 -57
@@ -1,17 +1,26 @@
1
1
  import { ReactNode } from 'react';
2
+ import { optionsType } from '../AllProjectsDropdown/types';
2
3
  export interface AppHeaderProps {
3
4
  logoIconName: string;
4
5
  leftContent?: ReactNode;
5
6
  rightContent?: ReactNode;
6
- projectsList?: string[];
7
+ projectsList?: optionsType[];
7
8
  appHeaderMenuItems: appHeaderMenuItemProps[];
8
- appHeaderHiddenMenuItems?: string[];
9
+ appHeaderHiddenMenuItems?: {
10
+ label: string;
11
+ value: string | string[];
12
+ icon: string;
13
+ disable?: boolean;
14
+ }[];
9
15
  selectedMenu: string;
10
16
  selectedSubMenu?: string;
11
17
  selectedQuickMenu?: string;
18
+ selectedProject?: optionsType;
12
19
  onMenuClick?: (text: any) => void;
13
20
  onSubMenuClick?: (text: any) => void;
14
21
  onQuickMenuClick?: (text: any) => void;
22
+ onProjectMenuClick?: (text: any) => void;
23
+ onMoreMenuOptionClick?: (text: any) => void;
15
24
  }
16
25
  export interface appHeaderMenuItemProps {
17
26
  label: string;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './Avatar.scss';
3
+ import { AvatarProps } from './types';
4
+ declare const Avatar: React.FC<AvatarProps>;
5
+ export default Avatar;
@@ -0,0 +1,10 @@
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;
@@ -0,0 +1 @@
1
+ export { default } from './Avatar';
@@ -0,0 +1,26 @@
1
+ export interface AvatarProps {
2
+ /**
3
+ * This property determines the size of the avatar. It can be set to 'small', 'medium', or 'large'.
4
+ */
5
+ variant?: 'small' | 'medium' | 'large';
6
+ /**
7
+ * This property allows you to customize the background color of the avatar.
8
+ */
9
+ backgroundColor?: string;
10
+ /**
11
+ * This property specifies the name of the icon to be displayed within the avatar.
12
+ */
13
+ iconName: string;
14
+ /**
15
+ * This property allows you to customize the color of the icon within the avatar.
16
+ */
17
+ iconColor?: string;
18
+ /**
19
+ * This property allows you to set a custom size for the avatar, overriding the default size specified by the variant property.
20
+ */
21
+ customAvatarSize?: number;
22
+ /**
23
+ * This property allows you to set a custom size for the icon within the avatar.
24
+ */
25
+ customIconSize?: number;
26
+ }
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as Types from "./types";
1
+ import * as React from 'react';
2
+ import * as Types from './types';
3
3
  type Props = {
4
4
  DataEditor: Types.DataEditorComponent;
5
5
  };
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as Types from "./types";
1
+ import * as React from 'react';
2
+ import * as Types from './types';
3
3
  declare const ColumnIndicator: Types.ColumnIndicatorComponent;
4
4
  export default ColumnIndicator;
5
5
  export declare const enhance: (ColumnIndicatorComponent: Types.ColumnIndicatorComponent) => React.FC<Omit<Types.ColumnIndicatorProps, "selected" | "onSelect">>;
@@ -1,3 +1,3 @@
1
- import * as React from "react";
1
+ import * as React from 'react';
2
2
  declare const Copied: React.FC;
3
3
  export default Copied;
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as Types from "./types";
1
+ import * as React from 'react';
2
+ import * as Types from './types';
3
3
  declare const CornerIndicator: Types.CornerIndicatorComponent;
4
4
  export default CornerIndicator;
5
5
  export declare const enhance: (CornerIndicatorComponent: Types.CornerIndicatorComponent) => React.FC<Omit<Types.CornerIndicatorProps, "selected" | "onSelect">>;
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as Types from "./types";
1
+ import * as React from 'react';
2
+ import * as Types from './types';
3
3
  /** The default Spreadsheet DataEditor component */
4
4
  declare const DataEditor: React.FC<Types.DataEditorProps>;
5
5
  export default DataEditor;
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as Types from "./types";
1
+ import * as React from 'react';
2
+ import * as Types from './types';
3
3
  export declare const TRUE_TEXT = "TRUE";
4
4
  export declare const FALSE_TEXT = "FALSE";
5
5
  /** The default Spreadsheet DataViewer component */
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as Types from "./types";
1
+ import * as React from 'react';
2
+ import * as Types from './types';
3
3
  export type Props = {
4
4
  variant?: string;
5
5
  dimensions?: Types.Dimensions | null | undefined;
@@ -1,3 +1,3 @@
1
- import * as Types from "./types";
1
+ import * as Types from './types';
2
2
  declare const HeaderRow: Types.HeaderRowComponent;
3
3
  export default HeaderRow;
@@ -1,3 +1,3 @@
1
- import * as Types from "./types";
1
+ import * as Types from './types';
2
2
  declare const Row: Types.RowComponent;
3
3
  export default Row;
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as Types from "./types";
1
+ import * as React from 'react';
2
+ import * as Types from './types';
3
3
  declare const RowIndicator: Types.RowIndicatorComponent;
4
4
  export default RowIndicator;
5
5
  export declare const enhance: (RowIndicatorComponent: Types.RowIndicatorComponent) => React.FC<Omit<Types.RowIndicatorProps, "selected" | "onSelect">>;
@@ -1,3 +1,3 @@
1
- import * as React from "react";
1
+ import * as React from 'react';
2
2
  declare const Selected: React.FC;
3
3
  export default Selected;
@@ -1,9 +1,9 @@
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.css";
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
7
  /** The Spreadsheet component props */
8
8
  export type Props<CellType extends Types.CellBase> = {
9
9
  /** The spreadsheet's data */
@@ -14,7 +14,6 @@ export type Props<CellType extends Types.CellBase> = {
14
14
  * Use dark colors that complement dark mode
15
15
  * @defaultValue `false`
16
16
  */
17
- darkMode?: boolean;
18
17
  /**
19
18
  * Function used to create the formula parser (instance of
20
19
  * "fast-formula-parser") used by the Spreadsheet by getting the spreadsheet's
@@ -1,3 +1,3 @@
1
- import * as Types from "./types";
1
+ import * as Types from './types';
2
2
  declare const Table: Types.TableComponent;
3
3
  export default Table;
@@ -1,7 +1,7 @@
1
- import { Matrix } from "./matrix";
2
- import { Point } from "./point";
3
- import { CellBase, Dimensions, CommitChanges, CreateFormulaParser } from "./types";
4
- import { Selection } from "./selection";
1
+ import { Matrix } from './matrix';
2
+ import { Point } from './point';
3
+ import { CellBase, Dimensions, CommitChanges, CreateFormulaParser } from './types';
4
+ import { Selection } from './selection';
5
5
  export declare const SET_DATA = "SET_DATA";
6
6
  export declare const SET_CREATE_FORMULA_PARSER = "SET_CREATE_FORMULA_PARSER";
7
7
  export declare const SELECT_ENTIRE_ROW = "SELECT_ENTIRE_ROW";
@@ -24,9 +24,53 @@ export declare const KEY_DOWN = "KEY_DOWN";
24
24
  export declare const DRAG_START = "DRAG_START";
25
25
  export declare const DRAG_END = "DRAG_END";
26
26
  export declare const COMMIT = "COMMIT";
27
+ export declare const BOLD = "BOLD";
28
+ export declare const ITALIC = "ITALIC";
29
+ export declare const UNDERLINE = "UNDERLINE";
30
+ export declare const COLOR = "COLOR";
31
+ export declare const BACKGROUND_COLOR = "BACKGROUND_COLOR";
32
+ export declare const FORMATE_PAINTER = "FORMATE_PAINTER";
27
33
  export type BaseAction<T extends string> = {
28
34
  type: T;
29
35
  };
36
+ export type BoldStyle = BaseAction<typeof BOLD> & {
37
+ payload: {
38
+ data: Matrix<CellBase>;
39
+ };
40
+ };
41
+ export declare function bold(data: Matrix<CellBase>): BoldStyle;
42
+ export type ItalicStyle = BaseAction<typeof ITALIC> & {
43
+ payload: {
44
+ data: Matrix<CellBase>;
45
+ };
46
+ };
47
+ export declare function italic(data: Matrix<CellBase>): ItalicStyle;
48
+ export type UnderlineStyle = BaseAction<typeof UNDERLINE> & {
49
+ payload: {
50
+ data: Matrix<CellBase>;
51
+ };
52
+ };
53
+ export declare function underline(data: Matrix<CellBase>): UnderlineStyle;
54
+ export type ColorStyle = BaseAction<typeof COLOR> & {
55
+ payload: {
56
+ data: Matrix<CellBase>;
57
+ value: string;
58
+ };
59
+ };
60
+ export declare function color(data: Matrix<CellBase>, value: string): ColorStyle;
61
+ export type BackgroundStyle = BaseAction<typeof BACKGROUND_COLOR> & {
62
+ payload: {
63
+ data: Matrix<CellBase>;
64
+ value: string;
65
+ };
66
+ };
67
+ export declare function backgroundStyle(data: Matrix<CellBase>, value: string): BackgroundStyle;
68
+ export type FormatePainterStyle = BaseAction<typeof FORMATE_PAINTER> & {
69
+ payload: {
70
+ data: Matrix<CellBase>;
71
+ };
72
+ };
73
+ export declare function formatePainter(data: Matrix<CellBase>): FormatePainterStyle;
30
74
  export type SetDataAction = BaseAction<typeof SET_DATA> & {
31
75
  payload: {
32
76
  data: Matrix<CellBase>;
@@ -127,4 +171,4 @@ export type ClearAction = BaseAction<typeof CLEAR>;
127
171
  export declare function clear(): ClearAction;
128
172
  export type BlurAction = BaseAction<typeof BLUR>;
129
173
  export declare function blur(): BlurAction;
130
- export type Action = SetDataAction | SetCreateFormulaParserAction | SelectEntireRowAction | SelectEntireColumnAction | SelectEntireWorksheetAction | SetSelectionAction | SelectAction | ActivateAction | SetCellDataAction | SetCellDimensionsAction | PasteAction | KeyPressAction | KeyDownAction | DragStartAction | DragEndAction | CommitAction | CopyAction | CutAction | EditAction | ViewAction | ClearAction | BlurAction;
174
+ export type Action = SetDataAction | SetCreateFormulaParserAction | SelectEntireRowAction | SelectEntireColumnAction | SelectEntireWorksheetAction | SetSelectionAction | SelectAction | ActivateAction | SetCellDataAction | SetCellDimensionsAction | PasteAction | KeyPressAction | KeyDownAction | DragStartAction | DragEndAction | CommitAction | CopyAction | CutAction | EditAction | ViewAction | ClearAction | UnderlineStyle | ItalicStyle | BoldStyle | ColorStyle | BackgroundStyle | FormatePainterStyle | BlurAction;
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import reducer from "./reducer";
3
- import { Action } from "./actions";
1
+ import * as React from 'react';
2
+ import reducer from './reducer';
3
+ import { Action } from './actions';
4
4
  export type ReducerState = React.ReducerState<typeof reducer>;
5
5
  export type Dispatch = React.Dispatch<Action>;
6
6
  export type Value = [ReducerState, Dispatch];
@@ -1,8 +1,8 @@
1
- import FormulaParser, { Value } from "fast-formula-parser";
2
- import * as Matrix from "../matrix";
3
- import { Point } from "../point";
4
- import { CellBase, CreateFormulaParser } from "../types";
5
- import { PointGraph } from "./point-graph";
1
+ import FormulaParser, { Value } from 'fast-formula-parser';
2
+ import * as Matrix from '../matrix';
3
+ import { Point } from '../point';
4
+ import { CellBase, CreateFormulaParser } from '../types';
5
+ import { PointGraph } from './point-graph';
6
6
  export declare class Model<Cell extends CellBase> {
7
7
  readonly data: Matrix.Matrix<Cell>;
8
8
  readonly evaluatedData: Matrix.Matrix<Cell>;
@@ -1,14 +1,14 @@
1
- import FormulaParser, { FormulaParserConfig, Value } from "fast-formula-parser";
2
- import { Point } from "../point";
3
- import * as Matrix from "../matrix";
4
- import { CellBase } from "../types";
5
- import { PointSet } from "./point-set";
1
+ import FormulaParser, { FormulaParserConfig, Value } from 'fast-formula-parser';
2
+ import { Point } from '../point';
3
+ import * as Matrix from '../matrix';
4
+ import { CellBase } from '../types';
5
+ import { PointSet } from './point-set';
6
6
  export declare const FORMULA_VALUE_PREFIX = "=";
7
7
  /** Returns whether given value is a formula */
8
8
  export declare function isFormulaValue(value: unknown): value is string;
9
9
  /** Extracts formula from value */
10
10
  export declare function extractFormula(value: string): string;
11
- export declare function createFormulaParser(data: Matrix.Matrix<CellBase>, config?: Omit<FormulaParserConfig, "onCell" | "onRange">): FormulaParser;
11
+ export declare function createFormulaParser(data: Matrix.Matrix<CellBase>, config?: Omit<FormulaParserConfig, 'onCell' | 'onRange'>): FormulaParser;
12
12
  /**
13
13
  * For given formula returns the cell references
14
14
  * @param formula - formula to get references for
@@ -1,2 +1,2 @@
1
- export { Model, updateCellValue } from "./engine";
2
- export { createFormulaParser } from "./formula";
1
+ export { Model, updateCellValue } from './engine';
2
+ export { createFormulaParser } from './formula';
@@ -1,5 +1,5 @@
1
- import { Point } from "../point";
2
- import { PointSet } from "./point-set";
1
+ import { Point } from '../point';
2
+ import { PointSet } from './point-set';
3
3
  /**
4
4
  * Immutable directed graph of points, where each point can have multiple
5
5
  * edges to other points.
@@ -1,3 +1,3 @@
1
- import { Point } from "../point";
1
+ import { Point } from '../point';
2
2
  export declare function toString(point: Point): string;
3
3
  export declare function fromString(point: string): Point;
@@ -1,4 +1,4 @@
1
- import * as Point from "../point";
1
+ import * as Point from '../point';
2
2
  /**
3
3
  * Immutable Set like interface of points
4
4
  */
@@ -1,13 +1,13 @@
1
- import Spreadsheet from "./Spreadsheet";
2
- import DataEditor from "./DataEditor";
3
- import DataViewer from "./DataViewer";
1
+ import Spreadsheet from './Spreadsheet';
2
+ import DataEditor from './DataEditor';
3
+ import DataViewer from './DataViewer';
4
4
  export default Spreadsheet;
5
5
  export { Spreadsheet, DataEditor, DataViewer };
6
- export type { Props } from "./Spreadsheet";
7
- export { createEmpty as createEmptyMatrix } from "./matrix";
8
- export type { Matrix } from "./matrix";
9
- export { Selection, EmptySelection, EntireAxisSelection, EntireColumnsSelection, EntireRowsSelection, EntireSelection, EntireWorksheetSelection, InvalidIndexError, RangeSelection, } from "./selection";
10
- export { PointRange } from "./point-range";
11
- export type { Point } from "./point";
12
- export type { CellBase, CellDescriptor, Mode, Dimensions, CellChange, CellComponentProps, CellComponent, DataViewerProps, DataViewerComponent, DataEditorProps, DataEditorComponent, ColumnIndicatorComponent, ColumnIndicatorProps, RowIndicatorComponent, RowIndicatorProps, CornerIndicatorComponent, CornerIndicatorProps, RowComponent, RowProps, TableComponent, TableProps, HeaderRowProps, HeaderRowComponent, } from "./types";
13
- export { createFormulaParser, Model } from "./engine";
6
+ export type { Props } from './Spreadsheet';
7
+ export { createEmpty as createEmptyMatrix } from './matrix';
8
+ export type { Matrix } from './matrix';
9
+ export { Selection, EmptySelection, EntireAxisSelection, EntireColumnsSelection, EntireRowsSelection, EntireSelection, EntireWorksheetSelection, InvalidIndexError, RangeSelection, } from './selection';
10
+ export { PointRange } from './point-range';
11
+ export type { Point } from './point';
12
+ export type { CellBase, CellDescriptor, Mode, Dimensions, CellChange, CellComponentProps, CellComponent, DataViewerProps, DataViewerComponent, DataEditorProps, DataEditorComponent, ColumnIndicatorComponent, ColumnIndicatorProps, RowIndicatorComponent, RowIndicatorProps, CornerIndicatorComponent, CornerIndicatorProps, RowComponent, RowProps, TableComponent, TableProps, HeaderRowProps, HeaderRowComponent, } from './types';
13
+ export { createFormulaParser, Model } from './engine';
@@ -1,4 +1,4 @@
1
- import * as Point from "./point";
1
+ import * as Point from './point';
2
2
  /** A two-dimensional array of given type T in rows and columns */
3
3
  export type Matrix<T> = Array<Array<T | undefined>>;
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Interface for ranges between two points
3
3
  */
4
- import * as Point from "./point";
4
+ import * as Point from './point';
5
5
  /** Range between two points. Creates a normalized range between two given points */
6
6
  export declare class PointRange {
7
7
  /** The top-left point */
@@ -1,8 +1,8 @@
1
- import * as Matrix from "./matrix";
2
- import * as Types from "./types";
3
- import * as Point from "./point";
4
- import { Selection, RangeSelection, EntireColumnsSelection, EntireRowsSelection } from "./selection";
5
- import * as Actions from "./actions";
1
+ import * as Matrix from './matrix';
2
+ import * as Types from './types';
3
+ import * as Point from './point';
4
+ import { Selection, RangeSelection, EntireColumnsSelection, EntireRowsSelection } from './selection';
5
+ import * as Actions from './actions';
6
6
  export declare const INITIAL_STATE: Types.StoreState;
7
7
  export default function reducer(state: Types.StoreState, action: Actions.Action): Types.StoreState;
8
8
  export declare const go: (rowDelta: number, columnDelta: number) => KeyDownHandler;
@@ -1,6 +1,6 @@
1
- import { PointRange } from "./point-range";
2
- import * as Point from "./point";
3
- import * as Matrix from "./matrix";
1
+ import { PointRange } from './point-range';
2
+ import * as Point from './point';
3
+ import * as Matrix from './matrix';
4
4
  /** Selection from a spreadsheet */
5
5
  export declare abstract class Selection {
6
6
  /** Get concrete range of the selection in the given data */
@@ -1,10 +1,10 @@
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";
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
8
  /** The base type of cell data in Spreadsheet */
9
9
  export type CellBase<Value = any> = {
10
10
  /** Whether the cell should not be editable */
@@ -13,50 +13,13 @@ export type CellBase<Value = any> = {
13
13
  className?: string;
14
14
  /** The value of the cell */
15
15
  value: Value;
16
- style?: CellStyle;
16
+ style?: React.CSSProperties | undefined;
17
17
  type?: boolean;
18
18
  /** Custom component to render when the cell is edited, if not defined would default to the component defined for the Spreadsheet */
19
19
  DataEditor?: DataEditorComponent<CellBase<Value>>;
20
20
  /** Custom component to render when the cell is viewed, if not defined would default to the component defined for the Spreadsheet */
21
21
  DataViewer?: DataViewerComponent<CellBase<Value>>;
22
22
  };
23
- interface CellStyle {
24
- /** Font name for the cell text */
25
- name?: string;
26
- /** Font size of the cell text */
27
- size?: number;
28
- position?: string;
29
- /** Whether the text is bold */
30
- bold?: boolean;
31
- /** Whether the text is italicized */
32
- italic?: boolean;
33
- /** Text color in the cell (hex code) */
34
- color?: string;
35
- /** Background color of the cell (hex code) */
36
- backgroundColor?: string;
37
- /** Border color of the cell (hex code) */
38
- borderColor?: string;
39
- /** Border styles for each side of the cell */
40
- border?: {
41
- /** Border style for the top side of the cell */
42
- top: string;
43
- /** Border style for the bottom side of the cell */
44
- bottom: string;
45
- /** Border style for the left side of the cell */
46
- left: string;
47
- /** Border style for the right side of the cell */
48
- right: string;
49
- };
50
- /** Text alignment and wrapping properties */
51
- alignment?: {
52
- /** Horizontal text alignment ('left', 'center', or 'right') */
53
- horizontal: string;
54
- /** Vertical text alignment ('top', 'middle', or 'bottom') */
55
- vertical: string;
56
- /** Whether the text is wrapped within the cell */
57
- wrapText: boolean;
58
- };
59
- }
60
23
  /**
61
24
  * A cell with it's coordinates
62
25
  * @deprecated the component does not use cell descriptors anymore. Instead it passes cell point and cell value explicitly.
@@ -66,7 +29,7 @@ export type CellDescriptor<Cell extends CellBase> = {
66
29
  data: Cell | undefined;
67
30
  } & Point;
68
31
  /** The spreadsheet's write mode */
69
- export type Mode = "view" | "edit";
32
+ export type Mode = 'view' | 'edit';
70
33
  /** Dimensions of an element */
71
34
  export type Dimensions = {
72
35
  /** The element's width in pixels */
@@ -86,8 +49,8 @@ export type StoreState<Cell extends CellBase = CellBase> = {
86
49
  cut: boolean;
87
50
  active: Point | null;
88
51
  mode: Mode;
89
- rowDimensions: Record<number, Pick<Dimensions, "height" | "top"> | undefined>;
90
- columnDimensions: Record<number, Pick<Dimensions, "width" | "left"> | undefined>;
52
+ rowDimensions: Record<number, Pick<Dimensions, 'height' | 'top'> | undefined>;
53
+ columnDimensions: Record<number, Pick<Dimensions, 'width' | 'left'> | undefined>;
91
54
  dragging: boolean;
92
55
  lastChanged: Point | null;
93
56
  lastCommit: null | CellChange<Cell>[];
@@ -1,3 +1,3 @@
1
- import { Dispatch } from "./context";
1
+ import { Dispatch } from './context';
2
2
  declare function useDispatch(): Dispatch;
3
3
  export default useDispatch;
@@ -1,3 +1,3 @@
1
- import * as Types from "./types";
1
+ import * as Types from './types';
2
2
  declare function useSelector<T>(selector: (state: Types.StoreState) => T): T;
3
3
  export default useSelector;
@@ -1,9 +1,9 @@
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";
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
7
  export declare const PLAIN_TEXT_MIME = "text/plain";
8
8
  export declare const FOCUS_WITHIN_SELECTOR = ":focus-within";
9
9
  /** Move the cursor of given input element to the input's end */
@@ -12,11 +12,10 @@ export declare function moveCursorToEnd(el: HTMLInputElement): void;
12
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
13
  * @param end - an integer number specifying at which position to stop (not included).
14
14
  * @param start - An integer number specifying at which position to start.
15
- * @param step - An integer number specifying the incrementation
16
- */
15
+ * @param step - An integer number specifying the Increment */
17
16
  export declare function range(end: number, start?: number, step?: number): number[];
18
17
  /** Return whether given point is active */
19
- export declare function isActive(active: Types.StoreState["active"], point: Point.Point): boolean;
18
+ export declare function isActive(active: Types.StoreState['active'], point: Point.Point): boolean;
20
19
  /** Get the offset values of given element */
21
20
  export declare function getOffsetRect(element: HTMLElement): Types.Dimensions;
22
21
  /** Write given data to clipboard with given event */
@@ -24,11 +23,11 @@ export declare function writeTextToClipboard(event: ClipboardEvent, data: string
24
23
  /** Read text from given clipboard event */
25
24
  export declare function readTextFromClipboard(event: ClipboardEvent): string;
26
25
  /** Get the dimensions of cell at point from state */
27
- export declare function getCellDimensions(point: Point.Point, rowDimensions: Types.StoreState["rowDimensions"] | undefined, columnDimensions: Types.StoreState["columnDimensions"] | undefined): Types.Dimensions | undefined;
26
+ export declare function getCellDimensions(point: Point.Point, rowDimensions: Types.StoreState['rowDimensions'] | undefined, columnDimensions: Types.StoreState['columnDimensions'] | undefined): Types.Dimensions | undefined;
28
27
  /** Get the dimensions of a range of cells */
29
- export declare function getRangeDimensions(rowDimensions: Types.StoreState["rowDimensions"], columnDimensions: Types.StoreState["columnDimensions"], range: PointRange): Types.Dimensions | undefined;
28
+ export declare function getRangeDimensions(rowDimensions: Types.StoreState['rowDimensions'], columnDimensions: Types.StoreState['columnDimensions'], range: PointRange): Types.Dimensions | undefined;
30
29
  /** Get the dimensions of selected */
31
- export declare function getSelectedDimensions(rowDimensions: Types.StoreState["rowDimensions"], columnDimensions: Types.StoreState["columnDimensions"], data: Matrix.Matrix<unknown>, selected: Selection): Types.Dimensions | undefined;
30
+ export declare function getSelectedDimensions(rowDimensions: Types.StoreState['rowDimensions'], columnDimensions: Types.StoreState['columnDimensions'], data: Matrix.Matrix<unknown>, selected: Selection): Types.Dimensions | undefined;
32
31
  /** Get given data as CSV */
33
32
  export declare function getCSV(data: Matrix.Matrix<Types.CellBase>): string;
34
33
  /**
@@ -1,3 +1,19 @@
1
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
+ }
2
18
  declare const ExcelFile: React.FC<ExcelFileProps>;
3
19
  export default ExcelFile;
@@ -4,12 +4,9 @@ interface ExcelSheetBarProps {
4
4
  sheetNames: string[];
5
5
  };
6
6
  handleSheetChange: (name: string, index: number) => void;
7
- contextMenu: (e: React.MouseEvent, name: string, index: number) => void;
8
- addSheet: () => void;
9
7
  selectedSheet: {
10
8
  name: string;
11
9
  };
12
- contextSelect: (e: React.MouseEvent) => void;
13
10
  }
14
11
  declare const ExcelSheetBar: React.FC<ExcelSheetBarProps>;
15
12
  export default ExcelSheetBar;
@@ -1,3 +1,15 @@
1
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
+ }
2
14
  declare const ExcelToolBar: React.FC<ExcelToolBarProps>;
3
15
  export default ExcelToolBar;