@infinite-table/infinite-react 4.1.0 → 4.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 +2 -0
- package/index.dev.js +7 -5
- package/index.dev.mjs +7 -5
- package/index.js +2 -2
- package/index.mjs +2 -2
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -2102,6 +2102,7 @@ declare type DataSourceProps<T> = {
|
|
|
2102
2102
|
filterFunction?: DataSourcePropFilterFunction<T>;
|
|
2103
2103
|
sortMode?: 'local' | 'remote';
|
|
2104
2104
|
filterMode?: 'local' | 'remote';
|
|
2105
|
+
groupMode?: 'local' | 'remote';
|
|
2105
2106
|
filterValue?: DataSourcePropFilterValue<T>;
|
|
2106
2107
|
defaultFilterValue?: DataSourcePropFilterValue<T>;
|
|
2107
2108
|
onFilterValueChange?: (filterValue: DataSourcePropFilterValue<T>) => void;
|
|
@@ -2200,6 +2201,7 @@ declare type DataSourceDerivedState<T> = {
|
|
|
2200
2201
|
operatorsByFilterType: Record<string, Record<string, DataSourceFilterOperator<T>>>;
|
|
2201
2202
|
sortMode: NonUndefined<DataSourceProps<T>['sortMode']>;
|
|
2202
2203
|
filterMode: NonUndefined<DataSourceProps<T>['filterMode']>;
|
|
2204
|
+
groupMode: NonUndefined<DataSourceProps<T>['groupMode']>;
|
|
2203
2205
|
groupRowsState: GroupRowsState<T>;
|
|
2204
2206
|
multiSort: boolean;
|
|
2205
2207
|
controlledSort: boolean;
|
package/index.dev.js
CHANGED
|
@@ -13780,6 +13780,7 @@ function useLoadData() {
|
|
|
13780
13780
|
refetchKey,
|
|
13781
13781
|
sortInfo,
|
|
13782
13782
|
sortMode,
|
|
13783
|
+
groupMode,
|
|
13783
13784
|
groupBy,
|
|
13784
13785
|
pivotBy,
|
|
13785
13786
|
filterValue,
|
|
@@ -13851,7 +13852,7 @@ function useLoadData() {
|
|
|
13851
13852
|
}, [filterValue, filterMode, filterTypes]);
|
|
13852
13853
|
const depsObject = {
|
|
13853
13854
|
sortInfo: sortMode === "remote" ? sortInfo : null,
|
|
13854
|
-
groupBy,
|
|
13855
|
+
groupBy: groupMode === "remote" ? groupBy : null,
|
|
13855
13856
|
pivotBy,
|
|
13856
13857
|
refetchKey,
|
|
13857
13858
|
filterValue: computedFilterValue,
|
|
@@ -14334,7 +14335,7 @@ function getLivePaginationCursorValue(livePaginationCursorProp, state) {
|
|
|
14334
14335
|
}
|
|
14335
14336
|
var weakMap = /* @__PURE__ */ new WeakMap();
|
|
14336
14337
|
function deriveStateFromProps(params) {
|
|
14337
|
-
var _a, _b, _c;
|
|
14338
|
+
var _a, _b, _c, _d;
|
|
14338
14339
|
const { props, state, oldState } = params;
|
|
14339
14340
|
const controlledSort = isControlledValue(props.sortInfo);
|
|
14340
14341
|
const controlledFilter = isControlledValue(props.filterValue);
|
|
@@ -14432,8 +14433,9 @@ function deriveStateFromProps(params) {
|
|
|
14432
14433
|
operatorsByFilterType,
|
|
14433
14434
|
controlledSort,
|
|
14434
14435
|
controlledFilter,
|
|
14435
|
-
|
|
14436
|
-
|
|
14436
|
+
groupMode: typeof props.data === "function" ? (_b = props.groupMode) != null ? _b : "local" : "local",
|
|
14437
|
+
sortMode: props.sortFunction ? "local" : (_c = props.sortMode) != null ? _c : controlledSort ? "remote" : "local",
|
|
14438
|
+
filterMode: typeof props.filterFunction === "function" ? "local" : (_d = props.filterMode) != null ? _d : typeof props.data === "function" ? "remote" : "local",
|
|
14437
14439
|
multiSort: Array.isArray(
|
|
14438
14440
|
controlledSort ? props.sortInfo : props.defaultSortInfo
|
|
14439
14441
|
),
|
|
@@ -18634,7 +18636,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
18634
18636
|
}
|
|
18635
18637
|
let valid2 = isValidLicense(licenseKey, {
|
|
18636
18638
|
publishedAt: 1624970570587,
|
|
18637
|
-
version: "4.1.
|
|
18639
|
+
version: "4.1.1"
|
|
18638
18640
|
});
|
|
18639
18641
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
18640
18642
|
return true;
|
package/index.dev.mjs
CHANGED
|
@@ -13747,6 +13747,7 @@ function useLoadData() {
|
|
|
13747
13747
|
refetchKey,
|
|
13748
13748
|
sortInfo,
|
|
13749
13749
|
sortMode,
|
|
13750
|
+
groupMode,
|
|
13750
13751
|
groupBy,
|
|
13751
13752
|
pivotBy,
|
|
13752
13753
|
filterValue,
|
|
@@ -13818,7 +13819,7 @@ function useLoadData() {
|
|
|
13818
13819
|
}, [filterValue, filterMode, filterTypes]);
|
|
13819
13820
|
const depsObject = {
|
|
13820
13821
|
sortInfo: sortMode === "remote" ? sortInfo : null,
|
|
13821
|
-
groupBy,
|
|
13822
|
+
groupBy: groupMode === "remote" ? groupBy : null,
|
|
13822
13823
|
pivotBy,
|
|
13823
13824
|
refetchKey,
|
|
13824
13825
|
filterValue: computedFilterValue,
|
|
@@ -14301,7 +14302,7 @@ function getLivePaginationCursorValue(livePaginationCursorProp, state) {
|
|
|
14301
14302
|
}
|
|
14302
14303
|
var weakMap = /* @__PURE__ */ new WeakMap();
|
|
14303
14304
|
function deriveStateFromProps(params) {
|
|
14304
|
-
var _a, _b, _c;
|
|
14305
|
+
var _a, _b, _c, _d;
|
|
14305
14306
|
const { props, state, oldState } = params;
|
|
14306
14307
|
const controlledSort = isControlledValue(props.sortInfo);
|
|
14307
14308
|
const controlledFilter = isControlledValue(props.filterValue);
|
|
@@ -14399,8 +14400,9 @@ function deriveStateFromProps(params) {
|
|
|
14399
14400
|
operatorsByFilterType,
|
|
14400
14401
|
controlledSort,
|
|
14401
14402
|
controlledFilter,
|
|
14402
|
-
|
|
14403
|
-
|
|
14403
|
+
groupMode: typeof props.data === "function" ? (_b = props.groupMode) != null ? _b : "local" : "local",
|
|
14404
|
+
sortMode: props.sortFunction ? "local" : (_c = props.sortMode) != null ? _c : controlledSort ? "remote" : "local",
|
|
14405
|
+
filterMode: typeof props.filterFunction === "function" ? "local" : (_d = props.filterMode) != null ? _d : typeof props.data === "function" ? "remote" : "local",
|
|
14404
14406
|
multiSort: Array.isArray(
|
|
14405
14407
|
controlledSort ? props.sortInfo : props.defaultSortInfo
|
|
14406
14408
|
),
|
|
@@ -18605,7 +18607,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
18605
18607
|
}
|
|
18606
18608
|
let valid2 = isValidLicense(licenseKey, {
|
|
18607
18609
|
publishedAt: 1624970570587,
|
|
18608
|
-
version: "4.1.
|
|
18610
|
+
version: "4.1.1"
|
|
18609
18611
|
});
|
|
18610
18612
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
18611
18613
|
return true;
|