pixel-react 1.1.7 → 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/components/AttachmentButton/AttachmentButton.d.ts +5 -0
  3. package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +9 -0
  4. package/lib/components/AttachmentButton/index.d.ts +1 -0
  5. package/lib/components/AttachmentButton/types.d.ts +8 -0
  6. package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
  7. package/lib/components/ExcelFile/ColorBarSelector/ColorBarSelector.d.ts +8 -0
  8. package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +4 -0
  9. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
  10. package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
  11. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
  12. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
  13. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
  14. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
  15. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
  16. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
  17. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
  18. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
  19. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
  20. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
  21. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +81 -0
  22. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
  23. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +130 -0
  24. package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
  25. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
  26. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
  27. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
  28. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
  29. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
  30. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
  31. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
  32. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
  33. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
  34. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
  35. package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
  36. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
  37. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
  38. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +215 -0
  39. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
  40. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
  41. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +45 -0
  42. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +3 -0
  43. package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
  44. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +15 -0
  45. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +3 -0
  46. package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
  47. package/lib/components/ExcelFile/Types.d.ts +176 -0
  48. package/lib/components/ExcelFile/index.d.ts +1 -0
  49. package/lib/components/IconRadioGroup/IconRadioGroup.d.ts +5 -0
  50. package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
  51. package/lib/components/IconRadioGroup/index.d.ts +1 -0
  52. package/lib/components/IconRadioGroup/type.d.ts +41 -0
  53. package/lib/components/RadioButton/radioButtonTypes.d.ts +15 -0
  54. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +2 -1
  55. package/lib/components/RadioGroup/radioGroupTypes.d.ts +15 -0
  56. package/lib/components/Select/Select.d.ts +1 -1
  57. package/lib/components/Select/types.d.ts +4 -0
  58. package/lib/components/Table/Table.d.ts +1 -1
  59. package/lib/components/Table/Types.d.ts +8 -0
  60. package/lib/components/TableTree/TableTree.d.ts +1 -0
  61. package/lib/index.d.ts +71 -3
  62. package/lib/index.esm.js +408 -151
  63. package/lib/index.esm.js.map +1 -1
  64. package/lib/index.js +409 -150
  65. package/lib/index.js.map +1 -1
  66. package/lib/tsconfig.tsbuildinfo +1 -1
  67. package/package.json +4 -2
  68. package/src/assets/Themes/BaseTheme.scss +11 -0
  69. package/src/assets/Themes/DarkTheme.scss +10 -0
  70. package/src/assets/icons/add_file.svg +14 -0
  71. package/src/assets/icons/all_borders.svg +3 -0
  72. package/src/assets/icons/bold.svg +3 -0
  73. package/src/assets/icons/border_bottom.svg +3 -0
  74. package/src/assets/icons/border_left.svg +3 -0
  75. package/src/assets/icons/border_right.svg +3 -0
  76. package/src/assets/icons/border_top.svg +3 -0
  77. package/src/assets/icons/clone_icon.svg +3 -0
  78. package/src/assets/icons/double_underline.svg +5 -0
  79. package/src/assets/icons/fill_color.svg +7 -0
  80. package/src/assets/icons/formate_painter.svg +5 -0
  81. package/src/assets/icons/full_access_icon.svg +4 -0
  82. package/src/assets/icons/history_icon.svg +19 -0
  83. package/src/assets/icons/italic.svg +3 -0
  84. package/src/assets/icons/jira.svg +3 -0
  85. package/src/assets/icons/linked_defects.svg +11 -0
  86. package/src/assets/icons/move_icon.svg +5 -0
  87. package/src/assets/icons/nlp_help_icon.svg +3 -0
  88. package/src/assets/icons/no_access_icon.svg +4 -0
  89. package/src/assets/icons/no_border.svg +3 -0
  90. package/src/assets/icons/notification_icon.svg +3 -0
  91. package/src/assets/icons/strike_through.svg +3 -0
  92. package/src/assets/icons/text_align_center.svg +3 -0
  93. package/src/assets/icons/text_align_left.svg +3 -0
  94. package/src/assets/icons/text_align_right.svg +3 -0
  95. package/src/assets/icons/text_color.svg +3 -0
  96. package/src/assets/icons/underline.svg +4 -0
  97. package/src/assets/icons/update_icon.svg +3 -0
  98. package/src/assets/icons/view_access_icon.svg +4 -0
  99. package/src/components/AppHeader/AppHeader.scss +65 -4
  100. package/src/components/AppHeader/AppHeader.stories.tsx +1 -0
  101. package/src/components/AppHeader/AppHeader.tsx +7 -5
  102. package/src/components/AttachmentButton/AttachmentButton.scss +9 -0
  103. package/src/components/AttachmentButton/AttachmentButton.stories.tsx +76 -0
  104. package/src/components/AttachmentButton/AttachmentButton.tsx +113 -0
  105. package/src/components/AttachmentButton/index.ts +1 -0
  106. package/src/components/AttachmentButton/types.ts +8 -0
  107. package/src/components/Drawer/Drawer.scss +0 -1
  108. package/src/components/ExcelFile/ChangeExcelStyles.tsx +78 -0
  109. package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.scss +13 -0
  110. package/src/components/ExcelFile/ColorBarselector/ColorBarSelector.tsx +43 -0
  111. package/src/components/ExcelFile/ContextMenu/ContextMenu.scss +102 -0
  112. package/src/components/ExcelFile/ContextMenu/ContextMenu.tsx +104 -0
  113. package/src/components/ExcelFile/ExcelFile/Excel/ActiveCell.tsx +131 -0
  114. package/src/components/ExcelFile/ExcelFile/Excel/Cell.tsx +201 -0
  115. package/src/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.tsx +123 -0
  116. package/src/components/ExcelFile/ExcelFile/Excel/Copied.tsx +25 -0
  117. package/src/components/ExcelFile/ExcelFile/Excel/CornerIndicator.tsx +49 -0
  118. package/src/components/ExcelFile/ExcelFile/Excel/DataEditor.tsx +37 -0
  119. package/src/components/ExcelFile/ExcelFile/Excel/DataViewer.tsx +46 -0
  120. package/src/components/ExcelFile/ExcelFile/Excel/FloatingRect.tsx +31 -0
  121. package/src/components/ExcelFile/ExcelFile/Excel/HeaderRow.tsx +5 -0
  122. package/src/components/ExcelFile/ExcelFile/Excel/Row.tsx +5 -0
  123. package/src/components/ExcelFile/ExcelFile/Excel/RowIndicator.tsx +102 -0
  124. package/src/components/ExcelFile/ExcelFile/Excel/Selected.tsx +32 -0
  125. package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.css +144 -0
  126. package/src/components/ExcelFile/ExcelFile/Excel/Spreadsheet.tsx +494 -0
  127. package/src/components/ExcelFile/ExcelFile/Excel/Table.tsx +19 -0
  128. package/src/components/ExcelFile/ExcelFile/Excel/actions.ts +302 -0
  129. package/src/components/ExcelFile/ExcelFile/Excel/areModelsEqual.ts +18 -0
  130. package/src/components/ExcelFile/ExcelFile/Excel/context.ts +12 -0
  131. package/src/components/ExcelFile/ExcelFile/Excel/engine/engine.ts +200 -0
  132. package/src/components/ExcelFile/ExcelFile/Excel/engine/formula.ts +137 -0
  133. package/src/components/ExcelFile/ExcelFile/Excel/engine/index.ts +2 -0
  134. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-graph.ts +154 -0
  135. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-hash.ts +10 -0
  136. package/src/components/ExcelFile/ExcelFile/Excel/engine/point-set.ts +69 -0
  137. package/src/components/ExcelFile/ExcelFile/Excel/index.ts +48 -0
  138. package/src/components/ExcelFile/ExcelFile/Excel/matrix.ts +388 -0
  139. package/src/components/ExcelFile/ExcelFile/Excel/point-range.ts +82 -0
  140. package/src/components/ExcelFile/ExcelFile/Excel/point.ts +15 -0
  141. package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +682 -0
  142. package/src/components/ExcelFile/ExcelFile/Excel/selection.ts +257 -0
  143. package/src/components/ExcelFile/ExcelFile/Excel/types.ts +269 -0
  144. package/src/components/ExcelFile/ExcelFile/Excel/typings/fast-formula-parser.d.ts +58 -0
  145. package/src/components/ExcelFile/ExcelFile/Excel/use-dispatch.ts +8 -0
  146. package/src/components/ExcelFile/ExcelFile/Excel/use-selector.ts +9 -0
  147. package/src/components/ExcelFile/ExcelFile/Excel/util.ts +173 -0
  148. package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +27 -0
  149. package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +520 -0
  150. package/src/components/ExcelFile/ExcelFile.stories.tsx +132 -0
  151. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.scss +16 -0
  152. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +79 -0
  153. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +22 -0
  154. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +271 -0
  155. package/src/components/ExcelFile/ImportExcelStyles.tsx +86 -0
  156. package/src/components/ExcelFile/Types.ts +241 -0
  157. package/src/components/ExcelFile/index.ts +1 -0
  158. package/src/components/Icon/Icons.scss +2 -3
  159. package/src/components/Icon/iconList.ts +59 -1
  160. package/src/components/IconRadioGroup/IconRadioGroup.scss +60 -0
  161. package/src/components/IconRadioGroup/IconRadioGroup.stories.tsx +108 -0
  162. package/src/components/IconRadioGroup/IconRadioGroup.tsx +72 -0
  163. package/src/components/IconRadioGroup/index.ts +1 -0
  164. package/src/components/IconRadioGroup/type.ts +50 -0
  165. package/src/components/Modal/modal.scss +1 -1
  166. package/src/components/MultiSelect/MultiSelect.scss +2 -2
  167. package/src/components/RadioButton/RadioButton.scss +74 -68
  168. package/src/components/RadioButton/RadioButton.tsx +22 -15
  169. package/src/components/RadioButton/radioButtonTypes.tsx +18 -0
  170. package/src/components/RadioGroup/RadioGroup.stories.tsx +42 -1
  171. package/src/components/RadioGroup/RadioGroup.tsx +3 -0
  172. package/src/components/RadioGroup/radioGroupTypes.tsx +18 -0
  173. package/src/components/Select/Select.scss +1 -2
  174. package/src/components/Select/Select.tsx +3 -2
  175. package/src/components/Select/types.ts +5 -0
  176. package/src/components/SequentialConnectingBranch/components/Branches/Branches.scss +5 -5
  177. package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +1 -1
  178. package/src/components/Table/Table.scss +1 -0
  179. package/src/components/Table/Table.tsx +28 -13
  180. package/src/components/Table/Types.ts +8 -0
  181. package/src/components/TableTree/TableTree.scss +18 -2
  182. package/src/components/TableTree/TableTree.stories.tsx +9 -51
  183. package/src/components/TableTree/TableTree.tsx +15 -2
  184. package/src/index.ts +4 -0
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Interface for ranges between two points
3
+ */
4
+
5
+ import * as Point from "./point";
6
+
7
+ /** Range between two points. Creates a normalized range between two given points */
8
+ export class PointRange {
9
+ /** The top-left point */
10
+ start: Point.Point;
11
+ /** The bottom-right point */
12
+ end: Point.Point;
13
+
14
+ constructor(source: Point.Point, target: Point.Point) {
15
+ this.start = {
16
+ row: Math.min(source.row, target.row),
17
+ column: Math.min(source.column, target.column),
18
+ };
19
+ this.end = {
20
+ row: Math.max(source.row, target.row),
21
+ column: Math.max(source.column, target.column),
22
+ };
23
+ }
24
+
25
+ /** Iterates through all the existing points in given range */
26
+ *[Symbol.iterator](): Iterator<Point.Point> {
27
+ for (let row = this.start.row; row <= this.end.row; row++) {
28
+ for (
29
+ let column = this.start.column;
30
+ column <= this.end.column;
31
+ column++
32
+ ) {
33
+ yield { row, column };
34
+ }
35
+ }
36
+ }
37
+
38
+ /** Returns the size (rows x columns) of the given range */
39
+ size(): number {
40
+ const rows = this.end.row + 1 - this.start.row;
41
+ const columns = this.end.column + 1 - this.start.column;
42
+ return rows * columns;
43
+ }
44
+
45
+ /** Returns whether given point exists in given range */
46
+ has(point: Point.Point): boolean {
47
+ return (
48
+ point.row >= this.start.row &&
49
+ point.column >= this.start.column &&
50
+ point.row <= this.end.row &&
51
+ point.column <= this.end.column
52
+ );
53
+ }
54
+
55
+ /** Limits given masked range with given mask */
56
+ mask(mask: PointRange): PointRange {
57
+ return new PointRange(
58
+ {
59
+ row: mask.start.row > this.start.row ? mask.start.row : this.start.row,
60
+ column:
61
+ mask.start.column > this.start.column
62
+ ? mask.start.column
63
+ : this.start.column,
64
+ },
65
+ {
66
+ row: mask.end.row < this.end.row ? mask.end.row : this.end.row,
67
+ column:
68
+ mask.end.column < this.end.column ? mask.end.column : this.end.column,
69
+ }
70
+ );
71
+ }
72
+
73
+ /** Returns whether given range is equal to this range */
74
+ equals(range: PointRange): boolean {
75
+ return (
76
+ this.start.row === range.start.row &&
77
+ this.start.column === range.start.column &&
78
+ this.end.row === range.end.row &&
79
+ this.end.column === range.end.column
80
+ );
81
+ }
82
+ }
@@ -0,0 +1,15 @@
1
+ /** A cell coordinates in the spreadsheet */
2
+ export type Point = {
3
+ /** The cell's column */
4
+ column: number;
5
+ /** The cell's row */
6
+ row: number;
7
+ };
8
+
9
+ /** Return whether two given points are the equal */
10
+ export function isEqual(source: Point, target: Point): boolean {
11
+ return source.column === target.column && source.row === target.row;
12
+ }
13
+
14
+ /** The origin point in matrices */
15
+ export const ORIGIN: Point = { row: 0, column: 0 };