pixel-react-excel-sheet 1.0.20 → 1.0.22
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.
- package/lib/components/Chip/types.d.ts +1 -1
- package/lib/components/ConditionalDropdown/OptionsDropdown.d.ts +5 -0
- package/lib/components/ConditionalDropdown/types.d.ts +50 -4
- package/lib/components/LabelEditTextField/types.d.ts +1 -0
- package/lib/components/MachineInputField/types.d.ts +1 -0
- package/lib/components/MenuOption/MenuOption.d.ts +1 -1
- package/lib/components/MenuOption/types.d.ts +2 -1
- package/lib/components/MiniModal/types.d.ts +1 -0
- package/lib/components/NLPInput/NlpInput.d.ts +2 -2
- package/lib/components/NLPInput/components/NlpDropDown/NlpDropDownType.d.ts +6 -3
- package/lib/components/NLPInput/components/NlpDropDown/NlpDropdown.d.ts +1 -1
- package/lib/components/NLPInput/sampleData.d.ts +104 -0
- package/lib/components/NLPInput/types.d.ts +80 -0
- package/lib/components/ProgressBar/ProgressBar.d.ts +5 -0
- package/lib/components/ProgressBar/index.d.ts +1 -0
- package/lib/components/ProgressBar/types.d.ts +12 -0
- package/lib/components/SequentialConnectingBranch/components/Branches/Branches.d.ts +1 -1
- package/lib/components/SequentialConnectingBranch/components/Branches/types.d.ts +1 -0
- package/lib/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.d.ts +1 -1
- package/lib/components/SequentialConnectingBranch/components/ConnectingBranches/types.d.ts +1 -0
- package/lib/components/SequentialConnectingBranch/types.d.ts +1 -1
- package/lib/components/TableTree/types.d.ts +1 -1
- package/lib/hooks/useIntersectionObserver.d.ts +9 -0
- package/lib/index.d.ts +80 -28
- package/lib/index.esm.js +725 -408
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +725 -407
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/functionCheck/functionCheck.d.ts +2 -0
- package/package.json +1 -1
- package/src/StyleGuide/ColorPalette/colorPaletteList.ts +5 -0
- package/src/assets/Themes/BaseTheme.scss +18 -3
- package/src/assets/Themes/DarkTheme.scss +15 -2
- package/src/assets/icons/ai_search.svg +9 -0
- package/src/assets/icons/help_icon.svg +10 -0
- package/src/assets/icons/ios_icon.svg +11 -0
- package/src/assets/icons/plus_round_icon.svg +38 -0
- package/src/assets/icons/tick_icon.svg +2 -2
- package/src/assets/styles/_colors.scss +1 -1
- package/src/components/AttachmentButton/AttachmentButton.tsx +1 -1
- package/src/components/Checkbox/Checkbox.scss +3 -1
- package/src/components/Checkbox/Checkbox.stories.tsx +32 -77
- package/src/components/Checkbox/Checkbox.tsx +3 -4
- package/src/components/Chip/Chip.scss +15 -5
- package/src/components/Chip/Chip.stories.tsx +10 -1
- package/src/components/Chip/Chip.tsx +5 -1
- package/src/components/Chip/types.ts +1 -1
- package/src/components/ConditionalDropdown/ConditionalDropdown.scss +4 -0
- package/src/components/ConditionalDropdown/ConditionalDropdown.stories.tsx +67 -2
- package/src/components/ConditionalDropdown/ConditionalDropdown.tsx +58 -28
- package/src/components/ConditionalDropdown/OptionsDropdown.tsx +44 -0
- package/src/components/ConditionalDropdown/types.ts +61 -4
- package/src/components/EditTextField/EditTextField.scss +1 -1
- package/src/components/EditTextField/EditTextField.tsx +14 -20
- package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +0 -3
- package/src/components/Excel/ExcelFile/ExcelFileComponents/HeaderRow.tsx +1 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +1 -0
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +30 -1
- package/src/components/Form/Forms.tsx +0 -2
- package/src/components/Icon/iconList.ts +9 -0
- package/src/components/LabelEditTextField/LabelEditTextField.scss +1 -1
- package/src/components/LabelEditTextField/LabelEditTextField.tsx +29 -36
- package/src/components/LabelEditTextField/types.ts +1 -0
- package/src/components/MachineInputField/MachineInputField.scss +1 -5
- package/src/components/MachineInputField/MachineInputField.stories.tsx +4 -4
- package/src/components/MachineInputField/MachineInputField.tsx +4 -1
- package/src/components/MachineInputField/types.ts +1 -0
- package/src/components/MenuOption/MenuOption.scss +7 -7
- package/src/components/MenuOption/MenuOption.stories.tsx +83 -28
- package/src/components/MenuOption/MenuOption.tsx +9 -13
- package/src/components/MenuOption/types.ts +3 -2
- package/src/components/MiniModal/MiniModal.scss +0 -1
- package/src/components/MiniModal/MiniModal.stories.tsx +6 -1
- package/src/components/MiniModal/MiniModal.tsx +3 -1
- package/src/components/MiniModal/types.ts +1 -0
- package/src/components/MultiSelect/Dropdown.scss +3 -4
- package/src/components/MultiSelect/Dropdown.tsx +4 -3
- package/src/components/MultiSelect/MultiSelect.scss +1 -0
- package/src/components/MultiSelect/MultiSelect.tsx +1 -0
- package/src/components/NLPInput/NLPInput.scss +77 -21
- package/src/components/NLPInput/NlpInput.stories.tsx +43 -109
- package/src/components/NLPInput/NlpInput.tsx +95 -59
- package/src/components/NLPInput/components/NlpDropDown/NlpDropDownType.ts +6 -4
- package/src/components/NLPInput/components/NlpDropDown/NlpDropdown.scss +86 -35
- package/src/components/NLPInput/components/NlpDropDown/NlpDropdown.tsx +220 -80
- package/src/components/NLPInput/sampleData.ts +162 -0
- package/src/components/NLPInput/{type.tsx → types.tsx} +23 -11
- package/src/components/ProgressBar/ProgressBar.scss +46 -0
- package/src/components/ProgressBar/ProgressBar.stories.tsx +22 -0
- package/src/components/ProgressBar/ProgressBar.tsx +61 -0
- package/src/components/ProgressBar/index.ts +1 -0
- package/src/components/ProgressBar/types.ts +12 -0
- package/src/components/Search/Search.tsx +9 -1
- package/src/components/SequentialConnectingBranch/SequentialConnectingBranch.tsx +2 -0
- package/src/components/SequentialConnectingBranch/components/Branches/Branches.tsx +8 -0
- package/src/components/SequentialConnectingBranch/components/Branches/types.ts +1 -0
- package/src/components/SequentialConnectingBranch/components/ConnectingBranches/ConnectingBranches.tsx +2 -0
- package/src/components/SequentialConnectingBranch/components/ConnectingBranches/types.ts +1 -0
- package/src/components/SequentialConnectingBranch/types.ts +1 -1
- package/src/components/Table/Table.scss +1 -0
- package/src/components/TableTree/Components/TableBody.tsx +3 -1
- package/src/components/TableTree/TableTree.stories.tsx +2 -2
- package/src/components/TableTree/TableTree.tsx +24 -14
- package/src/components/TableTree/data.ts +45 -0
- package/src/components/TableTree/types.ts +1 -1
- package/src/hooks/useIntersectionObserver.tsx +56 -0
- package/src/index.ts +2 -0
- package/src/utils/functionCheck/functionCheck.ts +8 -0
|
@@ -26,7 +26,11 @@ const Chip = ({
|
|
|
26
26
|
{ ['ff-default-chip-style--fullText']: !!fullText }
|
|
27
27
|
)}
|
|
28
28
|
>
|
|
29
|
-
{labelText &&
|
|
29
|
+
{labelText && (
|
|
30
|
+
<Typography as="p" fontSize={10} fontWeight="semi-bold">
|
|
31
|
+
{labelText}
|
|
32
|
+
</Typography>
|
|
33
|
+
)}
|
|
30
34
|
</button>
|
|
31
35
|
</div>
|
|
32
36
|
);
|
|
@@ -10,7 +10,7 @@ export interface ChipsProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* The variant of the Chip.
|
|
12
12
|
*/
|
|
13
|
-
variant?: 'primary' | 'success' | 'error' | 'warning' | 'custom' | 'public' | 'partial-public' | 'private' | 'disabled';
|
|
13
|
+
variant?: 'primary' | 'success' | 'error' | 'warning' | 'custom' | 'public' | 'partial-public' | 'private' | 'disabled' | 'count';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* The callback function to be executed when the Chip is clicked.
|
|
@@ -20,7 +20,8 @@ export default {
|
|
|
20
20
|
},
|
|
21
21
|
} as Meta<ConditionalDropdownProps>;
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
type Story = StoryObj<typeof ConditionalDropdown>;
|
|
24
|
+
|
|
24
25
|
const Template: StoryFn<ConditionalDropdownProps> = (args) => {
|
|
25
26
|
const [inputValue, setInputValue] = useState<string>('');
|
|
26
27
|
const [openCreateVariable, setOpenCreateVariable] = useState<boolean>(false);
|
|
@@ -74,9 +75,73 @@ Default.args = {
|
|
|
74
75
|
onCreateVariableClick: () => alert('Create Variable clicked'),
|
|
75
76
|
};
|
|
76
77
|
|
|
77
|
-
// Customized story with pre-filled input value
|
|
78
78
|
export const WithInitialValue = Template.bind({});
|
|
79
79
|
WithInitialValue.args = {
|
|
80
80
|
inputValue: 'Initial Text with $',
|
|
81
81
|
onCreateVariableClick: () => alert('Create Variable clicked'),
|
|
82
82
|
};
|
|
83
|
+
|
|
84
|
+
export const DropdownOnHash: Story = {
|
|
85
|
+
render: () => {
|
|
86
|
+
const [hashInputValue, setHashInputValue] = useState<
|
|
87
|
+
dynamicObject | undefined
|
|
88
|
+
>();
|
|
89
|
+
const testData = [
|
|
90
|
+
{
|
|
91
|
+
_id: '1',
|
|
92
|
+
name: 'File1.txt',
|
|
93
|
+
actualPath: '/documents/File1.txt',
|
|
94
|
+
searchKey: 'file1',
|
|
95
|
+
parentId: 'root',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
_id: '2',
|
|
99
|
+
name: 'File2.doc',
|
|
100
|
+
actualPath: '/documents/File2.doc',
|
|
101
|
+
searchKey: 'file2',
|
|
102
|
+
parentId: 'root',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
_id: '3',
|
|
106
|
+
name: 'Image1.png',
|
|
107
|
+
actualPath: '/images/Image1.png',
|
|
108
|
+
searchKey: 'image1',
|
|
109
|
+
parentId: 'folder1',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
_id: '4',
|
|
113
|
+
name: 'Presentation.ppt',
|
|
114
|
+
actualPath: '/presentations/Presentation.ppt',
|
|
115
|
+
searchKey: 'presentation',
|
|
116
|
+
parentId: 'folder2',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
_id: '5',
|
|
120
|
+
name: 'Spreadsheet.xlsx',
|
|
121
|
+
actualPath: '/spreadsheets/Spreadsheet.xlsx',
|
|
122
|
+
searchKey: 'spreadsheet',
|
|
123
|
+
parentId: 'folder3',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
_id: '6',
|
|
127
|
+
name: 'Code.js',
|
|
128
|
+
actualPath: '/projects/Code.js',
|
|
129
|
+
searchKey: 'code',
|
|
130
|
+
parentId: 'folder4',
|
|
131
|
+
},
|
|
132
|
+
];
|
|
133
|
+
|
|
134
|
+
return (
|
|
135
|
+
<>
|
|
136
|
+
<ConditionalDropdown
|
|
137
|
+
label="Select Path Using #"
|
|
138
|
+
placeholder="Enter # to search files"
|
|
139
|
+
isHash
|
|
140
|
+
dataFiles={testData}
|
|
141
|
+
dropdownWidth="auto"
|
|
142
|
+
setHashInputValue={setHashInputValue}
|
|
143
|
+
/>
|
|
144
|
+
</>
|
|
145
|
+
);
|
|
146
|
+
},
|
|
147
|
+
};
|
|
@@ -5,15 +5,20 @@ import Input from '../Input';
|
|
|
5
5
|
import { ConditionalDropdownProps, dynamicObject } from './types';
|
|
6
6
|
import './ConditionalDropdown.scss';
|
|
7
7
|
import React, { useState, useRef, useEffect } from 'react';
|
|
8
|
+
import OptionsDropdown from './OptionsDropdown';
|
|
8
9
|
|
|
9
10
|
const ConditionalDropdown: React.FC<ConditionalDropdownProps> = ({
|
|
10
11
|
label = '',
|
|
12
|
+
hashInputValue = '',
|
|
13
|
+
setHashInputValue,
|
|
11
14
|
variableList = [],
|
|
12
15
|
placeholder = 'Enter text',
|
|
13
16
|
onChange,
|
|
14
17
|
onCreateVariableClick,
|
|
15
18
|
value = '',
|
|
16
19
|
dropdownWidth = 'inherit',
|
|
20
|
+
isHash = false,
|
|
21
|
+
dataFiles = [],
|
|
17
22
|
...props
|
|
18
23
|
}) => {
|
|
19
24
|
const [inputValue, setInputValue] = useState<string>('');
|
|
@@ -21,6 +26,7 @@ const ConditionalDropdown: React.FC<ConditionalDropdownProps> = ({
|
|
|
21
26
|
const [cursorPosition, setCursorPosition] = useState<number | null>(null);
|
|
22
27
|
const [showCreateVariableIcon, setShowCreateVariableIcon] =
|
|
23
28
|
useState<boolean>(false);
|
|
29
|
+
const [filteredOptions, setFilteredOptions] = useState<dynamicObject[]>([]);
|
|
24
30
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
25
31
|
|
|
26
32
|
useEffect(() => {
|
|
@@ -31,37 +37,48 @@ const ConditionalDropdown: React.FC<ConditionalDropdownProps> = ({
|
|
|
31
37
|
}, [cursorPosition]);
|
|
32
38
|
|
|
33
39
|
useEffect(() => {
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
if (inputValue.startsWith('#') && isHash) {
|
|
41
|
+
const searchQuery = inputValue.slice(1).toLowerCase();
|
|
42
|
+
const filtered = dataFiles.filter((file) =>
|
|
43
|
+
file.name.toLowerCase().includes(searchQuery)
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
setFilteredOptions(filtered);
|
|
47
|
+
setShowDropdown(filtered.length > 0);
|
|
48
|
+
} else if (!isHash) {
|
|
49
|
+
const newPayload = replaceVariablesWithIds(inputValue);
|
|
50
|
+
onChange?.(newPayload);
|
|
51
|
+
}
|
|
36
52
|
}, [inputValue]);
|
|
37
53
|
|
|
38
54
|
const replaceVariablesWithIds = (input: string): string => {
|
|
39
55
|
return input.replace(/\${.*?_(.*?)}/g, (_, variableName) => {
|
|
40
|
-
// Find the matching variable in the list by name
|
|
41
56
|
const foundVariable = variableList.find(
|
|
42
57
|
(varaible) => varaible.name === variableName.trim()
|
|
43
58
|
);
|
|
44
|
-
return foundVariable ? `\${${foundVariable.id}}` : `\${${variableName}}`;
|
|
59
|
+
return foundVariable ? `\${${foundVariable.id}}` : `\${${variableName}}`;
|
|
45
60
|
});
|
|
46
61
|
};
|
|
47
62
|
|
|
48
63
|
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
49
64
|
const fieldValue = event.target.value;
|
|
50
65
|
setInputValue(fieldValue);
|
|
51
|
-
|
|
52
|
-
// Show dropdown only if the last character typed is `$`
|
|
53
66
|
const cursorPos = inputRef.current?.selectionStart || 0;
|
|
54
67
|
const isDollarTyped = fieldValue[cursorPos - 1] === '$';
|
|
55
68
|
|
|
56
|
-
if (
|
|
57
|
-
setShowDropdown(
|
|
69
|
+
if (isHash) {
|
|
70
|
+
setShowDropdown(fieldValue.startsWith('#'));
|
|
58
71
|
} else {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
if (isDollarTyped) {
|
|
73
|
+
setShowDropdown(true);
|
|
74
|
+
} else {
|
|
75
|
+
setShowDropdown(false);
|
|
76
|
+
}
|
|
77
|
+
if (fieldValue?.includes('$')) {
|
|
78
|
+
setShowCreateVariableIcon(false);
|
|
79
|
+
} else {
|
|
80
|
+
setShowCreateVariableIcon(true);
|
|
81
|
+
}
|
|
65
82
|
}
|
|
66
83
|
};
|
|
67
84
|
|
|
@@ -78,14 +95,18 @@ const ConditionalDropdown: React.FC<ConditionalDropdownProps> = ({
|
|
|
78
95
|
: 'PEV'
|
|
79
96
|
}_${item.name}}`;
|
|
80
97
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
98
|
+
let newValue;
|
|
99
|
+
if (isHash && inputValue[0] === '#') {
|
|
100
|
+
newValue = item.name + inputValue.slice(selectionEnd || 1);
|
|
101
|
+
} else {
|
|
102
|
+
newValue =
|
|
103
|
+
inputValue.slice(0, selectionStart || 0) +
|
|
104
|
+
dollarSyntax +
|
|
105
|
+
inputValue.slice(selectionEnd || 0);
|
|
106
|
+
}
|
|
107
|
+
setHashInputValue?.(item);
|
|
85
108
|
setInputValue(newValue);
|
|
86
109
|
setCursorPosition((selectionStart || 0) + dollarSyntax.length);
|
|
87
|
-
|
|
88
|
-
// Close the dropdown after inserting the variable
|
|
89
110
|
setShowDropdown(false);
|
|
90
111
|
}
|
|
91
112
|
};
|
|
@@ -104,7 +125,7 @@ const ConditionalDropdown: React.FC<ConditionalDropdownProps> = ({
|
|
|
104
125
|
label={label}
|
|
105
126
|
placeholder={placeholder}
|
|
106
127
|
/>
|
|
107
|
-
{!checkEmpty(value) && showCreateVariableIcon && (
|
|
128
|
+
{!checkEmpty(value) && !isHash && showCreateVariableIcon && (
|
|
108
129
|
<Icon
|
|
109
130
|
onClick={onCreateVariableClick}
|
|
110
131
|
name="add_variable"
|
|
@@ -115,13 +136,22 @@ const ConditionalDropdown: React.FC<ConditionalDropdownProps> = ({
|
|
|
115
136
|
)}
|
|
116
137
|
</div>
|
|
117
138
|
{showDropdown && (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
139
|
+
isHash ? (
|
|
140
|
+
<OptionsDropdown
|
|
141
|
+
position="relative"
|
|
142
|
+
width={dropdownWidth}
|
|
143
|
+
filteredOptions={filteredOptions}
|
|
144
|
+
onSelectVariable={handleDropdownClick}
|
|
145
|
+
/>
|
|
146
|
+
) : (
|
|
147
|
+
<VariableDropdown
|
|
148
|
+
position="relative"
|
|
149
|
+
width={dropdownWidth}
|
|
150
|
+
optionsList={variableList}
|
|
151
|
+
onSelectVariable={handleDropdownClick}
|
|
152
|
+
/>
|
|
153
|
+
)
|
|
154
|
+
)}
|
|
125
155
|
</div>
|
|
126
156
|
);
|
|
127
157
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import { dynamicObject, OptionsDropdownProps } from './types';
|
|
3
|
+
import './ConditionalDropdown.scss';
|
|
4
|
+
import Typography from '../Typography';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
|
|
7
|
+
const OptionsDropdown:FC<OptionsDropdownProps> = ({
|
|
8
|
+
onSelectVariable,
|
|
9
|
+
dropdownPosition,
|
|
10
|
+
filteredOptions= [],
|
|
11
|
+
position = 'relative',
|
|
12
|
+
width = '300px',
|
|
13
|
+
}): ReactNode => {
|
|
14
|
+
return (
|
|
15
|
+
<div
|
|
16
|
+
className={classNames('ff-variable-dropdown', position)}
|
|
17
|
+
style={
|
|
18
|
+
dropdownPosition
|
|
19
|
+
? {
|
|
20
|
+
top: dropdownPosition.top + 30,
|
|
21
|
+
left: dropdownPosition.left - 30,
|
|
22
|
+
width,
|
|
23
|
+
}
|
|
24
|
+
: { width }
|
|
25
|
+
}
|
|
26
|
+
>
|
|
27
|
+
{filteredOptions?.map((option: dynamicObject): ReactNode => {
|
|
28
|
+
return (
|
|
29
|
+
<div
|
|
30
|
+
className="ff-variable-option"
|
|
31
|
+
onClick={() => onSelectVariable(option)}
|
|
32
|
+
key={option?.id}
|
|
33
|
+
>
|
|
34
|
+
<Typography as="span" fontSize={14}>
|
|
35
|
+
{option?.name}
|
|
36
|
+
</Typography>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
})}
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default OptionsDropdown;
|
|
@@ -1,12 +1,33 @@
|
|
|
1
|
+
import { dropdownPositionType } from "../Editor/types";
|
|
2
|
+
|
|
1
3
|
export type dynamicObject = {
|
|
2
4
|
[key: string]: any;
|
|
3
5
|
};
|
|
4
6
|
|
|
7
|
+
export type TestDataObject = {
|
|
8
|
+
_id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
actualPath: string;
|
|
11
|
+
searchKey: string;
|
|
12
|
+
parentId: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
5
15
|
export interface ConditionalDropdownProps {
|
|
6
16
|
/**
|
|
7
17
|
* Label for the field
|
|
8
18
|
*/
|
|
9
19
|
label?: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Value in the input should stored in this state
|
|
23
|
+
*/
|
|
24
|
+
hashInputValue?: TestDataObject | dynamicObject;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Function storing and updating the inputValue state
|
|
28
|
+
*/
|
|
29
|
+
setHashInputValue?:(value: dynamicObject | undefined) => void;
|
|
30
|
+
|
|
10
31
|
/**
|
|
11
32
|
* List of variables
|
|
12
33
|
*/
|
|
@@ -20,7 +41,7 @@ export interface ConditionalDropdownProps {
|
|
|
20
41
|
* @param value
|
|
21
42
|
* @returns
|
|
22
43
|
*/
|
|
23
|
-
onChange
|
|
44
|
+
onChange?: (value: string) => void;
|
|
24
45
|
/**
|
|
25
46
|
* Function to handle create variable icon click
|
|
26
47
|
*/
|
|
@@ -32,11 +53,11 @@ export interface ConditionalDropdownProps {
|
|
|
32
53
|
/**
|
|
33
54
|
* Name | name of the input field
|
|
34
55
|
*/
|
|
35
|
-
name
|
|
56
|
+
name?: string;
|
|
36
57
|
/**
|
|
37
58
|
* value | input field value
|
|
38
59
|
*/
|
|
39
|
-
value
|
|
60
|
+
value?: string;
|
|
40
61
|
/**
|
|
41
62
|
* variants to set color/style of the input field
|
|
42
63
|
*/
|
|
@@ -44,7 +65,7 @@ export interface ConditionalDropdownProps {
|
|
|
44
65
|
/**
|
|
45
66
|
* type to set color/style of the input field
|
|
46
67
|
*/
|
|
47
|
-
type
|
|
68
|
+
type?: 'text' | 'password' | 'number' | 'email' | 'url' | 'time';
|
|
48
69
|
/**
|
|
49
70
|
* error | If true, error message will be displayed
|
|
50
71
|
*/
|
|
@@ -100,4 +121,40 @@ export interface ConditionalDropdownProps {
|
|
|
100
121
|
* isLabelRequired for the input field without label,showing placeholder
|
|
101
122
|
*/
|
|
102
123
|
isLabelRequired?: boolean;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* If true, dropdown opens when '#' is entered at the first position.
|
|
127
|
+
*/
|
|
128
|
+
isHash?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Options for the dropdown when `isHash` is true.
|
|
131
|
+
*/
|
|
132
|
+
dataFiles?: dynamicObject[];
|
|
103
133
|
}
|
|
134
|
+
|
|
135
|
+
export interface OptionsDropdownProps {
|
|
136
|
+
/**
|
|
137
|
+
* Position whether absoloute or relative
|
|
138
|
+
*/
|
|
139
|
+
position: 'absolute' | 'relative';
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Dropdown width
|
|
143
|
+
*/
|
|
144
|
+
width: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* chars entered to search in Input :
|
|
148
|
+
*/
|
|
149
|
+
filteredOptions?: dynamicObject[];
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Function to handle click on variable
|
|
153
|
+
*/
|
|
154
|
+
onSelectVariable: (variable: object) => void;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Dropdown postion used for dropdown placement
|
|
158
|
+
*/
|
|
159
|
+
dropdownPosition?: dropdownPositionType;
|
|
160
|
+
}
|
|
@@ -6,6 +6,7 @@ import HighlightText from '../HighlightText';
|
|
|
6
6
|
import Icon from '../Icon';
|
|
7
7
|
import Tooltip from '../Tooltip';
|
|
8
8
|
import { capitalize } from '../../utils/capitalize/capitalize';
|
|
9
|
+
import Input from '../Input/Input';
|
|
9
10
|
|
|
10
11
|
const getErrorMessage = (
|
|
11
12
|
inputValue: string,
|
|
@@ -38,8 +39,8 @@ const EditTextField: FC<LabelEditTextFieldTypes> = ({
|
|
|
38
39
|
cancelIcon,
|
|
39
40
|
editIcon,
|
|
40
41
|
dropdownData = [],
|
|
41
|
-
width = '
|
|
42
|
-
height = '
|
|
42
|
+
// width = '',
|
|
43
|
+
// height = '',
|
|
43
44
|
isOpen = false,
|
|
44
45
|
confirmAction,
|
|
45
46
|
onClick,
|
|
@@ -52,6 +53,7 @@ const EditTextField: FC<LabelEditTextFieldTypes> = ({
|
|
|
52
53
|
);
|
|
53
54
|
const [showError, setShowError] = useState('');
|
|
54
55
|
const [isTextFieldModified, setIsTextFieldModified] = useState(false);
|
|
56
|
+
const isThrowingError = showError && isEditing ? true : false;
|
|
55
57
|
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
56
58
|
const cancelRef = useRef<HTMLDivElement | null>(null);
|
|
57
59
|
|
|
@@ -96,27 +98,19 @@ const EditTextField: FC<LabelEditTextFieldTypes> = ({
|
|
|
96
98
|
{isEditing ? (
|
|
97
99
|
<div className="ff-label-text-field">
|
|
98
100
|
<div className="ff-label-text-field-without-dropdown">
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
+
<Input
|
|
102
|
+
name="input"
|
|
103
|
+
label={label ? label : ''}
|
|
104
|
+
disabled={false}
|
|
105
|
+
error={isThrowingError}
|
|
106
|
+
placeholder="Enter your name"
|
|
101
107
|
value={inputValue}
|
|
102
108
|
onChange={handleTextFieldChange}
|
|
103
|
-
className={`
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
} ${isTextFieldModified ? 'modified' : ''}`}
|
|
108
|
-
placeholder=" "
|
|
109
|
-
style={{ width, height }}
|
|
109
|
+
className={`
|
|
110
|
+
|
|
111
|
+
${isTextFieldModified ? 'modified' : ''}`}
|
|
112
|
+
type="text"
|
|
110
113
|
/>
|
|
111
|
-
<label
|
|
112
|
-
className={`ff-textfield-label ${
|
|
113
|
-
showError && isEditing
|
|
114
|
-
? 'ff-text-field-error-text'
|
|
115
|
-
: 'ff-text-field-text'
|
|
116
|
-
}`}
|
|
117
|
-
>
|
|
118
|
-
{label}
|
|
119
|
-
</label>
|
|
120
114
|
</div>
|
|
121
115
|
<div className="ff-icon-container">
|
|
122
116
|
{confirmIcon && (
|
|
@@ -113,14 +113,11 @@ const ColumnIndicator: Types.ColumnIndicatorComponent = ({
|
|
|
113
113
|
tabIndex={0}
|
|
114
114
|
>
|
|
115
115
|
<div
|
|
116
|
-
style={{ position: 'fixed' }}
|
|
117
116
|
onClick={handleClick}
|
|
118
117
|
onContextMenu={contextClick}
|
|
119
118
|
tabIndex={0}>
|
|
120
|
-
|
|
121
119
|
</div>
|
|
122
120
|
{label !== undefined ? label : columnIndexToLabel(column)}
|
|
123
|
-
|
|
124
121
|
<div
|
|
125
122
|
onMouseDown={onMouseDown}
|
|
126
123
|
onClick={() => activate({ row: -1, column })}
|
|
@@ -99,7 +99,7 @@ export type Props<CellType extends Types.CellBase> = {
|
|
|
99
99
|
onEvaluatedDataChange?: (data: Matrix.Matrix<CellType>) => void;
|
|
100
100
|
setContextMenu: React.Dispatch<React.SetStateAction<Types.ContextMenuState>>;
|
|
101
101
|
/** Set your dynamic sheet Height*/
|
|
102
|
-
|
|
102
|
+
sheetHeight: string;
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
/**
|
|
@@ -352,6 +352,35 @@ const Spreadsheet = <CellType extends Types.CellBase>(
|
|
|
352
352
|
const tableNode = React.useMemo(
|
|
353
353
|
() => (
|
|
354
354
|
<Table columns={size.columns}>
|
|
355
|
+
<HeaderRow >
|
|
356
|
+
{<CornerIndicator />}
|
|
357
|
+
{range(size.columns).map((columnNumber) =>
|
|
358
|
+
columnLabels ? (
|
|
359
|
+
<ColumnIndicator
|
|
360
|
+
key={columnNumber}
|
|
361
|
+
column={columnNumber}
|
|
362
|
+
setContextMenu={props.setContextMenu}
|
|
363
|
+
label={
|
|
364
|
+
columnNumber in columnLabels
|
|
365
|
+
? columnLabels[columnNumber]
|
|
366
|
+
: null
|
|
367
|
+
}
|
|
368
|
+
deleteColumn={deleteColumn}
|
|
369
|
+
addColumnLeft={addColumnLeft}
|
|
370
|
+
data={props.data}
|
|
371
|
+
/>
|
|
372
|
+
) : (
|
|
373
|
+
<ColumnIndicator
|
|
374
|
+
key={columnNumber}
|
|
375
|
+
column={columnNumber}
|
|
376
|
+
setContextMenu={props.setContextMenu}
|
|
377
|
+
deleteColumn={deleteColumn}
|
|
378
|
+
addColumnLeft={addColumnLeft}
|
|
379
|
+
data={props.data}
|
|
380
|
+
/>
|
|
381
|
+
)
|
|
382
|
+
)}
|
|
383
|
+
</HeaderRow>
|
|
355
384
|
<HeaderRow>
|
|
356
385
|
{<CornerIndicator />}
|
|
357
386
|
{range(size.columns).map((columnNumber) =>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef, useImperativeHandle } from 'react';
|
|
2
2
|
import Form from './Form';
|
|
3
|
-
|
|
4
3
|
interface FormProps<T extends Form.FieldValues> extends Form.UseFormProps<T> {
|
|
5
4
|
id?: string;
|
|
6
5
|
onSubmit: Form.SubmitHandler<T>;
|
|
@@ -16,7 +15,6 @@ const Forms = <T extends Form.FieldValues>(
|
|
|
16
15
|
ref: React.Ref<any>
|
|
17
16
|
) => {
|
|
18
17
|
const methods = Form.useForm<T>(rest);
|
|
19
|
-
|
|
20
18
|
const { handleSubmit } = methods;
|
|
21
19
|
const extendedMethods = {
|
|
22
20
|
...methods,
|
|
@@ -117,6 +117,8 @@ import HideAccessIcon from '../../assets/icons/hide_access_icon.svg?react';
|
|
|
117
117
|
import AddLocator from '../../assets/icons/add_locator.svg?react';
|
|
118
118
|
import PlusUserIcon from '../../assets/icons/plus_user_icon.svg?react';
|
|
119
119
|
|
|
120
|
+
import IosIcon from '../../assets/icons/ios_icon.svg?react';
|
|
121
|
+
import HelpIcon from '../../assets/icons/help_icon.svg?react';
|
|
120
122
|
import SwitchLicenseIcon from '../../assets/icons/switch_license_icon.svg?react';
|
|
121
123
|
import FireflinkLogo from '../../assets/icons/fireflink_logo.svg?react';
|
|
122
124
|
import WSWBDeleteIcon from '../../assets/icons/wswb_delete_icon.svg?react';
|
|
@@ -142,6 +144,7 @@ import NotificationIcon from '../../assets/icons/notification_icon.svg?react';
|
|
|
142
144
|
import NLPHelpIcon from '../../assets/icons/nlp_help_icon.svg?react';
|
|
143
145
|
import UpdateIcon from '../../assets/icons/update_icon.svg?react';
|
|
144
146
|
import AddFile from '../../assets/icons/add_file.svg?react';
|
|
147
|
+
import PlusRoundIcon from '../../assets/icons/plus_round_icon.svg?react';
|
|
145
148
|
import EyeClosed from '../../assets/icons/eye_closed.svg?react';
|
|
146
149
|
import AttachmentIcon from '../../assets/icons/attachment_icon.svg?react';
|
|
147
150
|
import AuthorizationIcon from '../../assets/icons/authorization_icon.svg?react';
|
|
@@ -192,6 +195,8 @@ import SystemWarning from '../../assets/icons/system_warning.svg?react';
|
|
|
192
195
|
import UserPasswordLock from '../../assets/icons/user_password_lock.svg?react';
|
|
193
196
|
import UserWarning from '../../assets/icons/user_warning.svg?react';
|
|
194
197
|
import UserWithSystem from '../../assets/icons/user_with_system.svg?react';
|
|
198
|
+
import AiSearch from '../../assets/icons/ai_search.svg?react';
|
|
199
|
+
|
|
195
200
|
import Import from '../../assets/icons/import.svg?react';
|
|
196
201
|
import dashboardWebIcon from '../../assets/icons/dashboard_web_icon.svg?react';
|
|
197
202
|
import dashboardMobileIcon from '../../assets/icons/dashboard_mobile_icon.svg?react';
|
|
@@ -352,6 +357,8 @@ Components['android_icon'] = AndroidIcon;
|
|
|
352
357
|
Components['plus_user_icon'] = PlusUserIcon;
|
|
353
358
|
Components['label_plus'] = LabelPlusIcon;
|
|
354
359
|
Components['manual_locator'] = ManualLocator;
|
|
360
|
+
Components['ios_icon'] = IosIcon;
|
|
361
|
+
Components['help_icon'] = HelpIcon;
|
|
355
362
|
Components['select_license'] = SwitchLicenseIcon;
|
|
356
363
|
Components['fireflink-logo'] = FireflinkLogo;
|
|
357
364
|
Components['wswb_delete_icon'] = WSWBDeleteIcon;
|
|
@@ -383,6 +390,7 @@ Components['notification_icon'] = NotificationIcon;
|
|
|
383
390
|
Components['nlp_help_icon'] = NLPHelpIcon;
|
|
384
391
|
Components['update_icon'] = UpdateIcon;
|
|
385
392
|
Components['add_file'] = AddFile;
|
|
393
|
+
Components['plus_round_icon'] = PlusRoundIcon;
|
|
386
394
|
Components['clone_icon'] = CloneIcon;
|
|
387
395
|
Components['move_icon'] = MoveIcon;
|
|
388
396
|
Components['jira'] = Jira;
|
|
@@ -395,6 +403,7 @@ Components['hide_access_icon'] = HideAccessIcon;
|
|
|
395
403
|
Components['eye_closed'] = EyeClosed;
|
|
396
404
|
Components['attachment_icon'] = AttachmentIcon;
|
|
397
405
|
Components['authorization_icon'] = AuthorizationIcon;
|
|
406
|
+
Components['ai_search'] = AiSearch;
|
|
398
407
|
|
|
399
408
|
Components['fireflink_platform_logo'] = FireflinkPlatform;
|
|
400
409
|
Components['fireflink_finder_logo'] = FireflinkFinder;
|