@infinite-table/infinite-react 0.0.1-canary.9 → 0.0.2-canary.2
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/index.css +76 -31
- package/index.css.map +1 -1
- package/index.d.ts +64 -11
- package/index.esm.js +321 -122
- package/index.js +315 -117
- package/package.json +3 -2
package/index.css
CHANGED
|
@@ -190,6 +190,13 @@
|
|
|
190
190
|
.IT-VirtualScrollContainer {
|
|
191
191
|
backface-visibility: hidden;
|
|
192
192
|
-webkit-overflow-scrolling: touch;
|
|
193
|
+
/** MANDATORY BLOCK - START **/
|
|
194
|
+
position: fixed;
|
|
195
|
+
height: 100%;
|
|
196
|
+
width: 100%;
|
|
197
|
+
left: 0;
|
|
198
|
+
top: 0;
|
|
199
|
+
/** MANDATORY BLOCK - END **/
|
|
193
200
|
}
|
|
194
201
|
.IT-VirtualScrollContainer, .IT-VirtualScrollContainer:before, .IT-VirtualScrollContainer:after, .IT-VirtualScrollContainer *, .IT-VirtualScrollContainer *:before, .IT-VirtualScrollContainer *:after {
|
|
195
202
|
box-sizing: border-box;
|
|
@@ -201,15 +208,17 @@
|
|
|
201
208
|
left: 0;
|
|
202
209
|
}
|
|
203
210
|
|
|
211
|
+
.IList {
|
|
212
|
+
position: relative;
|
|
213
|
+
}
|
|
204
214
|
.IList, .IList:before, .IList:after, .IList *, .IList *:before, .IList *:after {
|
|
205
215
|
box-sizing: border-box;
|
|
206
216
|
}
|
|
207
217
|
.IList--vertical {
|
|
208
218
|
display: inline-block;
|
|
209
219
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
height: inherit;
|
|
220
|
+
.IList--allow-horizontal-scroll {
|
|
221
|
+
overflow-x: auto;
|
|
213
222
|
}
|
|
214
223
|
|
|
215
224
|
:root {
|
|
@@ -225,6 +234,7 @@
|
|
|
225
234
|
--ITableHeaderCell-icon-size: 16px;
|
|
226
235
|
--ITableCell__border-width: 1px;
|
|
227
236
|
--ITableCell__border: var(--ITableCell__border-width) solid #c6c6c6;
|
|
237
|
+
--ITableCell__border-invisible: none;
|
|
228
238
|
--ITableCell__padding: var(--it-space-2) var(--it-space-3);
|
|
229
239
|
--ITableHeaderCell__padding: var(--it-space-3) var(--it-space-3);
|
|
230
240
|
--ITableRow__color: inherit;
|
|
@@ -276,6 +286,22 @@
|
|
|
276
286
|
flex: 1;
|
|
277
287
|
}
|
|
278
288
|
|
|
289
|
+
.ITablePinnedRowsContainer--pinned-start {
|
|
290
|
+
border-right: var(--ITableCell__border);
|
|
291
|
+
}
|
|
292
|
+
.ITablePinnedRowsContainer--pinned-start .ITableColumnCell--last-in-category,
|
|
293
|
+
.ITablePinnedRowsContainer--pinned-start .ITableColumnCell--first-in-category {
|
|
294
|
+
--ITableCell__border: none;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.ITablePinnedRowsContainer--pinned-end {
|
|
298
|
+
border-left: var(--ITableCell__border);
|
|
299
|
+
}
|
|
300
|
+
.ITablePinnedRowsContainer--pinned-end .ITableColumnCell--last-in-category,
|
|
301
|
+
.ITablePinnedRowsContainer--pinned-end .ITableColumnCell--first-in-category {
|
|
302
|
+
--ITableCell__border: none;
|
|
303
|
+
}
|
|
304
|
+
|
|
279
305
|
.ITableFooter {
|
|
280
306
|
padding: var(--it-space-2);
|
|
281
307
|
}
|
|
@@ -323,6 +349,53 @@
|
|
|
323
349
|
border-left: var(--ITableCell__border);
|
|
324
350
|
}
|
|
325
351
|
|
|
352
|
+
.ITable--has-pinned-end-overflow .ITableHeaderCell--unpinned.ITableCell--last-in-category {
|
|
353
|
+
--ITableCell__border: none;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.ITableHeader {
|
|
357
|
+
background: var(--ITableHeader__background);
|
|
358
|
+
color: var(--ITableHeader__color);
|
|
359
|
+
}
|
|
360
|
+
.ITableHeader--unvirtualized {
|
|
361
|
+
position: relative;
|
|
362
|
+
overflow: hidden;
|
|
363
|
+
}
|
|
364
|
+
.ITableHeader--overflow {
|
|
365
|
+
z-index: 10;
|
|
366
|
+
}
|
|
367
|
+
.ITableHeader--overflow .ITableHeaderCell--pinned-start.ITableHeaderCell--last-in-category {
|
|
368
|
+
border-right: var(--ITableCell__border-invisible);
|
|
369
|
+
}
|
|
370
|
+
.ITableHeader--overflow .ITableHeaderCell--pinned-end.ITableHeaderCell--first-in-category {
|
|
371
|
+
border-left: var(--ITableCell__border-invisible);
|
|
372
|
+
}
|
|
373
|
+
.ITableHeader--overflow.ITableHeader--pinned-start {
|
|
374
|
+
border-right: var(--ITableCell__border);
|
|
375
|
+
}
|
|
376
|
+
.ITableHeader--overflow.ITableHeader--pinned-end {
|
|
377
|
+
border-left: var(--ITableCell__border);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.ITableHeaderCell {
|
|
381
|
+
border-right: var(--ITableCell__border);
|
|
382
|
+
}
|
|
383
|
+
.ITableHeaderCell--dragging {
|
|
384
|
+
z-index: 100;
|
|
385
|
+
opacity: 0.8;
|
|
386
|
+
background: var(--ITableHeaderCell--dragging__background);
|
|
387
|
+
}
|
|
388
|
+
.ITableHeaderCell--pinned-start {
|
|
389
|
+
z-index: 10;
|
|
390
|
+
}
|
|
391
|
+
.ITableHeaderCellProxy {
|
|
392
|
+
background: var(--ITableHeader__background);
|
|
393
|
+
opacity: 0.9;
|
|
394
|
+
padding: var(--ITableCell__padding);
|
|
395
|
+
padding-left: 20px;
|
|
396
|
+
z-index: 200;
|
|
397
|
+
}
|
|
398
|
+
|
|
326
399
|
.ITableRow--group-row.ITableRow--odd .ITableCell::before,
|
|
327
400
|
.ITableRow--group-row.ITableRow--even .ITableCell::before {
|
|
328
401
|
content: "";
|
|
@@ -371,34 +444,6 @@
|
|
|
371
444
|
background: var(--ITableRow--odd__background);
|
|
372
445
|
}
|
|
373
446
|
|
|
374
|
-
.ITableHeader {
|
|
375
|
-
background: var(--ITableHeader__background);
|
|
376
|
-
color: var(--ITableHeader__color);
|
|
377
|
-
}
|
|
378
|
-
.ITableHeader--unvirtualized {
|
|
379
|
-
position: relative;
|
|
380
|
-
align-items: stretch;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.ITableHeaderCell {
|
|
384
|
-
border-right: var(--ITableCell__border);
|
|
385
|
-
}
|
|
386
|
-
.ITableHeaderCell--dragging {
|
|
387
|
-
z-index: 100;
|
|
388
|
-
opacity: 0.8;
|
|
389
|
-
background: var(--ITableHeaderCell--dragging__background);
|
|
390
|
-
}
|
|
391
|
-
.ITableHeaderCell--pinned-start {
|
|
392
|
-
z-index: 10;
|
|
393
|
-
}
|
|
394
|
-
.ITableHeaderCellProxy {
|
|
395
|
-
background: var(--ITableHeader__background);
|
|
396
|
-
opacity: 0.9;
|
|
397
|
-
padding: var(--ITableCell__padding);
|
|
398
|
-
padding-left: 20px;
|
|
399
|
-
z-index: 200;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
447
|
.ITableHeaderCell__sort-icon {
|
|
403
448
|
margin-left: 10px;
|
|
404
449
|
position: relative;
|
package/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../src/style/utilities.scss","../src/components/VirtualScrollContainer/index.scss","../src/style/mixins.scss","../src/components/VirtualList/index.scss","../src/components/InfiniteTable/style/variables.scss","../src/components/InfiniteTable/style/index.scss"
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/style/utilities.scss","../src/components/VirtualScrollContainer/index.scss","../src/style/mixins.scss","../src/components/VirtualList/index.scss","../src/components/InfiniteTable/style/variables.scss","../src/components/InfiniteTable/style/index.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAGA;EACE;AAAoB;EACpB;AAAwB;EACxB;AAAuB;EACvB;AAAsB;EACtB;AAAuB;EACvB;EACA;AAAuB;EACvB;AAAsB;EACtB;AAAuB;EACvB;AAAoB;EACpB;AAAqB;EAErB;AAA0B;EAC1B;AAA4B;EAC5B;AAA2B;EAC3B;AAA4B;EAC5B;EACA;AAA2B;EAC3B;AAA0B;EAC1B;AAA2B;EAE3B;EAEA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAEF;EACE;;;ACtJF;EAEE;EACA;AAEA;EACA;EACA;EACA;EACA;EACA;AACA;;ACXA;EAME;;ADOF;EACE;EACA;EACA;EACA;;;AEdJ;EAGE;;ADNA;EAME;;ACEF;EACE;;AAEF;EACE;;;ACbJ;EACE;EACA;EACA;EACA;EACA;EAEA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;;;ACvCF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AHRA;EAME;;AGMF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;AAEA;AAAA;EAEE;;;AAGJ;EACE;;AAEA;AAAA;EAEE;;;AAIJ;EACE;;;AAGF;EAEE;EACA;EACA;EACA;;AAEA;EACE;;AAEF;EACE;;;AAIJ;EACE;EACA;;;AAOA;AAAA;EACE;EACA;;AAEF;AAAA;EACE;EACA;;;AAGJ;AAAA;EAEE;EACA;;AAEA;AAAA;EACE;;AAEF;AAAA;EACE;;;AAIF;EACE;;;AAIJ;EACE;EACA;;AACA;EACE;EACA;;AAGF;EACE;;AAIA;EACE;;AAEF;EACE;;AAGF;EACE;;AAEF;EACE;;;AAIN;EAgBE;;AAfA;EACE;EACA;EACA;;AAEF;EACE;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAMF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;EACA;;;AAEF;EACE;EACA;;AAGA;EACE;;;AAIJ;EACE;EACA;;AAGA;EACE;EACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAEF;EACE;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EAEA;EACA;;;AAKF;EACE;EAEA;EACA;;AAEF;EACE","file":"index.css"}
|
package/index.d.ts
CHANGED
|
@@ -476,7 +476,7 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
476
476
|
export type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & InfiniteTablePivotColumn<T> & InfiniteTableGeneratedGroupColumn<T>;
|
|
477
477
|
}
|
|
478
478
|
declare module "utils/groupAndPivot/index" {
|
|
479
|
-
import { DataSourcePivotBy } from "
|
|
479
|
+
import { DataSourcePivotBy } from "@infinite-table/infinite-react";
|
|
480
480
|
import { GroupRowsState } from "components/DataSource/GroupRowsState";
|
|
481
481
|
import { InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
482
482
|
import { InfiniteTableGroupColumnBase, InfiniteTablePropColumnGroups, InfiniteTablePropColumns } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
@@ -561,8 +561,9 @@ declare module "utils/groupAndPivot/index" {
|
|
|
561
561
|
}
|
|
562
562
|
declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
563
563
|
import * as React from 'react';
|
|
564
|
+
import { InfiniteTableState } from "components/InfiniteTable/types/index";
|
|
564
565
|
import { AggregationReducer, InfiniteTableEnhancedData } from "utils/groupAndPivot/index";
|
|
565
|
-
import { DataSourceGroupRowsBy, DataSourcePropGroupRowsBy, DataSourcePropPivotBy } from "components/DataSource/index";
|
|
566
|
+
import { DataSourceGroupRowsBy, DataSourcePropGroupRowsBy, DataSourcePropPivotBy, DataSourceState } from "components/DataSource/index";
|
|
566
567
|
import { Renderable } from "components/types/Renderable";
|
|
567
568
|
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnRenderFunction, InfiniteTableColumnWithSize, InfiniteTableComputedColumn, InfiniteTableGeneratedGroupColumn, InfiniteTablePivotColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
568
569
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
@@ -589,6 +590,8 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
589
590
|
setColumnVisibility: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
|
|
590
591
|
setColumnAggregations: (columnAggregations: InfiniteTablePropColumnAggregations<T>) => void;
|
|
591
592
|
x?: T;
|
|
593
|
+
getState: () => InfiniteTableState<T>;
|
|
594
|
+
getDataSourceState: () => DataSourceState<T>;
|
|
592
595
|
};
|
|
593
596
|
export type InfiniteTablePropVirtualizeColumns<T> = boolean | ((columns: InfiniteTableComputedColumn<T>[]) => boolean);
|
|
594
597
|
export type InfiniteTableInternalProps<T> = {
|
|
@@ -651,6 +654,8 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
651
654
|
columnVisibility?: InfiniteTablePropColumnVisibility;
|
|
652
655
|
defaultColumnVisibility?: InfiniteTablePropColumnVisibility;
|
|
653
656
|
columnPinning?: InfiniteTablePropColumnPinning;
|
|
657
|
+
pinnedStartMaxWidth?: number;
|
|
658
|
+
pinnedEndMaxWidth?: number;
|
|
654
659
|
defaultColumnPinning?: InfiniteTablePropColumnPinning;
|
|
655
660
|
defaultColumnAggregations?: InfiniteTablePropColumnAggregations<T>;
|
|
656
661
|
columnAggregations?: InfiniteTablePropColumnAggregations<T>;
|
|
@@ -702,6 +707,18 @@ declare module "components/types/SubscriptionCallback" {
|
|
|
702
707
|
onChange: (fn: SubscriptionCallbackOnChangeFn<T>) => VoidFn;
|
|
703
708
|
}
|
|
704
709
|
}
|
|
710
|
+
declare module "components/VirtualBrain/ScrollListener" {
|
|
711
|
+
import { OnScrollFn, ScrollPosition } from "components/types/ScrollPosition";
|
|
712
|
+
export class ScrollListener {
|
|
713
|
+
private scrollPosition;
|
|
714
|
+
private onScrollFns;
|
|
715
|
+
getScrollPosition: () => ScrollPosition;
|
|
716
|
+
onScroll: (fn: OnScrollFn) => () => void;
|
|
717
|
+
setScrollPosition: (scrollPosition: ScrollPosition) => void;
|
|
718
|
+
private notifyScrollChange;
|
|
719
|
+
destroy: () => void;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
705
722
|
declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
706
723
|
import type { ScrollPosition } from "components/types/ScrollPosition";
|
|
707
724
|
import type { InfiniteTableColumnGroup, InfiniteTableGeneratedColumns, InfiniteTablePropCollapsedColumnGroups, InfiniteTablePropColumnAggregations, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnVisibility, InfiniteTablePropGroupRenderStrategy, InfiniteTableProps } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
@@ -709,6 +726,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
709
726
|
import { ComponentStateActions } from "components/hooks/useComponentState";
|
|
710
727
|
import { MutableRefObject } from 'react';
|
|
711
728
|
import { SubscriptionCallback } from "components/types/SubscriptionCallback";
|
|
729
|
+
import { ScrollListener } from "components/VirtualBrain/ScrollListener";
|
|
712
730
|
export interface InfiniteTableState<T> {
|
|
713
731
|
domRef: MutableRefObject<HTMLDivElement | null>;
|
|
714
732
|
bodyDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
@@ -716,7 +734,7 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
716
734
|
bodySizeRef: MutableRefObject<Size | null>;
|
|
717
735
|
onRowHeightChange: SubscriptionCallback<number>;
|
|
718
736
|
onHeaderHeightChange: SubscriptionCallback<number>;
|
|
719
|
-
|
|
737
|
+
rowHeightComputed: number;
|
|
720
738
|
headerHeight: number;
|
|
721
739
|
columnShifts: null | number[];
|
|
722
740
|
draggingColumnId: null | string;
|
|
@@ -736,6 +754,8 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
736
754
|
pivotColumnGroups?: InfiniteTablePropColumnGroups;
|
|
737
755
|
computedColumnGroups: InfiniteTablePropColumnGroups;
|
|
738
756
|
generatedColumns: InfiniteTableGeneratedColumns<T>;
|
|
757
|
+
pinnedStartScrollListener: ScrollListener;
|
|
758
|
+
pinnedEndScrollListener: ScrollListener;
|
|
739
759
|
x?: T;
|
|
740
760
|
}
|
|
741
761
|
export type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
|
|
@@ -755,6 +775,8 @@ declare module "components/InfiniteTable/types/InfiniteTableState" {
|
|
|
755
775
|
groupColumn: InfiniteTableProps<T>['groupColumn'];
|
|
756
776
|
pivotColumn: InfiniteTableProps<T>['pivotColumn'];
|
|
757
777
|
pivotRowLabelsColumn: InfiniteTableProps<T>['pivotRowLabelsColumn'];
|
|
778
|
+
pinnedStartMaxWidth: InfiniteTableProps<T>['pinnedStartMaxWidth'];
|
|
779
|
+
pinnedEndMaxWidth: InfiniteTableProps<T>['pinnedEndMaxWidth'];
|
|
758
780
|
showZebraRows: InfiniteTableProps<T>['showZebraRows'];
|
|
759
781
|
header: InfiniteTableProps<T>['header'];
|
|
760
782
|
columnMinWidth: InfiniteTableProps<T>['columnMinWidth'];
|
|
@@ -798,6 +820,8 @@ declare module "components/InfiniteTable/types/InfiniteTableComputedValues" {
|
|
|
798
820
|
import type { InfiniteTableComputedColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
799
821
|
import type { InfiniteTablePropColumnOrderNormalized, InfiniteTablePropColumnVisibility } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
800
822
|
export interface InfiniteTableComputedValues<T> {
|
|
823
|
+
computedPinnedStartOverflow: boolean;
|
|
824
|
+
computedPinnedEndOverflow: boolean;
|
|
801
825
|
computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
|
|
802
826
|
computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
|
|
803
827
|
computedUnpinnedColumns: InfiniteTableComputedColumn<T>[];
|
|
@@ -806,7 +830,9 @@ declare module "components/InfiniteTable/types/InfiniteTableComputedValues" {
|
|
|
806
830
|
computedColumnVisibility: InfiniteTablePropColumnVisibility;
|
|
807
831
|
computedColumnOrder: InfiniteTablePropColumnOrderNormalized;
|
|
808
832
|
computedPinnedStartColumnsWidth: number;
|
|
833
|
+
computedPinnedStartWidth: number;
|
|
809
834
|
computedPinnedEndColumnsWidth: number;
|
|
835
|
+
computedPinnedEndWidth: number;
|
|
810
836
|
computedUnpinnedColumnsWidth: number;
|
|
811
837
|
computedUnpinnedOffset: number;
|
|
812
838
|
computedPinnedEndOffset: number;
|
|
@@ -958,10 +984,13 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
958
984
|
index: number;
|
|
959
985
|
};
|
|
960
986
|
};
|
|
987
|
+
export const IS_GROUP_COLUMN_ID: (columnId: string) => boolean;
|
|
961
988
|
export type GetComputedVisibleColumnsResult<T> = {
|
|
962
989
|
computedRemainingSpace: number;
|
|
963
990
|
computedPinnedStartColumnsWidth: number;
|
|
991
|
+
computedPinnedStartWidth: number;
|
|
964
992
|
computedPinnedEndColumnsWidth: number;
|
|
993
|
+
computedPinnedEndWidth: number;
|
|
965
994
|
computedUnpinnedColumnsWidth: number;
|
|
966
995
|
columnMinWidth?: number;
|
|
967
996
|
columnMaxWidth?: number;
|
|
@@ -981,6 +1010,8 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
981
1010
|
bodySize: Size;
|
|
982
1011
|
columnMinWidth?: number;
|
|
983
1012
|
columnMaxWidth?: number;
|
|
1013
|
+
pinnedStartMaxWidth?: number;
|
|
1014
|
+
pinnedEndMaxWidth?: number;
|
|
984
1015
|
columnDefaultWidth?: number;
|
|
985
1016
|
sortable?: boolean;
|
|
986
1017
|
multiSort: boolean;
|
|
@@ -992,7 +1023,7 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
992
1023
|
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
993
1024
|
columnVisibilityAssumeVisible: boolean;
|
|
994
1025
|
};
|
|
995
|
-
export const getComputedVisibleColumns: <T extends unknown>({ columns, generatedColumns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, sortable, sortInfo, setSortInfo, multiSort, draggableColumns, columnOrder, columnPinning, columnVisibility, columnVisibilityAssumeVisible, }: GetComputedVisibleColumnsParam<T>) => GetComputedVisibleColumnsResult<T>;
|
|
1026
|
+
export const getComputedVisibleColumns: <T extends unknown>({ columns, generatedColumns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, pinnedStartMaxWidth, pinnedEndMaxWidth, sortable, sortInfo, setSortInfo, multiSort, draggableColumns, columnOrder, columnPinning, columnVisibility, columnVisibilityAssumeVisible, }: GetComputedVisibleColumnsParam<T>) => GetComputedVisibleColumnsResult<T>;
|
|
996
1027
|
}
|
|
997
1028
|
declare module "components/hooks/useRerender" {
|
|
998
1029
|
export const useRerender: () => [number, () => void];
|
|
@@ -1031,6 +1062,8 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1031
1062
|
bodySize: Size;
|
|
1032
1063
|
columnMinWidth?: number;
|
|
1033
1064
|
columnMaxWidth?: number;
|
|
1065
|
+
pinnedEndMaxWidth?: number;
|
|
1066
|
+
pinnedStartMaxWidth?: number;
|
|
1034
1067
|
columnDefaultWidth?: number;
|
|
1035
1068
|
sortable?: boolean;
|
|
1036
1069
|
draggableColumns?: boolean;
|
|
@@ -1055,9 +1088,11 @@ declare module "components/InfiniteTable/hooks/useComputedVisibleColumns" {
|
|
|
1055
1088
|
computedUnpinnedColumns: GetComputedVisibleColumnsResult<T>['computedUnpinnedColumns'];
|
|
1056
1089
|
computedVisibleColumns: GetComputedVisibleColumnsResult<T>['computedVisibleColumns'];
|
|
1057
1090
|
computedVisibleColumnsMap: GetComputedVisibleColumnsResult<T>['computedVisibleColumnsMap'];
|
|
1091
|
+
computedPinnedEndWidth: GetComputedVisibleColumnsResult<T>['computedPinnedEndWidth'];
|
|
1092
|
+
computedPinnedStartWidth: GetComputedVisibleColumnsResult<T>['computedPinnedStartWidth'];
|
|
1058
1093
|
computedColumnOrder: GetComputedVisibleColumnsResult<T>['computedColumnOrder'];
|
|
1059
1094
|
};
|
|
1060
|
-
export const useComputedVisibleColumns: <T extends unknown>({ columns, generatedColumns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, sortable, draggableColumns, sortInfo, multiSort, setSortInfo, columnOrder, columnPinning, columnVisibility, columnVisibilityAssumeVisible, }: UseComputedVisibleColumnsParam<T>) => UseComputedVisibleColumnsResult<T>;
|
|
1095
|
+
export const useComputedVisibleColumns: <T extends unknown>({ columns, generatedColumns, bodySize, columnMinWidth, columnMaxWidth, columnDefaultWidth, sortable, draggableColumns, sortInfo, multiSort, setSortInfo, columnOrder, columnPinning, pinnedEndMaxWidth, pinnedStartMaxWidth, columnVisibility, columnVisibilityAssumeVisible, }: UseComputedVisibleColumnsParam<T>) => UseComputedVisibleColumnsResult<T>;
|
|
1061
1096
|
}
|
|
1062
1097
|
declare module "components/DataSource/publicHooks/useDataSourceActions" {
|
|
1063
1098
|
import { DataSourceComponentActions } from "components/DataSource/types";
|
|
@@ -1397,12 +1432,14 @@ declare module "components/InfiniteTable/components/InfiniteTableHeader/Infinite
|
|
|
1397
1432
|
import { InfiniteTableComputedColumn } from "components/InfiniteTable/index";
|
|
1398
1433
|
import { Renderable } from "components/types/Renderable";
|
|
1399
1434
|
import { VirtualBrain } from "components/VirtualBrain/index";
|
|
1435
|
+
import { ScrollListener } from "components/VirtualBrain/ScrollListener";
|
|
1400
1436
|
import { InfiniteTableComputedColumnGroup } from "components/InfiniteTable/types/InfiniteTableProps";
|
|
1401
1437
|
export type InfiniteTableHeaderProps<T> = {
|
|
1402
1438
|
repaintId?: string | number;
|
|
1403
1439
|
brain: VirtualBrain;
|
|
1404
1440
|
columns: InfiniteTableComputedColumn<T>[];
|
|
1405
1441
|
totalWidth: number;
|
|
1442
|
+
availableWidth: number;
|
|
1406
1443
|
};
|
|
1407
1444
|
export type InfiniteTableHeaderGroupProps<T> = {
|
|
1408
1445
|
columns: InfiniteTableComputedColumn<T>[];
|
|
@@ -1412,7 +1449,9 @@ declare module "components/InfiniteTable/components/InfiniteTableHeader/Infinite
|
|
|
1412
1449
|
headerHeight: number;
|
|
1413
1450
|
};
|
|
1414
1451
|
export type InfiniteTableHeaderUnvirtualizedProps<T> = Omit<InfiniteTableHeaderProps<T>, 'repaintId' | 'brain'> & {
|
|
1452
|
+
classNameModifiers?: string[];
|
|
1415
1453
|
brain?: VirtualBrain;
|
|
1454
|
+
scrollListener?: ScrollListener;
|
|
1416
1455
|
scrollable?: boolean;
|
|
1417
1456
|
};
|
|
1418
1457
|
}
|
|
@@ -1611,7 +1650,7 @@ declare module "components/VirtualList/SpacePlaceholder" {
|
|
|
1611
1650
|
interface SpacePlaceholderProps {
|
|
1612
1651
|
width: number;
|
|
1613
1652
|
height: number;
|
|
1614
|
-
count
|
|
1653
|
+
count?: number;
|
|
1615
1654
|
}
|
|
1616
1655
|
function SpacePlaceholderFn(props: SpacePlaceholderProps): JSX.Element;
|
|
1617
1656
|
export const SpacePlaceholder: React.MemoExoticComponent<typeof SpacePlaceholderFn>;
|
|
@@ -1759,8 +1798,8 @@ declare module "components/InfiniteTable/hooks/useUnpinnedRendering" {
|
|
|
1759
1798
|
computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
|
|
1760
1799
|
computedUnpinnedColumns: InfiniteTableComputedColumn<T>[];
|
|
1761
1800
|
computedUnpinnedColumnsWidth: number;
|
|
1762
|
-
|
|
1763
|
-
|
|
1801
|
+
computedPinnedStartWidth: number;
|
|
1802
|
+
computedPinnedEndWidth: number;
|
|
1764
1803
|
getState: () => InfiniteTableComponentState<T>;
|
|
1765
1804
|
};
|
|
1766
1805
|
export function useUnpinnedRendering<T>(params: UnpinnedRenderingParams<T>): JSX.Element | null;
|
|
@@ -1797,7 +1836,7 @@ declare module "components/VirtualList/RowListWithExternalScrolling" {
|
|
|
1797
1836
|
import type { RenderRow } from "components/VirtualList/types";
|
|
1798
1837
|
import type { ScrollPosition } from "components/types/ScrollPosition";
|
|
1799
1838
|
import { OnMountProps } from "components/hooks/useOnMount";
|
|
1800
|
-
type RowListWithExternalScrollingListProps = {
|
|
1839
|
+
export type RowListWithExternalScrollingListProps = {
|
|
1801
1840
|
brain: VirtualBrain;
|
|
1802
1841
|
renderRow: RenderRow;
|
|
1803
1842
|
repaintId?: number | string;
|
|
@@ -1814,11 +1853,18 @@ declare module "components/InfiniteTable/hooks/usePinnedRendering" {
|
|
|
1814
1853
|
import type { RenderRow } from "components/VirtualList/types";
|
|
1815
1854
|
import { InfiniteTableComponentState } from "components/InfiniteTable/types/InfiniteTableState";
|
|
1816
1855
|
import { InfiniteTableToggleGroupRowFn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
1856
|
+
import { ScrollListener } from "components/VirtualBrain/ScrollListener";
|
|
1817
1857
|
type UsePinnedParams<T> = {
|
|
1818
1858
|
getState: () => InfiniteTableComponentState<T>;
|
|
1819
1859
|
getData: () => InfiniteTableEnhancedData<T>[];
|
|
1820
1860
|
bodySize: Size;
|
|
1861
|
+
pinnedStartScrollListener: ScrollListener;
|
|
1862
|
+
pinnedEndScrollListener: ScrollListener;
|
|
1821
1863
|
repaintId: string | number;
|
|
1864
|
+
computedPinnedStartWidth: number;
|
|
1865
|
+
computedPinnedEndWidth: number;
|
|
1866
|
+
computedPinnedStartOverflow: boolean;
|
|
1867
|
+
computedPinnedEndOverflow: boolean;
|
|
1822
1868
|
computedPinnedEndColumnsWidth: number;
|
|
1823
1869
|
computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
|
|
1824
1870
|
verticalVirtualBrain: VirtualBrain;
|
|
@@ -1831,6 +1877,11 @@ declare module "components/InfiniteTable/hooks/usePinnedRendering" {
|
|
|
1831
1877
|
computedPinnedStartColumnsWidth: number;
|
|
1832
1878
|
computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
|
|
1833
1879
|
};
|
|
1880
|
+
export function usePinnedRenderingForSide<T>(side: 'start' | 'end', params: UsePinnedParams<T>): {
|
|
1881
|
+
renderRowPinned: RenderRow;
|
|
1882
|
+
pinnedList: JSX.Element | null;
|
|
1883
|
+
pinnedScrollbarPlaceholder: JSX.Element | null;
|
|
1884
|
+
};
|
|
1834
1885
|
export function usePinnedEndRendering<T>(params: UsePinnedParams<T>): {
|
|
1835
1886
|
renderRowPinnedEnd: RenderRow;
|
|
1836
1887
|
pinnedEndList: JSX.Element | null;
|
|
@@ -1855,8 +1906,8 @@ declare module "components/InfiniteTable/hooks/useYourBrain" {
|
|
|
1855
1906
|
import { InfiniteTableComputedColumn } from "components/InfiniteTable/types/index";
|
|
1856
1907
|
type UseYourBrainParam<T = any> = {
|
|
1857
1908
|
computedUnpinnedColumns: InfiniteTableComputedColumn<T>[];
|
|
1858
|
-
|
|
1859
|
-
|
|
1909
|
+
computedPinnedStartWidth: number;
|
|
1910
|
+
computedPinnedEndWidth: number;
|
|
1860
1911
|
dataArray: any[];
|
|
1861
1912
|
rowHeight: number;
|
|
1862
1913
|
bodySize: Size;
|
|
@@ -1974,4 +2025,6 @@ declare module "@infinite-table/infinite-react" {
|
|
|
1974
2025
|
export * from "components/InfiniteTable/index";
|
|
1975
2026
|
export * from "components/DataSource/index";
|
|
1976
2027
|
export { group, flatten } from "utils/groupAndPivot/index";
|
|
2028
|
+
export { useComponentState, getComponentStateRoot, } from "components/hooks/useComponentState";
|
|
2029
|
+
export { interceptMap } from "components/hooks/useInterceptedMap";
|
|
1977
2030
|
}
|