pixel-react 1.7.5 → 1.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/lib/1fb4472b34e4fe07.css +1 -0
  3. package/lib/StyleGuide/ColorPalette/ColorPalette.stories.d.ts +6 -0
  4. package/lib/StyleGuide/Typography/Typography.stories.d.ts +6 -0
  5. package/lib/components/Accordion/Accordion.stories.d.ts +6 -0
  6. package/lib/components/AddResourceButton/AddButton.stories.d.ts +8 -0
  7. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +7 -0
  8. package/lib/components/AppHeader/AppHeader.stories.d.ts +7 -0
  9. package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +9 -0
  10. package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
  11. package/lib/components/Button/Button.stories.d.ts +13 -0
  12. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +7 -0
  13. package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +6 -0
  14. package/lib/components/Charts/PieChart/PieChart.stories.d.ts +7 -0
  15. package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +6 -0
  16. package/lib/components/Checkbox/Checkbox.stories.d.ts +8 -0
  17. package/lib/components/Chip/Chip.stories.d.ts +14 -0
  18. package/lib/components/ConditionalDropdown/types.d.ts +1 -1
  19. package/lib/components/DatePicker/DatePicker.stories.d.ts +9 -0
  20. package/lib/components/DragAndDrop/DragAndDrop.stories.d.ts +6 -0
  21. package/lib/components/Drawer/Drawer.stories.d.ts +12 -0
  22. package/lib/components/ExcelFile/ColorBarselector/ColorBarSelector.d.ts +8 -0
  23. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
  24. package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
  25. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
  26. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
  27. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
  28. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
  29. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
  30. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
  31. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
  32. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
  33. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
  34. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
  35. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +80 -0
  36. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
  37. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +174 -0
  38. package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
  39. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
  40. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
  41. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
  42. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
  43. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
  44. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
  45. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
  46. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
  47. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
  48. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
  49. package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
  50. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
  51. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
  52. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +178 -0
  53. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
  54. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
  55. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +44 -0
  56. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +19 -0
  57. package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
  58. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +12 -0
  59. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +15 -0
  60. package/lib/components/ExcelFile/Types.d.ts +129 -0
  61. package/lib/components/ExcelFile/index.d.ts +1 -0
  62. package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +7 -0
  63. package/lib/components/FF_Captcha/captcha.stories.d.ts +8 -0
  64. package/lib/components/FileDropzone/FileDropzone.stories.d.ts +8 -0
  65. package/lib/components/FileDropzone/types.d.ts +12 -4
  66. package/lib/components/Form/Form.stories.d.ts +7 -0
  67. package/lib/components/GridLayout/GridLayout.stories.d.ts +8 -0
  68. package/lib/components/HighlightText/HighlightText.stories.d.ts +6 -0
  69. package/lib/components/Icon/Icon.stories.d.ts +8 -0
  70. package/lib/components/IconButton/IconButton.stories.d.ts +7 -0
  71. package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
  72. package/lib/components/Input/Input.stories.d.ts +9 -0
  73. package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +9 -0
  74. package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +11 -0
  75. package/lib/components/LazyLoad/LazyLoad.stories.d.ts +6 -0
  76. package/lib/components/MachineInputField/MachineInputField.stories.d.ts +6 -0
  77. package/lib/components/MenuOption/MenuOption.stories.d.ts +16 -0
  78. package/lib/components/MenuOption/types.d.ts +1 -1
  79. package/lib/components/MiniModal/MiniModal.stories.d.ts +10 -0
  80. package/lib/components/Modal/Modal.stories.d.ts +7 -0
  81. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
  82. package/lib/components/MultiSelect/MultiSelect.stories.d.ts +10 -0
  83. package/lib/components/NLPInput/NlpInput.stories.d.ts +7 -0
  84. package/lib/components/Paper/Paper.stories.d.ts +11 -0
  85. package/lib/components/PopUpModal/types.d.ts +2 -1
  86. package/lib/components/RadioButton/RadioButton.stories.d.ts +10 -0
  87. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +9 -0
  88. package/lib/components/Search/Search.stories.d.ts +6 -0
  89. package/lib/components/Select/Select.stories.d.ts +13 -0
  90. package/lib/components/Select/components/Dropdown/Dropdown.d.ts +4 -0
  91. package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +17 -0
  92. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +6 -0
  93. package/lib/components/StateDropdown/StateDropdown.stories.d.ts +10 -0
  94. package/lib/components/StatusButton/StatusButton.stories.d.ts +14 -0
  95. package/lib/components/Table/Table.stories.d.ts +13 -0
  96. package/lib/components/TableTree/TableTree.stories.d.ts +7 -0
  97. package/lib/components/Tabs/Tabs.stories.d.ts +9 -0
  98. package/lib/components/TextArea/Textarea.stories.d.ts +9 -0
  99. package/lib/components/Toast/Toast.stories.d.ts +6 -0
  100. package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
  101. package/lib/components/Toggle/Toggle.stories.d.ts +12 -0
  102. package/lib/components/Tooltip/Tooltip.stories.d.ts +15 -0
  103. package/lib/components/Typography/Typography.stories.d.ts +10 -0
  104. package/lib/components/VariableInput/VariableInput.stories.d.ts +6 -0
  105. package/lib/index.d.ts +69 -63
  106. package/lib/index.esm.js +188 -253
  107. package/lib/index.esm.js.map +1 -1
  108. package/lib/index.js +188 -253
  109. package/lib/index.js.map +1 -1
  110. package/lib/tsconfig.tsbuildinfo +1 -1
  111. package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +6 -0
  112. package/lib/utils/compareArrays/compareArrays.stories.d.ts +6 -0
  113. package/lib/utils/compareObjects/compareObjects.stories.d.ts +6 -0
  114. package/lib/utils/debounce/debounce.stories.d.ts +6 -0
  115. package/lib/utils/ffID/ffID.stories.d.ts +6 -0
  116. package/lib/utils/find/findAndInsert.d.ts +7 -0
  117. package/lib/utils/find/findAndInsert.stories.d.ts +7 -0
  118. package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +7 -0
  119. package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +6 -0
  120. package/lib/utils/getExtension/getExtension.stories.d.ts +6 -0
  121. package/lib/utils/throttle/throttle.stories.d.ts +6 -0
  122. package/lib/utils/truncateText/truncateText.stories.d.ts +6 -0
  123. package/package.json +1 -1
  124. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.scss +4 -0
  125. package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +1 -1
  126. package/src/components/ConditionalDropdown/ConditionalDropdown.stories.tsx +1 -1
  127. package/src/components/ConditionalDropdown/types.ts +1 -1
  128. package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +8 -8
  129. package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +1 -5
  130. package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +4 -3
  131. package/src/components/Excel/ExcelToolBar/ExcelToolBar.tsx +35 -27
  132. package/src/components/FileDropzone/Dropzone.tsx +3 -0
  133. package/src/components/FileDropzone/FileDropzone.scss +18 -0
  134. package/src/components/FileDropzone/FileDropzone.stories.tsx +75 -7
  135. package/src/components/FileDropzone/FileDropzone.tsx +2 -0
  136. package/src/components/FileDropzone/RadioFilePreview.tsx +7 -3
  137. package/src/components/FileDropzone/types.ts +13 -4
  138. package/src/components/MenuOption/MenuOption.stories.tsx +2 -3
  139. package/src/components/MenuOption/MenuOption.tsx +27 -29
  140. package/src/components/MenuOption/types.ts +1 -1
  141. package/src/components/PopUpModal/types.ts +4 -3
  142. package/src/components/Search/Search.stories.tsx +1 -2
  143. package/lib/assets/fonts/Poppins-Bold.ttf +0 -0
  144. package/lib/assets/fonts/Poppins-Medium.ttf +0 -0
  145. package/lib/assets/fonts/Poppins-Regular.ttf +0 -0
  146. package/lib/assets/fonts/Poppins-SemiBold.ttf +0 -0
  147. package/lib/components/TableTree/TableTree copy.d.ts +0 -25
  148. /package/lib/components/{Excel → ExcelFile}/ContextMenu/ContextMenu.d.ts +0 -0
