es-grid-template 1.8.67 → 1.8.68
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/es/grid-component/hooks/useLazyKVMap.d.ts +1 -1
- package/es/grid-component/hooks/utils.d.ts +1 -1
- package/es/grid-component/index.d.ts +1 -1
- package/es/grid-component/type.d.ts +567 -0
- package/es/grid-component/type.js +1 -490
- package/es/table-component/ColumnsChoose.d.ts +1 -1
- package/es/table-component/ColumnsChoose.js +0 -2
- package/es/table-component/ContextMenu.d.ts +1 -2
- package/es/table-component/ContextMenu.js +0 -1
- package/es/table-component/InternalTable.d.ts +1 -2
- package/es/table-component/InternalTable.js +1 -32
- package/es/table-component/TableContainer.d.ts +1 -1
- package/es/table-component/TableContainer.js +4 -2
- package/es/table-component/TableContainerEdit.d.ts +1 -1
- package/es/table-component/TableContainerEdit.js +4 -2
- package/es/table-component/body/EditableCell.d.ts +1 -1
- package/es/table-component/body/EditableCell.js +1 -18
- package/es/table-component/body/TableBody.d.ts +1 -1
- package/es/table-component/body/TableBodyCell.d.ts +1 -1
- package/es/table-component/body/TableBodyCellEdit.d.ts +1 -1
- package/es/table-component/body/TableBodyRow.d.ts +1 -1
- package/es/table-component/components/ControlCheckbox.d.ts +1 -1
- package/es/table-component/components/EditForm/EditForm.js +0 -1
- package/es/table-component/components/InputControl/InputControl.js +0 -3
- package/es/table-component/components/async-select/index.d.ts +1 -1
- package/es/table-component/components/async-select/index.js +0 -3
- package/es/table-component/components/async-table-select/index.d.ts +1 -1
- package/es/table-component/components/async-table-select/index.js +0 -4
- package/es/table-component/components/checkbox-filter/CheckboxFilter.js +6 -2
- package/es/table-component/components/checkbox-filter/FilterSearch.d.ts +1 -1
- package/es/table-component/components/checkbox-filter/FilterSearch.js +1 -1
- package/es/table-component/components/command/Command.d.ts +1 -1
- package/es/table-component/components/number/index.d.ts +3 -2
- package/es/table-component/components/number/index.js +0 -8
- package/es/table-component/components/number-range/index.d.ts +3 -2
- package/es/table-component/components/number-range/index.js +0 -3
- package/es/table-component/footer/TableFooterRow.js +1 -22
- package/es/table-component/header/TableHead.js +0 -20
- package/es/table-component/header/TableHeadCell.js +0 -5
- package/es/table-component/header/TableHeadCell2.js +4 -2
- package/es/table-component/header/TableHeadGroupCell.js +0 -23
- package/es/table-component/header/renderFilter.d.ts +1 -1
- package/es/table-component/hook/useColumns.d.ts +1 -1
- package/es/table-component/hook/useFilterOperator.d.ts +2 -2
- package/es/table-component/hook/utils.d.ts +1 -1
- package/es/table-component/hook/utils.js +0 -3
- package/es/table-component/index.d.ts +1 -1
- package/es/table-component/index.js +0 -3
- package/es/table-component/table/Grid.d.ts +1 -1
- package/es/table-component/table/Grid.js +0 -5
- package/es/table-component/table/TableWrapper.d.ts +1 -1
- package/es/table-component/useContext.d.ts +2 -1
- package/es/table-virtuoso/InternalTable.d.ts +1 -1
- package/es/table-virtuoso/InternalTable.js +2 -1
- package/es/table-virtuoso/body/TableBodyCell.d.ts +1 -1
- package/es/table-virtuoso/body/TableBodyCell.js +1 -1
- package/es/table-virtuoso/body/TableBodyRow.d.ts +2 -2
- package/es/table-virtuoso/body/TableBodyRow.js +3 -1
- package/es/table-virtuoso/header/TableHeadCell.js +1 -3
- package/es/table-virtuoso/header/renderFilter.d.ts +1 -1
- package/es/table-virtuoso/header/renderFilter.js +0 -4
- package/es/table-virtuoso/hook/utils.d.ts +1 -1
- package/es/table-virtuoso/style.js +1 -1
- package/es/table-virtuoso/table/Grid.d.ts +1 -1
- package/es/table-virtuoso/table/Grid.js +0 -24
- package/es/table-virtuoso/table/TableContainer.d.ts +1 -1
- package/es/table-virtuoso/table/TableContainer.js +0 -2
- package/es/table-virtuoso/table/TableWrapper.d.ts +1 -1
- package/es/table-virtuoso/table/TableWrapper.js +3 -19
- package/es/table-virtuoso/useContext.d.ts +1 -1
- package/lib/grid-component/hooks/useLazyKVMap.d.ts +1 -1
- package/lib/grid-component/hooks/utils.d.ts +1 -1
- package/lib/grid-component/index.d.ts +1 -1
- package/lib/grid-component/type.d.ts +567 -0
- package/lib/grid-component/type.js +4 -490
- package/lib/table-component/ColumnsChoose.d.ts +1 -1
- package/lib/table-component/ColumnsChoose.js +0 -2
- package/lib/table-component/ContextMenu.d.ts +1 -2
- package/lib/table-component/ContextMenu.js +0 -2
- package/lib/table-component/InternalTable.d.ts +1 -2
- package/lib/table-component/InternalTable.js +1 -28
- package/lib/table-component/TableContainer.d.ts +1 -1
- package/lib/table-component/TableContainer.js +4 -2
- package/lib/table-component/TableContainerEdit.d.ts +1 -1
- package/lib/table-component/TableContainerEdit.js +4 -2
- package/lib/table-component/body/EditableCell.d.ts +1 -1
- package/lib/table-component/body/EditableCell.js +0 -10
- package/lib/table-component/body/TableBody.d.ts +1 -1
- package/lib/table-component/body/TableBodyCell.d.ts +1 -1
- package/lib/table-component/body/TableBodyCellEdit.d.ts +1 -1
- package/lib/table-component/body/TableBodyRow.d.ts +1 -1
- package/lib/table-component/components/ControlCheckbox.d.ts +1 -1
- package/lib/table-component/components/EditForm/EditForm.js +0 -2
- package/lib/table-component/components/InputControl/InputControl.js +0 -4
- package/lib/table-component/components/async-select/index.d.ts +1 -1
- package/lib/table-component/components/async-select/index.js +0 -2
- package/lib/table-component/components/async-table-select/index.d.ts +1 -1
- package/lib/table-component/components/async-table-select/index.js +0 -4
- package/lib/table-component/components/checkbox-filter/CheckboxFilter.js +6 -2
- package/lib/table-component/components/checkbox-filter/FilterSearch.d.ts +1 -1
- package/lib/table-component/components/checkbox-filter/FilterSearch.js +1 -1
- package/lib/table-component/components/command/Command.d.ts +1 -1
- package/lib/table-component/components/number/index.d.ts +3 -2
- package/lib/table-component/components/number/index.js +0 -8
- package/lib/table-component/components/number-range/index.d.ts +3 -2
- package/lib/table-component/components/number-range/index.js +0 -3
- package/lib/table-component/footer/TableFooterRow.js +1 -23
- package/lib/table-component/header/TableHead.js +0 -21
- package/lib/table-component/header/TableHeadCell.js +0 -5
- package/lib/table-component/header/TableHeadCell2.js +4 -2
- package/lib/table-component/header/TableHeadGroupCell.js +0 -23
- package/lib/table-component/header/renderFilter.d.ts +1 -1
- package/lib/table-component/hook/useColumns.d.ts +1 -1
- package/lib/table-component/hook/useFilterOperator.d.ts +2 -2
- package/lib/table-component/hook/utils.d.ts +1 -1
- package/lib/table-component/hook/utils.js +0 -4
- package/lib/table-component/index.d.ts +1 -1
- package/lib/table-component/index.js +0 -1
- package/lib/table-component/table/Grid.d.ts +1 -1
- package/lib/table-component/table/Grid.js +0 -4
- package/lib/table-component/table/TableWrapper.d.ts +1 -1
- package/lib/table-component/useContext.d.ts +2 -1
- package/lib/table-virtuoso/InternalTable.d.ts +1 -1
- package/lib/table-virtuoso/InternalTable.js +3 -1
- package/lib/table-virtuoso/body/TableBodyCell.d.ts +1 -1
- package/lib/table-virtuoso/body/TableBodyCell.js +1 -1
- package/lib/table-virtuoso/body/TableBodyRow.d.ts +2 -2
- package/lib/table-virtuoso/body/TableBodyRow.js +3 -1
- package/lib/table-virtuoso/header/TableHeadCell.js +4 -6
- package/lib/table-virtuoso/header/renderFilter.d.ts +1 -1
- package/lib/table-virtuoso/header/renderFilter.js +0 -4
- package/lib/table-virtuoso/hook/utils.d.ts +1 -1
- package/lib/table-virtuoso/style.js +1 -1
- package/lib/table-virtuoso/table/Grid.d.ts +1 -1
- package/lib/table-virtuoso/table/Grid.js +0 -24
- package/lib/table-virtuoso/table/TableContainer.d.ts +1 -1
- package/lib/table-virtuoso/table/TableContainer.js +0 -2
- package/lib/table-virtuoso/table/TableWrapper.d.ts +1 -1
- package/lib/table-virtuoso/table/TableWrapper.js +3 -19
- package/lib/table-virtuoso/useContext.d.ts +1 -1
- package/package.json +1 -1
- package/es/table-component/type.d.ts +0 -567
- package/es/table-component/type.js +0 -1
- package/es/table-virtuoso/hook/constant.d.ts +0 -73
- package/es/table-virtuoso/hook/constant.js +0 -240
- package/es/table-virtuoso/hook/convert.d.ts +0 -1
- package/es/table-virtuoso/hook/convert.js +0 -28
- package/es/table-virtuoso/hook/useColumns.d.ts +0 -28
- package/es/table-virtuoso/hook/useColumns.js +0 -302
- package/es/table-virtuoso/hook/useFilterOperator.d.ts +0 -7
- package/es/table-virtuoso/hook/useFilterOperator.js +0 -33
- package/es/table-virtuoso/style.scss +0 -1441
- package/es/table-virtuoso/type.d.ts +0 -0
- package/es/table-virtuoso/type.js +0 -785
- package/lib/table-component/type.d.ts +0 -567
- package/lib/table-component/type.js +0 -5
- package/lib/table-virtuoso/hook/constant.d.ts +0 -73
- package/lib/table-virtuoso/hook/constant.js +0 -247
- package/lib/table-virtuoso/hook/convert.d.ts +0 -1
- package/lib/table-virtuoso/hook/convert.js +0 -34
- package/lib/table-virtuoso/hook/useColumns.d.ts +0 -28
- package/lib/table-virtuoso/hook/useColumns.js +0 -315
- package/lib/table-virtuoso/hook/useFilterOperator.d.ts +0 -7
- package/lib/table-virtuoso/hook/useFilterOperator.js +0 -40
- package/lib/table-virtuoso/style.scss +0 -1441
- package/lib/table-virtuoso/type.d.ts +0 -0
- package/lib/table-virtuoso/type.js +0 -786
|
@@ -22,16 +22,6 @@ var _EditForm = require("../components/EditForm");
|
|
|
22
22
|
var _useContext = require("../useContext");
|
|
23
23
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
24
24
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
|
-
// import type {ColumnTable, ColumnSelectTable, IFormat} from "./type"
|
|
26
|
-
|
|
27
|
-
// import moment from "moment";
|
|
28
|
-
// import dayjs from "dayjs";
|
|
29
|
-
// import {TreeSelect} from "antd";
|
|
30
|
-
|
|
31
|
-
// import {TableContext} from "./useContext"
|
|
32
|
-
|
|
33
|
-
// import moment from "moment";
|
|
34
|
-
|
|
35
25
|
const {
|
|
36
26
|
SHOW_PARENT
|
|
37
27
|
} = _rcMasterUi.TreeSelect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Cell, Table } from "@tanstack/react-table";
|
|
2
|
-
import type { CommandClick } from "
|
|
2
|
+
import type { CommandClick } from "../../grid-component/type";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import type { VirtualItem, Virtualizer } from "@tanstack/react-virtual";
|
|
5
5
|
interface TableBodyCellProps<T> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Cell, Table } from "@tanstack/react-table";
|
|
2
|
-
import type { CommandClick } from "
|
|
2
|
+
import type { CommandClick } from "../../grid-component/type";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import type { VirtualItem, Virtualizer } from "@tanstack/react-virtual";
|
|
5
5
|
interface TableBodyCellProps<T> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VirtualItem, Virtualizer } from "@tanstack/react-virtual";
|
|
2
2
|
import { type Column, type Row, type Table } from "@tanstack/react-table";
|
|
3
|
-
import type { CommandClick } from "
|
|
3
|
+
import type { CommandClick } from "../../grid-component/type";
|
|
4
4
|
import React from "react";
|
|
5
5
|
interface TableBodyRowProps<T> {
|
|
6
6
|
tableId: string;
|
|
@@ -18,8 +18,6 @@ var _button = _interopRequireDefault(require("rc-master-ui/es/button"));
|
|
|
18
18
|
var _InputControl = _interopRequireDefault(require("../InputControl/InputControl"));
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
|
-
// import InputControl from "../control/InputControl/InputControl";
|
|
22
|
-
|
|
23
21
|
const SelectStyle = exports.SelectStyle = _styledComponents.default.div.withConfig({
|
|
24
22
|
displayName: "SelectStyle",
|
|
25
23
|
componentId: "es-grid-template__sc-18plqpt-0"
|
|
@@ -15,10 +15,6 @@ var _grid = require("rc-master-ui/es/grid");
|
|
|
15
15
|
var _utils = require("../../hook/utils");
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
-
// import {isNullOrUndefined} from "../../hooks";
|
|
19
|
-
|
|
20
|
-
// import {isNullOrUndefined} from "../../../hooks"
|
|
21
|
-
|
|
22
18
|
const {
|
|
23
19
|
Text
|
|
24
20
|
} = _antd.Typography;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BaseOptionType, DefaultOptionType } from "rc-select/lib/Select";
|
|
3
3
|
import type { SelectProps } from "rc-master-ui/es/select";
|
|
4
|
-
import type { LoadOptionsArgs } from '
|
|
4
|
+
import type { LoadOptionsArgs } from '../../../grid-component/type';
|
|
5
5
|
export interface DebounceSelectProps<OptionType extends BaseOptionType = DefaultOptionType> extends SelectProps {
|
|
6
6
|
loadOptions?: (search: string, callback: (newOptions: OptionType[]) => void, args?: LoadOptionsArgs) => void;
|
|
7
7
|
debounceTimeout?: number;
|
|
@@ -11,8 +11,6 @@ var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
|
11
11
|
var _rcMasterUi = require("rc-master-ui");
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
// import type {LoadOptionsArgs} from "../type";
|
|
15
|
-
|
|
16
14
|
function AsyncSelect({
|
|
17
15
|
loadOptions,
|
|
18
16
|
debounceTimeout = 500,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BaseOptionType, DefaultOptionType } from "rc-select/lib/Select";
|
|
3
3
|
import type { TableSelectProps } from "rc-master-ui";
|
|
4
|
-
import type { LoadOptionsArgs } from '
|
|
4
|
+
import type { LoadOptionsArgs } from '../../../grid-component/type';
|
|
5
5
|
export interface DebounceSelectProps<OptionType extends BaseOptionType = DefaultOptionType> extends TableSelectProps {
|
|
6
6
|
loadOptions?: (search: string, callback: (newOptions: OptionType[]) => void, args?: LoadOptionsArgs) => void;
|
|
7
7
|
debounceTimeout?: number;
|
|
@@ -11,10 +11,6 @@ var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
|
11
11
|
var _rcMasterUi = require("rc-master-ui");
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
// import type {TableSelectProps} from "rc-master-ui/es/table-select"
|
|
15
|
-
|
|
16
|
-
// import type {LoadOptionsArgs} from "../type";
|
|
17
|
-
|
|
18
14
|
function AsyncTableSelect({
|
|
19
15
|
loadOptions,
|
|
20
16
|
debounceTimeout = 500,
|
|
@@ -137,7 +137,7 @@ const CheckboxFilter = props => {
|
|
|
137
137
|
}) => (filters || []).map((filter, index) => {
|
|
138
138
|
const key = String(filter.value);
|
|
139
139
|
const item = {
|
|
140
|
-
title: filter.
|
|
140
|
+
title: filter.label,
|
|
141
141
|
key: filter.value !== undefined ? key : String(index)
|
|
142
142
|
};
|
|
143
143
|
if (filter.children) {
|
|
@@ -222,7 +222,11 @@ const CheckboxFilter = props => {
|
|
|
222
222
|
return filterSearch(searchValue, getFilterData(node));
|
|
223
223
|
}
|
|
224
224
|
return searchValueMatched(searchValue, node.title);
|
|
225
|
-
} : undefined
|
|
225
|
+
} : undefined,
|
|
226
|
+
rootStyle: {
|
|
227
|
+
background: 'none',
|
|
228
|
+
boxShadow: 'none'
|
|
229
|
+
}
|
|
226
230
|
})));
|
|
227
231
|
}
|
|
228
232
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_FilterSearch.default, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { FilterSearchType, TableLocale } from "antd/es/table/interface";
|
|
3
|
-
import type { AnyObject } from '
|
|
3
|
+
import type { AnyObject } from '../../../grid-component/type';
|
|
4
4
|
interface FilterSearchProps<RecordType = AnyObject> {
|
|
5
5
|
value: string;
|
|
6
6
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -10,7 +10,7 @@ var _SearchOutlined = _interopRequireDefault(require("@ant-design/icons/SearchOu
|
|
|
10
10
|
var _rcMasterUi = require("rc-master-ui");
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
-
// import type {AnyObject} from "
|
|
13
|
+
// import type {AnyObject} from "./../grid-component/type"
|
|
14
14
|
|
|
15
15
|
const FilterSearch = props => {
|
|
16
16
|
const {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { KeyboardEventHandler } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { IFormat } from "../../../grid-component/type";
|
|
3
4
|
type Props = {
|
|
4
5
|
t?: any;
|
|
5
6
|
format?: IFormat;
|
|
@@ -10,9 +10,6 @@ var _rcMasterUi = require("rc-master-ui");
|
|
|
10
10
|
var _utils = require("../../hook/utils");
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
-
// import type {IFormat} from "../type"
|
|
14
|
-
// import {checkDecimalSeparator, checkThousandSeparator} from "../hooks"
|
|
15
|
-
|
|
16
13
|
const NumberInput = props => {
|
|
17
14
|
const {
|
|
18
15
|
t,
|
|
@@ -22,11 +19,6 @@ const NumberInput = props => {
|
|
|
22
19
|
onPressEnter
|
|
23
20
|
} = props;
|
|
24
21
|
const values = _react.default.useMemo(() => [value], [value]);
|
|
25
|
-
|
|
26
|
-
// const [values, setValues] = React.useState<any[]>(() =>
|
|
27
|
-
// mergedValues,
|
|
28
|
-
// );
|
|
29
|
-
|
|
30
22
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNumericComponent.NumericFormat, {
|
|
31
23
|
value: values[0] ?? ''
|
|
32
24
|
// value={min}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { KeyboardEventHandler } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { IFormat } from "../../../grid-component/type";
|
|
3
4
|
type Props = {
|
|
4
5
|
t?: any;
|
|
5
6
|
format?: IFormat;
|
|
@@ -10,9 +10,6 @@ var _rcMasterUi = require("rc-master-ui");
|
|
|
10
10
|
var _utils = require("../../hook/utils");
|
|
11
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
12
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
-
// import type {IFormat} from "../type"
|
|
14
|
-
// import {checkDecimalSeparator, checkThousandSeparator} from "../hooks"
|
|
15
|
-
|
|
16
13
|
const NumberRange = props => {
|
|
17
14
|
const {
|
|
18
15
|
t,
|
|
@@ -8,34 +8,15 @@ exports.default = void 0;
|
|
|
8
8
|
var _TableFooterCell = _interopRequireDefault(require("./TableFooterCell"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _useContext = require("../useContext");
|
|
11
|
-
// import type { Virtualizer } from "@tanstack/react-virtual";
|
|
12
|
-
// import type { Person } from "../makeData";
|
|
13
|
-
|
|
14
|
-
// import type { Person } from "../../tanstack-table/makeData";
|
|
15
|
-
// import TableHeadCell from "./TableHeadCell";
|
|
16
|
-
|
|
17
11
|
const TableFooterRow = ({
|
|
18
12
|
table,
|
|
19
|
-
// columnVirtualizer,
|
|
20
13
|
headerGroup
|
|
21
|
-
// virtualPaddingLeft,
|
|
22
|
-
// virtualPaddingRight,
|
|
23
|
-
// fixedLeftColumns,
|
|
24
|
-
// fixedRightColumns,
|
|
25
|
-
// virtualColumns,
|
|
26
|
-
// columnVirtualizer
|
|
27
14
|
}) => {
|
|
28
|
-
// const virtualColumns = columnVirtualizer.getVirtualItems();
|
|
29
|
-
|
|
30
|
-
// const a = table.getVisibleFlatColumns()
|
|
31
15
|
const visibleColumns = table.getVisibleLeafColumns();
|
|
32
16
|
const {
|
|
33
17
|
onRowFooterStyles
|
|
34
18
|
} = _react.default.useContext(_useContext.TableContext);
|
|
35
19
|
const rowStyles = typeof onRowFooterStyles === 'function' ? onRowFooterStyles() : onRowFooterStyles;
|
|
36
|
-
|
|
37
|
-
// const
|
|
38
|
-
|
|
39
20
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
40
21
|
key: headerGroup.id,
|
|
41
22
|
style: {
|
|
@@ -48,11 +29,8 @@ const TableFooterRow = ({
|
|
|
48
29
|
className: "ui-rc-grid-footer-row"
|
|
49
30
|
}, visibleColumns.map(header => {
|
|
50
31
|
return /*#__PURE__*/_react.default.createElement(_TableFooterCell.default, {
|
|
51
|
-
key: header.id
|
|
52
|
-
// header={header as any}
|
|
53
|
-
,
|
|
32
|
+
key: header.id,
|
|
54
33
|
column: header
|
|
55
|
-
// columnVirtualizer={columnVirtualizer}
|
|
56
34
|
});
|
|
57
35
|
}));
|
|
58
36
|
};
|
|
@@ -11,27 +11,9 @@ var _TableHeadCell = _interopRequireDefault(require("./TableHeadCell2"));
|
|
|
11
11
|
var _TableHeadGroupCell = _interopRequireDefault(require("./TableHeadGroupCell"));
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
// import TableHeadRow from './TableHeadRow'
|
|
15
|
-
|
|
16
|
-
// import { getCommonPinningStyles } from '../hook/utils'
|
|
17
|
-
|
|
18
|
-
// const getVisibleChildCount = <T,>(column: Column<T>): number => {
|
|
19
|
-
// if (!column.columns?.length) return 0;
|
|
20
|
-
|
|
21
|
-
// return column.columns.reduce((count: number, col: Column<T>) => {
|
|
22
|
-
// const selfCount = col.getIsVisible() ? 1 : 0;
|
|
23
|
-
// const childrenCount = getVisibleChildCount(col);
|
|
24
|
-
// return count + selfCount + (childrenCount ? childrenCount - 1 : childrenCount);
|
|
25
|
-
// }, 0);
|
|
26
|
-
// }
|
|
27
|
-
|
|
28
14
|
const TableHead = ({
|
|
29
15
|
columnVirtualizer,
|
|
30
16
|
table
|
|
31
|
-
// virtualPaddingLeft,
|
|
32
|
-
// virtualPaddingRight,
|
|
33
|
-
// fixedLeftColumns,
|
|
34
|
-
// fixedRightColumns
|
|
35
17
|
}) => {
|
|
36
18
|
const {
|
|
37
19
|
prefix,
|
|
@@ -39,7 +21,6 @@ const TableHead = ({
|
|
|
39
21
|
} = (0, _react.useContext)(_useContext.TableContext);
|
|
40
22
|
const headerGroups = table.getFlatHeaders();
|
|
41
23
|
const leafColumns = table.getVisibleFlatColumns();
|
|
42
|
-
// const leafColumns11 = table.getIsAllColumnsVisible();
|
|
43
24
|
const headerDepth = table.getHeaderGroups().length;
|
|
44
25
|
const rowStyles = typeof onRowHeaderStyles === 'function' ? onRowHeaderStyles() : onRowHeaderStyles;
|
|
45
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -50,8 +31,6 @@ const TableHead = ({
|
|
|
50
31
|
position: 'sticky',
|
|
51
32
|
top: 0,
|
|
52
33
|
zIndex: 1,
|
|
53
|
-
// gridTemplateRows: `repeat(${table.getHeaderGroups().length}, auto)`,
|
|
54
|
-
// gridTemplateColumns: `repeat(${table.getVisibleLeafColumns().length}, 1fr)`,
|
|
55
34
|
gridTemplateColumns: `${table.getVisibleLeafColumns().map(n => `${n.getSize()}fr`).join(" ")}`
|
|
56
35
|
}
|
|
57
36
|
}, leafColumns.map(column => {
|
|
@@ -39,7 +39,8 @@ const TableHeadCell2 = props => {
|
|
|
39
39
|
setIsSelectionChange,
|
|
40
40
|
id,
|
|
41
41
|
locale,
|
|
42
|
-
format
|
|
42
|
+
format,
|
|
43
|
+
dataSourceFilter
|
|
43
44
|
} = (0, _react.useContext)(_useContext.TableContext);
|
|
44
45
|
const isPinned = column.getIsPinned();
|
|
45
46
|
const isLastLeftPinnedColumn = isPinned === 'left' && column.getIsLastColumn('left');
|
|
@@ -165,7 +166,8 @@ const TableHeadCell2 = props => {
|
|
|
165
166
|
selectedKeys,
|
|
166
167
|
setSelectedKeys,
|
|
167
168
|
doFilter,
|
|
168
|
-
format
|
|
169
|
+
format,
|
|
170
|
+
dataSourceFilter
|
|
169
171
|
|
|
170
172
|
// selectedKeys: (column.getFilterValue() ?? []) as string[],
|
|
171
173
|
// setSelectedKeys: column.setFilterValue,
|
|
@@ -18,25 +18,17 @@ const TableHeadGroupCell = props => {
|
|
|
18
18
|
const {
|
|
19
19
|
column,
|
|
20
20
|
header,
|
|
21
|
-
// getPopupContainer,
|
|
22
21
|
table,
|
|
23
22
|
depth,
|
|
24
|
-
// t,
|
|
25
|
-
// columnVirtualizer,
|
|
26
|
-
// rowHeaderVirtualizer,
|
|
27
23
|
colSpan,
|
|
28
24
|
rowSpan
|
|
29
25
|
} = props;
|
|
30
26
|
const {
|
|
31
|
-
// t,
|
|
32
27
|
prefix,
|
|
33
|
-
// setSorterChange,
|
|
34
|
-
// setFilterChange,
|
|
35
28
|
wrapSettings,
|
|
36
29
|
selectionSettings,
|
|
37
30
|
setIsSelectionChange,
|
|
38
31
|
id
|
|
39
|
-
// locale
|
|
40
32
|
} = (0, _react.useContext)(_useContext.TableContext);
|
|
41
33
|
const isPinned = column.getIsPinned();
|
|
42
34
|
const isLastLeftPinnedColumn = isPinned === 'left' && column.getIsLastColumn('left');
|
|
@@ -46,14 +38,6 @@ const TableHeadGroupCell = props => {
|
|
|
46
38
|
const cellContent = (0, _reactTable.flexRender)(column.columnDef.header, header.getContext());
|
|
47
39
|
const html = _server.default.renderToStaticMarkup( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, cellContent));
|
|
48
40
|
const hasValue = html.trim().length > 0;
|
|
49
|
-
|
|
50
|
-
// const filtered = column.getIsFiltered()
|
|
51
|
-
|
|
52
|
-
// const { attributes, isDragging, listeners, setNodeRef, transform } =
|
|
53
|
-
// useSortable({
|
|
54
|
-
// id: column.id,
|
|
55
|
-
// })
|
|
56
|
-
|
|
57
41
|
const style = {
|
|
58
42
|
transition: 'width transform 0.2s ease-in-out',
|
|
59
43
|
whiteSpace: 'nowrap',
|
|
@@ -113,13 +97,6 @@ const TableHeadGroupCell = props => {
|
|
|
113
97
|
onDoubleClick: () => column.resetSize(),
|
|
114
98
|
onMouseDown: header.getResizeHandler(),
|
|
115
99
|
onTouchStart: header.getResizeHandler(),
|
|
116
|
-
// onMouseUp: () => {
|
|
117
|
-
// requestAnimationFrame(() => {
|
|
118
|
-
// columnVirtualizer.measure()
|
|
119
|
-
// // rowHeaderVirtualizer.measure()
|
|
120
|
-
// })
|
|
121
|
-
// },
|
|
122
|
-
|
|
123
100
|
className: `resizer ${column.getIsResizing() ? 'isResizing' : ''}`
|
|
124
101
|
}));
|
|
125
102
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ColumnDef } from "@tanstack/react-table";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import type { IFormat } from "
|
|
3
|
+
import type { IFormat } from "../../grid-component/type";
|
|
4
4
|
type RenderFilterProps<RecordType> = {
|
|
5
5
|
column: ColumnDef<RecordType, unknown>;
|
|
6
6
|
selectedKeys: any[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Dispatch, SetStateAction } from "react";
|
|
2
|
-
import type { ColumnsTable, ColumnTable, IFormat, SelectionSettings } from '
|
|
2
|
+
import type { ColumnsTable, ColumnTable, IFormat, SelectionSettings } from '../../grid-component/type';
|
|
3
3
|
import type { Cell, ColumnDef } from '@tanstack/react-table';
|
|
4
4
|
export declare const renderValueCell: <T>(column: ColumnTable<T>, value: any, record: T, rowIndex: number, colIndex: number, format?: IFormat, editAble?: boolean) => any;
|
|
5
5
|
export declare function convertToTanStackColumns<T>({ t, columns, format, editAble }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Table } from '@tanstack/react-table';
|
|
2
|
-
import type { FilterOperator } from '
|
|
1
|
+
import type { Table } from '@tanstack/react-table';
|
|
2
|
+
import type { FilterOperator } from '../../grid-component/type';
|
|
3
3
|
export declare function useFilterOperator(table: Table<any>): {
|
|
4
4
|
setFilterOperator: (columnId: string, operator: FilterOperator) => void;
|
|
5
5
|
getFilterOperator: (columnId: string) => FilterOperator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Row, Table } from "@tanstack/react-table";
|
|
2
2
|
import { type Column } from "@tanstack/react-table";
|
|
3
3
|
import type { VirtualItem } from "@tanstack/react-virtual";
|
|
4
|
-
import type { AnyObject, ColumnsTable, ColumnTable, EditType, FilterOperator, IColumnType, IFormat, RangeState, Sorter, TypeFilter } from "
|
|
4
|
+
import type { AnyObject, ColumnsTable, ColumnTable, EditType, FilterOperator, IColumnType, IFormat, RangeState, Sorter, TypeFilter } from "./../../grid-component/type";
|
|
5
5
|
import type { Key } from "react";
|
|
6
6
|
import { type CSSProperties } from "react";
|
|
7
7
|
import dayjs from "dayjs";
|
|
@@ -68,10 +68,6 @@ var _uuid = require("uuid");
|
|
|
68
68
|
var _colors = require("@ant-design/colors");
|
|
69
69
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
70
70
|
var _moment = _interopRequireDefault(require("moment"));
|
|
71
|
-
// import { SELECTION_COLUMN } from "rc-master-ui/es/table/hooks/useSelection"
|
|
72
|
-
|
|
73
|
-
// import moment from "moment/moment"
|
|
74
|
-
|
|
75
71
|
const newGuid = () => {
|
|
76
72
|
for (let i = 0; i < 20; i++) {
|
|
77
73
|
// @ts-ignore
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import InternalTable from './InternalTable';
|
|
2
|
-
import type { ColumnsTable, TableProps, ColumnTable, ContextMenuItem } from '
|
|
2
|
+
import type { ColumnsTable, TableProps, ColumnTable, ContextMenuItem } from './../grid-component/type';
|
|
3
3
|
export type { ColumnsTable, TableProps, ColumnTable, ContextMenuItem };
|
|
4
4
|
export default InternalTable;
|
|
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _InternalTable = _interopRequireDefault(require("./InternalTable"));
|
|
9
|
-
// import type {ToolbarItem} from "rc-master-ui/es/toolbar"
|
|
10
9
|
var _default = exports.default = _InternalTable.default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ColumnDef, ColumnPinningState, ExpandedState, VisibilityState } from '@tanstack/react-table';
|
|
2
|
-
import type { ColumnsTable, Sorter, TableProps } from '
|
|
2
|
+
import type { ColumnsTable, Sorter, TableProps } from '../../grid-component/type';
|
|
3
3
|
import type { Dispatch, Key, SetStateAction } from 'react';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
type Props<T> = Omit<TableProps<T>, 'columns'> & {
|
|
@@ -23,10 +23,6 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
23
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
24
|
// import { makeData } from "../default/makeData";
|
|
25
25
|
|
|
26
|
-
// import { flattenArray, getFixedFields, getInvisibleColumns, unFlattenData, updateOrInsert } from './hook/utils'
|
|
27
|
-
|
|
28
|
-
// import { faker } from '@faker-js/faker'
|
|
29
|
-
|
|
30
26
|
const Grid = props => {
|
|
31
27
|
const {
|
|
32
28
|
theme,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Table } from "@tanstack/react-table";
|
|
2
|
-
import type { CommandClick, ContextInfo, ContextMenuItem, PaginationConfig } from "
|
|
2
|
+
import type { CommandClick, ContextInfo, ContextMenuItem, PaginationConfig } from "../../grid-component/type";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import type { Virtualizer } from "@tanstack/react-virtual";
|
|
5
5
|
import type { Column } from "@tanstack/react-table";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import type { ColumnTable, ExpandableConfig, IFormat, IWrapSettings, Locale, PaginationConfig, RangeState, RecordDoubleClickEventArgs, RowClassName, SelectionSettings } from "
|
|
2
|
+
import type { ColumnTable, ExpandableConfig, IFormat, IWrapSettings, Locale, PaginationConfig, RangeState, RecordDoubleClickEventArgs, RowClassName, SelectionSettings, SourceFilter } from "./../grid-component/type";
|
|
3
3
|
import type { SubmitHandler } from "react-hook-form";
|
|
4
4
|
import type { ExpandedState, Row, Table } from '@tanstack/react-table';
|
|
5
5
|
export type IPositionCell = {
|
|
@@ -82,6 +82,7 @@ export interface IContext<T> {
|
|
|
82
82
|
onRowStyles?: Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'> | ((data: T, row: Row<T>) => Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'>);
|
|
83
83
|
onRowHeaderStyles?: Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'> | (() => Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'>);
|
|
84
84
|
onRowFooterStyles?: Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'> | (() => Omit<React.CSSProperties, 'display' | 'transform' | 'gridTemplateColumns' | 'height' | 'minHeight'>);
|
|
85
|
+
dataSourceFilter?: SourceFilter[];
|
|
85
86
|
}
|
|
86
87
|
export declare const TableContext: import("react").Context<IContext<any>>;
|
|
87
88
|
export type ContextCellChange = {
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import 'react-resizable/css/styles.css';
|
|
3
3
|
import 'dayjs/locale/es';
|
|
4
4
|
import 'dayjs/locale/vi';
|
|
5
|
-
import type { TableProps } from '../
|
|
5
|
+
import type { TableProps } from '../grid-component/type';
|
|
6
6
|
export declare const SELECTION_COLUMN: {};
|
|
7
7
|
declare const InternalTable: <RecordType extends object>(props: TableProps<RecordType>) => React.JSX.Element;
|
|
8
8
|
export default InternalTable;
|
|
@@ -16,13 +16,15 @@ var _faker = require("@faker-js/faker");
|
|
|
16
16
|
var _useMergedState = _interopRequireDefault(require("rc-util/lib/hooks/useMergedState"));
|
|
17
17
|
var _reactTable = require("@tanstack/react-table");
|
|
18
18
|
var _utils = require("./hook/utils");
|
|
19
|
-
var _useColumns = require("./hook/useColumns");
|
|
20
19
|
var _hooks = require("../grid-component/hooks");
|
|
21
20
|
var _Grid = _interopRequireDefault(require("./table/Grid"));
|
|
22
21
|
var _utils2 = require("../table-component/hook/utils");
|
|
23
22
|
var _operator = require("../table-component/features/operator");
|
|
23
|
+
var _useColumns = require("../table-component/hook/useColumns");
|
|
24
24
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
25
25
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
|
+
// import { convertToTanStackColumns } from './hook/useColumns'
|
|
27
|
+
|
|
26
28
|
_dayjs.default.extend(_customParseFormat.default);
|
|
27
29
|
const SELECTION_COLUMN = exports.SELECTION_COLUMN = {};
|
|
28
30
|
const InternalTable = props => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Cell, Table } from "@tanstack/react-table";
|
|
2
|
-
import type { CommandClick } from "../../
|
|
2
|
+
import type { CommandClick } from "../../grid-component/type";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import type { VirtualItem } from "@tanstack/react-virtual";
|
|
5
5
|
interface TableBodyCellProps<T> {
|
|
@@ -13,8 +13,8 @@ var _Checkbox = _interopRequireDefault(require("rc-master-ui/lib/checkbox/Checkb
|
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
var _useContext = require("../useContext");
|
|
16
|
-
var _useColumns = require("../hook/useColumns");
|
|
17
16
|
var _Command = _interopRequireDefault(require("../../table-component/components/command/Command"));
|
|
17
|
+
var _useColumns = require("../../table-component/hook/useColumns");
|
|
18
18
|
const renderCellIndex = props => {
|
|
19
19
|
const {
|
|
20
20
|
cell,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Row, type Table } from "@tanstack/react-table";
|
|
2
|
-
import type { CommandClick } from "../../
|
|
2
|
+
import type { CommandClick } from "../../grid-component/type";
|
|
3
3
|
import React from "react";
|
|
4
4
|
interface TableBodyRowProps<T> {
|
|
5
5
|
tableId: string;
|
|
@@ -9,5 +9,5 @@ interface TableBodyRowProps<T> {
|
|
|
9
9
|
editAble?: boolean;
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
}
|
|
12
|
-
declare const TableBodyRow: <RecordType extends object>({ tableId, table, row, virtualRow, commandClick, contextMenuItems, onContextMenu, ...rest }: TableBodyRowProps<RecordType>) => React.JSX.Element;
|
|
12
|
+
declare const TableBodyRow: <RecordType extends object>({ tableId, table, row, virtualRow, commandClick, contextMenuItems, onContextMenu, rowheight, ...rest }: TableBodyRowProps<RecordType>) => React.JSX.Element;
|
|
13
13
|
export default TableBodyRow;
|
|
@@ -19,6 +19,7 @@ const TableBodyRow = ({
|
|
|
19
19
|
commandClick,
|
|
20
20
|
contextMenuItems,
|
|
21
21
|
onContextMenu,
|
|
22
|
+
rowheight,
|
|
22
23
|
...rest
|
|
23
24
|
}) => {
|
|
24
25
|
const {
|
|
@@ -43,7 +44,8 @@ const TableBodyRow = ({
|
|
|
43
44
|
[`${prefix}-grid-row-parent`]: row.subRows && row.subRows.length > 0
|
|
44
45
|
}),
|
|
45
46
|
style: {
|
|
46
|
-
...rowStyles
|
|
47
|
+
...rowStyles,
|
|
48
|
+
height: rowheight
|
|
47
49
|
},
|
|
48
50
|
onDoubleClick: e => {
|
|
49
51
|
recordDoubleClick?.({
|