@xyo-network/react-table 2.64.8 → 2.64.10
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/docs.json +25 -25
- package/package.json +6 -6
- package/dist/browser/components/TableEx/TableCellEx.cjs +0 -32
- package/dist/browser/components/TableEx/TableCellEx.cjs.map +0 -1
- package/dist/browser/components/TableEx/TableCellEx.js +0 -11
- package/dist/browser/components/TableEx/TableCellEx.js.map +0 -1
- package/dist/browser/components/TableEx/TableEx.cjs +0 -39
- package/dist/browser/components/TableEx/TableEx.cjs.map +0 -1
- package/dist/browser/components/TableEx/TableEx.js +0 -18
- package/dist/browser/components/TableEx/TableEx.js.map +0 -1
- package/dist/browser/components/TableEx/TableFooterEx.cjs +0 -42
- package/dist/browser/components/TableEx/TableFooterEx.cjs.map +0 -1
- package/dist/browser/components/TableEx/TableFooterEx.js +0 -21
- package/dist/browser/components/TableEx/TableFooterEx.js.map +0 -1
- package/dist/browser/components/TableEx/index.cjs +0 -69
- package/dist/browser/components/TableEx/index.cjs.map +0 -1
- package/dist/browser/components/TableEx/index.js +0 -46
- package/dist/browser/components/TableEx/index.js.map +0 -1
- package/dist/browser/components/TableEx/types/TableExVariants.cjs +0 -19
- package/dist/browser/components/TableEx/types/TableExVariants.cjs.map +0 -1
- package/dist/browser/components/TableEx/types/TableExVariants.js +0 -1
- package/dist/browser/components/TableEx/types/TableExVariants.js.map +0 -1
- package/dist/browser/components/TableEx/types/index.cjs +0 -19
- package/dist/browser/components/TableEx/types/index.cjs.map +0 -1
- package/dist/browser/components/TableEx/types/index.js +0 -1
- package/dist/browser/components/TableEx/types/index.js.map +0 -1
- package/dist/browser/components/index.cjs +0 -69
- package/dist/browser/components/index.cjs.map +0 -1
- package/dist/browser/components/index.js +0 -46
- package/dist/browser/components/index.js.map +0 -1
- package/dist/browser/context/TableHeight/Context.cjs +0 -28
- package/dist/browser/context/TableHeight/Context.cjs.map +0 -1
- package/dist/browser/context/TableHeight/Context.js +0 -7
- package/dist/browser/context/TableHeight/Context.js.map +0 -1
- package/dist/browser/context/TableHeight/Provider.cjs +0 -54
- package/dist/browser/context/TableHeight/Provider.cjs.map +0 -1
- package/dist/browser/context/TableHeight/Provider.js +0 -33
- package/dist/browser/context/TableHeight/Provider.js.map +0 -1
- package/dist/browser/context/TableHeight/State.cjs +0 -19
- package/dist/browser/context/TableHeight/State.cjs.map +0 -1
- package/dist/browser/context/TableHeight/State.js +0 -1
- package/dist/browser/context/TableHeight/State.js.map +0 -1
- package/dist/browser/context/TableHeight/index.cjs +0 -60
- package/dist/browser/context/TableHeight/index.cjs.map +0 -1
- package/dist/browser/context/TableHeight/index.js +0 -37
- package/dist/browser/context/TableHeight/index.js.map +0 -1
- package/dist/browser/context/TableHeight/use.cjs +0 -34
- package/dist/browser/context/TableHeight/use.cjs.map +0 -1
- package/dist/browser/context/TableHeight/use.js +0 -13
- package/dist/browser/context/TableHeight/use.js.map +0 -1
- package/dist/browser/context/index.cjs +0 -60
- package/dist/browser/context/index.cjs.map +0 -1
- package/dist/browser/context/index.js +0 -37
- package/dist/browser/context/index.js.map +0 -1
- package/dist/node/components/TableEx/TableCellEx.cjs +0 -36
- package/dist/node/components/TableEx/TableCellEx.cjs.map +0 -1
- package/dist/node/components/TableEx/TableCellEx.js +0 -11
- package/dist/node/components/TableEx/TableCellEx.js.map +0 -1
- package/dist/node/components/TableEx/TableEx.cjs +0 -44
- package/dist/node/components/TableEx/TableEx.cjs.map +0 -1
- package/dist/node/components/TableEx/TableEx.js +0 -18
- package/dist/node/components/TableEx/TableEx.js.map +0 -1
- package/dist/node/components/TableEx/TableFooterEx.cjs +0 -46
- package/dist/node/components/TableEx/TableFooterEx.cjs.map +0 -1
- package/dist/node/components/TableEx/TableFooterEx.js +0 -21
- package/dist/node/components/TableEx/TableFooterEx.js.map +0 -1
- package/dist/node/components/TableEx/index.cjs +0 -76
- package/dist/node/components/TableEx/index.cjs.map +0 -1
- package/dist/node/components/TableEx/index.js +0 -46
- package/dist/node/components/TableEx/index.js.map +0 -1
- package/dist/node/components/TableEx/types/TableExVariants.cjs +0 -19
- package/dist/node/components/TableEx/types/TableExVariants.cjs.map +0 -1
- package/dist/node/components/TableEx/types/TableExVariants.js +0 -1
- package/dist/node/components/TableEx/types/TableExVariants.js.map +0 -1
- package/dist/node/components/TableEx/types/index.cjs +0 -19
- package/dist/node/components/TableEx/types/index.cjs.map +0 -1
- package/dist/node/components/TableEx/types/index.js +0 -1
- package/dist/node/components/TableEx/types/index.js.map +0 -1
- package/dist/node/components/index.cjs +0 -76
- package/dist/node/components/index.cjs.map +0 -1
- package/dist/node/components/index.js +0 -46
- package/dist/node/components/index.js.map +0 -1
- package/dist/node/context/TableHeight/Context.cjs +0 -32
- package/dist/node/context/TableHeight/Context.cjs.map +0 -1
- package/dist/node/context/TableHeight/Context.js +0 -7
- package/dist/node/context/TableHeight/Context.js.map +0 -1
- package/dist/node/context/TableHeight/Provider.cjs +0 -58
- package/dist/node/context/TableHeight/Provider.cjs.map +0 -1
- package/dist/node/context/TableHeight/Provider.js +0 -33
- package/dist/node/context/TableHeight/Provider.js.map +0 -1
- package/dist/node/context/TableHeight/State.cjs +0 -19
- package/dist/node/context/TableHeight/State.cjs.map +0 -1
- package/dist/node/context/TableHeight/State.js +0 -1
- package/dist/node/context/TableHeight/State.js.map +0 -1
- package/dist/node/context/TableHeight/index.cjs +0 -66
- package/dist/node/context/TableHeight/index.cjs.map +0 -1
- package/dist/node/context/TableHeight/index.js +0 -37
- package/dist/node/context/TableHeight/index.js.map +0 -1
- package/dist/node/context/TableHeight/use.cjs +0 -38
- package/dist/node/context/TableHeight/use.cjs.map +0 -1
- package/dist/node/context/TableHeight/use.js +0 -13
- package/dist/node/context/TableHeight/use.js.map +0 -1
- package/dist/node/context/index.cjs +0 -66
- package/dist/node/context/index.cjs.map +0 -1
- package/dist/node/context/index.js +0 -37
- package/dist/node/context/index.js.map +0 -1
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/components/TableEx/types/index.ts
|
|
17
|
-
var types_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(types_exports);
|
|
19
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/TableEx/types/index.ts"],"sourcesContent":["export * from './TableExVariants'\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/components/index.ts
|
|
21
|
-
var components_exports = {};
|
|
22
|
-
__export(components_exports, {
|
|
23
|
-
TableCellEx: () => TableCellEx,
|
|
24
|
-
TableEx: () => TableEx,
|
|
25
|
-
TableExWithRef: () => TableExWithRef,
|
|
26
|
-
TableFooterEx: () => TableFooterEx
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(components_exports);
|
|
29
|
-
|
|
30
|
-
// src/components/TableEx/TableCellEx.tsx
|
|
31
|
-
var import_material = require("@mui/material");
|
|
32
|
-
var TableCellEx = (0, import_material.styled)(import_material.TableCell, { name: "TableCellNoBgColor", shouldForwardProp: (prop) => prop !== "noBgColor" })(
|
|
33
|
-
({ noBgColor = true }) => ({
|
|
34
|
-
...noBgColor && { backgroundColor: "transparent" }
|
|
35
|
-
})
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
// src/components/TableEx/TableEx.tsx
|
|
39
|
-
var import_material2 = require("@mui/material");
|
|
40
|
-
var import_react = require("react");
|
|
41
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
-
var TableExInner = (0, import_react.forwardRef)(({ children, ...props }, ref) => {
|
|
43
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material2.Table, { ref, ...props, children });
|
|
44
|
-
});
|
|
45
|
-
TableExInner.displayName = "TableExInner";
|
|
46
|
-
var TableExWithRef = (0, import_react.forwardRef)(({ variant, children, ...props }, ref) => {
|
|
47
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableExInner, { stickyHeader: variant === "scrollable", ref, ...props, children });
|
|
48
|
-
});
|
|
49
|
-
TableExWithRef.displayName = "TableEx";
|
|
50
|
-
var TableEx = TableExWithRef;
|
|
51
|
-
|
|
52
|
-
// src/components/TableEx/TableFooterEx.tsx
|
|
53
|
-
var import_material3 = require("@mui/material");
|
|
54
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
55
|
-
var TableFooterExRoot = (0, import_material3.styled)(import_material3.TableFooter, {
|
|
56
|
-
name: "TableFooterEx",
|
|
57
|
-
shouldForwardProp: (propName) => propName !== "scrollable",
|
|
58
|
-
slot: "Root"
|
|
59
|
-
})(({ variant, theme }) => ({
|
|
60
|
-
backgroundColor: theme.palette.background.default,
|
|
61
|
-
bottom: "unset",
|
|
62
|
-
position: "relative",
|
|
63
|
-
...variant === "scrollable" && {
|
|
64
|
-
bottom: 0,
|
|
65
|
-
position: "sticky"
|
|
66
|
-
}
|
|
67
|
-
}));
|
|
68
|
-
var TableFooterEx = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableFooterExRoot, { ...props, children });
|
|
69
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts","../../../src/components/TableEx/TableCellEx.tsx","../../../src/components/TableEx/TableEx.tsx","../../../src/components/TableEx/TableFooterEx.tsx"],"sourcesContent":["export * from './TableEx'\n","import { styled, TableCell, TableCellProps } from '@mui/material'\n\nexport interface TableCellExProps extends TableCellProps {\n noBgColor?: boolean\n}\n\nexport const TableCellEx = styled(TableCell, { name: 'TableCellNoBgColor', shouldForwardProp: (prop) => prop !== 'noBgColor' })<TableCellExProps>(\n ({ noBgColor = true }) => ({\n ...(noBgColor && { backgroundColor: 'transparent' }),\n }),\n)\n","import { Table, TableProps } from '@mui/material'\nimport { forwardRef, PropsWithChildren } from 'react'\n\nimport { TableExVariants } from './types'\n\nexport interface TableExProps extends PropsWithChildren, TableProps {\n variant?: TableExVariants\n}\n\nconst TableExInner: React.FC<TableExProps> = forwardRef(({ children, ...props }, ref) => {\n return (\n <Table ref={ref} {...props}>\n {children}\n </Table>\n )\n})\n\nTableExInner.displayName = 'TableExInner'\n\nexport const TableExWithRef: React.FC<TableExProps> = forwardRef(({ variant, children, ...props }, ref) => {\n return (\n <TableExInner stickyHeader={variant === 'scrollable'} ref={ref} {...props}>\n {children}\n </TableExInner>\n )\n})\n\nTableExWithRef.displayName = 'TableEx'\n\nexport const TableEx = TableExWithRef\n","import { styled, TableFooter, TableFooterProps } from '@mui/material'\nimport { PropsWithChildren } from 'react'\n\nimport { TableExVariants } from './types'\n\nconst TableFooterExRoot = styled(TableFooter, {\n name: 'TableFooterEx',\n shouldForwardProp: (propName) => propName !== 'scrollable',\n slot: 'Root',\n})<TableFooterExProps>(({ variant, theme }) => ({\n backgroundColor: theme.palette.background.default,\n bottom: 'unset',\n position: 'relative',\n ...(variant === 'scrollable' && {\n bottom: 0,\n position: 'sticky',\n }),\n}))\n\nexport interface TableFooterExProps extends PropsWithChildren, TableFooterProps {\n variant?: TableExVariants\n}\n\nexport const TableFooterEx: React.FC<TableFooterExProps> = ({ children, ...props }) => <TableFooterExRoot {...props}>{children}</TableFooterExRoot>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAAkD;AAM3C,IAAM,kBAAc,wBAAO,2BAAW,EAAE,MAAM,sBAAsB,mBAAmB,CAAC,SAAS,SAAS,YAAY,CAAC;AAAA,EAC5H,CAAC,EAAE,YAAY,KAAK,OAAO;AAAA,IACzB,GAAI,aAAa,EAAE,iBAAiB,cAAc;AAAA,EACpD;AACF;;;ACVA,IAAAA,mBAAkC;AAClC,mBAA8C;AAU1C;AAFJ,IAAM,mBAAuC,yBAAW,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ;AACvF,SACE,4CAAC,0BAAM,KAAW,GAAG,OAClB,UACH;AAEJ,CAAC;AAED,aAAa,cAAc;AAEpB,IAAM,qBAAyC,yBAAW,CAAC,EAAE,SAAS,UAAU,GAAG,MAAM,GAAG,QAAQ;AACzG,SACE,4CAAC,gBAAa,cAAc,YAAY,cAAc,KAAW,GAAG,OACjE,UACH;AAEJ,CAAC;AAED,eAAe,cAAc;AAEtB,IAAM,UAAU;;;AC7BvB,IAAAC,mBAAsD;AAuBiC,IAAAC,sBAAA;AAlBvF,IAAM,wBAAoB,yBAAO,8BAAa;AAAA,EAC5C,MAAM;AAAA,EACN,mBAAmB,CAAC,aAAa,aAAa;AAAA,EAC9C,MAAM;AACR,CAAC,EAAsB,CAAC,EAAE,SAAS,MAAM,OAAO;AAAA,EAC9C,iBAAiB,MAAM,QAAQ,WAAW;AAAA,EAC1C,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,GAAI,YAAY,gBAAgB;AAAA,IAC9B,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AACF,EAAE;AAMK,IAAM,gBAA8C,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,6CAAC,qBAAmB,GAAG,OAAQ,UAAS;","names":["import_material","import_material","import_jsx_runtime"]}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// src/components/TableEx/TableCellEx.tsx
|
|
2
|
-
import { styled, TableCell } from "@mui/material";
|
|
3
|
-
var TableCellEx = styled(TableCell, { name: "TableCellNoBgColor", shouldForwardProp: (prop) => prop !== "noBgColor" })(
|
|
4
|
-
({ noBgColor = true }) => ({
|
|
5
|
-
...noBgColor && { backgroundColor: "transparent" }
|
|
6
|
-
})
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
// src/components/TableEx/TableEx.tsx
|
|
10
|
-
import { Table } from "@mui/material";
|
|
11
|
-
import { forwardRef } from "react";
|
|
12
|
-
import { jsx } from "react/jsx-runtime";
|
|
13
|
-
var TableExInner = forwardRef(({ children, ...props }, ref) => {
|
|
14
|
-
return /* @__PURE__ */ jsx(Table, { ref, ...props, children });
|
|
15
|
-
});
|
|
16
|
-
TableExInner.displayName = "TableExInner";
|
|
17
|
-
var TableExWithRef = forwardRef(({ variant, children, ...props }, ref) => {
|
|
18
|
-
return /* @__PURE__ */ jsx(TableExInner, { stickyHeader: variant === "scrollable", ref, ...props, children });
|
|
19
|
-
});
|
|
20
|
-
TableExWithRef.displayName = "TableEx";
|
|
21
|
-
var TableEx = TableExWithRef;
|
|
22
|
-
|
|
23
|
-
// src/components/TableEx/TableFooterEx.tsx
|
|
24
|
-
import { styled as styled2, TableFooter } from "@mui/material";
|
|
25
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
26
|
-
var TableFooterExRoot = styled2(TableFooter, {
|
|
27
|
-
name: "TableFooterEx",
|
|
28
|
-
shouldForwardProp: (propName) => propName !== "scrollable",
|
|
29
|
-
slot: "Root"
|
|
30
|
-
})(({ variant, theme }) => ({
|
|
31
|
-
backgroundColor: theme.palette.background.default,
|
|
32
|
-
bottom: "unset",
|
|
33
|
-
position: "relative",
|
|
34
|
-
...variant === "scrollable" && {
|
|
35
|
-
bottom: 0,
|
|
36
|
-
position: "sticky"
|
|
37
|
-
}
|
|
38
|
-
}));
|
|
39
|
-
var TableFooterEx = ({ children, ...props }) => /* @__PURE__ */ jsx2(TableFooterExRoot, { ...props, children });
|
|
40
|
-
export {
|
|
41
|
-
TableCellEx,
|
|
42
|
-
TableEx,
|
|
43
|
-
TableExWithRef,
|
|
44
|
-
TableFooterEx
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/TableEx/TableCellEx.tsx","../../../src/components/TableEx/TableEx.tsx","../../../src/components/TableEx/TableFooterEx.tsx"],"sourcesContent":["import { styled, TableCell, TableCellProps } from '@mui/material'\n\nexport interface TableCellExProps extends TableCellProps {\n noBgColor?: boolean\n}\n\nexport const TableCellEx = styled(TableCell, { name: 'TableCellNoBgColor', shouldForwardProp: (prop) => prop !== 'noBgColor' })<TableCellExProps>(\n ({ noBgColor = true }) => ({\n ...(noBgColor && { backgroundColor: 'transparent' }),\n }),\n)\n","import { Table, TableProps } from '@mui/material'\nimport { forwardRef, PropsWithChildren } from 'react'\n\nimport { TableExVariants } from './types'\n\nexport interface TableExProps extends PropsWithChildren, TableProps {\n variant?: TableExVariants\n}\n\nconst TableExInner: React.FC<TableExProps> = forwardRef(({ children, ...props }, ref) => {\n return (\n <Table ref={ref} {...props}>\n {children}\n </Table>\n )\n})\n\nTableExInner.displayName = 'TableExInner'\n\nexport const TableExWithRef: React.FC<TableExProps> = forwardRef(({ variant, children, ...props }, ref) => {\n return (\n <TableExInner stickyHeader={variant === 'scrollable'} ref={ref} {...props}>\n {children}\n </TableExInner>\n )\n})\n\nTableExWithRef.displayName = 'TableEx'\n\nexport const TableEx = TableExWithRef\n","import { styled, TableFooter, TableFooterProps } from '@mui/material'\nimport { PropsWithChildren } from 'react'\n\nimport { TableExVariants } from './types'\n\nconst TableFooterExRoot = styled(TableFooter, {\n name: 'TableFooterEx',\n shouldForwardProp: (propName) => propName !== 'scrollable',\n slot: 'Root',\n})<TableFooterExProps>(({ variant, theme }) => ({\n backgroundColor: theme.palette.background.default,\n bottom: 'unset',\n position: 'relative',\n ...(variant === 'scrollable' && {\n bottom: 0,\n position: 'sticky',\n }),\n}))\n\nexport interface TableFooterExProps extends PropsWithChildren, TableFooterProps {\n variant?: TableExVariants\n}\n\nexport const TableFooterEx: React.FC<TableFooterExProps> = ({ children, ...props }) => <TableFooterExRoot {...props}>{children}</TableFooterExRoot>\n"],"mappings":";AAAA,SAAS,QAAQ,iBAAiC;AAM3C,IAAM,cAAc,OAAO,WAAW,EAAE,MAAM,sBAAsB,mBAAmB,CAAC,SAAS,SAAS,YAAY,CAAC;AAAA,EAC5H,CAAC,EAAE,YAAY,KAAK,OAAO;AAAA,IACzB,GAAI,aAAa,EAAE,iBAAiB,cAAc;AAAA,EACpD;AACF;;;ACVA,SAAS,aAAyB;AAClC,SAAS,kBAAqC;AAU1C;AAFJ,IAAM,eAAuC,WAAW,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ;AACvF,SACE,oBAAC,SAAM,KAAW,GAAG,OAClB,UACH;AAEJ,CAAC;AAED,aAAa,cAAc;AAEpB,IAAM,iBAAyC,WAAW,CAAC,EAAE,SAAS,UAAU,GAAG,MAAM,GAAG,QAAQ;AACzG,SACE,oBAAC,gBAAa,cAAc,YAAY,cAAc,KAAW,GAAG,OACjE,UACH;AAEJ,CAAC;AAED,eAAe,cAAc;AAEtB,IAAM,UAAU;;;AC7BvB,SAAS,UAAAA,SAAQ,mBAAqC;AAuBiC,gBAAAC,YAAA;AAlBvF,IAAM,oBAAoBD,QAAO,aAAa;AAAA,EAC5C,MAAM;AAAA,EACN,mBAAmB,CAAC,aAAa,aAAa;AAAA,EAC9C,MAAM;AACR,CAAC,EAAsB,CAAC,EAAE,SAAS,MAAM,OAAO;AAAA,EAC9C,iBAAiB,MAAM,QAAQ,WAAW;AAAA,EAC1C,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,GAAI,YAAY,gBAAgB;AAAA,IAC9B,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AACF,EAAE;AAMK,IAAM,gBAA8C,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM,gBAAAC,KAAC,qBAAmB,GAAG,OAAQ,UAAS;","names":["styled","jsx"]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/context/TableHeight/Context.ts
|
|
21
|
-
var Context_exports = {};
|
|
22
|
-
__export(Context_exports, {
|
|
23
|
-
TableHeightContext: () => TableHeightContext
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(Context_exports);
|
|
26
|
-
var import_react_shared = require("@xyo-network/react-shared");
|
|
27
|
-
var TableHeightContext = (0, import_react_shared.createContextEx)();
|
|
28
|
-
//# sourceMappingURL=Context.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/Context.ts"],"sourcesContent":["import { createContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAgC;AAIzB,IAAM,yBAAqB,qCAAkC;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/Context.ts"],"sourcesContent":["import { createContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n"],"mappings":";AAAA,SAAS,uBAAuB;AAIzB,IAAM,qBAAqB,gBAAkC;","names":[]}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/context/TableHeight/Provider.tsx
|
|
21
|
-
var Provider_exports = {};
|
|
22
|
-
__export(Provider_exports, {
|
|
23
|
-
TableHeightProvider: () => TableHeightProvider
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(Provider_exports);
|
|
26
|
-
var import_react = require("react");
|
|
27
|
-
|
|
28
|
-
// src/context/TableHeight/Context.ts
|
|
29
|
-
var import_react_shared = require("@xyo-network/react-shared");
|
|
30
|
-
var TableHeightContext = (0, import_react_shared.createContextEx)();
|
|
31
|
-
|
|
32
|
-
// src/context/TableHeight/Provider.tsx
|
|
33
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
-
var TableHeightProvider = ({
|
|
35
|
-
children,
|
|
36
|
-
additionalRows = 0,
|
|
37
|
-
defaultVisibleRows,
|
|
38
|
-
heightFormat = "px"
|
|
39
|
-
}) => {
|
|
40
|
-
const [visibleRows, setVisibleRows] = (0, import_react.useState)(defaultVisibleRows);
|
|
41
|
-
const [height, setHeight] = (0, import_react.useState)();
|
|
42
|
-
const [rowHeight, setRowHeight] = (0, import_react.useState)();
|
|
43
|
-
const formattedHeight = (0, import_react.useMemo)(() => height !== void 0 ? `${height}${heightFormat}` : void 0, [height, heightFormat]);
|
|
44
|
-
(0, import_react.useEffect)(() => {
|
|
45
|
-
setVisibleRows(defaultVisibleRows);
|
|
46
|
-
}, [defaultVisibleRows]);
|
|
47
|
-
(0, import_react.useEffect)(() => {
|
|
48
|
-
if (rowHeight !== void 0 && visibleRows !== void 0) {
|
|
49
|
-
setHeight(rowHeight * (visibleRows + additionalRows));
|
|
50
|
-
}
|
|
51
|
-
}, [defaultVisibleRows, rowHeight, visibleRows, additionalRows]);
|
|
52
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHeightContext.Provider, { value: { height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }, children });
|
|
53
|
-
};
|
|
54
|
-
//# sourceMappingURL=Provider.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/Provider.tsx","../../../../src/context/TableHeight/Context.ts"],"sourcesContent":["import { WithChildren } from '@xylabs/react-shared'\nimport { ContextExProviderProps } from '@xyo-network/react-shared'\nimport { useEffect, useMemo, useState } from 'react'\n\nimport { TableHeightContext } from './Context'\n\nexport interface TableHeightProviderProps extends ContextExProviderProps, WithChildren {\n /** @field Account for optional header and footer rows */\n additionalRows?: number\n defaultVisibleRows?: number\n heightFormat?: string\n}\n\nexport const TableHeightProvider: React.FC<TableHeightProviderProps> = ({\n children,\n additionalRows = 0,\n defaultVisibleRows,\n heightFormat = 'px',\n}) => {\n const [visibleRows, setVisibleRows] = useState(defaultVisibleRows)\n const [height, setHeight] = useState<number | undefined>()\n const [rowHeight, setRowHeight] = useState<number | undefined>()\n\n const formattedHeight = useMemo(() => (height !== undefined ? `${height}${heightFormat}` : undefined), [height, heightFormat])\n\n useEffect(() => {\n setVisibleRows(defaultVisibleRows)\n }, [defaultVisibleRows])\n\n useEffect(() => {\n if (rowHeight !== undefined && visibleRows !== undefined) {\n setHeight(rowHeight * (visibleRows + additionalRows))\n }\n }, [defaultVisibleRows, rowHeight, visibleRows, additionalRows])\n\n return (\n <TableHeightContext.Provider value={{ height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }}>\n {children}\n </TableHeightContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA6C;;;ACF7C,0BAAgC;AAIzB,IAAM,yBAAqB,qCAAkC;;;ADgChE;AAvBG,IAAM,sBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,kBAAkB;AACjE,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAA6B;AACzD,QAAM,CAAC,WAAW,YAAY,QAAI,uBAA6B;AAE/D,QAAM,sBAAkB,sBAAQ,MAAO,WAAW,SAAY,GAAG,MAAM,GAAG,YAAY,KAAK,QAAY,CAAC,QAAQ,YAAY,CAAC;AAE7H,8BAAU,MAAM;AACd,mBAAe,kBAAkB;AAAA,EACnC,GAAG,CAAC,kBAAkB,CAAC;AAEvB,8BAAU,MAAM;AACd,QAAI,cAAc,UAAa,gBAAgB,QAAW;AACxD,gBAAU,aAAa,cAAc,eAAe;AAAA,IACtD;AAAA,EACF,GAAG,CAAC,oBAAoB,WAAW,aAAa,cAAc,CAAC;AAE/D,SACE,4CAAC,mBAAmB,UAAnB,EAA4B,OAAO,EAAE,QAAQ,iBAAiB,UAAU,MAAM,WAAW,cAAc,gBAAgB,YAAY,GACjI,UACH;AAEJ;","names":[]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// src/context/TableHeight/Provider.tsx
|
|
2
|
-
import { useEffect, useMemo, useState } from "react";
|
|
3
|
-
|
|
4
|
-
// src/context/TableHeight/Context.ts
|
|
5
|
-
import { createContextEx } from "@xyo-network/react-shared";
|
|
6
|
-
var TableHeightContext = createContextEx();
|
|
7
|
-
|
|
8
|
-
// src/context/TableHeight/Provider.tsx
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
var TableHeightProvider = ({
|
|
11
|
-
children,
|
|
12
|
-
additionalRows = 0,
|
|
13
|
-
defaultVisibleRows,
|
|
14
|
-
heightFormat = "px"
|
|
15
|
-
}) => {
|
|
16
|
-
const [visibleRows, setVisibleRows] = useState(defaultVisibleRows);
|
|
17
|
-
const [height, setHeight] = useState();
|
|
18
|
-
const [rowHeight, setRowHeight] = useState();
|
|
19
|
-
const formattedHeight = useMemo(() => height !== void 0 ? `${height}${heightFormat}` : void 0, [height, heightFormat]);
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
setVisibleRows(defaultVisibleRows);
|
|
22
|
-
}, [defaultVisibleRows]);
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
if (rowHeight !== void 0 && visibleRows !== void 0) {
|
|
25
|
-
setHeight(rowHeight * (visibleRows + additionalRows));
|
|
26
|
-
}
|
|
27
|
-
}, [defaultVisibleRows, rowHeight, visibleRows, additionalRows]);
|
|
28
|
-
return /* @__PURE__ */ jsx(TableHeightContext.Provider, { value: { height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }, children });
|
|
29
|
-
};
|
|
30
|
-
export {
|
|
31
|
-
TableHeightProvider
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=Provider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/Provider.tsx","../../../../src/context/TableHeight/Context.ts"],"sourcesContent":["import { WithChildren } from '@xylabs/react-shared'\nimport { ContextExProviderProps } from '@xyo-network/react-shared'\nimport { useEffect, useMemo, useState } from 'react'\n\nimport { TableHeightContext } from './Context'\n\nexport interface TableHeightProviderProps extends ContextExProviderProps, WithChildren {\n /** @field Account for optional header and footer rows */\n additionalRows?: number\n defaultVisibleRows?: number\n heightFormat?: string\n}\n\nexport const TableHeightProvider: React.FC<TableHeightProviderProps> = ({\n children,\n additionalRows = 0,\n defaultVisibleRows,\n heightFormat = 'px',\n}) => {\n const [visibleRows, setVisibleRows] = useState(defaultVisibleRows)\n const [height, setHeight] = useState<number | undefined>()\n const [rowHeight, setRowHeight] = useState<number | undefined>()\n\n const formattedHeight = useMemo(() => (height !== undefined ? `${height}${heightFormat}` : undefined), [height, heightFormat])\n\n useEffect(() => {\n setVisibleRows(defaultVisibleRows)\n }, [defaultVisibleRows])\n\n useEffect(() => {\n if (rowHeight !== undefined && visibleRows !== undefined) {\n setHeight(rowHeight * (visibleRows + additionalRows))\n }\n }, [defaultVisibleRows, rowHeight, visibleRows, additionalRows])\n\n return (\n <TableHeightContext.Provider value={{ height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }}>\n {children}\n </TableHeightContext.Provider>\n )\n}\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n"],"mappings":";AAEA,SAAS,WAAW,SAAS,gBAAgB;;;ACF7C,SAAS,uBAAuB;AAIzB,IAAM,qBAAqB,gBAAkC;;;ADgChE;AAvBG,IAAM,sBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,kBAAkB;AACjE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA6B;AACzD,QAAM,CAAC,WAAW,YAAY,IAAI,SAA6B;AAE/D,QAAM,kBAAkB,QAAQ,MAAO,WAAW,SAAY,GAAG,MAAM,GAAG,YAAY,KAAK,QAAY,CAAC,QAAQ,YAAY,CAAC;AAE7H,YAAU,MAAM;AACd,mBAAe,kBAAkB;AAAA,EACnC,GAAG,CAAC,kBAAkB,CAAC;AAEvB,YAAU,MAAM;AACd,QAAI,cAAc,UAAa,gBAAgB,QAAW;AACxD,gBAAU,aAAa,cAAc,eAAe;AAAA,IACtD;AAAA,EACF,GAAG,CAAC,oBAAoB,WAAW,aAAa,cAAc,CAAC;AAE/D,SACE,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,EAAE,QAAQ,iBAAiB,UAAU,MAAM,WAAW,cAAc,gBAAgB,YAAY,GACjI,UACH;AAEJ;","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/context/TableHeight/State.ts
|
|
17
|
-
var State_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(State_exports);
|
|
19
|
-
//# sourceMappingURL=State.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/State.ts"],"sourcesContent":["import { ContextExState } from '@xyo-network/react-shared'\nimport { Dispatch, SetStateAction } from 'react'\n\nexport interface TableHeightState extends ContextExState {\n height?: string\n rowHeight?: number\n setRowHeight?: Dispatch<SetStateAction<number | undefined>>\n setVisibleRows?: Dispatch<SetStateAction<number | undefined>>\n visibleRows?: number\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=State.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/context/TableHeight/index.ts
|
|
21
|
-
var TableHeight_exports = {};
|
|
22
|
-
__export(TableHeight_exports, {
|
|
23
|
-
TableHeightContext: () => TableHeightContext,
|
|
24
|
-
TableHeightProvider: () => TableHeightProvider,
|
|
25
|
-
useTableHeight: () => useTableHeight
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(TableHeight_exports);
|
|
28
|
-
|
|
29
|
-
// src/context/TableHeight/Context.ts
|
|
30
|
-
var import_react_shared = require("@xyo-network/react-shared");
|
|
31
|
-
var TableHeightContext = (0, import_react_shared.createContextEx)();
|
|
32
|
-
|
|
33
|
-
// src/context/TableHeight/Provider.tsx
|
|
34
|
-
var import_react = require("react");
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var TableHeightProvider = ({
|
|
37
|
-
children,
|
|
38
|
-
additionalRows = 0,
|
|
39
|
-
defaultVisibleRows,
|
|
40
|
-
heightFormat = "px"
|
|
41
|
-
}) => {
|
|
42
|
-
const [visibleRows, setVisibleRows] = (0, import_react.useState)(defaultVisibleRows);
|
|
43
|
-
const [height, setHeight] = (0, import_react.useState)();
|
|
44
|
-
const [rowHeight, setRowHeight] = (0, import_react.useState)();
|
|
45
|
-
const formattedHeight = (0, import_react.useMemo)(() => height !== void 0 ? `${height}${heightFormat}` : void 0, [height, heightFormat]);
|
|
46
|
-
(0, import_react.useEffect)(() => {
|
|
47
|
-
setVisibleRows(defaultVisibleRows);
|
|
48
|
-
}, [defaultVisibleRows]);
|
|
49
|
-
(0, import_react.useEffect)(() => {
|
|
50
|
-
if (rowHeight !== void 0 && visibleRows !== void 0) {
|
|
51
|
-
setHeight(rowHeight * (visibleRows + additionalRows));
|
|
52
|
-
}
|
|
53
|
-
}, [defaultVisibleRows, rowHeight, visibleRows, additionalRows]);
|
|
54
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHeightContext.Provider, { value: { height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }, children });
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
// src/context/TableHeight/use.tsx
|
|
58
|
-
var import_react_shared2 = require("@xyo-network/react-shared");
|
|
59
|
-
var useTableHeight = (required = false) => (0, import_react_shared2.useContextEx)(TableHeightContext, "TableHeight", required);
|
|
60
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/index.ts","../../../../src/context/TableHeight/Context.ts","../../../../src/context/TableHeight/Provider.tsx","../../../../src/context/TableHeight/use.tsx"],"sourcesContent":["export * from './Context'\nexport * from './Provider'\nexport * from './State'\nexport * from './use'\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n","import { WithChildren } from '@xylabs/react-shared'\nimport { ContextExProviderProps } from '@xyo-network/react-shared'\nimport { useEffect, useMemo, useState } from 'react'\n\nimport { TableHeightContext } from './Context'\n\nexport interface TableHeightProviderProps extends ContextExProviderProps, WithChildren {\n /** @field Account for optional header and footer rows */\n additionalRows?: number\n defaultVisibleRows?: number\n heightFormat?: string\n}\n\nexport const TableHeightProvider: React.FC<TableHeightProviderProps> = ({\n children,\n additionalRows = 0,\n defaultVisibleRows,\n heightFormat = 'px',\n}) => {\n const [visibleRows, setVisibleRows] = useState(defaultVisibleRows)\n const [height, setHeight] = useState<number | undefined>()\n const [rowHeight, setRowHeight] = useState<number | undefined>()\n\n const formattedHeight = useMemo(() => (height !== undefined ? `${height}${heightFormat}` : undefined), [height, heightFormat])\n\n useEffect(() => {\n setVisibleRows(defaultVisibleRows)\n }, [defaultVisibleRows])\n\n useEffect(() => {\n if (rowHeight !== undefined && visibleRows !== undefined) {\n setHeight(rowHeight * (visibleRows + additionalRows))\n }\n }, [defaultVisibleRows, rowHeight, visibleRows, additionalRows])\n\n return (\n <TableHeightContext.Provider value={{ height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }}>\n {children}\n </TableHeightContext.Provider>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightContext } from './Context'\n\nexport const useTableHeight = (required = false) => useContextEx(TableHeightContext, 'TableHeight', required)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,0BAAgC;AAIzB,IAAM,yBAAqB,qCAAkC;;;ACFpE,mBAA6C;AAkCzC;AAvBG,IAAM,sBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,kBAAkB;AACjE,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAA6B;AACzD,QAAM,CAAC,WAAW,YAAY,QAAI,uBAA6B;AAE/D,QAAM,sBAAkB,sBAAQ,MAAO,WAAW,SAAY,GAAG,MAAM,GAAG,YAAY,KAAK,QAAY,CAAC,QAAQ,YAAY,CAAC;AAE7H,8BAAU,MAAM;AACd,mBAAe,kBAAkB;AAAA,EACnC,GAAG,CAAC,kBAAkB,CAAC;AAEvB,8BAAU,MAAM;AACd,QAAI,cAAc,UAAa,gBAAgB,QAAW;AACxD,gBAAU,aAAa,cAAc,eAAe;AAAA,IACtD;AAAA,EACF,GAAG,CAAC,oBAAoB,WAAW,aAAa,cAAc,CAAC;AAE/D,SACE,4CAAC,mBAAmB,UAAnB,EAA4B,OAAO,EAAE,QAAQ,iBAAiB,UAAU,MAAM,WAAW,cAAc,gBAAgB,YAAY,GACjI,UACH;AAEJ;;;ACxCA,IAAAA,uBAA6B;AAItB,IAAM,iBAAiB,CAAC,WAAW,cAAU,mCAAa,oBAAoB,eAAe,QAAQ;","names":["import_react_shared"]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// src/context/TableHeight/Context.ts
|
|
2
|
-
import { createContextEx } from "@xyo-network/react-shared";
|
|
3
|
-
var TableHeightContext = createContextEx();
|
|
4
|
-
|
|
5
|
-
// src/context/TableHeight/Provider.tsx
|
|
6
|
-
import { useEffect, useMemo, useState } from "react";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
var TableHeightProvider = ({
|
|
9
|
-
children,
|
|
10
|
-
additionalRows = 0,
|
|
11
|
-
defaultVisibleRows,
|
|
12
|
-
heightFormat = "px"
|
|
13
|
-
}) => {
|
|
14
|
-
const [visibleRows, setVisibleRows] = useState(defaultVisibleRows);
|
|
15
|
-
const [height, setHeight] = useState();
|
|
16
|
-
const [rowHeight, setRowHeight] = useState();
|
|
17
|
-
const formattedHeight = useMemo(() => height !== void 0 ? `${height}${heightFormat}` : void 0, [height, heightFormat]);
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
setVisibleRows(defaultVisibleRows);
|
|
20
|
-
}, [defaultVisibleRows]);
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
if (rowHeight !== void 0 && visibleRows !== void 0) {
|
|
23
|
-
setHeight(rowHeight * (visibleRows + additionalRows));
|
|
24
|
-
}
|
|
25
|
-
}, [defaultVisibleRows, rowHeight, visibleRows, additionalRows]);
|
|
26
|
-
return /* @__PURE__ */ jsx(TableHeightContext.Provider, { value: { height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }, children });
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// src/context/TableHeight/use.tsx
|
|
30
|
-
import { useContextEx } from "@xyo-network/react-shared";
|
|
31
|
-
var useTableHeight = (required = false) => useContextEx(TableHeightContext, "TableHeight", required);
|
|
32
|
-
export {
|
|
33
|
-
TableHeightContext,
|
|
34
|
-
TableHeightProvider,
|
|
35
|
-
useTableHeight
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/Context.ts","../../../../src/context/TableHeight/Provider.tsx","../../../../src/context/TableHeight/use.tsx"],"sourcesContent":["import { createContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n","import { WithChildren } from '@xylabs/react-shared'\nimport { ContextExProviderProps } from '@xyo-network/react-shared'\nimport { useEffect, useMemo, useState } from 'react'\n\nimport { TableHeightContext } from './Context'\n\nexport interface TableHeightProviderProps extends ContextExProviderProps, WithChildren {\n /** @field Account for optional header and footer rows */\n additionalRows?: number\n defaultVisibleRows?: number\n heightFormat?: string\n}\n\nexport const TableHeightProvider: React.FC<TableHeightProviderProps> = ({\n children,\n additionalRows = 0,\n defaultVisibleRows,\n heightFormat = 'px',\n}) => {\n const [visibleRows, setVisibleRows] = useState(defaultVisibleRows)\n const [height, setHeight] = useState<number | undefined>()\n const [rowHeight, setRowHeight] = useState<number | undefined>()\n\n const formattedHeight = useMemo(() => (height !== undefined ? `${height}${heightFormat}` : undefined), [height, heightFormat])\n\n useEffect(() => {\n setVisibleRows(defaultVisibleRows)\n }, [defaultVisibleRows])\n\n useEffect(() => {\n if (rowHeight !== undefined && visibleRows !== undefined) {\n setHeight(rowHeight * (visibleRows + additionalRows))\n }\n }, [defaultVisibleRows, rowHeight, visibleRows, additionalRows])\n\n return (\n <TableHeightContext.Provider value={{ height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }}>\n {children}\n </TableHeightContext.Provider>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightContext } from './Context'\n\nexport const useTableHeight = (required = false) => useContextEx(TableHeightContext, 'TableHeight', required)\n"],"mappings":";AAAA,SAAS,uBAAuB;AAIzB,IAAM,qBAAqB,gBAAkC;;;ACFpE,SAAS,WAAW,SAAS,gBAAgB;AAkCzC;AAvBG,IAAM,sBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,kBAAkB;AACjE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA6B;AACzD,QAAM,CAAC,WAAW,YAAY,IAAI,SAA6B;AAE/D,QAAM,kBAAkB,QAAQ,MAAO,WAAW,SAAY,GAAG,MAAM,GAAG,YAAY,KAAK,QAAY,CAAC,QAAQ,YAAY,CAAC;AAE7H,YAAU,MAAM;AACd,mBAAe,kBAAkB;AAAA,EACnC,GAAG,CAAC,kBAAkB,CAAC;AAEvB,YAAU,MAAM;AACd,QAAI,cAAc,UAAa,gBAAgB,QAAW;AACxD,gBAAU,aAAa,cAAc,eAAe;AAAA,IACtD;AAAA,EACF,GAAG,CAAC,oBAAoB,WAAW,aAAa,cAAc,CAAC;AAE/D,SACE,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,EAAE,QAAQ,iBAAiB,UAAU,MAAM,WAAW,cAAc,gBAAgB,YAAY,GACjI,UACH;AAEJ;;;ACxCA,SAAS,oBAAoB;AAItB,IAAM,iBAAiB,CAAC,WAAW,UAAU,aAAa,oBAAoB,eAAe,QAAQ;","names":[]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/context/TableHeight/use.tsx
|
|
21
|
-
var use_exports = {};
|
|
22
|
-
__export(use_exports, {
|
|
23
|
-
useTableHeight: () => useTableHeight
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(use_exports);
|
|
26
|
-
var import_react_shared2 = require("@xyo-network/react-shared");
|
|
27
|
-
|
|
28
|
-
// src/context/TableHeight/Context.ts
|
|
29
|
-
var import_react_shared = require("@xyo-network/react-shared");
|
|
30
|
-
var TableHeightContext = (0, import_react_shared.createContextEx)();
|
|
31
|
-
|
|
32
|
-
// src/context/TableHeight/use.tsx
|
|
33
|
-
var useTableHeight = (required = false) => (0, import_react_shared2.useContextEx)(TableHeightContext, "TableHeight", required);
|
|
34
|
-
//# sourceMappingURL=use.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/use.tsx","../../../../src/context/TableHeight/Context.ts"],"sourcesContent":["import { useContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightContext } from './Context'\n\nexport const useTableHeight = (required = false) => useContextEx(TableHeightContext, 'TableHeight', required)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,uBAA6B;;;ACA7B,0BAAgC;AAIzB,IAAM,yBAAqB,qCAAkC;;;ADA7D,IAAM,iBAAiB,CAAC,WAAW,cAAU,mCAAa,oBAAoB,eAAe,QAAQ;","names":["import_react_shared"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// src/context/TableHeight/use.tsx
|
|
2
|
-
import { useContextEx } from "@xyo-network/react-shared";
|
|
3
|
-
|
|
4
|
-
// src/context/TableHeight/Context.ts
|
|
5
|
-
import { createContextEx } from "@xyo-network/react-shared";
|
|
6
|
-
var TableHeightContext = createContextEx();
|
|
7
|
-
|
|
8
|
-
// src/context/TableHeight/use.tsx
|
|
9
|
-
var useTableHeight = (required = false) => useContextEx(TableHeightContext, "TableHeight", required);
|
|
10
|
-
export {
|
|
11
|
-
useTableHeight
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=use.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/context/TableHeight/use.tsx","../../../../src/context/TableHeight/Context.ts"],"sourcesContent":["import { useContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightContext } from './Context'\n\nexport const useTableHeight = (required = false) => useContextEx(TableHeightContext, 'TableHeight', required)\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n"],"mappings":";AAAA,SAAS,oBAAoB;;;ACA7B,SAAS,uBAAuB;AAIzB,IAAM,qBAAqB,gBAAkC;;;ADA7D,IAAM,iBAAiB,CAAC,WAAW,UAAU,aAAa,oBAAoB,eAAe,QAAQ;","names":[]}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/context/index.ts
|
|
21
|
-
var context_exports = {};
|
|
22
|
-
__export(context_exports, {
|
|
23
|
-
TableHeightContext: () => TableHeightContext,
|
|
24
|
-
TableHeightProvider: () => TableHeightProvider,
|
|
25
|
-
useTableHeight: () => useTableHeight
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(context_exports);
|
|
28
|
-
|
|
29
|
-
// src/context/TableHeight/Context.ts
|
|
30
|
-
var import_react_shared = require("@xyo-network/react-shared");
|
|
31
|
-
var TableHeightContext = (0, import_react_shared.createContextEx)();
|
|
32
|
-
|
|
33
|
-
// src/context/TableHeight/Provider.tsx
|
|
34
|
-
var import_react = require("react");
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var TableHeightProvider = ({
|
|
37
|
-
children,
|
|
38
|
-
additionalRows = 0,
|
|
39
|
-
defaultVisibleRows,
|
|
40
|
-
heightFormat = "px"
|
|
41
|
-
}) => {
|
|
42
|
-
const [visibleRows, setVisibleRows] = (0, import_react.useState)(defaultVisibleRows);
|
|
43
|
-
const [height, setHeight] = (0, import_react.useState)();
|
|
44
|
-
const [rowHeight, setRowHeight] = (0, import_react.useState)();
|
|
45
|
-
const formattedHeight = (0, import_react.useMemo)(() => height !== void 0 ? `${height}${heightFormat}` : void 0, [height, heightFormat]);
|
|
46
|
-
(0, import_react.useEffect)(() => {
|
|
47
|
-
setVisibleRows(defaultVisibleRows);
|
|
48
|
-
}, [defaultVisibleRows]);
|
|
49
|
-
(0, import_react.useEffect)(() => {
|
|
50
|
-
if (rowHeight !== void 0 && visibleRows !== void 0) {
|
|
51
|
-
setHeight(rowHeight * (visibleRows + additionalRows));
|
|
52
|
-
}
|
|
53
|
-
}, [defaultVisibleRows, rowHeight, visibleRows, additionalRows]);
|
|
54
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableHeightContext.Provider, { value: { height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }, children });
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
// src/context/TableHeight/use.tsx
|
|
58
|
-
var import_react_shared2 = require("@xyo-network/react-shared");
|
|
59
|
-
var useTableHeight = (required = false) => (0, import_react_shared2.useContextEx)(TableHeightContext, "TableHeight", required);
|
|
60
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/context/index.ts","../../../src/context/TableHeight/Context.ts","../../../src/context/TableHeight/Provider.tsx","../../../src/context/TableHeight/use.tsx"],"sourcesContent":["export * from './TableHeight'\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightState } from './State'\n\nexport const TableHeightContext = createContextEx<TableHeightState>()\n","import { WithChildren } from '@xylabs/react-shared'\nimport { ContextExProviderProps } from '@xyo-network/react-shared'\nimport { useEffect, useMemo, useState } from 'react'\n\nimport { TableHeightContext } from './Context'\n\nexport interface TableHeightProviderProps extends ContextExProviderProps, WithChildren {\n /** @field Account for optional header and footer rows */\n additionalRows?: number\n defaultVisibleRows?: number\n heightFormat?: string\n}\n\nexport const TableHeightProvider: React.FC<TableHeightProviderProps> = ({\n children,\n additionalRows = 0,\n defaultVisibleRows,\n heightFormat = 'px',\n}) => {\n const [visibleRows, setVisibleRows] = useState(defaultVisibleRows)\n const [height, setHeight] = useState<number | undefined>()\n const [rowHeight, setRowHeight] = useState<number | undefined>()\n\n const formattedHeight = useMemo(() => (height !== undefined ? `${height}${heightFormat}` : undefined), [height, heightFormat])\n\n useEffect(() => {\n setVisibleRows(defaultVisibleRows)\n }, [defaultVisibleRows])\n\n useEffect(() => {\n if (rowHeight !== undefined && visibleRows !== undefined) {\n setHeight(rowHeight * (visibleRows + additionalRows))\n }\n }, [defaultVisibleRows, rowHeight, visibleRows, additionalRows])\n\n return (\n <TableHeightContext.Provider value={{ height: formattedHeight, provided: true, rowHeight, setRowHeight, setVisibleRows, visibleRows }}>\n {children}\n </TableHeightContext.Provider>\n )\n}\n","import { useContextEx } from '@xyo-network/react-shared'\n\nimport { TableHeightContext } from './Context'\n\nexport const useTableHeight = (required = false) => useContextEx(TableHeightContext, 'TableHeight', required)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,0BAAgC;AAIzB,IAAM,yBAAqB,qCAAkC;;;ACFpE,mBAA6C;AAkCzC;AAvBG,IAAM,sBAA0D,CAAC;AAAA,EACtE;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,eAAe;AACjB,MAAM;AACJ,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,kBAAkB;AACjE,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAA6B;AACzD,QAAM,CAAC,WAAW,YAAY,QAAI,uBAA6B;AAE/D,QAAM,sBAAkB,sBAAQ,MAAO,WAAW,SAAY,GAAG,MAAM,GAAG,YAAY,KAAK,QAAY,CAAC,QAAQ,YAAY,CAAC;AAE7H,8BAAU,MAAM;AACd,mBAAe,kBAAkB;AAAA,EACnC,GAAG,CAAC,kBAAkB,CAAC;AAEvB,8BAAU,MAAM;AACd,QAAI,cAAc,UAAa,gBAAgB,QAAW;AACxD,gBAAU,aAAa,cAAc,eAAe;AAAA,IACtD;AAAA,EACF,GAAG,CAAC,oBAAoB,WAAW,aAAa,cAAc,CAAC;AAE/D,SACE,4CAAC,mBAAmB,UAAnB,EAA4B,OAAO,EAAE,QAAQ,iBAAiB,UAAU,MAAM,WAAW,cAAc,gBAAgB,YAAY,GACjI,UACH;AAEJ;;;ACxCA,IAAAA,uBAA6B;AAItB,IAAM,iBAAiB,CAAC,WAAW,cAAU,mCAAa,oBAAoB,eAAe,QAAQ;","names":["import_react_shared"]}
|