@af-utils/react-virtual-list
Advanced tools
Comparing version 0.0.36 to 0.0.37
@@ -1,4 +0,4 @@ | ||
export const raw = 2211; | ||
export const min = 1138; | ||
export const minGz = 655; | ||
export const minBrotli = 568; | ||
export const raw = 2121; | ||
export const min = 1089; | ||
export const minGz = 625; | ||
export const minBrotli = 545; |
import e from "prop-types"; | ||
import { Subscription as t, mapVisibleRange as i, EVT_RANGE as o, EVT_SIZES as s, EVT_SCROLL_SIZE as l } from "@af-utils/react-virtual-headless"; | ||
import { Subscription as t, mapVisibleRange as i, EVT_RANGE as o, EVT_SCROLL_SIZE as l } from "@af-utils/react-virtual-headless"; | ||
export * from "@af-utils/react-virtual-headless"; | ||
import { css as a, cx as r } from "@af-utils/styled"; | ||
import { css as s, cx as a } from "@af-utils/styled"; | ||
import { jsxs as d, jsx as n, Fragment as m } from "react/jsx-runtime"; | ||
import { jsxs as r, jsx as d, Fragment as m } from "react/jsx-runtime"; | ||
const c = a("overflow: auto", "position: relative"), f = a("visibility: hidden"), p = a("position: absolute"), h = a("height: 1px"), u = a("width: 1px"), v = r(c, a("display: flex")), x = r(p, f, u, a("top: 0")), y = r(p, f, h, a("left: 0")), b = r(f, u), N = r(f, h, a("flex-shrink: 0")), g = [ "height", c, x, b ], w = [ "width", v, y, N ], I = [ o ], D = [ ...I, s ], K = [ l ], O = e => { | ||
let {model: o, children: s, className: l, itemData: a, component: c = "div", getKey: f = (e => e), tabIndex: p = -1, countOffset: h = !1, ...u} = e; | ||
const [v, x, y, b] = o.horizontal ? w : g; | ||
const n = s("overflow: auto", "position: relative"), c = s("visibility: hidden"), p = s("position: absolute"), h = s("height: 1px"), f = s("width: 1px"), u = a(n, s("display: flex")), v = a(p, c, f, s("top: 0")), x = a(p, c, h, s("left: 0")), y = a(c, f), b = a(c, h, s("flex-shrink: 0")), N = [ "height", n, v, y ], g = [ "width", u, x, b ], w = [ o ], I = [ l ], D = e => { | ||
let {model: o, children: l, className: s, itemData: n, component: c = "div", getKey: p = (e => e), tabIndex: h = -1, ...f} = e; | ||
const [u, v, x, y] = o.horizontal ? g : N; | ||
/*#__PURE__*/ | ||
return d(c, { | ||
className: r(x, l), | ||
return r(c, { | ||
className: a(v, s), | ||
ref: o.setOuterNode, | ||
tabIndex: p, | ||
...u, | ||
children: [ /*#__PURE__*/ n(t, { | ||
tabIndex: h, | ||
...f, | ||
children: [ /*#__PURE__*/ d(t, { | ||
model: o, | ||
events: K, | ||
children: () => /*#__PURE__*/ n("div", { | ||
className: y, | ||
events: I, | ||
children: () => /*#__PURE__*/ d("div", { | ||
className: x, | ||
style: { | ||
[v]: o.scrollSize | ||
[u]: o.scrollSize | ||
} | ||
}) | ||
}), /*#__PURE__*/ n(t, { | ||
}), /*#__PURE__*/ d(t, { | ||
model: o, | ||
events: h ? D : I, | ||
children: () => /*#__PURE__*/ d(m, { | ||
children: [ /*#__PURE__*/ n("div", { | ||
className: b, | ||
events: w, | ||
children: () => /*#__PURE__*/ r(m, { | ||
children: [ /*#__PURE__*/ d("div", { | ||
className: y, | ||
style: { | ||
[v]: o.getOffset(o.from) | ||
[u]: o.getOffset(o.from) | ||
} | ||
}), i(o, ((e, t) => /*#__PURE__*/ n(s, { | ||
}), i(o, ((e, t) => /*#__PURE__*/ d(l, { | ||
i: e, | ||
data: a, | ||
data: n, | ||
offset: t, | ||
model: o | ||
}, f(e, a))), h) ] | ||
}, p(e, n)))) ] | ||
}) | ||
@@ -49,6 +49,5 @@ }) ] | ||
"production" !== process.env.NODE_ENV && (O.propTypes = { | ||
"production" !== process.env.NODE_ENV && (D.propTypes = { | ||
model: e.object.isRequired, | ||
children: e.elementType.isRequired, | ||
countOffset: e.bool, | ||
getKey: e.func, | ||
@@ -61,3 +60,3 @@ component: e.elementType, | ||
export { O as List }; | ||
export { D as List }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@af-utils/react-virtual-list", | ||
"private": false, | ||
"version": "0.0.36", | ||
"version": "0.0.37", | ||
"description": "React components for rendering large scrollable data", | ||
@@ -66,3 +66,3 @@ "repository": "https://github.com/nowaalex/af-virtual-scroll.git", | ||
"@af-utils/react-virtual-headless": "^0.0.34", | ||
"@af-utils/styled": "^0.0.13", | ||
"@af-utils/styled": "^0.0.14", | ||
"prop-types": "^15.8.0", | ||
@@ -69,0 +69,0 @@ "react": "^17.0.0 || ^18.1.0" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10311
86