@infinite-table/infinite-react 0.0.2-canary.5 → 0.0.4
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 +83 -32
- package/index.esm.css +43 -37
- package/index.esm.js +131 -129
- package/index.js +131 -129
- 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,14 +1959,53 @@ 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
|
|
|
1970
|
+
// node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js
|
|
1971
|
+
var shouldApplyCompound = (compoundCheck, selections) => {
|
|
1972
|
+
for (const key of Object.keys(compoundCheck)) {
|
|
1973
|
+
if (compoundCheck[key] !== selections[key]) {
|
|
1974
|
+
return false;
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
return true;
|
|
1978
|
+
};
|
|
1979
|
+
var createRuntimeFn = (config) => (options) => {
|
|
1980
|
+
let className = config.defaultClassName;
|
|
1981
|
+
const selections = {
|
|
1982
|
+
...config.defaultVariants,
|
|
1983
|
+
...options
|
|
1984
|
+
};
|
|
1985
|
+
for (const variantName in selections) {
|
|
1986
|
+
var _selections$variantNa;
|
|
1987
|
+
const variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
|
|
1988
|
+
if (variantSelection != null) {
|
|
1989
|
+
let selection = variantSelection;
|
|
1990
|
+
if (typeof selection === "boolean") {
|
|
1991
|
+
selection = selection === true ? "true" : "false";
|
|
1992
|
+
}
|
|
1993
|
+
className += " " + config.variantClassNames[variantName][selection];
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
for (const [compoundCheck, compoundClassName] of config.compoundVariants) {
|
|
1997
|
+
if (shouldApplyCompound(compoundCheck, selections)) {
|
|
1998
|
+
className += " " + compoundClassName;
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
return className;
|
|
2002
|
+
};
|
|
2003
|
+
|
|
2004
|
+
// src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
|
|
2005
|
+
var GroupRowExpanderCls = "_7pupv0b";
|
|
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: [] });
|
|
2007
|
+
var RowHoverCls = "_7pupv01";
|
|
2008
|
+
|
|
1973
2009
|
// src/components/InfiniteTable/state/getComputedPivotColumnsFromDataSourcePivotColumns.tsx
|
|
1974
2010
|
function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params) {
|
|
1975
2011
|
if (!pivotColumns) {
|
|
@@ -2021,10 +2057,7 @@ function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params)
|
|
|
2021
2057
|
}
|
|
2022
2058
|
const showExpanderIcon = (((_a = rowInfo.groupKeys) == null ? void 0 : _a.length) || 0) < groupRowsBy2.length;
|
|
2023
2059
|
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
|
-
}
|
|
2060
|
+
className: join(display.flex, alignItems.center, GroupRowExpanderCls)
|
|
2028
2061
|
}, showExpanderIcon ? /* @__PURE__ */ createElement4(ExpanderIcon, {
|
|
2029
2062
|
expanded: !rowInfo.collapsed,
|
|
2030
2063
|
onChange: () => {
|
|
@@ -2049,49 +2082,8 @@ function getComputedPivotColumnsFromDataSourcePivotColumns(pivotColumns, params)
|
|
|
2049
2082
|
import {
|
|
2050
2083
|
createElement as createElement5
|
|
2051
2084
|
} from "react";
|
|
2052
|
-
|
|
2053
|
-
// node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js
|
|
2054
|
-
var shouldApplyCompound = (compoundCheck, selections) => {
|
|
2055
|
-
for (const key of Object.keys(compoundCheck)) {
|
|
2056
|
-
if (compoundCheck[key] !== selections[key]) {
|
|
2057
|
-
return false;
|
|
2058
|
-
}
|
|
2059
|
-
}
|
|
2060
|
-
return true;
|
|
2061
|
-
};
|
|
2062
|
-
var createRuntimeFn = (config) => (options) => {
|
|
2063
|
-
let className = config.defaultClassName;
|
|
2064
|
-
const selections = {
|
|
2065
|
-
...config.defaultVariants,
|
|
2066
|
-
...options
|
|
2067
|
-
};
|
|
2068
|
-
for (const variantName in selections) {
|
|
2069
|
-
var _selections$variantNa;
|
|
2070
|
-
const variantSelection = (_selections$variantNa = selections[variantName]) !== null && _selections$variantNa !== void 0 ? _selections$variantNa : config.defaultVariants[variantName];
|
|
2071
|
-
if (variantSelection != null) {
|
|
2072
|
-
let selection = variantSelection;
|
|
2073
|
-
if (typeof selection === "boolean") {
|
|
2074
|
-
selection = selection === true ? "true" : "false";
|
|
2075
|
-
}
|
|
2076
|
-
className += " " + config.variantClassNames[variantName][selection];
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
for (const [compoundCheck, compoundClassName] of config.compoundVariants) {
|
|
2080
|
-
if (shouldApplyCompound(compoundCheck, selections)) {
|
|
2081
|
-
className += " " + compoundClassName;
|
|
2082
|
-
}
|
|
2083
|
-
}
|
|
2084
|
-
return className;
|
|
2085
|
-
};
|
|
2086
|
-
|
|
2087
|
-
// src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts
|
|
2088
|
-
var GroupRowExpanderCls = "_7pupv0b";
|
|
2089
|
-
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
|
-
var RowHoverCls = "_7pupv01";
|
|
2091
|
-
|
|
2092
|
-
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
2093
2085
|
function getGroupColumnRender({
|
|
2094
|
-
|
|
2086
|
+
groupIndexForColumn,
|
|
2095
2087
|
groupRenderStrategy,
|
|
2096
2088
|
toggleGroupRow
|
|
2097
2089
|
}) {
|
|
@@ -2101,7 +2093,7 @@ function getGroupColumnRender({
|
|
|
2101
2093
|
if (column.renderValue) {
|
|
2102
2094
|
value = column.renderValue(renderOptions);
|
|
2103
2095
|
}
|
|
2104
|
-
let groupRowInfo = groupRenderStrategy !== "inline" ? rowInfo : ((_a = rowInfo.parents) == null ? void 0 : _a[
|
|
2096
|
+
let groupRowInfo = groupRenderStrategy !== "inline" ? rowInfo : ((_a = rowInfo.parents) == null ? void 0 : _a[groupIndexForColumn]) || rowInfo;
|
|
2105
2097
|
if (!groupRowInfo) {
|
|
2106
2098
|
return null;
|
|
2107
2099
|
}
|
|
@@ -2111,14 +2103,14 @@ function getGroupColumnRender({
|
|
|
2111
2103
|
if (groupRowInfo.groupCount === 1) {
|
|
2112
2104
|
return value;
|
|
2113
2105
|
}
|
|
2114
|
-
if (groupRowInfo.groupNesting ===
|
|
2106
|
+
if (groupRowInfo.groupNesting === groupIndexForColumn && collapsed) {
|
|
2115
2107
|
return null;
|
|
2116
2108
|
}
|
|
2117
2109
|
} else {
|
|
2118
2110
|
if (!groupRowInfo.isGroupRow) {
|
|
2119
2111
|
return null;
|
|
2120
2112
|
}
|
|
2121
|
-
if (
|
|
2113
|
+
if (groupIndexForColumn + 1 !== groupRowInfo.groupNesting) {
|
|
2122
2114
|
return null;
|
|
2123
2115
|
}
|
|
2124
2116
|
}
|
|
@@ -2135,17 +2127,21 @@ function getGroupColumnRender({
|
|
|
2135
2127
|
};
|
|
2136
2128
|
}
|
|
2137
2129
|
function getColumnForGroupBy(options, toggleGroupRow, groupColumnFromProps) {
|
|
2138
|
-
const {
|
|
2130
|
+
const {
|
|
2131
|
+
groupByForColumn,
|
|
2132
|
+
groupIndexForColumn,
|
|
2133
|
+
groupRenderStrategy
|
|
2134
|
+
} = options;
|
|
2139
2135
|
let generatedGroupColumn = __spreadValues({
|
|
2140
|
-
header: `Group by ${
|
|
2141
|
-
groupByField:
|
|
2136
|
+
header: `Group by ${groupByForColumn.field}`,
|
|
2137
|
+
groupByField: groupByForColumn.field,
|
|
2142
2138
|
sortable: false,
|
|
2143
2139
|
render: getGroupColumnRender({
|
|
2144
|
-
|
|
2140
|
+
groupIndexForColumn,
|
|
2145
2141
|
toggleGroupRow,
|
|
2146
2142
|
groupRenderStrategy
|
|
2147
2143
|
})
|
|
2148
|
-
},
|
|
2144
|
+
}, groupByForColumn.column);
|
|
2149
2145
|
if (groupColumnFromProps) {
|
|
2150
2146
|
if (typeof groupColumnFromProps === "function") {
|
|
2151
2147
|
generatedGroupColumn = __spreadValues(__spreadValues({}, generatedGroupColumn), groupColumnFromProps(options, toggleGroupRow));
|
|
@@ -3193,7 +3189,7 @@ function DataSourceCmp({ children }) {
|
|
|
3193
3189
|
componentActions,
|
|
3194
3190
|
getState
|
|
3195
3191
|
};
|
|
3196
|
-
if (
|
|
3192
|
+
if (true) {
|
|
3197
3193
|
globalThis.getDataSourceState = getState;
|
|
3198
3194
|
}
|
|
3199
3195
|
useLoadData();
|
|
@@ -3297,7 +3293,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupRowsMap) {
|
|
|
3297
3293
|
return rowspan;
|
|
3298
3294
|
},
|
|
3299
3295
|
render: getGroupColumnRender({
|
|
3300
|
-
groupIndex,
|
|
3296
|
+
groupIndexForColumn: groupIndex,
|
|
3301
3297
|
groupRenderStrategy: groupRenderStrategy2,
|
|
3302
3298
|
toggleGroupRow: toggleGroupRow2
|
|
3303
3299
|
})
|
|
@@ -3360,7 +3356,7 @@ function useColumnsWhenGrouping() {
|
|
|
3360
3356
|
return;
|
|
3361
3357
|
}
|
|
3362
3358
|
const update = () => {
|
|
3363
|
-
|
|
3359
|
+
const columnsWhenGrouping = getColumnsWhenGrouping({
|
|
3364
3360
|
columns,
|
|
3365
3361
|
groupColumn,
|
|
3366
3362
|
groupRenderStrategy,
|
|
@@ -3368,6 +3364,7 @@ function useColumnsWhenGrouping() {
|
|
|
3368
3364
|
pivotColumns,
|
|
3369
3365
|
toggleGroupRow
|
|
3370
3366
|
});
|
|
3367
|
+
componentActions.columnsWhenGrouping = columnsWhenGrouping;
|
|
3371
3368
|
};
|
|
3372
3369
|
update();
|
|
3373
3370
|
return interceptMap(columns, {
|
|
@@ -3455,11 +3452,11 @@ function getColumnsWhenGrouping(params) {
|
|
|
3455
3452
|
}
|
|
3456
3453
|
const computedColumns = new Map();
|
|
3457
3454
|
if (groupRenderStrategy === "multi-column") {
|
|
3458
|
-
groupRowsBy.forEach((
|
|
3459
|
-
computedColumns.set(`group-by-${
|
|
3460
|
-
|
|
3455
|
+
groupRowsBy.forEach((groupByForColumn, groupIndexForColumn, arr) => {
|
|
3456
|
+
computedColumns.set(`group-by-${groupByForColumn.field}`, getColumnForGroupBy({
|
|
3457
|
+
groupByForColumn,
|
|
3461
3458
|
groupRowsBy,
|
|
3462
|
-
|
|
3459
|
+
groupIndexForColumn,
|
|
3463
3460
|
groupCount: arr.length,
|
|
3464
3461
|
groupRenderStrategy
|
|
3465
3462
|
}, toggleGroupRow, groupColumn));
|
|
@@ -3467,7 +3464,8 @@ function getColumnsWhenGrouping(params) {
|
|
|
3467
3464
|
} else if (groupRenderStrategy === "single-column") {
|
|
3468
3465
|
computedColumns.set("group-by", getSingleGroupColumn({
|
|
3469
3466
|
groupCount: groupRowsBy.length,
|
|
3470
|
-
groupRowsBy
|
|
3467
|
+
groupRowsBy,
|
|
3468
|
+
groupRenderStrategy
|
|
3471
3469
|
}, toggleGroupRow, groupColumn));
|
|
3472
3470
|
}
|
|
3473
3471
|
columns.forEach((col, colId) => {
|
|
@@ -3679,15 +3677,15 @@ function VerticalScrollbarPlaceholderFn(props) {
|
|
|
3679
3677
|
var VerticalScrollbarPlaceholder = memo2(VerticalScrollbarPlaceholderFn);
|
|
3680
3678
|
|
|
3681
3679
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
3682
|
-
var CellCls = "_1eexc2a5
|
|
3680
|
+
var CellCls = "_1eexc2a5 _16lm1iwj _16lm1iw10 _16lm1iw11 _16lm1iw2 _16lm1iw19 _16lm1iw1a";
|
|
3683
3681
|
var HeaderCellProxy = "_12zfob10";
|
|
3684
3682
|
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
|
|
3683
|
+
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"]] });
|
|
3684
|
+
var HeaderGroupCls = "_16lm1iwz _16lm1iwj";
|
|
3685
|
+
var HeaderGroup_Children = "_16lm1iwj _16lm1iw10 _16lm1iw12 _16lm1iwc";
|
|
3686
|
+
var HeaderGroup_Header = "_12zfob1x _16lm1iwj _16lm1iw10 _16lm1iw11";
|
|
3689
3687
|
var HeaderSortIconCls = "_12zfob11 _16lm1iw1";
|
|
3690
|
-
var HeaderWrapperCls = "_12zfob1v
|
|
3688
|
+
var HeaderWrapperCls = "_12zfob1v _16lm1iw16 _16lm1iw1 _16lm1iwj _16lm1iw10";
|
|
3691
3689
|
|
|
3692
3690
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
3693
3691
|
import {
|
|
@@ -3718,9 +3716,9 @@ var useInfiniteTableState = () => {
|
|
|
3718
3716
|
};
|
|
3719
3717
|
|
|
3720
3718
|
// src/components/InfiniteTable/components/cell.css.ts
|
|
3721
|
-
var CellCls2 = "_1eexc2a5
|
|
3719
|
+
var CellCls2 = "_1eexc2a5 _16lm1iwj _16lm1iw10 _16lm1iw11 _16lm1iw2 _16lm1iw19 _16lm1iw1a";
|
|
3722
3720
|
var CellClsVariants = { shifting: "_1eexc2a3", dragging: "_1eexc2a4" };
|
|
3723
|
-
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "_16lm1iw2
|
|
3721
|
+
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
3722
|
var columnAlignCellStyle = { center: "_1eexc2a0", start: "_1eexc2a1", end: "_1eexc2a2" };
|
|
3725
3723
|
|
|
3726
3724
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx
|
|
@@ -4247,7 +4245,7 @@ var MappedItems = class extends Logger {
|
|
|
4247
4245
|
this.init();
|
|
4248
4246
|
}
|
|
4249
4247
|
renderItemAtElement(itemIndex, elementIndex, renderNode) {
|
|
4250
|
-
if (
|
|
4248
|
+
if (true) {
|
|
4251
4249
|
this.debug(`Render item ${itemIndex} at element ${elementIndex}`);
|
|
4252
4250
|
}
|
|
4253
4251
|
const currentItemIndex = this.elementIndexToItemIndex[elementIndex];
|
|
@@ -4306,7 +4304,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4306
4304
|
}
|
|
4307
4305
|
const { mappedItems } = this;
|
|
4308
4306
|
const { renderStartIndex, renderEndIndex } = range;
|
|
4309
|
-
if (
|
|
4307
|
+
if (true) {
|
|
4310
4308
|
this.debug(`Render range ${renderStartIndex}-${renderEndIndex}. Force ${force}`);
|
|
4311
4309
|
}
|
|
4312
4310
|
const renderCount = renderEndIndex === -1 ? 0 : renderEndIndex - renderStartIndex + 1;
|
|
@@ -4319,7 +4317,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4319
4317
|
delete this.updaters[elementIndex];
|
|
4320
4318
|
}
|
|
4321
4319
|
delete this.items[elementIndex];
|
|
4322
|
-
if (
|
|
4320
|
+
if (true) {
|
|
4323
4321
|
this.debug(`Discard element ${elementIndex}`);
|
|
4324
4322
|
}
|
|
4325
4323
|
});
|
|
@@ -4341,7 +4339,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4341
4339
|
}
|
|
4342
4340
|
const elementIndex = elementsOutsideItemRange.pop();
|
|
4343
4341
|
if (elementIndex == null) {
|
|
4344
|
-
if (
|
|
4342
|
+
if (true) {
|
|
4345
4343
|
this.error(`Cannot find element to render item ${i}`);
|
|
4346
4344
|
}
|
|
4347
4345
|
continue;
|
|
@@ -4363,7 +4361,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4363
4361
|
const itemIndex = this.mappedItems.getItemRenderedAtElementIndex(elementIndex);
|
|
4364
4362
|
const options = this.brain.getOptions();
|
|
4365
4363
|
if (itemIndex == null) {
|
|
4366
|
-
if (
|
|
4364
|
+
if (true) {
|
|
4367
4365
|
this.error(`Cannot find item for element ${elementIndex}`);
|
|
4368
4366
|
}
|
|
4369
4367
|
return;
|
|
@@ -4373,7 +4371,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4373
4371
|
return;
|
|
4374
4372
|
}
|
|
4375
4373
|
if (itemElement) {
|
|
4376
|
-
if (
|
|
4374
|
+
if (true) {
|
|
4377
4375
|
itemElement.dataset.elementIndex = elementIndex;
|
|
4378
4376
|
itemElement.dataset.itemIndex = itemIndex;
|
|
4379
4377
|
}
|
|
@@ -4387,6 +4385,9 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4387
4385
|
}
|
|
4388
4386
|
};
|
|
4389
4387
|
this.destroy = () => {
|
|
4388
|
+
if (true) {
|
|
4389
|
+
return;
|
|
4390
|
+
}
|
|
4390
4391
|
this.destroyed = true;
|
|
4391
4392
|
this.mappedItems.destroy();
|
|
4392
4393
|
this.itemDOMElements = [];
|
|
@@ -4446,7 +4447,7 @@ var ReactVirtualRenderer = class extends Logger {
|
|
|
4446
4447
|
return;
|
|
4447
4448
|
}
|
|
4448
4449
|
this.mappedItems.renderItemAtElement(itemIndex, elementIndex, renderedNode);
|
|
4449
|
-
if (
|
|
4450
|
+
if (true) {
|
|
4450
4451
|
this.debug(`Render item ${itemIndex} at element ${elementIndex}`);
|
|
4451
4452
|
}
|
|
4452
4453
|
itemUpdater(renderedNode);
|
|
@@ -4509,7 +4510,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
4509
4510
|
const renderColumn = useCallback8(({ domRef: domRef2, itemIndex: columnIndex }) => {
|
|
4510
4511
|
const column = columns[columnIndex];
|
|
4511
4512
|
if (!column) {
|
|
4512
|
-
if (
|
|
4513
|
+
if (true) {
|
|
4513
4514
|
debug3("Cannot find column to render at ", columnIndex);
|
|
4514
4515
|
}
|
|
4515
4516
|
return null;
|
|
@@ -4954,7 +4955,7 @@ var getScrollableClassName = (scrollable) => {
|
|
|
4954
4955
|
};
|
|
4955
4956
|
|
|
4956
4957
|
// src/components/VirtualScrollContainer/index.tsx
|
|
4957
|
-
var rootClassName6 = "
|
|
4958
|
+
var rootClassName6 = "InfiniteVirtualScrollContainer";
|
|
4958
4959
|
var VirtualScrollContainer = forwardRef2(function VirtualScrollContainer2(props, ref) {
|
|
4959
4960
|
const {
|
|
4960
4961
|
children,
|
|
@@ -4988,8 +4989,8 @@ function SpacePlaceholderFn(props) {
|
|
|
4988
4989
|
};
|
|
4989
4990
|
return /* @__PURE__ */ createElement21("div", {
|
|
4990
4991
|
"data-count": count,
|
|
4991
|
-
"data-width": width,
|
|
4992
|
-
"data-height": height,
|
|
4992
|
+
"data-placeholder-width": true ? width : void 0,
|
|
4993
|
+
"data-placeholder-height": true ? height : void 0,
|
|
4993
4994
|
"data-name": "SpacePlaceholder",
|
|
4994
4995
|
style
|
|
4995
4996
|
});
|
|
@@ -5066,7 +5067,7 @@ var VirtualList = (props) => {
|
|
|
5066
5067
|
useEffect15(() => {
|
|
5067
5068
|
const removeOnRenderCount = virtualBrain.onRenderCountChange((renderCount) => {
|
|
5068
5069
|
renderCountRef.current = renderCount;
|
|
5069
|
-
if (
|
|
5070
|
+
if (true) {
|
|
5070
5071
|
debug4.extend(mainAxis)(`Render count change ${renderCount}`);
|
|
5071
5072
|
}
|
|
5072
5073
|
rerender();
|
|
@@ -5094,7 +5095,7 @@ var VirtualList = (props) => {
|
|
|
5094
5095
|
const domProps = __spreadProps(__spreadValues({}, restDOMProps), {
|
|
5095
5096
|
className: join(props.className, rootClassName7, `${rootClassName7}--${mainAxis}`, VirtualListCls, VirtualListClsOrientation[mainAxis])
|
|
5096
5097
|
});
|
|
5097
|
-
if (
|
|
5098
|
+
if (true) {
|
|
5098
5099
|
domProps["data-cmp-name"] = `VirtualList`;
|
|
5099
5100
|
}
|
|
5100
5101
|
return /* @__PURE__ */ createElement22(Fragment4, null, /* @__PURE__ */ createElement22("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement22(VirtualScrollContainer, {
|
|
@@ -5336,7 +5337,7 @@ function useRowDOMProps(props, rowProps, rowStyle, rowClassName, groupRenderStra
|
|
|
5336
5337
|
const rows = parentNode.querySelectorAll(hoverSelector.join(","));
|
|
5337
5338
|
rows.forEach((row) => row.classList.remove(InfiniteTableRowClassName__hover, RowHoverCls));
|
|
5338
5339
|
}, [initialMouseLeave, showHoverRows]);
|
|
5339
|
-
if (rowInfo.isGroupRow
|
|
5340
|
+
if (rowInfo.isGroupRow) {
|
|
5340
5341
|
style = style || {};
|
|
5341
5342
|
style[stripVar(ThemeVars.components.Row.groupNesting)] = rowInfo.groupNesting - 1;
|
|
5342
5343
|
}
|
|
@@ -5408,7 +5409,7 @@ function InfiniteTableRowFn(props) {
|
|
|
5408
5409
|
if (renderCellRef.current !== renderCell) {
|
|
5409
5410
|
renderCellRef.current = renderCell;
|
|
5410
5411
|
}
|
|
5411
|
-
if (
|
|
5412
|
+
if (true) {
|
|
5412
5413
|
domProps["data-cmp-name"] = "ITableRow";
|
|
5413
5414
|
}
|
|
5414
5415
|
return /* @__PURE__ */ createElement25("div", __spreadProps(__spreadValues({}, domProps), {
|
|
@@ -5555,10 +5556,10 @@ import { useCallback as useCallback13, useEffect as useEffect16, useRef as useRe
|
|
|
5555
5556
|
|
|
5556
5557
|
// src/components/InfiniteTable/InfiniteCls.css.ts
|
|
5557
5558
|
var FooterCls = "_16lm1iw1";
|
|
5558
|
-
var InfiniteCls = "_1yeub2v0 _16lm1iw1
|
|
5559
|
+
var InfiniteCls = "_1yeub2v0 _16lm1iw1 _16lm1iwj _16lm1iwz _16lm1iw0";
|
|
5559
5560
|
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
5561
|
var InfiniteClsScrolling = "_1yeub2v1";
|
|
5561
|
-
var InfiniteClsShiftingColumns = "
|
|
5562
|
+
var InfiniteClsShiftingColumns = "_16lm1iwm";
|
|
5562
5563
|
var PinnedRowsClsVariants = { pinnedStart: "_1yeub2ve", pinnedEnd: "_1yeub2vf", overflow: "_1yeub2vg" };
|
|
5563
5564
|
var PinnedRowsContainerClsVariants = createRuntimeFn({ defaultClassName: "", variantClassNames: { pinned: { start: "_1yeub2vh", end: "_1yeub2vi", false: "_1yeub2vj" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5564
5565
|
|
|
@@ -5684,7 +5685,7 @@ var rootClassName10 = InfiniteListRootClassName;
|
|
|
5684
5685
|
var defaultClasses = [
|
|
5685
5686
|
willChange.transform,
|
|
5686
5687
|
position.relative,
|
|
5687
|
-
|
|
5688
|
+
transform.translateZero
|
|
5688
5689
|
];
|
|
5689
5690
|
var RowListWithExternalScrolling = (props) => {
|
|
5690
5691
|
const {
|
|
@@ -5711,7 +5712,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
5711
5712
|
const onScroll = (scrollPosition) => {
|
|
5712
5713
|
const node = domRef.current;
|
|
5713
5714
|
if (node) {
|
|
5714
|
-
if (
|
|
5715
|
+
if (true) {
|
|
5715
5716
|
const { renderStartIndex, renderEndIndex } = brain.getRenderRange();
|
|
5716
5717
|
node.dataset.renderStartIndex = renderStartIndex;
|
|
5717
5718
|
node.dataset.renderEndIndex = renderEndIndex;
|
|
@@ -5733,7 +5734,7 @@ var RowListWithExternalScrolling = (props) => {
|
|
|
5733
5734
|
style,
|
|
5734
5735
|
className: join(className, rootClassName10, `${rootClassName10}--vertical`, VirtualListCls, VirtualListClsOrientation.vertical, ...defaultClasses)
|
|
5735
5736
|
};
|
|
5736
|
-
if (
|
|
5737
|
+
if (true) {
|
|
5737
5738
|
domProps["data-cmp-name"] = "RowListWithExternalScrolling";
|
|
5738
5739
|
}
|
|
5739
5740
|
return /* @__PURE__ */ createElement28("div", __spreadValues({}, domProps), /* @__PURE__ */ createElement28(RawList, {
|
|
@@ -5959,7 +5960,7 @@ var VirtualBrain = class extends Logger {
|
|
|
5959
5960
|
this.availableSize = { width: 0, height: 0 };
|
|
5960
5961
|
this.setAvailableSize = (size) => {
|
|
5961
5962
|
this.availableSize = size;
|
|
5962
|
-
if (
|
|
5963
|
+
if (true) {
|
|
5963
5964
|
this.debug("New available size %d", size[this.options.mainAxis === "vertical" ? "height" : "width"]);
|
|
5964
5965
|
}
|
|
5965
5966
|
this.updateRenderCount();
|
|
@@ -5996,7 +5997,7 @@ var VirtualBrain = class extends Logger {
|
|
|
5996
5997
|
this.notifyTotalSizeChange();
|
|
5997
5998
|
return;
|
|
5998
5999
|
}
|
|
5999
|
-
if (
|
|
6000
|
+
if (true) {
|
|
6000
6001
|
this.debug("set renderCount to %d", renderCount);
|
|
6001
6002
|
}
|
|
6002
6003
|
this.renderCount = renderCount;
|
|
@@ -6070,7 +6071,7 @@ var VirtualBrain = class extends Logger {
|
|
|
6070
6071
|
return;
|
|
6071
6072
|
}
|
|
6072
6073
|
}
|
|
6073
|
-
if (
|
|
6074
|
+
if (true) {
|
|
6074
6075
|
if (itemSizeChange && countChange) {
|
|
6075
6076
|
this.debug(`Reset brain: reason itemSize changed and count changed (old ${count}, new ${newCount})`, {
|
|
6076
6077
|
oldItemSize: itemSize,
|
|
@@ -6110,7 +6111,7 @@ var VirtualBrain = class extends Logger {
|
|
|
6110
6111
|
if (cache[i] === void 0) {
|
|
6111
6112
|
ItemIndexBag.itemIndex = i;
|
|
6112
6113
|
let spanValue = itemSpan(ItemIndexBag);
|
|
6113
|
-
if (
|
|
6114
|
+
if (spanValue < 1) {
|
|
6114
6115
|
this.debug("itemSpan cannot be less than 1 - got %d for index %d", spanValue, i);
|
|
6115
6116
|
}
|
|
6116
6117
|
cache[i] = i;
|
|
@@ -6310,7 +6311,7 @@ var VirtualBrain = class extends Logger {
|
|
|
6310
6311
|
const { renderStartIndex, renderEndIndex } = this.renderRange;
|
|
6311
6312
|
if (renderEndIndex !== renderRange.renderEndIndex || renderStartIndex !== renderRange.renderStartIndex) {
|
|
6312
6313
|
this.renderRange = renderRange;
|
|
6313
|
-
if (
|
|
6314
|
+
if (true) {
|
|
6314
6315
|
this.debug("Set renderRange to %d-%d", renderRange.renderStartIndex, renderRange.renderEndIndex);
|
|
6315
6316
|
}
|
|
6316
6317
|
this.notifyRenderRangeChange();
|
|
@@ -6827,9 +6828,9 @@ var useLicense = (licenseKey) => {
|
|
|
6827
6828
|
const valid = useMemo11(() => {
|
|
6828
6829
|
let valid2 = isValidLicense(licenseKey, {
|
|
6829
6830
|
publishedAt: 1624970570587,
|
|
6830
|
-
version: "0.0.
|
|
6831
|
+
version: "0.0.4"
|
|
6831
6832
|
});
|
|
6832
|
-
if (!valid2 && isInsideSandbox) {
|
|
6833
|
+
if (!licenseKey && !valid2 && isInsideSandbox) {
|
|
6833
6834
|
return true;
|
|
6834
6835
|
}
|
|
6835
6836
|
return valid2;
|
|
@@ -6983,8 +6984,8 @@ import {
|
|
|
6983
6984
|
} from "react";
|
|
6984
6985
|
|
|
6985
6986
|
// src/components/InfiniteTable/components/LoadMask.css.ts
|
|
6986
|
-
var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2
|
|
6987
|
-
var LoadMaskOverlayCls = "qy58ya3 _16lm1iw2
|
|
6987
|
+
var LoadMaskCls = { visible: "qy58ya1 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv", hidden: "qy58ya2 qy58ya0 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv" };
|
|
6988
|
+
var LoadMaskOverlayCls = "qy58ya3 _16lm1iw2 _16lm1iwr _16lm1iwt _16lm1iwx _16lm1iwv";
|
|
6988
6989
|
var LoadMaskTextCls = "qy58ya4";
|
|
6989
6990
|
|
|
6990
6991
|
// src/components/InfiniteTable/components/LoadMask.tsx
|
|
@@ -7016,7 +7017,8 @@ var InfiniteTableRoot = getComponentStateRoot({
|
|
|
7016
7017
|
rowHeight: true,
|
|
7017
7018
|
headerHeight: true
|
|
7018
7019
|
},
|
|
7019
|
-
getParentState: () => useDataSource()
|
|
7020
|
+
getParentState: () => useDataSource(),
|
|
7021
|
+
debugName: "InfiniteTable"
|
|
7020
7022
|
});
|
|
7021
7023
|
var InfiniteTableComponent = memo13(function InfiniteTableComponent2() {
|
|
7022
7024
|
var _a;
|
|
@@ -7094,7 +7096,7 @@ function InfiniteTableContextProvider() {
|
|
|
7094
7096
|
const computed = useComputed();
|
|
7095
7097
|
const getComputed = useLatest(computed);
|
|
7096
7098
|
const getState = useLatest(componentState);
|
|
7097
|
-
if (
|
|
7099
|
+
if (true) {
|
|
7098
7100
|
globalThis.getState = getState;
|
|
7099
7101
|
globalThis.getComputed = getComputed;
|
|
7100
7102
|
}
|