pixel-react 1.3.8 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. package/lib/StyleGuide/ColorPalette/ColorPalette.stories.d.ts +6 -0
  2. package/lib/StyleGuide/Typography/Typography.stories.d.ts +6 -0
  3. package/lib/components/Accordion/Accordion.stories.d.ts +6 -0
  4. package/lib/components/AddButton/AddButton.d.ts +5 -0
  5. package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
  6. package/lib/components/AddButton/index.d.ts +1 -0
  7. package/lib/components/AddButton/types.d.ts +4 -0
  8. package/lib/components/AddResourceButton/AddButton.stories.d.ts +8 -0
  9. package/lib/components/AllProjectsDropdown/AllProjectsDropdown.stories.d.ts +7 -0
  10. package/lib/components/AppHeader/AppHeader.stories.d.ts +7 -0
  11. package/lib/components/AttachImage/AttachImage.stories.d.ts +7 -0
  12. package/lib/components/AttachmentButton/AttachmentButton.stories.d.ts +9 -0
  13. package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
  14. package/lib/components/Button/Button.stories.d.ts +13 -0
  15. package/lib/components/Charts/BarChart/BarChart.stories.d.ts +6 -0
  16. package/lib/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.d.ts +7 -0
  17. package/lib/components/Charts/DonutChart/DonutChart.stories.d.ts +6 -0
  18. package/lib/components/Charts/IconRadialChart/IconRadialChart.stories.d.ts +8 -0
  19. package/lib/components/Charts/LineChart/LineChart.stories.d.ts +7 -0
  20. package/lib/components/Charts/MultiRadialChart/MultiRadialChart.stories.d.ts +8 -0
  21. package/lib/components/Charts/PieChart/PieChart.stories.d.ts +7 -0
  22. package/lib/components/Charts/RadialChart/RadialChart.stories.d.ts +6 -0
  23. package/lib/components/Checkbox/Checkbox.stories.d.ts +8 -0
  24. package/lib/components/Chip/Chip.stories.d.ts +14 -0
  25. package/lib/components/ConnectingBranch/ConnectingBranch.stories.d.ts +6 -0
  26. package/lib/components/DatePicker/DatePicker.stories.d.ts +9 -0
  27. package/lib/components/DragAndDrop/DragAndDrop.stories.d.ts +6 -0
  28. package/lib/components/Drawer/Drawer.stories.d.ts +12 -0
  29. package/lib/components/EditTextField/EditTextField.stories.d.ts +10 -0
  30. package/lib/components/Editor/Editor.stories.d.ts +6 -0
  31. package/lib/components/Excel/ExcelFile.stories.d.ts +6 -0
  32. package/lib/components/ExcelFile/ChangeExcelStyles.d.ts +14 -0
  33. package/lib/components/ExcelFile/ColorBarSelector/ColorBarSelector.d.ts +8 -0
  34. package/lib/components/ExcelFile/ContextMenu/ContextMenu.d.ts +4 -0
  35. package/lib/components/ExcelFile/ExcelFile/Excel/ActiveCell.d.ts +7 -0
  36. package/lib/components/ExcelFile/ExcelFile/Excel/Cell.d.ts +4 -0
  37. package/lib/components/ExcelFile/ExcelFile/Excel/ColumnIndicator.d.ts +5 -0
  38. package/lib/components/ExcelFile/ExcelFile/Excel/Copied.d.ts +3 -0
  39. package/lib/components/ExcelFile/ExcelFile/Excel/CornerIndicator.d.ts +5 -0
  40. package/lib/components/ExcelFile/ExcelFile/Excel/DataEditor.d.ts +5 -0
  41. package/lib/components/ExcelFile/ExcelFile/Excel/DataViewer.d.ts +8 -0
  42. package/lib/components/ExcelFile/ExcelFile/Excel/FloatingRect.d.ts +10 -0
  43. package/lib/components/ExcelFile/ExcelFile/Excel/HeaderRow.d.ts +3 -0
  44. package/lib/components/ExcelFile/ExcelFile/Excel/Row.d.ts +3 -0
  45. package/lib/components/ExcelFile/ExcelFile/Excel/RowIndicator.d.ts +5 -0
  46. package/lib/components/ExcelFile/ExcelFile/Excel/Selected.d.ts +3 -0
  47. package/lib/components/ExcelFile/ExcelFile/Excel/Spreadsheet.d.ts +80 -0
  48. package/lib/components/ExcelFile/ExcelFile/Excel/Table.d.ts +3 -0
  49. package/lib/components/ExcelFile/ExcelFile/Excel/actions.d.ts +174 -0
  50. package/lib/components/ExcelFile/ExcelFile/Excel/areModelsEqual.d.ts +1 -0
  51. package/lib/components/ExcelFile/ExcelFile/Excel/context.d.ts +8 -0
  52. package/lib/components/ExcelFile/ExcelFile/Excel/engine/engine.d.ts +22 -0
  53. package/lib/components/ExcelFile/ExcelFile/Excel/engine/formula.d.ts +17 -0
  54. package/lib/components/ExcelFile/ExcelFile/Excel/engine/index.d.ts +2 -0
  55. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-graph.d.ts +21 -0
  56. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-hash.d.ts +3 -0
  57. package/lib/components/ExcelFile/ExcelFile/Excel/engine/point-set.d.ts +24 -0
  58. package/lib/components/ExcelFile/ExcelFile/Excel/index.d.ts +13 -0
  59. package/lib/components/ExcelFile/ExcelFile/Excel/matrix.d.ts +67 -0
  60. package/lib/components/ExcelFile/ExcelFile/Excel/point-range.d.ts +22 -0
  61. package/lib/components/ExcelFile/ExcelFile/Excel/point.d.ts +11 -0
  62. package/lib/components/ExcelFile/ExcelFile/Excel/reducer.d.ts +27 -0
  63. package/lib/components/ExcelFile/ExcelFile/Excel/selection.d.ts +95 -0
  64. package/lib/components/ExcelFile/ExcelFile/Excel/types.d.ts +178 -0
  65. package/lib/components/ExcelFile/ExcelFile/Excel/use-dispatch.d.ts +3 -0
  66. package/lib/components/ExcelFile/ExcelFile/Excel/use-selector.d.ts +3 -0
  67. package/lib/components/ExcelFile/ExcelFile/Excel/util.d.ts +44 -0
  68. package/lib/components/ExcelFile/ExcelFile/ExcelFile.d.ts +19 -0
  69. package/lib/components/ExcelFile/ExcelFile.stories.d.ts +6 -0
  70. package/lib/components/ExcelFile/ExcelSheetBar/ExcelSheetBar.d.ts +12 -0
  71. package/lib/components/ExcelFile/ExcelToolBar/ExcelToolBar.d.ts +15 -0
  72. package/lib/components/ExcelFile/ImportExcelStyles.d.ts +24 -0
  73. package/lib/components/ExcelFile/Types.d.ts +129 -0
  74. package/lib/components/ExcelFile/index.d.ts +1 -0
  75. package/lib/components/ExpandableMenu/ExpandableMenu.stories.d.ts +7 -0
  76. package/lib/components/FF_Captcha/captcha.stories.d.ts +8 -0
  77. package/lib/components/FileDropzone/FileDropzone.stories.d.ts +8 -0
  78. package/lib/components/Form/Form.stories.d.ts +7 -0
  79. package/lib/components/GridLayout/GridLayout.stories.d.ts +8 -0
  80. package/lib/components/HighlightText/HighlightText.stories.d.ts +6 -0
  81. package/lib/components/Icon/Icon.stories.d.ts +8 -0
  82. package/lib/components/IconButton/IconButton.stories.d.ts +7 -0
  83. package/lib/components/IconRadioGroup/IconRadioGroup.stories.d.ts +7 -0
  84. package/lib/components/Input/Input.stories.d.ts +9 -0
  85. package/lib/components/InputWithDropdown/InputWithDropdown.stories.d.ts +9 -0
  86. package/lib/components/LabelEditTextField/LabelEditTextField.stories.d.ts +13 -0
  87. package/lib/components/LazyLoad/LazyLoad.stories.d.ts +6 -0
  88. package/lib/components/MachineInputField/MachineInputField.stories.d.ts +6 -0
  89. package/lib/components/MenuOption/MenuOption.stories.d.ts +16 -0
  90. package/lib/components/MiniModal/MiniModal.stories.d.ts +10 -0
  91. package/lib/components/Modal/Modal.stories.d.ts +7 -0
  92. package/lib/components/ModulesChip/ModuleChip.stories.d.ts +6 -0
  93. package/lib/components/MultiSelect/MultiSelect.stories.d.ts +11 -0
  94. package/lib/components/NLPInput/NlpInput.stories.d.ts +7 -0
  95. package/lib/components/Paper/Paper.stories.d.ts +11 -0
  96. package/lib/components/RadioButton/RadioButton.stories.d.ts +10 -0
  97. package/lib/components/RadioGroup/RadioGroup.stories.d.ts +9 -0
  98. package/lib/components/Search/Search.stories.d.ts +6 -0
  99. package/lib/components/Select/Select.stories.d.ts +14 -0
  100. package/lib/components/Select/components/Dropdown/Dropdown.d.ts +4 -0
  101. package/lib/components/Select/components/Dropdown/dropdownTypes.d.ts +17 -0
  102. package/lib/components/SequentialConnectingBranch/SequentialConnectingBranch.stories.d.ts +6 -0
  103. package/lib/components/StateDropdown/StateDropdown.stories.d.ts +10 -0
  104. package/lib/components/StatusButton/StatusButton.stories.d.ts +14 -0
  105. package/lib/components/StatusCard/StatusCard.stories.d.ts +11 -0
  106. package/lib/components/Table/Table.stories.d.ts +13 -0
  107. package/lib/components/TableTree/TableTree.stories.d.ts +7 -0
  108. package/lib/components/Tabs/Tabs.stories.d.ts +9 -0
  109. package/lib/components/TextArea/Textarea.stories.d.ts +9 -0
  110. package/lib/components/Toast/Toast.stories.d.ts +6 -0
  111. package/lib/components/Toastify/Toastify.stories.d.ts +6 -0
  112. package/lib/components/Toggle/Toggle.stories.d.ts +12 -0
  113. package/lib/components/Tooltip/Tooltip.stories.d.ts +15 -0
  114. package/lib/components/Typography/Typography.stories.d.ts +10 -0
  115. package/lib/components/VariableInput/VariableInput.stories.d.ts +6 -0
  116. package/lib/index.d.ts +3 -1
  117. package/lib/index.esm.js +114 -78
  118. package/lib/index.esm.js.map +1 -1
  119. package/lib/index.js +114 -77
  120. package/lib/index.js.map +1 -1
  121. package/lib/tsconfig.tsbuildinfo +1 -1
  122. package/lib/utils/checkEmpty/checkEmpty.stories.d.ts +6 -0
  123. package/lib/utils/compareArrays/compareArrays.stories.d.ts +6 -0
  124. package/lib/utils/compareObjects/compareObjects.stories.d.ts +6 -0
  125. package/lib/utils/debounce/debounce.stories.d.ts +6 -0
  126. package/lib/utils/downloadFile/saveFileFromBlob.d.ts +1 -0
  127. package/lib/utils/ffID/ffID.stories.d.ts +6 -0
  128. package/lib/utils/find/findAndInsert.d.ts +7 -0
  129. package/lib/utils/find/findAndInsert.stories.d.ts +7 -0
  130. package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +7 -0
  131. package/lib/utils/getEncryptedData/getEncryptedData.stories.d.ts +6 -0
  132. package/lib/utils/getExtension/getExtension.stories.d.ts +6 -0
  133. package/lib/utils/getSequentialPayload/getSequentialPayload.stories.d.ts +10 -0
  134. package/lib/utils/throttle/throttle.stories.d.ts +6 -0
  135. package/lib/utils/truncateText/truncateText.stories.d.ts +6 -0
  136. package/package.json +1 -1
  137. package/src/assets/icons/sample_template_first.svg +29 -0
  138. package/src/assets/icons/sample_template_second.svg +47 -0
  139. package/src/assets/styles/_fonts.scss +4 -4
  140. package/src/components/AllProjectsDropdown/AllProjectsDropdown.scss +2 -3
  141. package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +1 -0
  142. package/src/components/AppHeader/AppHeader.scss +0 -1
  143. package/src/components/Icon/Icon.tsx +1 -0
  144. package/src/components/Icon/iconList.ts +6 -2
  145. package/src/components/Modal/Modal.tsx +2 -2
  146. package/src/index.ts +2 -0
  147. package/src/utils/downloadFile/saveFileFromBlob.stories.tsx +62 -0
  148. package/src/utils/downloadFile/saveFileFromBlob.ts +40 -0
  149. /package/lib/assets/fonts/{Poppins/Poppins-Bold.ttf → Poppins-Bold.ttf} +0 -0
  150. /package/lib/assets/fonts/{Poppins/Poppins-Medium.ttf → Poppins-Medium.ttf} +0 -0
  151. /package/lib/assets/fonts/{Poppins/Poppins-Regular.ttf → Poppins-Regular.ttf} +0 -0
  152. /package/lib/assets/fonts/{Poppins/Poppins-SemiBold.ttf → Poppins-SemiBold.ttf} +0 -0
  153. /package/src/assets/fonts/{Poppins/Poppins-Bold.ttf → Poppins-Bold.ttf} +0 -0
  154. /package/src/assets/fonts/{Poppins/Poppins-Medium.ttf → Poppins-Medium.ttf} +0 -0
  155. /package/src/assets/fonts/{Poppins/Poppins-Regular.ttf → Poppins-Regular.ttf} +0 -0
  156. /package/src/assets/fonts/{Poppins/Poppins-SemiBold.ttf → Poppins-SemiBold.ttf} +0 -0
  157. /package/src/assets/icons/{fireflink_standard_template.svg → standard_template.svg} +0 -0
