@rockshin/tao-ui 0.0.25 → 0.0.26

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 (76) hide show
  1. package/README.md +17 -6
  2. package/component-manifest.json +534 -6
  3. package/dist/components/alert/alert.css +120 -0
  4. package/dist/components/alert/alert.d.ts +20 -0
  5. package/dist/components/alert/alert.js +185 -0
  6. package/dist/components/button/button.css +19 -18
  7. package/dist/components/button/button.d.ts +8 -0
  8. package/dist/components/date-picker/date-picker.js +1 -1
  9. package/dist/components/date-picker/range-picker.js +1 -1
  10. package/dist/components/dropdown/dropdown.css +22 -1
  11. package/dist/components/dropdown/dropdown.js +4 -3
  12. package/dist/components/form/form-context.d.ts +7 -0
  13. package/dist/components/form/form-context.js +8 -0
  14. package/dist/components/form/form-item.d.ts +55 -0
  15. package/dist/components/form/form-item.js +131 -0
  16. package/dist/components/form/form.css +22 -0
  17. package/dist/components/form/form.d.ts +35 -0
  18. package/dist/components/form/form.js +125 -0
  19. package/dist/components/form/index.d.ts +2 -0
  20. package/dist/components/form/index.js +1 -0
  21. package/dist/components/form-field/form-field-view.d.ts +30 -0
  22. package/dist/components/form-field/form-field-view.js +154 -0
  23. package/dist/components/form-field/form-field.d.ts +2 -2
  24. package/dist/components/form-field/form-field.js +29 -137
  25. package/dist/components/form-field/form.css +17 -7
  26. package/dist/components/input/input.css +6 -6
  27. package/dist/components/modal/confirm-dialog.js +14 -111
  28. package/dist/components/modal/modal.d.ts +7 -1
  29. package/dist/components/modal/modal.js +205 -195
  30. package/dist/components/popconfirm/popconfirm.css +44 -0
  31. package/dist/components/popconfirm/popconfirm.d.ts +41 -0
  32. package/dist/components/popconfirm/popconfirm.js +238 -0
  33. package/dist/components/popover/popover.css +105 -0
  34. package/dist/components/popover/popover.d.ts +41 -0
  35. package/dist/components/popover/popover.js +412 -0
  36. package/dist/components/select/select.js +1 -1
  37. package/dist/components/status-icon/status-icon.d.ts +5 -0
  38. package/dist/components/status-icon/status-icon.js +77 -0
  39. package/dist/components/table/table-types.d.ts +7 -0
  40. package/dist/components/table/table.d.ts +1 -1
  41. package/dist/components/table/table.js +296 -283
  42. package/dist/components/tooltip/tooltip.css +93 -0
  43. package/dist/components/tooltip/tooltip.d.ts +33 -0
  44. package/dist/components/tooltip/tooltip.js +226 -0
  45. package/dist/docs/components/alert.doc.d.ts +29 -0
  46. package/dist/docs/components/alert.doc.js +93 -0
  47. package/dist/docs/components/form.doc.d.ts +29 -0
  48. package/dist/docs/components/form.doc.js +71 -0
  49. package/dist/docs/components/modal.doc.d.ts +6 -0
  50. package/dist/docs/components/modal.doc.js +9 -1
  51. package/dist/docs/components/popconfirm.doc.d.ts +29 -0
  52. package/dist/docs/components/popconfirm.doc.js +132 -0
  53. package/dist/docs/components/popover.doc.d.ts +29 -0
  54. package/dist/docs/components/popover.doc.js +121 -0
  55. package/dist/docs/components/stack.doc.d.ts +6 -0
  56. package/dist/docs/components/stack.doc.js +23 -2
  57. package/dist/docs/components/table.doc.js +2 -1
  58. package/dist/docs/components/tao-provider.doc.js +11 -1
  59. package/dist/docs/components/tooltip.doc.d.ts +37 -0
  60. package/dist/docs/components/tooltip.doc.js +76 -0
  61. package/dist/index.d.ts +9 -1
  62. package/dist/index.js +8 -1
  63. package/dist/layouts/stack/stack.d.ts +12 -3
  64. package/dist/layouts/stack/stack.js +60 -34
  65. package/dist/provider/tao-provider.d.ts +71 -0
  66. package/dist/provider/tao-provider.js +166 -120
  67. package/dist/theme/control.css +12 -12
  68. package/dist/theme/theme.css +23 -0
  69. package/dist/utils/breakpoint.d.ts +31 -0
  70. package/dist/utils/breakpoint.js +80 -0
  71. package/dist/utils/overlay.d.ts +19 -0
  72. package/dist/utils/overlay.js +41 -0
  73. package/llms.txt +68 -3
  74. package/package.json +6 -4
  75. package/dist/components/select/use-is-mobile.d.ts +0 -1
  76. package/dist/components/select/use-is-mobile.js +0 -27
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { createElement, useEffect, useRef, useState } from "react";
3
3
  import { c as compiler_runtime_c } from "react/compiler-runtime";
4
4
  import { useTaoConfig } from "../../provider/tao-provider.js";
5
+ import { useBreakpoint } from "../../utils/breakpoint.js";
5
6
  import { cx } from "../../utils/semantic.js";
6
7
  import { Pagination } from "../pagination/pagination.js";
7
8
  import { TableFilterDropdown } from "./table-filter.js";
@@ -9,14 +10,23 @@ import { SortIcon, TableLoadingSpinner } from "./table-icons.js";
9
10
  import { getCellValue, getColKey, getRowKey, nextSortOrder, resolveRowClassName, resolveRowStyle, resolveSemanticClassNames, resolveSemanticStyles } from "./table-model.js";
10
11
  import "./table.css";
