pixel-react 1.14.50 → 1.14.52
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/ExcelToolBar/ExcelToolBar.js +5 -1
- package/lib/components/Excel/ExcelToolBar/ExcelToolBar.js.map +1 -1
- package/lib/components/FileDropzone/FileDropzone.js +3 -2
- package/lib/components/FileDropzone/FileDropzone.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/components/Tooltip/Tooltip.js +7 -3
- package/lib/components/Tooltip/Tooltip.js.map +1 -1
- package/lib/index.cjs +78 -51
- package/lib/index.cjs.map +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":";;;;;;;;;;AAgBA,MAAMA,UAAU,GAA4BA,CAAC;EAC3CC,gBAAgB;EAChBC,mBAAmB;EACnBC,QAAQ;EACRC,aAAa;EACbC,cAAc;EACdC,KAAK;AACLC,EAAAA,QAAQ,GAAG,KAAK;EAChBC,MAAM;EACNC,IAAI;EACJC,UAAU;AACVC,EAAAA,gBAAgB,GAAG,KAAK;EACxBC,KAAK;AACLC,EAAAA,kBAAkB,GAAG,KAAK;AAC1BC,EAAAA;AAAQ,CACT,KAAI;EACH,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGC,QAAQ,CAAM,IAAI,CAAC;EACzD,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGF,QAAQ,CAAU,KAAK,CAAC;EAC5D,MAAM,CAACG,QAAQ,EAAEC,WAAW,CAAC,GAAGJ,QAAQ,CAAU,KAAK,CAAC;EACxD,MAAM,CAACK,SAAS,EAAEC,YAAY,CAAC,GAAGN,QAAQ,CAAU,KAAK,CAAC;EAC1D,MAAM,CAACO,cAAc,EAAEC,iBAAiB,CAAC,GAAGR,QAAQ,CAClDhB,gBAAgB,CACjB;AACD,EAAA,MAAMyB,SAAS,GAAGC,MAAM,CAAiB,IAAI,CAAC;AAC9C,EAAA,MAAMC,UAAU,GAAGD,MAAM,CAAiB,IAAI,CAAC;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AAK;AAC7BC,QAAAA,OAAO,EAAE;AACPC,UAAAA,OAAO,EACLC,KAAK,CAACC,OAAO,CAAC7F,cAAc,CAAC,IAAIA,cAAc,EAAE2C,MAAM,GAAG,CAAC,GACvD3C,cAAc,GACdwB,qBAAqB;AAC3BsE,UAAAA,UAAU,EAAE;AACVH,YAAAA,OAAO,EAAE,CACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,SAAS;AAEZ;AACF;OAAA;MAEC,EACJzF,QAAQ,IAAIa,QAAQ,IAAMV,UAAU,IAAIE,KAAM,GAC9CyD,IAACC,UAAU,EAAA;AACTG,MAAAA,QAAQ,EAAE,EAAE;AACZN,MAAAA,SAAS,EAAE,yBAAyB;AACpCiC,MAAAA,EAAE,EAAC,MAAM;gBAER1F;KAAU,CACA,GACX,IAAI;AAAA,GAAA,CACJ;AAEV;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
2
|
-
import React__default, { useState, useRef, useContext, useEffect } from 'react';
|
2
|
+
import React__default, { useState, useRef, useContext, useEffect, useLayoutEffect } from 'react';
|
3
3
|
import { createPortal } from 'react-dom';
|
4
4
|
import { checkEmpty } from '../../utils/checkEmpty/checkEmpty.js';
|
5
5
|
import { ThemeContext } from '../ThemeProvider/ThemeProvider.js';
|
@@ -131,15 +131,19 @@ const Tooltip = ({
|
|
131
131
|
width: titleWidth
|
132
132
|
});
|
133
133
|
};
|
134
|
-
|
134
|
+
useLayoutEffect(() => {
|
135
135
|
if (isVisible) {
|
136
136
|
calculateDim();
|
137
137
|
}
|
138
138
|
}, [isVisible]);
|
139
|
+
const showTooltip = () => {
|
140
|
+
calculateDim();
|
141
|
+
setIsVisible(true);
|
142
|
+
};
|
139
143
|
return jsxs(Element, {
|
140
144
|
ref: tooltipContainerRef,
|
141
145
|
className: classNames('ff-tooltip-container', currentTheme),
|
142
|
-
onMouseEnter:
|
146
|
+
onMouseEnter: showTooltip,
|
143
147
|
onMouseLeave: () => setIsVisible(false),
|
144
148
|
style: style,
|
145
149
|
children: [children, isVisible && !disabled && !isTitleEmpty(title) && /*#__PURE__*/createPortal(jsx(Element, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":[null],"names":["Tooltip","title","children","placement","disabled","style","as","Element","isVisible","setIsVisible","useState","titleRef","useRef","tooltipContainerRef","finalPlacement","setFinalPlacement","tooltipContainerPosition","setTooltipContainerPosition","posX","fromRight","posY","width","fromBottom","titleDimensions","setTitleDimensions","height","childrenContainerHeight","setChildrenContainerHeight","titleHeight","titleWidth","themeContext","useContext","ThemeContext","currentTheme","styles","left","top","Math","max","right","min","window","innerWidth","bottom","handleScroll","handleClickAnywhere","isTitleEmpty","tooltipValue","checkEmpty","React","isValidElement","Children","count","props","undefined","useEffect","addEventListener","removeEventListener","calculateDim","current","rect","getBoundingClientRect","offsetHeight","offsetWidth","spaceAbove","spaceBelow","innerHeight","scrollX","offsetTop","_jsxs","ref","className","classNames","onMouseEnter","onMouseLeave","createPortal","_jsx","document","body"],"mappings":";;;;;;;
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":[null],"names":["Tooltip","title","children","placement","disabled","style","as","Element","isVisible","setIsVisible","useState","titleRef","useRef","tooltipContainerRef","finalPlacement","setFinalPlacement","tooltipContainerPosition","setTooltipContainerPosition","posX","fromRight","posY","width","fromBottom","titleDimensions","setTitleDimensions","height","childrenContainerHeight","setChildrenContainerHeight","titleHeight","titleWidth","themeContext","useContext","ThemeContext","currentTheme","styles","left","top","Math","max","right","min","window","innerWidth","bottom","handleScroll","handleClickAnywhere","isTitleEmpty","tooltipValue","checkEmpty","React","isValidElement","Children","count","props","undefined","useEffect","addEventListener","removeEventListener","calculateDim","current","rect","getBoundingClientRect","offsetHeight","offsetWidth","spaceAbove","spaceBelow","innerHeight","scrollX","offsetTop","useLayoutEffect","showTooltip","_jsxs","ref","className","classNames","onMouseEnter","onMouseLeave","createPortal","_jsx","document","body"],"mappings":";;;;;;;AAoBA,MAAMA,OAAO,GAA2BA,CAAC;EACvCC,KAAK;EACLC,QAAQ;AACRC,EAAAA,SAAS,GAAG,QAAQ;AACpBC,EAAAA,QAAQ,GAAG,KAAK;EAChBC,KAAK,GAAG,EAAE;EACVC,EAAE,EAAEC,OAAO,GAAG;AAAK,CACpB,KAAI;EACH,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGC,QAAQ,CAAC,KAAK,CAAC;AACjD,EAAA,MAAMC,QAAQ,GAAaC,MAAM,CAAC,IAAI,CAAC;AACvC,EAAA,MAAMC,mBAAmB,GAAwBD,MAAM,CAAC,IAAI,CAAC;EAC7D,MAAM,CAACE,cAAc,EAAEC,iBAAiB,CAAC,GAAGL,QAAQ,CAACP,SAAS,CAAC;AAC/D,EAAA,MAAM,CAACa,wBAAwB,EAAEC,2BAA2B,CAAC,GAAGP,QAAQ,CAAC;AACvEQ,IAAAA,IAAI,EAAE,CAAC;AACPC,IAAAA,SAAS,EAAE,CAAC;AACZC,IAAAA,IAAI,EAAE,CAAC;AACPC,IAAAA,KAAK,EAAE,CAAC;AACRC,IAAAA,UAAU,EAAE;AACb,GAAA,CAAC;AACF,EAAA,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGd,QAAQ,CAAC;AACrDe,IAAAA,MAAM,EAAE,CAAC;AACTJ,IAAAA,KAAK,EAAE;AACR,GAAA,CAAC;EACF,MAAM,CAACK,uBAAuB,EAAEC,0BAA0B,CAAC,GAAGjB,QAAQ,CAAC,CAAC,CAAC;EACzE,MAAM;IAAEQ,IAAI;IAAEC,SAAS;IAAEC,IAAI;AAAEC,IAAAA;AAAK,GAAE,GAAGL,wBAAwB;EACjE,MAAM;AAAES,IAAAA,MAAM,EAAEG,WAAW;AAAEP,IAA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AAK,CAAC,iBACpB4E,YAAY,CACVC,GAAA,CAACvE,OAAO,EAAA;AACNiE,MAAAA,GAAG,EAAE7D,QAAQ;AACbN,MAAAA,KAAK,EAAE;QAAE,GAAG6B,MAAM,CAACpB,cAAc;OAAG;AACpC2D,MAAAA,SAAS,EAAEC,UAAU,CAAC,YAAY,EAAEzC,YAAY,EAAE;AAChD,QAAA,qBAAqB,EAAEzB;OACxB,CAAC;AAAAN,MAAAA,QAAA,EAEDD;AAAK,KAAA,CACE,EACV8E,QAAQ,CAACC,IAAI,CACd;AAAA,GAAA,CACK;AAEd;;;;"}
|
package/lib/index.cjs
CHANGED
@@ -1985,15 +1985,19 @@ const Tooltip = ({
|
|
1985
1985
|
width: titleWidth
|
1986
1986
|
});
|
1987
1987
|
};
|
1988
|
-
React.
|
1988
|
+
React.useLayoutEffect(() => {
|
1989
1989
|
if (isVisible) {
|
1990
1990
|
calculateDim();
|
1991
1991
|
}
|
1992
1992
|
}, [isVisible]);
|
1993
|
+
const showTooltip = () => {
|
1994
|
+
calculateDim();
|
1995
|
+
setIsVisible(true);
|
1996
|
+
};
|
1993
1997
|
return jsxRuntime.jsxs(Element, {
|
1994
1998
|
ref: tooltipContainerRef,
|
1995
1999
|
className: classNames('ff-tooltip-container', currentTheme),
|
1996
|
-
onMouseEnter:
|
2000
|
+
onMouseEnter: showTooltip,
|
1997
2001
|
onMouseLeave: () => setIsVisible(false),
|
1998
2002
|
style: style,
|
1999
2003
|
children: [children, isVisible && !disabled && !isTitleEmpty(title) && /*#__PURE__*/ReactDOM.createPortal(jsxRuntime.jsx(Element, {
|
@@ -6870,7 +6874,7 @@ const Option$1 = ({
|
|
6870
6874
|
children: option.label
|
6871
6875
|
})]
|
6872
6876
|
});
|
6873
|
-
const calculatePosition = (menuPosition, dropdownPlacement, optionCardHeight, optionCardWidth) => {
|
6877
|
+
const calculatePosition = (menuPosition, dropdownPlacement, optionCardHeight, optionCardWidth, isAddResourceButton) => {
|
6874
6878
|
const {
|
6875
6879
|
top,
|
6876
6880
|
left,
|
@@ -6892,6 +6896,11 @@ const calculatePosition = (menuPosition, dropdownPlacement, optionCardHeight, op
|
|
6892
6896
|
break;
|
6893
6897
|
case 'down':
|
6894
6898
|
newTop = availableSpace.bottom > optionCardHeight + gap ? top + height + gap : top - optionCardHeight - gap;
|
6899
|
+
if (isAddResourceButton) {
|
6900
|
+
if (!(availableSpace?.bottom > optionCardHeight + gap)) {
|
6901
|
+
newLeft = left + 50;
|
6902
|
+
}
|
6903
|
+
}
|
6895
6904
|
break;
|
6896
6905
|
case 'left':
|
6897
6906
|
newLeft = availableSpace.left > width + gap ? left - width - gap : left + width + gap;
|
@@ -6942,7 +6951,7 @@ const OptionCard = ({
|
|
6942
6951
|
setOptionCardWidth(optionCardRef.current.offsetWidth);
|
6943
6952
|
}
|
6944
6953
|
}, [options]);
|
6945
|
-
const style = calculatePosition(menuPosition, dropdownPlacement, optionCardHeight, optionCardWidth);
|
6954
|
+
const style = calculatePosition(menuPosition, dropdownPlacement, optionCardHeight, optionCardWidth, isAddResourceButton);
|
6946
6955
|
return /*#__PURE__*/ReactDOM.createPortal(jsxRuntime.jsx("div", {
|
6947
6956
|
className: classNames('ff-option-card', {
|
6948
6957
|
'ff-option-card--primary': variant === 'primary'
|
@@ -13262,13 +13271,14 @@ const FileDropzone = ({
|
|
13262
13271
|
}, [acceptedFiles, setSelectedFile]);
|
13263
13272
|
const rejectedFilesList = React.useMemo(() => rejectedFiles.map(rejectedFile => jsxRuntime.jsx(FilePreview, {
|
13264
13273
|
file: rejectedFile.file,
|
13265
|
-
error: rejectedFile.errors[0]?.message,
|
13274
|
+
error: invalidFileMessage ? invalidFileMessage : rejectedFile.errors[0]?.message,
|
13266
13275
|
onRemoveClick: handleRemoveClick,
|
13267
13276
|
onReplaceClick: handleReplaceClick,
|
13268
13277
|
onUploadFile: onUploadFile,
|
13269
13278
|
isUploadIcon: isUploadIcon,
|
13270
13279
|
isRemoveDisabled: isRemoveDisabled,
|
13271
|
-
isReplaceDisabled: isReplaceDisabled
|
13280
|
+
isReplaceDisabled: isReplaceDisabled,
|
13281
|
+
isError: rejectedFile.errors[0]?.message ? true : false
|
13272
13282
|
}, rejectedFile.file.name)), [rejectedFiles, handleRemoveClick, handleReplaceClick, isUploadIcon, onUploadFile]);
|
13273
13283
|
return jsxRuntime.jsxs("div", {
|
13274
13284
|
className: classNames('ff-file-dropzone-wrapper'),
|
@@ -16167,7 +16177,7 @@ const InputWithDropdown = /*#__PURE__*/React.forwardRef(({
|
|
16167
16177
|
} = e.currentTarget;
|
16168
16178
|
const parsedValue = parseInt(value);
|
16169
16179
|
if (type === 'number') {
|
16170
|
-
if (['Subtract', '-'].includes(e.key) || e.key === 'ArrowDown' && parsedValue <= 0) {
|
16180
|
+
if (['Subtract', '-'].includes(e.key) || e.key === 'ArrowDown' && (parsedValue <= 0 || isNaN(parsedValue))) {
|
16171
16181
|
e.preventDefault();
|
16172
16182
|
}
|
16173
16183
|
}
|
@@ -34924,7 +34934,7 @@ const ChipsAccordion = /*#__PURE__*/React.forwardRef(({
|
|
34924
34934
|
React.useEffect(() => {
|
34925
34935
|
checkOverflow();
|
34926
34936
|
}, [filterData]);
|
34927
|
-
React.
|
34937
|
+
React.useLayoutEffect(() => {
|
34928
34938
|
const handleUpdate = () => {
|
34929
34939
|
if (!inputRef?.current) return;
|
34930
34940
|
const {
|
@@ -35226,7 +35236,7 @@ const NlpInput = ({
|
|
35226
35236
|
document.body.style.paddingRight = isEnabled ? '' : `${bodyScrollWidth}px`;
|
35227
35237
|
document.body.style.overflow = isEnabled ? '' : 'hidden';
|
35228
35238
|
};
|
35229
|
-
React.
|
35239
|
+
React.useLayoutEffect(() => {
|
35230
35240
|
if (disabled) return;
|
35231
35241
|
if (showOptions) {
|
35232
35242
|
onSelectToggleScroll(!showOptions);
|
@@ -42686,6 +42696,7 @@ const ExcelToolBar = ({
|
|
42686
42696
|
setBorderType,
|
42687
42697
|
setFormatePainter
|
42688
42698
|
}) => {
|
42699
|
+
const selected = useSelector(state => state.selected instanceof EntireWorksheetSelection);
|
42689
42700
|
const [disable, setDisable] = React.useState(toolbar === 'disable' || !editable);
|
42690
42701
|
const cell = useSelector(state => state.active ? get$1(state.active, state.model.data) : null);
|
42691
42702
|
const data = useSelector(state => state.model.data);
|
@@ -42705,7 +42716,9 @@ const ExcelToolBar = ({
|
|
42705
42716
|
if (cell?.style && JSON.stringify(cell.style) !== JSON.stringify(cellStyle)) {
|
42706
42717
|
setCellStyle(cell?.style || basicStyle);
|
42707
42718
|
}
|
42708
|
-
if (
|
42719
|
+
if (selected) {
|
42720
|
+
setDisable(false);
|
42721
|
+
} else if (cell && typeof cell.readOnly === 'boolean') {
|
42709
42722
|
setDisable(cell.readOnly || toolbar === 'disable' || !editable);
|
42710
42723
|
}
|
42711
42724
|
}, [cell]);
|
@@ -48692,15 +48705,18 @@ const CreateVariableSlider = ({
|
|
48692
48705
|
const [helperText, setHelperText] = React.useState('');
|
48693
48706
|
const [hashInputValue, setHashInputValue] = React.useState();
|
48694
48707
|
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
48708
|
+
const [hasChanges, setHasChanges] = React.useState(false);
|
48695
48709
|
const [initialValues, setInitialValues] = React.useState({
|
48696
48710
|
name: '',
|
48697
|
-
value: ''
|
48711
|
+
value: '',
|
48712
|
+
isChecked: false
|
48698
48713
|
});
|
48699
48714
|
React.useEffect(() => {
|
48700
48715
|
if (isOpen && mode === 'edit') {
|
48701
48716
|
setInitialValues({
|
48702
48717
|
name: variableName,
|
48703
|
-
value: variableValue
|
48718
|
+
value: variableValue,
|
48719
|
+
isChecked: hideValue
|
48704
48720
|
});
|
48705
48721
|
}
|
48706
48722
|
}, []);
|
@@ -48741,10 +48757,15 @@ const CreateVariableSlider = ({
|
|
48741
48757
|
const isValid = isNonEmpty && matchesPattern && noWhitespaceEdges && lengthValid;
|
48742
48758
|
return isValid;
|
48743
48759
|
}
|
48744
|
-
|
48745
|
-
if (mode !== 'edit') return
|
48746
|
-
|
48747
|
-
|
48760
|
+
React.useEffect(() => {
|
48761
|
+
if (mode !== 'edit') return;
|
48762
|
+
const {
|
48763
|
+
name,
|
48764
|
+
value,
|
48765
|
+
isChecked
|
48766
|
+
} = initialValues;
|
48767
|
+
setHasChanges(variableName !== name || variableValue !== value || hideValue !== isChecked);
|
48768
|
+
}, [mode, variableName, variableValue, hideValue, initialValues]);
|
48748
48769
|
const FooterContent = () => {
|
48749
48770
|
return jsxRuntime.jsxs("div", {
|
48750
48771
|
className: "ff-create-slider-footer",
|
@@ -63132,6 +63153,9 @@ const Editor = /*#__PURE__*/React.forwardRef(({
|
|
63132
63153
|
editor.onDidChangeCursorPosition(e => {
|
63133
63154
|
setCurrentLine(e.position.lineNumber);
|
63134
63155
|
});
|
63156
|
+
editor.onMouseDown(() => {
|
63157
|
+
setShowDropdown(false);
|
63158
|
+
});
|
63135
63159
|
// Track selection changes (user highlighting text)
|
63136
63160
|
editor.onDidChangeCursorSelection(() => {
|
63137
63161
|
const selections = editor.getSelections?.() || [];
|
@@ -114990,15 +115014,44 @@ const TextEditor = ({
|
|
114990
115014
|
return jsxRuntime.jsxs("div", {
|
114991
115015
|
className: "ff-textEditor-container",
|
114992
115016
|
children: [jsxRuntime.jsxs("div", {
|
114993
|
-
className: "ff-
|
114994
|
-
children: [
|
114995
|
-
className: "
|
114996
|
-
children:
|
114997
|
-
|
114998
|
-
|
114999
|
-
|
115000
|
-
|
115001
|
-
|
115017
|
+
className: "ff-title-button",
|
115018
|
+
children: [jsxRuntime.jsxs("div", {
|
115019
|
+
className: "ff-textEditor-label-asterisk-container",
|
115020
|
+
children: [required && jsxRuntime.jsx(Typography, {
|
115021
|
+
className: "required-asterisk",
|
115022
|
+
children: "* "
|
115023
|
+
}), label && jsxRuntime.jsx(Typography, {
|
115024
|
+
lineHeight: "10px",
|
115025
|
+
fontWeight: "medium",
|
115026
|
+
fontSize: "12px",
|
115027
|
+
children: label
|
115028
|
+
})]
|
115029
|
+
}), editableTextEditor && isEditing && jsxRuntime.jsxs("div", {
|
115030
|
+
ref: buttonsRef,
|
115031
|
+
className: "ff-textEditor-buttons",
|
115032
|
+
children: [jsxRuntime.jsx(Tooltip, {
|
115033
|
+
title: "Update",
|
115034
|
+
placement: "bottom",
|
115035
|
+
children: jsxRuntime.jsx(Icon, {
|
115036
|
+
name: "update_icon",
|
115037
|
+
color: "var(--label-edit-confirm-icon)",
|
115038
|
+
height: 20,
|
115039
|
+
width: 20,
|
115040
|
+
hoverEffect: true,
|
115041
|
+
onClick: handleSubmit
|
115042
|
+
})
|
115043
|
+
}), jsxRuntime.jsx(Tooltip, {
|
115044
|
+
title: "Cancel",
|
115045
|
+
placement: "bottom",
|
115046
|
+
children: jsxRuntime.jsx(Icon, {
|
115047
|
+
name: "close",
|
115048
|
+
color: "var(--label-edit-cancel-icon)",
|
115049
|
+
height: 20,
|
115050
|
+
width: 20,
|
115051
|
+
onClick: handleCancel,
|
115052
|
+
hoverEffect: true
|
115053
|
+
})
|
115054
|
+
})]
|
115002
115055
|
})]
|
115003
115056
|
}), jsxRuntime.jsx("div", {
|
115004
115057
|
ref: editorRef,
|
@@ -115032,32 +115085,6 @@ const TextEditor = ({
|
|
115032
115085
|
}
|
115033
115086
|
}
|
115034
115087
|
})
|
115035
|
-
}), editableTextEditor && isEditing && jsxRuntime.jsxs("div", {
|
115036
|
-
ref: buttonsRef,
|
115037
|
-
className: "ff-textEditor-buttons",
|
115038
|
-
children: [jsxRuntime.jsx(Tooltip, {
|
115039
|
-
title: "Update",
|
115040
|
-
placement: "bottom",
|
115041
|
-
children: jsxRuntime.jsx(Icon, {
|
115042
|
-
name: "update_icon",
|
115043
|
-
color: "var(--label-edit-confirm-icon)",
|
115044
|
-
height: 20,
|
115045
|
-
width: 20,
|
115046
|
-
hoverEffect: true,
|
115047
|
-
onClick: handleSubmit
|
115048
|
-
})
|
115049
|
-
}), jsxRuntime.jsx(Tooltip, {
|
115050
|
-
title: "Cancel",
|
115051
|
-
placement: "bottom",
|
115052
|
-
children: jsxRuntime.jsx(Icon, {
|
115053
|
-
name: "close",
|
115054
|
-
color: "var(--label-edit-cancel-icon)",
|
115055
|
-
height: 20,
|
115056
|
-
width: 20,
|
115057
|
-
onClick: handleCancel,
|
115058
|
-
hoverEffect: true
|
115059
|
-
})
|
115060
|
-
})]
|
115061
115088
|
}), required && errorMsg || helperText && error ? jsxRuntime.jsx(Typography, {
|
115062
115089
|
fontSize: 10,
|
115063
115090
|
className: 'ff-textEditor-error-msg',
|