@@ -8,7 +8,7 @@
8
8
  font-weight: 400;
9
9
  src:
10
10
  local('Poppins-Regular'),
11
- url(../../assets/fonts/Poppins/Poppins-Regular.ttf) format('truetype');
11
+ url(../../assets/fonts/Poppins-Regular.ttf) format('truetype');
12
12
  }
13
13
 
14
14
  @font-face {
@@ -16,7 +16,7 @@
16
16
  font-weight: 500;
17
17
  src:
18
18
  local('Poppins-Medium'),
19
- url(../../assets/fonts/Poppins/Poppins-Medium.ttf) format('truetype');
19
+ url(../../assets/fonts/Poppins-Medium.ttf) format('truetype');
20
20
  }
21
21
 
22
22
  @font-face {
@@ -24,7 +24,7 @@
24
24
  font-weight: 600;
25
25
  src:
26
26
  local('Poppins-SemiBold'),
27
- url(../../assets/fonts/Poppins/Poppins-SemiBold.ttf) format('truetype');
27
+ url(../../assets/fonts/Poppins-SemiBold.ttf) format('truetype');
28
28
  }
29
29
 
30
30
  @font-face {
@@ -32,7 +32,7 @@
32
32
  font-weight: 700;
33
33
  src:
34
34
  local('Poppins-Bold'),
35
- url(../../assets/fonts/Poppins/Poppins-Bold.ttf) format('truetype');
35
+ url(../../assets/fonts/Poppins-Bold.ttf) format('truetype');
36
36
  }
