es-grid-template 1.7.22 → 1.7.24

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 (173) hide show
  1. package/es/grid-component/GridStyle.js +1 -1
  2. package/es/grid-component/InternalTable.js +5 -1
  3. package/es/grid-component/TableGrid.js +2 -2
  4. package/es/index.d.ts +1 -0
  5. package/es/index.js +3 -1
  6. package/es/table-component/ColumnsChoose.d.ts +10 -0
  7. package/es/table-component/ColumnsChoose.js +557 -0
  8. package/es/table-component/ContextMenu.d.ts +20 -0
  9. package/es/table-component/ContextMenu.js +75 -0
  10. package/es/table-component/InternalTable.d.ts +9 -0
  11. package/es/table-component/InternalTable.js +295 -0
  12. package/es/table-component/TableContainer.d.ts +22 -0
  13. package/es/table-component/TableContainer.js +130 -0
  14. package/es/table-component/TableContainerEdit.d.ts +28 -0
  15. package/es/table-component/TableContainerEdit.js +1211 -0
  16. package/es/table-component/body/EditableCell.d.ts +16 -0
  17. package/es/table-component/body/EditableCell.js +1036 -0
  18. package/es/table-component/body/TableBody.d.ts +19 -0
  19. package/es/table-component/body/TableBody.js +64 -0
  20. package/es/table-component/body/TableBodyCell.d.ts +10 -0
  21. package/es/table-component/body/TableBodyCell.js +139 -0
  22. package/es/table-component/body/TableBodyCellEdit.d.ts +15 -0
  23. package/es/table-component/body/TableBodyCellEdit.js +814 -0
  24. package/es/table-component/body/TableBodyRow.d.ts +21 -0
  25. package/es/table-component/body/TableBodyRow.js +146 -0
  26. package/es/table-component/components/ControlCheckbox.d.ts +13 -0
  27. package/es/table-component/components/ControlCheckbox.js +87 -0
  28. package/es/table-component/components/EditForm/EditForm.d.ts +27 -0
  29. package/es/table-component/components/EditForm/EditForm.js +395 -0
  30. package/es/table-component/components/EditForm/index.d.ts +1 -0
  31. package/es/table-component/components/EditForm/index.js +1 -0
  32. package/es/table-component/components/InputControl/InputControl.d.ts +27 -0
  33. package/es/table-component/components/InputControl/InputControl.js +121 -0
  34. package/es/table-component/components/InputControl/index.d.ts +1 -0
  35. package/es/table-component/components/InputControl/index.js +1 -0
  36. package/es/table-component/components/async-select/index.d.ts +11 -0
  37. package/es/table-component/components/async-select/index.js +41 -0
  38. package/es/table-component/components/async-table-select/index.d.ts +11 -0
  39. package/es/table-component/components/async-table-select/index.js +43 -0
  40. package/es/table-component/components/checkbox-control/index.d.ts +13 -0
  41. package/es/table-component/components/checkbox-control/index.js +40 -0
  42. package/es/table-component/components/checkbox-filter/CheckboxFilter.d.ts +18 -0
  43. package/es/table-component/components/checkbox-filter/CheckboxFilter.js +240 -0
  44. package/es/table-component/components/checkbox-filter/FilterSearch.d.ts +12 -0
  45. package/es/table-component/components/checkbox-filter/FilterSearch.js +36 -0
  46. package/es/table-component/components/command/Command.d.ts +9 -0
  47. package/es/table-component/components/command/Command.js +28 -0
  48. package/es/table-component/components/number/index.d.ts +10 -0
  49. package/es/table-component/components/number/index.js +42 -0
  50. package/es/table-component/components/number-range/index.d.ts +11 -0
  51. package/es/table-component/components/number-range/index.js +66 -0
  52. package/es/table-component/features/operator.d.ts +24 -0
  53. package/es/table-component/features/operator.js +62 -0
  54. package/es/table-component/footer/TableFooter.d.ts +13 -0
  55. package/es/table-component/footer/TableFooter.js +33 -0
  56. package/es/table-component/footer/TableFooterCell.d.ts +10 -0
  57. package/es/table-component/footer/TableFooterCell.js +24 -0
  58. package/es/table-component/footer/TableFooterRow.d.ts +14 -0
  59. package/es/table-component/footer/TableFooterRow.js +71 -0
  60. package/es/table-component/header/TableHead.d.ts +14 -0
  61. package/es/table-component/header/TableHead.js +60 -0
  62. package/es/table-component/header/TableHeadCell.d.ts +14 -0
  63. package/es/table-component/header/TableHeadCell.js +324 -0
  64. package/es/table-component/header/TableHeadRow.d.ts +16 -0
  65. package/es/table-component/header/TableHeadRow.js +86 -0
  66. package/es/table-component/header/renderFilter.d.ts +20 -0
  67. package/es/table-component/header/renderFilter.js +281 -0
  68. package/es/table-component/hook/constant.d.ts +73 -0
  69. package/es/table-component/hook/constant.js +240 -0
  70. package/es/table-component/hook/useColumns.d.ts +11 -0
  71. package/es/table-component/hook/useColumns.js +209 -0
  72. package/es/table-component/hook/useFilterOperator.d.ts +7 -0
  73. package/es/table-component/hook/useFilterOperator.js +33 -0
  74. package/es/table-component/hook/utils.d.ts +121 -0
  75. package/es/table-component/hook/utils.js +1727 -0
  76. package/es/table-component/index.d.ts +5 -0
  77. package/es/table-component/index.js +2 -0
  78. package/es/table-component/style.scss +1083 -0
  79. package/es/table-component/table/Grid.d.ts +23 -0
  80. package/es/table-component/table/Grid.js +310 -0
  81. package/es/table-component/table/GridEdit.d.ts +23 -0
  82. package/es/table-component/table/GridEdit.js +282 -0
  83. package/es/table-component/type.d.ts +482 -0
  84. package/es/table-component/type.js +1 -0
  85. package/es/table-component/useContext.d.ts +119 -0
  86. package/es/table-component/useContext.js +61 -0
  87. package/lib/grid-component/GridStyle.js +1 -1
  88. package/lib/grid-component/InternalTable.js +5 -1
  89. package/lib/grid-component/TableGrid.js +2 -2
  90. package/lib/index.d.ts +1 -0
  91. package/lib/index.js +8 -1
  92. package/lib/table-component/ColumnsChoose.d.ts +10 -0
  93. package/lib/table-component/ColumnsChoose.js +568 -0
  94. package/lib/table-component/ContextMenu.d.ts +20 -0
  95. package/lib/table-component/ContextMenu.js +85 -0
  96. package/lib/table-component/InternalTable.d.ts +9 -0
  97. package/lib/table-component/InternalTable.js +299 -0
  98. package/lib/table-component/TableContainer.d.ts +22 -0
  99. package/lib/table-component/TableContainer.js +137 -0
  100. package/lib/table-component/TableContainerEdit.d.ts +28 -0
  101. package/lib/table-component/TableContainerEdit.js +1220 -0
  102. package/lib/table-component/body/EditableCell.d.ts +16 -0
  103. package/lib/table-component/body/EditableCell.js +1038 -0
  104. package/lib/table-component/body/TableBody.d.ts +19 -0
  105. package/lib/table-component/body/TableBody.js +72 -0
  106. package/lib/table-component/body/TableBodyCell.d.ts +10 -0
  107. package/lib/table-component/body/TableBodyCell.js +148 -0
  108. package/lib/table-component/body/TableBodyCellEdit.d.ts +15 -0
  109. package/lib/table-component/body/TableBodyCellEdit.js +821 -0
  110. package/lib/table-component/body/TableBodyRow.d.ts +21 -0
  111. package/lib/table-component/body/TableBodyRow.js +153 -0
  112. package/lib/table-component/components/ControlCheckbox.d.ts +13 -0
  113. package/lib/table-component/components/ControlCheckbox.js +95 -0
  114. package/lib/table-component/components/EditForm/EditForm.d.ts +27 -0
  115. package/lib/table-component/components/EditForm/EditForm.js +406 -0
  116. package/lib/table-component/components/EditForm/index.d.ts +1 -0
  117. package/lib/table-component/components/EditForm/index.js +16 -0
  118. package/lib/table-component/components/InputControl/InputControl.d.ts +27 -0
  119. package/lib/table-component/components/InputControl/InputControl.js +131 -0
  120. package/lib/table-component/components/InputControl/index.d.ts +1 -0
  121. package/lib/table-component/components/InputControl/index.js +16 -0
  122. package/lib/table-component/components/async-select/index.d.ts +11 -0
  123. package/lib/table-component/components/async-select/index.js +49 -0
  124. package/lib/table-component/components/async-table-select/index.d.ts +11 -0
  125. package/lib/table-component/components/async-table-select/index.js +51 -0
  126. package/lib/table-component/components/checkbox-control/index.d.ts +13 -0
  127. package/lib/table-component/components/checkbox-control/index.js +48 -0
  128. package/lib/table-component/components/checkbox-filter/CheckboxFilter.d.ts +18 -0
  129. package/lib/table-component/components/checkbox-filter/CheckboxFilter.js +249 -0
  130. package/lib/table-component/components/checkbox-filter/FilterSearch.d.ts +12 -0
  131. package/lib/table-component/components/checkbox-filter/FilterSearch.js +44 -0
  132. package/lib/table-component/components/command/Command.d.ts +9 -0
  133. package/lib/table-component/components/command/Command.js +37 -0
  134. package/lib/table-component/components/number/index.d.ts +10 -0
  135. package/lib/table-component/components/number/index.js +50 -0
  136. package/lib/table-component/components/number-range/index.d.ts +11 -0
  137. package/lib/table-component/components/number-range/index.js +74 -0
  138. package/lib/table-component/features/operator.d.ts +24 -0
  139. package/lib/table-component/features/operator.js +67 -0
  140. package/lib/table-component/footer/TableFooter.d.ts +13 -0
  141. package/lib/table-component/footer/TableFooter.js +42 -0
  142. package/lib/table-component/footer/TableFooterCell.d.ts +10 -0
  143. package/lib/table-component/footer/TableFooterCell.js +32 -0
  144. package/lib/table-component/footer/TableFooterRow.d.ts +14 -0
  145. package/lib/table-component/footer/TableFooterRow.js +79 -0
  146. package/lib/table-component/header/TableHead.d.ts +14 -0
  147. package/lib/table-component/header/TableHead.js +69 -0
  148. package/lib/table-component/header/TableHeadCell.d.ts +14 -0
  149. package/lib/table-component/header/TableHeadCell.js +333 -0
  150. package/lib/table-component/header/TableHeadRow.d.ts +16 -0
  151. package/lib/table-component/header/TableHeadRow.js +94 -0
  152. package/lib/table-component/header/renderFilter.d.ts +20 -0
  153. package/lib/table-component/header/renderFilter.js +291 -0
  154. package/lib/table-component/hook/constant.d.ts +73 -0
  155. package/lib/table-component/hook/constant.js +247 -0
  156. package/lib/table-component/hook/useColumns.d.ts +11 -0
  157. package/lib/table-component/hook/useColumns.js +220 -0
  158. package/lib/table-component/hook/useFilterOperator.d.ts +7 -0
  159. package/lib/table-component/hook/useFilterOperator.js +40 -0
  160. package/lib/table-component/hook/utils.d.ts +121 -0
  161. package/lib/table-component/hook/utils.js +1817 -0
  162. package/lib/table-component/index.d.ts +5 -0
  163. package/lib/table-component/index.js +9 -0
  164. package/lib/table-component/style.scss +1083 -0
  165. package/lib/table-component/table/Grid.d.ts +23 -0
  166. package/lib/table-component/table/Grid.js +313 -0
  167. package/lib/table-component/table/GridEdit.d.ts +23 -0
  168. package/lib/table-component/table/GridEdit.js +284 -0
  169. package/lib/table-component/type.d.ts +482 -0
  170. package/lib/table-component/type.js +5 -0
  171. package/lib/table-component/useContext.d.ts +119 -0
  172. package/lib/table-component/useContext.js +67 -0
  173. package/package.json +3 -1
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.convertToTanStackColumns = convertToTanStackColumns;
8
+ exports.renderValueCell = void 0;
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _ControlCheckbox = _interopRequireDefault(require("../components/ControlCheckbox"));
11
+ var _utils = require("./utils");
12
+ var _reactNumericComponent = require("react-numeric-component");
13
+ var _dayjs = _interopRequireDefault(require("dayjs"));
14
+ var _moment = _interopRequireDefault(require("moment"));
15
+ 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); }
16
+ 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; }
17
+ const renderValueCell = (column, value, record, rowIndex, colIndex, format, editAble) => {
18
+ switch (column?.type) {
19
+ case 'number':
20
+ const colFormat = typeof column.format === 'function' ? column.format(record) : column.format;
21
+ const cellFormat = (0, _utils.getFormat)(colFormat, format);
22
+ const thousandSeparator = cellFormat?.thousandSeparator;
23
+ const decimalSeparator = cellFormat?.decimalSeparator;
24
+ const dec = cellFormat?.decimalScale;
25
+
26
+ // const contentNumber = !isEmpty(value) ? ((dec || dec === 0) ? parseFloat(Number(value).toFixed(dec)).toString() : value.toString()) : '0'
27
+
28
+ const tmpval = typeof value === 'string' ? Number(value) : value;
29
+ const numericFormatProps = {
30
+ thousandSeparator: (0, _utils.checkThousandSeparator)(thousandSeparator, decimalSeparator),
31
+ decimalSeparator: (0, _utils.checkDecimalSeparator)(thousandSeparator, decimalSeparator),
32
+ allowNegative: cellFormat?.allowNegative ?? true,
33
+ prefix: cellFormat?.prefix,
34
+ suffix: cellFormat?.suffix,
35
+ decimalScale: dec,
36
+ fixedDecimalScale: cellFormat?.fixedDecimalScale ?? false
37
+ };
38
+
39
+ // if ( typeof value === "string") {
40
+ // const ttt = removeNumericFormat(value, undefined, numericFormatProps )
41
+ //
42
+ // }
43
+
44
+ const contentNumber = !(0, _utils.isEmpty)(value) ? dec || dec === 0 ? parseFloat(tmpval.toFixed(dec)).toString() : tmpval.toString() : '0';
45
+ // const contentNumber = !isEmpty(value) ? ((dec || dec === 0) ? tmpval.toString() : tmpval.toString()) : '0'
46
+
47
+ return !(0, _utils.isEmpty)(contentNumber) ? (0, _reactNumericComponent.numericFormatter)(contentNumber, numericFormatProps) : '';
48
+ case 'date':
49
+ return value ? (0, _dayjs.default)(value).format(format?.dateFormat ?? 'DD/MM/YYYY') : '';
50
+ case 'time':
51
+ return value ? value : '';
52
+ case 'year':
53
+ const year = value ? (0, _moment.default)(value).format('yyyy') : '';
54
+ return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, year);
55
+ case 'datetime':
56
+ return value ? (0, _moment.default)(value).format(format?.datetimeFormat ?? 'DD/MM/YYYY HH:mm') : '';
57
+ case 'boolean':
58
+ return value ? 'true' : 'false';
59
+ case 'color':
60
+ return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
61
+ className: 'w-100 h-100',
62
+ style: {
63
+ backgroundColor: (0, _utils.isColor)(value) ? value : '#fff',
64
+ border: '1px solid #f0f0f0',
65
+ height: '100%',
66
+ minHeight: 20
67
+ }
68
+ }));
69
+ case 'checkbox':
70
+ // return (
71
+ // <Checkbox
72
+ // checked={!!value}
73
+ //
74
+ // />
75
+ // )
76
+
77
+ return /*#__PURE__*/_react.default.createElement(_ControlCheckbox.default, {
78
+ column: column,
79
+ record: record,
80
+ rowIndex: rowIndex,
81
+ colIndex: colIndex,
82
+ checked: !!value,
83
+ checkValue: value,
84
+ editAble: editAble
85
+ });
86
+ case 'file':
87
+ const nameFile = typeof value === 'object' && !Array.isArray(value) ? value.name : Array.isArray(value) ? value.map(it => typeof it === 'object' ? it.name : it).filter(Boolean).join(", ") : '';
88
+ return value ? nameFile : '';
89
+ default:
90
+ if (Array.isArray(value)) {
91
+ return value.join(', ');
92
+ }
93
+ return value;
94
+ }
95
+ };
96
+ exports.renderValueCell = renderValueCell;
97
+ function convertToTanStackColumns({
98
+ columns,
99
+ expanded,
100
+ setExpanded,
101
+ expandable,
102
+ format,
103
+ editAble
104
+ }) {
105
+ const expandIconColumnIndex = expandable?.expandIconColumnIndex ?? 0;
106
+ return columns.map(col => {
107
+ const {
108
+ headerText,
109
+ headerTemplate,
110
+ field,
111
+ width,
112
+ allowResizing,
113
+ minWidth,
114
+ template,
115
+ allowSorter
116
+ } = col;
117
+ const {
118
+ children,
119
+ ...restProps
120
+ } = col;
121
+ const newCol = {
122
+ header: () => {
123
+ if (headerTemplate) {
124
+ if (typeof headerTemplate === 'function') {
125
+ return headerTemplate(col);
126
+ } else {
127
+ return headerTemplate;
128
+ }
129
+ } else {
130
+ return headerText;
131
+ }
132
+ },
133
+ cell: props => {
134
+ const {
135
+ getValue,
136
+ cell,
137
+ row
138
+ } = props;
139
+ const cellValue = props.renderValue() ?? null;
140
+ const record = cell.row.original;
141
+ const colIndex = cell.column.getIndex();
142
+ const rowIndex = cell.row.index;
143
+ if (template) {
144
+ if (typeof template === 'function') {
145
+ return template({
146
+ field: field ?? '',
147
+ index: cell.row.index,
148
+ rowData: cell.row.original,
149
+ value: getValue()
150
+ });
151
+ } else {
152
+ return template;
153
+ }
154
+ } else {
155
+ return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, cell.column.getIndex() === expandIconColumnIndex && /*#__PURE__*/_react.default.createElement("div", {
156
+ className: "ui-rc-table-row-expand-trigger",
157
+ style: {
158
+ paddingLeft: `${row.depth * 25}px`
159
+ }
160
+ }, /*#__PURE__*/_react.default.createElement("div", null, row.getCanExpand() ? /*#__PURE__*/_react.default.createElement("button", {
161
+ // onClick: row.getToggleExpandedHandler(),
162
+ onClick: () => {
163
+ const keys = Object.keys(expanded);
164
+ // @ts-ignore
165
+ const tmp = {
166
+ ...expanded
167
+ };
168
+ if (keys.includes(row.id)) {
169
+ delete tmp[row.id];
170
+ setExpanded(tmp);
171
+ } else {
172
+ setExpanded(old => ({
173
+ ...old,
174
+ [row.id]: true
175
+ }));
176
+ }
177
+ },
178
+ style: {
179
+ cursor: "pointer"
180
+ },
181
+ className: "ui-rc-table-row-expand"
182
+ }, row.getIsExpanded() ? /*#__PURE__*/_react.default.createElement("span", {
183
+ className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-expanded"
184
+ }) : /*#__PURE__*/_react.default.createElement("span", {
185
+ className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-collapsed"
186
+ })) : /*#__PURE__*/_react.default.createElement("span", {
187
+ className: "ui-rc-table-row-expand-icon ui-rc-table-row-expand-icon-spaced"
188
+ }))), renderValueCell(col, cellValue, record, rowIndex, colIndex, format, editAble));
189
+ }
190
+ },
191
+ enableResizing: allowResizing !== false,
192
+ // enableResizing: true,
193
+ id: field,
194
+ size: width,
195
+ accessorKey: field ?? '',
196
+ sortDescFirst: false,
197
+ minSize: minWidth,
198
+ // maxSize: maxWidth,
199
+ enableSorting: allowSorter !== false || col.sorter !== false
200
+ };
201
+
202
+ // if (field) {
203
+ // // @ts-ignore
204
+ // newCol.accessorKey = field;
205
+
206
+ // }
207
+
208
+ if (children) {
209
+ // @ts-ignore
210
+ newCol.columns = convertToTanStackColumns(children);
211
+ }
212
+ const meta = {
213
+ ...restProps
214
+ };
215
+ if (Object.keys(meta).length > 0) {
216
+ newCol.meta = meta;
217
+ }
218
+ return newCol;
219
+ });
220
+ }
@@ -0,0 +1,7 @@
1
+ import { Table } from '@tanstack/react-table';
2
+ import type { FilterOperator } from '../type';
3
+ export declare function useFilterOperator(table: Table<any>): {
4
+ setFilterOperator: (columnId: string, operator: FilterOperator) => void;
5
+ getFilterOperator: (columnId: string) => FilterOperator;
6
+ };
7
+ export declare function customStringFilterFn(row: any, columnId: any, filterValue: any): boolean;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.customStringFilterFn = customStringFilterFn;
7
+ exports.useFilterOperator = useFilterOperator;
8
+ function useFilterOperator(table) {
9
+ const setFilterOperator = (columnId, operator) => {
10
+ const filters = table.getState().columnFilters;
11
+ const next = filters.map(f => f.id === columnId ? {
12
+ ...f,
13
+ operator
14
+ } : f);
15
+ table.setColumnFilters(next);
16
+ };
17
+ const getFilterOperator = columnId => {
18
+ const filters = table.getState().columnFilters;
19
+ return filters.find(f => f.id === columnId)?.operator ?? 'contains';
20
+ };
21
+ return {
22
+ setFilterOperator,
23
+ getFilterOperator
24
+ };
25
+ }
26
+ function customStringFilterFn(row, columnId, filterValue) {
27
+ const filters = row.table.getState().columnFilters;
28
+ const operator = filters.find(f => f.id === columnId)?.operator ?? 'contains';
29
+ const cellValue = String(row.getValue(columnId) ?? '');
30
+ switch (operator) {
31
+ case 'equal':
32
+ return cellValue === filterValue;
33
+ case 'startsWith':
34
+ return cellValue.toLowerCase().startsWith(filterValue.toLowerCase());
35
+ case 'endsWith':
36
+ return cellValue.toLowerCase().endsWith(filterValue.toLowerCase());
37
+ default:
38
+ return cellValue.toLowerCase().includes(filterValue.toLowerCase());
39
+ }
40
+ }
@@ -0,0 +1,121 @@
1
+ import type { Table } from "@tanstack/react-table";
2
+ import { type Column } from "@tanstack/react-table";
3
+ import type { VirtualItem } from "@tanstack/react-virtual";
4
+ import type { AnyObject, ColumnsTable, ColumnTable, EditType, FilterOperator, IColumnType, IFormat, RangeState, Sorter, TypeFilter } from "./../type";
5
+ import { type CSSProperties } from "react";
6
+ import dayjs from "dayjs";
7
+ import type { IPositionCell } from "../useContext";
8
+ export declare const newGuid: () => any;
9
+ export declare const convertDayjsToDate: (dateString: string, format?: string) => Date;
10
+ export declare const convertDateToDayjs: (date: Date | undefined, format?: string) => dayjs.Dayjs;
11
+ export declare const getCommonPinningStyles: (column: Column<any>) => CSSProperties;
12
+ export declare const sumSize: (items: any) => number;
13
+ export declare const appendIfNotExists: (a: VirtualItem[], b: VirtualItem[]) => VirtualItem[];
14
+ export declare const getNewItemsOnly: (a: VirtualItem[], b: VirtualItem[]) => VirtualItem[];
15
+ export declare const extendsObject: <T extends AnyObject = AnyObject>(...list: T[]) => AnyObject;
16
+ export declare const isEmpty: (d: any) => boolean;
17
+ export declare const getFormat: (colFormat?: IFormat, format?: IFormat) => {
18
+ thousandSeparator: string;
19
+ decimalSeparator: string;
20
+ decimalScale: number;
21
+ allowNegative: boolean;
22
+ prefix: string;
23
+ suffix: string;
24
+ fixedDecimalScale: boolean;
25
+ dateFormat: string;
26
+ datetimeFormat: string;
27
+ timeFormat: string;
28
+ weekFormat: string;
29
+ monthFormat: string;
30
+ yearFormat: string;
31
+ };
32
+ export declare function convertFormat(formatStr: string): string;
33
+ export declare const getDatepickerFormat: (type: EditType | TypeFilter | IColumnType, format?: IFormat) => string;
34
+ export declare const getDateRangeFormat: (type: EditType | TypeFilter | IColumnType, format?: IFormat) => string;
35
+ export declare const getTypeFilter: (col: any) => TypeFilter;
36
+ export declare const addRowIdArray: (inputArray: any[]) => any[];
37
+ export declare function groupArrayByColumns(arr: any[], columns: string[] | undefined): any;
38
+ export declare const flatColumns2: <RecordType>(columns: ColumnsTable<RecordType>) => ColumnsTable<RecordType>;
39
+ export declare const checkThousandSeparator: (thousandSeparator: string | undefined, decimalSeparator: string | undefined) => string;
40
+ export declare const checkDecimalSeparator: (thousandSeparator: string | undefined, decimalSeparator: string | undefined) => string;
41
+ export declare function getFixedFields(columns: ColumnTable[], type: 'left' | 'right'): string[];
42
+ export declare function areStringArraysEqual(a: string[], b: string[]): boolean;
43
+ export declare const getDefaultOperator: (col: ColumnTable) => FilterOperator;
44
+ export declare function isEqualSet(setA: any, setB: any): boolean;
45
+ export declare const getLastSelectCell: (selectCells: any) => {
46
+ row: number;
47
+ col: number;
48
+ };
49
+ export declare function getCellsByPosition(cellSet: any, position?: string): any[];
50
+ export declare const onAddBgSelectedCell: (selectedCells: any, id?: string, isFocusCellIndex?: boolean) => void;
51
+ export declare const onRemoveBgSelectedCell: (selectedCells: any, id?: string, rowsSelected?: any) => void;
52
+ export declare function getColIdsBetween(table: Table<any>, a: string, b: string): string[];
53
+ export declare function getRowIdsBetween(table: Table<any>, a: string, b: string): string[];
54
+ export declare const updateArrayByKey: (arr: any[], element: any, key: string) => any[];
55
+ export declare const unFlattenData: <RecordType extends AnyObject = AnyObject>(data: RecordType[]) => RecordType[];
56
+ export declare const flattenArray: <RecordType extends AnyObject = AnyObject>(arr: any[]) => RecordType[];
57
+ export declare function updateOrInsert(dataArray: any[], dataFilter: any[]): any[];
58
+ export declare const findItemByKey: (array: any, key: string | number, value: any) => any;
59
+ export declare const isFormattedNumber: (str: string) => boolean;
60
+ export declare const detectSeparators: (str: string) => {
61
+ thousandSeparator: string;
62
+ decimalSeparator: string;
63
+ };
64
+ export declare function isDateString(str: any): boolean;
65
+ export declare function compareDates(date1: any, date2: any): boolean;
66
+ export declare function compareDate(itemValue: any, value: any): boolean;
67
+ export declare const removeVietnameseTones: (str: any) => any;
68
+ export declare const shouldInclude: (item: any, queries: any[]) => any;
69
+ export declare function sortData(data: any[], sorter: Sorter[]): any[];
70
+ export declare function filterDataByColumns(data: any[], queries: any[], sorter: Sorter[], keysFilter: string[] | undefined): any[];
71
+ export declare const getAllRowKey: (data: any[]) => any[];
72
+ export declare const isEditable: <RecordType>(column: ColumnTable, rowData: RecordType) => boolean | ((rowData: any) => boolean);
73
+ export declare const checkFieldKey: (key: string | undefined) => string;
74
+ export declare const convertArrayWithIndent: (inputArray: any[], parentIndent?: number) => any[];
75
+ export declare const convertLabelToTitle: (data: any[]) => any[];
76
+ export declare const isNullOrUndefined: (d: any) => boolean;
77
+ export declare const isObjEmpty: (obj: any) => boolean;
78
+ export declare const isDisable: <T>(column: ColumnTable<T>, rowData?: any) => boolean;
79
+ export declare const customWeekStartEndFormat: (value: any, weekFormat: string) => string;
80
+ export declare const parseBooleanToValue: (value: boolean, type: 'boolean' | 'number') => number | boolean;
81
+ export declare const isNameColor: (strColor: string) => boolean;
82
+ export declare const isColor: (value: string) => boolean;
83
+ export declare const genPresets: (presets?: import("@ant-design/colors").PalettesProps) => import("antd/es/color-picker/interface").PresetsItem[];
84
+ export declare const getEditType: <T>(column: ColumnTable<T>, rowData?: any) => EditType;
85
+ export declare const getDefaultValue: (defaultValue: any) => AnyObject;
86
+ export declare const flattenData: <RecordType extends AnyObject = AnyObject>(childrenColumnName: string, data?: RecordType[]) => RecordType[];
87
+ export declare const getSelectedCellMatrix: (table: Table<any>, startCell: IPositionCell | undefined, endCell: IPositionCell | undefined) => RangeState;
88
+ export declare function addRowsDownWithCtrl(arr: any, n: number): {
89
+ combined: any;
90
+ addedRows: any[];
91
+ } | {
92
+ combined: any[];
93
+ addedRows: any[];
94
+ };
95
+ export declare function addRowsDown(arr: any, n: number): {
96
+ combined: any;
97
+ addedRows: any[];
98
+ } | {
99
+ combined: any[];
100
+ addedRows: any[];
101
+ };
102
+ export declare function addRowsUpWithCtrl(array: any, n: number): {
103
+ combined: any;
104
+ addedRows: any[];
105
+ } | {
106
+ combined: any[];
107
+ addedRows: any[];
108
+ };
109
+ export declare function addRowsUp(array: any, n: number): {
110
+ combined: any;
111
+ addedRows: any[];
112
+ } | {
113
+ combined: any[];
114
+ addedRows: any[];
115
+ };
116
+ export declare const convertFilters: (filters: any[]) => any[];
117
+ export declare function getInvisibleColumns(columns: ColumnTable[]): Record<string, boolean>;
118
+ export declare const getAllVisibleKeys: (columns: any[]) => any[];
119
+ export declare function getHiddenParentKeys(columns: any[], parentKeys?: string[]): string[];
120
+ export declare const getVisibleColumnKeys: (columns: any[]) => string[];
121
+ export declare function isObjEqual(obj1: any, obj2: any): boolean;