abdul-react 0.0.27 → 0.0.29
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/CreateVariable/CreateVariableSlider.js +15 -7
- package/lib/components/CreateVariable/CreateVariableSlider.js.map +1 -1
- package/lib/components/Editor/Editor.js +3 -0
- package/lib/components/Editor/Editor.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFile.d.ts +7 -6
- package/lib/components/Excel/ExcelFile/ExcelFile.js +106 -21
- package/lib/components/Excel/ExcelFile/ExcelFile.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js +16 -5
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.d.ts +2 -0
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js +9 -3
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.js.map +1 -1
- package/lib/components/Excel/ExcelFile/ExcelFileComponents/types.d.ts +2 -0
- package/lib/components/Excel/ExcelToolBar/ExcelToolBar.js +5 -1
- package/lib/components/Excel/ExcelToolBar/ExcelToolBar.js.map +1 -1
- package/lib/components/InputWithDropdown/InputWithDropdown.js +1 -1
- package/lib/components/InputWithDropdown/InputWithDropdown.js.map +1 -1
- package/lib/components/MenuOption/MenuOption.js +7 -2
- package/lib/components/MenuOption/MenuOption.js.map +1 -1
- package/lib/components/NLPInput/NlpInput.js +2 -2
- package/lib/components/NLPInput/NlpInput.js.map +1 -1
- package/lib/components/NLPInput/components/ChipsFolder/ChipsAccordion.js +2 -2
- package/lib/components/NLPInput/components/ChipsFolder/ChipsAccordion.js.map +1 -1
- package/lib/components/TextEditor/TextEditor.js +38 -35
- package/lib/components/TextEditor/TextEditor.js.map +1 -1
- package/lib/index.cjs +200 -76
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +7 -6
- package/lib/node_modules/js-beautify/js/src/html/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/package.json +1 -1
|
@@ -141,15 +141,44 @@ const TextEditor = ({
|
|
|
141
141
|
return jsxs("div", {
|
|
142
142
|
className: "ff-textEditor-container",
|
|
143
143
|
children: [jsxs("div", {
|
|
144
|
-
className: "ff-
|
|
145
|
-
children: [
|
|
146
|
-
className: "
|
|
147
|
-
children:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
144
|
+
className: "ff-title-button",
|
|
145
|
+
children: [jsxs("div", {
|
|
146
|
+
className: "ff-textEditor-label-asterisk-container",
|
|
147
|
+
children: [required && jsx(Typography, {
|
|
148
|
+
className: "required-asterisk",
|
|
149
|
+
children: "* "
|
|
150
|
+
}), label && jsx(Typography, {
|
|
151
|
+
lineHeight: "10px",
|
|
152
|
+
fontWeight: "medium",
|
|
153
|
+
fontSize: "12px",
|
|
154
|
+
children: label
|
|
155
|
+
})]
|
|
156
|
+
}), editableTextEditor && isEditing && jsxs("div", {
|
|
157
|
+
ref: buttonsRef,
|
|
158
|
+
className: "ff-textEditor-buttons",
|
|
159
|
+
children: [jsx(Tooltip, {
|
|
160
|
+
title: "Update",
|
|
161
|
+
placement: "bottom",
|
|
162
|
+
children: jsx(Icon, {
|
|
163
|
+
name: "update_icon",
|
|
164
|
+
color: "var(--label-edit-confirm-icon)",
|
|
165
|
+
height: 20,
|
|
166
|
+
width: 20,
|
|
167
|
+
hoverEffect: true,
|
|
168
|
+
onClick: handleSubmit
|
|
169
|
+
})
|
|
170
|
+
}), jsx(Tooltip, {
|
|
171
|
+
title: "Cancel",
|
|
172
|
+
placement: "bottom",
|
|
173
|
+
children: jsx(Icon, {
|
|
174
|
+
name: "close",
|
|
175
|
+
color: "var(--label-edit-cancel-icon)",
|
|
176
|
+
height: 20,
|
|
177
|
+
width: 20,
|
|
178
|
+
onClick: handleCancel,
|
|
179
|
+
hoverEffect: true
|
|
180
|
+
})
|
|
181
|
+
})]
|
|
153
182
|
})]
|
|
154
183
|
}), jsx("div", {
|
|
155
184
|
ref: editorRef,
|
|
@@ -183,32 +212,6 @@ const TextEditor = ({
|
|
|
183
212
|
}
|
|
184
213
|
}
|
|
185
214
|
})
|
|
186
|
-
}), editableTextEditor && isEditing && jsxs("div", {
|
|
187
|
-
ref: buttonsRef,
|
|
188
|
-
className: "ff-textEditor-buttons",
|
|
189
|
-
children: [jsx(Tooltip, {
|
|
190
|
-
title: "Update",
|
|
191
|
-
placement: "bottom",
|
|
192
|
-
children: jsx(Icon, {
|
|
193
|
-
name: "update_icon",
|
|
194
|
-
color: "var(--label-edit-confirm-icon)",
|
|
195
|
-
height: 20,
|
|
196
|
-
width: 20,
|
|
197
|
-
hoverEffect: true,
|
|
198
|
-
onClick: handleSubmit
|
|
199
|
-
})
|
|
200
|
-
}), jsx(Tooltip, {
|
|
201
|
-
title: "Cancel",
|
|
202
|
-
placement: "bottom",
|
|
203
|
-
children: jsx(Icon, {
|
|
204
|
-
name: "close",
|
|
205
|
-
color: "var(--label-edit-cancel-icon)",
|
|
206
|
-
height: 20,
|
|
207
|
-
width: 20,
|
|
208
|
-
onClick: handleCancel,
|
|
209
|
-
hoverEffect: true
|
|
210
|
-
})
|
|
211
|
-
})]
|
|
212
215
|
}), required && errorMsg || helperText && error ? jsx(Typography, {
|
|
213
216
|
fontSize: 10,
|
|
214
217
|
className: 'ff-textEditor-error-msg',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor.js","sources":["../../../src/components/TextEditor/TextEditor.tsx"],"sourcesContent":[null],"names":["TextEditor","convertedContent","setConvertedContent","readOnly","toolbarHidden","toolbarOptions","label","required","onBlur","mode","helperText","analyticsClasses","error","editableTextEditor","onSubmit","editorState","setEditorState","useState","focusState","setFocusState","errorMsg","setErrorMsg","isEditing","setIsEditing","initialContent","setInitialContent","editorRef","useRef","buttonsRef","defaultToolBarOptions","parseContent","content","parsed","JSON","parse","blocks","convertToRaw","ContentState","createFromText","e","useEffect","newEditorState","checkEmpty","EditorState","createWithContent","convertFromRaw","createEmpty","console","length","handleEditorChange","state","currentContentAsRaw","getCurrentContent","text","handleClickOutside","useClickOutside","handleEditorBlur","event","stringify","handleDoubleClick","isDashContent","handleSubmit","contentString","handleCancel","EditorComponent","DraftEditor","_jsxs","className","children","_jsx","Typography","lineHeight","fontWeight","fontSize","ref","
|
|
1
|
+
{"version":3,"file":"TextEditor.js","sources":["../../../src/components/TextEditor/TextEditor.tsx"],"sourcesContent":[null],"names":["TextEditor","convertedContent","setConvertedContent","readOnly","toolbarHidden","toolbarOptions","label","required","onBlur","mode","helperText","analyticsClasses","error","editableTextEditor","onSubmit","editorState","setEditorState","useState","focusState","setFocusState","errorMsg","setErrorMsg","isEditing","setIsEditing","initialContent","setInitialContent","editorRef","useRef","buttonsRef","defaultToolBarOptions","parseContent","content","parsed","JSON","parse","blocks","convertToRaw","ContentState","createFromText","e","useEffect","newEditorState","checkEmpty","EditorState","createWithContent","convertFromRaw","createEmpty","console","length","handleEditorChange","state","currentContentAsRaw","getCurrentContent","text","handleClickOutside","useClickOutside","handleEditorBlur","event","stringify","handleDoubleClick","isDashContent","handleSubmit","contentString","handleCancel","EditorComponent","DraftEditor","_jsxs","className","children","_jsx","Typography","lineHeight","fontWeight","fontSize","ref","Tooltip","title","placement","Icon","name","color","height","width","hoverEffect","onClick","onDoubleClick","onEditorStateChange","wrapperClassName","editorClassName","editorStyle","border","borderRadius","onFocus","toolbarClassName","handlePastedText","toolbar","options","Array","isArray","fontFamily","as"],"mappings":";;;;;;;;;;AAgBMA,MAAAA,UAAU,GAA4BA,CAAC;EAC3CC,gBAAgB;EAChBC,mBAAmB;EACnBC,QAAQ;EACRC,aAAa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EAAC,MAAM;gBAER1F;KAAU,CACA,GACX,IAAI;AAAA,GAAA,CACJ;AAEV;;;;"}
|
package/lib/index.cjs
CHANGED
|
@@ -6870,7 +6870,7 @@ const Option$1 = ({
|
|
|
6870
6870
|
children: option.label
|
|
6871
6871
|
})]
|
|
6872
6872
|
});
|
|
6873
|
-
const calculatePosition = (menuPosition, dropdownPlacement, optionCardHeight, optionCardWidth) => {
|
|
6873
|
+
const calculatePosition = (menuPosition, dropdownPlacement, optionCardHeight, optionCardWidth, isAddResourceButton) => {
|
|
6874
6874
|
const {
|
|
6875
6875
|
top,
|
|
6876
6876
|
left,
|
|
@@ -6892,6 +6892,11 @@ const calculatePosition = (menuPosition, dropdownPlacement, optionCardHeight, op
|
|
|
6892
6892
|
break;
|
|
6893
6893
|
case 'down':
|
|
6894
6894
|
newTop = availableSpace.bottom > optionCardHeight + gap ? top + height + gap : top - optionCardHeight - gap;
|
|
6895
|
+
if (isAddResourceButton) {
|
|
6896
|
+
if (!(availableSpace?.bottom > optionCardHeight + gap)) {
|
|
6897
|
+
newLeft = left + 50;
|
|
6898
|
+
}
|
|
6899
|
+
}
|
|
6895
6900
|
break;
|
|
6896
6901
|
case 'left':
|
|
6897
6902
|
newLeft = availableSpace.left > width + gap ? left - width - gap : left + width + gap;
|
|
@@ -6942,7 +6947,7 @@ const OptionCard = ({
|
|
|
6942
6947
|
setOptionCardWidth(optionCardRef.current.offsetWidth);
|
|
6943
6948
|
}
|
|
6944
6949
|
}, [options]);
|
|
6945
|
-
const style = calculatePosition(menuPosition, dropdownPlacement, optionCardHeight, optionCardWidth);
|
|
6950
|
+
const style = calculatePosition(menuPosition, dropdownPlacement, optionCardHeight, optionCardWidth, isAddResourceButton);
|
|
6946
6951
|
return /*#__PURE__*/ReactDOM.createPortal(jsxRuntime.jsx("div", {
|
|
6947
6952
|
className: classNames('ff-option-card', {
|
|
6948
6953
|
'ff-option-card--primary': variant === 'primary'
|
|
@@ -16095,7 +16100,7 @@ const InputWithDropdown = /*#__PURE__*/React.forwardRef(({
|
|
|
16095
16100
|
} = e.currentTarget;
|
|
16096
16101
|
const parsedValue = parseInt(value);
|
|
16097
16102
|
if (type === 'number') {
|
|
16098
|
-
if (['Subtract', '-'].includes(e.key) || e.key === 'ArrowDown' && parsedValue <= 0) {
|
|
16103
|
+
if (['Subtract', '-'].includes(e.key) || e.key === 'ArrowDown' && (parsedValue <= 0 || isNaN(parsedValue))) {
|
|
16099
16104
|
e.preventDefault();
|
|
16100
16105
|
}
|
|
16101
16106
|
}
|
|
@@ -34177,7 +34182,7 @@ const ChipsAccordion = /*#__PURE__*/React.forwardRef(({
|
|
|
34177
34182
|
React.useEffect(() => {
|
|
34178
34183
|
checkOverflow();
|
|
34179
34184
|
}, [filterData]);
|
|
34180
|
-
React.
|
|
34185
|
+
React.useLayoutEffect(() => {
|
|
34181
34186
|
const handleUpdate = () => {
|
|
34182
34187
|
if (!inputRef?.current) return;
|
|
34183
34188
|
const {
|
|
@@ -34479,7 +34484,7 @@ const NlpInput = ({
|
|
|
34479
34484
|
document.body.style.paddingRight = isEnabled ? '' : `${bodyScrollWidth}px`;
|
|
34480
34485
|
document.body.style.overflow = isEnabled ? '' : 'hidden';
|
|
34481
34486
|
};
|
|
34482
|
-
React.
|
|
34487
|
+
React.useLayoutEffect(() => {
|
|
34483
34488
|
if (disabled) return;
|
|
34484
34489
|
if (showOptions) {
|
|
34485
34490
|
onSelectToggleScroll(!showOptions);
|
|
@@ -40723,7 +40728,9 @@ const ColumnIndicator = ({
|
|
|
40723
40728
|
minimumColumnWidth,
|
|
40724
40729
|
maxColLimit,
|
|
40725
40730
|
disableDeleteOption,
|
|
40726
|
-
contextMenu
|
|
40731
|
+
contextMenu,
|
|
40732
|
+
onAddColumn,
|
|
40733
|
+
onDeleteColumn
|
|
40727
40734
|
}) => {
|
|
40728
40735
|
const dispatch = useDispatch();
|
|
40729
40736
|
const minColumnWidth = minimumColumnWidth;
|
|
@@ -40737,7 +40744,10 @@ const ColumnIndicator = ({
|
|
|
40737
40744
|
label: 'Add Column Left',
|
|
40738
40745
|
value: 'Add Column Left',
|
|
40739
40746
|
iconName: 'plus_icon',
|
|
40740
|
-
action: () =>
|
|
40747
|
+
action: () => {
|
|
40748
|
+
addColumnLeft(minColumnWidth);
|
|
40749
|
+
onAddColumn?.(selectedColumn ?? column, true);
|
|
40750
|
+
},
|
|
40741
40751
|
disableTooltip: 'Column limit reached',
|
|
40742
40752
|
visible: cell?.contextDisable?.['Add Column Left'] ?? false,
|
|
40743
40753
|
disable: columnCount >= maxColLimit
|
|
@@ -40745,7 +40755,10 @@ const ColumnIndicator = ({
|
|
|
40745
40755
|
label: 'Add Column Right',
|
|
40746
40756
|
value: 'Add Column Right',
|
|
40747
40757
|
iconName: 'plus_icon',
|
|
40748
|
-
action: () =>
|
|
40758
|
+
action: () => {
|
|
40759
|
+
addColumnRight(minColumnWidth);
|
|
40760
|
+
onAddColumn?.(selectedColumn ?? column, false);
|
|
40761
|
+
},
|
|
40749
40762
|
disableTooltip: 'Column limit reached',
|
|
40750
40763
|
visible: cell?.contextDisable?.['Add Column Right'] ?? false,
|
|
40751
40764
|
disable: columnCount >= maxColLimit
|
|
@@ -40753,12 +40766,15 @@ const ColumnIndicator = ({
|
|
|
40753
40766
|
label: 'Delete Column',
|
|
40754
40767
|
value: 'Delete Column',
|
|
40755
40768
|
iconName: 'delete',
|
|
40756
|
-
action: () =>
|
|
40769
|
+
action: () => {
|
|
40770
|
+
deleteColumn();
|
|
40771
|
+
onDeleteColumn?.(selectedColumn ?? column);
|
|
40772
|
+
},
|
|
40757
40773
|
disableTooltip: '',
|
|
40758
40774
|
visible: cell?.contextDisable?.['Delete Column'] ?? false,
|
|
40759
40775
|
disable: false
|
|
40760
40776
|
}] : [])];
|
|
40761
|
-
}, [selectedColumn, cell, addColumnLeft, addColumnRight, deleteColumn]);
|
|
40777
|
+
}, [selectedColumn, cell, addColumnLeft, addColumnRight, deleteColumn, minColumnWidth, columnCount, maxColLimit, disableDeleteOption, onAddColumn, onDeleteColumn, column]);
|
|
40762
40778
|
const onMouseDrag = React__namespace.useCallback((event, isRight) => {
|
|
40763
40779
|
const getTargetColumn = isRight ? column - 1 : column;
|
|
40764
40780
|
const targetColumn = Math.max(getTargetColumn, 0);
|
|
@@ -41939,6 +41955,7 @@ const ExcelToolBar = ({
|
|
|
41939
41955
|
setBorderType,
|
|
41940
41956
|
setFormatePainter
|
|
41941
41957
|
}) => {
|
|
41958
|
+
const selected = useSelector(state => state.selected instanceof EntireWorksheetSelection);
|
|
41942
41959
|
const [disable, setDisable] = React.useState(toolbar === 'disable' || !editable);
|
|
41943
41960
|
const cell = useSelector(state => state.active ? get$1(state.active, state.model.data) : null);
|
|
41944
41961
|
const data = useSelector(state => state.model.data);
|
|
@@ -41958,7 +41975,9 @@ const ExcelToolBar = ({
|
|
|
41958
41975
|
if (cell?.style && JSON.stringify(cell.style) !== JSON.stringify(cellStyle)) {
|
|
41959
41976
|
setCellStyle(cell?.style || basicStyle);
|
|
41960
41977
|
}
|
|
41961
|
-
if (
|
|
41978
|
+
if (selected) {
|
|
41979
|
+
setDisable(false);
|
|
41980
|
+
} else if (cell && typeof cell.readOnly === 'boolean') {
|
|
41962
41981
|
setDisable(cell.readOnly || toolbar === 'disable' || !editable);
|
|
41963
41982
|
}
|
|
41964
41983
|
}, [cell]);
|
|
@@ -42312,7 +42331,9 @@ const Spreadsheet = props => {
|
|
|
42312
42331
|
maxRowLimit,
|
|
42313
42332
|
maxColLimit,
|
|
42314
42333
|
disableDeleteOption,
|
|
42315
|
-
contextMenu
|
|
42334
|
+
contextMenu,
|
|
42335
|
+
onAddColumn,
|
|
42336
|
+
onDeleteColumn
|
|
42316
42337
|
} = props;
|
|
42317
42338
|
const [sheetChange, setSheetChange] = React__namespace.useState(false);
|
|
42318
42339
|
const [maxWidth, setMaxWidth] = React__namespace.useState(0);
|
|
@@ -42633,7 +42654,9 @@ const Spreadsheet = props => {
|
|
|
42633
42654
|
columnContextEnable: props.columnContextEnable,
|
|
42634
42655
|
maxColLimit: maxColLimit,
|
|
42635
42656
|
disableDeleteOption: disableDeleteOption,
|
|
42636
|
-
contextMenu: contextMenu
|
|
42657
|
+
contextMenu: contextMenu,
|
|
42658
|
+
onAddColumn: onAddColumn,
|
|
42659
|
+
onDeleteColumn: onDeleteColumn
|
|
42637
42660
|
}, columnNumber) : jsxRuntime.jsx(ColumnIndicator, {
|
|
42638
42661
|
column: columnNumber,
|
|
42639
42662
|
minimumColumnWidth: minimumColumnWidth,
|
|
@@ -42644,7 +42667,9 @@ const Spreadsheet = props => {
|
|
|
42644
42667
|
columnContextEnable: props.columnContextEnable,
|
|
42645
42668
|
maxColLimit: maxColLimit,
|
|
42646
42669
|
disableDeleteOption: disableDeleteOption,
|
|
42647
|
-
contextMenu: contextMenu
|
|
42670
|
+
contextMenu: contextMenu,
|
|
42671
|
+
onAddColumn: onAddColumn,
|
|
42672
|
+
onDeleteColumn: onDeleteColumn
|
|
42648
42673
|
}, columnNumber))]
|
|
42649
42674
|
}), renderReady && scrollerFunction().map(rowNumber => jsxRuntime.jsxs(Row$1, {
|
|
42650
42675
|
row: rowNumber,
|
|
@@ -42856,9 +42881,7 @@ const ExcelFile = ({
|
|
|
42856
42881
|
showHider = true,
|
|
42857
42882
|
maxRowLimit = Infinity,
|
|
42858
42883
|
maxColLimit = Infinity,
|
|
42859
|
-
maxSheetLimit = Infinity
|
|
42860
|
-
selectedSheetName,
|
|
42861
|
-
onSheetChange
|
|
42884
|
+
maxSheetLimit = Infinity
|
|
42862
42885
|
}) => {
|
|
42863
42886
|
const [sheetNames, setSheetNames] = React.useState([]);
|
|
42864
42887
|
const [saveInfo, setSaveInfo] = React.useState('');
|
|
@@ -42883,6 +42906,7 @@ const ExcelFile = ({
|
|
|
42883
42906
|
defaultSheet: [[EmptyCell]]
|
|
42884
42907
|
});
|
|
42885
42908
|
const [selectedSheetData, setSelectedSheetData] = React.useState([[EmptyCell]]);
|
|
42909
|
+
const [headerOldNew, setHeaderOldNew] = React.useState(onSave.length > 1 ? {} : {});
|
|
42886
42910
|
const [position, setPosition] = React.useState({
|
|
42887
42911
|
x: 0,
|
|
42888
42912
|
y: 0
|
|
@@ -42901,23 +42925,16 @@ const ExcelFile = ({
|
|
|
42901
42925
|
if (payload) {
|
|
42902
42926
|
const sheetNames = payload.map(e => e.sheetName);
|
|
42903
42927
|
setSheetNames(sheetNames);
|
|
42904
|
-
let initialIndex = 0;
|
|
42905
|
-
let initialName = sheetNames[0] || '';
|
|
42906
|
-
if (selectedSheetName) {
|
|
42907
|
-
const foundIndex = sheetNames.findIndex(name => name === selectedSheetName);
|
|
42908
|
-
if (foundIndex !== -1) {
|
|
42909
|
-
initialIndex = foundIndex;
|
|
42910
|
-
initialName = selectedSheetName;
|
|
42911
|
-
}
|
|
42912
|
-
}
|
|
42913
42928
|
if (!checkEmpty(sheetNames.length)) {
|
|
42914
|
-
pageRef.current =
|
|
42929
|
+
pageRef.current = sheetNames[0] || ''; // Ternary is required, must use ''
|
|
42915
42930
|
setSelectedSheet({
|
|
42916
|
-
name:
|
|
42917
|
-
|
|
42931
|
+
name: sheetNames[0] || '',
|
|
42932
|
+
// Ternary is required, must use ''
|
|
42933
|
+
index: 0
|
|
42918
42934
|
});
|
|
42919
42935
|
}
|
|
42920
42936
|
const newWorksheetsData = {};
|
|
42937
|
+
const newHeaderOldNew = {};
|
|
42921
42938
|
payload.forEach(sheet => {
|
|
42922
42939
|
const sheetName = sheet.sheetName;
|
|
42923
42940
|
const json = sheet.data;
|
|
@@ -42974,8 +42991,21 @@ const ExcelFile = ({
|
|
|
42974
42991
|
});
|
|
42975
42992
|
});
|
|
42976
42993
|
newWorksheetsData[sheetName] = spreadsheetData;
|
|
42994
|
+
// Only set headerOldNew if onSave expects two arguments
|
|
42995
|
+
if (onSave.length > 1) {
|
|
42996
|
+
const firstRow = json[0] || [];
|
|
42997
|
+
newHeaderOldNew[sheetName] = Array.from({
|
|
42998
|
+
length: maxCols
|
|
42999
|
+
}, (_, col) => ({
|
|
43000
|
+
newData: '',
|
|
43001
|
+
oldData: firstRow[col]?.value || ''
|
|
43002
|
+
}));
|
|
43003
|
+
}
|
|
42977
43004
|
});
|
|
42978
43005
|
setWorksheetsData(newWorksheetsData);
|
|
43006
|
+
if (onSave.length > 1) {
|
|
43007
|
+
setHeaderOldNew(newHeaderOldNew);
|
|
43008
|
+
}
|
|
42979
43009
|
const firstSheetName = Object.keys(newWorksheetsData)[0];
|
|
42980
43010
|
if (firstSheetName && newWorksheetsData[firstSheetName] !== undefined) {
|
|
42981
43011
|
setSelectedSheetData(newWorksheetsData[firstSheetName]);
|
|
@@ -42997,9 +43027,29 @@ const ExcelFile = ({
|
|
|
42997
43027
|
debounceDispatch(handleSaveData());
|
|
42998
43028
|
}, [worksheetsData, pageRef.current]);
|
|
42999
43029
|
const debounceDispatch = React.useCallback(debounce(val => {
|
|
43000
|
-
onSave
|
|
43030
|
+
if (onSave.length > 1) {
|
|
43031
|
+
const updatedHeader = {
|
|
43032
|
+
...headerOldNew
|
|
43033
|
+
};
|
|
43034
|
+
sheetNames.forEach((sheetName, index) => {
|
|
43035
|
+
const firstRow = val[index].data[0] || [];
|
|
43036
|
+
const currentHeaders = firstRow.map(cell => cell?.value || '');
|
|
43037
|
+
updatedHeader[sheetName] = (updatedHeader[sheetName] || []).map((h, i) => ({
|
|
43038
|
+
...h,
|
|
43039
|
+
newData: currentHeaders[i] || ''
|
|
43040
|
+
}));
|
|
43041
|
+
});
|
|
43042
|
+
setHeaderOldNew(updatedHeader);
|
|
43043
|
+
const headerOldNewData = sheetNames.map(sheetName => ({
|
|
43044
|
+
sheetName,
|
|
43045
|
+
headers: updatedHeader[sheetName] || []
|
|
43046
|
+
}));
|
|
43047
|
+
onSave(val, headerOldNewData);
|
|
43048
|
+
} else {
|
|
43049
|
+
onSave(val);
|
|
43050
|
+
}
|
|
43001
43051
|
setSaveInfo('File saved');
|
|
43002
|
-
}, onSaveDelay), [onSave]);
|
|
43052
|
+
}, onSaveDelay), [onSave, headerOldNew, sheetNames]);
|
|
43003
43053
|
const handleSave = React.useCallback(event => {
|
|
43004
43054
|
if (event.ctrlKey && event.key === 's') {
|
|
43005
43055
|
event.preventDefault();
|
|
@@ -43082,6 +43132,17 @@ const ExcelFile = ({
|
|
|
43082
43132
|
[newSheetName]: newSheetData
|
|
43083
43133
|
});
|
|
43084
43134
|
setSelectedSheetData(newSheetData);
|
|
43135
|
+
if (onSave.length > 1) {
|
|
43136
|
+
setHeaderOldNew(prev => ({
|
|
43137
|
+
...prev,
|
|
43138
|
+
[newSheetName]: Array.from({
|
|
43139
|
+
length: colCount
|
|
43140
|
+
}, () => ({
|
|
43141
|
+
newData: '',
|
|
43142
|
+
oldData: ''
|
|
43143
|
+
}))
|
|
43144
|
+
}));
|
|
43145
|
+
}
|
|
43085
43146
|
pageRef.current = newSheetName;
|
|
43086
43147
|
};
|
|
43087
43148
|
React.useEffect(() => {
|
|
@@ -43103,6 +43164,15 @@ const ExcelFile = ({
|
|
|
43103
43164
|
const newIndex = Math.min(index, updatedSheetNames.length - 1);
|
|
43104
43165
|
setSheetNames(updatedSheetNames);
|
|
43105
43166
|
setWorksheetsData(updatedWorksheetsData);
|
|
43167
|
+
if (onSave.length > 1) {
|
|
43168
|
+
setHeaderOldNew(prev => {
|
|
43169
|
+
const newPrev = {
|
|
43170
|
+
...prev
|
|
43171
|
+
};
|
|
43172
|
+
delete newPrev[name];
|
|
43173
|
+
return newPrev;
|
|
43174
|
+
});
|
|
43175
|
+
}
|
|
43106
43176
|
setSelectedSheet({
|
|
43107
43177
|
index: newIndex,
|
|
43108
43178
|
name: updatedSheetNames[newIndex] ? updatedSheetNames[newIndex] : ''
|
|
@@ -43146,6 +43216,17 @@ const ExcelFile = ({
|
|
|
43146
43216
|
name: updatedSheetValue
|
|
43147
43217
|
}));
|
|
43148
43218
|
setWorksheetsData(updatedData);
|
|
43219
|
+
if (onSave.length > 1) {
|
|
43220
|
+
setHeaderOldNew(prev => {
|
|
43221
|
+
const newPrev = {
|
|
43222
|
+
...prev
|
|
43223
|
+
};
|
|
43224
|
+
const headers = newPrev[name];
|
|
43225
|
+
delete newPrev[name];
|
|
43226
|
+
newPrev[updatedSheetValue] = headers ?? [];
|
|
43227
|
+
return newPrev;
|
|
43228
|
+
});
|
|
43229
|
+
}
|
|
43149
43230
|
setEditingSheet(null);
|
|
43150
43231
|
};
|
|
43151
43232
|
function replaceKeyValueByKeyName(obj, oldKey, newKey, newValue) {
|
|
@@ -43176,9 +43257,6 @@ const ExcelFile = ({
|
|
|
43176
43257
|
setSelectedSheetData([[EmptyCell]]);
|
|
43177
43258
|
}
|
|
43178
43259
|
pageRef.current = name;
|
|
43179
|
-
if (onSheetChange) {
|
|
43180
|
-
onSheetChange(name);
|
|
43181
|
-
}
|
|
43182
43260
|
};
|
|
43183
43261
|
const setCursorToEnd = element => {
|
|
43184
43262
|
const range = document.createRange();
|
|
@@ -43310,6 +43388,36 @@ const ExcelFile = ({
|
|
|
43310
43388
|
});
|
|
43311
43389
|
}
|
|
43312
43390
|
};
|
|
43391
|
+
const handleAddColumn = (column, isLeft) => {
|
|
43392
|
+
if (onSave.length > 1) {
|
|
43393
|
+
setHeaderOldNew(prev => {
|
|
43394
|
+
const sheetName = selectedSheet.name;
|
|
43395
|
+
const arr = [...(prev[sheetName] || [])];
|
|
43396
|
+
const pos = isLeft ? column : column + 1;
|
|
43397
|
+
arr.splice(pos, 0, {
|
|
43398
|
+
newData: '',
|
|
43399
|
+
oldData: ''
|
|
43400
|
+
});
|
|
43401
|
+
return {
|
|
43402
|
+
...prev,
|
|
43403
|
+
[sheetName]: arr
|
|
43404
|
+
};
|
|
43405
|
+
});
|
|
43406
|
+
}
|
|
43407
|
+
};
|
|
43408
|
+
const handleDeleteColumn = column => {
|
|
43409
|
+
if (onSave.length > 1) {
|
|
43410
|
+
setHeaderOldNew(prev => {
|
|
43411
|
+
const sheetName = selectedSheet.name;
|
|
43412
|
+
const arr = [...(prev[sheetName] || [])];
|
|
43413
|
+
arr.splice(column, 1);
|
|
43414
|
+
return {
|
|
43415
|
+
...prev,
|
|
43416
|
+
[sheetName]: arr
|
|
43417
|
+
};
|
|
43418
|
+
});
|
|
43419
|
+
}
|
|
43420
|
+
};
|
|
43313
43421
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
43314
43422
|
children: sheetNames.length > 0 && jsxRuntime.jsxs("div", {
|
|
43315
43423
|
ref: workRef,
|
|
@@ -43337,7 +43445,9 @@ const ExcelFile = ({
|
|
|
43337
43445
|
maxRowLimit: maxRowLimit,
|
|
43338
43446
|
maxColLimit: maxColLimit,
|
|
43339
43447
|
disableDeleteOption: disableDeleteOption,
|
|
43340
|
-
contextMenu: contextMenu
|
|
43448
|
+
contextMenu: contextMenu,
|
|
43449
|
+
onAddColumn: handleAddColumn,
|
|
43450
|
+
onDeleteColumn: handleDeleteColumn
|
|
43341
43451
|
})
|
|
43342
43452
|
}), sheetBar !== 'hide' && jsxRuntime.jsxs("div", {
|
|
43343
43453
|
className: "ff-excel-sheet-bar",
|
|
@@ -47958,15 +48068,18 @@ const CreateVariableSlider = ({
|
|
|
47958
48068
|
const [helperText, setHelperText] = React.useState('');
|
|
47959
48069
|
const [hashInputValue, setHashInputValue] = React.useState();
|
|
47960
48070
|
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
48071
|
+
const [hasChanges, setHasChanges] = React.useState(false);
|
|
47961
48072
|
const [initialValues, setInitialValues] = React.useState({
|
|
47962
48073
|
name: '',
|
|
47963
|
-
value: ''
|
|
48074
|
+
value: '',
|
|
48075
|
+
isChecked: false
|
|
47964
48076
|
});
|
|
47965
48077
|
React.useEffect(() => {
|
|
47966
48078
|
if (isOpen && mode === 'edit') {
|
|
47967
48079
|
setInitialValues({
|
|
47968
48080
|
name: variableName,
|
|
47969
|
-
value: variableValue
|
|
48081
|
+
value: variableValue,
|
|
48082
|
+
isChecked: hideValue
|
|
47970
48083
|
});
|
|
47971
48084
|
}
|
|
47972
48085
|
}, []);
|
|
@@ -48007,10 +48120,15 @@ const CreateVariableSlider = ({
|
|
|
48007
48120
|
const isValid = isNonEmpty && matchesPattern && noWhitespaceEdges && lengthValid;
|
|
48008
48121
|
return isValid;
|
|
48009
48122
|
}
|
|
48010
|
-
|
|
48011
|
-
if (mode !== 'edit') return
|
|
48012
|
-
|
|
48013
|
-
|
|
48123
|
+
React.useEffect(() => {
|
|
48124
|
+
if (mode !== 'edit') return;
|
|
48125
|
+
const {
|
|
48126
|
+
name,
|
|
48127
|
+
value,
|
|
48128
|
+
isChecked
|
|
48129
|
+
} = initialValues;
|
|
48130
|
+
setHasChanges(variableName !== name || variableValue !== value || hideValue !== isChecked);
|
|
48131
|
+
}, [mode, variableName, variableValue, hideValue, initialValues]);
|
|
48014
48132
|
const FooterContent = () => {
|
|
48015
48133
|
return jsxRuntime.jsxs("div", {
|
|
48016
48134
|
className: "ff-create-slider-footer",
|
|
@@ -62398,6 +62516,9 @@ const Editor = /*#__PURE__*/React.forwardRef(({
|
|
|
62398
62516
|
editor.onDidChangeCursorPosition(e => {
|
|
62399
62517
|
setCurrentLine(e.position.lineNumber);
|
|
62400
62518
|
});
|
|
62519
|
+
editor.onMouseDown(() => {
|
|
62520
|
+
setShowDropdown(false);
|
|
62521
|
+
});
|
|
62401
62522
|
// Track selection changes (user highlighting text)
|
|
62402
62523
|
editor.onDidChangeCursorSelection(() => {
|
|
62403
62524
|
const selections = editor.getSelections?.() || [];
|
|
@@ -114256,15 +114377,44 @@ const TextEditor = ({
|
|
|
114256
114377
|
return jsxRuntime.jsxs("div", {
|
|
114257
114378
|
className: "ff-textEditor-container",
|
|
114258
114379
|
children: [jsxRuntime.jsxs("div", {
|
|
114259
|
-
className: "ff-
|
|
114260
|
-
children: [
|
|
114261
|
-
className: "
|
|
114262
|
-
children:
|
|
114263
|
-
|
|
114264
|
-
|
|
114265
|
-
|
|
114266
|
-
|
|
114267
|
-
|
|
114380
|
+
className: "ff-title-button",
|
|
114381
|
+
children: [jsxRuntime.jsxs("div", {
|
|
114382
|
+
className: "ff-textEditor-label-asterisk-container",
|
|
114383
|
+
children: [required && jsxRuntime.jsx(Typography, {
|
|
114384
|
+
className: "required-asterisk",
|
|
114385
|
+
children: "* "
|
|
114386
|
+
}), label && jsxRuntime.jsx(Typography, {
|
|
114387
|
+
lineHeight: "10px",
|
|
114388
|
+
fontWeight: "medium",
|
|
114389
|
+
fontSize: "12px",
|
|
114390
|
+
children: label
|
|
114391
|
+
})]
|
|
114392
|
+
}), editableTextEditor && isEditing && jsxRuntime.jsxs("div", {
|
|
114393
|
+
ref: buttonsRef,
|
|
114394
|
+
className: "ff-textEditor-buttons",
|
|
114395
|
+
children: [jsxRuntime.jsx(Tooltip, {
|
|
114396
|
+
title: "Update",
|
|
114397
|
+
placement: "bottom",
|
|
114398
|
+
children: jsxRuntime.jsx(Icon, {
|
|
114399
|
+
name: "update_icon",
|
|
114400
|
+
color: "var(--label-edit-confirm-icon)",
|
|
114401
|
+
height: 20,
|
|
114402
|
+
width: 20,
|
|
114403
|
+
hoverEffect: true,
|
|
114404
|
+
onClick: handleSubmit
|
|
114405
|
+
})
|
|
114406
|
+
}), jsxRuntime.jsx(Tooltip, {
|
|
114407
|
+
title: "Cancel",
|
|
114408
|
+
placement: "bottom",
|
|
114409
|
+
children: jsxRuntime.jsx(Icon, {
|
|
114410
|
+
name: "close",
|
|
114411
|
+
color: "var(--label-edit-cancel-icon)",
|
|
114412
|
+
height: 20,
|
|
114413
|
+
width: 20,
|
|
114414
|
+
onClick: handleCancel,
|
|
114415
|
+
hoverEffect: true
|
|
114416
|
+
})
|
|
114417
|
+
})]
|
|
114268
114418
|
})]
|
|
114269
114419
|
}), jsxRuntime.jsx("div", {
|
|
114270
114420
|
ref: editorRef,
|
|
@@ -114298,32 +114448,6 @@ const TextEditor = ({
|
|
|
114298
114448
|
}
|
|
114299
114449
|
}
|
|
114300
114450
|
})
|
|
114301
|
-
}), editableTextEditor && isEditing && jsxRuntime.jsxs("div", {
|
|
114302
|
-
ref: buttonsRef,
|
|
114303
|
-
className: "ff-textEditor-buttons",
|
|
114304
|
-
children: [jsxRuntime.jsx(Tooltip, {
|
|
114305
|
-
title: "Update",
|
|
114306
|
-
placement: "bottom",
|
|
114307
|
-
children: jsxRuntime.jsx(Icon, {
|
|
114308
|
-
name: "update_icon",
|
|
114309
|
-
color: "var(--label-edit-confirm-icon)",
|
|
114310
|
-
height: 20,
|
|
114311
|
-
width: 20,
|
|
114312
|
-
hoverEffect: true,
|
|
114313
|
-
onClick: handleSubmit
|
|
114314
|
-
})
|
|
114315
|
-
}), jsxRuntime.jsx(Tooltip, {
|
|
114316
|
-
title: "Cancel",
|
|
114317
|
-
placement: "bottom",
|
|
114318
|
-
children: jsxRuntime.jsx(Icon, {
|
|
114319
|
-
name: "close",
|
|
114320
|
-
color: "var(--label-edit-cancel-icon)",
|
|
114321
|
-
height: 20,
|
|
114322
|
-
width: 20,
|
|
114323
|
-
onClick: handleCancel,
|
|
114324
|
-
hoverEffect: true
|
|
114325
|
-
})
|
|
114326
|
-
})]
|
|
114327
114451
|
}), required && errorMsg || helperText && error ? jsxRuntime.jsx(Typography, {
|
|
114328
114452
|
fontSize: 10,
|
|
114329
114453
|
className: 'ff-textEditor-error-msg',
|