pixel-react 1.2.7 → 1.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. package/lib/components/Drawer/Types.d.ts +23 -12
  2. package/lib/components/Editor/Editor.d.ts +5 -0
  3. package/lib/components/Editor/Editor.stories.d.ts +6 -0
  4. package/lib/components/Editor/VariableDropdown.d.ts +5 -0
  5. package/lib/components/Editor/constants.d.ts +3 -0
  6. package/lib/components/Editor/index.d.ts +1 -0
  7. package/lib/components/Editor/types.d.ts +71 -0
  8. package/lib/components/Excel/ContextMenu/ContextMenu.d.ts +4 -0
  9. package/lib/components/Excel/ExcelFile/ExcelFile.d.ts +20 -0
  10. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.d.ts +7 -0
  11. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Cell.d.ts +4 -0
  12. package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.d.ts +5 -0
  13. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Copied.d.ts +3 -0
  14. package/lib/components/Excel/ExcelFile/ExcelFileComponents/CornerIndicator.d.ts +5 -0
  15. package/lib/components/Excel/ExcelFile/ExcelFileComponents/DataEditor.d.ts +5 -0
  16. package/lib/components/Excel/ExcelFile/ExcelFileComponents/DataViewer.d.ts +8 -0
  17. package/lib/components/Excel/ExcelFile/ExcelFileComponents/FloatingRect.d.ts +10 -0
  18. package/lib/components/Excel/ExcelFile/ExcelFileComponents/HeaderRow.d.ts +3 -0
  19. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Row.d.ts +3 -0
  20. package/lib/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.d.ts +5 -0
  21. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Selected.d.ts +3 -0
  22. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +80 -0
  23. package/lib/components/Excel/ExcelFile/ExcelFileComponents/Table.d.ts +3 -0
  24. package/lib/components/Excel/ExcelFile/ExcelFileComponents/actions.d.ts +203 -0
  25. package/lib/components/Excel/ExcelFile/ExcelFileComponents/areModelsEqual.d.ts +1 -0
  26. package/lib/components/Excel/ExcelFile/ExcelFileComponents/context.d.ts +8 -0
  27. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/engine.d.ts +22 -0
  28. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/formula.d.ts +17 -0
  29. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/index.d.ts +2 -0
  30. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/point-graph.d.ts +21 -0
  31. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/point-hash.d.ts +3 -0
  32. package/lib/components/Excel/ExcelFile/ExcelFileComponents/engine/point-set.d.ts +24 -0
  33. package/lib/components/Excel/ExcelFile/ExcelFileComponents/index.d.ts +13 -0
  34. package/lib/components/Excel/ExcelFile/ExcelFileComponents/matrix.d.ts +67 -0
  35. package/lib/components/Excel/ExcelFile/ExcelFileComponents/point-range.d.ts +22 -0
  36. package/lib/components/Excel/ExcelFile/ExcelFileComponents/point.d.ts +11 -0
  37. package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducer.d.ts +4 -0
  38. package/lib/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.d.ts +40 -0
  39. package/lib/components/Excel/ExcelFile/ExcelFileComponents/selection.d.ts +95 -0
  40. package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +178 -0
  41. package/lib/components/Excel/ExcelFile/ExcelFileComponents/use-dispatch.d.ts +3 -0
  42. package/lib/components/Excel/ExcelFile/ExcelFileComponents/use-selector.d.ts +3 -0
  43. package/lib/components/Excel/ExcelFile/ExcelFileComponents/util.d.ts +44 -0
  44. package/lib/components/Excel/ExcelFile.stories.d.ts +6 -0
  45. package/lib/components/Excel/ExcelToolBar/ExcelToolBar.d.ts +19 -0
  46. package/lib/components/Excel/Types.d.ts +129 -0
  47. package/lib/components/Excel/index.d.ts +1 -0
  48. package/lib/components/ExcelFile/ColorBarselector/ColorBarSelector.d.ts +8 -0
  49. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +2 -2
  50. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +2 -2
  51. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +1 -1
  52. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +2 -2
  53. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +2 -2
  54. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +2 -2
  55. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +2 -2
  56. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +1 -1
  57. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +1 -1
  58. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +2 -2
  59. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +1 -1
  60. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +7 -6
  61. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +1 -1
  62. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +5 -49
  63. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +3 -3
  64. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +5 -5
  65. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +6 -6
  66. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -2
  67. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +2 -2
  68. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +1 -1
  69. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +1 -1
  70. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +11 -11
  71. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +1 -1
  72. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +1 -1
  73. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +5 -5
  74. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +3 -3
  75. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +48 -11
  76. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +1 -1
  77. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +1 -1
  78. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +12 -11
  79. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +0 -16
  80. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +3 -0
  81. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +0 -12
  82. package/lib/components/ExcelFile/Types.d.ts +49 -2
  83. package/lib/components/InputWithDropdown/InputWithDropdown.d.ts +1 -1
  84. package/lib/components/InputWithDropdown/types.d.ts +3 -1
  85. package/lib/components/MenuOption/MenuOption.d.ts +1 -1
  86. package/lib/components/MenuOption/types.d.ts +4 -0
  87. package/lib/components/Select/Select.d.ts +3 -2
  88. package/lib/components/Select/Select.stories.d.ts +1 -0
  89. package/lib/components/Select/components/Dropdown.d.ts +5 -0
  90. package/lib/components/Select/components/types.d.ts +18 -0
  91. package/lib/components/Select/types.d.ts +2 -42
  92. package/lib/components/Toastify/Toastify.d.ts +5 -4
  93. package/lib/components/Toastify/types.d.ts +1 -0
  94. package/lib/index.d.ts +75 -30
  95. package/lib/index.esm.js +1734 -1441
  96. package/lib/index.esm.js.map +1 -1
  97. package/lib/index.js +1734 -1440
  98. package/lib/index.js.map +1 -1
  99. package/lib/tsconfig.tsbuildinfo +1 -1
  100. package/lib/utils/getSequentialPayload/getSequentialPayload.d.ts +2 -0
  101. package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +10 -0
  102. package/lib/utils/getSequentialPayload/types.d.ts +30 -0
  103. package/package.json +1 -1
  104. package/src/assets/Themes/BaseTheme.scss +5 -0
  105. package/src/assets/Themes/DarkTheme.scss +2 -0
  106. package/src/assets/icons/maximize_icon.svg +5 -0
  107. package/src/assets/styles/_fonts.scss +1 -1
  108. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +15 -6
  109. package/src/components/AllProjectsDropdown/AllProjectsDropdown.stories.tsx +0 -5
  110. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +20 -10
  111. package/src/components/Drawer/Drawer.scss +1 -0
  112. package/src/components/Drawer/Types.ts +24 -13
  113. package/src/components/Excel/ExcelFile/ExcelFile.scss +62 -0
  114. package/src/components/Excel/ExcelFile/ExcelFile.tsx +312 -0
  115. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/ActiveCell.tsx +2 -2
  116. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Cell.tsx +3 -3
  117. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/ColumnIndicator.tsx +4 -4
  118. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/CornerIndicator.tsx +2 -2
  119. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/DataEditor.tsx +1 -1
  120. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/DataViewer.tsx +3 -3
  121. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/FloatingRect.tsx +4 -4
  122. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/RowIndicator.tsx +4 -4
  123. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Spreadsheet.scss +26 -24
  124. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Spreadsheet.tsx +13 -45
  125. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Table.tsx +1 -1
  126. package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/actions.ts +88 -20
  127. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducer.ts +495 -0
  128. package/src/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.ts +758 -0
  129. package/src/components/{ExcelFile → Excel}/ExcelFile.stories.tsx +45 -0
  130. package/src/components/Excel/ExcelToolBar/ExcelToolBar.scss +36 -0
  131. package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +346 -0
  132. package/src/components/Form/Form.scss +54 -35
  133. package/src/components/Form/Form.stories.tsx +264 -225
  134. package/src/components/Icon/Icons.scss +4 -0
  135. package/src/components/Icon/iconList.ts +2 -1
  136. package/src/components/Input/Input.tsx +0 -1
  137. package/src/components/InputWithDropdown/InputWithDropdown.scss +30 -1
  138. package/src/components/InputWithDropdown/InputWithDropdown.tsx +45 -16
  139. package/src/components/InputWithDropdown/types.ts +5 -1
  140. package/src/components/MenuOption/MenuOption.scss +0 -1
  141. package/src/components/MenuOption/MenuOption.stories.tsx +3 -0
  142. package/src/components/MenuOption/MenuOption.tsx +5 -4
  143. package/src/components/MenuOption/types.ts +4 -0
  144. package/src/components/MultiSelect/MultiSelect.scss +5 -1
  145. package/src/components/MultiSelect/MultiSelect.stories.tsx +17 -13
  146. package/src/components/MultiSelect/MultiSelect.tsx +27 -14
  147. package/src/components/Select/Select.scss +121 -188
  148. package/src/components/Select/Select.stories.tsx +164 -18
  149. package/src/components/Select/Select.tsx +142 -290
  150. package/src/components/Select/components/Dropdown.scss +50 -0
  151. package/src/components/Select/components/Dropdown.tsx +94 -0
  152. package/src/components/Select/components/types.ts +20 -0
  153. package/src/components/Select/types.ts +15 -39
  154. package/src/components/Table/Table.scss +6 -5
  155. package/src/components/Table/Table.stories.tsx +0 -9
  156. package/src/components/Table/Table.tsx +2 -2
  157. package/src/components/TableTree/TableTree.scss +1 -1
  158. package/src/components/TableTree/TableTree.tsx +3 -1
  159. package/src/components/Toastify/Toastify.stories.tsx +29 -10
  160. package/src/components/Toastify/Toastify.tsx +42 -16
  161. package/src/components/Toastify/types.ts +2 -0
  162. package/src/index.ts +4 -2
  163. package/src/utils/getSelectOptionValue/getSelectOptionValue.ts +1 -1
  164. package/src/utils/getSequentialPayload/getSequentialPayload.stories.tsx +75 -0
  165. package/src/utils/getSequentialPayload/getSequentialPayload.ts +29 -0
  166. package/src/utils/getSequentialPayload/types.ts +35 -0
  167. package/src/components/ExcelFile/ExcelFile/Excel/reducer.ts +0 -952
  168. package/src/components/ExcelFile/ExcelFile/ExcelFile.scss +0 -24
  169. package/src/components/ExcelFile/ExcelFile/ExcelFile.tsx +0 -162
  170. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.scss +0 -16
  171. package/src/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.tsx +0 -68
  172. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.scss +0 -19
  173. package/src/components/ExcelFile/ExcelToolBar/ExcelToolBar.tsx +0 -291
  174. package/src/fonts/Montserrat/Montserrat-Medium.ttf +0 -0
  175. package/src/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  176. package/src/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
  177. package/src/fonts/Poppins/Poppins-Black.ttf +0 -0
  178. package/src/fonts/Poppins/Poppins-BlackItalic.ttf +0 -0
  179. package/src/fonts/Poppins/Poppins-BoldItalic.ttf +0 -0
  180. package/src/fonts/Poppins/Poppins-ExtraBold.ttf +0 -0
  181. package/src/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +0 -0
  182. package/src/fonts/Poppins/Poppins-ExtraLight.ttf +0 -0
  183. package/src/fonts/Poppins/Poppins-ExtraLightItalic.ttf +0 -0
  184. package/src/fonts/Poppins/Poppins-Italic.ttf +0 -0
  185. package/src/fonts/Poppins/Poppins-Light.ttf +0 -0
  186. package/src/fonts/Poppins/Poppins-LightItalic.ttf +0 -0
  187. package/src/fonts/Poppins/Poppins-MediumItalic.ttf +0 -0
  188. package/src/fonts/Poppins/Poppins-SemiBoldItalic.ttf +0 -0
  189. package/src/fonts/Poppins/Poppins-Thin.ttf +0 -0
  190. package/src/fonts/Poppins/Poppins-ThinItalic.ttf +0 -0
  191. /package/lib/components/{ExcelFile → Excel}/ColorBarSelector/ColorBarSelector.d.ts +0 -0
  192. /package/src/components/{ExcelFile/ColorBarselector → Excel/ColorBarSelector}/ColorBarSelector.scss +0 -0
  193. /package/src/components/{ExcelFile/ColorBarselector → Excel/ColorBarSelector}/ColorBarSelector.tsx +0 -0
  194. /package/src/components/{ExcelFile → Excel}/ContextMenu/ContextMenu.scss +0 -0
  195. /package/src/components/{ExcelFile → Excel}/ContextMenu/ContextMenu.tsx +0 -0
  196. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Copied.tsx +0 -0
  197. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/HeaderRow.tsx +0 -0
  198. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Row.tsx +0 -0
  199. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/Selected.tsx +0 -0
  200. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/areModelsEqual.ts +0 -0
  201. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/context.ts +0 -0
  202. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/engine.ts +0 -0
  203. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/formula.ts +0 -0
  204. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/index.ts +0 -0
  205. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-graph.ts +0 -0
  206. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-hash.ts +0 -0
  207. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/engine/point-set.ts +0 -0
  208. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/index.ts +0 -0
  209. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/matrix.ts +0 -0
  210. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/point-range.ts +0 -0
  211. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/point.ts +0 -0
  212. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/selection.ts +0 -0
  213. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/types.ts +0 -0
  214. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/typings/fast-formula-parser.d.ts +0 -0
  215. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/use-dispatch.ts +0 -0
  216. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/use-selector.ts +0 -0
  217. /package/src/components/{ExcelFile/ExcelFile/Excel → Excel/ExcelFile/ExcelFileComponents}/util.ts +0 -0
  218. /package/src/components/{ExcelFile → Excel}/Types.ts +0 -0
  219. /package/src/components/{ExcelFile → Excel}/index.ts +0 -0
