pixel-react-excel-sheet 1.0.25 → 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/components/Drawer/Types.d.ts +4 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.esm.js +26 -22
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +26 -22
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/AppHeader/AppHeader.scss +2 -2
- package/src/components/ConditionalDropdown/ConditionalDropdown.tsx +16 -17
- package/src/components/Drawer/Drawer.scss +2 -2
- package/src/components/Drawer/Drawer.stories.tsx +1 -0
- package/src/components/Drawer/Drawer.tsx +2 -1
- package/src/components/Drawer/Types.ts +4 -0
- package/src/components/Editor/VariableDropdown.scss +1 -0
- package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +5 -8
- package/src/components/Excel/ExcelFile/ExcelFileComponents/HeaderRow.tsx +3 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +7 -5
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.scss +106 -108
- package/src/components/Excel/ExcelFile/ExcelFileComponents/Spreadsheet.tsx +16 -16
- package/src/components/Icon/iconList.ts +0 -2
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
flex: 1 1 auto;
|
|
37
37
|
overflow: hidden;
|
|
38
38
|
transition: flex-grow 1s ease, opacity 1s ease, max-width 1s ease;
|
|
39
|
-
max-width:
|
|
39
|
+
max-width: 150px; /* Initial max-width */
|
|
40
40
|
&:not(.ff-app-header-nav-bar-item--selected):hover::after {
|
|
41
41
|
animation: oscillate-border-width 0.5s ease-in-out forwards;
|
|
42
42
|
}
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
background-color: var(--primary-icon-color);
|
|
61
61
|
border-radius: 20px;
|
|
62
62
|
flex-grow: 12; /* Increase size on hover */
|
|
63
|
-
max-width:
|
|
63
|
+
max-width: 700px;
|
|
64
64
|
opacity: 1;
|
|
65
65
|
.ff-app-header-nav-bar-item-label {
|
|
66
66
|
box-shadow: 0px 4px 4px 0px #00000040 inset;
|
|
@@ -135,23 +135,22 @@ const ConditionalDropdown: React.FC<ConditionalDropdownProps> = ({
|
|
|
135
135
|
/>
|
|
136
136
|
)}
|
|
137
137
|
</div>
|
|
138
|
-
{showDropdown &&
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
)}
|
|
138
|
+
{showDropdown &&
|
|
139
|
+
(isHash ? (
|
|
140
|
+
<OptionsDropdown
|
|
141
|
+
position="relative"
|
|
142
|
+
width={dropdownWidth}
|
|
143
|
+
filteredOptions={filteredOptions}
|
|
144
|
+
onSelectVariable={handleDropdownClick}
|
|
145
|
+
/>
|
|
146
|
+
) : (
|
|
147
|
+
<VariableDropdown
|
|
148
|
+
position="absolute"
|
|
149
|
+
width={dropdownWidth}
|
|
150
|
+
optionsList={variableList}
|
|
151
|
+
onSelectVariable={handleDropdownClick}
|
|
152
|
+
/>
|
|
153
|
+
))}
|
|
155
154
|
</div>
|
|
156
155
|
);
|
|
157
156
|
};
|
|
@@ -99,7 +99,6 @@
|
|
|
99
99
|
}
|
|
100
100
|
.ff-custom-header {
|
|
101
101
|
background-color: var(--drawer-footer-bg);
|
|
102
|
-
padding: 4px 8px;
|
|
103
102
|
width: 100%;
|
|
104
103
|
}
|
|
105
104
|
}
|
|
@@ -132,7 +131,8 @@
|
|
|
132
131
|
}
|
|
133
132
|
.ff-custom-footer {
|
|
134
133
|
background-color: var(--drawer-footer-bg);
|
|
135
|
-
|
|
134
|
+
width: 100%;
|
|
135
|
+
border-radius: 0 0 8px 8px;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -39,6 +39,7 @@ const Drawer: FC<DrawerProps> = ({
|
|
|
39
39
|
height,
|
|
40
40
|
width,
|
|
41
41
|
right = 0,
|
|
42
|
+
overflow,
|
|
42
43
|
}: DrawerProps) => {
|
|
43
44
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
44
45
|
|
|
@@ -88,7 +89,7 @@ const Drawer: FC<DrawerProps> = ({
|
|
|
88
89
|
className={classNames('ff-drawer', `ff-drawer--${drawerSize}`, {
|
|
89
90
|
'ff-drawer--open': isOpen,
|
|
90
91
|
})}
|
|
91
|
-
style={{ zIndex, top, height, width, right }}
|
|
92
|
+
style={{ zIndex, top, height, width, right, overflow }}
|
|
92
93
|
>
|
|
93
94
|
{showHeader && (
|
|
94
95
|
<div
|
|
@@ -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 })}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as Types from './types';
|
|
2
2
|
|
|
3
|
-
const HeaderRow: Types.HeaderRowComponent = (props) =>
|
|
3
|
+
const HeaderRow: Types.HeaderRowComponent = (props) => (
|
|
4
|
+
<tr className="ff-spreadsheet-row-header" {...props} />
|
|
5
|
+
);
|
|
4
6
|
|
|
5
7
|
export default HeaderRow;
|
|
@@ -106,8 +106,7 @@ const RowIndicator: Types.RowIndicatorComponent = ({
|
|
|
106
106
|
style={{
|
|
107
107
|
height: `${rowHeight}px`,
|
|
108
108
|
minWidth: '60px',
|
|
109
|
-
|
|
110
|
-
}} //Dynamic value, Inline Styling required
|
|
109
|
+
}}
|
|
111
110
|
className={classNames('ff-spreadsheet-header', {
|
|
112
111
|
'ff-spreadsheet-header--selected': selected,
|
|
113
112
|
})}
|
|
@@ -115,9 +114,12 @@ const RowIndicator: Types.RowIndicatorComponent = ({
|
|
|
115
114
|
onContextMenu={contextClick}
|
|
116
115
|
tabIndex={0}
|
|
117
116
|
>
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
<div style={{ position: 'sticky', zIndex: 2000 }}>
|
|
118
|
+
<Typography fontWeight="medium">
|
|
119
|
+
{label !== undefined ? label : row + 1}
|
|
120
|
+
</Typography>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
121
123
|
<div
|
|
122
124
|
onMouseDown={onMouseDown}
|
|
123
125
|
onClick={() => activate({ row, column: -1 })}
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
|
|
25
25
|
position: relative;
|
|
26
26
|
overflow: scroll;
|
|
27
|
-
left: 0;
|
|
28
|
-
top: 0;
|
|
29
27
|
background: var(--background-color);
|
|
30
28
|
color: var(--text-color);
|
|
31
29
|
scrollbar-width: none;
|
|
@@ -45,135 +43,135 @@
|
|
|
45
43
|
|
|
46
44
|
.ff-spreadsheet-table {
|
|
47
45
|
overflow: scroll;
|
|
48
|
-
top: 0;
|
|
49
|
-
left: 0;
|
|
50
|
-
margin: 0;
|
|
51
46
|
position: relative;
|
|
52
47
|
&::-webkit-scrollbar {
|
|
53
48
|
height: 0px;
|
|
54
49
|
}
|
|
55
50
|
border-collapse: collapse;
|
|
56
51
|
table-layout: fixed;
|
|
52
|
+
}
|
|
53
|
+
.ff-spreadsheet-cell {
|
|
54
|
+
outline: none;
|
|
55
|
+
position: relative;
|
|
56
|
+
z-index: 0;
|
|
57
|
+
}
|
|
57
58
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
.ff-spreadsheet-active-cell .select_dot {
|
|
60
|
+
background-color: var(--elevation);
|
|
61
|
+
height: 10px;
|
|
62
|
+
width: 10px;
|
|
63
|
+
border-radius: 50%;
|
|
64
|
+
position: absolute;
|
|
65
|
+
bottom: -5px;
|
|
66
|
+
right: -5px;
|
|
67
|
+
cursor: crosshair;
|
|
68
|
+
z-index: 1000;
|
|
69
|
+
}
|
|
63
70
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
width: 10px;
|
|
68
|
-
border-radius: 50%;
|
|
69
|
-
position: absolute;
|
|
70
|
-
bottom: -5px;
|
|
71
|
-
right: -5px;
|
|
72
|
-
cursor: crosshair;
|
|
73
|
-
z-index: 1000;
|
|
74
|
-
}
|
|
71
|
+
.ff-spreadsheet-cell--readonly {
|
|
72
|
+
color: var(--readonly-text-color);
|
|
73
|
+
}
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
.ff-spreadsheet-cell,
|
|
76
|
+
.ff-spreadsheet-header {
|
|
77
|
+
border: 0.1px solid var(--border-color);
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
word-break: keep-all;
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
text-align: left;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
user-select: none;
|
|
84
|
+
}
|
|
79
85
|
|
|
80
|
-
|
|
81
|
-
.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
box-sizing: border-box;
|
|
88
|
-
user-select: none;
|
|
89
|
-
}
|
|
86
|
+
.ff-spreadsheet-header {
|
|
87
|
+
border: 0.1px solid var(--border-color);
|
|
88
|
+
background-color: var(--header-background-color);
|
|
89
|
+
color: var(--readonly-text-color);
|
|
90
|
+
text-align: center;
|
|
91
|
+
z-index: 1000;
|
|
92
|
+
}
|
|
90
93
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
text-align: center;
|
|
96
|
-
z-index: 1000;
|
|
97
|
-
position: sticky;
|
|
98
|
-
}
|
|
94
|
+
.ff-spreadsheet-corner-header {
|
|
95
|
+
position: fixed;
|
|
96
|
+
z-index: 3000;
|
|
97
|
+
}
|
|
99
98
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
.ff-spreadsheet-row-header {
|
|
100
|
+
// position: relative;
|
|
101
|
+
height: 34px;
|
|
102
|
+
}
|
|
104
103
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
.corner-header {
|
|
105
|
+
border: 0.1px solid var(--border-color);
|
|
106
|
+
background-color: var(--header-background-color);
|
|
107
|
+
position: absolute;
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
z-index: 1100;
|
|
112
|
+
top: -1px;
|
|
113
|
+
width: 60px;
|
|
114
|
+
height: 34px;
|
|
115
|
+
left: -1px;
|
|
116
|
+
}
|
|
118
117
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
.ff-spreadsheet-header--selected {
|
|
119
|
+
background: var(--brand-color);
|
|
120
|
+
color: var(--tooltip-text-color);
|
|
121
|
+
}
|
|
123
122
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
123
|
+
.ff-spreadsheet-data-viewer,
|
|
124
|
+
.ff-spreadsheet-data-editor input {
|
|
125
|
+
padding: 4px;
|
|
126
|
+
box-sizing: border-box;
|
|
127
|
+
}
|
|
128
|
+
.ff-spreadsheet-header {
|
|
129
|
+
box-sizing: border-box;
|
|
130
|
+
}
|
|
132
131
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
.ff-spreadsheet-data-viewer--preserve-breaks {
|
|
133
|
+
white-space: pre-wrap;
|
|
134
|
+
}
|
|
136
135
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
136
|
+
.ff-spreadsheet-data-editor,
|
|
137
|
+
.ff-spreadsheet-data-editor input {
|
|
138
|
+
width: 100%;
|
|
139
|
+
height: 100%;
|
|
140
|
+
}
|
|
142
141
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
142
|
+
.ff-spreadsheet-data-editor input {
|
|
143
|
+
font: inherit;
|
|
144
|
+
color: inherit;
|
|
145
|
+
background: none;
|
|
146
|
+
border: none;
|
|
147
|
+
outline: none;
|
|
148
|
+
margin: 0;
|
|
149
|
+
}
|
|
151
150
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
.ff-spreadsheet-data-viewer--boolean {
|
|
152
|
+
text-align: center;
|
|
153
|
+
}
|
|
155
154
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
155
|
+
.ff-spreadsheet-floating-rect {
|
|
156
|
+
position: absolute;
|
|
157
|
+
pointer-events: none;
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
}
|
|
161
160
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
.ff-spreadsheet-floating-rect--hidden {
|
|
162
|
+
display: none;
|
|
163
|
+
}
|
|
165
164
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
165
|
+
.ff-spreadsheet-floating-rect--selected {
|
|
166
|
+
background: var(--outline-background-color);
|
|
167
|
+
border: 2px var(--outline-color) solid;
|
|
168
|
+
}
|
|
170
169
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
.ff-spreadsheet-floating-rect--dragging {
|
|
171
|
+
border: none;
|
|
172
|
+
}
|
|
174
173
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
174
|
+
.ff-spreadsheet-floating-rect--copied {
|
|
175
|
+
border: 2px var(--outline-color) dashed;
|
|
178
176
|
}
|
|
179
177
|
}
|
|
@@ -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}
|
|
@@ -82,7 +82,6 @@ import IpkFileType from '../../assets/icons/ipk_file_type.svg?react';
|
|
|
82
82
|
import TxtFileType from '../../assets/icons/txt_file_type.svg?react';
|
|
83
83
|
import GifFileType from '../../assets/icons/gif_file_type.svg?react';
|
|
84
84
|
import JpgFileType from '../../assets/icons/jpg_file_type.svg?react';
|
|
85
|
-
|
|
86
85
|
import InfoIcon from '../../assets/icons/info_icon.svg?react';
|
|
87
86
|
import CalendarIcon from '../../assets/icons/calendar_icon.svg?react';
|
|
88
87
|
import HideIcon from '../../assets/icons/hide_icon.svg?react';
|
|
@@ -421,7 +420,6 @@ Components['add_testcase'] = AddTestCaseIcon;
|
|
|
421
420
|
Components['automation_testcase'] = AutomationTestCaseIcon;
|
|
422
421
|
Components['manual_testcase'] = ManualTestCaseIcon;
|
|
423
422
|
Components['back_icon'] = BackIcon;
|
|
424
|
-
|
|
425
423
|
Components['sause_lab'] = SauseLabIcon;
|
|
426
424
|
Components['local'] = LocalIcon;
|
|
427
425
|
Components['internet_explorer'] = InternetExplorerIcon;
|