@infinite-table/infinite-react 0.0.2-canary.6 → 0.0.5
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 +43 -37
- package/index.d.ts +157 -87
- package/index.esm.css +43 -37
- package/index.esm.js +270 -239
- package/index.js +268 -237
- package/package.json +3 -3
package/index.esm.js
CHANGED
|
@@ -658,7 +658,7 @@ function computeColumnGroupsDepths(columnGroups) {
|
|
|
658
658
|
while (parentGroupId) {
|
|
659
659
|
const parent = columnGroups.get(parentGroupId);
|
|
660
660
|
if (!parent) {
|
|
661
|
-
if (
|
|
661
|
+
if (true) {
|
|
662
662
|
console.warn(`Cannot find column group ${parentGroupId}`);
|
|
663
663
|
}
|
|
664
664
|
break;
|
|
@@ -1075,7 +1075,7 @@ var Logger = class {
|
|
|
1075
1075
|
constructor(channelName) {
|
|
1076
1076
|
this.debug = emptyLogFn;
|
|
1077
1077
|
this.error = emptyLogFn;
|
|
1078
|
-
if (
|
|
1078
|
+
if (true) {
|
|
1079
1079
|
this.debug = dbg(channelName);
|
|
1080
1080
|
this.error = err(channelName);
|
|
1081
1081
|
}
|
|
@@ -1677,16 +1677,16 @@ function getComponentStateRoot(config) {
|
|
|
1677
1677
|
return [__spreadProps(__spreadValues({}, initialArg), { props: props2 })];
|
|
1678
1678
|
}
|
|
1679
1679
|
});
|
|
1680
|
-
propsToStateSetRef.current = new Set([
|
|
1681
|
-
...propsToStateSetRef.current,
|
|
1682
|
-
...propertyReads
|
|
1683
|
-
]);
|
|
1684
1680
|
const stateFromProps = mapPropsToState3({
|
|
1685
1681
|
props,
|
|
1686
1682
|
state: state2,
|
|
1687
1683
|
oldState: null,
|
|
1688
1684
|
parentState
|
|
1689
1685
|
});
|
|
1686
|
+
propsToStateSetRef.current = new Set([
|
|
1687
|
+
...propsToStateSetRef.current,
|
|
1688
|
+
...propertyReads
|
|
1689
|
+
]);
|
|
1690
1690
|
return __spreadValues(__spreadValues({}, state2), stateFromProps);
|
|
1691
1691
|
}
|
|
1692
1692
|
return state2;
|
|
@@ -1708,16 +1708,16 @@ function getComponentStateRoot(config) {
|
|
|
1708
1708
|
return [__spreadProps(__spreadValues({}, initialArg), { props: props2 })];
|
|
1709
1709
|
}
|
|
1710
1710
|
});
|
|
1711
|
-
propsToStateSetRef.current = new Set([
|
|
1712
|
-
...propsToStateSetRef.current,
|
|
1713
|
-
...propertyReads
|
|
1714
|
-
]);
|
|
1715
1711
|
const stateFromProps = mapPropsToState3({
|
|
1716
1712
|
props: getProps(),
|
|
1717
1713
|
state: newState,
|
|
1718
1714
|
oldState: previousState,
|
|
1719
1715
|
parentState: parentState2
|
|
1720
1716
|
});
|
|
1717
|
+
propsToStateSetRef.current = new Set([
|
|
1718
|
+
...propsToStateSetRef.current,
|
|
1719
|
+
...propertyReads
|
|
1720
|
+
]);
|
|
1721
1721
|
Object.assign(newState, stateFromProps);
|
|
1722
1722
|
}
|
|
1723
1723
|
const result = config.concludeReducer ? config.concludeReducer({
|
|
@@ -1919,31 +1919,28 @@ import {
|
|
|
1919
1919
|
import { useState as useState3 } from "react";
|
|
1920
1920
|
|
|
1921
1921
|
// src/components/InfiniteTable/utilities.css.ts
|
|
1922
|
-
var alignItems = { center: "
|
|
1923
|
-
var cssEllipsisClassName = "
|
|
1924
|
-
var cursor = { pointer: "
|
|
1925
|
-
var display = { flex: "
|
|
1922
|
+
var alignItems = { center: "_16lm1iw11", stretch: "_16lm1iw12" };
|
|
1923
|
+
var cssEllipsisClassName = "_16lm1iw1a _16lm1iw1b _16lm1iw16";
|
|
1924
|
+
var cursor = { pointer: "_16lm1iwb" };
|
|
1925
|
+
var display = { flex: "_16lm1iwj", block: "_16lm1iwk", inlineBlock: "_16lm1iwl" };
|
|
1926
1926
|
var fill = { currentColor: "_16lm1iw5", accentColor: "_16lm1iw6" };
|
|
1927
|
-
var flex = { "1": "
|
|
1928
|
-
var flexFlow = { column: "
|
|
1929
|
-
var justifyContent = { center: "
|
|
1930
|
-
var left = { "0": "
|
|
1927
|
+
var flex = { "1": "_16lm1iwc", none: "_16lm1iwd" };
|
|
1928
|
+
var flexFlow = { column: "_16lm1iwz", row: "_16lm1iw10" };
|
|
1929
|
+
var justifyContent = { center: "_16lm1iw13", start: "_16lm1iw14", end: "_16lm1iw15" };
|
|
1930
|
+
var left = { "0": "_16lm1iwt", "100%": "_16lm1iwu" };
|
|
1931
1931
|
var position = { relative: "_16lm1iw1", absolute: "_16lm1iw2", sticky: "_16lm1iw3", fixed: "_16lm1iw4" };
|
|
1932
|
-
var top = { "0": "
|
|
1932
|
+
var top = { "0": "_16lm1iwr", "100%": "_16lm1iws" };
|
|
1933
|
+
var transform = { translateZero: "_16lm1iw9", rotate90: "_16lm1iwa" };
|
|
1933
1934
|
var transformTranslateZero = "_16lm1iw8";
|
|
1934
|
-
var userSelect = { none: "
|
|
1935
|
-
var willChange = { transform: "
|
|
1936
|
-
var zIndex = { "1": "
|
|
1935
|
+
var userSelect = { none: "_16lm1iwm" };
|
|
1936
|
+
var willChange = { transform: "_16lm1iw19" };
|
|
1937
|
+
var zIndex = { "1": "_16lm1iwe", "10": "_16lm1iwf", "1000": "_16lm1iwg", "10000": "_16lm1iwh", "100000": "_16lm1iwi" };
|
|
1937
1938
|
|
|
1938
1939
|
// src/components/InfiniteTable/components/icons/ExpanderIcon.tsx
|
|
1939
1940
|
function ExpanderIcon(props) {
|
|
1940
1941
|
var _a;
|
|
1941
1942
|
const { size = 24 } = props;
|
|
1942
|
-
const style = __spreadValues({}, props.style);
|
|
1943
1943
|
const [expanded, setExpanded] = useState3((_a = props.expanded) != null ? _a : props.defaultExpanded);
|
|
1944
|
-
if (expanded) {
|
|
1945
|
-
style.transform = `rotate(90deg)`;
|
|
1946
|
-
}
|
|
1947
1944
|
const onClick = () => {
|
|
1948
1945
|
var _a2;
|
|
1949
1946
|
(_a2 = props.onChange) == null ? void 0 : _a2.call(props, !expanded);
|
|
@@ -1962,94 +1959,14 @@ function ExpanderIcon(props) {
|
|
|
1962
1959
|
height: `${size}px`,
|
|
1963
1960
|
viewBox: "0 0 24 24",
|
|
1964
1961
|
width: `${size}px`,
|
|
1965
|
-
style,
|
|
1962
|
+
style: props.style,
|
|
1966
1963
|
onClick,
|
|
1967
|
-
className: join(props.className, fill.
|
|
1964
|
+
className: join(props.className, fill.accentColor, flex.none, cursor.pointer, expanded ? fill.accentColor : "", expanded ? transform.rotate90 : "", "InfiniteIcon", "InfiniteIcon-expander", `InfiniteIcon-expander--${expanded ? "expanded" : "collapsed"}`)
|
|
1968
1965
|
}, /* @__PURE__ */ createElement3("path", {
|
|
1969
1966
|
d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
|
|
1970
1967
|
}));
|
|
1971
1968
|
}
|
|
1972
1969
|
|
|
1973
|
-
// src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
|
|
1974
|
-
function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params) {
|
|
1975
|
-
if (!pivotColumns) {
|
|
1976
|
-
return void 0;
|
|
1977
|
-
}
|
|
1978
|
-
const {
|
|
1979
|
-
pivotColumn,
|
|
1980
|
-
pivotRowLabelsColumn,
|
|
1981
|
-
pivotBy,
|
|
1982
|
-
groupRowsBy,
|
|
1983
|
-
pivotTotalColumnPosition,
|
|
1984
|
-
toggleGroupRow
|
|
1985
|
-
} = params;
|
|
1986
|
-
const computedPivotColumns = new Map();
|
|
1987
|
-
pivotColumns.forEach((col, key) => {
|
|
1988
|
-
if (col.pivotTotalColumn && pivotTotalColumnPosition === false) {
|
|
1989
|
-
return;
|
|
1990
|
-
}
|
|
1991
|
-
let column = __spreadValues({}, col);
|
|
1992
|
-
if (pivotColumn) {
|
|
1993
|
-
if (typeof pivotColumn === "function") {
|
|
1994
|
-
column = __spreadValues(__spreadValues({}, column), pivotColumn({
|
|
1995
|
-
column,
|
|
1996
|
-
pivotBy,
|
|
1997
|
-
groupRowsBy
|
|
1998
|
-
}));
|
|
1999
|
-
} else {
|
|
2000
|
-
column = __spreadValues(__spreadValues({}, column), pivotColumn);
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
|
-
const isPivotRowLabelsColumn = !column.pivotColumn && !column.pivotTotalColumn;
|
|
2004
|
-
if (pivotRowLabelsColumn && isPivotRowLabelsColumn) {
|
|
2005
|
-
if (typeof pivotRowLabelsColumn === "function") {
|
|
2006
|
-
column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn({
|
|
2007
|
-
column,
|
|
2008
|
-
pivotBy,
|
|
2009
|
-
groupRowsBy
|
|
2010
|
-
}));
|
|
2011
|
-
} else {
|
|
2012
|
-
column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn);
|
|
2013
|
-
}
|
|
2014
|
-
}
|
|
2015
|
-
if (isPivotRowLabelsColumn && !column.render) {
|
|
2016
|
-
column.render = (renderOptions) => {
|
|
2017
|
-
var _a;
|
|
2018
|
-
let { value, rowInfo, column: column2, groupRowsBy: groupRowsBy2 } = renderOptions;
|
|
2019
|
-
if (column2.renderValue) {
|
|
2020
|
-
value = column2.renderValue(renderOptions);
|
|
2021
|
-
}
|
|
2022
|
-
const showExpanderIcon = (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < groupRowsBy2.length;
|
|
2023
|
-
return /* @__PURE__ */ createElement4("div", {
|
|
2024
|
-
className: join(display.flex, alignItems.center),
|
|
2025
|
-
style: {
|
|
2026
|
-
paddingInlineStart: `calc(${rowInfo.groupNesting - 1} * var(--ITableRow-group-column-nesting))`
|
|
2027
|
-
}
|
|
2028
|
-
}, showExpanderIcon ? /* @__PURE__ */ createElement4(ExpanderIcon, {
|
|
2029
|
-
expanded: !rowInfo.collapsed,
|
|
2030
|
-
onChange: () => {
|
|
2031
|
-
toggleGroupRow(rowInfo.groupKeys);
|
|
2032
|
-
}
|
|
2033
|
-
}) : null, /* @__PURE__ */ createElement4("div", {
|
|
2034
|
-
className: cssEllipsisClassName
|
|
2035
|
-
}, value != null ? value : null));
|
|
2036
|
-
};
|
|
2037
|
-
}
|
|
2038
|
-
if (!column.render && column.renderValue) {
|
|
2039
|
-
column.render = (renderOptions) => {
|
|
2040
|
-
return column.renderValue(renderOptions);
|
|
2041
|
-
};
|
|
2042
|
-
}
|
|
2043
|
-
computedPivotColumns.set(key, column);
|
|
2044
|
-
});
|
|
2045
|
-
return computedPivotColumns;
|
|
2046
|
-
}
|
|
2047
|
-
|
|
2048
|
-
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2049
|
-
import {
|
|
2050
|
-
createElement as createElement5
|
|
2051
|
-
} from "react";
|
|
2052
|
-
|
|
2053
1970
|
// node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js
|
|
2054
1971
|
var shouldApplyCompound = (compoundCheck, selections) => {
|
|
2055
1972
|
for (const key of Object.keys(compoundCheck)) {
|
|
@@ -2089,9 +2006,87 @@ var GroupRowExpanderCls = "_7pupv0b";
|
|
|
2089
2006
|
var RowClsRecipe = createRuntimeFn({ defaultClassName: "_7pupv00", variantClassNames: { zebra: { false: "_7pupv02", even: "_7pupv03", odd: "_7pupv04" }, groupRow: { true: "_7pupv05", false: "_7pupv06" }, inlineGroupRow: { true: "_7pupv07", false: "_7pupv08" }, showHoverRows: { true: "_7pupv09", false: "_7pupv0a" } }, defaultVariants: {}, compoundVariants: [] });
|
|
2090
2007
|
var RowHoverCls = "_7pupv01";
|
|
2091
2008
|
|
|
2009
|
+
// src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
|
|
2010
|
+
function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params) {
|
|
2011
|
+
if (!pivotColumns) {
|
|
2012
|
+
return void 0;
|
|
2013
|
+
}
|
|
2014
|
+
const {
|
|
2015
|
+
pivotColumn,
|
|
2016
|
+
pivotRowLabelsColumn,
|
|
2017
|
+
pivotBy,
|
|
2018
|
+
groupRowsBy,
|
|
2019
|
+
pivotTotalColumnPosition,
|
|
2020
|
+
toggleGroupRow
|
|
2021
|
+
} = params;
|
|
2022
|
+
const computedPivotColumns = new Map();
|
|
2023
|
+
pivotColumns.forEach((col, key) => {
|
|
2024
|
+
if (col.pivotTotalColumn && pivotTotalColumnPosition === false) {
|
|
2025
|
+
return;
|
|
2026
|
+
}
|
|
2027
|
+
let column = __spreadValues({}, col);
|
|
2028
|
+
const isPivotRowLabelsColumn = !column.pivotColumn && !column.pivotTotalColumn;
|
|
2029
|
+
if (!isPivotRowLabelsColumn) {
|
|
2030
|
+
if (pivotColumn) {
|
|
2031
|
+
if (typeof pivotColumn === "function") {
|
|
2032
|
+
column = __spreadValues(__spreadValues({}, column), pivotColumn({
|
|
2033
|
+
column,
|
|
2034
|
+
pivotBy,
|
|
2035
|
+
groupRowsBy
|
|
2036
|
+
}));
|
|
2037
|
+
} else {
|
|
2038
|
+
column = __spreadValues(__spreadValues({}, column), pivotColumn);
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
} else {
|
|
2042
|
+
if (pivotRowLabelsColumn) {
|
|
2043
|
+
if (typeof pivotRowLabelsColumn === "function") {
|
|
2044
|
+
column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn({
|
|
2045
|
+
column,
|
|
2046
|
+
pivotBy,
|
|
2047
|
+
groupRowsBy
|
|
2048
|
+
}));
|
|
2049
|
+
} else {
|
|
2050
|
+
column = __spreadValues(__spreadValues({}, column), pivotRowLabelsColumn);
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
if (!column.render) {
|
|
2054
|
+
column.render = (renderOptions) => {
|
|
2055
|
+
var _a;
|
|
2056
|
+
let { value, rowInfo, column: column2, groupRowsBy: groupRowsBy2 } = renderOptions;
|
|
2057
|
+
if (column2.renderValue) {
|
|
2058
|
+
value = column2.renderValue(renderOptions);
|
|
2059
|
+
}
|
|
2060
|
+
const showExpanderIcon = (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < groupRowsBy2.length;
|
|
2061
|
+
return /* @__PURE__ */ createElement4("div", {
|
|
2062
|
+
className: join(display.flex, alignItems.center, GroupRowExpanderCls)
|
|
2063
|
+
}, showExpanderIcon ? /* @__PURE__ */ createElement4(ExpanderIcon, {
|
|
2064
|
+
expanded: !rowInfo.collapsed,
|
|
2065
|
+
onChange: () => {
|
|
2066
|
+
toggleGroupRow(rowInfo.groupKeys);
|
|
2067
|
+
}
|
|
2068
|
+
}) : null, /* @__PURE__ */ createElement4("div", {
|
|
2069
|
+
className: cssEllipsisClassName
|
|
2070
|
+
}, value != null ? value : null));
|
|
2071
|
+
};
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
if (!column.render && column.renderValue) {
|
|
2075
|
+
column.render = (renderOptions) => {
|
|
2076
|
+
return column.renderValue(renderOptions);
|
|
2077
|
+
};
|
|
2078
|
+
}
|
|
2079
|
+
computedPivotColumns.set(key, column);
|
|
2080
|
+
});
|
|
2081
|
+
return computedPivotColumns;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2092
2084
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2085
|
+
import {
|
|
2086
|
+
createElement as createElement5
|
|
2087
|
+
} from "react";
|
|
2093
2088
|
function getGroupColumnRender({
|
|
2094
|
-
|
|
2089
|
+
groupIndexForColumn,
|
|
2095
2090
|
groupRenderStrategy,
|
|
2096
2091
|
toggleGroupRow
|
|
2097
2092
|
}) {
|
|
@@ -2101,7 +2096,7 @@ function getGroupColumnRender({
|
|
|
2101
2096
|
if (column.renderValue) {
|
|
2102
2097
|
value = column.renderValue(renderOptions);
|
|
2103
2098
|
}
|
|
2104
|
-
let groupRowInfo = groupRenderStrategy !== "inline" ? rowInfo : ((_a = rowInfo.parents) == null ? void 0 : _a[
|
|
2099
|
+
let groupRowInfo = groupRenderStrategy !== "inline" ? rowInfo : ((_a = rowInfo.parents) == null ? void 0 : _a[groupIndexForColumn]) || rowInfo;
|
|
2105
2100
|
if (!groupRowInfo) {
|
|
2106
2101
|
return null;
|
|
2107
2102
|
}
|
|
@@ -2111,14 +2106,14 @@ function getGroupColumnRender({
|
|
|
2111
2106
|
if (groupRowInfo.groupCount === 1) {
|
|
2112
2107
|
return value;
|
|
2113
2108
|
}
|
|
2114
|
-
if (groupRowInfo.groupNesting ===
|
|
2109
|
+
if (groupRowInfo.groupNesting === groupIndexForColumn && collapsed) {
|
|
2115
2110
|
return null;
|
|
2116
2111
|
}
|
|
2117
2112
|
} else {
|
|
2118
2113
|
if (!groupRowInfo.isGroupRow) {
|
|
2119
2114
|
return null;
|
|
2120
2115
|
}
|
|
2121
|
-
if (
|
|
2116
|
+
if (groupIndexForColumn + 1 !== groupRowInfo.groupNesting) {
|
|
2122
2117
|
return null;
|
|
2123
2118
|
}
|
|
2124
2119
|
}
|
|
@@ -2135,17 +2130,21 @@ function getGroupColumnRender({
|
|
|
2135
2130
|
};
|
|
2136
2131
|
}
|
|
2137
2132
|
function getColumnForGroupBy(options, toggleGroupRow, groupColumnFromProps) {
|
|
2138
|
-
const {
|
|
2133
|
+
const {
|
|
2134
|
+
groupByForColumn,
|
|
2135
|
+
groupIndexForColumn,
|
|
2136
|
+
groupRenderStrategy
|
|
2137
|
+
} = options;
|
|
2139
2138
|
let generatedGroupColumn = __spreadValues({
|
|
2140
|
-
header: `Group by ${
|
|
2141
|
-
groupByField:
|
|
2139
|
+
header: `Group by ${groupByForColumn.field}`,
|
|
2140
|
+
groupByField: groupByForColumn.field,
|
|
2142
2141
|
sortable: false,
|
|
2143
2142
|
render: getGroupColumnRender({
|
|
2144
|
-
|
|
2143
|
+
groupIndexForColumn,
|
|
2145
2144
|
toggleGroupRow,
|
|
2146
2145
|
groupRenderStrategy
|
|
2147
2146
|
})
|
|
2148
|
-
},
|
|
2147
|
+
}, groupByForColumn.column);
|
|
2149
2148
|
if (groupColumnFromProps) {
|
|
2150
2149
|
if (typeof groupColumnFromProps === "function") {
|
|
2151
2150
|
generatedGroupColumn = __spreadValues(__spreadValues({}, generatedGroupColumn), groupColumnFromProps(options, toggleGroupRow));
|
|
@@ -2689,78 +2688,6 @@ function mapPropsToState2(params) {
|
|
|
2689
2688
|
};
|
|
2690
2689
|
}
|
|
2691
2690
|
|
|
2692
|
-
// src/utils/multisort/sortTypes.ts
|
|
2693
|
-
var sortTypes = {
|
|
2694
|
-
number: function(first, second) {
|
|
2695
|
-
return first - second;
|
|
2696
|
-
},
|
|
2697
|
-
string: function(first, second) {
|
|
2698
|
-
first = `${first}`;
|
|
2699
|
-
second = `${second}`;
|
|
2700
|
-
return first.localeCompare(second);
|
|
2701
|
-
}
|
|
2702
|
-
};
|
|
2703
|
-
var sortTypes_default = sortTypes;
|
|
2704
|
-
|
|
2705
|
-
// src/utils/multisort/index.ts
|
|
2706
|
-
var multisort = (sortInfo, array, get) => {
|
|
2707
|
-
array.sort(getMultisortFunction(sortInfo, get));
|
|
2708
|
-
return array;
|
|
2709
|
-
};
|
|
2710
|
-
multisort.knownTypes = sortTypes_default;
|
|
2711
|
-
var getSingleSortFunction = (info) => {
|
|
2712
|
-
if (!info) {
|
|
2713
|
-
return;
|
|
2714
|
-
}
|
|
2715
|
-
const field = info.field;
|
|
2716
|
-
var dir = info.dir < 0 ? -1 : info.dir > 0 ? 1 : 0;
|
|
2717
|
-
if (!dir) {
|
|
2718
|
-
return;
|
|
2719
|
-
}
|
|
2720
|
-
let fn = info.fn;
|
|
2721
|
-
if (!fn && info.type) {
|
|
2722
|
-
fn = multisort.knownTypes[info.type];
|
|
2723
|
-
if (!fn) {
|
|
2724
|
-
console.warn(`Unknown sort type "${info.type}" - please pass one of ${Object.keys(multisort.knownTypes).join(", ")}`);
|
|
2725
|
-
}
|
|
2726
|
-
}
|
|
2727
|
-
if (!fn) {
|
|
2728
|
-
fn = sortTypes_default.string;
|
|
2729
|
-
}
|
|
2730
|
-
return (first, second) => {
|
|
2731
|
-
const a = field ? first[field] : first;
|
|
2732
|
-
const b = field ? second[field] : second;
|
|
2733
|
-
return dir * fn(a, b);
|
|
2734
|
-
};
|
|
2735
|
-
};
|
|
2736
|
-
var getSortFunctions = (sortInfo) => {
|
|
2737
|
-
return sortInfo.map(getSingleSortFunction).filter((fn) => fn instanceof Function);
|
|
2738
|
-
};
|
|
2739
|
-
var getMultisortFunction = (sortInfo, get) => {
|
|
2740
|
-
const fns = getSortFunctions(sortInfo);
|
|
2741
|
-
return (first, second) => {
|
|
2742
|
-
if (get) {
|
|
2743
|
-
first = get(first);
|
|
2744
|
-
second = get(second);
|
|
2745
|
-
}
|
|
2746
|
-
let result = 0;
|
|
2747
|
-
let i = 0;
|
|
2748
|
-
let fn;
|
|
2749
|
-
const len = fns.length;
|
|
2750
|
-
for (; i < len; i++) {
|
|
2751
|
-
fn = fns[i];
|
|
2752
|
-
if (!fn) {
|
|
2753
|
-
continue;
|
|
2754
|
-
}
|
|
2755
|
-
result = fn(first, second);
|
|
2756
|
-
if (result !== 0) {
|
|
2757
|
-
return result;
|
|
2758
|
-
}
|
|
2759
|
-
}
|
|
2760
|
-
return result;
|
|
2761
|
-
};
|
|
2762
|
-
};
|
|
2763
|
-
|
|
2764
2691
|
// src/utils/groupAndPivot/index.ts
|
|
2765
2692
|
function DEFAULT_TO_KEY(value) {
|
|
2766
2693
|
return value;
|
|
@@ -2990,6 +2917,80 @@ function enhancedFlatten(param) {
|
|
|
2990
2917
|
data: result
|
|
2991
2918
|
};
|
|
2992
2919
|
}
|
|
2920
|
+
|
|
2921
|
+
// src/utils/multisort/sortTypes.ts
|
|
2922
|
+
var sortTypes = {
|
|
2923
|
+
number: function(first, second) {
|
|
2924
|
+
return first - second;
|
|
2925
|
+
},
|
|
2926
|
+
string: function(first, second) {
|
|
2927
|
+
first = `${first}`;
|
|
2928
|
+
second = `${second}`;
|
|
2929
|
+
return first.localeCompare(second);
|
|
2930
|
+
}
|
|
2931
|
+
};
|
|
2932
|
+
var sortTypes_default = sortTypes;
|
|
2933
|
+
|
|
2934
|
+
// src/utils/multisort/index.ts
|
|
2935
|
+
var multisort = (sortInfo, array, get) => {
|
|
2936
|
+
array.sort(getMultisortFunction(sortInfo, get));
|
|
2937
|
+
return array;
|
|
2938
|
+
};
|
|
2939
|
+
multisort.knownTypes = sortTypes_default;
|
|
2940
|
+
var getSingleSortFunction = (info) => {
|
|
2941
|
+
if (!info) {
|
|
2942
|
+
return;
|
|
2943
|
+
}
|
|
2944
|
+
const field = info.field;
|
|
2945
|
+
var dir = info.dir < 0 ? -1 : info.dir > 0 ? 1 : 0;
|
|
2946
|
+
if (!dir) {
|
|
2947
|
+
return;
|
|
2948
|
+
}
|
|
2949
|
+
let fn = info.fn;
|
|
2950
|
+
if (!fn && info.type) {
|
|
2951
|
+
fn = multisort.knownTypes[info.type];
|
|
2952
|
+
if (!fn) {
|
|
2953
|
+
console.warn(`Unknown sort type "${info.type}" - please pass one of ${Object.keys(multisort.knownTypes).join(", ")}`);
|
|
2954
|
+
}
|
|
2955
|
+
}
|
|
2956
|
+
if (!fn) {
|
|
2957
|
+
fn = sortTypes_default.string;
|
|
2958
|
+
}
|
|
2959
|
+
return (first, second) => {
|
|
2960
|
+
const a = field ? first[field] : first;
|
|
2961
|
+
const b = field ? second[field] : second;
|
|
2962
|
+
return dir * fn(a, b);
|
|
2963
|
+
};
|
|
2964
|
+
};
|
|
2965
|
+
var getSortFunctions = (sortInfo) => {
|
|
2966
|
+
return sortInfo.map(getSingleSortFunction).filter((fn) => fn instanceof Function);
|
|
2967
|
+
};
|
|
2968
|
+
var getMultisortFunction = (sortInfo, get) => {
|
|
2969
|
+
const fns = getSortFunctions(sortInfo);
|
|
2970
|
+
return (first, second) => {
|
|
2971
|
+
if (get) {
|
|
2972
|
+
first = get(first);
|
|
2973
|
+
second = get(second);
|
|
2974
|
+
}
|
|
2975
|
+
let result = 0;
|
|
2976
|
+
let i = 0;
|
|
2977
|
+
let fn;
|
|
2978
|
+
const len = fns.length;
|
|
2979
|
+
for (; i < len; i++) {
|
|
2980
|
+
fn = fns[i];
|
|
2981
|
+
if (!fn) {
|
|
2982
|
+
continue;
|
|
2983
|
+
}
|
|
2984
|
+
result = fn(first, second);
|
|
2985
|
+
if (result !== 0) {
|
|
2986
|
+
return result;
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
return result;
|
|
2990
|
+
};
|
|
2991
|
+
};
|
|
2992
|
+
|
|
2993
|
+
// src/utils/groupAndPivot/getPivotColumnsAndColumnGroups.ts
|
|
2993
2994
|
function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPosition) {
|
|
2994
2995
|
const pivotLength = pivotBy.length;
|
|
2995
2996
|
const columns = new Map([
|
|
@@ -3014,10 +3015,14 @@ function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPositi
|
|
|
3014
3015
|
if (keys.length === pivotLength) {
|
|
3015
3016
|
const parentKeys = keys.slice(0, -1);
|
|
3016
3017
|
let columnGroupId = parentKeys.join("/");
|
|
3017
|
-
|
|
3018
|
+
const pivotByForColumn = pivotBy[keys.length - 1];
|
|
3019
|
+
let computedPivotColumn = __spreadValues({
|
|
3018
3020
|
pivotBy,
|
|
3019
3021
|
pivotColumn: true,
|
|
3020
3022
|
pivotGroupKeys: keys,
|
|
3023
|
+
pivotGroupKeyForColumn: keys[keys.length - 1],
|
|
3024
|
+
pivotIndexForColumn: keys.length - 1,
|
|
3025
|
+
pivotByForColumn,
|
|
3021
3026
|
sortable: false,
|
|
3022
3027
|
columnGroup: parentKeys.length ? `${columnGroupId}` : void 0,
|
|
3023
3028
|
header: keys[keys.length - 1],
|
|
@@ -3026,7 +3031,15 @@ function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPositi
|
|
|
3026
3031
|
const value = (_c = (_b = (_a = rowInfo.pivotValuesMap) == null ? void 0 : _a.get(keys)) == null ? void 0 : _b.reducerResults[0]) != null ? _c : null;
|
|
3027
3032
|
return value;
|
|
3028
3033
|
}
|
|
3029
|
-
});
|
|
3034
|
+
}, pivotByForColumn.column);
|
|
3035
|
+
if (pivotByForColumn.column) {
|
|
3036
|
+
if (typeof pivotByForColumn.column === "function") {
|
|
3037
|
+
Object.assign(computedPivotColumn, pivotByForColumn.column({ column: computedPivotColumn }));
|
|
3038
|
+
} else {
|
|
3039
|
+
Object.assign(computedPivotColumn, pivotByForColumn.column);
|
|
3040
|
+
}
|
|
3041
|
+
}
|
|
3042
|
+
columns.set(`${keys.join("/")}`, computedPivotColumn);
|
|
3030
3043
|
} else {
|
|
3031
3044
|
const colGroupId = keys.join("/");
|
|
3032
3045
|
const parentKeys = keys.slice(0, -1);
|
|
@@ -3035,11 +3048,15 @@ function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPositi
|
|
|
3035
3048
|
header: keys.join(" >> ")
|
|
3036
3049
|
});
|
|
3037
3050
|
if (pivotTotalColumnPosition !== false) {
|
|
3038
|
-
|
|
3051
|
+
const pivotByForColumn = pivotBy[keys.length - 1];
|
|
3052
|
+
let computedPivotColumn = __spreadValues({
|
|
3039
3053
|
columnGroup: parentKeys.length ? parentKeys.join("/") : void 0,
|
|
3040
3054
|
header: `${keys.join("/")} total `,
|
|
3041
3055
|
pivotTotalColumn: true,
|
|
3042
3056
|
pivotGroupKeys: keys,
|
|
3057
|
+
pivotGroupKeyForColumn: keys[keys.length - 1],
|
|
3058
|
+
pivotByForColumn,
|
|
3059
|
+
pivotIndexForColumn: keys.length - 1,
|
|
3043
3060
|
pivotBy,
|
|
3044
3061
|
sortable: false,
|
|
3045
3062
|
valueGetter: ({ rowInfo }) => {
|
|
@@ -3047,7 +3064,15 @@ function getPivotColumnsAndColumnGroups(deepMap, pivotBy, pivotTotalColumnPositi
|
|
|
3047
3064
|
const value = (_c = (_b = (_a = rowInfo.pivotValuesMap) == null ? void 0 : _a.get(keys)) == null ? void 0 : _b.reducerResults[0]) != null ? _c : null;
|
|
3048
3065
|
return value;
|
|
3049
3066
|
}
|
|
3050
|
-
});
|
|
3067
|
+
}, pivotByForColumn.column);
|
|
3068
|
+
if (pivotByForColumn.column) {
|
|
3069
|
+
if (typeof pivotByForColumn.column === "function") {
|
|
3070
|
+
Object.assign(computedPivotColumn, pivotByForColumn.column({ column: computedPivotColumn }));
|
|
3071
|
+
} else {
|
|
3072
|
+
Object.assign(computedPivotColumn, pivotByForColumn.column);
|
|
3073
|
+
}
|
|
3074
|
+
}
|
|
3075
|
+
columns.set(`${keys.join("/")}-total`, computedPivotColumn);
|
|
3051
3076
|
}
|
|
3052
3077
|
}
|
|
3053
3078
|
if (pivotTotalColumnPosition === "start" || pivotTotalColumnPosition === false) {
|
|
@@ -3193,7 +3218,7 @@ function DataSourceCmp({ children }) {
|
|
|
3193
3218
|
componentActions,
|
|
3194
3219
|
getState
|
|
3195
3220
|
};
|
|
3196
|
-
if (
|
|
3221
|
+
if (true) {
|
|
3197
3222
|
globalThis.getDataSourceState = getState;
|
|
3198
3223
|
}
|
|
3199
3224
|
useLoadData();
|
|
@@ -3297,7 +3322,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupRowsMap) {
|
|
|
3297
3322
|
return rowspan;
|
|
3298
3323
|
},
|
|
3299
3324
|
render: getGroupColumnRender({
|
|
3300
|
-
groupIndex,
|
|
3325
|
+
groupIndexForColumn: groupIndex,
|
|
3301
3326
|
groupRenderStrategy: groupRenderStrategy2,
|
|
3302
3327
|
toggleGroupRow: toggleGroupRow2
|
|
3303
3328
|
})
|
|
@@ -3360,7 +3385,7 @@ function useColumnsWhenGrouping() {
|
|
|
3360
3385
|
return;
|
|
3361
3386
|
}
|
|
3362
3387
|
const update = () => {
|
|
3363
|
-
|
|
3388
|
+
const columnsWhenGrouping = getColumnsWhenGrouping({
|
|
3364
3389
|
columns,
|
|
3365
3390
|
groupColumn,
|
|
3366
3391
|
groupRenderStrategy,
|
|
@@ -3368,6 +3393,7 @@ function useColumnsWhenGrouping() {
|
|
|
3368
3393
|
pivotColumns,
|
|
3369
3394
|
toggleGroupRow
|
|
3370
3395
|
});
|
|
3396
|
+
componentActions.columnsWhenGrouping = columnsWhenGrouping;
|
|
3371
3397
|
};
|
|
3372
3398
|
update();
|
|
3373
3399
|
return interceptMap(columns, {
|
|
@@ -3455,11 +3481,11 @@ function getColumnsWhenGrouping(params) {
|
|
|
3455
3481
|
}
|
|
3456
3482
|
const computedColumns = new Map();
|
|
3457
3483
|
if (groupRenderStrategy === "multi-column") {
|
|
3458
|
-
groupRowsBy.forEach((
|
|
3459
|
-
computedColumns.set(`group-by-${
|
|
3460
|
-
|
|
3484
|
+
groupRowsBy.forEach((groupByForColumn, groupIndexForColumn, arr) => {
|
|
3485
|
+
computedColumns.set(`group-by-${groupByForColumn.field}`, getColumnForGroupBy({
|
|
3486
|
+
groupByForColumn,
|
|
3461
3487
|
groupRowsBy,
|
|
3462
|
-
|
|
3488
|
+
groupIndexForColumn,
|
|
3463
3489
|
groupCount: arr.length,
|
|
3464
3490
|
groupRenderStrategy
|
|
3465
3491
|
}, toggleGroupRow, groupColumn));
|
|
@@ -3467,7 +3493,8 @@ function getColumnsWhenGrouping(params) {
|
|
|
3467
3493
|
} else if (groupRenderStrategy === "single-column") {
|
|
3468
3494
|
computedColumns.set("group-by", getSingleGroupColumn({
|
|
3469
3495
|
groupCount: groupRowsBy.length,
|
|
3470
|
-
groupRowsBy
|
|
3496
|
+
groupRowsBy,
|
|
3497
|
+
groupRenderStrategy
|
|
3471
3498
|
}, toggleGroupRow, groupColumn));
|
|
3472
3499
|
}
|
|
3473
3500
|
columns.forEach((col, colId) => {
|
|
@@ -3679,15 +3706,15 @@ function VerticalScrollbarPlaceholderFn(props) {
|
|
|
3679
3706
|
var VerticalScrollbarPlaceholder = memo2(VerticalScrollbarPlaceholderFn);
|
|
3680
3707
|
|
|
3681
3708
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
3682
|
-
var CellCls = "_1eexc2a5
|
|
3709
|
+
var CellCls = "_1eexc2a5 _16lm1iwj _16lm1iw10 _16lm1iw11 _16lm1iw2 _16lm1iw19 _16lm1iw1a";
|
|
3683
3710
|
var HeaderCellProxy = "_12zfob10";
|
|
3684
3711
|
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "_12zfob1c", variantClassNames: { dragging: { true: "_12zfob1d", false: "_12zfob1e" }, first: { true: "_12zfob1f", false: "_12zfob1g" }, last: { true: "_12zfob1h", false: "_12zfob1i" }, groupByField: { true: "_12zfob1j", false: "_12zfob1k" }, firstInCategory: { true: "_12zfob1l", false: "_12zfob1m" }, lastInCategory: { true: "_12zfob1n", false: "_12zfob1o" }, pinned: { start: "_12zfob1p", end: "_12zfob1q", false: "_12zfob1r" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_12zfob1s"], [{ pinned: "end", firstInCategory: true }, "_12zfob1t"], [{ pinned: false, lastInCategory: true }, "_12zfob1u"]] });
|
|
3685
|
-
var HeaderClsRecipe = createRuntimeFn({ defaultClassName: "_12zfob12
|
|
3686
|
-
var HeaderGroupCls = "
|
|
3687
|
-
var HeaderGroup_Children = "
|
|
3688
|
-
var HeaderGroup_Header = "_12zfob1x
|
|
3712
|
+
var HeaderClsRecipe = createRuntimeFn({ defaultClassName: "_12zfob12 _16lm1iw10", variantClassNames: { pinned: { start: "_12zfob13", end: "_12zfob14", false: "_12zfob15" }, virtualized: { true: "_12zfob16", false: "_12zfob17" }, overflow: { true: "_12zfob18", false: "_12zfob19" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "_12zfob1a"], [{ overflow: true, pinned: "end" }, "_12zfob1b"]] });
|
|
3713
|
+
var HeaderGroupCls = "_16lm1iwz _16lm1iwj";
|
|
3714
|
+
var HeaderGroup_Children = "_16lm1iwj _16lm1iw10 _16lm1iw12 _16lm1iwc";
|
|
3715
|
+
var HeaderGroup_Header = "_12zfob1x _16lm1iwj _16lm1iw10 _16lm1iw11";
|
|
3689
3716
|
var HeaderSortIconCls = "_12zfob11 _16lm1iw1";
|
|
3690
|
-
var HeaderWrapperCls = "_12zfob1v
|
|
3717
|
+
var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
|
|
3691
3718
|
|
|
3692
3719
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
3693
3720
|
import {
|
|
@@ -3718,9 +3745,9 @@ var useInfiniteTableState = () => {
|
|
|
3718
3745
|
};
|
|
3719
3746
|
|
|
3720
3747
|
// src/components/InfiniteTable/components/cell.css.ts
|
|
3721
|
-
var CellCls2 = "_1eexc2a5
|
|
3748
|
+
var CellCls2 = "_1eexc2a5 _16lm1iwj _16lm1iw10 _16lm1iw11 _16lm1iw2 _16lm1iw19 _16lm1iw1a";
|
|
3722
3749
|
var CellClsVariants = { shifting: "_1eexc2a3", dragging: "_1eexc2a4" };
|
|
3723
|
-
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "_16lm1iw2
|
|
3750
|
+
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "_16lm1iw2 _16lm1iwo _16lm1iw7 _16lm1iwr", variantClassNames: { dragging: { false: "_1eexc2a7" }, first: { true: "_1eexc2a8", false: "_1eexc2a9" }, last: { true: "_1eexc2aa", false: "_1eexc2ab" }, groupByField: { true: "_1eexc2ac", false: "_1eexc2ad" }, firstInCategory: { true: "_1eexc2ae", false: "_1eexc2af" }, lastInCategory: { true: "_1eexc2ag", false: "_1eexc2ah" }, pinned: { start: "_1eexc2ai", end: "_1eexc2aj", false: "_1eexc2ak" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "_1eexc2al"], [{ pinned: "end", firstInCategory: true }, "_1eexc2am"]] });
|
|
3724
3751
|
var columnAlignCellStyle = { center: "_1eexc2a0", start: "_1eexc2a1", end: "_1eexc2a2" };
|
|
3725
3752
|
|
|
3726
3753
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
|
|
@@ -4247,7 +4274,7 @@ var MappedItems = class extends Logger {
|
|
|
4247
4274
|
this.init();
|
|
4248
4275
|
}
|
|
4249
4276
|
renderItemAtElement(itemIndex, elementIndex, renderNode) {
|
|
4250
|
-
if (
|
|
4277
|
+
if (true) {
|
|
4251
4278
|
this.debug(`Render item ${itemIndex} at element ${elementIndex}`);
|
|
4252
4279
|
}
|
|
4253
4280
|
const currentItemIndex = this.elementIndexToItemIndex[elementIndex];
|
|
@@ -4306,7 +4333,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4306
4333
|
}
|
|
4307
4334
|
const { mappedItems } = this;
|
|
4308
4335
|
const { renderStartIndex, renderEndIndex } = range;
|
|
4309
|
-
if (
|
|
4336
|
+
if (true) {
|
|
4310
4337
|
this.debug(`Render range ${renderStartIndex}-${renderEndIndex}. Force ${force}`);
|
|
4311
4338
|
}
|
|
4312
4339
|
const renderCount = renderEndIndex === -1 ? 0 : renderEndIndex - renderStartIndex + 1;
|
|
@@ -4319,7 +4346,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4319
4346
|
delete this.updaters[elementIndex];
|
|
4320
4347
|
}
|
|
4321
4348
|
delete this.items[elementIndex];
|
|
4322
|
-
if (
|
|
4349
|
+
if (true) {
|
|
4323
4350
|
this.debug(`Discard element ${elementIndex}`);
|
|
4324
4351
|
}
|
|
4325
4352
|
});
|
|
@@ -4341,7 +4368,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4341
4368
|
}
|
|
4342
4369
|
const elementIndex = elementsOutsideItemRange.pop();
|
|
4343
4370
|
if (elementIndex == null) {
|
|
4344
|
-
if (
|
|
4371
|
+
if (true) {
|
|
4345
4372
|
this.error(`Cannot find element to render item ${i}`);
|
|
4346
4373
|
}
|
|
4347
4374
|
continue;
|
|
@@ -4363,7 +4390,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4363
4390
|
const itemIndex = this.mappedItems.getItemRenderedAtElementIndex(elementIndex);
|
|
4364
4391
|
const options = this.brain.getOptions();
|
|
4365
4392
|
if (itemIndex == null) {
|
|
4366
|
-
if (
|
|
4393
|
+
if (true) {
|
|
4367
4394
|
this.error(`Cannot find item for element ${elementIndex}`);
|
|
4368
4395
|
}
|
|
4369
4396
|
return;
|
|
@@ -4373,7 +4400,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4373
4400
|
return;
|
|
4374
4401
|
}
|
|
4375
4402
|
if (itemElement) {
|
|
4376
|
-
if (
|
|
4403
|
+
if (true) {
|
|
4377
4404
|
itemElement.dataset.elementIndex = elementIndex;
|
|
4378
4405
|
itemElement.dataset.itemIndex = itemIndex;
|
|
4379
4406
|
}
|
|
@@ -4387,6 +4414,9 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4387
4414
|
}
|
|
4388
4415
|
};
|
|
4389
4416
|
this.destroy = () => {
|
|
4417
|
+
if (true) {
|
|
4418
|
+
return;
|
|
4419
|
+
}
|
|
4390
4420
|
this.destroyed = true;
|
|
4391
4421
|
this.mappedItems.destroy();
|
|
4392
4422
|
this.itemDOMElements = [];
|
|
@@ -4446,7 +4476,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4446
4476
|
return;
|
|
4447
4477
|
}
|
|
4448
4478
|
this.mappedItems.renderItemAtElement(itemIndex, elementIndex, renderedNode);
|
|
4449
|
-
if (
|
|
4479
|
+
if (true) {
|
|
4450
4480
|
this.debug(`Render item ${itemIndex} at element ${elementIndex}`);
|
|
4451
4481
|
}
|
|
4452
4482
|
itemUpdater(renderedNode);
|
|
@@ -4509,7 +4539,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
4509
4539
|
const renderColumn = useCallback8(({ domRef: domRef2, itemIndex: columnIndex }) => {
|
|
4510
4540
|
const column = columns[columnIndex];
|
|
4511
4541
|
if (!column) {
|
|
4512
|
-
if (
|
|
4542
|
+
if (true) {
|
|
4513
4543
|
debug3("Cannot find column to render at ", columnIndex);
|
|
4514
4544
|
}
|
|
4515
4545
|
return null;
|
|
@@ -4954,7 +4984,7 @@ var getScrollableClassName = (scrollable) => {
|
|
|
4954
4984
|
};
|
|
4955
4985
|
|
|
4956
4986
|
// src/components/VirtualScrollContainer/index.tsx
|
|
4957
|
-
var rootClassName6 = "
|
|
4987
|
+
var rootClassName6 = "InfiniteVirtualScrollContainer";
|
|
4958
4988
|
var VirtualScrollContainer = forwardRef2(function VirtualScrollContainer2(props, ref) {
|
|
4959
4989
|
const {
|
|
4960
4990
|
children,
|
|
@@ -4988,8 +5018,8 @@ function SpacePlaceholderFn(props) {
|
|
|
4988
5018
|
};
|
|
4989
5019
|
return /* @__PURE__ */ createElement21("div", {
|
|
4990
5020
|
"data-count": count,
|
|
4991
|
-
"data-width": width,
|
|
4992
|
-
"data-height": height,
|
|
5021
|
+
"data-placeholder-width": true ? width : void 0,
|
|
5022
|
+
"data-placeholder-height": true ? height : void 0,
|
|
4993
5023
|
"data-name": "SpacePlaceholder",
|
|
4994
5024
|
style
|
|
4995
5025
|
});
|
|
@@ -5066,7 +5096,7 @@ var VirtualList = (props) => {
|
|
|
5066
5096
|
useEffect15(() => {
|
|
5067
5097
|
const removeOnRenderCount = virtualBrain.onRenderCountChange((renderCount) => {
|
|
5068
5098
|
renderCountRef.current = renderCount;
|
|
5069
|
-
if (
|
|
5099
|
+
if (true) {
|
|
5070
5100
|
debug4.extend(mainAxis)(`Render count change ${renderCount}`);
|
|
5071
5101
|
}
|
|
5072
5102
|
rerender();
|
|
@@ -5094,7 +5124,7 @@ var VirtualList = (props) => {
|
|
|
5094
5124
|
const domProps = __spreadProps(__spreadValues({}, restDOMProps), {
|
|
5095
5125
|
className: join(props.className, rootClassName7, `${rootClassName7}--${mainAxis}`, VirtualListCls, VirtualListClsOrientation[mainAxis])
|
|
5096
5126
|
});
|
|
5097
|
-
if (
|
|
5127
|
+
if (true) {
|
|
5098
5128
|
domProps["data-cmp-name"] = `VirtualList`;
|
|
5099
5129
|
}
|
|
5100
5130
|
return /* @__PURE__ */ createElement22(Fragment4, null, /* @__PURE__ */ createElement22("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement22(VirtualScrollContainer, {
|
|
@@ -5336,7 +5366,7 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
|
|
|
5336
5366
|
const rows = parentNode.querySelectorAll(hoverSelector.join(","));
|
|
5337
5367
|
rows.forEach((row) => row.classList.remove(InfiniteTableRowClassName__hover, RowHoverCls));
|
|
5338
5368
|
}, [initialMouseLeave, showHoverRows]);
|
|
5339
|
-
if (rowInfo.isGroupRow
|
|
5369
|
+
if (rowInfo.isGroupRow) {
|
|
5340
5370
|
style = style || {};
|
|
5341
5371
|
style[stripVar(ThemeVars.components.Row.groupNesting)] = rowInfo.groupNesting - 1;
|
|
5342
5372
|
}
|
|
@@ -5408,7 +5438,7 @@ function InfiniteTableRowFn(props) {
|
|
|
5408
5438
|
if (renderCellRef.current !== renderCell) {
|
|
5409
5439
|
renderCellRef.current = renderCell;
|
|
5410
5440
|
}
|
|
5411
|
-
if (
|
|
5441
|
+
if (true) {
|
|
5412
5442
|
domProps["data-cmp-name"] = "ITableRow";
|
|
5413
5443
|
}
|
|
5414
5444
|
return /* @__PURE__ */ createElement25("div", __spreadProps(__spreadValues({}, domProps), {
|
|
@@ -5555,10 +5585,10 @@ import { useCallback as useCallback13, useEffect as useEffect16, useRef as useRe
|
|
|
5555
5585
|
|
|
5556
5586
|
// src/components/InfiniteTable/InfiniteCls.css.ts
|
|
5557
5587
|
var FooterCls = "_16lm1iw1";
|
|
5558
|
-
var InfiniteCls = "_1yeub2v0 _16lm1iw1
|
|
5588
|
+
var InfiniteCls = "_1yeub2v0 _16lm1iw1 _16lm1iwj _16lm1iwz _16lm1iw0";
|
|
5559
5589
|
var InfiniteClsRecipe = createRuntimeFn({ defaultClassName: "", variantClassNames: { focused: { true: "_1yeub2v2", false: "_1yeub2v3" }, focusedWithin: { true: "_1yeub2v4", false: "_1yeub2v5" }, hasPinnedStart: { true: "_1yeub2v6", false: "_1yeub2v7" }, hasPinnedEnd: { true: "_1yeub2v8", false: "_1yeub2v9" }, hasPinnedStartOverflow: { true: "_1yeub2va", false: "_1yeub2vb" }, hasPinnedEndOverflow: { true: "_1yeub2vc", false: "_1yeub2vd" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5560
5590
|
var InfiniteClsScrolling = "_1yeub2v1";
|
|
5561
|
-
var InfiniteClsShiftingColumns = "
|
|
5591
|
+
var InfiniteClsShiftingColumns = "_16lm1iwm";
|
|
5562
5592
|
var PinnedRowsClsVariants = { pinnedStart: "_1yeub2ve", pinnedEnd: "_1yeub2vf", overflow: "_1yeub2vg" };
|
|
5563
5593
|
var PinnedRowsContainerClsVariants = createRuntimeFn({ defaultClassName: "", variantClassNames: { pinned: { start: "_1yeub2vh", end: "_1yeub2vi", false: "_1yeub2vj" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5564
5594
|
|
|
@@ -5684,7 +5714,7 @@ var rootClassName10 = InfiniteListRootClassName;
|
|
|
5684
5714
|
var defaultClasses = [
|
|
5685
5715
|
willChange.transform,
|
|
5686
5716
|
position.relative,
|
|
5687
|
-
|
|
5717
|
+
transform.translateZero
|
|
5688
5718
|
];
|
|
5689
5719
|
var RowListWithExternalScrolling = (props) => {
|
|
5690
5720
|
const {
|
|
@@ -5711,7 +5741,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
5711
5741
|
const onScroll = (scrollPosition) => {
|
|
5712
5742
|
const node = domRef.current;
|
|
5713
5743
|
if (node) {
|
|
5714
|
-
if (
|
|
5744
|
+
if (true) {
|
|
5715
5745
|
const { renderStartIndex, renderEndIndex } = brain.getRenderRange();
|
|
5716
5746
|
node.dataset.renderStartIndex = renderStartIndex;
|
|
5717
5747
|
node.dataset.renderEndIndex = renderEndIndex;
|
|
@@ -5733,7 +5763,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
5733
5763
|
style,
|
|
5734
5764
|
className: join(className, rootClassName10, `${rootClassName10}--vertical`, VirtualListCls, VirtualListClsOrientation.vertical, ...defaultClasses)
|
|
5735
5765
|
};
|
|
5736
|
-
if (
|
|
5766
|
+
if (true) {
|
|
5737
5767
|
domProps["data-cmp-name"] = "RowListWithExternalScrolling";
|
|
5738
5768
|
}
|
|
5739
5769
|
return /* @__PURE__ */ createElement28("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement28(RawList, {
|
|
@@ -5959,7 +5989,7 @@ var VirtualBrain = class extends Logger {
|
|
|
5959
5989
|
this.availableSize = { width: 0, height: 0 };
|
|
5960
5990
|
this.setAvailableSize = (size) => {
|
|
5961
5991
|
this.availableSize = size;
|
|
5962
|
-
if (
|
|
5992
|
+
if (true) {
|
|
5963
5993
|
this.debug("New available size %d", size[this.options.mainAxis === "vertical" ? "height" : "width"]);
|
|
5964
5994
|
}
|
|
5965
5995
|
this.updateRenderCount();
|
|
@@ -5996,7 +6026,7 @@ var VirtualBrain = class extends Logger {
|
|
|
5996
6026
|
this.notifyTotalSizeChange();
|
|
5997
6027
|
return;
|
|
5998
6028
|
}
|
|
5999
|
-
if (
|
|
6029
|
+
if (true) {
|
|
6000
6030
|
this.debug("set renderCount to %d", renderCount);
|
|
6001
6031
|
}
|
|
6002
6032
|
this.renderCount = renderCount;
|
|
@@ -6070,7 +6100,7 @@ var VirtualBrain = class extends Logger {
|
|
|
6070
6100
|
return;
|
|
6071
6101
|
}
|
|
6072
6102
|
}
|
|
6073
|
-
if (
|
|
6103
|
+
if (true) {
|
|
6074
6104
|
if (itemSizeChange && countChange) {
|
|
6075
6105
|
this.debug(`Reset brain: reason itemSize changed and count changed (old ${count}, new ${newCount})`, {
|
|
6076
6106
|
oldItemSize: itemSize,
|
|
@@ -6110,7 +6140,7 @@ var VirtualBrain = class extends Logger {
|
|
|
6110
6140
|
if (cache[i] === void 0) {
|
|
6111
6141
|
ItemIndexBag.itemIndex = i;
|
|
6112
6142
|
let spanValue = itemSpan(ItemIndexBag);
|
|
6113
|
-
if (
|
|
6143
|
+
if (spanValue < 1) {
|
|
6114
6144
|
this.debug("itemSpan cannot be less than 1 - got %d for index %d", spanValue, i);
|
|
6115
6145
|
}
|
|
6116
6146
|
cache[i] = i;
|
|
@@ -6310,7 +6340,7 @@ var VirtualBrain = class extends Logger {
|
|
|
6310
6340
|
const { renderStartIndex, renderEndIndex } = this.renderRange;
|
|
6311
6341
|
if (renderEndIndex !== renderRange.renderEndIndex || renderStartIndex !== renderRange.renderStartIndex) {
|
|
6312
6342
|
this.renderRange = renderRange;
|
|
6313
|
-
if (
|
|
6343
|
+
if (true) {
|
|
6314
6344
|
this.debug("Set renderRange to %d-%d", renderRange.renderStartIndex, renderRange.renderEndIndex);
|
|
6315
6345
|
}
|
|
6316
6346
|
this.notifyRenderRangeChange();
|
|
@@ -6827,7 +6857,7 @@ var useLicense = (licenseKey) => {
|
|
|
6827
6857
|
const valid = useMemo11(() => {
|
|
6828
6858
|
let valid2 = isValidLicense(licenseKey, {
|
|
6829
6859
|
publishedAt: 1624970570587,
|
|
6830
|
-
version: "0.0.
|
|
6860
|
+
version: "0.0.5"
|
|
6831
6861
|
});
|
|
6832
6862
|
if (!licenseKey && !valid2 && isInsideSandbox) {
|
|
6833
6863
|
return true;
|
|
@@ -6983,8 +7013,8 @@ import {
|
|
|
6983
7013
|
} from "react";
|
|
6984
7014
|
|
|
6985
7015
|
// src/components/InfiniteTable/components/LoadMask.css.ts
|
|
6986
|
-
var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2
|
|
6987
|
-
var LoadMaskOverlayCls = "qy58ya3 _16lm1iw2
|
|
7016
|
+
var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv" };
|
|
7017
|
+
var LoadMaskOverlayCls = "qy58ya3 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv";
|
|
6988
7018
|
var LoadMaskTextCls = "qy58ya4";
|
|
6989
7019
|
|
|
6990
7020
|
// src/components/InfiniteTable/components/LoadMask.tsx
|
|
@@ -7016,7 +7046,8 @@ var InfiniteTableRoot = getComponentStateRoot({
|
|
|
7016
7046
|
rowHeight: true,
|
|
7017
7047
|
headerHeight: true
|
|
7018
7048
|
},
|
|
7019
|
-
getParentState: () => useDataSource()
|
|
7049
|
+
getParentState: () => useDataSource(),
|
|
7050
|
+
debugName: "InfiniteTable"
|
|
7020
7051
|
});
|
|
7021
7052
|
var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
7022
7053
|
var _a;
|
|
@@ -7094,7 +7125,7 @@ function InfiniteTableContextProvider() {
|
|
|
7094
7125
|
const computed = useComputed();
|
|
7095
7126
|
const getComputed = useLatest(computed);
|
|
7096
7127
|
const getState = useLatest(componentState);
|
|
7097
|
-
if (
|
|
7128
|
+
if (true) {
|
|
7098
7129
|
globalThis.getState = getState;
|
|
7099
7130
|
globalThis.getComputed = getComputed;
|
|
7100
7131
|
}
|