@@ -63,19 +63,31 @@ export interface SelectProps {
63
63
  */
64
64
  optionsRequired?: boolean;
65
65
 
66
- /**
66
+ /*
67
67
  * selectedOptionColor prop provides the custom color for the selected option
68
68
  */
69
69
  selectedOptionColor?: string;
70
70
 
71
- /**
71
+ /*
72
72
  * Label accessor
73
73
  */
74
+
74
75
  labelAccessor?: string;
75
- /**
76
+
77
+ /*
76
78
  * Value accessor
77
79
  */
78
80
  valueAccessor?: string;
81
+
82
+ /*
83
+ * Provide the custom height for the select container
84
+ */
85
+ height?: number;
86
+
87
+ /*
88
+ * Provide the custom width for the select container
89
+ */
90
+ width?: number;
79
91
  }
80
92
 
81
93
  export interface DrowdownPosition {
@@ -95,42 +107,6 @@ export interface SelectState {
95
107
  dropdownPosition: DrowdownPosition;
96
108
  }
97
109
 
98
- export type SelectAction =
99
- | { type: 'FOCUS_INPUT' }
100
- | {
101
- type: 'BLUR_INPUT';
102
- payload: {
103
- optionsList: Option[];
104
- option: Option['value'];
105
- };
106
- }
107
- | { type: 'MOUSE_ENTER' }
108
- | { type: 'MOUSE_LEAVE' }
109
- | {
110
- type: 'UPDATE_DROPDOWN_POSITION';
111
- payload: {
112
- positionX: number;
113
- positionY: number;
114
- width: number;
115
- fromBottom: number;
116
- };
117
- }
118
- | {
119
- type: 'UPDATE_OPTION';
120
- payload: string;
121
- }
122
- | {
123
- type: 'UPDATE_OPTION_LIST';
124
- payload: Option[];
125
- }
126
- | {
127
- type: 'SHOW_ERROR';
128
- payload: {
129
- optionsList: Option[];
130
- option: Option['value'];
131
- };
132
- };
133
-
134
110
  type OptionValue = any;
135
111
 
136
112
  export interface Option {
@@ -24,10 +24,10 @@
24
24
  th {
25
25
  @extend .fontMd;
26
26
  border-bottom: 1px solid var(--slider-table-color);
27
- text-transform: uppercase;
28
27
  }
29
- th:first-child {
30
- div {
28
+ th{
29
+ .ff-label-checkbox-container{
30
+ display: flex;
31
31
  align-items: center;
32
32
  .ff-table-checkbox {
33
33
  padding-right: 8px;
@@ -66,8 +66,9 @@
66
66
  cursor: pointer;
67
67
  }
68
68
  }
69
- td:first-child {
70
- div {
69
+ td{
70
+ .ff-data-checkbox-container {
71
+ display: flex;
71
72
  align-items: center;
72
73
  .ff-table-checkbox {
73
74
  padding-right: 8px;
@@ -1,7 +1,6 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { StoryObj, Meta } from '@storybook/react';
3
3
  import Table from './Table';
4
- import Icon from '../Icon';
5
4
 
6
5
  const meta: Meta<typeof Table> = {
7
6
  title: 'Components/Table',
@@ -160,14 +159,6 @@ const columnsData = [
160
159
  return (
161
160
  <div title={e.value} style={{ color: 'blue' }}>
162
161
  {e.value}
163
- <div style={{ textAlign: 'right' }} className="icon-container">
164
- <span>
165
- <Icon name="edit_icon" height={12} width={12} />
166
- </span>
167
- <span>
168
- <Icon name="delete" height={12} width={12} />
169
- </span>
170
- </div>
171
162
  </div>
172
163
  );
173
164
  },
@@ -89,7 +89,7 @@ const Table = ({
89
89
  key={column.header}
90
90
  style={{ width: column?.width }}
91
91
  >
92
- <div>
92
+ <div className='ff-label-checkbox-container'>
93
93
  {index === 0 && withCheckbox && (
94
94
  <span className="ff-table-checkbox">
95
95
  <Checkbox
@@ -129,7 +129,7 @@ const Table = ({
129
129
  'clickable-cell': column.onClick,
130
130
  })}
131
131
  >
132
- <Typography as="div" color={tableDataTextColor}>
132
+ <Typography as="div" color={tableDataTextColor} className='ff-data-checkbox-container'>
133
133
  {i === 0 && withCheckbox && (
134
134
  <span className="ff-table-checkbox">
135
135
  <Checkbox
@@ -107,7 +107,7 @@
107
107
 
108
108
  .ff-node-li {
109
109
  position: relative;
110
- --indent-size: 16px;
110
+ --indent-size: 18px;
111
111
  --total-children-height: var(--node-height);
112
112
 
113
113
  td:first-child {
@@ -10,6 +10,8 @@ import './TableTree.scss';
10
10
  import RadioButton from '../RadioButton';
11
11
  import Typography from '../Typography';
12
12
 
13
+ import Arrow from '../../assets/icons/arrows_down_icon.svg?react';
14
+
13
15
  interface ColumnDataProps {
14
16
  name: string;
15
17
  accessor: string;
@@ -146,7 +148,7 @@ const TableTree = ({
146
148
  isExpanded ? 'ff-expanded' : 'ff-collapsed'
147
149
  }`}
148
150
  >
149
- <Icon name="arrows_down_icon" height={12} width={12} />
151
+ <Arrow />
150
152
  </span>
151
153
  )}
152
154
  </span>
@@ -25,27 +25,46 @@ export const Controlled: Story = {
25
25
  args: {
26
26
  ...defaultArgs,
27
27
  },
28
- // import { Toastify, toast } from 'pixel-react';
29
28
  render: () => (
30
- <>
29
+
30
+ /*
31
+ Note:-
32
+ import { Toastify, toast } from 'pixel-react';
33
+ */
34
+
35
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>
31
36
  {/* Render Toastify to allow toast notifications */}
32
37
  <Toastify />
33
38
 
34
39
  {/* Button to trigger a toast notification */}
35
40
  <Button
36
41
  variant="primary"
42
+ label="Show Success Toast"
37
43
  onClick={() => toast.success('Your request was successful!')}
38
- >
39
- Show Success Toast
40
- </Button>
41
- <br/>
44
+ />
42
45
  <Button
43
46
  variant="delete"
47
+ label="Show Error Toast"
44
48
  onClick={() => toast.error('Something went wrong!')}
45
- >
46
- Show Error Toast
47
- </Button>
48
- </>
49
+ />
50
+ <Button
51
+ variant="warning"
52
+ label="Show Object Toast"
53
+ onClick={() =>
54
+ toast.warning('Something went wrong!', { a: 'hi', b: '5', c: 10 })
55
+ }
56
+ />
57
+ <Button
58
+ variant="warning"
59
+ label="Show Array Toast"
60
+ onClick={() => toast.warning('Something went wrong!', ['1', 4, 'hi'])}
61
+ />
62
+ <Button
63
+ variant="warning"
64
+ label="Show function Toast"
65
+ onClick={() => toast.warning('Something went wrong!', () => {})}
66
+ />
67
+ </div>
49
68
  ),
50
69
  };
51
70
 
@@ -1,8 +1,12 @@
1
1
  import { useState, useRef } from 'react';
2
2
  import Toaster from '../Toast/Toast';
3
- import { Variant, ToastProps } from './types';
3
+ import { Variant, ToastProps, AcceptedType } from './types';
4
4
 
5
- let openToast: (variant: Variant, message: string) => void;
5
+ let openToast: (
6
+ variant: Variant,
7
+ arg1: AcceptedType,
8
+ arg2?: AcceptedType
9
+ ) => void;
6
10
 
7
11
  export const Toastify = () => {
8
12
  const [toastProps, setToastProps] = useState<ToastProps>({
@@ -14,28 +18,46 @@ export const Toastify = () => {
14
18
 
15
19
  const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
16
20
 
17
- openToast = (variant: Variant, message: string) => {
21
+ openToast = (variant: Variant, arg1: AcceptedType, arg2?: AcceptedType) => {
18
22
  // Clear the previous timeout if it exists
19
23
  if (timeoutRef.current) {
20
24
  clearTimeout(timeoutRef.current);
21
25
  timeoutRef.current = null;
22
26
  }
23
27
 
24
- const title =
25
- variant === 'danger'
26
- ? 'Error!'
27
- : variant.charAt(0).toUpperCase() + variant.slice(1);
28
+ // Set the title and message based on the arguments
29
+ let title = '';
30
+ let message = '';
31
+
32
+ // Function to format message
33
+ const formatMessage = (input: AcceptedType) => {
34
+ if (input && typeof input === 'object') {
35
+ return JSON.stringify(input, null, 2);
36
+ } else if (typeof input === 'function') {
37
+ return input.toString();
38
+ }
39
+ return String(input);
40
+ };
41
+
42
+ // If arg2 exists, use it as the message
43
+ if (arg2 !== undefined) {
44
+ title = formatMessage(arg1);
45
+ message = formatMessage(arg2);
46
+ } else {
47
+ title = formatMessage(arg1);
48
+ message = '';
49
+ }
50
+
51
+ const formattedTitle = title.charAt(0).toUpperCase() + title.slice(1);
52
+
28
53
  // Close the existing toast if open, and then immediately show the new one
29
- setToastProps((prev) => ({
30
- ...prev,
31
- isOpen: false,
32
- }));
54
+ setToastProps((prev) => ({ ...prev, isOpen: false }));
33
55
 
34
56
  setTimeout(() => {
35
57
  setToastProps({
36
58
  isOpen: true,
37
59
  variant,
38
- toastTitle: `${title}!`,
60
+ toastTitle: formattedTitle,
39
61
  toastMessage: message,
40
62
  });
41
63
  }, 10);
@@ -59,8 +81,12 @@ export default Toastify;
59
81
 
60
82
  // Utility to trigger toast messages outside of the Toastify component
61
83
  export const toast = {
62
- success: (message: string) => openToast('success', message),
63
- error: (message: string) => openToast('danger', message),
64
- warning: (message: string) => openToast('warning', message),
65
- info: (message: string) => openToast('info', message),
84
+ success: (arg1: AcceptedType, arg2?: AcceptedType) =>
85
+ openToast('success', arg1, arg2),
86
+ error: (arg1: AcceptedType, arg2?: AcceptedType) =>
87
+ openToast('danger', arg1, arg2),
88
+ warning: (arg1: AcceptedType, arg2?: AcceptedType) =>
89
+ openToast('warning', arg1, arg2),
90
+ info: (arg1: AcceptedType, arg2?: AcceptedType) =>
91
+ openToast('info', arg1, arg2),
66
92
  };
@@ -6,3 +6,5 @@ export interface ToastProps {
6
6
  toastTitle: string;
7
7
  toastMessage: string;
8
8
  }
9
+
10
+ export type AcceptedType = string | (() => void) | Record<string, unknown> | unknown[];
package/src/index.ts CHANGED
@@ -53,7 +53,7 @@ import AttachmentButton from './components/AttachmentButton';
53
53
  import { Toastify, toast } from './components/Toastify/Toastify';
54
54
 
55
55
  import LabelEditTextField from './components/LabelEditTextField';
56
- import ExcelFile from './components/ExcelFile';
56
+ import Excel from './components/Excel';
57
57
  import ModuleChip from './components/ModulesChip/ModuleChip';
58
58
 
59
59
  // Utils imports
@@ -70,6 +70,7 @@ import { compareObjects } from './utils/compareObjects/compareObjects';
70
70
  import { getEncryptedData } from './utils/getEncryptedData/getEncryptedData';
71
71
  import { throttle } from './utils/throttle/throttle';
72
72
  import { truncateText } from './utils/truncateText/truncateText';
73
+ import { getSequentialPayload } from './utils/getSequentialPayload/getSequentialPayload';
73
74
 
74
75
  export {
75
76
  Button,
@@ -126,7 +127,7 @@ export {
126
127
  SequentialConnectingBranch,
127
128
  AttachmentButton,
128
129
  LabelEditTextField,
129
- ExcelFile,
130
+ Excel,
130
131
  IconRadioGroup,
131
132
  Toastify,
132
133
  toast,
@@ -144,4 +145,5 @@ export {
144
145
  throttle,
145
146
  getEncryptedData,
146
147
  truncateText,
148
+ getSequentialPayload,
147
149
  };
@@ -24,7 +24,7 @@ export const getValue = (
24
24
  ) => {
25
25
  if (!accessor) {
26
26
  if (option.hasOwnProperty('value')) {
27
- return option.label;
27
+ return option.value;
28
28
  }
29
29
  }
30
30
  return option[accessor];
@@ -0,0 +1,75 @@
1
+ import React from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { getSequentialPayload } from './getSequentialPayload';
4
+ import {
5
+ SequentialMachineInstance,
6
+ MachineExecutionInstanceDataSet,
7
+ } from './types';
8
+ import { ffid } from '../ffID/ffid';
9
+
10
+ const SequentialPayloadComponent: React.FC<{
11
+ machineInstances: MachineExecutionInstanceDataSet[];
12
+ }> = ({ machineInstances }) => {
13
+ const payload: SequentialMachineInstance[] =
14
+ getSequentialPayload(machineInstances);
15
+
16
+ return (
17
+ <div>
18
+ <h3>Converted Payload</h3>
19
+ <pre>{JSON.stringify(payload, null, 2)}</pre>
20
+ </div>
21
+ );
22
+ };
23
+
24
+ const meta: Meta<typeof SequentialPayloadComponent> = {
25
+ title: 'Utils/getSequentialPayload',
26
+ component: SequentialPayloadComponent,
27
+ parameters: {
28
+ layout: 'centered',
29
+ },
30
+ tags: ['autodocs'],
31
+ };
32
+
33
+ type Story = StoryObj<typeof SequentialPayloadComponent>;
34
+
35
+ export const Primary: Story = {
36
+ args: {
37
+ machineInstances: [
38
+ {
39
+ id: ffid(),
40
+ clientId: 'flinko-client-win-daa67320-d70c-438e-b417-62d76669e7a2',
41
+ numberOfRuns: '3',
42
+ executionEnv: 'Local',
43
+ browserName: 'Google Chrome',
44
+ browserVersion: '107.0.5304.88',
45
+ systemUrl: '',
46
+ machineInfo: {
47
+ osName: 'Windows 11 Home Single Language',
48
+ osVersion: '10.0.22000',
49
+ hostName: 'LAPTOP-T793RVQN',
50
+ },
51
+ deviceInfo: [],
52
+ headless: false,
53
+ runLevelExecutionDataSets: [
54
+ {
55
+ peVariableSetId: 'UUID',
56
+ globalVariableSetId: 'UUID',
57
+ testDataSetId: 'UUID',
58
+ },
59
+ {
60
+ peVariableSetId: 'UUID',
61
+ globalVariableSetId: 'UUID',
62
+ testDataSetId: 'UUID',
63
+ },
64
+ {
65
+ peVariableSetId: 'UUID',
66
+ globalVariableSetId: 'UUID',
67
+ testDataSetId: 'UUID',
68
+ },
69
+ ],
70
+ },
71
+ ],
72
+ },
73
+ };
74
+
75
+ export default meta;
@@ -0,0 +1,29 @@
1
+ import {
2
+ SequentialMachineInstance,
3
+ MachineExecutionInstanceDataSet,
4
+ } from './types';
5
+
6
+ export const getSequentialPayload = (
7
+ machineInstances: MachineExecutionInstanceDataSet[] = []
8
+ ): SequentialMachineInstance[] => {
9
+ return machineInstances.flatMap(
10
+ (machineInstance: MachineExecutionInstanceDataSet) =>
11
+ machineInstance.runLevelExecutionDataSets.map(
12
+ (runLevelExecutionDataSet) => ({
13
+ id: machineInstance.id,
14
+ clientId: machineInstance.clientId,
15
+ numberOfRuns: machineInstance.numberOfRuns,
16
+ executionEnv: machineInstance.executionEnv,
17
+ browserName: machineInstance.browserName,
18
+ browserVersion: machineInstance.browserVersion,
19
+ systemUrl: machineInstance.systemUrl,
20
+ machineInfo: machineInstance.machineInfo,
21
+ deviceInfo: machineInstance.deviceInfo,
22
+ headless: machineInstance.headless,
23
+ peVariableSetId: runLevelExecutionDataSet.peVariableSetId,
24
+ globalVariableSetId: runLevelExecutionDataSet.globalVariableSetId,
25
+ testDataSetId: runLevelExecutionDataSet.testDataSetId,
26
+ })
27
+ )
28
+ );
29
+ };
@@ -0,0 +1,35 @@
1
+ export interface OperatingSystemInfo {
2
+ osName: string;
3
+ osVersion: string;
4
+ hostName: string;
5
+ }
6
+
7
+ export interface RunLevelExecutionDataSet {
8
+ peVariableSetId: string;
9
+ globalVariableSetId: string;
10
+ testDataSetId: string;
11
+ }
12
+
13
+ export interface MachineExecutionInstance {
14
+ id: string;
15
+ clientId: string;
16
+ numberOfRuns: string | number;
17
+ executionEnv: string;
18
+ browserName: string;
19
+ browserVersion: string;
20
+ systemUrl: string;
21
+ machineInfo: OperatingSystemInfo;
22
+ deviceInfo: any[];
23
+ headless: boolean;
24
+ }
25
+
26
+ export interface MachineExecutionInstanceDataSet
27
+ extends MachineExecutionInstance {
28
+ runLevelExecutionDataSets: RunLevelExecutionDataSet[];
29
+ }
30
+
31
+ export interface SequentialMachineInstance extends MachineExecutionInstance {
32
+ peVariableSetId: string;
33
+ globalVariableSetId: string;
34
+ testDataSetId: string;
35
+ }