lizaui 10.0.83 → 10.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/table/body/table-body-column.d.ts.map +1 -1
- package/dist/components/table/body/table-body-row.d.ts.map +1 -1
- package/dist/components/table/context/pinned-cell.context.d.ts +9 -0
- package/dist/components/table/context/pinned-cell.context.d.ts.map +1 -0
- package/dist/components/table/header/table-header-column.d.ts.map +1 -1
- package/dist/components/table/header/table-header-row.d.ts.map +1 -1
- package/dist/components/table/search/table-search-column.d.ts.map +1 -1
- package/dist/components/table/search/table-search-row.d.ts.map +1 -1
- package/dist/table/index.cjs.js +237 -175
- package/dist/table/index.cjs.js.map +1 -1
- package/dist/table/index.es.js +237 -175
- package/dist/table/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/table/util/get-pinned-cell-props.d.ts +0 -14
- package/dist/components/table/util/get-pinned-cell-props.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-body-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/body/table-body-column.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"table-body-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/body/table-body-column.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,eAAO,MAAM,eAAe,kHAuB3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-body-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/body/table-body-row.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"table-body-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/body/table-body-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,eAAO,MAAM,YAAY,0FA2ExB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PinnedColumnInfo } from '../interface/table.interface';
|
|
2
|
+
/**
|
|
3
|
+
* Per-cell context carrying the pinned offset of the column a cell belongs
|
|
4
|
+
* to. Row components provide it around each child (mapped by dataHeader
|
|
5
|
+
* index) and the leaf cell components consume it, so pinning survives
|
|
6
|
+
* custom wrapper components between the row and the actual cell.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PinnedCellContext: import('react').Context<PinnedColumnInfo | undefined>;
|
|
9
|
+
//# sourceMappingURL=pinned-cell.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pinned-cell.context.d.ts","sourceRoot":"","sources":["../../../../src/components/table/context/pinned-cell.context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,uDAAyD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-header-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/header/table-header-column.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"table-header-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/header/table-header-column.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AAK5D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAG3E,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAsIxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-header-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/header/table-header-row.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAqD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"table-header-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/header/table-header-row.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAqD,MAAM,OAAO,CAAC;AAK1F,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,8BAA8B,CAAC;AAK9F,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAoFlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-search-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/search/table-search-column.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"table-search-column.d.ts","sourceRoot":"","sources":["../../../../src/components/table/search/table-search-column.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAuB,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAevD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-search-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/search/table-search-row.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAA8C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"table-search-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/search/table-search-row.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAA8C,MAAM,OAAO,CAAC;AAKnF,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,8BAA8B,CAAC;AAI9F,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA8DjD,CAAC"}
|
package/dist/table/index.cjs.js
CHANGED
|
@@ -292,8 +292,9 @@ const TableBody = React.memo((props) => {
|
|
|
292
292
|
}
|
|
293
293
|
return t0;
|
|
294
294
|
});
|
|
295
|
+
const PinnedCellContext = React.createContext(void 0);
|
|
295
296
|
const TableBodyColumn = React.memo(React.forwardRef((t0, ref) => {
|
|
296
|
-
const $ = compilerRuntime.c(
|
|
297
|
+
const $ = compilerRuntime.c(19);
|
|
297
298
|
const {
|
|
298
299
|
children,
|
|
299
300
|
className,
|
|
@@ -302,59 +303,67 @@ const TableBodyColumn = React.memo(React.forwardRef((t0, ref) => {
|
|
|
302
303
|
colspan: t1
|
|
303
304
|
} = t0;
|
|
304
305
|
const colspan = t1 === void 0 ? void 0 : t1;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
const pinned = React.useContext(PinnedCellContext);
|
|
307
|
+
const t2 = pinned && "table__column_pinned";
|
|
308
|
+
const t3 = pinned?.isLast && "table__column_pinned--last";
|
|
309
|
+
let t4;
|
|
310
|
+
if ($[0] !== className || $[1] !== t2 || $[2] !== t3) {
|
|
311
|
+
t4 = tailwindMerge.twMerge("px-2 py-1 text-gray-900 dark:text-default-500 text-sm", className, t2, t3);
|
|
308
312
|
$[0] = className;
|
|
309
313
|
$[1] = t2;
|
|
314
|
+
$[2] = t3;
|
|
315
|
+
$[3] = t4;
|
|
310
316
|
} else {
|
|
311
|
-
|
|
317
|
+
t4 = $[3];
|
|
312
318
|
}
|
|
313
|
-
const mergedClass =
|
|
314
|
-
let
|
|
315
|
-
if ($[
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
+
const mergedClass = t4;
|
|
320
|
+
let t5;
|
|
321
|
+
if ($[4] !== pinned || $[5] !== style) {
|
|
322
|
+
t5 = pinned ? {
|
|
323
|
+
...style,
|
|
324
|
+
left: pinned.left
|
|
325
|
+
} : style;
|
|
326
|
+
$[4] = pinned;
|
|
327
|
+
$[5] = style;
|
|
328
|
+
$[6] = t5;
|
|
319
329
|
} else {
|
|
320
|
-
|
|
330
|
+
t5 = $[6];
|
|
321
331
|
}
|
|
322
|
-
const
|
|
323
|
-
let
|
|
324
|
-
if ($[
|
|
325
|
-
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
328
|
-
$[6] = text;
|
|
329
|
-
$[7] = t4;
|
|
332
|
+
const mergedStyle = t5;
|
|
333
|
+
let t6;
|
|
334
|
+
if ($[7] !== children) {
|
|
335
|
+
t6 = !children || typeof children === "string" && children.trim() === "";
|
|
336
|
+
$[7] = children;
|
|
337
|
+
$[8] = t6;
|
|
330
338
|
} else {
|
|
331
|
-
|
|
339
|
+
t6 = $[8];
|
|
332
340
|
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
$[9] =
|
|
338
|
-
$[10] =
|
|
339
|
-
$[11] =
|
|
340
|
-
$[12] =
|
|
341
|
-
$[13] = t5;
|
|
341
|
+
const isChildrenEmpty = t6;
|
|
342
|
+
let t7;
|
|
343
|
+
if ($[9] !== children || $[10] !== isChildrenEmpty || $[11] !== text) {
|
|
344
|
+
t7 = isChildrenEmpty ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-1 text-sm", children: text }) : children;
|
|
345
|
+
$[9] = children;
|
|
346
|
+
$[10] = isChildrenEmpty;
|
|
347
|
+
$[11] = text;
|
|
348
|
+
$[12] = t7;
|
|
342
349
|
} else {
|
|
343
|
-
|
|
350
|
+
t7 = $[12];
|
|
344
351
|
}
|
|
345
|
-
|
|
352
|
+
let t8;
|
|
353
|
+
if ($[13] !== colspan || $[14] !== mergedClass || $[15] !== mergedStyle || $[16] !== ref || $[17] !== t7) {
|
|
354
|
+
t8 = /* @__PURE__ */ jsxRuntime.jsx("td", { ref, className: mergedClass, style: mergedStyle, colSpan: colspan, children: t7 });
|
|
355
|
+
$[13] = colspan;
|
|
356
|
+
$[14] = mergedClass;
|
|
357
|
+
$[15] = mergedStyle;
|
|
358
|
+
$[16] = ref;
|
|
359
|
+
$[17] = t7;
|
|
360
|
+
$[18] = t8;
|
|
361
|
+
} else {
|
|
362
|
+
t8 = $[18];
|
|
363
|
+
}
|
|
364
|
+
return t8;
|
|
346
365
|
}));
|
|
347
366
|
TableBodyColumn.displayName = "TableBodyColumn";
|
|
348
|
-
const getPinnedCellProps = (child, pinned) => {
|
|
349
|
-
if (!pinned) return {};
|
|
350
|
-
return {
|
|
351
|
-
className: tailwindMerge.twMerge(child.props.className, "table__column_pinned", pinned.isLast && "table__column_pinned--last"),
|
|
352
|
-
style: {
|
|
353
|
-
...child.props.style,
|
|
354
|
-
left: pinned.left
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
};
|
|
358
367
|
const TableBodyRow = React.memo(React.forwardRef((t0, ref) => {
|
|
359
368
|
const $ = compilerRuntime.c(39);
|
|
360
369
|
const {
|
|
@@ -458,7 +467,7 @@ const TableBodyRow = React.memo(React.forwardRef((t0, ref) => {
|
|
|
458
467
|
if (!pinned || !React.isValidElement(child)) {
|
|
459
468
|
return child;
|
|
460
469
|
}
|
|
461
|
-
return
|
|
470
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PinnedCellContext.Provider, { value: pinned, children: child });
|
|
462
471
|
};
|
|
463
472
|
$[20] = pinnedColumns;
|
|
464
473
|
$[21] = t92;
|
|
@@ -839,7 +848,7 @@ function _temp2(e_0) {
|
|
|
839
848
|
return e_0.stopPropagation();
|
|
840
849
|
}
|
|
841
850
|
const TableHeaderColumn = React.memo((t0) => {
|
|
842
|
-
const $ = compilerRuntime.c(
|
|
851
|
+
const $ = compilerRuntime.c(60);
|
|
843
852
|
const {
|
|
844
853
|
children,
|
|
845
854
|
className,
|
|
@@ -874,6 +883,7 @@ const TableHeaderColumn = React.memo((t0) => {
|
|
|
874
883
|
onColumnResize,
|
|
875
884
|
onColumnResizeEnd
|
|
876
885
|
} = useTableContext();
|
|
886
|
+
const pinned = React.useContext(PinnedCellContext);
|
|
877
887
|
const isResizable = resizableProp ?? header?.resizable ?? false;
|
|
878
888
|
const columnId = header?.id || "";
|
|
879
889
|
const initialWidth = columnWidths?.[columnId] || size || header?.size || 150;
|
|
@@ -929,48 +939,64 @@ const TableHeaderColumn = React.memo((t0) => {
|
|
|
929
939
|
columnRef,
|
|
930
940
|
handlePointerDown
|
|
931
941
|
} = useColumnResize(t8);
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
942
|
+
const t9 = pinned && "table__column_pinned";
|
|
943
|
+
const t10 = pinned?.isLast && "table__column_pinned--last";
|
|
944
|
+
let t11;
|
|
945
|
+
if ($[15] !== className || $[16] !== t10 || $[17] !== t9) {
|
|
946
|
+
t11 = tailwindMerge.twMerge("table__header_th px-2 relative", className, t9, t10);
|
|
935
947
|
$[15] = className;
|
|
936
|
-
$[16] =
|
|
948
|
+
$[16] = t10;
|
|
949
|
+
$[17] = t9;
|
|
950
|
+
$[18] = t11;
|
|
937
951
|
} else {
|
|
938
|
-
|
|
952
|
+
t11 = $[18];
|
|
939
953
|
}
|
|
940
|
-
const mergedClass =
|
|
954
|
+
const mergedClass = t11;
|
|
941
955
|
const effectiveWidth = isResizable ? resizedWidth : size || header?.size;
|
|
942
|
-
const t10 = effectiveWidth ? `${effectiveWidth}px` : style.width;
|
|
943
|
-
const t11 = effectiveWidth ? `${effectiveWidth}px` : style.minWidth;
|
|
944
956
|
let t12;
|
|
945
|
-
if ($[
|
|
946
|
-
t12 = {
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
};
|
|
951
|
-
$[17] = style;
|
|
952
|
-
$[18] = t10;
|
|
953
|
-
$[19] = t11;
|
|
957
|
+
if ($[19] !== pinned) {
|
|
958
|
+
t12 = pinned ? {
|
|
959
|
+
left: pinned.left
|
|
960
|
+
} : {};
|
|
961
|
+
$[19] = pinned;
|
|
954
962
|
$[20] = t12;
|
|
955
963
|
} else {
|
|
956
964
|
t12 = $[20];
|
|
957
965
|
}
|
|
958
|
-
const
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
966
|
+
const t13 = effectiveWidth ? `${effectiveWidth}px` : style.width;
|
|
967
|
+
const t14 = effectiveWidth ? `${effectiveWidth}px` : style.minWidth;
|
|
968
|
+
let t15;
|
|
969
|
+
if ($[21] !== style || $[22] !== t12 || $[23] !== t13 || $[24] !== t14) {
|
|
970
|
+
t15 = {
|
|
971
|
+
...style,
|
|
972
|
+
...t12,
|
|
973
|
+
width: t13,
|
|
974
|
+
minWidth: t14
|
|
975
|
+
};
|
|
976
|
+
$[21] = style;
|
|
977
|
+
$[22] = t12;
|
|
978
|
+
$[23] = t13;
|
|
979
|
+
$[24] = t14;
|
|
980
|
+
$[25] = t15;
|
|
981
|
+
} else {
|
|
982
|
+
t15 = $[25];
|
|
983
|
+
}
|
|
984
|
+
const mergedStyle = t15;
|
|
985
|
+
let t16;
|
|
986
|
+
if ($[26] !== children) {
|
|
987
|
+
t16 = !children || typeof children === "string" && children.trim() === "";
|
|
988
|
+
$[26] = children;
|
|
989
|
+
$[27] = t16;
|
|
964
990
|
} else {
|
|
965
|
-
|
|
991
|
+
t16 = $[27];
|
|
966
992
|
}
|
|
967
|
-
const isChildrenEmpty =
|
|
993
|
+
const isChildrenEmpty = t16;
|
|
968
994
|
const isSortable = header?.sort;
|
|
969
995
|
header?.id;
|
|
970
996
|
const isCurrentlySorted = sortDescriptor?.column === header?.id;
|
|
971
|
-
let
|
|
972
|
-
if ($[
|
|
973
|
-
|
|
997
|
+
let t17;
|
|
998
|
+
if ($[28] !== header || $[29] !== isResizing || $[30] !== isSortable || $[31] !== onSortChange) {
|
|
999
|
+
t17 = (e) => {
|
|
974
1000
|
if (isResizing) {
|
|
975
1001
|
e.preventDefault();
|
|
976
1002
|
return;
|
|
@@ -979,18 +1005,18 @@ const TableHeaderColumn = React.memo((t0) => {
|
|
|
979
1005
|
onSortChange(header.id);
|
|
980
1006
|
}
|
|
981
1007
|
};
|
|
982
|
-
$[
|
|
983
|
-
$[
|
|
984
|
-
$[
|
|
985
|
-
$[
|
|
986
|
-
$[
|
|
1008
|
+
$[28] = header;
|
|
1009
|
+
$[29] = isResizing;
|
|
1010
|
+
$[30] = isSortable;
|
|
1011
|
+
$[31] = onSortChange;
|
|
1012
|
+
$[32] = t17;
|
|
987
1013
|
} else {
|
|
988
|
-
|
|
1014
|
+
t17 = $[32];
|
|
989
1015
|
}
|
|
990
|
-
const handleSort =
|
|
991
|
-
let
|
|
992
|
-
if ($[
|
|
993
|
-
|
|
1016
|
+
const handleSort = t17;
|
|
1017
|
+
let t18;
|
|
1018
|
+
if ($[33] !== icon || $[34] !== isCurrentlySorted || $[35] !== isSortable || $[36] !== sortDescriptor) {
|
|
1019
|
+
t18 = () => {
|
|
994
1020
|
if (!isSortable) {
|
|
995
1021
|
return icon;
|
|
996
1022
|
}
|
|
@@ -999,31 +1025,31 @@ const TableHeaderColumn = React.memo((t0) => {
|
|
|
999
1025
|
}
|
|
1000
1026
|
return /* @__PURE__ */ jsxRuntime.jsx(chevronsUpDown.ChevronsUpDown, { className: "h-4 w-4 text-default-300" });
|
|
1001
1027
|
};
|
|
1002
|
-
$[
|
|
1003
|
-
$[
|
|
1004
|
-
$[
|
|
1005
|
-
$[
|
|
1006
|
-
$[
|
|
1007
|
-
} else {
|
|
1008
|
-
|
|
1009
|
-
}
|
|
1010
|
-
const renderSortIcon =
|
|
1011
|
-
const
|
|
1012
|
-
const
|
|
1013
|
-
const
|
|
1014
|
-
let
|
|
1015
|
-
if ($[
|
|
1016
|
-
|
|
1017
|
-
$[
|
|
1018
|
-
$[
|
|
1019
|
-
$[
|
|
1020
|
-
$[
|
|
1021
|
-
} else {
|
|
1022
|
-
|
|
1023
|
-
}
|
|
1024
|
-
let
|
|
1025
|
-
if ($[
|
|
1026
|
-
|
|
1028
|
+
$[33] = icon;
|
|
1029
|
+
$[34] = isCurrentlySorted;
|
|
1030
|
+
$[35] = isSortable;
|
|
1031
|
+
$[36] = sortDescriptor;
|
|
1032
|
+
$[37] = t18;
|
|
1033
|
+
} else {
|
|
1034
|
+
t18 = $[37];
|
|
1035
|
+
}
|
|
1036
|
+
const renderSortIcon = t18;
|
|
1037
|
+
const t19 = isResizable ? columnRef : void 0;
|
|
1038
|
+
const t20 = isSortable ? "cursor-pointer transition-colors" : "";
|
|
1039
|
+
const t21 = isResizing && "select-none";
|
|
1040
|
+
let t22;
|
|
1041
|
+
if ($[38] !== mergedClass || $[39] !== t20 || $[40] !== t21) {
|
|
1042
|
+
t22 = tailwindMerge.twMerge(mergedClass, t20, t21);
|
|
1043
|
+
$[38] = mergedClass;
|
|
1044
|
+
$[39] = t20;
|
|
1045
|
+
$[40] = t21;
|
|
1046
|
+
$[41] = t22;
|
|
1047
|
+
} else {
|
|
1048
|
+
t22 = $[41];
|
|
1049
|
+
}
|
|
1050
|
+
let t23;
|
|
1051
|
+
if ($[42] !== children || $[43] !== header?.information || $[44] !== isChildrenEmpty || $[45] !== renderSortIcon || $[46] !== text) {
|
|
1052
|
+
t23 = isChildrenEmpty ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center gap-x-2 font-medium", children: [
|
|
1027
1053
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
1028
1054
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-1 text-xs text-foreground-500 dark:text-foreground-500 text-left", children: text }),
|
|
1029
1055
|
header?.information && /* @__PURE__ */ jsxRuntime.jsx(tooltip.Tooltip, { content: header?.information || "", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { "aria-hidden": "true", role: "img", className: "text-default-300 cursor-pointer dark:text-foreground-500", width: 16, height: 16, viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsxs("g", { fill: "none", children: [
|
|
@@ -1034,43 +1060,43 @@ const TableHeaderColumn = React.memo((t0) => {
|
|
|
1034
1060
|
] }),
|
|
1035
1061
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 flex justify-end", children: renderSortIcon() })
|
|
1036
1062
|
] }) : children;
|
|
1037
|
-
$[
|
|
1038
|
-
$[
|
|
1039
|
-
$[
|
|
1040
|
-
$[
|
|
1041
|
-
$[
|
|
1042
|
-
$[
|
|
1043
|
-
} else {
|
|
1044
|
-
|
|
1045
|
-
}
|
|
1046
|
-
let
|
|
1047
|
-
if ($[
|
|
1048
|
-
|
|
1049
|
-
$[
|
|
1050
|
-
$[
|
|
1051
|
-
$[
|
|
1052
|
-
$[
|
|
1053
|
-
} else {
|
|
1054
|
-
|
|
1055
|
-
}
|
|
1056
|
-
let
|
|
1057
|
-
if ($[
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1063
|
+
$[42] = children;
|
|
1064
|
+
$[43] = header?.information;
|
|
1065
|
+
$[44] = isChildrenEmpty;
|
|
1066
|
+
$[45] = renderSortIcon;
|
|
1067
|
+
$[46] = text;
|
|
1068
|
+
$[47] = t23;
|
|
1069
|
+
} else {
|
|
1070
|
+
t23 = $[47];
|
|
1071
|
+
}
|
|
1072
|
+
let t24;
|
|
1073
|
+
if ($[48] !== handlePointerDown || $[49] !== isResizable || $[50] !== isResizing) {
|
|
1074
|
+
t24 = isResizable && /* @__PURE__ */ jsxRuntime.jsx(ResizeHandle, { onPointerDown: handlePointerDown, isResizing });
|
|
1075
|
+
$[48] = handlePointerDown;
|
|
1076
|
+
$[49] = isResizable;
|
|
1077
|
+
$[50] = isResizing;
|
|
1078
|
+
$[51] = t24;
|
|
1079
|
+
} else {
|
|
1080
|
+
t24 = $[51];
|
|
1081
|
+
}
|
|
1082
|
+
let t25;
|
|
1083
|
+
if ($[52] !== colspan || $[53] !== handleSort || $[54] !== mergedStyle || $[55] !== t19 || $[56] !== t22 || $[57] !== t23 || $[58] !== t24) {
|
|
1084
|
+
t25 = /* @__PURE__ */ jsxRuntime.jsxs("th", { ref: t19, className: t22, style: mergedStyle, colSpan: colspan, onClick: handleSort, children: [
|
|
1085
|
+
t23,
|
|
1086
|
+
t24
|
|
1061
1087
|
] });
|
|
1062
|
-
$[
|
|
1063
|
-
$[
|
|
1064
|
-
$[
|
|
1065
|
-
$[
|
|
1066
|
-
$[
|
|
1067
|
-
$[
|
|
1068
|
-
$[
|
|
1069
|
-
$[
|
|
1070
|
-
} else {
|
|
1071
|
-
|
|
1072
|
-
}
|
|
1073
|
-
return
|
|
1088
|
+
$[52] = colspan;
|
|
1089
|
+
$[53] = handleSort;
|
|
1090
|
+
$[54] = mergedStyle;
|
|
1091
|
+
$[55] = t19;
|
|
1092
|
+
$[56] = t22;
|
|
1093
|
+
$[57] = t23;
|
|
1094
|
+
$[58] = t24;
|
|
1095
|
+
$[59] = t25;
|
|
1096
|
+
} else {
|
|
1097
|
+
t25 = $[59];
|
|
1098
|
+
}
|
|
1099
|
+
return t25;
|
|
1074
1100
|
});
|
|
1075
1101
|
TableHeaderColumn.displayName = "TableHeaderColumn";
|
|
1076
1102
|
const TableHeaderRow = React.memo((t0) => {
|
|
@@ -1167,11 +1193,14 @@ const TableHeaderRow = React.memo((t0) => {
|
|
|
1167
1193
|
item: el,
|
|
1168
1194
|
index
|
|
1169
1195
|
});
|
|
1196
|
+
if (!React.isValidElement(child)) {
|
|
1197
|
+
return null;
|
|
1198
|
+
}
|
|
1170
1199
|
const keyValue = el.id ?? el.header ?? index;
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
})
|
|
1200
|
+
const pinned = pinnedColumns?.[index];
|
|
1201
|
+
return pinned ? /* @__PURE__ */ jsxRuntime.jsx(PinnedCellContext.Provider, { value: pinned, children: child }, keyValue) : React.cloneElement(child, {
|
|
1202
|
+
key: keyValue
|
|
1203
|
+
});
|
|
1175
1204
|
};
|
|
1176
1205
|
$[20] = children;
|
|
1177
1206
|
$[21] = pinnedColumns;
|
|
@@ -1193,11 +1222,17 @@ const TableHeaderRow = React.memo((t0) => {
|
|
|
1193
1222
|
if ($[23] !== children || $[24] !== dataHeader || $[25] !== pinnedColumns || $[26] !== props) {
|
|
1194
1223
|
let t82;
|
|
1195
1224
|
if ($[28] !== dataHeader || $[29] !== pinnedColumns || $[30] !== props) {
|
|
1196
|
-
t82 = (child_0, index_0) =>
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1225
|
+
t82 = (child_0, index_0) => {
|
|
1226
|
+
if (!React.isValidElement(child_0)) {
|
|
1227
|
+
return child_0;
|
|
1228
|
+
}
|
|
1229
|
+
const cloned = React.cloneElement(child_0, {
|
|
1230
|
+
key: dataHeader[index_0]?.id ?? dataHeader[index_0]?.header ?? index_0,
|
|
1231
|
+
...props
|
|
1232
|
+
});
|
|
1233
|
+
const pinned_0 = pinnedColumns?.[index_0];
|
|
1234
|
+
return pinned_0 ? /* @__PURE__ */ jsxRuntime.jsx(PinnedCellContext.Provider, { value: pinned_0, children: cloned }) : cloned;
|
|
1235
|
+
};
|
|
1201
1236
|
$[28] = dataHeader;
|
|
1202
1237
|
$[29] = pinnedColumns;
|
|
1203
1238
|
$[30] = props;
|
|
@@ -1276,7 +1311,7 @@ const TableHeaderRow = React.memo((t0) => {
|
|
|
1276
1311
|
});
|
|
1277
1312
|
TableHeaderRow.displayName = "TableHeaderRow";
|
|
1278
1313
|
const TableSearchColumn = React.memo((t0) => {
|
|
1279
|
-
const $ = compilerRuntime.c(
|
|
1314
|
+
const $ = compilerRuntime.c(14);
|
|
1280
1315
|
const {
|
|
1281
1316
|
children,
|
|
1282
1317
|
className: t1,
|
|
@@ -1294,27 +1329,45 @@ const TableSearchColumn = React.memo((t0) => {
|
|
|
1294
1329
|
}
|
|
1295
1330
|
const style = t4;
|
|
1296
1331
|
const colspan = t3 === void 0 ? void 0 : t3;
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1332
|
+
const pinned = React.useContext(PinnedCellContext);
|
|
1333
|
+
const t5 = pinned && "table__column_pinned";
|
|
1334
|
+
const t6 = pinned?.isLast && "table__column_pinned--last";
|
|
1335
|
+
let t7;
|
|
1336
|
+
if ($[2] !== className || $[3] !== t5 || $[4] !== t6) {
|
|
1337
|
+
t7 = tailwindMerge.twMerge("table-column-search px-2", className, t5, t6);
|
|
1300
1338
|
$[2] = className;
|
|
1301
1339
|
$[3] = t5;
|
|
1340
|
+
$[4] = t6;
|
|
1341
|
+
$[5] = t7;
|
|
1302
1342
|
} else {
|
|
1303
|
-
|
|
1343
|
+
t7 = $[5];
|
|
1304
1344
|
}
|
|
1305
|
-
const mergedClass =
|
|
1306
|
-
let
|
|
1307
|
-
if ($[
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1345
|
+
const mergedClass = t7;
|
|
1346
|
+
let t8;
|
|
1347
|
+
if ($[6] !== pinned || $[7] !== style) {
|
|
1348
|
+
t8 = pinned ? {
|
|
1349
|
+
...style,
|
|
1350
|
+
left: pinned.left
|
|
1351
|
+
} : style;
|
|
1352
|
+
$[6] = pinned;
|
|
1312
1353
|
$[7] = style;
|
|
1313
|
-
$[8] =
|
|
1354
|
+
$[8] = t8;
|
|
1314
1355
|
} else {
|
|
1315
|
-
|
|
1356
|
+
t8 = $[8];
|
|
1316
1357
|
}
|
|
1317
|
-
|
|
1358
|
+
const mergedStyle = t8;
|
|
1359
|
+
let t9;
|
|
1360
|
+
if ($[9] !== children || $[10] !== colspan || $[11] !== mergedClass || $[12] !== mergedStyle) {
|
|
1361
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx("th", { className: mergedClass, style: mergedStyle, colSpan: colspan, children });
|
|
1362
|
+
$[9] = children;
|
|
1363
|
+
$[10] = colspan;
|
|
1364
|
+
$[11] = mergedClass;
|
|
1365
|
+
$[12] = mergedStyle;
|
|
1366
|
+
$[13] = t9;
|
|
1367
|
+
} else {
|
|
1368
|
+
t9 = $[13];
|
|
1369
|
+
}
|
|
1370
|
+
return t9;
|
|
1318
1371
|
});
|
|
1319
1372
|
TableSearchColumn.displayName = "TableSearchColumn";
|
|
1320
1373
|
const TableSearchRow = React.memo((t0) => {
|
|
@@ -1388,11 +1441,14 @@ const TableSearchRow = React.memo((t0) => {
|
|
|
1388
1441
|
item: el,
|
|
1389
1442
|
index
|
|
1390
1443
|
});
|
|
1444
|
+
if (!React.isValidElement(child)) {
|
|
1445
|
+
return null;
|
|
1446
|
+
}
|
|
1391
1447
|
const keyValue = el.id ?? el.header ?? index;
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
})
|
|
1448
|
+
const pinned = pinnedColumns?.[index];
|
|
1449
|
+
return pinned ? /* @__PURE__ */ jsxRuntime.jsx(PinnedCellContext.Provider, { value: pinned, children: child }, keyValue) : React.cloneElement(child, {
|
|
1450
|
+
key: keyValue
|
|
1451
|
+
});
|
|
1396
1452
|
};
|
|
1397
1453
|
$[16] = children;
|
|
1398
1454
|
$[17] = pinnedColumns;
|
|
@@ -1414,10 +1470,16 @@ const TableSearchRow = React.memo((t0) => {
|
|
|
1414
1470
|
if ($[19] !== children || $[20] !== dataHeader || $[21] !== pinnedColumns) {
|
|
1415
1471
|
let t72;
|
|
1416
1472
|
if ($[23] !== dataHeader || $[24] !== pinnedColumns) {
|
|
1417
|
-
t72 = (child_0, index_0) =>
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1473
|
+
t72 = (child_0, index_0) => {
|
|
1474
|
+
if (!React.isValidElement(child_0)) {
|
|
1475
|
+
return child_0;
|
|
1476
|
+
}
|
|
1477
|
+
const cloned = React.cloneElement(child_0, {
|
|
1478
|
+
key: dataHeader[index_0]?.id ?? dataHeader[index_0]?.header ?? index_0
|
|
1479
|
+
});
|
|
1480
|
+
const pinned_0 = pinnedColumns?.[index_0];
|
|
1481
|
+
return pinned_0 ? /* @__PURE__ */ jsxRuntime.jsx(PinnedCellContext.Provider, { value: pinned_0, children: cloned }) : cloned;
|
|
1482
|
+
};
|
|
1421
1483
|
$[23] = dataHeader;
|
|
1422
1484
|
$[24] = pinnedColumns;
|
|
1423
1485
|
$[25] = t72;
|