@infinite-table/infinite-react 0.0.2-canary.1 → 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.d.ts +2 -0
- package/index.esm.js +7 -3
- package/index.js +7 -3
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -984,6 +984,7 @@ declare module "components/InfiniteTable/utils/getComputedVisibleColumns" {
|
|
|
984
984
|
index: number;
|
|
985
985
|
};
|
|
986
986
|
};
|
|
987
|
+
export const IS_GROUP_COLUMN_ID: (columnId: string) => boolean;
|
|
987
988
|
export type GetComputedVisibleColumnsResult<T> = {
|
|
988
989
|
computedRemainingSpace: number;
|
|
989
990
|
computedPinnedStartColumnsWidth: number;
|
|
@@ -2025,4 +2026,5 @@ declare module "@infinite-table/infinite-react" {
|
|
|
2025
2026
|
export * from "components/DataSource/index";
|
|
2026
2027
|
export { group, flatten } from "utils/groupAndPivot/index";
|
|
2027
2028
|
export { useComponentState, getComponentStateRoot, } from "components/hooks/useComponentState";
|
|
2029
|
+
export { interceptMap } from "components/hooks/useInterceptedMap";
|
|
2028
2030
|
}
|
package/index.esm.js
CHANGED
|
@@ -1043,6 +1043,9 @@ var adjustColumnOrderForPinning = (columnOrder, columnPinning) => {
|
|
|
1043
1043
|
};
|
|
1044
1044
|
|
|
1045
1045
|
// src/components/InfiniteTable/utils/getComputedVisibleColumns.ts
|
|
1046
|
+
var IS_GROUP_COLUMN_ID = (columnId) => {
|
|
1047
|
+
return columnId.startsWith("group-by");
|
|
1048
|
+
};
|
|
1046
1049
|
var isColumnVisible = (columnVisibility, _columnVisibilityAssumeVisible, colId) => {
|
|
1047
1050
|
return !columnVisibility.has(colId) || columnVisibility.get(colId) !== false;
|
|
1048
1051
|
};
|
|
@@ -1077,12 +1080,12 @@ var getComputedVisibleColumns = ({
|
|
|
1077
1080
|
let col = columns.get(columnId);
|
|
1078
1081
|
if (!col) {
|
|
1079
1082
|
col = generatedColumns.get(columnId);
|
|
1080
|
-
if (!col) {
|
|
1083
|
+
if (!col && !IS_GROUP_COLUMN_ID(columnId)) {
|
|
1081
1084
|
throw `Column with id "${columnId}" specified in columnOrder array cannot be found in the columns map.`;
|
|
1082
1085
|
}
|
|
1083
1086
|
}
|
|
1084
1087
|
return col;
|
|
1085
|
-
});
|
|
1088
|
+
}).filter(Boolean);
|
|
1086
1089
|
const sortedMap = (sortInfo != null ? sortInfo : []).reduce((acc, info, index) => {
|
|
1087
1090
|
if (info.id) {
|
|
1088
1091
|
acc[info.id] = { sortInfo: info, index };
|
|
@@ -6247,7 +6250,7 @@ var useLicense = (licenseKey) => {
|
|
|
6247
6250
|
const valid = useMemo10(() => {
|
|
6248
6251
|
return isValidLicense(licenseKey, {
|
|
6249
6252
|
publishedAt: 1624970570587,
|
|
6250
|
-
version: "0.0.2-canary.
|
|
6253
|
+
version: "0.0.2-canary.2"
|
|
6251
6254
|
});
|
|
6252
6255
|
}, [licenseKey]);
|
|
6253
6256
|
return valid;
|
|
@@ -6446,6 +6449,7 @@ export {
|
|
|
6446
6449
|
flatten,
|
|
6447
6450
|
getComponentStateRoot,
|
|
6448
6451
|
group,
|
|
6452
|
+
interceptMap,
|
|
6449
6453
|
useComponentState,
|
|
6450
6454
|
useDataSource
|
|
6451
6455
|
};
|
package/index.js
CHANGED
|
@@ -579,6 +579,7 @@ __export(exports, {
|
|
|
579
579
|
flatten: () => flatten,
|
|
580
580
|
getComponentStateRoot: () => getComponentStateRoot,
|
|
581
581
|
group: () => group,
|
|
582
|
+
interceptMap: () => interceptMap,
|
|
582
583
|
useComponentState: () => useComponentState,
|
|
583
584
|
useDataSource: () => useDataSource
|
|
584
585
|
});
|
|
@@ -1050,6 +1051,9 @@ var adjustColumnOrderForPinning = (columnOrder, columnPinning) => {
|
|
|
1050
1051
|
};
|
|
1051
1052
|
|
|
1052
1053
|
// src/components/InfiniteTable/utils/getComputedVisibleColumns.ts
|
|
1054
|
+
var IS_GROUP_COLUMN_ID = (columnId) => {
|
|
1055
|
+
return columnId.startsWith("group-by");
|
|
1056
|
+
};
|
|
1053
1057
|
var isColumnVisible = (columnVisibility, _columnVisibilityAssumeVisible, colId) => {
|
|
1054
1058
|
return !columnVisibility.has(colId) || columnVisibility.get(colId) !== false;
|
|
1055
1059
|
};
|
|
@@ -1084,12 +1088,12 @@ var getComputedVisibleColumns = ({
|
|
|
1084
1088
|
let col = columns.get(columnId);
|
|
1085
1089
|
if (!col) {
|
|
1086
1090
|
col = generatedColumns.get(columnId);
|
|
1087
|
-
if (!col) {
|
|
1091
|
+
if (!col && !IS_GROUP_COLUMN_ID(columnId)) {
|
|
1088
1092
|
throw `Column with id "${columnId}" specified in columnOrder array cannot be found in the columns map.`;
|
|
1089
1093
|
}
|
|
1090
1094
|
}
|
|
1091
1095
|
return col;
|
|
1092
|
-
});
|
|
1096
|
+
}).filter(Boolean);
|
|
1093
1097
|
const sortedMap = (sortInfo != null ? sortInfo : []).reduce((acc, info, index) => {
|
|
1094
1098
|
if (info.id) {
|
|
1095
1099
|
acc[info.id] = { sortInfo: info, index };
|
|
@@ -6155,7 +6159,7 @@ var useLicense = (licenseKey) => {
|
|
|
6155
6159
|
const valid = (0, import_react41.useMemo)(() => {
|
|
6156
6160
|
return isValidLicense(licenseKey, {
|
|
6157
6161
|
publishedAt: 1624970570587,
|
|
6158
|
-
version: "0.0.2-canary.
|
|
6162
|
+
version: "0.0.2-canary.2"
|
|
6159
6163
|
});
|
|
6160
6164
|
}, [licenseKey]);
|
|
6161
6165
|
return valid;
|
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.0.2-canary.
|
|
4
|
+
"version": "0.0.2-canary.2",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.esm.js",
|
|
7
7
|
"typings": "index.d.ts",
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
},
|
|
16
16
|
"license": "Commercial",
|
|
17
17
|
"//": "will be updated at build time",
|
|
18
|
-
"publishedAt":
|
|
18
|
+
"publishedAt": 1634312769890
|
|
19
19
|
}
|