es-grid-template 1.9.52 → 1.9.55

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.
Files changed (122) hide show
  1. package/es/ali-table/Grid.d.ts +1 -0
  2. package/es/ali-table/Grid.js +12 -4
  3. package/es/ali-table/InternalTable.js +39 -7
  4. package/es/ali-table/base-table/html-table-default.d.ts +20 -0
  5. package/es/ali-table/base-table/html-table-default.js +224 -0
  6. package/es/ali-table/base-table/html-table-new.d.ts +20 -0
  7. package/es/ali-table/base-table/html-table-new.js +417 -0
  8. package/es/ali-table/base-table/html-table.js +324 -182
  9. package/es/ali-table/base-table/styles.d.ts +1 -0
  10. package/es/ali-table/base-table/styles.js +5 -4
  11. package/es/ali-table/base-table/table.d.ts +4 -0
  12. package/es/ali-table/base-table/table.js +24 -5
  13. package/es/ali-table/common-views.d.ts +1 -1
  14. package/es/ali-table/pipeline/features/columnCustom.js +3 -3
  15. package/es/ali-table/pipeline/features/pagination.js +1 -1
  16. package/es/ali-table/utils/convertColumnsChoose.d.ts +2 -2
  17. package/es/grid-component/control/InputControl/InputControl.js +2 -3
  18. package/es/grid-component/hooks/calender.d.ts +19 -0
  19. package/es/grid-component/hooks/calender.js +32 -0
  20. package/es/grid-component/type.d.ts +15 -2
  21. package/es/group-component/ColumnsChoose.js +1 -2
  22. package/es/group-component/ColumnsGroup/ColumnsGroup.js +1 -2
  23. package/es/group-component/TableContainerEdit.js +1 -2
  24. package/es/group-component/body/EditableCell.js +7 -6
  25. package/es/group-component/components/EditForm/EditForm.js +1 -2
  26. package/es/group-component/components/InputControl/InputControl.js +1 -2
  27. package/es/group-component/components/checkbox-filter/CheckboxFilter.js +1 -2
  28. package/es/group-component/components/checkbox-filter/FilterSearch.d.ts +1 -1
  29. package/es/group-component/components/checkbox-filter/FilterSearch.js +0 -3
  30. package/es/group-component/header/TableHeadCell.js +1 -2
  31. package/es/group-component/header/TableHeadCell2.js +1 -2
  32. package/es/group-component/hook/utils.d.ts +9 -9
  33. package/es/group-component/table/Grid.js +1 -1
  34. package/es/index.d.ts +2 -2
  35. package/es/index.js +1 -1
  36. package/es/table-component/ColumnsChoose.js +1 -1
  37. package/es/table-component/ColumnsConfig.d.ts +17 -0
  38. package/es/table-component/ColumnsConfig.js +302 -0
  39. package/es/table-component/ContextMenu.js +1 -1
  40. package/es/table-component/InternalTable.js +30 -9
  41. package/es/table-component/TableContainer.js +4 -2
  42. package/es/table-component/TableContainerEdit.js +3 -3
  43. package/es/table-component/body/EditableCell.js +9 -5
  44. package/es/table-component/body/TableBodyRow.js +0 -5
  45. package/es/table-component/components/EditForm/EditForm.js +1 -4
  46. package/es/table-component/components/InputControl/InputControl.js +1 -1
  47. package/es/table-component/components/checkbox-filter/CheckboxFilter.js +1 -2
  48. package/es/table-component/components/checkbox-filter/FilterSearch.d.ts +1 -1
  49. package/es/table-component/components/checkbox-filter/FilterSearch.js +4 -2
  50. package/es/table-component/header/TableHeadCell.js +1 -1
  51. package/es/table-component/header/TableHeadCell2.js +1 -1
  52. package/es/table-component/header/TableHeadRow.js +6 -6
  53. package/es/table-component/hook/useColumns.js +0 -1
  54. package/es/table-component/hook/utils.d.ts +3 -3
  55. package/es/table-component/hook/utils.js +35 -6
  56. package/es/table-component/style.js +1 -1
  57. package/es/table-component/table/Grid.js +2 -1
  58. package/es/table-virtuoso/InternalTable.js +2 -0
  59. package/es/table-virtuoso/body/TableBodyCell.js +11 -6
  60. package/lib/ali-table/Grid.d.ts +1 -0
  61. package/lib/ali-table/Grid.js +12 -4
  62. package/lib/ali-table/InternalTable.js +39 -7
  63. package/lib/ali-table/base-table/html-table-default.d.ts +20 -0
  64. package/lib/ali-table/base-table/html-table-default.js +231 -0
  65. package/lib/ali-table/base-table/html-table-new.d.ts +20 -0
  66. package/lib/ali-table/base-table/html-table-new.js +424 -0
  67. package/lib/ali-table/base-table/html-table.js +324 -182
  68. package/lib/ali-table/base-table/styles.d.ts +1 -0
  69. package/lib/ali-table/base-table/styles.js +5 -4
  70. package/lib/ali-table/base-table/table.d.ts +4 -0
  71. package/lib/ali-table/base-table/table.js +24 -5
  72. package/lib/ali-table/pipeline/features/columnCustom.js +4 -4
  73. package/lib/ali-table/pipeline/features/pagination.js +1 -1
  74. package/lib/ali-table/utils/convertColumnsChoose.d.ts +2 -2
  75. package/lib/grid-component/control/InputControl/InputControl.js +4 -6
  76. package/lib/grid-component/hooks/calender.d.ts +19 -0
  77. package/lib/grid-component/hooks/calender.js +40 -0
  78. package/lib/grid-component/type.d.ts +15 -2
  79. package/lib/group-component/ColumnsChoose.js +6 -7
  80. package/lib/group-component/ColumnsGroup/ColumnsGroup.js +3 -4
  81. package/lib/group-component/TableContainerEdit.js +2 -3
  82. package/lib/group-component/body/EditableCell.js +14 -13
  83. package/lib/group-component/components/EditForm/EditForm.js +1 -2
  84. package/lib/group-component/components/InputControl/InputControl.js +4 -6
  85. package/lib/group-component/components/checkbox-filter/CheckboxFilter.js +1 -2
  86. package/lib/group-component/components/checkbox-filter/FilterSearch.d.ts +1 -1
  87. package/lib/group-component/components/checkbox-filter/FilterSearch.js +0 -2
  88. package/lib/group-component/header/TableHeadCell.js +3 -4
  89. package/lib/group-component/header/TableHeadCell2.js +3 -4
  90. package/lib/group-component/hook/utils.d.ts +1 -1
  91. package/lib/group-component/table/Grid.js +2 -2
  92. package/lib/index.d.ts +2 -2
  93. package/lib/index.js +2 -2
  94. package/lib/table-component/ColumnsChoose.js +5 -5
  95. package/lib/table-component/ColumnsConfig.d.ts +17 -0
  96. package/lib/table-component/ColumnsConfig.js +312 -0
  97. package/lib/table-component/ContextMenu.js +3 -3
  98. package/lib/table-component/InternalTable.js +25 -8
  99. package/lib/table-component/TableContainer.js +4 -2
  100. package/lib/table-component/TableContainerEdit.js +5 -6
  101. package/lib/table-component/body/EditableCell.js +18 -15
  102. package/lib/table-component/body/TableBodyRow.js +0 -5
  103. package/lib/table-component/components/EditForm/EditForm.js +3 -6
  104. package/lib/table-component/components/InputControl/InputControl.js +1 -2
  105. package/lib/table-component/components/checkbox-filter/CheckboxFilter.js +1 -2
  106. package/lib/table-component/components/checkbox-filter/FilterSearch.d.ts +1 -1
  107. package/lib/table-component/components/checkbox-filter/FilterSearch.js +5 -2
  108. package/lib/table-component/header/TableHeadCell.js +4 -5
  109. package/lib/table-component/header/TableHeadCell2.js +2 -3
  110. package/lib/table-component/header/TableHeadRow.js +6 -6
  111. package/lib/table-component/hook/useColumns.js +0 -1
  112. package/lib/table-component/hook/utils.d.ts +3 -3
  113. package/lib/table-component/hook/utils.js +35 -6
  114. package/lib/table-component/style.js +1 -1
  115. package/lib/table-component/table/Grid.js +3 -2
  116. package/lib/table-virtuoso/InternalTable.js +2 -0
  117. package/lib/table-virtuoso/body/TableBodyCell.js +10 -5
  118. package/package.json +2 -2
  119. /package/es/{datepicker → datePicker}/index.d.ts +0 -0
  120. /package/es/{datepicker → datePicker}/index.js +0 -0
  121. /package/lib/{datepicker → datePicker}/index.d.ts +0 -0
  122. /package/lib/{datepicker → datePicker}/index.js +0 -0