11
12
  function Table(t0) {
12
- const $ = compiler_runtime_c(96);
13
- const { columns, dataSource, rowKey, loading: t1, pagination: paginationProp, onChange, scroll, rowSelection, size, variant, headerBackground: t2, emptyText: t3, bordered: t4, className, style, classNames, styles, rowClassName, rowStyle, onRow, onHeaderRow } = t0;
13
+ const $ = compiler_runtime_c(99);
14
+ const { columns: columnsProp, dataSource, rowKey, loading: t1, pagination: paginationProp, onChange, scroll, rowSelection, size, variant, headerBackground: t2, emptyText: t3, bordered: t4, className, style, classNames, styles, rowClassName, rowStyle, onRow, onHeaderRow } = t0;
14
15
  const loading = void 0 === t1 ? false : t1;
15
16
  const headerBackground = void 0 === t2 ? true : t2;
16
17
  const emptyText = void 0 === t3 ? "No Data" : t3;
17
18
  const bordered = void 0 === t4 ? false : t4;
18
19
  const ctx = useTaoConfig();
19
20
  const resolvedSize = size ?? ctx.size;
21
+ const screens = useBreakpoint();
22
+ let t5;
23
+ if ($[0] !== columnsProp || $[1] !== screens) {
24
+ t5 = columnsProp.some(_temp) ? columnsProp.filter((col)=>!col.responsive || col.responsive.some((bp)=>screens[bp])) : columnsProp;
25
+ $[0] = columnsProp;
26
+ $[1] = screens;
27
+ $[2] = t5;
28
+ } else t5 = $[2];
29
+ const columns = t5;
20
30
  const resolvedVariant = variant ?? ("outlined" === ctx.variant ? "modern" : ctx.variant);
21
31
  const showBorder = "outlined" === resolvedVariant || "modern" === resolvedVariant || bordered && "borderless" !== resolvedVariant;
22
32
  const semanticProps = {
@@ -45,118 +55,118 @@ function Table(t0) {
45
55
  const resolvedClassNames = resolveSemanticClassNames(classNames, semanticProps);
46
56
  const resolvedStyles = resolveSemanticStyles(styles, semanticProps);
47
57
  let defaultSortCol;
48
- let t5;
49
58
  let t6;
50
- if ($[0] !== columns) {
51
- defaultSortCol = columns.find(_temp);
52
- t5 = useState;
53
- t6 = defaultSortCol ? getColKey(defaultSortCol, columns.indexOf(defaultSortCol)) : null;
54
- $[0] = columns;
55
- $[1] = defaultSortCol;
56
- $[2] = t5;
57
- $[3] = t6;
59
+ let t7;
60
+ if ($[3] !== columns) {
61
+ defaultSortCol = columns.find(_temp2);
62
+ t6 = useState;
63
+ t7 = defaultSortCol ? getColKey(defaultSortCol, columns.indexOf(defaultSortCol)) : null;
64
+ $[3] = columns;
65
+ $[4] = defaultSortCol;
66
+ $[5] = t6;
67
+ $[6] = t7;
58
68
  } else {
59
- defaultSortCol = $[1];
60
- t5 = $[2];
61
- t6 = $[3];
69
+ defaultSortCol = $[4];
70
+ t6 = $[5];
71
+ t7 = $[6];
62
72
  }
63
- const [sortKey, setSortKey] = t5(t6);
73
+ const [sortKey, setSortKey] = t6(t7);
64
74
  const [sortOrder, setSortOrder] = useState(defaultSortCol?.defaultSortOrder ?? null);
65
- let t7;
66
- if ($[4] !== columns) {
67
- t7 = ()=>{
75
+ let t8;
76
+ if ($[7] !== columns) {
77
+ t8 = ()=>{
68
78
  const init = {};
69
79
  for(let i = 0; i < columns.length; i++){
70
- const col = columns[i];
71
- if (col.filters) {
72
- const key = getColKey(col, i);
73
- init[key] = col.filteredValue ?? [];
80
+ const col_1 = columns[i];
81
+ if (col_1.filters) {
82
+ const key = getColKey(col_1, i);
83
+ init[key] = col_1.filteredValue ?? [];
74
84
  }
75
85
  }
76
86
  return init;
77
87
  };
78
- $[4] = columns;
79
- $[5] = t7;
80
- } else t7 = $[5];
81
- const [filterValues, setFilterValues] = useState(t7);
88
+ $[7] = columns;
89
+ $[8] = t8;
90
+ } else t8 = $[8];
91
+ const [filterValues, setFilterValues] = useState(t8);
82
92
  const hasPagination = false !== paginationProp;
83
93
  const paginationConfig = false === paginationProp ? void 0 : paginationProp;
84
94
  const [internalPage, setInternalPage] = useState(paginationConfig?.defaultCurrent ?? 1);
85
95
  const [internalPageSize, setInternalPageSize] = useState(paginationConfig?.defaultPageSize ?? paginationConfig?.pageSize ?? 10);
86
96
  const currentPage = paginationConfig?.current ?? internalPage;
87
97
  const pageSize = paginationConfig?.pageSize ?? internalPageSize;
88
- let t8;
89
- if ($[6] !== columns) {
90
- t8 = (key_0, order)=>{
98
+ let t9;
99
+ if ($[9] !== columns) {
100
+ t9 = (key_0, order)=>{
91
101
  if (!key_0 || !order) return {
92
102
  order: null
93
103
  };
94
104
  const colIdx = columns.findIndex((c_0, i_0)=>getColKey(c_0, i_0) === key_0);
95
- const col_0 = columns[colIdx];
105
+ const col_2 = columns[colIdx];
96
106
  return {
97
- column: col_0,
107
+ column: col_2,
98
108
  order,
99
- field: col_0?.dataIndex
109
+ field: col_2?.dataIndex
100
110
  };
101
111
  };
102
- $[6] = columns;
103
- $[7] = t8;
104
- } else t8 = $[7];
105
- const buildSorterResult = t8;
106
- let t9;
107
- if ($[8] !== columns) {
108
- t9 = (fv)=>{
112
+ $[9] = columns;
113
+ $[10] = t9;
114
+ } else t9 = $[10];
115
+ const buildSorterResult = t9;
116
+ let t10;
117
+ if ($[11] !== columns) {
118
+ t10 = (fv)=>{
109
119
  const result = {};
110
120
  for(let i_1 = 0; i_1 < columns.length; i_1++){
111
- const col_1 = columns[i_1];
112
- if (col_1.filters) {
113
- const key_1 = getColKey(col_1, i_1);
121
+ const col_3 = columns[i_1];
122
+ if (col_3.filters) {
123
+ const key_1 = getColKey(col_3, i_1);
114
124
  const vals = fv[key_1];
115
- result[null == col_1.dataIndex ? key_1 : String(col_1.dataIndex)] = vals && vals.length > 0 ? vals : null;
125
+ result[null == col_3.dataIndex ? key_1 : String(col_3.dataIndex)] = vals && vals.length > 0 ? vals : null;
116
126
  }
117
127
  }
118
128
  return result;
119
129
  };
120
- $[8] = columns;
121
- $[9] = t9;
122
- } else t9 = $[9];
123
- const buildFiltersRecord = t9;
124
- let t10;
125
- if ($[10] !== buildFiltersRecord || $[11] !== buildSorterResult || $[12] !== onChange) {
126
- t10 = (page, ps, sk, so, fv_0)=>{
130
+ $[11] = columns;
131
+ $[12] = t10;
132
+ } else t10 = $[12];
133
+ const buildFiltersRecord = t10;
134
+ let t11;
135
+ if ($[13] !== buildFiltersRecord || $[14] !== buildSorterResult || $[15] !== onChange) {
136
+ t11 = (page, ps, sk, so, fv_0)=>{
127
137
  onChange?.({
128
138
  current: page,
129
139
  pageSize: ps
130
140
  }, buildFiltersRecord(fv_0), buildSorterResult(sk, so));
131
141
  };
132
- $[10] = buildFiltersRecord;
133
- $[11] = buildSorterResult;
134
- $[12] = onChange;
135
- $[13] = t10;
136
- } else t10 = $[13];
137
- const triggerChange = t10;
138
- let t11;
139
- if ($[14] !== currentPage || $[15] !== filterValues || $[16] !== pageSize || $[17] !== sortKey || $[18] !== sortOrder || $[19] !== triggerChange) {
140
- t11 = (colKey, col_2)=>{
141
- if (void 0 !== col_2.sortOrder) return void triggerChange(currentPage, pageSize, colKey, nextSortOrder(col_2.sortOrder), filterValues);
142
+ $[13] = buildFiltersRecord;
143
+ $[14] = buildSorterResult;
144
+ $[15] = onChange;
145
+ $[16] = t11;
146
+ } else t11 = $[16];
147
+ const triggerChange = t11;
148
+ let t12;
149
+ if ($[17] !== currentPage || $[18] !== filterValues || $[19] !== pageSize || $[20] !== sortKey || $[21] !== sortOrder || $[22] !== triggerChange) {
150
+ t12 = (colKey, col_4)=>{
151
+ if (void 0 !== col_4.sortOrder) return void triggerChange(currentPage, pageSize, colKey, nextSortOrder(col_4.sortOrder), filterValues);
142
152
  const next = sortKey === colKey ? nextSortOrder(sortOrder) : "ascend";
143
153
  const newKey = null === next ? null : colKey;
144
154
  setSortKey(newKey);
145
155
  setSortOrder(next);
146
156
  triggerChange(currentPage, pageSize, newKey, next, filterValues);
147
157
  };
148
- $[14] = currentPage;
149
- $[15] = filterValues;
150
- $[16] = pageSize;
151
- $[17] = sortKey;
152
- $[18] = sortOrder;
153
- $[19] = triggerChange;
154
- $[20] = t11;
155
- } else t11 = $[20];
156
- const handleSort = t11;
157
- let t12;
158
- if ($[21] !== filterValues || $[22] !== pageSize || $[23] !== sortKey || $[24] !== sortOrder || $[25] !== triggerChange) {
159
- t12 = (colKey_0, values)=>{
158
+ $[17] = currentPage;
159
+ $[18] = filterValues;
160
+ $[19] = pageSize;
161
+ $[20] = sortKey;
162
+ $[21] = sortOrder;
163
+ $[22] = triggerChange;
164
+ $[23] = t12;
165
+ } else t12 = $[23];
166
+ const handleSort = t12;
167
+ let t13;
168
+ if ($[24] !== filterValues || $[25] !== pageSize || $[26] !== sortKey || $[27] !== sortOrder || $[28] !== triggerChange) {
169
+ t13 = (colKey_0, values)=>{
160
170
  const next_0 = {
161
171
  ...filterValues,
162
172
  [colKey_0]: values
@@ -165,53 +175,53 @@ function Table(t0) {
165
175
  setInternalPage(1);
166
176
  triggerChange(1, pageSize, sortKey, sortOrder, next_0);
167
177
  };
168
- $[21] = filterValues;
169
- $[22] = pageSize;
170
- $[23] = sortKey;
171
- $[24] = sortOrder;
172
- $[25] = triggerChange;
173
- $[26] = t12;
174
- } else t12 = $[26];
175
- const handleFilter = t12;
176
- let t13;
177
- if ($[27] !== filterValues || $[28] !== sortKey || $[29] !== sortOrder || $[30] !== triggerChange) {
178
- t13 = (page_0, ps_0)=>{
178
+ $[24] = filterValues;
179
+ $[25] = pageSize;
180
+ $[26] = sortKey;
181
+ $[27] = sortOrder;
182
+ $[28] = triggerChange;
183
+ $[29] = t13;
184
+ } else t13 = $[29];
185
+ const handleFilter = t13;
186
+ let t14;
187
+ if ($[30] !== filterValues || $[31] !== sortKey || $[32] !== sortOrder || $[33] !== triggerChange) {
188
+ t14 = (page_0, ps_0)=>{
179
189
  setInternalPage(page_0);
180
190
  setInternalPageSize(ps_0);
181
191
  triggerChange(page_0, ps_0, sortKey, sortOrder, filterValues);
182
192
  };
183
- $[27] = filterValues;
184
- $[28] = sortKey;
185
- $[29] = sortOrder;
186
- $[30] = triggerChange;
187
- $[31] = t13;
188
- } else t13 = $[31];
189
- const handlePageChange = t13;
193
+ $[30] = filterValues;
194
+ $[31] = sortKey;
195
+ $[32] = sortOrder;
196
+ $[33] = triggerChange;
197
+ $[34] = t14;
198
+ } else t14 = $[34];
199
+ const handlePageChange = t14;
190
200
  let data;
191
- if ($[32] !== columns || $[33] !== dataSource || $[34] !== filterValues || $[35] !== sortKey || $[36] !== sortOrder) {
201
+ if ($[35] !== columns || $[36] !== dataSource || $[37] !== filterValues || $[38] !== sortKey || $[39] !== sortOrder) {
192
202
  data = [
193
203
  ...dataSource
194
204
  ];
195
205
  for(let i_2 = 0; i_2 < columns.length; i_2++){
196
- const col_3 = columns[i_2];
197
- if (!col_3.filters || !col_3.onFilter) continue;
198
- const key_2 = getColKey(col_3, i_2);
199
- const controlledValues = col_3.filteredValue;
206
+ const col_5 = columns[i_2];
207
+ if (!col_5.filters || !col_5.onFilter) continue;
208
+ const key_2 = getColKey(col_5, i_2);
209
+ const controlledValues = col_5.filteredValue;
200
210
  const activeVals = controlledValues ?? filterValues[key_2];
201
- if (activeVals && activeVals.length > 0) data = data.filter((record)=>activeVals.some((v)=>col_3.onFilter(v, record)));
211
+ if (activeVals && activeVals.length > 0) data = data.filter((record)=>activeVals.some((v)=>col_5.onFilter(v, record)));
202
212
  }
203
- let t14;
204
- if ($[38] !== sortKey || $[39] !== sortOrder) {
205
- t14 = (col_4, i_3)=>{
206
- const key_3 = getColKey(col_4, i_3);
207
- const order_0 = void 0 !== col_4.sortOrder ? col_4.sortOrder : sortKey === key_3 ? sortOrder : null;
208
- return null !== order_0 && "function" == typeof col_4.sorter;
213
+ let t15;
214
+ if ($[41] !== sortKey || $[42] !== sortOrder) {
215
+ t15 = (col_6, i_3)=>{
216
+ const key_3 = getColKey(col_6, i_3);
217
+ const order_0 = void 0 !== col_6.sortOrder ? col_6.sortOrder : sortKey === key_3 ? sortOrder : null;
218
+ return null !== order_0 && "function" == typeof col_6.sorter;
209
219
  };
210
- $[38] = sortKey;
211
- $[39] = sortOrder;
212
- $[40] = t14;
213
- } else t14 = $[40];
214
- const activeSortCol = columns.find(t14);
220
+ $[41] = sortKey;
221
+ $[42] = sortOrder;
222
+ $[43] = t15;
223
+ } else t15 = $[43];
224
+ const activeSortCol = columns.find(t15);
215
225
  if (activeSortCol && "function" == typeof activeSortCol.sorter) {
216
226
  const colIdx_0 = columns.indexOf(activeSortCol);
217
227
  const key_4 = getColKey(activeSortCol, colIdx_0);
@@ -222,49 +232,49 @@ function Table(t0) {
222
232
  return "descend" === order_1 ? -result_0 : result_0;
223
233
  });
224
234
  }
225
- $[32] = columns;
226
- $[33] = dataSource;
227
- $[34] = filterValues;
228
- $[35] = sortKey;
229
- $[36] = sortOrder;
230
- $[37] = data;
231
- } else data = $[37];
235
+ $[35] = columns;
236
+ $[36] = dataSource;
237
+ $[37] = filterValues;
238
+ $[38] = sortKey;
239
+ $[39] = sortOrder;
240
+ $[40] = data;
241
+ } else data = $[40];
232
242
  const processedData = data;
233
243
  const totalForPagination = paginationConfig?.total ?? processedData.length;
234
- let t14;
244
+ let t15;
235
245
  bb0: {
236
246
  if (!hasPagination) {
237
- t14 = processedData;
247
+ t15 = processedData;
238
248
  break bb0;
239
249
  }
240
250
  if (paginationConfig?.total !== void 0) {
241
- t14 = processedData;
251
+ t15 = processedData;
242
252
  break bb0;
243
253
  }
244
254
  const start = (currentPage - 1) * pageSize;
245
- let t15;
246
- if ($[41] !== pageSize || $[42] !== processedData || $[43] !== start) {
247
- t15 = processedData.slice(start, start + pageSize);
248
- $[41] = pageSize;
249
- $[42] = processedData;
250
- $[43] = start;
251
- $[44] = t15;
252
- } else t15 = $[44];
253
- t14 = t15;
255
+ let t16;
256
+ if ($[44] !== pageSize || $[45] !== processedData || $[46] !== start) {
257
+ t16 = processedData.slice(start, start + pageSize);
258
+ $[44] = pageSize;
259
+ $[45] = processedData;
260
+ $[46] = start;
261
+ $[47] = t16;
262
+ } else t16 = $[47];
263
+ t15 = t16;
254
264
  }
255
- const paginatedData = t14;
265
+ const paginatedData = t15;
256
266
  const selectionColWidth = rowSelection?.columnWidth ?? 48;
257
267
  const selectionType = rowSelection?.type ?? "checkbox";
258
- let t15;
259
- if ($[45] !== rowSelection?.selectedRowKeys) {
260
- t15 = rowSelection?.selectedRowKeys ?? [];
261
- $[45] = rowSelection?.selectedRowKeys;
262
- $[46] = t15;
263
- } else t15 = $[46];
264
- const selectedKeys = t15;
265
268
  let t16;
266
- if ($[47] !== dataSource || $[48] !== rowKey || $[49] !== rowSelection || $[50] !== selectedKeys || $[51] !== selectionType) {
267
- t16 = (key_5)=>{
269
+ if ($[48] !== rowSelection?.selectedRowKeys) {
270
+ t16 = rowSelection?.selectedRowKeys ?? [];
271
+ $[48] = rowSelection?.selectedRowKeys;
272
+ $[49] = t16;
273
+ } else t16 = $[49];
274
+ const selectedKeys = t16;
275
+ let t17;
276
+ if ($[50] !== dataSource || $[51] !== rowKey || $[52] !== rowSelection || $[53] !== selectedKeys || $[54] !== selectionType) {
277
+ t17 = (key_5)=>{
268
278
  if (!rowSelection?.onChange) return;
269
279
  let nextKeys;
270
280
  nextKeys = "radio" === selectionType ? [
@@ -276,17 +286,17 @@ function Table(t0) {
276
286
  const nextRows = dataSource.filter((r)=>nextKeys.includes(getRowKey(r, rowKey)));
277
287
  rowSelection.onChange(nextKeys, nextRows);
278
288
  };
279
- $[47] = dataSource;
280
- $[48] = rowKey;
281
- $[49] = rowSelection;
282
- $[50] = selectedKeys;
283
- $[51] = selectionType;
284
- $[52] = t16;
285
- } else t16 = $[52];
286
- const handleSelectRow = t16;
287
- let t17;
288
- if ($[53] !== dataSource || $[54] !== paginatedData || $[55] !== rowKey || $[56] !== rowSelection) {
289
- t17 = (checked)=>{
289
+ $[50] = dataSource;
290
+ $[51] = rowKey;
291
+ $[52] = rowSelection;
292
+ $[53] = selectedKeys;
293
+ $[54] = selectionType;
294
+ $[55] = t17;
295
+ } else t17 = $[55];
296
+ const handleSelectRow = t17;
297
+ let t18;
298
+ if ($[56] !== dataSource || $[57] !== paginatedData || $[58] !== rowKey || $[59] !== rowSelection) {
299
+ t18 = (checked)=>{
290
300
  if (!rowSelection?.onChange) return;
291
301
  if (checked) {
292
302
  const allKeys = paginatedData.filter((r_0)=>{
@@ -297,18 +307,18 @@ function Table(t0) {
297
307
  rowSelection.onChange(allKeys, nextRows_0);
298
308
  } else rowSelection.onChange([], []);
299
309
  };
300
- $[53] = dataSource;
301
- $[54] = paginatedData;
302
- $[55] = rowKey;
303
- $[56] = rowSelection;
304
- $[57] = t17;
305
- } else t17 = $[57];
306
- const handleSelectAll = t17;
310
+ $[56] = dataSource;
311
+ $[57] = paginatedData;
312
+ $[58] = rowKey;
313
+ $[59] = rowSelection;
314
+ $[60] = t18;
315
+ } else t18 = $[60];
316
+ const handleSelectAll = t18;
307
317
  const scrollRef = useRef(null);
308
318
  const [scrollState, setScrollState] = useState("left");
309
- let t18;
310
- if ($[58] === Symbol.for("react.memo_cache_sentinel")) {
311
- t18 = ()=>{
319
+ let t19;
320
+ if ($[61] === Symbol.for("react.memo_cache_sentinel")) {
321
+ t19 = ()=>{
312
322
  const el = scrollRef.current;
313
323
  if (!el) return;
314
324
  const { scrollLeft, scrollWidth, clientWidth } = el;
@@ -318,31 +328,31 @@ function Table(t0) {
318
328
  else if (atLeft) setScrollState("left");
319
329
  else atRight ? setScrollState("right") : setScrollState("middle");
320
330
  };
321
- $[58] = t18;
322
- } else t18 = $[58];
323
- const handleScroll = t18;
324
- let t19;
325
- if ($[59] !== scroll?.x) {
326
- t19 = ()=>{
331
+ $[61] = t19;
332
+ } else t19 = $[61];
333
+ const handleScroll = t19;
334
+ let t20;
335
+ if ($[62] !== scroll?.x) {
336
+ t20 = ()=>{
327
337
  if (!scroll?.x) return;
328
338
  handleScroll();
329
339
  };
330
- $[59] = scroll?.x;
331
- $[60] = t19;
332
- } else t19 = $[60];
333
- const t20 = scroll?.x;
334
- let t21;
335
- if ($[61] !== t20) {
336
- t21 = [
337
- t20,
340
+ $[62] = scroll?.x;
341
+ $[63] = t20;
342
+ } else t20 = $[63];
343
+ const t21 = scroll?.x;
344
+ let t22;
345
+ if ($[64] !== t21) {
346
+ t22 = [
347
+ t21,
338
348
  handleScroll
339
349
  ];
340
- $[61] = t20;
341
- $[62] = t21;
342
- } else t21 = $[62];
343
- useEffect(t19, t21);
350
+ $[64] = t21;
351
+ $[65] = t22;
352
+ } else t22 = $[65];
353
+ useEffect(t20, t22);
344
354
  let cols;
345
- if ($[63] !== columns || $[64] !== rowSelection || $[65] !== selectionColWidth) {
355
+ if ($[66] !== columns || $[67] !== rowSelection || $[68] !== selectionColWidth) {
346
356
  cols = [];
347
357
  if (rowSelection) cols.push({
348
358
  _key: "__selection__",
@@ -350,89 +360,89 @@ function Table(t0) {
350
360
  width: selectionColWidth,
351
361
  fixed: rowSelection.fixed ? "left" : void 0
352
362
  });
353
- columns.forEach((col_5, i_4)=>{
363
+ columns.forEach((col_7, i_4)=>{
354
364
  cols.push({
355
- ...col_5,
356
- _key: getColKey(col_5, i_4),
365
+ ...col_7,
366
+ _key: getColKey(col_7, i_4),
357
367
  _index: i_4
358
368
  });
359
369
  });
360
- $[63] = columns;
361
- $[64] = rowSelection;
362
- $[65] = selectionColWidth;
363
- $[66] = cols;
364
- } else cols = $[66];
370
+ $[66] = columns;
371
+ $[67] = rowSelection;
372
+ $[68] = selectionColWidth;
373
+ $[69] = cols;
374
+ } else cols = $[69];
365
375
  const allColumns = cols;
366
- let t22;
367
- if ($[67] !== allColumns || $[68] !== scroll?.x) {
368
- t22 = ()=>{
376
+ let t23;
377
+ if ($[70] !== allColumns || $[71] !== scroll?.x) {
378
+ t23 = ()=>{
369
379
  if (!scroll?.x) return {};
370
380
  const positions = {};
371
381
  let leftOffset = 0;
372
- for (const col_6 of allColumns)if ("left" === col_6.fixed) {
373
- positions[col_6._key] = {
382
+ for (const col_8 of allColumns)if ("left" === col_8.fixed) {
383
+ positions[col_8._key] = {
374
384
  left: leftOffset
375
385
  };
376
- leftOffset += "number" == typeof col_6.width ? col_6.width : 0;
386
+ leftOffset += "number" == typeof col_8.width ? col_8.width : 0;
377
387
  }
378
388
  let rightOffset = 0;
379
389
  for(let i_5 = allColumns.length - 1; i_5 >= 0; i_5--){
380
- const col_7 = allColumns[i_5];
381
- if ("right" === col_7.fixed) {
382
- positions[col_7._key] = {
390
+ const col_9 = allColumns[i_5];
391
+ if ("right" === col_9.fixed) {
392
+ positions[col_9._key] = {
383
393
  right: rightOffset
384
394
  };
385
- rightOffset += "number" == typeof col_7.width ? col_7.width : 0;
395
+ rightOffset += "number" == typeof col_9.width ? col_9.width : 0;
386
396
  }
387
397
  }
388
398
  return positions;
389
399
  };
390
- $[67] = allColumns;
391
- $[68] = scroll?.x;
392
- $[69] = t22;
393
- } else t22 = $[69];
400
+ $[70] = allColumns;
401
+ $[71] = scroll?.x;
402
+ $[72] = t23;
403
+ } else t23 = $[72];
394
404
  scroll?.x;
395
- let t23;
396
- if ($[70] !== t22) {
397
- t23 = t22();
398
- $[70] = t22;
399
- $[71] = t23;
400
- } else t23 = $[71];
401
- const stickyPositions = t23;
402
405
  let t24;
403
- if ($[72] !== sortKey || $[73] !== sortOrder) {
404
- t24 = (col_8, colKey_1)=>{
405
- if (void 0 !== col_8.sortOrder) return col_8.sortOrder;
406
- return sortKey === colKey_1 ? sortOrder : null;
407
- };
408
- $[72] = sortKey;
409
- $[73] = sortOrder;
406
+ if ($[73] !== t23) {
407
+ t24 = t23();
408
+ $[73] = t23;
410
409
  $[74] = t24;
411
410
  } else t24 = $[74];
412
- const getResolvedSortOrder = t24;
411
+ const stickyPositions = t24;
412
+ let t25;
413
+ if ($[75] !== sortKey || $[76] !== sortOrder) {
414
+ t25 = (col_10, colKey_1)=>{
415
+ if (void 0 !== col_10.sortOrder) return col_10.sortOrder;
416
+ return sortKey === colKey_1 ? sortOrder : null;
417
+ };
418
+ $[75] = sortKey;
419
+ $[76] = sortOrder;
420
+ $[77] = t25;
421
+ } else t25 = $[77];
422
+ const getResolvedSortOrder = t25;
413
423
  const tableStyle = scroll?.x ? {
414
424
  minWidth: "number" == typeof scroll.x ? `${scroll.x}px` : scroll.x
415
425
  } : {};
416
- let t25;
417
- if ($[75] !== paginatedData || $[76] !== rowKey || $[77] !== rowSelection || $[78] !== selectedKeys) {
418
- t25 = paginatedData.length > 0 && paginatedData.filter((r_3)=>!rowSelection?.getCheckboxProps?.(r_3)?.disabled).every((r_4)=>selectedKeys.includes(getRowKey(r_4, rowKey)));
419
- $[75] = paginatedData;
420
- $[76] = rowKey;
421
- $[77] = rowSelection;
422
- $[78] = selectedKeys;
423
- $[79] = t25;
424
- } else t25 = $[79];
425
- const isAllSelected = t25;
426
- const isIndeterminate = !isAllSelected && selectedKeys.length > 0;
427
426
  let t26;
428
- if ($[80] !== loading) {
429
- t26 = loading && /*#__PURE__*/ jsx(TableLoadingSpinner, {});
430
- $[80] = loading;
431
- $[81] = t26;
432
- } else t26 = $[81];
427
+ if ($[78] !== paginatedData || $[79] !== rowKey || $[80] !== rowSelection || $[81] !== selectedKeys) {
428
+ t26 = paginatedData.length > 0 && paginatedData.filter((r_3)=>!rowSelection?.getCheckboxProps?.(r_3)?.disabled).every((r_4)=>selectedKeys.includes(getRowKey(r_4, rowKey)));
429
+ $[78] = paginatedData;
430
+ $[79] = rowKey;
431
+ $[80] = rowSelection;
432
+ $[81] = selectedKeys;
433
+ $[82] = t26;
434
+ } else t26 = $[82];
435
+ const isAllSelected = t26;
436
+ const isIndeterminate = !isAllSelected && selectedKeys.length > 0;
437
+ let t27;
438
+ if ($[83] !== loading) {
439
+ t27 = loading && /*#__PURE__*/ jsx(TableLoadingSpinner, {});
440
+ $[83] = loading;
441
+ $[84] = t27;
442
+ } else t27 = $[84];
433
443
  const headerRowProps = onHeaderRow?.(columns, 0) ?? {};
434
- const t27 = "";
435
- const t28 = 0 === paginatedData.length ? /*#__PURE__*/ jsx("tr", {
444
+ const t28 = "";
445
+ const t29 = 0 === paginatedData.length ? /*#__PURE__*/ jsx("tr", {
436
446
  children: /*#__PURE__*/ jsx("td", {
437
447
  "data-tao-table-cell": "",
438
448
  "data-tao-table-empty": "",
@@ -480,19 +490,19 @@ function Table(t0) {
480
490
  "data-tao-table-checkbox": ""
481
491
  })
482
492
  }),
483
- columns.map((col_10, colIdx_1)=>{
484
- const colKey_3 = getColKey(col_10, colIdx_1);
485
- const value = getCellValue(record_0, col_10.dataIndex);
493
+ columns.map((col_12, colIdx_1)=>{
494
+ const colKey_3 = getColKey(col_12, colIdx_1);
495
+ const value = getCellValue(record_0, col_12.dataIndex);
486
496
  const stickyPos_0 = stickyPositions[colKey_3];
487
- const isFixed_0 = !!col_10.fixed && !!scroll?.x;
488
- const cellProps = col_10.onCell?.(record_0, rowIdx) ?? {};
497
+ const isFixed_0 = !!col_12.fixed && !!scroll?.x;
498
+ const cellProps = col_12.onCell?.(record_0, rowIdx) ?? {};
489
499
  return /*#__PURE__*/ createElement("td", {
490
500
  ...cellProps,
491
501
  key: colKey_3,
492
502
  "data-tao-table-cell": "",
493
- "data-tao-align": col_10.align,
494
- "data-tao-ellipsis": col_10.ellipsis || void 0,
495
- "data-tao-fixed": isFixed_0 ? col_10.fixed : void 0,
503
+ "data-tao-align": col_12.align,
504
+ "data-tao-ellipsis": col_12.ellipsis || void 0,
505
+ "data-tao-fixed": isFixed_0 ? col_12.fixed : void 0,
496
506
  className: cx(resolvedClassNames["body.cell"], cellProps.className),
497
507
  style: {
498
508
  ...resolvedStyles["body.cell"],
@@ -508,23 +518,23 @@ function Table(t0) {
508
518
  } : {},
509
519
  ...cellProps.style
510
520
  }
511
- }, col_10.render ? col_10.render(value, record_0, rowIdx) : value);
521
+ }, col_12.render ? col_12.render(value, record_0, rowIdx) : value);
512
522
  })
513
523
  ]
514
524
  });
515
525
  });
516
- let t29;
517
- if ($[82] !== t28) {
518
- t29 = /*#__PURE__*/ jsx("tbody", {
519
- "data-tao-table-tbody": t27,
520
- children: t28
521
- });
522
- $[82] = t28;
523
- $[83] = t29;
524
- } else t29 = $[83];
525
526
  let t30;
526
- if ($[84] !== currentPage || $[85] !== handlePageChange || $[86] !== hasPagination || $[87] !== pageSize || $[88] !== paginationConfig?.pageSizeOptions || $[89] !== paginationConfig?.showSizeChanger || $[90] !== paginationConfig?.showTotal || $[91] !== resolvedClassNames || $[92] !== resolvedSize || $[93] !== resolvedStyles || $[94] !== totalForPagination) {
527
- t30 = hasPagination && totalForPagination > 0 && /*#__PURE__*/ jsx("div", {
527
+ if ($[85] !== t29) {
528
+ t30 = /*#__PURE__*/ jsx("tbody", {
529
+ "data-tao-table-tbody": t28,
530
+ children: t29
531
+ });
532
+ $[85] = t29;
533
+ $[86] = t30;
534
+ } else t30 = $[86];
535
+ let t31;
536
+ if ($[87] !== currentPage || $[88] !== handlePageChange || $[89] !== hasPagination || $[90] !== pageSize || $[91] !== paginationConfig?.pageSizeOptions || $[92] !== paginationConfig?.showSizeChanger || $[93] !== paginationConfig?.showTotal || $[94] !== resolvedClassNames || $[95] !== resolvedSize || $[96] !== resolvedStyles || $[97] !== totalForPagination) {
537
+ t31 = hasPagination && totalForPagination > 0 && /*#__PURE__*/ jsx("div", {
528
538
  "data-tao-table-pagination": "",
529
539
  className: resolvedClassNames.pagination,
530
540
  style: resolvedStyles.pagination,
@@ -539,19 +549,19 @@ function Table(t0) {
539
549
  showTotal: paginationConfig?.showTotal
540
550
  })
541
551
  });
542
- $[84] = currentPage;
543
- $[85] = handlePageChange;
544
- $[86] = hasPagination;
545
- $[87] = pageSize;
546
- $[88] = paginationConfig?.pageSizeOptions;
547
- $[89] = paginationConfig?.showSizeChanger;
548
- $[90] = paginationConfig?.showTotal;
549
- $[91] = resolvedClassNames;
550
- $[92] = resolvedSize;
551
- $[93] = resolvedStyles;
552
- $[94] = totalForPagination;
553
- $[95] = t30;
554
- } else t30 = $[95];
552
+ $[87] = currentPage;
553
+ $[88] = handlePageChange;
554
+ $[89] = hasPagination;
555
+ $[90] = pageSize;
556
+ $[91] = paginationConfig?.pageSizeOptions;
557
+ $[92] = paginationConfig?.showSizeChanger;
558
+ $[93] = paginationConfig?.showTotal;
559
+ $[94] = resolvedClassNames;
560
+ $[95] = resolvedSize;
561
+ $[96] = resolvedStyles;
562
+ $[97] = totalForPagination;
563
+ $[98] = t31;
564
+ } else t31 = $[98];
555
565
  return /*#__PURE__*/ jsxs("div", {
556
566
  "data-tao-table-wrapper": "",
557
567
  "data-tao-size": resolvedSize,
@@ -572,7 +582,7 @@ function Table(t0) {
572
582
  className: resolvedClassNames.scroll,
573
583
  style: resolvedStyles.scroll,
574
584
  children: [
575
- t26,
585
+ t27,
576
586
  /*#__PURE__*/ jsxs("table", {
577
587
  "data-tao-table": "",
578
588
  className: resolvedClassNames.table,
@@ -618,28 +628,28 @@ function Table(t0) {
618
628
  "data-tao-table-checkbox": ""
619
629
  })
620
630
  }),
621
- columns.map((col_9, i_6)=>{
622
- const colKey_2 = getColKey(col_9, i_6);
623
- const hasSorter = !!col_9.sorter;
624
- const hasFilter = !!(col_9.filters && col_9.filters.length > 0);
625
- const resolvedOrder = getResolvedSortOrder(col_9, colKey_2);
626
- const controlledFilterValues = col_9.filteredValue;
631
+ columns.map((col_11, i_6)=>{
632
+ const colKey_2 = getColKey(col_11, i_6);
633
+ const hasSorter = !!col_11.sorter;
634
+ const hasFilter = !!(col_11.filters && col_11.filters.length > 0);
635
+ const resolvedOrder = getResolvedSortOrder(col_11, colKey_2);
636
+ const controlledFilterValues = col_11.filteredValue;
627
637
  const activeFilterValues = controlledFilterValues ?? filterValues[colKey_2] ?? [];
628
638
  const stickyPos = stickyPositions[colKey_2];
629
- const isFixed = !!col_9.fixed && !!scroll?.x;
630
- const headerCellProps = col_9.onHeaderCell?.(col_9) ?? {};
639
+ const isFixed = !!col_11.fixed && !!scroll?.x;
640
+ const headerCellProps = col_11.onHeaderCell?.(col_11) ?? {};
631
641
  return /*#__PURE__*/ createElement("th", {
632
642
  ...headerCellProps,
633
643
  key: colKey_2,
634
644
  "data-tao-table-cell": "",
635
645
  "data-tao-table-header": "",
636
- "data-tao-align": col_9.align,
637
- "data-tao-fixed": isFixed ? col_9.fixed : void 0,
646
+ "data-tao-align": col_11.align,
647
+ "data-tao-fixed": isFixed ? col_11.fixed : void 0,
638
648
  "aria-sort": hasSorter ? "ascend" === resolvedOrder ? "ascending" : "descend" === resolvedOrder ? "descending" : "none" : void 0,
639
649
  className: cx(resolvedClassNames["header.cell"], headerCellProps.className),
640
650
  style: {
641
651
  ...resolvedStyles["header.cell"],
642
- width: col_9.width,
652
+ width: col_11.width,
643
653
  ...isFixed && stickyPos ? {
644
654
  position: "sticky",
645
655
  ...void 0 !== stickyPos.left ? {
@@ -663,9 +673,9 @@ function Table(t0) {
663
673
  "data-tao-sortable": "",
664
674
  className: resolvedClassNames["header.title"],
665
675
  style: resolvedStyles["header.title"],
666
- onClick: ()=>handleSort(colKey_2, col_9),
676
+ onClick: ()=>handleSort(colKey_2, col_11),
667
677
  children: [
668
- col_9.title,
678
+ col_11.title,
669
679
  /*#__PURE__*/ jsx(SortIcon, {
670
680
  order: resolvedOrder
671
681
  })
@@ -674,10 +684,10 @@ function Table(t0) {
674
684
  "data-tao-table-header-title": "",
675
685
  className: resolvedClassNames["header.title"],
676
686
  style: resolvedStyles["header.title"],
677
- children: col_9.title
687
+ children: col_11.title
678
688
  }),
679
689
  hasFilter && /*#__PURE__*/ jsx(TableFilterDropdown, {
680
- filters: col_9.filters,
690
+ filters: col_11.filters,
681
691
  activeValues: activeFilterValues,
682
692
  onSelect: (vals_0)=>handleFilter(colKey_2, vals_0)
683
693
  })
@@ -687,16 +697,19 @@ function Table(t0) {
687
697
  ]
688
698
  })
689
699
  }),
690
- t29
700
+ t30
691
701
  ]
692
702
  })
693
703
  ]
694
704
  }),
695
- t30
705
+ t31
696
706
  ]
697
707
  });
698
708
  }
699
- function _temp(c) {
709
+ function _temp2(c) {
700
710
  return c.defaultSortOrder;
701
711
  }
712
+ function _temp(col_0) {
713
+ return col_0.responsive;
714
+ }
702
715
  export { Table };