pixel-react-excel-sheet 1.0.26 → 1.0.27
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/index.esm.js +16 -10
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +16 -10
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +5 -8
- package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +32 -31
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +1 -5
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +16 -16
package/package.json
CHANGED
|
@@ -105,7 +105,7 @@ const ColumnIndicator: Types.ColumnIndicatorComponent = ({
|
|
|
105
105
|
|
|
106
106
|
return (
|
|
107
107
|
<th
|
|
108
|
-
style={{ minWidth: `${columnWidth}px
|
|
108
|
+
style={{ minWidth: `${columnWidth}px`}} //Dynamic value, Inline Styling required
|
|
109
109
|
className={classNames('ff-spreadsheet-header', {
|
|
110
110
|
'ff-spreadsheet-header--selected': selected,
|
|
111
111
|
})}
|
|
@@ -113,14 +113,11 @@ const ColumnIndicator: Types.ColumnIndicatorComponent = ({
|
|
|
113
113
|
onContextMenu={contextClick}
|
|
114
114
|
tabIndex={0}
|
|
115
115
|
>
|
|
116
|
-
<div
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
<div onClick={handleClick} onContextMenu={contextClick} tabIndex={0}>
|
|
117
|
+
<Typography fontWeight="medium">
|
|
118
|
+
{label !== undefined ? label : columnIndexToLabel(column)}
|
|
119
|
+
</Typography>
|
|
120
120
|
</div>
|
|
121
|
-
<Typography fontWeight='medium'>
|
|
122
|
-
{label !== undefined ? label : columnIndexToLabel(column)}
|
|
123
|
-
</Typography>
|
|
124
121
|
<div
|
|
125
122
|
onMouseDown={onMouseDown}
|
|
126
123
|
onClick={() => activate({ row: -1, column })}
|
|
@@ -102,37 +102,38 @@ const RowIndicator: Types.RowIndicatorComponent = ({
|
|
|
102
102
|
);
|
|
103
103
|
|
|
104
104
|
return (
|
|
105
|
-
<th
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
105
|
+
<th
|
|
106
|
+
style={{
|
|
107
|
+
height: `${rowHeight}px`,
|
|
108
|
+
minWidth: '60px',
|
|
109
|
+
}}
|
|
110
|
+
className={classNames('ff-spreadsheet-header', {
|
|
111
|
+
'ff-spreadsheet-header--selected': selected,
|
|
112
|
+
})}
|
|
113
|
+
onClick={handleClick}
|
|
114
|
+
onContextMenu={contextClick}
|
|
115
|
+
tabIndex={0}
|
|
116
|
+
>
|
|
117
|
+
<div style={{ position: 'sticky', zIndex: 2000 }}>
|
|
118
|
+
<Typography fontWeight="medium">
|
|
119
|
+
{label !== undefined ? label : row + 1}
|
|
120
|
+
</Typography>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div
|
|
124
|
+
onMouseDown={onMouseDown}
|
|
125
|
+
onClick={() => activate({ row, column: -1 })}
|
|
126
|
+
style={{
|
|
127
|
+
zIndex: 'inherit',
|
|
128
|
+
height: '2px',
|
|
129
|
+
position: 'absolute',
|
|
130
|
+
right: 0,
|
|
131
|
+
bottom: 0,
|
|
132
|
+
width: '100%',
|
|
133
|
+
cursor: 'ns-resize',
|
|
134
|
+
}}
|
|
135
|
+
/>
|
|
136
|
+
</th>
|
|
136
137
|
);
|
|
137
138
|
};
|
|
138
139
|
|
|
@@ -43,9 +43,6 @@
|
|
|
43
43
|
|
|
44
44
|
.ff-spreadsheet-table {
|
|
45
45
|
overflow: scroll;
|
|
46
|
-
top: 0;
|
|
47
|
-
left: 0;
|
|
48
|
-
margin: 0;
|
|
49
46
|
position: relative;
|
|
50
47
|
&::-webkit-scrollbar {
|
|
51
48
|
height: 0px;
|
|
@@ -92,12 +89,11 @@
|
|
|
92
89
|
color: var(--readonly-text-color);
|
|
93
90
|
text-align: center;
|
|
94
91
|
z-index: 1000;
|
|
95
|
-
position: sticky;
|
|
96
92
|
}
|
|
97
93
|
|
|
98
94
|
.ff-spreadsheet-corner-header {
|
|
99
95
|
position: fixed;
|
|
100
|
-
z-index:
|
|
96
|
+
z-index: 3000;
|
|
101
97
|
}
|
|
102
98
|
|
|
103
99
|
.ff-spreadsheet-row-header {
|
|
@@ -98,7 +98,7 @@ export type Props<CellType extends Types.CellBase> = {
|
|
|
98
98
|
/** Callback called when the Spreadsheet's evaluated data changes. */
|
|
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
|
|
|
@@ -446,23 +446,23 @@ const Spreadsheet = <CellType extends Types.CellBase>(
|
|
|
446
446
|
const rootNode = React.useMemo(
|
|
447
447
|
() => (
|
|
448
448
|
<div className="ff-excel">
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
449
|
+
<div className="ff-excel-toolbar-container">
|
|
450
|
+
<ExcelToolBar
|
|
451
|
+
onBold={onBold}
|
|
452
|
+
onItalic={onItalic}
|
|
453
|
+
setUnderlineType={setUnderlineType}
|
|
454
|
+
setColor={setColor}
|
|
455
|
+
setBorderType={setBorderType}
|
|
456
|
+
setFontSize={setFontSize}
|
|
457
|
+
setFontFamily={setFontFamily}
|
|
458
|
+
setTextAlign={setTextAlign}
|
|
459
|
+
setBackgroundColor={setBackgroundColor}
|
|
460
|
+
setFormatePainter={setFormatePainter}
|
|
461
|
+
/>
|
|
462
|
+
</div>
|
|
463
463
|
<div
|
|
464
464
|
ref={rootRef}
|
|
465
|
-
style={{height:sheetHeight}}
|
|
465
|
+
style={{ height: sheetHeight }}
|
|
466
466
|
className={classNames('ff-spreadsheet', className)}
|
|
467
467
|
onKeyDown={handleKeyDown}
|
|
468
468
|
onMouseMove={handleMouseMove}
|