@@ -14,6 +14,7 @@ import { Classes, LOCK_SHADOW_PADDING, StyledArtTableWrapper } from "./styles";
14
14
  import {
15
15
  // getScrollbarSize, // scroll mặc định thì bật lên
16
16
  OVERSCAN_SIZE, shallowEqual, STYLED_REF_PROP, sum, syncScrollLeft, throttledWindowResize$ } from "./utils";
17
+ import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
17
18
  let emptyContentDeprecatedWarned = false;
18
19
  function warnEmptyContentIsDeprecated() {
19
20
  if (!emptyContentDeprecatedWarned) {
@@ -193,7 +194,8 @@ export class BaseTable extends React.Component {
193
194
  components,
194
195
  id,
195
196
  commandClick,
196
- format
197
+ format,
198
+ dataRowIds
197
199
  } = this.props;
198
200
  const tableBodyClassName = cx(Classes.tableBody, Classes.horizontalScrollContainer, {
199
201
  'no-scrollbar': footerDataSource && footerDataSource.length > 0
@@ -231,7 +233,10 @@ export class BaseTable extends React.Component {
231
233
  style: {
232
234
  height: topBlank
233
235
  }
234
- }), /*#__PURE__*/React.createElement(HtmlTable, {
236
+ }), /*#__PURE__*/React.createElement(SortableContext, {
237
+ items: dataRowIds ?? [],
238
+ strategy: verticalListSortingStrategy
239
+ }, /*#__PURE__*/React.createElement(HtmlTable, {
235
240
  id: id ?? '',
236
241
  commandClick: commandClick,
237
242
  components: components,
@@ -251,7 +256,7 @@ export class BaseTable extends React.Component {
251
256
  limit: bottomIndex,
252
257
  last: dataSource.length - 1
253
258
  }
254
- }), bottomBlank > 0 && /*#__PURE__*/React.createElement("div", {
259
+ })), bottomBlank > 0 && /*#__PURE__*/React.createElement("div", {
255
260
  key: "bottom-blank",
256
261
  className: cx(Classes.virtualBlank, 'bottom'),
257
262
  style: {
@@ -348,7 +353,9 @@ export class BaseTable extends React.Component {
348
353
  isStickyFooter,
349
354
  isLoading,
350
355
  footerDataSource,
351
- components
356
+ components,
357
+ isBottom,
358
+ isTitle
352
359
  } = this.props;
353
360
  const artTableWrapperClassName = cx(Classes.tableWrapper, {
354
361
  'use-outer-border': useOuterBorder,
@@ -358,7 +365,9 @@ export class BaseTable extends React.Component {
358
365
  'theme-dark': theme?.theme === 'dark',
359
366
  'sticky-header': isStickyHeader,
360
367
  'has-footer': footerDataSource && footerDataSource.length > 0,
361
- 'sticky-footer': isStickyFooter
368
+ 'sticky-footer': isStickyFooter,
369
+ 'has-bottom': isBottom,
370
+ 'has-title': isTitle
362
371
  }, className);
363
372
  const artTableWrapperProps = {
364
373
  className: artTableWrapperClassName,
@@ -390,6 +399,15 @@ export class BaseTable extends React.Component {
390
399
  this.adjustNeedRenderLock();
391
400
  this.updateRowHeightManager();
392
401
  this.updateScrollLeftWhenLayoutChanged(prevProps, prevState);
402
+ this.updateVerticalScrollClass();
403
+ }
404
+ updateVerticalScrollClass() {
405
+ const wrapper = this.domHelper?.artTableWrapper;
406
+ if (!wrapper) {
407
+ return;
408
+ }
409
+ const hasVerticalScroll = wrapper.scrollHeight > wrapper.clientHeight + 1;
410
+ wrapper.classList.toggle('has-vertical-scroll', hasVerticalScroll);
393
411
  }
394
412
  updateScrollLeftWhenLayoutChanged(prevProps, prevState) {
395
413
  if (prevState != null) {
@@ -415,6 +433,7 @@ export class BaseTable extends React.Component {
415
433
  this.rootSubscription.add(throttledWindowResize$.subscribe(() => {
416
434
  this.updateStickyScroll();
417
435
  this.adjustNeedRenderLock();
436
+ this.updateVerticalScrollClass();
418
437
  }));
419
438
 
420
439
  // Scroll synchronization
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare const InlineFlexCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
- export declare const ExpansionCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
3
+ export declare const ExpansionCell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Pick<import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
4
4
  ref?: React.Ref<HTMLDivElement>;
5
5
  }, never>> & string;
6
6
  interface IconProps extends React.SVGProps<SVGElement> {
@@ -5,8 +5,7 @@ import Resizer from "../../base-table/ColumnResizer";
5
5
  import { ArrowDown, ArrowUp, FilterFill, SortCancel } from 'becoxy-icons';
6
6
  import { booleanOperator, findItemPath, nonActionColumn, numberOperator, pageSizeOptions, stringOperator, translateOption, updateArrayByKey } from "../../../grid-component/hooks";
7
7
  import classNames from 'classnames';
8
- import { Button } from 'antd';
9
- import { Dropdown, Select, Space } from 'rc-master-ui';
8
+ import { Dropdown, Select, Space, Button } from 'rc-master-ui';
10
9
  import { convertFilters, extendsObject, getDefaultOperator, getTypeFilter } from "../../../table-component/hook/utils";
11
10
  import { renderFilter } from "../../base-table/renderFilter";
12
11
  import { renderValueCell } from "../../../table-component/hook/useColumns";
@@ -560,7 +559,8 @@ export function columnCustom(opts) {
560
559
  [`${prefix}-grid-cell-text-right`]: col?.textAlign === 'right' || col.type === 'number'
561
560
  }),
562
561
  onMouseEnter: e => {
563
- if (e.target?.clientWidth < e.target?.scrollWidth || e.target.firstChild?.clientWidth < e.target.firstChild?.scrollWidth) {
562
+ prevCellProps?.onMouseEnter?.(e);
563
+ if (e.target?.clientWidth < e.target?.scrollWidth || e.target?.firstChild?.clientWidth < e?.target?.firstChild?.scrollWidth) {
564
564
  pipeline.setStateAtKey(stateKeyTooltip, true);
565
565
  }
566
566
  },
@@ -18,7 +18,7 @@ export function paginationFeature(opts = {}) {
18
18
  pipeline.dataSource(processDataSource(dataSource));
19
19
  return pipeline;
20
20
  function processDataSource(data) {
21
- if (pagination === false || pagination && pagination.onChange) {
21
+ if (!pagination || pagination && pagination.onChange) {
22
22
  return data;
23
23
  }
24
24
  const currentPage = pagination?.currentPage ?? pipeline.getStateAtKey(stateKey)?.currentPage ?? 1;
@@ -1,5 +1,5 @@
1
- import type { TreeDataNode } from "antd";
2
- import type { ColumnTable } from "../../grid-component";
1
+ import { TreeDataNode } from "rc-master-ui";
2
+ import { ColumnTable } from "../../grid-component";
3
3
  export declare function convertColumnsToTreeData(columns: ColumnTable[], groupColumns?: string[], t?: any): TreeDataNode[];
4
4
  export declare function filterColumnsByField(columns: ColumnTable[], fieldList: string[]): ColumnTable[];
5
5
  export declare function filterVisibleColumns(columns: ColumnTable[]): ColumnTable[];
@@ -1,11 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { Controller } from "react-hook-form";
3
- import { Input } from "rc-master-ui";
4
- import { Typography } from "antd";
3
+ import { Input, Typography } from "rc-master-ui";
5
4
  import classnames from "classnames";
6
5
  import React, { Fragment } from "react";
7
6
  import { isNullOrUndefined } from "../../hooks";
8
- import { Col, Row } from "rc-master-ui/es/grid";
7
+ import { Col, Row } from "rc-master-ui";
9
8
  // import {isNullOrUndefined} from "../../../hooks"
10
9
 
11
10
  const {
@@ -0,0 +1,19 @@
1
+ type WeekRow = {
2
+ sunday: DayCell;
3
+ monday: DayCell;
4
+ tuesday: DayCell;
5
+ wednesday: DayCell;
6
+ thursday: DayCell;
7
+ friday: DayCell;
8
+ saturday: DayCell;
9
+ };
10
+ type DayCell = {
11
+ date: Date;
12
+ day: number;
13
+ isCurrentMonth: boolean;
14
+ events?: {
15
+ title: string;
16
+ }[];
17
+ };
18
+ export declare const generateCalendarRows: (currentMonth: Date) => WeekRow[];
19
+ export {};
@@ -0,0 +1,32 @@
1
+ import dayjs from 'dayjs';
2
+ const DAYS = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
3
+ export const generateCalendarRows = currentMonth => {
4
+ const month = dayjs(currentMonth);
5
+ const firstDay = month.startOf('month');
6
+ const lastDay = month.endOf('month');
7
+
8
+ // Chủ nhật đầu tiên hiển thị
9
+ const startDate = firstDay.startOf('week');
10
+
11
+ // Thứ 7 cuối cùng hiển thị
12
+ const endDate = lastDay.endOf('week');
13
+ const rows = [];
14
+ let current = startDate;
15
+ while (current.isBefore(endDate) || current.isSame(endDate, 'day')) {
16
+ const week = {};
17
+ for (let i = 0; i < 7; i++) {
18
+ week[DAYS[i]] = {
19
+ date: current.toDate(),
20
+ day: current.date(),
21
+ isCurrentMonth: current.month() === month.month(),
22
+ events: []
23
+ };
24
+ current = current.add(1, 'day');
25
+ }
26
+ rows.push(week);
27
+ }
28
+ return rows;
29
+ };
30
+ const dataSource = generateCalendarRows(new Date(2026, 0, 1) // January 2026
31
+ );
32
+ console.log('dataSource', dataSource);
@@ -305,6 +305,12 @@ export type ColumnTable<RecordType = AnyObject> = {
305
305
  /** Column con (multi header/group column) */
306
306
  children?: ColumnTable<RecordType>[];
307
307
  };
308
+ export type RowDnd<RecordType = AnyObject> = {
309
+ enabled?: boolean;
310
+ onChange?: (args: {
311
+ rows: RecordType[];
312
+ }) => void;
313
+ };
308
314
  export type ColumnsTable<RecordType = AnyObject> = ColumnTable<RecordType>[];
309
315
  export type IFTheme = {
310
316
  theme?: 'dark' | 'light';
@@ -490,6 +496,7 @@ export type TableProps<RecordType = AnyObject> = {
490
496
  /** Virtual theo chiều dọc */
491
497
  vertical?: boolean;
492
498
  };
499
+ rowDnd?: RowDnd<RecordType>;
493
500
  /** Cho phép chỉnh sửa dữ liệu */
494
501
  editAble?: boolean;
495
502
  /** Callback khi data thay đổi */
@@ -554,7 +561,11 @@ export type CommandClick<T> = {
554
561
  rows: T[];
555
562
  };
556
563
  export type IEditSelectSettings = {
564
+ /** @deprecated This prop is deprecated and should use `fieldNames` instead */
557
565
  fieldKey?: string;
566
+ /** @deprecated This prop is deprecated and should use `fieldNames` instead */
567
+ inputKey?: string;
568
+ fieldNames?: FieldNames;
558
569
  options: any[] | ((rowData: any, field: string) => any[]);
559
570
  /** get value form other field **/
560
571
  fieldValue?: string;
@@ -562,12 +573,15 @@ export type IEditSelectSettings = {
562
573
  fieldLabel?: string;
563
574
  /** cho phép nhập giá trị - onBlur: giá trị search được set thành value **/
564
575
  searchTextAsValue?: boolean;
565
- inputKey?: string;
566
576
  filterKey?: string[];
567
577
  selectMode?: SelectMode;
568
578
  getPasteValue?: (value: any) => Record<string, any> | null;
569
579
  validateOption?: (rowData: any, field: string) => any[];
570
580
  defaultOptions?: any[];
581
+ /**
582
+ * @deprecated
583
+ * @since 1.9.25
584
+ */
571
585
  defaultValue?: (value: any, rowData: any) => {
572
586
  value: any;
573
587
  label: string;
@@ -586,7 +600,6 @@ export type IEditSelectSettings = {
586
600
  hideSelectedOptions?: boolean;
587
601
  showItems?: number;
588
602
  isLengthSelected?: boolean;
589
- fieldNames?: FieldNames;
590
603
  filterOption?: boolean | FilterFunc<any>;
591
604
  };
592
605
  export type IEditFromSettings = {
@@ -1,8 +1,7 @@
1
1
  import useMergedState from "rc-util/es/hooks/useMergedState";
2
2
  import React, { Fragment, useState } from "react";
3
3
  import styled from "styled-components";
4
- import { Button, Input, Popover } from "antd";
5
- import Tree from "rc-master-ui/es/tree";
4
+ import { Button, Input, Popover, Tree } from "rc-master-ui";
6
5
  import SearchOutlined from "@ant-design/icons/SearchOutlined";
7
6
  import { convertColumnsToTreeData, getVisibleColumnKeys1, updateColumns1 } from "./hook/utils";
8
7
  import { Settings } from "becoxy-icons";
@@ -1,7 +1,6 @@
1
1
  import { Group } from "becoxy-icons";
2
2
  import React, { useRef, useState } from "react";
3
- import { Button, Popover } from "antd";
4
- import { Select } from "rc-master-ui";
3
+ import { Select, Button, Popover } from "rc-master-ui";
5
4
  import styled from "styled-components";
6
5
  import { customFilterOption } from "../../grid-component/hooks";
7
6
  const BoxAction = styled.div.withConfig({
@@ -10,8 +10,7 @@ import Pagination from "rc-master-ui/es/pagination";
10
10
  import { numericFormatter, removeNumericFormat } from "react-numeric-component";
11
11
  import { TableContext } from "./useContext";
12
12
  import { yupResolver } from "@hookform/resolvers/yup";
13
- import { Dropdown, Toolbar } from "rc-master-ui";
14
- import { Modal, Typography } from "antd";
13
+ import { Dropdown, Toolbar, Modal, Typography } from "rc-master-ui";
15
14
  import classNames from "classnames";
16
15
  import { Collapse2, Expand2, Maximize, Minimize } from "becoxy-icons";
17
16
  // import { ColumnsChoose } from "./ColumnsChoose";
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import React, { useContext } from "react";
3
- import { DatePicker, TimePicker } from "rc-master-ui";
4
- import { ColorPicker, Divider, Input, Row, Col } from "antd";
3
+ import { DatePicker, TimePicker, ColorPicker, Divider, Input, Row, Col } from "rc-master-ui";
5
4
  import { checkDecimalSeparator, checkThousandSeparator, checkFieldKey, convertArrayWithIndent, convertDateToDayjs, convertLabelToTitle, getDatepickerFormat, isDisable, isEmpty, isNullOrUndefined, customWeekStartEndFormat, convertDayjsToDate, parseBooleanToValue, isColor, genPresets, getFormat } from "../hook/utils";
6
5
  import classNames from "classnames";
7
6
  import { NumericFormat } from "react-numeric-component";
@@ -478,8 +477,9 @@ const EditableCell = props => {
478
477
  indexRow,
479
478
  type: 'blur'
480
479
  });
481
- },
482
- autoDestroy: true,
480
+ }
481
+ // autoDestroy={true}
482
+ ,
483
483
  showSearch: true,
484
484
  mode: isMulti || selectMode === 'checkbox' ? 'multiple' : undefined,
485
485
  valueSelectAble: true,
@@ -558,8 +558,9 @@ const EditableCell = props => {
558
558
  indexRow,
559
559
  type: 'blur'
560
560
  });
561
- },
562
- autoDestroy: true,
561
+ }
562
+ // autoDestroy={true}
563
+ ,
563
564
  showSearch: true,
564
565
  defaultOpen: column.field === startCell?.colId,
565
566
  autoFocus: column.field === startCell?.colId,
@@ -4,8 +4,7 @@ import { useForm } from "react-hook-form";
4
4
  import { yupResolver } from "@hookform/resolvers/yup";
5
5
  import { Col, Row } from "rc-master-ui/es/grid";
6
6
  import { isNullOrUndefined, isObjEmpty } from "../../hook/utils";
7
- import { Input } from "rc-master-ui";
8
- import { Dropdown } from "antd";
7
+ import { Input, Dropdown } from "rc-master-ui";
9
8
  import Divider from "rc-master-ui/es/divider";
10
9
  import Button from "rc-master-ui/es/button";
11
10
  import InputControl from "../InputControl/InputControl";
@@ -1,10 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { Controller } from "react-hook-form";
3
3
  import { Input } from "rc-master-ui";
4
- import { Typography } from "antd";
5
4
  import classnames from "classnames";
6
5
  import React, { Fragment } from "react";
7
- import { Col, Row } from "rc-master-ui/es/grid";
6
+ import { Col, Row, Typography } from "rc-master-ui";
8
7
  import { isNullOrUndefined } from "../../hook/utils";
9
8
  const {
10
9
  Text
@@ -1,7 +1,6 @@
1
1
  import * as React from "react";
2
2
  import classNames from "classnames";
3
- import { Checkbox, Menu, Radio, Empty } from "rc-master-ui";
4
- import { Tree } from "antd";
3
+ import { Checkbox, Menu, Radio, Empty, Tree } from "rc-master-ui";
5
4
  import { flattenKeys } from "rc-master-ui/es/table/hooks/useFilter";
6
5
  import FilterSearch from "./FilterSearch";
7
6
  function searchValueMatched(searchValue, text) {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { FilterSearchType, TableLocale } from "antd/es/table/interface";
2
+ import type { FilterSearchType, TableLocale } from "rc-master-ui/es/table/interface";
3
3
  import type { AnyObject } from '../../../grid-component/type';
4
4
  interface FilterSearchProps<RecordType = AnyObject> {
5
5
  value: string;
@@ -1,9 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import SearchOutlined from '@ant-design/icons/SearchOutlined';
3
3
  import { Input } from 'rc-master-ui';
4
-
5
- // import type {AnyObject} from "./../grid-component/type"
6
-
7
4
  const FilterSearch = props => {
8
5
  const {
9
6
  value,
@@ -1,8 +1,7 @@
1
1
  import React, { useContext } from 'react';
2
- import { Button, Space } from 'antd';
3
2
  import { ArrowDown, ArrowUp, FilterFill, SortCancel } from 'becoxy-icons';
4
3
  import classNames from 'classnames';
5
- import { Checkbox, Dropdown, Select } from 'rc-master-ui';
4
+ import { Checkbox, Dropdown, Select, Button, Space } from 'rc-master-ui';
6
5
  import { booleanOperator, nonActionColumn, numberOperator, stringOperator, translateOption } from "../../grid-component/hooks";
7
6
  import { extendsObject, getCommonPinningStyles, getDefaultOperator, getTypeFilter } from "../hook/utils";
8
7
  import { TableContext } from "../useContext";
@@ -1,8 +1,7 @@
1
1
  import React, { useContext } from 'react';
2
- import { Button, Space } from 'antd';
3
2
  import { ArrowDown, ArrowUp, FilterFill, SortCancel } from 'becoxy-icons';
4
3
  import classNames from 'classnames';
5
- import { Checkbox, Dropdown, Select } from 'rc-master-ui';
4
+ import { Checkbox, Dropdown, Select, Button, Space } from 'rc-master-ui';
6
5
  import { excludeItems, extendsObject, getCommonPinningStyles, getDefaultOperator, getTypeFilter, removeDuplicatesByKey } from "../hook/utils";
7
6
  import { TableContext } from "../useContext";
8
7
  import { renderFilter } from "./renderFilter";
@@ -7,7 +7,7 @@ import type { CSSProperties } from "react";
7
7
  import dayjs from "dayjs";
8
8
  import type { IPositionCell } from "../useContext";
9
9
  import type { ColumnDef } from "@tanstack/react-table";
10
- import type { TreeDataNode } from "antd";
10
+ import type { TreeDataNode } from "rc-master-ui";
11
11
  export declare const newGuid: () => any;
12
12
  export declare const convertDayjsToDate: (dateString: string, format?: string) => Date;
13
13
  export declare const convertDateToDayjs: (date: Date | undefined, format?: string) => dayjs.Dayjs;
@@ -166,7 +166,7 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
166
166
  haveSum?: boolean;
167
167
  isSummary?: boolean;
168
168
  sumGroup?: boolean;
169
- summaryTemplate?: (data: number, key: string) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
169
+ summaryTemplate?: (data: number, key: string) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode;
170
170
  sorter?: boolean;
171
171
  allowFiltering?: boolean;
172
172
  allowSortering?: boolean;
@@ -178,26 +178,26 @@ export declare const fixColumnsLeft: <RecordType>(columns: ColumnTable<RecordTyp
178
178
  showFilterSearch?: boolean;
179
179
  hidden?: boolean;
180
180
  visible?: boolean;
181
- headerTooltip?: string | boolean | (() => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
181
+ headerTooltip?: string | boolean | (() => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
182
182
  columnGroupText?: string;
183
183
  headerTextAlign?: import("./../../grid-component/type").ITextAlign;
184
- headerTemplate?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((column: ColumnTable<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
184
+ headerTemplate?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode | ((column: ColumnTable<RecordType>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
185
185
  fixedType?: import("./../../grid-component/type").FixedType;
186
186
  headerTextWrap?: boolean;
187
187
  ellipsis?: boolean;
188
188
  allowResizing?: boolean;
189
189
  align?: import("./../../grid-component/type").ITextAlign;
190
190
  textAlign?: import("./../../grid-component/type").ITextAlign;
191
- template?: import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((args: import("./../../grid-component/type").ColumnTemplate<RecordType>) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
191
+ template?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode | ((args: import("./../../grid-component/type").ColumnTemplate<RecordType>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
192
192
  showTooltip?: boolean;
193
193
  tooltipDescription?: string | ((args: {
194
194
  value: any;
195
195
  rowData: RecordType;
196
- }) => import("react").ReactNode | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>);
197
- onCellStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
198
- onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
196
+ }) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactNode);
197
+ onCellStyles?: Omit<CSSProperties, "left" | "right" | "minWidth" | "position" | "display" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Cell<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "minWidth" | "position" | "display" | "width">);
198
+ onCellHeaderStyles?: Omit<CSSProperties, "left" | "right" | "minWidth" | "position" | "display" | "width"> | ((cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "minWidth" | "position" | "display" | "width">);
199
199
  onCell?: (rowData: RecordType, index: number) => import("react").TdHTMLAttributes<HTMLTableCellElement>;
200
- onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "display" | "width" | "minWidth" | "position">);
200
+ onCellFooterStyles?: Omit<CSSProperties, "left" | "right" | "minWidth" | "position" | "display" | "width"> | ((cellValue: any, cell: import("@tanstack/react-table").Header<RecordType, unknown>) => Omit<CSSProperties, "left" | "right" | "minWidth" | "position" | "display" | "width">);
201
201
  getValue?: (row: any, rowIndex: number) => any;
202
202
  getCellProps?: (value: any, row: any, rowIndex: number) => import("./../../grid-component/type").CellProps;
203
203
  headerCellProps?: import("./../../grid-component/type").CellProps;
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { Modal } from 'antd';
2
+ import { Modal } from 'rc-master-ui';
3
3
  import { faker } from '@faker-js/faker';
4
4
  import { getCoreRowModel, getExpandedRowModel,
5
5
  // getFilteredRowModel,
package/es/index.d.ts CHANGED
@@ -10,8 +10,8 @@ export { default as Select } from './select';
10
10
  export type { SelectProps } from './select';
11
11
  export { default as DateRangePicker } from './date-range-picker';
12
12
  export type { DateRangePickerProps } from './date-range-picker';
13
- export { default as DatePicker } from './datepicker';
14
- export type { DatePickerType, DatePickerProps } from './datepicker';
13
+ export { default as DatePicker } from './datePicker';
14
+ export type { DatePickerType, DatePickerProps } from './datePicker';
15
15
  export { default as Splitter } from './splitter';
16
16
  export type { SplitterProps } from './splitter';
17
17
  export { default as Collapse } from './collapse';
package/es/index.js CHANGED
@@ -4,7 +4,7 @@ export { default as Tabs } from "./tabs";
4
4
  export { default as SelectTable } from "./select-table";
5
5
  export { default as Select } from "./select";
6
6
  export { default as DateRangePicker } from "./date-range-picker";
7
- export { default as DatePicker } from "./datepicker";
7
+ export { default as DatePicker } from "./datePicker";
8
8
  export { default as Splitter } from "./splitter";
9
9
  export { default as Collapse } from "./collapse";
10
10
  export { default as TableComponent } from "./ali-table";
@@ -1,7 +1,7 @@
1
1
  import useMergedState from "rc-util/es/hooks/useMergedState";
2
2
  import React, { Fragment, useState } from "react";
3
3
  import styled from "styled-components";
4
- import { Button, Input, Popover } from "antd";
4
+ import { Button, Input, Popover } from "rc-master-ui";
5
5
  import Tree from "rc-master-ui/es/tree";
6
6
  import SearchOutlined from "@ant-design/icons/SearchOutlined";
7
7
  import { convertColumnsToTreeData, updateColumns1 } from "./hook/utils";
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import type { ColumnsTable, ColumnTable, GridTableLocale, Locale } from "../grid-component/type";
3
+ import type { ColumnDef, Table } from "@tanstack/react-table";
4
+ export type IColumnsChoose<RecordType> = {
5
+ id: string;
6
+ table: Table<RecordType>;
7
+ columns: ColumnDef<RecordType>[];
8
+ originColumns: ColumnTable[];
9
+ columnsGroup?: string[];
10
+ triggerChangeColumns?: (columns: ColumnsTable<RecordType>, keys: string[], type: string) => void;
11
+ t?: any;
12
+ triggerChangeKeys?: any;
13
+ columnHidden: any;
14
+ locale?: Locale;
15
+ tableLocal: GridTableLocale;
16
+ };
17
+ export declare const ColumnsConfig: <RecordType extends object>(props: IColumnsChoose<RecordType>) => JSX.Element;