37
37
 
38
38
  .fontXs {
@@ -47,9 +47,8 @@
47
47
  }
48
48
  }
49
49
  .scroll {
50
- max-height: 90px;
51
- // overflow-y: scroll;
52
- overflow: hidden;
50
+ max-height: 256px;
51
+ overflow-x: hidden;
53
52
  text-overflow: ellipsis;
54
53
  white-space: nowrap;
55
54
  &::-webkit-scrollbar {
@@ -63,6 +63,7 @@ const AllProjectsDropdown = ({
63
63
  color="var(--primary-icon-color)"
64
64
  height={8}
65
65
  width={8}
66
+ hoverEffect={false}
66
67
  />
67
68
  </div>
68
69
  </div>
@@ -20,7 +20,6 @@
20
20
  border-radius: 20px;
21
21
  padding: 5px;
22
22
  z-index: 1000;
23
- // overflow-x: hidden;
24
23
  .ff-app-header-nav-bar-items {
25
24
  display: flex;
26
25
  align-items: center;
@@ -54,6 +54,7 @@ const Icon = forwardRef<HTMLSpanElement, IconProps>(
54
54
  className: classNames('ff-icon-container', {
55
55
  'ff-icon-click': hoverEffect,
56
56
  'ff-icon-disabled': disabled,
57
+ 'ff-icon-dark': variant === "dark",
57
58
  [className]: !!className,
58
59
  }),
59
60
  ...props,
@@ -159,7 +159,9 @@ import DrawerMaximizeIcon from '../../assets/icons/drawer_maximize.svg?react';
159
159
  import SaveAsStepIcon from '../../assets/icons/save_as_step.svg?react';
160
160
  import SendToStepsIcon from '../../assets/icons/send_step.svg?react';
161
161
  import NoLicenseFound from '../../assets/icons/no_license_found.svg?react';
162
- import FireFlinkStandardTemplate from '../../assets/icons/fireflink_standard_template.svg?react';
162
+ import StandardTemplate from '../../assets/icons/standard_template.svg?react';
163
+ import SampleTemplateFirst from '../../assets/icons/sample_template_first.svg?react';
164
+ import SampleTemplateSecond from '../../assets/icons/sample_template_second.svg?react';
163
165
  import DataProvider from '../../assets/icons/data_provider.svg?react';
164
166
  import LinkExpired from '../../assets/icons/link_expired.svg?react';
165
167
  import LinkReset from '../../assets/icons/reset-link.svg?react';
@@ -338,7 +340,9 @@ Components['flaky_status_icon'] = FlakyStatusIcon;
338
340
  Components['drawer_maximize'] = DrawerMaximizeIcon;
339
341
  Components['save_as_step'] = SaveAsStepIcon;
340
342
  Components['send_to_steps'] = SendToStepsIcon;
341
- Components['fireflink_standard_template'] = FireFlinkStandardTemplate;
343
+ Components['standard_template'] = StandardTemplate;
344
+ Components['sample_template_first'] = SampleTemplateFirst;
345
+ Components['sample_template_second'] = SampleTemplateSecond;
342
346
  Components['no_license_found'] = NoLicenseFound;
343
347
  Components['data_provider'] = DataProvider;
344
348
  Components['link_expired'] = LinkExpired;
@@ -58,9 +58,9 @@ const Modal: React.FC<ModalProps> = ({
58
58
  <div
59
59
  style={{
60
60
  boxShadow: boxShadow,
61
- borderRadius: isHeaderDisplayed || isFooterDisplayed ? '12px' : '0px', // Apply based on conditions
61
+ borderRadius: '12px' ,
62
62
  }}
63
- className="ff-modal-container" // New container class for consistency
63
+ className="ff-modal-container"
64
64
  >
65
65
  <div
66
66
  className={classNames(
package/src/index.ts CHANGED
@@ -80,6 +80,7 @@ import MultiRadialChart from './components/Charts/MultiRadialChart';
80
80
  import Editor from './components/Editor/Editor';
81
81
  import { getSequentialPayload } from './utils/getSequentialPayload/getSequentialPayload';
82
82
  import ConnectingBranch from './components/ConnectingBranch/ConnectingBranch';
83
+ import { saveFileFromBlob } from './utils/downloadFile/saveFileFromBlob'
83
84
 
84
85
  export {
85
86
  Button,
@@ -163,4 +164,5 @@ export {
163
164
  getEncryptedData,
164
165
  truncateText,
165
166
  getSequentialPayload,
167
+ saveFileFromBlob,
166
168
  };
@@ -0,0 +1,62 @@
1
+ import { saveFileFromBlob } from './saveFileFromBlob';
2
+ import { Toastify, toast } from '../../components/Toastify/Toastify';
3
+
4
+ export default {
5
+ title: 'Utils/saveFileFromBlob',
6
+ component: saveFileFromBlob,
7
+ };
8
+
9
+ export const Default = () => {
10
+ const testCases = [
11
+ {
12
+ blob: new Blob(['Hello, world!'], { type: 'text/plain' }),
13
+ filename: 'hello.txt',
14
+ },
15
+ {
16
+ blob: new Blob(['{ "key": "value" }'], { type: 'application/json' }),
17
+ filename: 'data.json',
18
+ },
19
+ {
20
+ blob: null,
21
+ filename: 'invalid.txt',
22
+ expectedError: 'Invalid Blob object',
23
+ },
24
+ ];
25
+
26
+ const handleDownload = (blob: Blob | null, filename: string) => {
27
+ try {
28
+ if (blob instanceof Blob) {
29
+ saveFileFromBlob(blob, filename);
30
+ toast.success(`File "${filename}" downloaded successfully!`);
31
+ } else {
32
+ throw new Error('Invalid Blob object');
33
+ }
34
+ } catch (error: any) {
35
+ toast.error(error.message);
36
+ }
37
+ };
38
+
39
+ return (
40
+ <>
41
+ <div>
42
+ <h1>saveFileFromBlob - Test Cases</h1>
43
+ {testCases.map(({ blob, filename, expectedError }, index) => (
44
+ <div key={index} style={{ marginBottom: '1rem' }}>
45
+ <button
46
+ onClick={() => handleDownload(blob as Blob, filename)}
47
+ style={{ marginRight: '1rem' }}
48
+ >
49
+ Download {filename}
50
+ </button>
51
+ {expectedError && (
52
+ <span style={{ color: 'red' }}>
53
+ Expected Error: {expectedError}
54
+ </span>
55
+ )}
56
+ </div>
57
+ ))}
58
+ </div>
59
+ <Toastify />
60
+ </>
61
+ );
62
+ };
@@ -0,0 +1,40 @@
1
+ // saveFileFromBlob.ts
2
+
3
+ /**
4
+ * Save a file from a Blob object.
5
+ * This utility handles downloading files in browsers, including IE support.
6
+ *
7
+ * @param blob - The Blob object representing the file.
8
+ * @param filename - The name of the file to save.
9
+ */
10
+ interface NavigatorWithMsSaveBlob extends Navigator {
11
+ msSaveOrOpenBlob?: (_blob: Blob, _filename: string) => void;
12
+ }
13
+
14
+ export const saveFileFromBlob = (blob: Blob, filename: string): void => {
15
+ if (!blob || !(blob instanceof Blob)) {
16
+ console.error('Invalid Blob object');
17
+ throw new Error('Invalid Blob object');
18
+ }
19
+
20
+ const navigatorWithMsSaveBlob = window.navigator as NavigatorWithMsSaveBlob;
21
+
22
+ if (navigatorWithMsSaveBlob.msSaveOrOpenBlob) {
23
+ const saveBlob = navigatorWithMsSaveBlob.msSaveOrOpenBlob;
24
+ if (saveBlob) {
25
+ saveBlob(blob, filename);
26
+ }
27
+ } else {
28
+ // For modern browsers
29
+ const anchorElement = document.createElement('a');
30
+ document.body.appendChild(anchorElement);
31
+ const objectURL = window.URL.createObjectURL(blob);
32
+ anchorElement.href = objectURL;
33
+ anchorElement.download = filename;
34
+ anchorElement.click();
35
+ setTimeout(() => {
36
+ window.URL.revokeObjectURL(objectURL);
37
+ document.body.removeChild(anchorElement);
38
+ }, 0);
39
+ }
40
+ };