@iyulab/flex-table 0.14.0 → 0.16.0
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/dist/flex-table.d.ts
CHANGED
|
@@ -17,6 +17,10 @@ export declare class FlexTable extends LitElement {
|
|
|
17
17
|
showFilters: boolean;
|
|
18
18
|
/** Enable built-in context menu on cell right-click. */
|
|
19
19
|
showContextMenu: boolean;
|
|
20
|
+
/** Number of rows to freeze at the top (always visible during vertical scroll). */
|
|
21
|
+
frozenRows: number;
|
|
22
|
+
/** Enable file drag-and-drop import (.xlsx, .csv). */
|
|
23
|
+
importEnabled: boolean;
|
|
20
24
|
/** Enable row-level checkbox selection. */
|
|
21
25
|
selectable: boolean;
|
|
22
26
|
/** Row selection mode: 'single' or 'multi' (default: 'multi'). */
|
|
@@ -62,6 +66,9 @@ export declare class FlexTable extends LitElement {
|
|
|
62
66
|
private _findState;
|
|
63
67
|
private _columnWidths;
|
|
64
68
|
private _hostResizeObserver;
|
|
69
|
+
/** Keyed by dataIndex → colKey → comment text */
|
|
70
|
+
private _comments;
|
|
71
|
+
private _isDragOver;
|
|
65
72
|
get visibleColumns(): ColumnDefinition[];
|
|
66
73
|
private get _prefixWidth();
|
|
67
74
|
/** Whether an undo operation is available. */
|
|
@@ -160,6 +167,39 @@ export declare class FlexTable extends LitElement {
|
|
|
160
167
|
* Export table data and trigger file download.
|
|
161
168
|
*/
|
|
162
169
|
exportToFile(format: ExportFormat, filename?: string): void;
|
|
170
|
+
/**
|
|
171
|
+
* Set a comment on the cell at the given data index and column key.
|
|
172
|
+
* Pass an empty string or null to remove the comment.
|
|
173
|
+
*/
|
|
174
|
+
setComment(dataIndex: number, colKey: string, text: string | null): void;
|
|
175
|
+
/**
|
|
176
|
+
* Get the comment for a cell (by data index and column key). Returns null if none.
|
|
177
|
+
*/
|
|
178
|
+
getComment(dataIndex: number, colKey: string): string | null;
|
|
179
|
+
/**
|
|
180
|
+
* Get all comments as a flat array.
|
|
181
|
+
*/
|
|
182
|
+
getAllComments(): Array<{
|
|
183
|
+
dataIndex: number;
|
|
184
|
+
colKey: string;
|
|
185
|
+
text: string;
|
|
186
|
+
}>;
|
|
187
|
+
/**
|
|
188
|
+
* Clear all comments.
|
|
189
|
+
*/
|
|
190
|
+
clearComments(): void;
|
|
191
|
+
/**
|
|
192
|
+
* Import data from an xlsx or csv File.
|
|
193
|
+
* Dispatches 'data-import' event with { count } on success.
|
|
194
|
+
*/
|
|
195
|
+
importFromFile(file: File): Promise<void>;
|
|
196
|
+
private _applyImportedSheet;
|
|
197
|
+
private _applyImportedRows;
|
|
198
|
+
/** Map header text → column key using exact header match (case-insensitive fallback). */
|
|
199
|
+
private _buildHeaderColumnMap;
|
|
200
|
+
private _onDragover;
|
|
201
|
+
private _onDragleave;
|
|
202
|
+
private _onDrop;
|
|
163
203
|
private _getSelectedDataRows;
|
|
164
204
|
/**
|
|
165
205
|
* Get the effective width for a column, checking internal overrides first.
|
|
@@ -169,6 +209,8 @@ export declare class FlexTable extends LitElement {
|
|
|
169
209
|
private get headerHeight();
|
|
170
210
|
/** Number of rows visible after filter + sort. */
|
|
171
211
|
private get _visibleRowCount();
|
|
212
|
+
private get _frozenRowCount();
|
|
213
|
+
private get frozenRowsHeight();
|
|
172
214
|
private get totalBodyHeight();
|
|
173
215
|
private get visibleRange();
|
|
174
216
|
connectedCallback(): void;
|
|
@@ -236,7 +278,17 @@ export declare class FlexTable extends LitElement {
|
|
|
236
278
|
private _adjustFilterDropdown;
|
|
237
279
|
private _onFilterBtnClick;
|
|
238
280
|
private _renderFilterDropdown;
|
|
281
|
+
private _buildTextPredicate;
|
|
282
|
+
private _applyTextFilter;
|
|
283
|
+
private _buildEmptyPredicate;
|
|
284
|
+
private _renderEmptyFilterRow;
|
|
285
|
+
private _evalNumCond;
|
|
286
|
+
private _buildNumberPredicate;
|
|
287
|
+
private _buildDatePredicate;
|
|
288
|
+
private _applyFilterForKey;
|
|
239
289
|
private _renderTextFilter;
|
|
290
|
+
private _defaultNumState;
|
|
291
|
+
private _renderNumCondRow;
|
|
240
292
|
private _renderNumberFilter;
|
|
241
293
|
private _invalidCells;
|
|
242
294
|
private _cellKey;
|
|
@@ -245,7 +297,7 @@ export declare class FlexTable extends LitElement {
|
|
|
245
297
|
private _textFilterState;
|
|
246
298
|
private _numberFilterState;
|
|
247
299
|
private _dateFilterState;
|
|
248
|
-
private
|
|
300
|
+
private _emptyFilterState;
|
|
249
301
|
private _renderDateFilter;
|
|
250
302
|
private _applyDateFilter;
|
|
251
303
|
private _renderBooleanFilter;
|
|
@@ -279,6 +331,7 @@ export declare class FlexTable extends LitElement {
|
|
|
279
331
|
render(): TemplateResult<1>;
|
|
280
332
|
private _onSelectAllChange;
|
|
281
333
|
private _onRowCheckboxChange;
|
|
334
|
+
private _renderFrozenRows;
|
|
282
335
|
private _renderFooter;
|
|
283
336
|
private _renderRow;
|
|
284
337
|
private _renderCell;
|
package/dist/flex-table.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, r, t as i } from "./flex-table-
|
|
1
|
+
import { a as e, i as t, n, r, t as i } from "./flex-table-B6dOkF56.js";
|
|
2
2
|
export { i as FlexTable, t as RowSelectionState, r as UndoStack, n as exportData, e as renderCell };
|
package/dist/react.js
CHANGED