@@ -8,14 +8,18 @@ import { useRef } from 'react';
8
8
  const RadioFilePreview: React.FC<RadioFilePreviewProps> = ({
9
9
  selectedFile,
10
10
  onFileRemoveClick,
11
- onFileReplaceClick
11
+ onFileReplaceClick,
12
+ selectedRadioOption,
13
+ setShowDrawer,
12
14
  }) => {
13
15
  const fileInputRef = useRef<HTMLInputElement | null>(null);
14
16
 
15
17
  const handleReplaceClick = () => {
16
- if (fileInputRef.current) {
17
- fileInputRef.current.click();
18
+ if (selectedRadioOption?.value === 'Test Data') {
19
+ setShowDrawer?.(true);
20
+ return;
18
21
  }
22
+ fileInputRef.current?.click();
19
23
  };
20
24
 
21
25
  const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { DynamicObj } from '../CreateVariable/types';
2
3
  export interface RadioOption {
3
4
  label: string;
4
5
  value: string;
@@ -93,12 +94,12 @@ export interface FileDropzoneProps {
93
94
  /**
94
95
  * Its the File Name of File Selected from Local File.
95
96
  **/
96
- setSelectedFile?: (file: File | null) => void;
97
+ setSelectedFile?: (file: File | DynamicObj | null) => void;
97
98
 
98
99
  /**
99
100
  * Its the File Name of File Selected from Local File.
100
101
  **/
101
- selectedFile?: File | null;
102
+ selectedFile?: File | DynamicObj | null;
102
103
 
103
104
  /**
104
105
  * Its the function which updates the Selected file from Local Directory.
@@ -120,6 +121,11 @@ export interface FileDropzoneProps {
120
121
  **/
121
122
  isDisable?: boolean;
122
123
 
124
+ /**
125
+ * Its the boolean value setted when the replace is clicked for TestData radio option .
126
+ **/
127
+ setShowDrawer?: (value: boolean | ((prevState: boolean) => boolean)) => void;
128
+
123
129
  }
124
130
  export interface FileState {
125
131
  accepted: File[];
@@ -176,11 +182,12 @@ export interface DroppableProps {
176
182
  selectedRadioOption?: Option,
177
183
  radioOptions?: RadioOption[],
178
184
  handleOptionChange?: (option: RadioOption)=> void,
179
- selectedFile?: File | null,
180
- setSelectedFile?: (file: File | null) => void;
185
+ selectedFile?: File | DynamicObj | null,
186
+ setSelectedFile?: (file: File | DynamicObj | null) => void;
181
187
  handleFileChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
182
188
  handleRemoveFile?: () => void;
183
189
  isDisable?: boolean;
190
+ setShowDrawer?: (value: boolean | ((prevState: boolean) => boolean)) => void;
184
191
  }
185
192
 
186
193
  export interface FilePreviewProps {
@@ -196,4 +203,6 @@ export interface RadioFilePreviewProps {
196
203
  onFileRemoveClick?: () => void;
197
204
  onFileReplaceClick?: (file: File | null) => void;
198
205
  setSelectedFile?: (file: File | null) => void;
206
+ selectedRadioOption?: Option,
207
+ setShowDrawer?: (value: boolean | ((prevState: boolean) => boolean)) => void
199
208
  }
@@ -135,13 +135,12 @@ export const MenuOptionBottom: Story = {
135
135
  dropdownPlacement: 'down',
136
136
  },
137
137
  render: (args) => {
138
- const moreRef = useRef<HTMLDivElement>(null);
139
138
  return (
140
- <div ref={moreRef}>
139
+ <div id="more">
141
140
  <MenuOption
142
141
  {...args}
143
142
  options={options}
144
- targetRef={moreRef}
143
+ targetRef={'more'}
145
144
  onOptionClick={handleOptionClick}
146
145
  />
147
146
  </div>
@@ -57,9 +57,9 @@ const OptionCard = ({
57
57
 
58
58
  useEffect(() => {
59
59
  if (optionCardRef?.current) {
60
- const rect = optionCardRef.current.getBoundingClientRect();
61
- setOptionsHeight(rect.height);
62
- setOptionsWidth(rect.width);
60
+ const rect = optionCardRef?.current?.getBoundingClientRect();
61
+ setOptionsHeight(rect?.height);
62
+ setOptionsWidth(rect?.width);
63
63
  }
64
64
  }, []);
65
65
 
@@ -74,7 +74,7 @@ const OptionCard = ({
74
74
  };
75
75
  case 'down':
76
76
  return {
77
- top: menuPosition.top + menuPosition.height + 7,
77
+ top: menuPosition.top + 20,
78
78
  left: menuPosition.left - 4,
79
79
  };
80
80
  case 'left':
@@ -85,22 +85,16 @@ const OptionCard = ({
85
85
  case 'right':
86
86
  return {
87
87
  top: menuPosition.top - 4,
88
- left: menuPosition.left + menuPosition.height + 20,
88
+ left: menuPosition.left + 20,
89
89
  };
90
90
  default:
91
91
  return {
92
- top: menuPosition.top,
93
- left: menuPosition.left,
92
+ top: menuPosition.bottom,
93
+ left: menuPosition.rightSpaceAvailable + 12,
94
94
  };
95
95
  }
96
96
  })();
97
97
 
98
- const adjustedStyle = {
99
- top: Math.min(Math.max(style.top, 0), window.innerHeight - optionsHeight),
100
- left: Math.min(Math.max(style.left, 0), window.innerWidth - optionsWidth),
101
- zIndex,
102
- };
103
-
104
98
  return createPortal(
105
99
  <div
106
100
  className={classNames(
@@ -108,7 +102,7 @@ const OptionCard = ({
108
102
  [{ 'ff-option-card--primary': variant === 'primary' }],
109
103
  currentTheme
110
104
  )}
111
- style={adjustedStyle}
105
+ style={{ ...style, zIndex }}
112
106
  ref={optionCardRef}
113
107
  >
114
108
  {options.map((opt) => (
@@ -147,21 +141,6 @@ const MenuOption = ({
147
141
 
148
142
  const closeDropDown = () => setIsClicked(false);
149
143
 
150
- const calculateDims = () => {
151
- if (targetRef?.current) {
152
- const rect = targetRef.current.getBoundingClientRect();
153
- const containerScrollTop = targetRef.current?.offsetParent?.scrollTop || 0;
154
- const containerScrollLeft = targetRef.current?.offsetParent?.scrollLeft || 0;
155
-
156
- setMenuPosition({
157
- top: rect.top + window.scrollY - containerScrollTop,
158
- left: rect.left + window.scrollX - containerScrollLeft,
159
- height: rect.height,
160
- right: rect.right,
161
- });
162
- }
163
- };
164
-
165
144
  const onIconClickHandler = () => {
166
145
  onClick();
167
146
  calculateDims();
@@ -173,6 +152,25 @@ const MenuOption = ({
173
152
  closeDropDown();
174
153
  };
175
154
 
155
+ const calculateDims = () => {
156
+ let targetElement: HTMLElement | null = null;
157
+ if (typeof targetRef === 'string') {
158
+ targetElement = document.getElementById(targetRef);
159
+ } else if (targetRef && targetRef.current) {
160
+ targetElement = targetRef.current;
161
+ }
162
+
163
+ if (targetElement) {
164
+ const rect = targetElement.getBoundingClientRect();
165
+ setMenuPosition({
166
+ top: rect.top + window.scrollY,
167
+ left: rect.left + window.scrollX,
168
+ height: rect.height,
169
+ right: rect.right,
170
+ });
171
+ }
172
+ };
173
+
176
174
  return (
177
175
  <div className="ff-menu-option-container" ref={menuRef}>
178
176
  <Tooltip title={tooltipTitle} placement={tooltipPlacement}>
@@ -208,7 +208,7 @@ interface MenuOptionProps {
208
208
  * @optional
209
209
  */
210
210
  optionCardVariant?: 'primary';
211
- targetRef?: React.RefObject<HTMLElement>;
211
+ targetRef?: string | React.RefObject<HTMLElement>;
212
212
  }
213
213
 
214
214
  interface OptionProps {
@@ -5,12 +5,13 @@ export interface PopUpModalProps {
5
5
  titleMessage: string;
6
6
  subTitleMessage?: string;
7
7
  iconName: string;
8
- modalMessage: string;
8
+ modalMessage: string | React.ReactNode;
9
+ secondaryMessage?: string | React.ReactNode;
9
10
  firstButtonLabel?: string;
10
11
  secondButtonLabel: string;
11
12
  buttonVariant: any;
12
13
  border: string;
13
- popupWidth?:string,
14
+ popupWidth?: string;
14
15
  colorForTitleMessage?: string;
15
- footerContent?:React.ReactNode;
16
+ footerContent?: React.ReactNode;
16
17
  }
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react';
2
2
  import Search from './Search';
3
- import React,{ useState } from 'react';
3
+ import React, { useState } from 'react';
4
4
  const meta: Meta<typeof Search> = {
5
5
  title: 'Components/Search',
6
6
  component: Search,
@@ -17,7 +17,6 @@ export const Default: Story = {
17
17
  const [searchValue, setSearchValue] = useState('');
18
18
 
19
19
  const handleSearch = (value: string) => {
20
- alert(`Searching for: ${value}`);
21
20
  setSearchValue(value);
22
21
  };
23
22
 
Binary file
Binary file
@@ -1,25 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import './TableTree.scss';
3
- interface ColumnDataProps {
4
- name: string;
5
- accessor: string;
6
- width: string;
7
- isClickable?: boolean;
8
- minWidth?: string;
9
- cell?: (e: any) => JSX.Element | string | ReactNode;
10
- actions?: (e: any) => JSX.Element | string | ReactNode;
11
- }
12
- interface ObjectProps {
13
- [key: string]: any;
14
- }
15
- interface TableTreeProps {
16
- select: 'checkbox' | 'radio' | 'none';
17
- columnsData: Array<ColumnDataProps>;
18
- treeData: Array<ObjectProps>;
19
- onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: any) => void;
20
- onChange?: (e: any, node: any) => void;
21
- selected: Array<string>;
22
- onPagination?: (node: ObjectProps) => void;
23
- }
24
- declare const TableTree: ({ columnsData, treeData, select, onClick, onChange, selected, onPagination, }: TableTreeProps) => import("react/jsx-runtime").JSX.Element;
25
- export default TableTree;