@majoo-ui/react 1.58.20-rc.1 → 1.58.20-rc.2
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/components/modalDialog/ModalDialog.d.ts +26 -10
- package/components/table/Table.d.ts +7 -3
- package/index.esm.js +23 -65
- package/index.umd.js +23 -67
- package/package.json +1 -1
|
@@ -54,7 +54,9 @@ export declare const ModalDialogFooter: import("@stitches/react/types/styled-com
|
|
|
54
54
|
}) => {
|
|
55
55
|
marginBottom: {
|
|
56
56
|
readonly [$$ScaleValue]: "space";
|
|
57
|
-
};
|
|
57
|
+
}; /**
|
|
58
|
+
* @deprecated Use size or css props css={{width: width css property}} instead. This will be deleted in the future to limit unnecessary props.
|
|
59
|
+
*/
|
|
58
60
|
};
|
|
59
61
|
ml: (value: {
|
|
60
62
|
readonly [$$ScaleValue]: "space";
|
|
@@ -150,7 +152,9 @@ export declare const ModalDialogTitle: import("@stitches/react/types/styled-comp
|
|
|
150
152
|
}) => {
|
|
151
153
|
marginBottom: {
|
|
152
154
|
readonly [$$ScaleValue]: "space";
|
|
153
|
-
};
|
|
155
|
+
}; /**
|
|
156
|
+
* @deprecated Use size or css props css={{width: width css property}} instead. This will be deleted in the future to limit unnecessary props.
|
|
157
|
+
*/
|
|
154
158
|
};
|
|
155
159
|
ml: (value: {
|
|
156
160
|
readonly [$$ScaleValue]: "space";
|
|
@@ -246,7 +250,9 @@ export declare const ModalDialogContent: import("@stitches/react/types/styled-co
|
|
|
246
250
|
}) => {
|
|
247
251
|
marginBottom: {
|
|
248
252
|
readonly [$$ScaleValue]: "space";
|
|
249
|
-
};
|
|
253
|
+
}; /**
|
|
254
|
+
* @deprecated Use size or css props css={{width: width css property}} instead. This will be deleted in the future to limit unnecessary props.
|
|
255
|
+
*/
|
|
250
256
|
};
|
|
251
257
|
ml: (value: {
|
|
252
258
|
readonly [$$ScaleValue]: "space";
|
|
@@ -290,7 +296,7 @@ export declare const ModalDialogContent: import("@stitches/react/types/styled-co
|
|
|
290
296
|
backgroundColor: string;
|
|
291
297
|
};
|
|
292
298
|
}>>;
|
|
293
|
-
export declare const ModalDialogTrigger: import("@stitches/react/types/styled-component").StyledComponent<"
|
|
299
|
+
export declare const ModalDialogTrigger: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>, {}, {
|
|
294
300
|
sm: "(min-width: 359px)";
|
|
295
301
|
md: "(min-width: 767px)";
|
|
296
302
|
lg: "(min-width: 1023px)";
|
|
@@ -342,7 +348,9 @@ export declare const ModalDialogTrigger: import("@stitches/react/types/styled-co
|
|
|
342
348
|
}) => {
|
|
343
349
|
marginBottom: {
|
|
344
350
|
readonly [$$ScaleValue]: "space";
|
|
345
|
-
};
|
|
351
|
+
}; /**
|
|
352
|
+
* @deprecated Use size or css props css={{width: width css property}} instead. This will be deleted in the future to limit unnecessary props.
|
|
353
|
+
*/
|
|
346
354
|
};
|
|
347
355
|
ml: (value: {
|
|
348
356
|
readonly [$$ScaleValue]: "space";
|
|
@@ -429,7 +437,7 @@ interface ModalDialogProps extends Omit<IDialog, 'children'>, DialogContentProps
|
|
|
429
437
|
*/
|
|
430
438
|
declare const ModalDialog: {
|
|
431
439
|
(props: ModalDialogProps): JSX.Element;
|
|
432
|
-
Trigger: import("@stitches/react/types/styled-component").StyledComponent<"
|
|
440
|
+
Trigger: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>, {}, {
|
|
433
441
|
sm: "(min-width: 359px)";
|
|
434
442
|
md: "(min-width: 767px)";
|
|
435
443
|
lg: "(min-width: 1023px)";
|
|
@@ -481,7 +489,9 @@ declare const ModalDialog: {
|
|
|
481
489
|
}) => {
|
|
482
490
|
marginBottom: {
|
|
483
491
|
readonly [$$ScaleValue]: "space";
|
|
484
|
-
};
|
|
492
|
+
}; /**
|
|
493
|
+
* @deprecated Use size or css props css={{width: width css property}} instead. This will be deleted in the future to limit unnecessary props.
|
|
494
|
+
*/
|
|
485
495
|
};
|
|
486
496
|
ml: (value: {
|
|
487
497
|
readonly [$$ScaleValue]: "space";
|
|
@@ -577,7 +587,9 @@ declare const ModalDialog: {
|
|
|
577
587
|
}) => {
|
|
578
588
|
marginBottom: {
|
|
579
589
|
readonly [$$ScaleValue]: "space";
|
|
580
|
-
};
|
|
590
|
+
}; /**
|
|
591
|
+
* @deprecated Use size or css props css={{width: width css property}} instead. This will be deleted in the future to limit unnecessary props.
|
|
592
|
+
*/
|
|
581
593
|
};
|
|
582
594
|
ml: (value: {
|
|
583
595
|
readonly [$$ScaleValue]: "space";
|
|
@@ -673,7 +685,9 @@ declare const ModalDialog: {
|
|
|
673
685
|
}) => {
|
|
674
686
|
marginBottom: {
|
|
675
687
|
readonly [$$ScaleValue]: "space";
|
|
676
|
-
};
|
|
688
|
+
}; /**
|
|
689
|
+
* @deprecated Use size or css props css={{width: width css property}} instead. This will be deleted in the future to limit unnecessary props.
|
|
690
|
+
*/
|
|
677
691
|
};
|
|
678
692
|
ml: (value: {
|
|
679
693
|
readonly [$$ScaleValue]: "space";
|
|
@@ -769,7 +783,9 @@ declare const ModalDialog: {
|
|
|
769
783
|
}) => {
|
|
770
784
|
marginBottom: {
|
|
771
785
|
readonly [$$ScaleValue]: "space";
|
|
772
|
-
};
|
|
786
|
+
}; /**
|
|
787
|
+
* @deprecated Use size or css props css={{width: width css property}} instead. This will be deleted in the future to limit unnecessary props.
|
|
788
|
+
*/
|
|
773
789
|
};
|
|
774
790
|
ml: (value: {
|
|
775
791
|
readonly [$$ScaleValue]: "space";
|
|
@@ -1285,10 +1285,10 @@ export interface TableProps {
|
|
|
1285
1285
|
*/
|
|
1286
1286
|
id?: string | null;
|
|
1287
1287
|
/**
|
|
1288
|
-
* Option for
|
|
1289
|
-
* can be filled with
|
|
1288
|
+
* Option for customize column to show in table <br />
|
|
1289
|
+
* can be filled with 'string' value eg: 'product_table'
|
|
1290
1290
|
*/
|
|
1291
|
-
customizableColumn?:
|
|
1291
|
+
customizableColumn?: string | null;
|
|
1292
1292
|
}
|
|
1293
1293
|
export declare function Table({ columns, data: rawData, keyId, pageIndex: controlledPageIndex, totalPage, totalData, fetchData, hideDataInfo, rowsPerPageOptions, emptyDataMessage, customEmptyDataProps: emptyDataProps, isLoading, css, headerCss, hideHeader, onSelectedChange, isInfiniteScroll, hasMoreItems, rowLimit, cellAlign, selectedIds, rowGroup, decoration, hiddenColumns, columnOrder, customRowsStyle, isMobileLayout, showDuplicatedData, onRowClick, hidePagination, searchQuery, additionalExceptionIds, onExpand, id, customizableColumn, }: TableProps): JSX.Element;
|
|
1294
1294
|
export interface TableColumnProps {
|
|
@@ -1349,6 +1349,10 @@ export interface TableColumnProps {
|
|
|
1349
1349
|
* If true, the column will be rendered on the bottom flex of mobile layout.
|
|
1350
1350
|
*/
|
|
1351
1351
|
isAction?: boolean;
|
|
1352
|
+
/**
|
|
1353
|
+
* if true, the column that sticky will be styled with box shadow
|
|
1354
|
+
*/
|
|
1355
|
+
shadow?: boolean;
|
|
1352
1356
|
/**
|
|
1353
1357
|
* Additional column header styles css.
|
|
1354
1358
|
*/
|
package/index.esm.js
CHANGED
|
@@ -20611,7 +20611,7 @@ const ModalDialogTitle = styled('div');
|
|
|
20611
20611
|
ModalDialogTitle.displayName = 'ModalDialogTitle';
|
|
20612
20612
|
const ModalDialogContent = styled('div');
|
|
20613
20613
|
ModalDialogContent.displayName = 'ModalDialogContent';
|
|
20614
|
-
const ModalDialogTrigger = styled(
|
|
20614
|
+
const ModalDialogTrigger = styled(DialogTrigger);
|
|
20615
20615
|
ModalDialogTrigger.displayName = 'ModalDialogTrigger';
|
|
20616
20616
|
const StyledContent$2 = styled(DialogContent, {
|
|
20617
20617
|
top: 'auto',
|
|
@@ -21647,6 +21647,7 @@ function PaginationInfo(_ref) {
|
|
|
21647
21647
|
columnNumber: 11
|
|
21648
21648
|
}
|
|
21649
21649
|
}, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default.createElement(Flex$1, {
|
|
21650
|
+
key: limit.toString(),
|
|
21650
21651
|
css: {
|
|
21651
21652
|
height: 44,
|
|
21652
21653
|
width: '100%',
|
|
@@ -22299,6 +22300,7 @@ const TableContainer$3 = styled('div', {
|
|
|
22299
22300
|
position: 'relative',
|
|
22300
22301
|
height: '100%',
|
|
22301
22302
|
overflow: 'auto',
|
|
22303
|
+
overflowY: 'hidden',
|
|
22302
22304
|
variants: {
|
|
22303
22305
|
decoration: {
|
|
22304
22306
|
true: {
|
|
@@ -22542,58 +22544,16 @@ const defaultFetchDataParams = {
|
|
|
22542
22544
|
pageIndex: 0,
|
|
22543
22545
|
pageSize: 10
|
|
22544
22546
|
};
|
|
22545
|
-
const stickyPositionStyling =
|
|
22546
|
-
const scrollAreaWidth = (scrollerRef === null || scrollerRef === void 0 ? void 0 : scrollerRef.scrollWidth) - (scrollerRef === null || scrollerRef === void 0 ? void 0 : scrollerRef.clientWidth);
|
|
22547
|
-
const sticky = {
|
|
22548
|
-
position: 'sticky',
|
|
22549
|
-
zIndex: 1
|
|
22550
|
-
};
|
|
22551
|
-
const cssAfter = {
|
|
22552
|
-
position: 'absolute',
|
|
22553
|
-
top: 0,
|
|
22554
|
-
bottom: 0,
|
|
22555
|
-
width: 5,
|
|
22556
|
-
transition: 'box-shadow 0.3s',
|
|
22557
|
-
content: '',
|
|
22558
|
-
pointerEvents: 'none',
|
|
22559
|
-
boxSizing: 'border'
|
|
22560
|
-
};
|
|
22561
|
-
let smallestIndex = -1;
|
|
22562
|
-
if (groupHeaders) {
|
|
22563
|
-
for (let i = 0; i < groupHeaders.length; i++) {
|
|
22564
|
-
if (typeof groupHeaders[i].Header === 'string') {
|
|
22565
|
-
smallestIndex = i;
|
|
22566
|
-
break;
|
|
22567
|
-
}
|
|
22568
|
-
}
|
|
22569
|
-
}
|
|
22570
|
-
if (customizableColumn && groupHeaders && groupHeaders.findIndex(val => val.id === column.id && val.Header === column.Header) === smallestIndex) {
|
|
22571
|
-
return Object.assign(Object.assign({}, sticky), {
|
|
22572
|
-
left: '65px !important',
|
|
22573
|
-
'&::after': Object.assign(Object.assign({}, cssAfter), {
|
|
22574
|
-
right: 0,
|
|
22575
|
-
boxShadow: scrollAreaWidth && scrollAreaWidth <= 0 ? 'none' : 'inset 8px 0 10px -10px #00000026'
|
|
22576
|
-
})
|
|
22577
|
-
});
|
|
22578
|
-
}
|
|
22547
|
+
const stickyPositionStyling = column => {
|
|
22579
22548
|
if (typeof column.stickyPosition === 'number') {
|
|
22580
|
-
return column.sticky === 'left' ?
|
|
22549
|
+
return column.sticky === 'left' ? {
|
|
22550
|
+
position: 'sticky',
|
|
22581
22551
|
left: `${column.stickyPosition}px !important`
|
|
22582
|
-
}
|
|
22552
|
+
} : {
|
|
22553
|
+
position: 'sticky',
|
|
22583
22554
|
right: `${column.stickyPosition}px !important`
|
|
22584
|
-
}
|
|
22585
|
-
}
|
|
22586
|
-
if (column === null || column === void 0 ? void 0 : column.isMobileHeader) {
|
|
22587
|
-
return Object.assign(Object.assign({}, sticky), {
|
|
22588
|
-
left: '10px !important'
|
|
22589
|
-
});
|
|
22555
|
+
};
|
|
22590
22556
|
}
|
|
22591
|
-
if ((column === null || column === void 0 ? void 0 : column.id) === 'multiple-expander') return Object.assign(Object.assign({}, sticky), {
|
|
22592
|
-
left: '10px !important'
|
|
22593
|
-
});
|
|
22594
|
-
if ((column === null || column === void 0 ? void 0 : column.id) === 'selection') return Object.assign(Object.assign({}, sticky), {
|
|
22595
|
-
left: '30px !important'
|
|
22596
|
-
});
|
|
22597
22557
|
return {};
|
|
22598
22558
|
};
|
|
22599
22559
|
const cssAfter = {
|
|
@@ -22716,7 +22676,8 @@ function HeaderMenuOption(props) {
|
|
|
22716
22676
|
children,
|
|
22717
22677
|
headerGroups,
|
|
22718
22678
|
id,
|
|
22719
|
-
filterHeader: items
|
|
22679
|
+
filterHeader: items,
|
|
22680
|
+
rowData
|
|
22720
22681
|
} = props;
|
|
22721
22682
|
const {
|
|
22722
22683
|
headers
|
|
@@ -22751,13 +22712,13 @@ function HeaderMenuOption(props) {
|
|
|
22751
22712
|
defaultValue: visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.map(item => item.id),
|
|
22752
22713
|
value: items.length > 0 ? items : visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.map(item => item.id)
|
|
22753
22714
|
}, {
|
|
22754
|
-
children: visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.filter(val => typeof val.Header === 'string').map((item, index, row) => jsxs(Fragment, {
|
|
22715
|
+
children: visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.filter(val => typeof val.Header === 'string').map((item, index, row) => jsxs(React.Fragment, {
|
|
22755
22716
|
children: [jsx(InputCheckbox, {
|
|
22756
22717
|
label: item.Header,
|
|
22757
22718
|
value: item.id,
|
|
22758
22719
|
disabled: index === 0
|
|
22759
22720
|
}, void 0), row.length !== index + 1 && jsx(Separator$2, {}, void 0)]
|
|
22760
|
-
},
|
|
22721
|
+
}, item.id))
|
|
22761
22722
|
}), void 0)
|
|
22762
22723
|
}), void 0)
|
|
22763
22724
|
}), void 0)]
|
|
@@ -22774,7 +22735,7 @@ function HeaderMenuOption(props) {
|
|
|
22774
22735
|
}, {
|
|
22775
22736
|
children: children
|
|
22776
22737
|
}), void 0), jsx(PopoverContent, Object.assign({
|
|
22777
|
-
portalled:
|
|
22738
|
+
portalled: true,
|
|
22778
22739
|
isMobile: false,
|
|
22779
22740
|
style: {
|
|
22780
22741
|
right: '100%',
|
|
@@ -22789,9 +22750,10 @@ function HeaderMenuOption(props) {
|
|
|
22789
22750
|
boxShadow: '$medium',
|
|
22790
22751
|
backgroundColor: 'white',
|
|
22791
22752
|
maxHeight: 440,
|
|
22753
|
+
height: rowData.length <= 5 ? 300 : 'fit-content',
|
|
22792
22754
|
minWidth: 167,
|
|
22793
22755
|
width: 'fit-content',
|
|
22794
|
-
overflowY: visibleHeaders.filter(val => typeof val.Header === 'string').length > 7 ? 'scroll' : 'none'
|
|
22756
|
+
overflowY: visibleHeaders.filter(val => typeof val.Header === 'string').length > 7 || rowData.length <= 5 ? 'scroll' : 'none'
|
|
22795
22757
|
}
|
|
22796
22758
|
}, {
|
|
22797
22759
|
children: jsx(CheckboxGroup, Object.assign({
|
|
@@ -22800,13 +22762,13 @@ function HeaderMenuOption(props) {
|
|
|
22800
22762
|
defaultValue: visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.map(item => item.id),
|
|
22801
22763
|
value: items.length > 0 ? items : visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.map(item => item.id)
|
|
22802
22764
|
}, {
|
|
22803
|
-
children: visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.filter(val => typeof val.Header === 'string').map((item, index, row) => jsxs(Fragment, {
|
|
22765
|
+
children: visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.filter(val => typeof val.Header === 'string').map((item, index, row) => jsxs(React.Fragment, {
|
|
22804
22766
|
children: [jsx(InputCheckbox, {
|
|
22805
22767
|
label: item.Header,
|
|
22806
22768
|
value: item.id,
|
|
22807
22769
|
disabled: index === 0
|
|
22808
22770
|
}, void 0), row.length !== index + 1 && jsx(Separator$2, {}, void 0)]
|
|
22809
|
-
},
|
|
22771
|
+
}, item.id))
|
|
22810
22772
|
}), void 0)
|
|
22811
22773
|
}), void 0)
|
|
22812
22774
|
}), void 0)]
|
|
@@ -22857,7 +22819,7 @@ function Table({
|
|
|
22857
22819
|
additionalExceptionIds = [],
|
|
22858
22820
|
onExpand,
|
|
22859
22821
|
id = null,
|
|
22860
|
-
customizableColumn =
|
|
22822
|
+
customizableColumn = null
|
|
22861
22823
|
}) {
|
|
22862
22824
|
var _a, _b, _c, _d;
|
|
22863
22825
|
const [openMenu, setOpen] = useState(false);
|
|
@@ -23288,7 +23250,7 @@ function Table({
|
|
|
23288
23250
|
minWidth: column.colMinWidth
|
|
23289
23251
|
}
|
|
23290
23252
|
}]), {
|
|
23291
|
-
css: Object.assign(Object.assign(Object.assign(Object.assign({}, cssTableCell), stickyPositionStyling(column
|
|
23253
|
+
css: Object.assign(Object.assign(Object.assign(Object.assign({}, cssTableCell), stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth)), column.headerCss)
|
|
23292
23254
|
}, {
|
|
23293
23255
|
children: typeof headerRender === 'string' ? jsx(TableHeaderCellContainer, Object.assign({
|
|
23294
23256
|
isSortedDesc: column.isSortedDesc,
|
|
@@ -23307,6 +23269,7 @@ function Table({
|
|
|
23307
23269
|
css: cssBtnCustom
|
|
23308
23270
|
}, {
|
|
23309
23271
|
children: jsx(HeaderMenuOption, Object.assign({
|
|
23272
|
+
rowData: tableRowData,
|
|
23310
23273
|
open: openMenu,
|
|
23311
23274
|
id: customizableColumn,
|
|
23312
23275
|
onOpenChange: setOpen,
|
|
@@ -23430,7 +23393,7 @@ function Table({
|
|
|
23430
23393
|
padding: !isContextMenu || exceptionId ? collId === 'expander' || collId === 'multiple-expander' ? '20px 4px' : '20px 8px' : '',
|
|
23431
23394
|
verticalAlign: cell.column.accessor ? cellAlign : 'center',
|
|
23432
23395
|
cursor: onRowClick ? 'pointer' : 'unset'
|
|
23433
|
-
}), stickyPositionStyling(cell.column
|
|
23396
|
+
}), stickyPositionStyling(cell.column)), stickyShadowStyling(cell.column, tableScrollPosition, scrollAreaWidth)),
|
|
23434
23397
|
onClick: () => {
|
|
23435
23398
|
if (!exceptionId) {
|
|
23436
23399
|
handleRowClick(row, i);
|
|
@@ -23467,12 +23430,7 @@ function Table({
|
|
|
23467
23430
|
css: Object.assign(Object.assign({}, cssBtnCustom), {
|
|
23468
23431
|
maxHeight: 100,
|
|
23469
23432
|
'&::after': Object.assign(Object.assign({}, cssBtnCustom['&::after']), {
|
|
23470
|
-
|
|
23471
|
-
height: 100
|
|
23472
|
-
},
|
|
23473
|
-
'@md': {
|
|
23474
|
-
height: 'unset'
|
|
23475
|
-
}
|
|
23433
|
+
height: 100
|
|
23476
23434
|
})
|
|
23477
23435
|
})
|
|
23478
23436
|
}, void 0)]
|
package/index.umd.js
CHANGED
|
@@ -20911,7 +20911,7 @@
|
|
|
20911
20911
|
ModalDialogTitle.displayName = 'ModalDialogTitle';
|
|
20912
20912
|
var ModalDialogContent = styled('div');
|
|
20913
20913
|
ModalDialogContent.displayName = 'ModalDialogContent';
|
|
20914
|
-
var ModalDialogTrigger = styled(
|
|
20914
|
+
var ModalDialogTrigger = styled(DialogTrigger);
|
|
20915
20915
|
ModalDialogTrigger.displayName = 'ModalDialogTrigger';
|
|
20916
20916
|
var StyledContent$2 = styled(DialogContent, {
|
|
20917
20917
|
top: 'auto',
|
|
@@ -21948,6 +21948,7 @@
|
|
|
21948
21948
|
columnNumber: 11
|
|
21949
21949
|
}
|
|
21950
21950
|
}, limits == null ? void 0 : limits.map(limit => /*#__PURE__*/React__default["default"].createElement(Flex$1, {
|
|
21951
|
+
key: limit.toString(),
|
|
21951
21952
|
css: {
|
|
21952
21953
|
height: 44,
|
|
21953
21954
|
width: '100%',
|
|
@@ -22619,6 +22620,7 @@
|
|
|
22619
22620
|
position: 'relative',
|
|
22620
22621
|
height: '100%',
|
|
22621
22622
|
overflow: 'auto',
|
|
22623
|
+
overflowY: 'hidden',
|
|
22622
22624
|
variants: {
|
|
22623
22625
|
decoration: {
|
|
22624
22626
|
true: {
|
|
@@ -22862,60 +22864,16 @@
|
|
|
22862
22864
|
pageIndex: 0,
|
|
22863
22865
|
pageSize: 10
|
|
22864
22866
|
};
|
|
22865
|
-
var stickyPositionStyling = function stickyPositionStyling(column
|
|
22866
|
-
var scrollAreaWidth = (scrollerRef === null || scrollerRef === void 0 ? void 0 : scrollerRef.scrollWidth) - (scrollerRef === null || scrollerRef === void 0 ? void 0 : scrollerRef.clientWidth);
|
|
22867
|
-
var sticky = {
|
|
22868
|
-
position: 'sticky',
|
|
22869
|
-
zIndex: 1
|
|
22870
|
-
};
|
|
22871
|
-
var cssAfter = {
|
|
22872
|
-
position: 'absolute',
|
|
22873
|
-
top: 0,
|
|
22874
|
-
bottom: 0,
|
|
22875
|
-
width: 5,
|
|
22876
|
-
transition: 'box-shadow 0.3s',
|
|
22877
|
-
content: '',
|
|
22878
|
-
pointerEvents: 'none',
|
|
22879
|
-
boxSizing: 'border'
|
|
22880
|
-
};
|
|
22881
|
-
var smallestIndex = -1;
|
|
22882
|
-
if (groupHeaders) {
|
|
22883
|
-
for (var i = 0; i < groupHeaders.length; i++) {
|
|
22884
|
-
if (typeof groupHeaders[i].Header === 'string') {
|
|
22885
|
-
smallestIndex = i;
|
|
22886
|
-
break;
|
|
22887
|
-
}
|
|
22888
|
-
}
|
|
22889
|
-
}
|
|
22890
|
-
if (customizableColumn && groupHeaders && groupHeaders.findIndex(function (val) {
|
|
22891
|
-
return val.id === column.id && val.Header === column.Header;
|
|
22892
|
-
}) === smallestIndex) {
|
|
22893
|
-
return __assign(__assign({}, sticky), {
|
|
22894
|
-
left: '65px !important',
|
|
22895
|
-
'&::after': __assign(__assign({}, cssAfter), {
|
|
22896
|
-
right: 0,
|
|
22897
|
-
boxShadow: scrollAreaWidth && scrollAreaWidth <= 0 ? 'none' : 'inset 8px 0 10px -10px #00000026'
|
|
22898
|
-
})
|
|
22899
|
-
});
|
|
22900
|
-
}
|
|
22867
|
+
var stickyPositionStyling = function stickyPositionStyling(column) {
|
|
22901
22868
|
if (typeof column.stickyPosition === 'number') {
|
|
22902
|
-
return column.sticky === 'left' ?
|
|
22869
|
+
return column.sticky === 'left' ? {
|
|
22870
|
+
position: 'sticky',
|
|
22903
22871
|
left: "".concat(column.stickyPosition, "px !important")
|
|
22904
|
-
}
|
|
22872
|
+
} : {
|
|
22873
|
+
position: 'sticky',
|
|
22905
22874
|
right: "".concat(column.stickyPosition, "px !important")
|
|
22906
|
-
}
|
|
22907
|
-
}
|
|
22908
|
-
if (column === null || column === void 0 ? void 0 : column.isMobileHeader) {
|
|
22909
|
-
return __assign(__assign({}, sticky), {
|
|
22910
|
-
left: '10px !important'
|
|
22911
|
-
});
|
|
22875
|
+
};
|
|
22912
22876
|
}
|
|
22913
|
-
if ((column === null || column === void 0 ? void 0 : column.id) === 'multiple-expander') return __assign(__assign({}, sticky), {
|
|
22914
|
-
left: '10px !important'
|
|
22915
|
-
});
|
|
22916
|
-
if ((column === null || column === void 0 ? void 0 : column.id) === 'selection') return __assign(__assign({}, sticky), {
|
|
22917
|
-
left: '30px !important'
|
|
22918
|
-
});
|
|
22919
22877
|
return {};
|
|
22920
22878
|
};
|
|
22921
22879
|
var cssAfter = {
|
|
@@ -23041,7 +22999,8 @@
|
|
|
23041
22999
|
children = props.children,
|
|
23042
23000
|
headerGroups = props.headerGroups;
|
|
23043
23001
|
props.id;
|
|
23044
|
-
var items = props.filterHeader
|
|
23002
|
+
var items = props.filterHeader,
|
|
23003
|
+
rowData = props.rowData;
|
|
23045
23004
|
var headers = (headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups[0]).headers;
|
|
23046
23005
|
var visibleHeaders = headers.filter(function (column) {
|
|
23047
23006
|
return !column.isSubRow;
|
|
@@ -23084,13 +23043,13 @@
|
|
|
23084
23043
|
children: visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.filter(function (val) {
|
|
23085
23044
|
return typeof val.Header === 'string';
|
|
23086
23045
|
}).map(function (item, index, row) {
|
|
23087
|
-
return jsxRuntime.jsxs(
|
|
23046
|
+
return jsxRuntime.jsxs(React__namespace.Fragment, {
|
|
23088
23047
|
children: [jsxRuntime.jsx(InputCheckbox, {
|
|
23089
23048
|
label: item.Header,
|
|
23090
23049
|
value: item.id,
|
|
23091
23050
|
disabled: index === 0
|
|
23092
23051
|
}, void 0), row.length !== index + 1 && jsxRuntime.jsx(Separator$2, {}, void 0)]
|
|
23093
|
-
},
|
|
23052
|
+
}, item.id);
|
|
23094
23053
|
})
|
|
23095
23054
|
}), void 0)
|
|
23096
23055
|
}), void 0)
|
|
@@ -23108,7 +23067,7 @@
|
|
|
23108
23067
|
}, {
|
|
23109
23068
|
children: children
|
|
23110
23069
|
}), void 0), jsxRuntime.jsx(PopoverContent, __assign({
|
|
23111
|
-
portalled:
|
|
23070
|
+
portalled: true,
|
|
23112
23071
|
isMobile: false,
|
|
23113
23072
|
style: {
|
|
23114
23073
|
right: '100%',
|
|
@@ -23123,11 +23082,12 @@
|
|
|
23123
23082
|
boxShadow: '$medium',
|
|
23124
23083
|
backgroundColor: 'white',
|
|
23125
23084
|
maxHeight: 440,
|
|
23085
|
+
height: rowData.length <= 5 ? 300 : 'fit-content',
|
|
23126
23086
|
minWidth: 167,
|
|
23127
23087
|
width: 'fit-content',
|
|
23128
23088
|
overflowY: visibleHeaders.filter(function (val) {
|
|
23129
23089
|
return typeof val.Header === 'string';
|
|
23130
|
-
}).length > 7 ? 'scroll' : 'none'
|
|
23090
|
+
}).length > 7 || rowData.length <= 5 ? 'scroll' : 'none'
|
|
23131
23091
|
}
|
|
23132
23092
|
}, {
|
|
23133
23093
|
children: jsxRuntime.jsx(CheckboxGroup, __assign({
|
|
@@ -23143,13 +23103,13 @@
|
|
|
23143
23103
|
children: visibleHeaders === null || visibleHeaders === void 0 ? void 0 : visibleHeaders.filter(function (val) {
|
|
23144
23104
|
return typeof val.Header === 'string';
|
|
23145
23105
|
}).map(function (item, index, row) {
|
|
23146
|
-
return jsxRuntime.jsxs(
|
|
23106
|
+
return jsxRuntime.jsxs(React__namespace.Fragment, {
|
|
23147
23107
|
children: [jsxRuntime.jsx(InputCheckbox, {
|
|
23148
23108
|
label: item.Header,
|
|
23149
23109
|
value: item.id,
|
|
23150
23110
|
disabled: index === 0
|
|
23151
23111
|
}, void 0), row.length !== index + 1 && jsxRuntime.jsx(Separator$2, {}, void 0)]
|
|
23152
|
-
},
|
|
23112
|
+
}, item.id);
|
|
23153
23113
|
})
|
|
23154
23114
|
}), void 0)
|
|
23155
23115
|
}), void 0)
|
|
@@ -23217,7 +23177,7 @@
|
|
|
23217
23177
|
onExpand = _a.onExpand;
|
|
23218
23178
|
_a.id;
|
|
23219
23179
|
var _v = _a.customizableColumn,
|
|
23220
|
-
customizableColumn = _v === void 0 ?
|
|
23180
|
+
customizableColumn = _v === void 0 ? null : _v;
|
|
23221
23181
|
var _w = React.useState(false),
|
|
23222
23182
|
openMenu = _w[0],
|
|
23223
23183
|
setOpen = _w[1];
|
|
@@ -23695,7 +23655,7 @@
|
|
|
23695
23655
|
}
|
|
23696
23656
|
}];
|
|
23697
23657
|
}), {
|
|
23698
|
-
css: __assign(__assign(__assign(__assign({}, cssTableCell), stickyPositionStyling(column
|
|
23658
|
+
css: __assign(__assign(__assign(__assign({}, cssTableCell), stickyPositionStyling(column)), stickyShadowStyling(column, tableScrollPosition, scrollAreaWidth)), column.headerCss)
|
|
23699
23659
|
}, {
|
|
23700
23660
|
children: typeof headerRender === 'string' ? jsxRuntime.jsx(TableHeaderCellContainer, __assign({
|
|
23701
23661
|
isSortedDesc: column.isSortedDesc,
|
|
@@ -23714,6 +23674,7 @@
|
|
|
23714
23674
|
css: cssBtnCustom
|
|
23715
23675
|
}, {
|
|
23716
23676
|
children: jsxRuntime.jsx(HeaderMenuOption, __assign({
|
|
23677
|
+
rowData: tableRowData,
|
|
23717
23678
|
open: openMenu,
|
|
23718
23679
|
id: customizableColumn,
|
|
23719
23680
|
onOpenChange: setOpen,
|
|
@@ -23857,7 +23818,7 @@
|
|
|
23857
23818
|
padding: !isContextMenu || exceptionId ? collId === 'expander' || collId === 'multiple-expander' ? '20px 4px' : '20px 8px' : '',
|
|
23858
23819
|
verticalAlign: cell.column.accessor ? cellAlign : 'center',
|
|
23859
23820
|
cursor: onRowClick ? 'pointer' : 'unset'
|
|
23860
|
-
}), stickyPositionStyling(cell.column
|
|
23821
|
+
}), stickyPositionStyling(cell.column)), stickyShadowStyling(cell.column, tableScrollPosition, scrollAreaWidth)),
|
|
23861
23822
|
onClick: function () {
|
|
23862
23823
|
if (!exceptionId) {
|
|
23863
23824
|
handleRowClick(row, i);
|
|
@@ -23898,12 +23859,7 @@
|
|
|
23898
23859
|
css: __assign(__assign({}, cssBtnCustom), {
|
|
23899
23860
|
maxHeight: 100,
|
|
23900
23861
|
'&::after': __assign(__assign({}, cssBtnCustom['&::after']), {
|
|
23901
|
-
|
|
23902
|
-
height: 100
|
|
23903
|
-
},
|
|
23904
|
-
'@md': {
|
|
23905
|
-
height: 'unset'
|
|
23906
|
-
}
|
|
23862
|
+
height: 100
|
|
23907
23863
|
})
|
|
23908
23864
|
})
|
|
23909
23865
|
}, void 0)]
|