@react-spectrum/table 3.12.11-nightly.4704 → 3.12.11-nightly.4718
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/dist/TableViewBase.main.js +10 -12
- package/dist/TableViewBase.main.js.map +1 -1
- package/dist/TableViewBase.mjs +12 -14
- package/dist/TableViewBase.module.js +12 -14
- package/dist/TableViewBase.module.js.map +1 -1
- package/dist/TableViewLayout.main.js +7 -1
- package/dist/TableViewLayout.main.js.map +1 -1
- package/dist/TableViewLayout.mjs +7 -1
- package/dist/TableViewLayout.module.js +7 -1
- package/dist/TableViewLayout.module.js.map +1 -1
- package/dist/zh-TW.main.js +1 -1
- package/dist/zh-TW.main.js.map +1 -1
- package/dist/zh-TW.mjs +1 -1
- package/dist/zh-TW.module.js +1 -1
- package/dist/zh-TW.module.js.map +1 -1
- package/package.json +30 -30
- package/src/TableViewBase.tsx +6 -10
- package/src/TableViewLayout.ts +9 -1
package/dist/zh-TW.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";AAAA,4BAAiB;IAAG,YAAY,CAAC,gBAAE,CAAC;IAClC,iBAAiB,CAAC,gDAAM,CAAC;IACzB,QAAQ,CAAC,gBAAE,CAAC;IACZ,UAAU,CAAC,gBAAE,CAAC;IACd,WAAW,CAAC,gCAAI,CAAC;IACjB,eAAe,CAAC,wDAAO,CAAC;IACxB,gBAAgB,CAAC,wCAAK,CAAC;IACvB,iBAAiB,CAAC,gCAAI,CAAC;IACvB,kBAAkB,CAAC,gCAAI,CAAC;AAC1B","sources":["packages/@react-spectrum/table/intl/zh-TW.json"],"sourcesContent":["{\n \"collapse\": \"收合\",\n \"columnResizer\": \"欄大小調整器\",\n \"drag\": \"拖曳\",\n \"expand\": \"展開\",\n \"loading\": \"
|
|
1
|
+
{"mappings":";AAAA,4BAAiB;IAAG,YAAY,CAAC,gBAAE,CAAC;IAClC,iBAAiB,CAAC,gDAAM,CAAC;IACzB,QAAQ,CAAC,gBAAE,CAAC;IACZ,UAAU,CAAC,gBAAE,CAAC;IACd,WAAW,CAAC,gCAAI,CAAC;IACjB,eAAe,CAAC,wDAAO,CAAC;IACxB,gBAAgB,CAAC,wCAAK,CAAC;IACvB,iBAAiB,CAAC,gCAAI,CAAC;IACvB,kBAAkB,CAAC,gCAAI,CAAC;AAC1B","sources":["packages/@react-spectrum/table/intl/zh-TW.json"],"sourcesContent":["{\n \"collapse\": \"收合\",\n \"columnResizer\": \"欄大小調整器\",\n \"drag\": \"拖曳\",\n \"expand\": \"展開\",\n \"loading\": \"載入中…\",\n \"loadingMore\": \"正在載入更多…\",\n \"resizeColumn\": \"調整欄大小\",\n \"sortAscending\": \"升序排序\",\n \"sortDescending\": \"降序排序\"\n}\n"],"names":[],"version":3,"file":"zh-TW.module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/table",
|
|
3
|
-
"version": "3.12.11-nightly.
|
|
3
|
+
"version": "3.12.11-nightly.4718+4b27a0c02",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,37 +36,37 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/button": "3.0.0-nightly.
|
|
40
|
-
"@react-aria/focus": "3.0.0-nightly.
|
|
41
|
-
"@react-aria/i18n": "3.0.0-nightly.
|
|
42
|
-
"@react-aria/interactions": "3.0.0-nightly.
|
|
43
|
-
"@react-aria/overlays": "3.0.0-nightly.
|
|
44
|
-
"@react-aria/selection": "3.0.0-nightly.
|
|
45
|
-
"@react-aria/table": "3.14.2-nightly.
|
|
46
|
-
"@react-aria/utils": "3.0.0-nightly.
|
|
47
|
-
"@react-aria/virtualizer": "3.10.2-nightly.
|
|
48
|
-
"@react-aria/visually-hidden": "3.0.0-nightly.
|
|
49
|
-
"@react-spectrum/checkbox": "3.0.0-nightly.
|
|
50
|
-
"@react-spectrum/dnd": "3.3.11-nightly.
|
|
51
|
-
"@react-spectrum/layout": "3.6.6-nightly.
|
|
52
|
-
"@react-spectrum/menu": "3.19.2-nightly.
|
|
53
|
-
"@react-spectrum/progress": "3.0.0-nightly.
|
|
54
|
-
"@react-spectrum/tooltip": "3.0.0-nightly.
|
|
55
|
-
"@react-spectrum/utils": "3.0.0-nightly.
|
|
56
|
-
"@react-stately/flags": "3.0.4-nightly.
|
|
57
|
-
"@react-stately/layout": "3.13.10-nightly.
|
|
58
|
-
"@react-stately/table": "3.11.9-nightly.
|
|
59
|
-
"@react-stately/virtualizer": "3.7.2-nightly.
|
|
60
|
-
"@react-types/grid": "3.2.7-nightly.
|
|
61
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
62
|
-
"@react-types/table": "3.9.6-nightly.
|
|
63
|
-
"@spectrum-icons/ui": "3.0.0-nightly.
|
|
39
|
+
"@react-aria/button": "3.0.0-nightly.3006+4b27a0c02",
|
|
40
|
+
"@react-aria/focus": "3.0.0-nightly.3006+4b27a0c02",
|
|
41
|
+
"@react-aria/i18n": "3.0.0-nightly.3006+4b27a0c02",
|
|
42
|
+
"@react-aria/interactions": "3.0.0-nightly.3006+4b27a0c02",
|
|
43
|
+
"@react-aria/overlays": "3.0.0-nightly.3006+4b27a0c02",
|
|
44
|
+
"@react-aria/selection": "3.0.0-nightly.3006+4b27a0c02",
|
|
45
|
+
"@react-aria/table": "3.14.2-nightly.4718+4b27a0c02",
|
|
46
|
+
"@react-aria/utils": "3.0.0-nightly.3006+4b27a0c02",
|
|
47
|
+
"@react-aria/virtualizer": "3.10.2-nightly.4718+4b27a0c02",
|
|
48
|
+
"@react-aria/visually-hidden": "3.0.0-nightly.3006+4b27a0c02",
|
|
49
|
+
"@react-spectrum/checkbox": "3.0.0-nightly.3006+4b27a0c02",
|
|
50
|
+
"@react-spectrum/dnd": "3.3.11-nightly.4718+4b27a0c02",
|
|
51
|
+
"@react-spectrum/layout": "3.6.6-nightly.4718+4b27a0c02",
|
|
52
|
+
"@react-spectrum/menu": "3.19.2-nightly.4718+4b27a0c02",
|
|
53
|
+
"@react-spectrum/progress": "3.0.0-nightly.3006+4b27a0c02",
|
|
54
|
+
"@react-spectrum/tooltip": "3.0.0-nightly.3006+4b27a0c02",
|
|
55
|
+
"@react-spectrum/utils": "3.0.0-nightly.3006+4b27a0c02",
|
|
56
|
+
"@react-stately/flags": "3.0.4-nightly.4718+4b27a0c02",
|
|
57
|
+
"@react-stately/layout": "3.13.10-nightly.4718+4b27a0c02",
|
|
58
|
+
"@react-stately/table": "3.11.9-nightly.4718+4b27a0c02",
|
|
59
|
+
"@react-stately/virtualizer": "3.7.2-nightly.4718+4b27a0c02",
|
|
60
|
+
"@react-types/grid": "3.2.7-nightly.4718+4b27a0c02",
|
|
61
|
+
"@react-types/shared": "3.0.0-nightly.3006+4b27a0c02",
|
|
62
|
+
"@react-types/table": "3.9.6-nightly.4718+4b27a0c02",
|
|
63
|
+
"@spectrum-icons/ui": "3.0.0-nightly.3006+4b27a0c02",
|
|
64
64
|
"@swc/helpers": "^0.5.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
|
68
|
-
"@react-aria/dnd": "3.6.2-nightly.
|
|
69
|
-
"@react-stately/dnd": "3.3.2-nightly.
|
|
67
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.3006+4b27a0c02",
|
|
68
|
+
"@react-aria/dnd": "3.6.2-nightly.4718+4b27a0c02",
|
|
69
|
+
"@react-stately/dnd": "3.3.2-nightly.4718+4b27a0c02"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@react-spectrum/provider": "^3.0.0",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "4b27a0c027f4fbab9ed1070c748966c902b13429"
|
|
80
80
|
}
|
package/src/TableViewBase.tsx
CHANGED
|
@@ -33,10 +33,10 @@ import {GridNode} from '@react-types/grid';
|
|
|
33
33
|
import {InsertionIndicator} from './InsertionIndicator';
|
|
34
34
|
// @ts-ignore
|
|
35
35
|
import intlMessages from '../intl/*.json';
|
|
36
|
-
import {isAndroid, mergeProps, scrollIntoView, scrollIntoViewport} from '@react-aria/utils';
|
|
36
|
+
import {isAndroid, mergeProps, scrollIntoView, scrollIntoViewport, useLoadMore} from '@react-aria/utils';
|
|
37
37
|
import {Item, Menu, MenuTrigger} from '@react-spectrum/menu';
|
|
38
38
|
import {LayoutInfo, Rect, ReusableView, useVirtualizerState} from '@react-stately/virtualizer';
|
|
39
|
-
import {layoutInfoToStyle, ScrollView, setScrollLeft,
|
|
39
|
+
import {layoutInfoToStyle, ScrollView, setScrollLeft, VirtualizerItem} from '@react-aria/virtualizer';
|
|
40
40
|
import ListGripper from '@spectrum-icons/ui/ListGripper';
|
|
41
41
|
import {ListKeyboardDelegate} from '@react-aria/selection';
|
|
42
42
|
import {Nubbin} from './Nubbin';
|
|
@@ -574,14 +574,11 @@ function TableVirtualizer<T>(props: TableVirtualizerProps<T>) {
|
|
|
574
574
|
}), [columnResizeState.columnWidths])
|
|
575
575
|
});
|
|
576
576
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
onLoadMore
|
|
582
|
-
}), [otherProps.tabIndex, persistedKeys, isLoading, onLoadMore]);
|
|
577
|
+
useLoadMore({isLoading, onLoadMore, scrollOffset: 1}, bodyRef);
|
|
578
|
+
let onVisibleRectChange = useCallback((rect: Rect) => {
|
|
579
|
+
state.setVisibleRect(rect);
|
|
580
|
+
}, [state]);
|
|
583
581
|
|
|
584
|
-
let {virtualizerProps, scrollViewProps: {onVisibleRectChange}} = useVirtualizer(memoedVirtualizerProps, state, domRef);
|
|
585
582
|
let onVisibleRectChangeMemo = useCallback(rect => {
|
|
586
583
|
setTableWidth(rect.width);
|
|
587
584
|
onVisibleRectChange(rect);
|
|
@@ -622,7 +619,6 @@ function TableVirtualizer<T>(props: TableVirtualizerProps<T>) {
|
|
|
622
619
|
}), [resizingColumnWidth, columnResizeState.resizingColumn]);
|
|
623
620
|
let mergedProps = mergeProps(
|
|
624
621
|
otherProps,
|
|
625
|
-
virtualizerProps,
|
|
626
622
|
isVirtualDragging && {tabIndex: null}
|
|
627
623
|
);
|
|
628
624
|
|
package/src/TableViewLayout.ts
CHANGED
|
@@ -36,7 +36,7 @@ export class TableViewLayout<T> extends TableLayout<T> {
|
|
|
36
36
|
|
|
37
37
|
if (this.isLoading) {
|
|
38
38
|
// Add some margin around the loader to ensure that scrollbars don't flicker in and out.
|
|
39
|
-
let rect = new Rect(40,
|
|
39
|
+
let rect = new Rect(40, children.length === 0 ? 40 : layoutInfo.rect.maxY, (width || this.virtualizer.visibleRect.width) - 80, children.length === 0 ? this.virtualizer.visibleRect.height - 80 : 60);
|
|
40
40
|
let loader = new LayoutInfo('loader', 'loader', rect);
|
|
41
41
|
loader.parentKey = layoutInfo.key;
|
|
42
42
|
loader.isSticky = children.length === 0;
|
|
@@ -71,6 +71,14 @@ export class TableViewLayout<T> extends TableLayout<T> {
|
|
|
71
71
|
return res;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
protected buildCell(node: GridNode<T>, x: number, y: number): LayoutNode {
|
|
75
|
+
let res = super.buildCell(node, x, y);
|
|
76
|
+
if (node.column?.props.hideHeader) {
|
|
77
|
+
res.layoutInfo.allowOverflow = true;
|
|
78
|
+
}
|
|
79
|
+
return res;
|
|
80
|
+
}
|
|
81
|
+
|
|
74
82
|
protected getEstimatedRowHeight(): number {
|
|
75
83
|
return super.getEstimatedRowHeight() + 1; // for bottom border
|
|
76
84
|
}
|