@infinite-table/infinite-react 0.1.0 → 0.1.1
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.d.ts +7 -3
- package/index.esm.js +8 -7
- package/index.js +8 -7
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -509,6 +509,8 @@ declare module "components/InfiniteTable/types/InfiniteTableColumn" {
|
|
|
509
509
|
className?: InfiniteTableColumnClassName<T>;
|
|
510
510
|
rowspan?: InfiniteTableColumnRowspanFn<T>;
|
|
511
511
|
valueGetter?: InfiniteTableColumnValueGetter<T>;
|
|
512
|
+
defaultWidth?: number;
|
|
513
|
+
defaultFlex?: number;
|
|
512
514
|
};
|
|
513
515
|
export type InfiniteTableColumn<T> = {} & InfiniteTableBaseColumn<T> & InfiniteTableColumnWithRenderOrRenderValueOrFieldOrValueGetter<T>;
|
|
514
516
|
export type InfiniteTableGeneratedGroupColumn<T> = InfiniteTableColumn<T> & {
|
|
@@ -911,7 +913,7 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
911
913
|
import { DataSourceGroupBy, DataSourcePropGroupBy, DataSourcePropPivotBy, DataSourceState } from "components/DataSource/index";
|
|
912
914
|
import { Renderable } from "components/types/Renderable";
|
|
913
915
|
import { LoadMaskProps } from "components/InfiniteTable/components/LoadMask";
|
|
914
|
-
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnRenderFunction, InfiniteTableComputedColumn, InfiniteTableComputedPivotFinalColumn, InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
916
|
+
import type { InfiniteTableBaseColumn, InfiniteTableColumn, InfiniteTableColumnPinned, InfiniteTableColumnRenderFunction, InfiniteTableComputedColumn, InfiniteTableComputedPivotFinalColumn, InfiniteTablePivotColumn, InfiniteTablePivotFinalColumn } from "components/InfiniteTable/types/InfiniteTableColumn";
|
|
915
917
|
import { InfiniteTablePropPivotTotalColumnPosition } from "components/InfiniteTable/types/InfiniteTableState";
|
|
916
918
|
export type InfiniteTablePropColumnOrderNormalized = string[];
|
|
917
919
|
export type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
|
|
@@ -938,8 +940,8 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
938
940
|
export type InfiniteTableColumnType<T> = {
|
|
939
941
|
minWidth?: number;
|
|
940
942
|
maxWidth?: number;
|
|
941
|
-
|
|
942
|
-
|
|
943
|
+
defaultWidth?: number;
|
|
944
|
+
defaultFlex?: number;
|
|
943
945
|
header?: InfiniteTableColumn<T>['header'];
|
|
944
946
|
comparer?: InfiniteTableColumn<T>['comparer'];
|
|
945
947
|
draggable?: InfiniteTableColumn<T>['draggable'];
|
|
@@ -947,8 +949,10 @@ declare module "components/InfiniteTable/types/InfiniteTableProps" {
|
|
|
947
949
|
resizable?: InfiniteTableColumn<T>['resizable'];
|
|
948
950
|
align?: InfiniteTableColumn<T>['align'];
|
|
949
951
|
verticalAlign?: InfiniteTableColumn<T>['verticalAlign'];
|
|
952
|
+
defaultPinned?: InfiniteTableColumnPinned;
|
|
950
953
|
renderValue?: InfiniteTableColumn<T>['renderValue'];
|
|
951
954
|
render?: InfiniteTableColumn<T>['render'];
|
|
955
|
+
valueGetter?: InfiniteTableColumn<T>['valueGetter'];
|
|
952
956
|
};
|
|
953
957
|
export type InfiniteTablePropColumnTypesMap<T> = Map<'default' | string, InfiniteTableColumnType<T>>;
|
|
954
958
|
export type InfiniteTablePropColumnTypes<T> = InfiniteTablePropColumnTypesMap<T> | Record<'default' | string, InfiniteTableColumnType<T>>;
|
package/index.esm.js
CHANGED
|
@@ -1277,8 +1277,8 @@ var getComputedVisibleColumns = ({
|
|
|
1277
1277
|
const colTypeSizing = {
|
|
1278
1278
|
minWidth: colType == null ? void 0 : colType.minWidth,
|
|
1279
1279
|
maxWidth: colType == null ? void 0 : colType.maxWidth,
|
|
1280
|
-
width: colType == null ? void 0 : colType.
|
|
1281
|
-
flex: colType == null ? void 0 : colType.
|
|
1280
|
+
width: colType == null ? void 0 : colType.defaultWidth,
|
|
1281
|
+
flex: colType == null ? void 0 : colType.defaultFlex
|
|
1282
1282
|
};
|
|
1283
1283
|
let colSizing = columnSizing.get(colId) || {};
|
|
1284
1284
|
if (colSizing.width != null) {
|
|
@@ -1331,7 +1331,7 @@ var getComputedVisibleColumns = ({
|
|
|
1331
1331
|
});
|
|
1332
1332
|
const firstPinnedEndAbsoluteOffset = bodySize.width - totalPinnedEndWidth;
|
|
1333
1333
|
columnsArray.forEach((c, i) => {
|
|
1334
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
1334
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
1335
1335
|
const id = visibleColumnOrder[i];
|
|
1336
1336
|
const nextColumnId = visibleColumnOrder[i + 1];
|
|
1337
1337
|
const colType = getColumnComputedType(c, columnTypes);
|
|
@@ -1392,6 +1392,7 @@ var getComputedVisibleColumns = ({
|
|
|
1392
1392
|
const result2 = __spreadProps(__spreadValues({
|
|
1393
1393
|
align: colType.align,
|
|
1394
1394
|
verticalAlign: colType.verticalAlign,
|
|
1395
|
+
valueGetter: colType.valueGetter,
|
|
1395
1396
|
renderValue: colType.renderValue,
|
|
1396
1397
|
render: colType.render
|
|
1397
1398
|
}, c), {
|
|
@@ -1399,7 +1400,7 @@ var getComputedVisibleColumns = ({
|
|
|
1399
1400
|
computedAbsoluteOffset,
|
|
1400
1401
|
computedPinningOffset,
|
|
1401
1402
|
computedOffset,
|
|
1402
|
-
computedSortable: (_e = (_d = c.sortable) != null ? _d : sortable) != null ? _e : true,
|
|
1403
|
+
computedSortable: (_f = (_e = (_d = c.sortable) != null ? _d : colType.sortable) != null ? _e : sortable) != null ? _f : true,
|
|
1403
1404
|
computedSortInfo,
|
|
1404
1405
|
computedSortIndex,
|
|
1405
1406
|
computedMultiSort: multiSort,
|
|
@@ -1408,14 +1409,14 @@ var getComputedVisibleColumns = ({
|
|
|
1408
1409
|
computedSortedDesc,
|
|
1409
1410
|
computedVisibleIndex: i,
|
|
1410
1411
|
computedPinned,
|
|
1411
|
-
computedDraggable: (
|
|
1412
|
+
computedDraggable: (_h = (_g = c.draggable) != null ? _g : draggableColumns) != null ? _h : true,
|
|
1412
1413
|
computedFirstInCategory,
|
|
1413
1414
|
computedLastInCategory,
|
|
1414
1415
|
computedFirst: i === 0,
|
|
1415
1416
|
computedLast,
|
|
1416
1417
|
toggleSort,
|
|
1417
1418
|
id,
|
|
1418
|
-
header: (
|
|
1419
|
+
header: (_k = (_j = (_i = c.header) != null ? _i : colType.header) != null ? _j : c.name) != null ? _k : c.field
|
|
1419
1420
|
});
|
|
1420
1421
|
computedOffset += computedWidth;
|
|
1421
1422
|
computedVisibleColumnsMap.set(result2.id, result2);
|
|
@@ -7268,7 +7269,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
7268
7269
|
const valid = useMemo11(() => {
|
|
7269
7270
|
let valid2 = isValidLicense(licenseKey, {
|
|
7270
7271
|
publishedAt: 1624970570587,
|
|
7271
|
-
version: "0.1.
|
|
7272
|
+
version: "0.1.1"
|
|
7272
7273
|
});
|
|
7273
7274
|
if (!licenseKey && !valid2 && isInsideSandbox) {
|
|
7274
7275
|
return true;
|
package/index.js
CHANGED
|
@@ -1285,8 +1285,8 @@ var getComputedVisibleColumns = ({
|
|
|
1285
1285
|
const colTypeSizing = {
|
|
1286
1286
|
minWidth: colType == null ? void 0 : colType.minWidth,
|
|
1287
1287
|
maxWidth: colType == null ? void 0 : colType.maxWidth,
|
|
1288
|
-
width: colType == null ? void 0 : colType.
|
|
1289
|
-
flex: colType == null ? void 0 : colType.
|
|
1288
|
+
width: colType == null ? void 0 : colType.defaultWidth,
|
|
1289
|
+
flex: colType == null ? void 0 : colType.defaultFlex
|
|
1290
1290
|
};
|
|
1291
1291
|
let colSizing = columnSizing.get(colId) || {};
|
|
1292
1292
|
if (colSizing.width != null) {
|
|
@@ -1339,7 +1339,7 @@ var getComputedVisibleColumns = ({
|
|
|
1339
1339
|
});
|
|
1340
1340
|
const firstPinnedEndAbsoluteOffset = bodySize.width - totalPinnedEndWidth;
|
|
1341
1341
|
columnsArray.forEach((c, i) => {
|
|
1342
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
1342
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
1343
1343
|
const id = visibleColumnOrder[i];
|
|
1344
1344
|
const nextColumnId = visibleColumnOrder[i + 1];
|
|
1345
1345
|
const colType = getColumnComputedType(c, columnTypes);
|
|
@@ -1400,6 +1400,7 @@ var getComputedVisibleColumns = ({
|
|
|
1400
1400
|
const result2 = __spreadProps(__spreadValues({
|
|
1401
1401
|
align: colType.align,
|
|
1402
1402
|
verticalAlign: colType.verticalAlign,
|
|
1403
|
+
valueGetter: colType.valueGetter,
|
|
1403
1404
|
renderValue: colType.renderValue,
|
|
1404
1405
|
render: colType.render
|
|
1405
1406
|
}, c), {
|
|
@@ -1407,7 +1408,7 @@ var getComputedVisibleColumns = ({
|
|
|
1407
1408
|
computedAbsoluteOffset,
|
|
1408
1409
|
computedPinningOffset,
|
|
1409
1410
|
computedOffset,
|
|
1410
|
-
computedSortable: (_e = (_d = c.sortable) != null ? _d : sortable) != null ? _e : true,
|
|
1411
|
+
computedSortable: (_f = (_e = (_d = c.sortable) != null ? _d : colType.sortable) != null ? _e : sortable) != null ? _f : true,
|
|
1411
1412
|
computedSortInfo,
|
|
1412
1413
|
computedSortIndex,
|
|
1413
1414
|
computedMultiSort: multiSort,
|
|
@@ -1416,14 +1417,14 @@ var getComputedVisibleColumns = ({
|
|
|
1416
1417
|
computedSortedDesc,
|
|
1417
1418
|
computedVisibleIndex: i,
|
|
1418
1419
|
computedPinned,
|
|
1419
|
-
computedDraggable: (
|
|
1420
|
+
computedDraggable: (_h = (_g = c.draggable) != null ? _g : draggableColumns) != null ? _h : true,
|
|
1420
1421
|
computedFirstInCategory,
|
|
1421
1422
|
computedLastInCategory,
|
|
1422
1423
|
computedFirst: i === 0,
|
|
1423
1424
|
computedLast,
|
|
1424
1425
|
toggleSort,
|
|
1425
1426
|
id,
|
|
1426
|
-
header: (
|
|
1427
|
+
header: (_k = (_j = (_i = c.header) != null ? _i : colType.header) != null ? _j : c.name) != null ? _k : c.field
|
|
1427
1428
|
});
|
|
1428
1429
|
computedOffset += computedWidth;
|
|
1429
1430
|
computedVisibleColumnsMap.set(result2.id, result2);
|
|
@@ -7172,7 +7173,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
7172
7173
|
const valid = (0, import_react43.useMemo)(() => {
|
|
7173
7174
|
let valid2 = isValidLicense(licenseKey, {
|
|
7174
7175
|
publishedAt: 1624970570587,
|
|
7175
|
-
version: "0.1.
|
|
7176
|
+
version: "0.1.1"
|
|
7176
7177
|
});
|
|
7177
7178
|
if (!licenseKey && !valid2 && isInsideSandbox) {
|
|
7178
7179
|
return true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infinite-table/infinite-react",
|
|
3
3
|
"description": "Infinite Table for React",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.esm.js",
|
|
7
7
|
"typings": "index.d.ts",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
},
|
|
15
15
|
"license": "Commercial & Open Source",
|
|
16
16
|
"//": "will be updated at build time",
|
|
17
|
-
"publishedAt":
|
|
17
|
+
"publishedAt": 1642076142630
|
|
18
18
|
}
|