@af-utils/react-table
Advanced tools
Comparing version 0.0.55 to 1.0.0
@@ -1,4 +0,4 @@ | ||
export const raw = 6624; | ||
export const min = 3338; | ||
export const minGz = 1485; | ||
export const minBrotli = 1341; | ||
export const raw = 6629; | ||
export const min = 3342; | ||
export const minGz = 1484; | ||
export const minBrotli = 1342; |
@@ -20,2 +20,3 @@ import { memo as e, useMemo as t } from "react"; | ||
class f { | ||
static KEYS=[ "key", "align", "label", "render", "format", "Cell", "background", "border", "width", "minWidth" ]; | ||
constructor(e, t) { | ||
@@ -29,4 +30,2 @@ Object.assign(this, h(e, this.constructor.KEYS)), this.align ||= "left", this.label ||= this.key, | ||
f.KEYS = [ "key", "align", "label", "render", "format", "Cell", "background", "border", "width", "minWidth" ]; | ||
const b = (e, t) => ({ | ||
@@ -120,9 +119,9 @@ ref: o => e.el(t, o) | ||
OriginalRow: x | ||
}, N = [ s ], T = [ n ], R = i("overflow: auto", "position: relative"), k = i("top: 0"), D = i("visibility: hidden"), F = i("position: sticky"), I = a(D, k, i("position: absolute", "left: 0", "width: 1px")), M = i("table-layout: fixed", "min-width: 100%"), P = a(F, k), j = a(F, i("bottom: 0")), E = e => { | ||
}, N = [ s ], T = [ n ], R = i("overflow: auto", "position: relative"), k = i("top: 0"), D = i("visibility: hidden"), E = i("position: sticky"), F = a(D, k, i("position: absolute", "left: 0", "width: 1px")), I = i("table-layout: fixed", "min-width: 100%"), K = a(E, k), M = a(E, i("bottom: 0")), P = e => { | ||
let {model: o, columns: s, getKey: n = (e => e), getRowData: i, getRowProps: h, components: u, headless: p, footer: b, className: w, ColumnModel: v = f, tabIndex: x = -1, ...k} = e; | ||
const F = t((() => ({ | ||
const E = t((() => ({ | ||
...C, | ||
...u | ||
})), [ u ]), E = t((() => s.map((e => new v(e, F)))), [ s, F ]), H = t((() => { | ||
const e = new g(E, F, i, h); | ||
})), [ u ]), P = t((() => s.map((e => new v(e, E)))), [ s, E ]), j = t((() => { | ||
const e = new g(P, E, i, h); | ||
return () => /*#__PURE__*/ d(m, { | ||
@@ -134,3 +133,3 @@ children: [ /*#__PURE__*/ c("tr", { | ||
} | ||
}), l(o, (t => /*#__PURE__*/ c(F.Row, { | ||
}), l(o, (t => /*#__PURE__*/ c(E.Row, { | ||
i: t, | ||
@@ -142,7 +141,7 @@ i2: t, | ||
}); | ||
}), [ F, E, i, h, n ]); | ||
}), [ E, P, i, h, n ]); | ||
/*#__PURE__*/ | ||
return d("div", { | ||
className: a(R, w), | ||
ref: o.setOuterNode, | ||
ref: o.setScroller, | ||
tabIndex: x, | ||
@@ -154,3 +153,3 @@ ...k, | ||
children: () => /*#__PURE__*/ c("div", { | ||
className: I, | ||
className: F, | ||
style: { | ||
@@ -160,28 +159,28 @@ height: o.scrollSize | ||
}) | ||
}), /*#__PURE__*/ d(F.Table, { | ||
className: M, | ||
}), /*#__PURE__*/ d(E.Table, { | ||
className: I, | ||
children: [ /*#__PURE__*/ c(y, { | ||
columns: E | ||
}), p ? null : /*#__PURE__*/ c(F.Thead, { | ||
className: P, | ||
columns: P | ||
}), p ? null : /*#__PURE__*/ c(E.Thead, { | ||
className: K, | ||
ref: e => o.setStickyHeader(e), | ||
children: /*#__PURE__*/ c(F.Tr, { | ||
children: /*#__PURE__*/ c(F.HeaderCells, { | ||
columns: E, | ||
components: F | ||
children: /*#__PURE__*/ c(E.Tr, { | ||
children: /*#__PURE__*/ c(E.HeaderCells, { | ||
columns: P, | ||
components: E | ||
}) | ||
}) | ||
}), /*#__PURE__*/ c(F.Tbody, { | ||
}), /*#__PURE__*/ c(E.Tbody, { | ||
children: /*#__PURE__*/ c(r, { | ||
model: o, | ||
events: T, | ||
children: H | ||
children: j | ||
}) | ||
}), b ? /*#__PURE__*/ c(F.Tfoot, { | ||
className: j, | ||
}), b ? /*#__PURE__*/ c(E.Tfoot, { | ||
className: M, | ||
ref: e => o.setStickyFooter(e), | ||
children: /*#__PURE__*/ c(F.Tr, { | ||
children: /*#__PURE__*/ c(F.FooterCells, { | ||
columns: E, | ||
components: F | ||
children: /*#__PURE__*/ c(E.Tr, { | ||
children: /*#__PURE__*/ c(E.FooterCells, { | ||
columns: P, | ||
components: E | ||
}) | ||
@@ -194,3 +193,3 @@ }) | ||
"production" !== process.env.NODE_ENV && (E.propTypes = { | ||
"production" !== process.env.NODE_ENV && (P.propTypes = { | ||
model: o.object.isRequired, | ||
@@ -209,5 +208,5 @@ components: o.object, | ||
const H = /*#__PURE__*/ e(E); | ||
const j = /*#__PURE__*/ e(P); | ||
export { f as ColumnModel, C as DefaultTableComponents, H as Table }; | ||
export { f as ColumnModel, C as DefaultTableComponents, j as Table }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@af-utils/react-table", | ||
"private": false, | ||
"version": "0.0.55", | ||
"version": "1.0.0", | ||
"description": "React components for rendering large scrollable data", | ||
@@ -13,4 +13,4 @@ "repository": "https://github.com/nowaalex/af-virtual-scroll.git", | ||
"scripts": { | ||
"dev": "rollup --watch --config rollup.config.js", | ||
"build": "rollup --config rollup.config.js", | ||
"dev": "rollup --watch --config rollup.config.js --bundleConfigAsCjs", | ||
"build": "rollup --config rollup.config.js --bundleConfigAsCjs", | ||
"prepare": "npm run build", | ||
@@ -48,21 +48,21 @@ "test": "jest" | ||
"devDependencies": { | ||
"@babel/core": "^7.19.6", | ||
"@babel/plugin-transform-runtime": "^7.19.6", | ||
"@babel/preset-env": "^7.19.4", | ||
"@babel/core": "^7.21.0", | ||
"@babel/plugin-transform-runtime": "^7.21.0", | ||
"@babel/preset-env": "^7.20.2", | ||
"@babel/preset-react": "^7.18.6", | ||
"@rollup/plugin-babel": "^6.0.2", | ||
"@rollup/plugin-commonjs": "^23.0.2", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"@rollup/plugin-commonjs": "^24.0.1", | ||
"@rollup/plugin-export-bundle-size": "^0.0.1", | ||
"@rollup/plugin-replace": "^5.0.1", | ||
"@rollup/plugin-terser": "^0.1.0", | ||
"@rollup/plugin-replace": "^5.0.2", | ||
"@rollup/plugin-terser": "^0.4.0", | ||
"@rollup/plugin-virtual": "^3.0.1", | ||
"babel-jest": "^29.2.2", | ||
"babel-plugin-module-resolver": "^4.1.0", | ||
"babel-jest": "^29.4.3", | ||
"babel-plugin-module-resolver": "^5.0.0", | ||
"babel-plugin-transform-react-remove-prop-types": "^0.4.24", | ||
"jest": "^29.2.2", | ||
"jest": "^29.4.3", | ||
"lodash": "^4.17.21", | ||
"rollup": "^3.2.5" | ||
"rollup": "^3.17.3" | ||
}, | ||
"peerDependencies": { | ||
"@af-utils/react-virtual-headless": "^0.0.49", | ||
"@af-utils/react-virtual-headless": "^0.1.0", | ||
"@af-utils/styled": "^0.0.20", | ||
@@ -69,0 +69,0 @@ "prop-types": "^15.8.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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
24922
1