@pinnacle0/web-ui 0.4.18 → 0.4.20
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/core/Resizable/index.d.ts +4 -2
- package/core/Resizable/index.js +5 -5
- package/core/Resizable/index.js.map +1 -1
- package/core/{VirtualList.d.ts → VirtualList/index.d.ts} +11 -6
- package/core/{VirtualList.js → VirtualList/index.js} +18 -22
- package/core/VirtualList/index.js.map +1 -0
- package/core/VirtualList/index.less +31 -0
- package/package.json +2 -2
- package/core/VirtualList.js.map +0 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./index.less";
|
|
3
3
|
interface Props {
|
|
4
|
-
height: number;
|
|
5
|
-
width: number;
|
|
6
4
|
id?: string;
|
|
7
5
|
className?: string;
|
|
6
|
+
height: number;
|
|
7
|
+
width: number;
|
|
8
8
|
minHeight?: number;
|
|
9
9
|
minWidth?: number;
|
|
10
|
+
maxHeight?: number;
|
|
11
|
+
maxWidth?: number;
|
|
10
12
|
gap?: number;
|
|
11
13
|
children?: React.ReactNode;
|
|
12
14
|
}
|
package/core/Resizable/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Resizer } from "./Resizer";
|
|
|
3
3
|
import { classNames } from "../../util/ClassNames";
|
|
4
4
|
import "./index.less";
|
|
5
5
|
export var Resizable = React.forwardRef(function (_a, ref) {
|
|
6
|
-
var height = _a.height, width = _a.width, className = _a.className, id = _a.id, gap = _a.gap, children = _a.children, _b = _a.
|
|
6
|
+
var height = _a.height, width = _a.width, className = _a.className, id = _a.id, gap = _a.gap, children = _a.children, _b = _a.maxHeight, maxHeight = _b === void 0 ? window.innerHeight : _b, _c = _a.maxWidth, maxWidth = _c === void 0 ? window.innerWidth : _c, _d = _a.minHeight, minHeight = _d === void 0 ? 0 : _d, _e = _a.minWidth, minWidth = _e === void 0 ? 0 : _e;
|
|
7
7
|
var resizableDivRef = React.useRef(null);
|
|
8
8
|
var startRect = React.useRef({ top: 0, right: 0, bottom: 0, left: 0, width: 0, height: 0 });
|
|
9
9
|
var combineRef = function (node) {
|
|
@@ -25,7 +25,7 @@ export var Resizable = React.forwardRef(function (_a, ref) {
|
|
|
25
25
|
var _a = startRect.current, top_2 = _a.top, height_2 = _a.height;
|
|
26
26
|
var deltaY = state.delta[1];
|
|
27
27
|
var transformedHeight = height_2 - deltaY;
|
|
28
|
-
if (transformedHeight < minHeight) {
|
|
28
|
+
if (transformedHeight < minHeight || transformedHeight > maxHeight) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
resizableDivRef.current.style.top = "".concat(top_2 + deltaY, "px");
|
|
@@ -36,7 +36,7 @@ export var Resizable = React.forwardRef(function (_a, ref) {
|
|
|
36
36
|
if (resizableDivRef.current) {
|
|
37
37
|
var width_2 = startRect.current.width;
|
|
38
38
|
var transformedWidth = width_2 + state.delta[0];
|
|
39
|
-
if (transformedWidth < minWidth) {
|
|
39
|
+
if (transformedWidth < minWidth || transformedWidth > maxWidth) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
resizableDivRef.current.style.width = "".concat(transformedWidth, "px");
|
|
@@ -46,7 +46,7 @@ export var Resizable = React.forwardRef(function (_a, ref) {
|
|
|
46
46
|
if (resizableDivRef.current) {
|
|
47
47
|
var height_3 = startRect.current.height;
|
|
48
48
|
var transformedHeight = height_3 + state.delta[1];
|
|
49
|
-
if (transformedHeight < minHeight) {
|
|
49
|
+
if (transformedHeight < minHeight || transformedHeight > maxHeight) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
resizableDivRef.current.style.height = "".concat(transformedHeight, "px");
|
|
@@ -57,7 +57,7 @@ export var Resizable = React.forwardRef(function (_a, ref) {
|
|
|
57
57
|
var _a = startRect.current, left = _a.left, width_3 = _a.width;
|
|
58
58
|
var deltaX = state.delta[0];
|
|
59
59
|
var transformedWidth = width_3 - deltaX;
|
|
60
|
-
if (transformedWidth < minWidth) {
|
|
60
|
+
if (transformedWidth < minWidth || transformedWidth > maxWidth) {
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
63
|
resizableDivRef.current.style.left = "".concat(left + deltaX, "px");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Resizable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAEjD,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Resizable/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAEjD,OAAO,cAAc,CAAC;AAwBtB,MAAM,CAAC,IAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CACrC,UAAC,EAAwI,EAAE,GAAG;QAA5I,MAAM,YAAA,EAAE,KAAK,WAAA,EAAE,SAAS,eAAA,EAAE,EAAE,QAAA,EAAE,GAAG,SAAA,EAAE,QAAQ,cAAA,EAAE,iBAA8B,EAA9B,SAAS,mBAAG,MAAM,CAAC,WAAW,KAAA,EAAE,gBAA4B,EAA5B,QAAQ,mBAAG,MAAM,CAAC,UAAU,KAAA,EAAE,iBAAa,EAAb,SAAS,mBAAG,CAAC,KAAA,EAAE,gBAAY,EAAZ,QAAQ,mBAAG,CAAC,KAAA;IACpI,IAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC,CAAC;IAClE,IAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAO,EAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,I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AAa,EACvB,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,UAAA,KAAK;gBACX,cAAc,CAAC,KAAK,CAAC,CAAC;gBACtB,YAAY,CAAC,KAAK,CAAC,CAAC;YACxB,CAAC,GACH;QACF,oBAAC,OAAO,IAAC,SAAS,EAAC,MAAM,EAAC,GAAG,EAAE,GAAG,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,GAAI;QAC5F,oBAAC,OAAO,IACJ,SAAS,EAAC,UAAU,EACpB,GAAG,EAAE,GAAG,EACR,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,UAAA,KAAK;gBACX,WAAW,CAAC,KAAK,CAAC,CAAC;gBACnB,YAAY,CAAC,KAAK,CAAC,CAAC;YACxB,CAAC,GACH;QACD,QAAQ,CACP,CACT,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import
|
|
1
|
+
import "../../internal/polyfill/ResizeObserver";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { VirtualizerOptions, Virtualizer } from "@tanstack/react-virtual";
|
|
3
4
|
import type { ComponentType } from "react";
|
|
4
|
-
import type { StringKey } from "
|
|
5
|
-
|
|
5
|
+
import type { StringKey } from "../../internal/type";
|
|
6
|
+
import "./index.less";
|
|
7
|
+
export type Direction = "horizontal" | "vertical";
|
|
8
|
+
export interface VirtualListHandler extends Pick<Virtualizer<HTMLElement, HTMLElement>, "scrollElement" | "scrollToIndex" | "scrollToOffset" | "measure" | "getVirtualItems" | "range" | "indexFromElement" | "getTotalSize" | "scrollElement"> {
|
|
9
|
+
}
|
|
6
10
|
export interface ItemProps<T extends object> {
|
|
7
11
|
index: number;
|
|
8
12
|
data: T;
|
|
@@ -20,9 +24,10 @@ export interface Props<T extends object> {
|
|
|
20
24
|
overscan?: number;
|
|
21
25
|
observeElementRect?: VirtualizerOptions<HTMLElement, HTMLElement>["observeElementRect"];
|
|
22
26
|
observeElementOffset?: VirtualizerOptions<HTMLElement, HTMLElement>["observeElementOffset"];
|
|
27
|
+
className?: string;
|
|
28
|
+
listRef?: React.Ref<VirtualListHandler>;
|
|
23
29
|
}
|
|
24
30
|
/**
|
|
25
31
|
* Efficiently rendering large lists and tabular data
|
|
26
32
|
*/
|
|
27
|
-
export declare function VirtualList<T extends object>({ data, rowKey, direction, renderItem: renderData, overscan, initialRect, observeElementOffset, fixedSize, observeElementRect, }: Props<T>): JSX.Element;
|
|
28
|
-
export {};
|
|
33
|
+
export declare function VirtualList<T extends object>({ data, rowKey, direction, renderItem: renderData, overscan, initialRect, observeElementOffset, fixedSize, observeElementRect, className, listRef, }: Props<T>): JSX.Element;
|
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import "../internal/polyfill/ResizeObserver";
|
|
1
|
+
import "../../internal/polyfill/ResizeObserver";
|
|
13
2
|
import React from "react";
|
|
3
|
+
import { classNames } from "../../util/ClassNames";
|
|
14
4
|
import { useVirtualizer, observeElementOffset as defaultObserveElementOffset, observeElementRect as defaultObserveElementRect } from "@tanstack/react-virtual";
|
|
5
|
+
import "./index.less";
|
|
15
6
|
var DEFAULT_ITEM_SIZE = 100;
|
|
16
7
|
/**
|
|
17
8
|
* Efficiently rendering large lists and tabular data
|
|
18
9
|
*/
|
|
19
10
|
export function VirtualList(_a) {
|
|
20
|
-
var data = _a.data, _b = _a.rowKey, rowKey = _b === void 0 ? "index" : _b, _c = _a.direction, direction = _c === void 0 ? "vertical" : _c, renderData = _a.renderItem, _d = _a.overscan, overscan = _d === void 0 ? 5 : _d, _e = _a.initialRect, initialRect = _e === void 0 ? { width: 0, height: 0 } : _e, observeElementOffset = _a.observeElementOffset, fixedSize = _a.fixedSize, observeElementRect = _a.observeElementRect;
|
|
11
|
+
var data = _a.data, _b = _a.rowKey, rowKey = _b === void 0 ? "index" : _b, _c = _a.direction, direction = _c === void 0 ? "vertical" : _c, renderData = _a.renderItem, _d = _a.overscan, overscan = _d === void 0 ? 5 : _d, _e = _a.initialRect, initialRect = _e === void 0 ? { width: 0, height: 0 } : _e, observeElementOffset = _a.observeElementOffset, fixedSize = _a.fixedSize, observeElementRect = _a.observeElementRect, className = _a.className, listRef = _a.listRef;
|
|
21
12
|
var Item = renderData;
|
|
22
13
|
var parentRef = React.useRef(null);
|
|
23
14
|
var horizontal = direction === "horizontal";
|
|
24
|
-
var sizeStyle = horizontal ? { height: "100%" } : { width: "100%" };
|
|
25
15
|
var virtualizer = useVirtualizer({
|
|
26
16
|
initialRect: initialRect,
|
|
27
17
|
horizontal: horizontal,
|
|
@@ -32,14 +22,20 @@ export function VirtualList(_a) {
|
|
|
32
22
|
observeElementRect: observeElementRect !== null && observeElementRect !== void 0 ? observeElementRect : defaultObserveElementRect,
|
|
33
23
|
overscan: overscan,
|
|
34
24
|
});
|
|
25
|
+
React.useImperativeHandle(listRef, function () { return ({
|
|
26
|
+
getVirtualItems: virtualizer.getVirtualItems,
|
|
27
|
+
scrollElement: virtualizer.scrollElement,
|
|
28
|
+
measure: virtualizer.measure,
|
|
29
|
+
scrollToIndex: virtualizer.scrollToIndex,
|
|
30
|
+
scrollToOffset: virtualizer.scrollToOffset,
|
|
31
|
+
getTotalSize: virtualizer.getTotalSize,
|
|
32
|
+
indexFromElement: virtualizer.indexFromElement,
|
|
33
|
+
range: virtualizer.range,
|
|
34
|
+
}); });
|
|
35
35
|
var getItemKey = function (index) { return (rowKey === "index" ? index : data[index][rowKey]); };
|
|
36
|
-
return (React.createElement("div", { className: "g-virtual-list",
|
|
37
|
-
React.createElement("div", { className: "g-virtual-list-inner", style: {
|
|
38
|
-
|
|
39
|
-
height: horizontal ? "100%" : virtualizer.getTotalSize(),
|
|
40
|
-
width: horizontal ? virtualizer.getTotalSize() : "100%",
|
|
41
|
-
} }, virtualizer.getVirtualItems().map(function (virtualRow) { return (React.createElement("div", { className: "g-virtual-list-item", key: getItemKey(virtualRow.index), ref: virtualizer.measureElement, "data-index": virtualRow.index, style: __assign({ position: "absolute", top: 0, left: 0, transform: horizontal ? "translateX(".concat(virtualRow.start, "px)") : "translateY(".concat(virtualRow.start, "px)") }, sizeStyle) },
|
|
42
|
-
React.createElement("div", { className: "g-virtual-list-item-wrapper", style: __assign({}, sizeStyle) },
|
|
36
|
+
return (React.createElement("div", { className: classNames("g-virtual-list", className, { horizontal: horizontal }), ref: parentRef },
|
|
37
|
+
React.createElement("div", { className: "g-virtual-list-inner", style: horizontal ? { width: virtualizer.getTotalSize() } : { height: virtualizer.getTotalSize() } }, virtualizer.getVirtualItems().map(function (virtualRow) { return (React.createElement("div", { className: "g-virtual-list-item", key: getItemKey(virtualRow.index), ref: virtualizer.measureElement, "data-index": virtualRow.index, style: { transform: horizontal ? "translateX(".concat(virtualRow.start, "px)") : "translateY(".concat(virtualRow.start, "px)") } },
|
|
38
|
+
React.createElement("div", { className: "g-virtual-list-item-wrapper" },
|
|
43
39
|
React.createElement(Item, { data: data[virtualRow.index], index: virtualRow.index })))); }))));
|
|
44
40
|
}
|
|
45
|
-
//# sourceMappingURL=
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/VirtualList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,wCAAwC,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,cAAc,EAAE,oBAAoB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C,6BAA6B;gBACxC,oBAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,GAAI,CAC7D,CACJ,CACT,EAZgD,CAYhD,CAAC,CACA,CACJ,CACT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.g-virtual-list {
|
|
2
|
+
flex: 1;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
overflow: auto;
|
|
6
|
+
|
|
7
|
+
.g-virtual-list-inner {
|
|
8
|
+
position: relative;
|
|
9
|
+
width: 100%;
|
|
10
|
+
|
|
11
|
+
.g-virtual-list-item {
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
width: 100%;
|
|
16
|
+
|
|
17
|
+
.g-virtual-list-item-wrapper {
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.horizontal {
|
|
24
|
+
.g-virtual-list-inner,
|
|
25
|
+
.g-virtual-list-item,
|
|
26
|
+
.g-virtual-list-item-wrapper {
|
|
27
|
+
width: auto;
|
|
28
|
+
height: 100%;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pinnacle0/web-ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.20",
|
|
4
4
|
"author": "Pinnacle",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"react-dom": "18.2.0",
|
|
53
53
|
"react-router-dom": "5.3.0",
|
|
54
54
|
"typescript": "4.9.4",
|
|
55
|
-
"@pinnacle0/devtool-util": "1.1
|
|
55
|
+
"@pinnacle0/devtool-util": "1.2.1",
|
|
56
56
|
"@pinnacle0/webpack-util": "0.4.45"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
package/core/VirtualList.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualList.js","sourceRoot":"","sources":["../../src/core/VirtualList.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,qCAAqC,CAAC;AAC7C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,cAAc,EAAE,oBAAoB,IAAI,2BAA2B,EAAE,kBAAkB,IAAI,yBAAyB,EAAC,MAAM,yBAAyB,CAAC;AAK7J,IAAM,iBAAiB,GAAG,GAAG,CAAC;AAqB9B;;GAEG;AACH,MAAM,UAAU,WAAW,CAAmB,EAUnC;QATP,IAAI,UAAA,EACJ,cAAgB,EAAhB,MAAM,mBAAG,OAAO,KAAA,EAChB,iBAAsB,EAAtB,SAAS,mBAAG,UAAU,KAAA,EACV,UAAU,gBAAA,EACtB,gBAAY,EAAZ,QAAQ,mBAAG,CAAC,KAAA,EACZ,mBAAmC,EAAnC,WAAW,mBAAG,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,KAAA,EACnC,oBAAoB,0BAAA,EACpB,SAAS,eAAA,EACT,kBAAkB,wBAAA;IAElB,IAAM,IAAI,GAAG,UAAU,CAAC;IACxB,IAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAwB,IAAI,CAAC,CAAC;IAC5D,IAAM,UAAU,GAAG,SAAS,KAAK,YAAY,CAAC;IAC9C,IAAM,SAAS,GAAwB,UAAU,CAAC,CAAC,CAAC,EAAC,MAAM,EAAE,MAAM,EAAC,CAAC,CAAC,CAAC,EAAC,KAAK,EAAE,MAAM,EAAC,CAAC;IACvF,IAAM,WAAW,GAAG,cAAc,CAA2B;QACzD,WAAW,aAAA;QACX,UAAU,YAAA;QACV,KAAK,EAAE,IAAI,CAAC,MAAM;QAClB,gBAAg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