@gobolt/genesis 0.4.31 → 0.4.33
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/InfiniteScrollTable/InfiniteScrollTable.d.ts +1 -1
- package/dist/components/Table/Table.d.ts +2 -1
- package/dist/components/Table/TablePagination.d.ts +2 -1
- package/dist/components/Table/useTable.d.ts +3 -2
- package/dist/components/TableWithControls/TableWithControls.d.ts +2 -1
- package/dist/components/TableWithControls/useTableWithControls.d.ts +1 -1
- package/dist/index.cjs +37 -14
- package/dist/index.js +37 -14
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InfiniteScrollTableProps } from './types';
|
|
2
|
-
declare const InfiniteScrollTable: <T>({ columns: initialColumns, fetchService, title, scrollHeight, scrollWidth, useWindowScroll, onChange, rowSelection, onRowClick, onRowSelectionChange, onDataChange, filterFn, }: InfiniteScrollTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const InfiniteScrollTable: <T>({ columns: initialColumns, fetchService, title, scrollHeight, scrollWidth, useWindowScroll, onChange, rowSelection, onRowClick, onRowSelectionChange, onDataChange, filterFn, hasBulkSelection, }: InfiniteScrollTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default InfiniteScrollTable;
|
|
@@ -54,6 +54,7 @@ export interface TableProps<T extends Record<string, any>> {
|
|
|
54
54
|
index: number;
|
|
55
55
|
error: Error;
|
|
56
56
|
}) => void;
|
|
57
|
+
hasBulkSelection?: boolean;
|
|
57
58
|
}
|
|
58
59
|
export type TablePaginationType = {
|
|
59
60
|
pageSize?: number;
|
|
@@ -67,5 +68,5 @@ export type SorterResult<T> = {
|
|
|
67
68
|
field?: keyof T | string | React.Key | readonly React.Key[];
|
|
68
69
|
columnKey?: React.Key;
|
|
69
70
|
};
|
|
70
|
-
declare function Table<T extends Record<string, any>>({ columns, dataSource, rowKey, size, onChange, rowSelection, onRowClick, onRowSelectionChange, onDataChange, pagination, isMainContentCell, isInfiniteScroll, infiniteScrollConfig, enableRowKeyValidation, onRowKeyError, ...rest }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
declare function Table<T extends Record<string, any>>({ columns, dataSource, rowKey, size, onChange, rowSelection, onRowClick, onRowSelectionChange, onDataChange, pagination, isMainContentCell, isInfiniteScroll, infiniteScrollConfig, enableRowKeyValidation, onRowKeyError, hasBulkSelection, ...rest }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
71
72
|
export default Table;
|
|
@@ -10,6 +10,7 @@ export interface TablePaginationProps<T> {
|
|
|
10
10
|
paginationStyle?: PaginationStyle;
|
|
11
11
|
pageSize?: number;
|
|
12
12
|
isMainContentCell?: boolean;
|
|
13
|
+
hasBulkSelection?: boolean;
|
|
13
14
|
}
|
|
14
|
-
declare const TablePagination: <T extends Record<string, any>>({ columns, dataSource, rowSelection, onChange, onRowClick, paginationStyle, pageSize, isMainContentCell, }: TablePaginationProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const TablePagination: <T extends Record<string, any>>({ columns, dataSource, rowSelection, onChange, onRowClick, paginationStyle, pageSize, isMainContentCell, hasBulkSelection, }: TablePaginationProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export default TablePagination;
|
|
@@ -15,8 +15,9 @@ export type UseTableConfig = {
|
|
|
15
15
|
hasFilter?: boolean;
|
|
16
16
|
disableAutoFetch?: boolean;
|
|
17
17
|
dataSource?: any[];
|
|
18
|
+
hasBulkSelection?: boolean;
|
|
18
19
|
};
|
|
19
|
-
export declare const useTable: <T extends Record<string, any>>(useTableConfig:
|
|
20
|
+
export declare const useTable: <T extends Record<string, any>>(useTableConfig: UseTableConfig) => {
|
|
20
21
|
dataSource: (T & {
|
|
21
22
|
isSelected: boolean;
|
|
22
23
|
})[];
|
|
@@ -30,7 +31,7 @@ export declare const useTable: <T extends Record<string, any>>(useTableConfig: a
|
|
|
30
31
|
disabled?: boolean;
|
|
31
32
|
name?: string;
|
|
32
33
|
};
|
|
33
|
-
};
|
|
34
|
+
} | undefined;
|
|
34
35
|
selectedRows: T[];
|
|
35
36
|
selectedRowKeys: import('react').Key[];
|
|
36
37
|
hasSettings: boolean;
|
|
@@ -16,6 +16,7 @@ export interface TableWithControlsProps {
|
|
|
16
16
|
onRowClick?: (record: Record<string, any>, index: number, event: React.MouseEvent) => void;
|
|
17
17
|
onRowSelectionChange?: (setSelectedRowKeys: (keys: React.Key[]) => void) => void;
|
|
18
18
|
onDataChange?: (data: Record<string, any>[]) => void;
|
|
19
|
+
hasBulkSelection?: boolean;
|
|
19
20
|
}
|
|
20
|
-
declare const TableWithControls: ({ tableData, tableControlsData, onChange, onRowClick, onRowSelectionChange, onDataChange, tableType, isInfiniteScroll, infiniteScrollConfig, paginationStyle, }: TableWithControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare const TableWithControls: ({ tableData, tableControlsData, onChange, onRowClick, onRowSelectionChange, onDataChange, tableType, isInfiniteScroll, infiniteScrollConfig, paginationStyle, hasBulkSelection, }: TableWithControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export default TableWithControls;
|
|
@@ -30,7 +30,7 @@ export declare const useTableWithControls: (tableConfig: UseTableConfig) => {
|
|
|
30
30
|
disabled?: boolean;
|
|
31
31
|
name?: string;
|
|
32
32
|
};
|
|
33
|
-
};
|
|
33
|
+
} | undefined;
|
|
34
34
|
selectedRows: Record<string, any>[];
|
|
35
35
|
selectedRowKeys: import('react').Key[];
|
|
36
36
|
updateDataSource: (newDataSource: Record<string, any>[]) => void;
|
package/dist/index.cjs
CHANGED
|
@@ -59323,6 +59323,7 @@ const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 },
|
|
|
59323
59323
|
margin-bottom: 0 !important;
|
|
59324
59324
|
width: ${$isFullWidth ? "100%" : "auto"};
|
|
59325
59325
|
line-height: 1;
|
|
59326
|
+
-webkit-font-smoothing: antialiased;
|
|
59326
59327
|
|
|
59327
59328
|
&:disabled {
|
|
59328
59329
|
color: ${colors2.status.disabled.default} !important;
|
|
@@ -84824,7 +84825,8 @@ const InfiniteScrollTable = ({
|
|
|
84824
84825
|
onRowClick,
|
|
84825
84826
|
onRowSelectionChange,
|
|
84826
84827
|
onDataChange,
|
|
84827
|
-
filterFn
|
|
84828
|
+
filterFn,
|
|
84829
|
+
hasBulkSelection = true
|
|
84828
84830
|
}) => {
|
|
84829
84831
|
const observer = React.useRef();
|
|
84830
84832
|
const [scrollableNode, setScrollableNode] = React.useState(
|
|
@@ -85001,7 +85003,7 @@ const InfiniteScrollTable = ({
|
|
|
85001
85003
|
scroll: useWindowScroll ? { x: scrollWidth } : { y: scrollHeight, x: scrollWidth },
|
|
85002
85004
|
onChange: () => {
|
|
85003
85005
|
},
|
|
85004
|
-
rowSelection: finalRowSelection,
|
|
85006
|
+
...hasBulkSelection ? { rowSelection: finalRowSelection } : {},
|
|
85005
85007
|
onRow: (record, index2) => {
|
|
85006
85008
|
const rowProps = {};
|
|
85007
85009
|
if (index2 === dataSource.length - 1) {
|
|
@@ -85107,6 +85109,7 @@ function Table({
|
|
|
85107
85109
|
infiniteScrollConfig,
|
|
85108
85110
|
enableRowKeyValidation = process.env.NODE_ENV === "development",
|
|
85109
85111
|
onRowKeyError,
|
|
85112
|
+
hasBulkSelection = true,
|
|
85110
85113
|
...rest
|
|
85111
85114
|
}) {
|
|
85112
85115
|
const [selectedRowKeys, setSelectedRowKeys] = React__namespace.useState([]);
|
|
@@ -85159,7 +85162,8 @@ function Table({
|
|
|
85159
85162
|
useWindowScroll: infiniteScrollConfig.useWindowScroll,
|
|
85160
85163
|
onChange: isInfiniteScroll ? onChange : onChange,
|
|
85161
85164
|
onRowSelectionChange,
|
|
85162
|
-
onDataChange
|
|
85165
|
+
onDataChange,
|
|
85166
|
+
hasBulkSelection
|
|
85163
85167
|
}
|
|
85164
85168
|
);
|
|
85165
85169
|
}
|
|
@@ -85283,7 +85287,7 @@ function Table({
|
|
|
85283
85287
|
locale: { emptyText: "No Data" },
|
|
85284
85288
|
size,
|
|
85285
85289
|
onChange,
|
|
85286
|
-
rowSelection: enhancedRowSelection,
|
|
85290
|
+
...hasBulkSelection ? { rowSelection: enhancedRowSelection } : {},
|
|
85287
85291
|
onRow: (record, index2) => {
|
|
85288
85292
|
const isDisabled = rowSelection?.getCheckboxProps?.(record)?.disabled ?? false;
|
|
85289
85293
|
const recordKey = getRowKey(
|
|
@@ -85322,7 +85326,8 @@ const TablePagination = ({
|
|
|
85322
85326
|
onRowClick,
|
|
85323
85327
|
paginationStyle = PaginationStyle.SIMPLE,
|
|
85324
85328
|
pageSize = 10,
|
|
85325
|
-
isMainContentCell
|
|
85329
|
+
isMainContentCell,
|
|
85330
|
+
hasBulkSelection = true
|
|
85326
85331
|
}) => {
|
|
85327
85332
|
const [current, setCurrent] = React.useState(1);
|
|
85328
85333
|
const total = dataSource.length;
|
|
@@ -85336,7 +85341,7 @@ const TablePagination = ({
|
|
|
85336
85341
|
{
|
|
85337
85342
|
columns,
|
|
85338
85343
|
dataSource: paginatedData,
|
|
85339
|
-
rowSelection,
|
|
85344
|
+
...hasBulkSelection ? { rowSelection } : {},
|
|
85340
85345
|
onChange,
|
|
85341
85346
|
onRowClick,
|
|
85342
85347
|
pagination: false,
|
|
@@ -85388,7 +85393,8 @@ const useTable = (useTableConfig) => {
|
|
|
85388
85393
|
hasSettings = true,
|
|
85389
85394
|
hasFilter = true,
|
|
85390
85395
|
disableAutoFetch = false,
|
|
85391
|
-
dataSource: initialDataSource = []
|
|
85396
|
+
dataSource: initialDataSource = [],
|
|
85397
|
+
hasBulkSelection = true
|
|
85392
85398
|
} = useTableConfig;
|
|
85393
85399
|
const [originalData, setOriginalData] = React.useState(initialDataSource);
|
|
85394
85400
|
const [data, setData] = React.useState({
|
|
@@ -85406,6 +85412,11 @@ const useTable = (useTableConfig) => {
|
|
|
85406
85412
|
if (disableAutoFetch) {
|
|
85407
85413
|
isDisabledRef.current = true;
|
|
85408
85414
|
setLoading(false);
|
|
85415
|
+
setData({
|
|
85416
|
+
dataSource: initialDataSource,
|
|
85417
|
+
columns,
|
|
85418
|
+
error: null
|
|
85419
|
+
});
|
|
85409
85420
|
return;
|
|
85410
85421
|
}
|
|
85411
85422
|
if (hasFetchedRef.current || hasErrored || isDisabledRef.current) {
|
|
@@ -85484,12 +85495,12 @@ const useTable = (useTableConfig) => {
|
|
|
85484
85495
|
isDisabledRef.current = false;
|
|
85485
85496
|
setLoading(true);
|
|
85486
85497
|
}, []);
|
|
85487
|
-
const rowSelection = {
|
|
85498
|
+
const rowSelection = hasBulkSelection ? {
|
|
85488
85499
|
type: selectionType,
|
|
85489
85500
|
selectedRowKeys,
|
|
85490
85501
|
onChange: handleRowSelection,
|
|
85491
85502
|
getCheckboxProps: disableRowSelection
|
|
85492
|
-
};
|
|
85503
|
+
} : void 0;
|
|
85493
85504
|
const enhancedDataSource = React.useMemo(() => {
|
|
85494
85505
|
return data.dataSource.map((record) => {
|
|
85495
85506
|
const isSelected = selectedRowKeys.includes(record.id);
|
|
@@ -85861,7 +85872,8 @@ const TableWithControls = ({
|
|
|
85861
85872
|
tableType = "table",
|
|
85862
85873
|
isInfiniteScroll,
|
|
85863
85874
|
infiniteScrollConfig,
|
|
85864
|
-
paginationStyle
|
|
85875
|
+
paginationStyle,
|
|
85876
|
+
hasBulkSelection = true
|
|
85865
85877
|
}) => {
|
|
85866
85878
|
const [infiniteScrollData, setInfiniteScrollData] = React.useState({
|
|
85867
85879
|
totalPages: 0,
|
|
@@ -85920,7 +85932,8 @@ const TableWithControls = ({
|
|
|
85920
85932
|
scrollWidth: infiniteScrollConfig.scrollWidth,
|
|
85921
85933
|
useWindowScroll: infiniteScrollConfig.useWindowScroll,
|
|
85922
85934
|
onChange: onInfiniteScrollTableChange,
|
|
85923
|
-
rowSelection,
|
|
85935
|
+
...hasBulkSelection ? { rowSelection } : {},
|
|
85936
|
+
hasBulkSelection,
|
|
85924
85937
|
onRowClick: tableOnRowClick || onRowClick,
|
|
85925
85938
|
onRowSelectionChange,
|
|
85926
85939
|
onDataChange
|
|
@@ -85933,7 +85946,7 @@ const TableWithControls = ({
|
|
|
85933
85946
|
{
|
|
85934
85947
|
dataSource,
|
|
85935
85948
|
columns,
|
|
85936
|
-
rowSelection,
|
|
85949
|
+
...hasBulkSelection ? { rowSelection } : {},
|
|
85937
85950
|
onChange: onTableChange,
|
|
85938
85951
|
onRowClick,
|
|
85939
85952
|
paginationStyle
|
|
@@ -85947,7 +85960,7 @@ const TableWithControls = ({
|
|
|
85947
85960
|
{
|
|
85948
85961
|
dataSource,
|
|
85949
85962
|
columns,
|
|
85950
|
-
rowSelection,
|
|
85963
|
+
...hasBulkSelection ? { rowSelection } : {},
|
|
85951
85964
|
onChange: onTableChange,
|
|
85952
85965
|
onRowClick,
|
|
85953
85966
|
onRowSelectionChange
|
|
@@ -87124,6 +87137,7 @@ const useTableWithControls = (tableConfig) => {
|
|
|
87124
87137
|
const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing: sizing2 }, type4 = "primary", state = "active") => `
|
|
87125
87138
|
&.ant-tabs {
|
|
87126
87139
|
background: #F4F4F4;
|
|
87140
|
+
-webkit-font-smoothing: antialiased;
|
|
87127
87141
|
|
|
87128
87142
|
.ant-tabs-nav {
|
|
87129
87143
|
margin-bottom: 0;
|
|
@@ -87144,6 +87158,7 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
|
|
|
87144
87158
|
border-radius: 0 !important;
|
|
87145
87159
|
float: none; /* Prevent default float behavior */
|
|
87146
87160
|
position: relative;
|
|
87161
|
+
padding: 16px;
|
|
87147
87162
|
|
|
87148
87163
|
|
|
87149
87164
|
/* Use single side borders to prevent double borders */
|
|
@@ -87163,7 +87178,7 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
|
|
|
87163
87178
|
background: ${colors2.interactive.utility?.hover};
|
|
87164
87179
|
}
|
|
87165
87180
|
|
|
87166
|
-
|
|
87181
|
+
|
|
87167
87182
|
|
|
87168
87183
|
&:first-child {
|
|
87169
87184
|
border-radius: 0 !important;
|
|
@@ -87200,6 +87215,7 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
|
|
|
87200
87215
|
font-weight: 500;
|
|
87201
87216
|
font-size: 14px;
|
|
87202
87217
|
font-family: 'Inter' !important;
|
|
87218
|
+
border-top: 1px solid #ededed;
|
|
87203
87219
|
|
|
87204
87220
|
.ant-tabs-tab-btn {
|
|
87205
87221
|
color: ${colors2.onsurface["copy-dark"]} !important;
|
|
@@ -87208,15 +87224,22 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
|
|
|
87208
87224
|
|
|
87209
87225
|
&:hover {
|
|
87210
87226
|
background: ${colors2.interactive.utility?.hover};
|
|
87227
|
+
border-top: 1px solid #ededed;
|
|
87211
87228
|
}
|
|
87212
87229
|
|
|
87213
87230
|
&:focus {
|
|
87214
87231
|
background: ${colors2.interactive.utility?.active};
|
|
87232
|
+
border-top: 1px solid ${colors2.surface.border};
|
|
87215
87233
|
}
|
|
87216
87234
|
|
|
87217
87235
|
&:active {
|
|
87218
87236
|
background: ${colors2.interactive.utility?.active};
|
|
87219
87237
|
}
|
|
87238
|
+
|
|
87239
|
+
&:pressed {
|
|
87240
|
+
background: ${colors2.interactive.utility?.active};
|
|
87241
|
+
border-top: 1px solid ${colors2.surface.border};
|
|
87242
|
+
}
|
|
87220
87243
|
}
|
|
87221
87244
|
}
|
|
87222
87245
|
}
|
package/dist/index.js
CHANGED
|
@@ -59305,6 +59305,7 @@ const getGenesisTypographyClass = ({ colors: colors2, typography: typography2 },
|
|
|
59305
59305
|
margin-bottom: 0 !important;
|
|
59306
59306
|
width: ${$isFullWidth ? "100%" : "auto"};
|
|
59307
59307
|
line-height: 1;
|
|
59308
|
+
-webkit-font-smoothing: antialiased;
|
|
59308
59309
|
|
|
59309
59310
|
&:disabled {
|
|
59310
59311
|
color: ${colors2.status.disabled.default} !important;
|
|
@@ -84806,7 +84807,8 @@ const InfiniteScrollTable = ({
|
|
|
84806
84807
|
onRowClick,
|
|
84807
84808
|
onRowSelectionChange,
|
|
84808
84809
|
onDataChange,
|
|
84809
|
-
filterFn
|
|
84810
|
+
filterFn,
|
|
84811
|
+
hasBulkSelection = true
|
|
84810
84812
|
}) => {
|
|
84811
84813
|
const observer = useRef();
|
|
84812
84814
|
const [scrollableNode, setScrollableNode] = useState(
|
|
@@ -84983,7 +84985,7 @@ const InfiniteScrollTable = ({
|
|
|
84983
84985
|
scroll: useWindowScroll ? { x: scrollWidth } : { y: scrollHeight, x: scrollWidth },
|
|
84984
84986
|
onChange: () => {
|
|
84985
84987
|
},
|
|
84986
|
-
rowSelection: finalRowSelection,
|
|
84988
|
+
...hasBulkSelection ? { rowSelection: finalRowSelection } : {},
|
|
84987
84989
|
onRow: (record, index2) => {
|
|
84988
84990
|
const rowProps = {};
|
|
84989
84991
|
if (index2 === dataSource.length - 1) {
|
|
@@ -85089,6 +85091,7 @@ function Table({
|
|
|
85089
85091
|
infiniteScrollConfig,
|
|
85090
85092
|
enableRowKeyValidation = process.env.NODE_ENV === "development",
|
|
85091
85093
|
onRowKeyError,
|
|
85094
|
+
hasBulkSelection = true,
|
|
85092
85095
|
...rest
|
|
85093
85096
|
}) {
|
|
85094
85097
|
const [selectedRowKeys, setSelectedRowKeys] = React.useState([]);
|
|
@@ -85141,7 +85144,8 @@ function Table({
|
|
|
85141
85144
|
useWindowScroll: infiniteScrollConfig.useWindowScroll,
|
|
85142
85145
|
onChange: isInfiniteScroll ? onChange : onChange,
|
|
85143
85146
|
onRowSelectionChange,
|
|
85144
|
-
onDataChange
|
|
85147
|
+
onDataChange,
|
|
85148
|
+
hasBulkSelection
|
|
85145
85149
|
}
|
|
85146
85150
|
);
|
|
85147
85151
|
}
|
|
@@ -85265,7 +85269,7 @@ function Table({
|
|
|
85265
85269
|
locale: { emptyText: "No Data" },
|
|
85266
85270
|
size,
|
|
85267
85271
|
onChange,
|
|
85268
|
-
rowSelection: enhancedRowSelection,
|
|
85272
|
+
...hasBulkSelection ? { rowSelection: enhancedRowSelection } : {},
|
|
85269
85273
|
onRow: (record, index2) => {
|
|
85270
85274
|
const isDisabled = rowSelection?.getCheckboxProps?.(record)?.disabled ?? false;
|
|
85271
85275
|
const recordKey = getRowKey(
|
|
@@ -85304,7 +85308,8 @@ const TablePagination = ({
|
|
|
85304
85308
|
onRowClick,
|
|
85305
85309
|
paginationStyle = PaginationStyle.SIMPLE,
|
|
85306
85310
|
pageSize = 10,
|
|
85307
|
-
isMainContentCell
|
|
85311
|
+
isMainContentCell,
|
|
85312
|
+
hasBulkSelection = true
|
|
85308
85313
|
}) => {
|
|
85309
85314
|
const [current, setCurrent] = useState(1);
|
|
85310
85315
|
const total = dataSource.length;
|
|
@@ -85318,7 +85323,7 @@ const TablePagination = ({
|
|
|
85318
85323
|
{
|
|
85319
85324
|
columns,
|
|
85320
85325
|
dataSource: paginatedData,
|
|
85321
|
-
rowSelection,
|
|
85326
|
+
...hasBulkSelection ? { rowSelection } : {},
|
|
85322
85327
|
onChange,
|
|
85323
85328
|
onRowClick,
|
|
85324
85329
|
pagination: false,
|
|
@@ -85370,7 +85375,8 @@ const useTable = (useTableConfig) => {
|
|
|
85370
85375
|
hasSettings = true,
|
|
85371
85376
|
hasFilter = true,
|
|
85372
85377
|
disableAutoFetch = false,
|
|
85373
|
-
dataSource: initialDataSource = []
|
|
85378
|
+
dataSource: initialDataSource = [],
|
|
85379
|
+
hasBulkSelection = true
|
|
85374
85380
|
} = useTableConfig;
|
|
85375
85381
|
const [originalData, setOriginalData] = useState(initialDataSource);
|
|
85376
85382
|
const [data, setData] = useState({
|
|
@@ -85388,6 +85394,11 @@ const useTable = (useTableConfig) => {
|
|
|
85388
85394
|
if (disableAutoFetch) {
|
|
85389
85395
|
isDisabledRef.current = true;
|
|
85390
85396
|
setLoading(false);
|
|
85397
|
+
setData({
|
|
85398
|
+
dataSource: initialDataSource,
|
|
85399
|
+
columns,
|
|
85400
|
+
error: null
|
|
85401
|
+
});
|
|
85391
85402
|
return;
|
|
85392
85403
|
}
|
|
85393
85404
|
if (hasFetchedRef.current || hasErrored || isDisabledRef.current) {
|
|
@@ -85466,12 +85477,12 @@ const useTable = (useTableConfig) => {
|
|
|
85466
85477
|
isDisabledRef.current = false;
|
|
85467
85478
|
setLoading(true);
|
|
85468
85479
|
}, []);
|
|
85469
|
-
const rowSelection = {
|
|
85480
|
+
const rowSelection = hasBulkSelection ? {
|
|
85470
85481
|
type: selectionType,
|
|
85471
85482
|
selectedRowKeys,
|
|
85472
85483
|
onChange: handleRowSelection,
|
|
85473
85484
|
getCheckboxProps: disableRowSelection
|
|
85474
|
-
};
|
|
85485
|
+
} : void 0;
|
|
85475
85486
|
const enhancedDataSource = useMemo$1(() => {
|
|
85476
85487
|
return data.dataSource.map((record) => {
|
|
85477
85488
|
const isSelected = selectedRowKeys.includes(record.id);
|
|
@@ -85843,7 +85854,8 @@ const TableWithControls = ({
|
|
|
85843
85854
|
tableType = "table",
|
|
85844
85855
|
isInfiniteScroll,
|
|
85845
85856
|
infiniteScrollConfig,
|
|
85846
|
-
paginationStyle
|
|
85857
|
+
paginationStyle,
|
|
85858
|
+
hasBulkSelection = true
|
|
85847
85859
|
}) => {
|
|
85848
85860
|
const [infiniteScrollData, setInfiniteScrollData] = useState({
|
|
85849
85861
|
totalPages: 0,
|
|
@@ -85902,7 +85914,8 @@ const TableWithControls = ({
|
|
|
85902
85914
|
scrollWidth: infiniteScrollConfig.scrollWidth,
|
|
85903
85915
|
useWindowScroll: infiniteScrollConfig.useWindowScroll,
|
|
85904
85916
|
onChange: onInfiniteScrollTableChange,
|
|
85905
|
-
rowSelection,
|
|
85917
|
+
...hasBulkSelection ? { rowSelection } : {},
|
|
85918
|
+
hasBulkSelection,
|
|
85906
85919
|
onRowClick: tableOnRowClick || onRowClick,
|
|
85907
85920
|
onRowSelectionChange,
|
|
85908
85921
|
onDataChange
|
|
@@ -85915,7 +85928,7 @@ const TableWithControls = ({
|
|
|
85915
85928
|
{
|
|
85916
85929
|
dataSource,
|
|
85917
85930
|
columns,
|
|
85918
|
-
rowSelection,
|
|
85931
|
+
...hasBulkSelection ? { rowSelection } : {},
|
|
85919
85932
|
onChange: onTableChange,
|
|
85920
85933
|
onRowClick,
|
|
85921
85934
|
paginationStyle
|
|
@@ -85929,7 +85942,7 @@ const TableWithControls = ({
|
|
|
85929
85942
|
{
|
|
85930
85943
|
dataSource,
|
|
85931
85944
|
columns,
|
|
85932
|
-
rowSelection,
|
|
85945
|
+
...hasBulkSelection ? { rowSelection } : {},
|
|
85933
85946
|
onChange: onTableChange,
|
|
85934
85947
|
onRowClick,
|
|
85935
85948
|
onRowSelectionChange
|
|
@@ -87106,6 +87119,7 @@ const useTableWithControls = (tableConfig) => {
|
|
|
87106
87119
|
const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing: sizing2 }, type4 = "primary", state = "active") => `
|
|
87107
87120
|
&.ant-tabs {
|
|
87108
87121
|
background: #F4F4F4;
|
|
87122
|
+
-webkit-font-smoothing: antialiased;
|
|
87109
87123
|
|
|
87110
87124
|
.ant-tabs-nav {
|
|
87111
87125
|
margin-bottom: 0;
|
|
@@ -87126,6 +87140,7 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
|
|
|
87126
87140
|
border-radius: 0 !important;
|
|
87127
87141
|
float: none; /* Prevent default float behavior */
|
|
87128
87142
|
position: relative;
|
|
87143
|
+
padding: 16px;
|
|
87129
87144
|
|
|
87130
87145
|
|
|
87131
87146
|
/* Use single side borders to prevent double borders */
|
|
@@ -87145,7 +87160,7 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
|
|
|
87145
87160
|
background: ${colors2.interactive.utility?.hover};
|
|
87146
87161
|
}
|
|
87147
87162
|
|
|
87148
|
-
|
|
87163
|
+
|
|
87149
87164
|
|
|
87150
87165
|
&:first-child {
|
|
87151
87166
|
border-radius: 0 !important;
|
|
@@ -87182,6 +87197,7 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
|
|
|
87182
87197
|
font-weight: 500;
|
|
87183
87198
|
font-size: 14px;
|
|
87184
87199
|
font-family: 'Inter' !important;
|
|
87200
|
+
border-top: 1px solid #ededed;
|
|
87185
87201
|
|
|
87186
87202
|
.ant-tabs-tab-btn {
|
|
87187
87203
|
color: ${colors2.onsurface["copy-dark"]} !important;
|
|
@@ -87190,15 +87206,22 @@ const getGenesisClass = ({ colors: colors2, borderRadius: borderRadius2, sizing:
|
|
|
87190
87206
|
|
|
87191
87207
|
&:hover {
|
|
87192
87208
|
background: ${colors2.interactive.utility?.hover};
|
|
87209
|
+
border-top: 1px solid #ededed;
|
|
87193
87210
|
}
|
|
87194
87211
|
|
|
87195
87212
|
&:focus {
|
|
87196
87213
|
background: ${colors2.interactive.utility?.active};
|
|
87214
|
+
border-top: 1px solid ${colors2.surface.border};
|
|
87197
87215
|
}
|
|
87198
87216
|
|
|
87199
87217
|
&:active {
|
|
87200
87218
|
background: ${colors2.interactive.utility?.active};
|
|
87201
87219
|
}
|
|
87220
|
+
|
|
87221
|
+
&:pressed {
|
|
87222
|
+
background: ${colors2.interactive.utility?.active};
|
|
87223
|
+
border-top: 1px solid ${colors2.surface.border};
|
|
87224
|
+
}
|
|
87202
87225
|
}
|
|
87203
87226
|
}
|
|
87204
87227
|
}
|