@tap-payments/os-micro-frontend-shared 0.1.8 → 0.1.9-test.1-test.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/build/components/ActionMenu/style.d.ts +1 -1
- package/build/components/Chip/style.d.ts +1 -1
- package/build/components/CountBadge/style.d.ts +1 -1
- package/build/components/Dialog/style.d.ts +1 -1
- package/build/components/FlippingCard/style.d.ts +1 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +1 -1
- package/build/components/JSONViewer/style.d.ts +2 -2
- package/build/components/SearchButton/styles.d.ts +3 -3
- package/build/components/StatusIcons/AuthIcons/style.d.ts +2 -2
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +1 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +6 -6
- package/build/components/StatusIcons/SourceIcons/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +2 -2
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +2 -2
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +2 -2
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +2 -2
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SourceMergedCell/style.d.ts +6 -6
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +6 -6
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +5 -5
- package/build/components/TableCells/CustomCells/style.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/SheetViewVirtualTable.js +34 -174
- package/build/components/VirtualTables/SheetViewVirtualTable/components/NoDataSection.d.ts +32 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/NoDataSection.js +30 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumnSection.d.ts +51 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumnSection.js +20 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeader/SheetViewTableHeader.js +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeader/TableCell.js +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.js +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableNoData.js +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualListSection.d.ts +34 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualListSection.js +76 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/index.d.ts +3 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/components/index.js +3 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedWidths.d.ts +5 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedWidths.js +12 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useSelection.d.ts +6 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useSelection.js +17 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useSharedItemSize.d.ts +10 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useSharedItemSize.js +21 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useSheetViewStates.d.ts +14 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useSheetViewStates.js +20 -0
- package/build/components/VirtualTables/SheetViewVirtualTable/style.d.ts +0 -2
- package/build/components/VirtualTables/SheetViewVirtualTable/style.js +0 -10
- package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
- package/build/components/VirtualTables/VirtualTable/VirtualTable.js +19 -79
- package/build/components/VirtualTables/VirtualTable/VirtualTableList.d.ts +19 -0
- package/build/components/VirtualTables/VirtualTable/VirtualTableList.js +27 -0
- package/build/components/VirtualTables/VirtualTable/useVirtualTable.d.ts +31 -0
- package/build/components/VirtualTables/VirtualTable/useVirtualTable.js +70 -0
- package/build/components/VirtualTables/components/TableRow.js +1 -1
- package/build/components/VirtualTables/components/style.d.ts +1 -1
- package/build/components/Window/style.d.ts +2 -2
- package/build/constants/assets.d.ts +1 -0
- package/build/constants/assets.js +1 -0
- package/build/types/table.d.ts +0 -1
- package/package.json +134 -134
- /package/build/components/VirtualTables/{utils/getSelectionStyles.d.ts → components/utils.d.ts} +0 -0
- /package/build/components/VirtualTables/{utils/getSelectionStyles.js → components/utils.js} +0 -0
|
@@ -67,7 +67,7 @@ export declare const RefundChargeCellContainer: import("@emotion/styled").Styled
|
|
|
67
67
|
"aria-description"?: string | undefined;
|
|
68
68
|
"aria-details"?: string | undefined;
|
|
69
69
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
70
|
-
"aria-dropeffect"?: "none" | "
|
|
70
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
71
71
|
"aria-errormessage"?: string | undefined;
|
|
72
72
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
73
73
|
"aria-flowto"?: string | undefined;
|
|
@@ -329,7 +329,7 @@ export declare const PercentageContainer: import("@emotion/styled").StyledCompon
|
|
|
329
329
|
"aria-description"?: string | undefined;
|
|
330
330
|
"aria-details"?: string | undefined;
|
|
331
331
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
332
|
-
"aria-dropeffect"?: "none" | "
|
|
332
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
333
333
|
"aria-errormessage"?: string | undefined;
|
|
334
334
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
335
335
|
"aria-flowto"?: string | undefined;
|
|
@@ -67,7 +67,7 @@ export declare const RefundCellContainer: import("@emotion/styled").StyledCompon
|
|
|
67
67
|
"aria-description"?: string | undefined;
|
|
68
68
|
"aria-details"?: string | undefined;
|
|
69
69
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
70
|
-
"aria-dropeffect"?: "none" | "
|
|
70
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
71
71
|
"aria-errormessage"?: string | undefined;
|
|
72
72
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
73
73
|
"aria-flowto"?: string | undefined;
|
|
@@ -69,7 +69,7 @@ export declare const SalesChannelsContainer: import("@emotion/styled").StyledCom
|
|
|
69
69
|
"aria-description"?: string | undefined;
|
|
70
70
|
"aria-details"?: string | undefined;
|
|
71
71
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
72
|
-
"aria-dropeffect"?: "none" | "
|
|
72
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
73
73
|
"aria-errormessage"?: string | undefined;
|
|
74
74
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
75
75
|
"aria-flowto"?: string | undefined;
|
|
@@ -68,7 +68,7 @@ export declare const ReferenceSourcesContainer: import("@emotion/styled").Styled
|
|
|
68
68
|
"aria-description"?: string | undefined;
|
|
69
69
|
"aria-details"?: string | undefined;
|
|
70
70
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
71
|
-
"aria-dropeffect"?: "none" | "
|
|
71
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
72
72
|
"aria-errormessage"?: string | undefined;
|
|
73
73
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
74
74
|
"aria-flowto"?: string | undefined;
|
|
@@ -69,7 +69,7 @@ export declare const PaymentSourcesContainer: import("@emotion/styled").StyledCo
|
|
|
69
69
|
"aria-description"?: string | undefined;
|
|
70
70
|
"aria-details"?: string | undefined;
|
|
71
71
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
72
|
-
"aria-dropeffect"?: "none" | "
|
|
72
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
73
73
|
"aria-errormessage"?: string | undefined;
|
|
74
74
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
75
75
|
"aria-flowto"?: string | undefined;
|
|
@@ -81,7 +81,7 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
|
|
|
81
81
|
"aria-description"?: string | undefined;
|
|
82
82
|
"aria-details"?: string | undefined;
|
|
83
83
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
84
|
-
"aria-dropeffect"?: "none" | "
|
|
84
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
85
85
|
"aria-errormessage"?: string | undefined;
|
|
86
86
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
87
87
|
"aria-flowto"?: string | undefined;
|
|
@@ -352,7 +352,7 @@ export declare const RefundsCountBadge: import("@emotion/styled").StyledComponen
|
|
|
352
352
|
"aria-description"?: string | undefined;
|
|
353
353
|
"aria-details"?: string | undefined;
|
|
354
354
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
355
|
-
"aria-dropeffect"?: "none" | "
|
|
355
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
356
356
|
"aria-errormessage"?: string | undefined;
|
|
357
357
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
358
358
|
"aria-flowto"?: string | undefined;
|
|
@@ -614,7 +614,7 @@ export declare const MultiRefundContainer: import("@emotion/styled").StyledCompo
|
|
|
614
614
|
"aria-description"?: string | undefined;
|
|
615
615
|
"aria-details"?: string | undefined;
|
|
616
616
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
617
|
-
"aria-dropeffect"?: "none" | "
|
|
617
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
618
618
|
"aria-errormessage"?: string | undefined;
|
|
619
619
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
620
620
|
"aria-flowto"?: string | undefined;
|
|
@@ -895,7 +895,7 @@ export declare const StatusIcon: import("@emotion/styled").StyledComponent<{
|
|
|
895
895
|
"aria-description"?: string | undefined;
|
|
896
896
|
"aria-details"?: string | undefined;
|
|
897
897
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
898
|
-
"aria-dropeffect"?: "none" | "
|
|
898
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
899
899
|
"aria-errormessage"?: string | undefined;
|
|
900
900
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
901
901
|
"aria-flowto"?: string | undefined;
|
|
@@ -1159,7 +1159,7 @@ export declare const StatusWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
1159
1159
|
"aria-description"?: string | undefined;
|
|
1160
1160
|
"aria-details"?: string | undefined;
|
|
1161
1161
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
1162
|
-
"aria-dropeffect"?: "none" | "
|
|
1162
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
1163
1163
|
"aria-errormessage"?: string | undefined;
|
|
1164
1164
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
1165
1165
|
"aria-flowto"?: string | undefined;
|
|
@@ -1421,7 +1421,7 @@ export declare const StatusContainer: import("@emotion/styled").StyledComponent<
|
|
|
1421
1421
|
"aria-description"?: string | undefined;
|
|
1422
1422
|
"aria-details"?: string | undefined;
|
|
1423
1423
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
1424
|
-
"aria-dropeffect"?: "none" | "
|
|
1424
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
1425
1425
|
"aria-errormessage"?: string | undefined;
|
|
1426
1426
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
1427
1427
|
"aria-flowto"?: string | undefined;
|
|
@@ -70,7 +70,7 @@ export declare const MultiRefundIcon: import("@emotion/styled").StyledComponent<
|
|
|
70
70
|
"aria-description"?: string | undefined;
|
|
71
71
|
"aria-details"?: string | undefined;
|
|
72
72
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
73
|
-
"aria-dropeffect"?: "none" | "
|
|
73
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
74
74
|
"aria-errormessage"?: string | undefined;
|
|
75
75
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
76
76
|
"aria-flowto"?: string | undefined;
|
|
@@ -341,7 +341,7 @@ export declare const RefundsCountBadge: import("@emotion/styled").StyledComponen
|
|
|
341
341
|
"aria-description"?: string | undefined;
|
|
342
342
|
"aria-details"?: string | undefined;
|
|
343
343
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
344
|
-
"aria-dropeffect"?: "none" | "
|
|
344
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
345
345
|
"aria-errormessage"?: string | undefined;
|
|
346
346
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
347
347
|
"aria-flowto"?: string | undefined;
|
|
@@ -603,7 +603,7 @@ export declare const MultiRefundContainer: import("@emotion/styled").StyledCompo
|
|
|
603
603
|
"aria-description"?: string | undefined;
|
|
604
604
|
"aria-details"?: string | undefined;
|
|
605
605
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
606
|
-
"aria-dropeffect"?: "none" | "
|
|
606
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
607
607
|
"aria-errormessage"?: string | undefined;
|
|
608
608
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
609
609
|
"aria-flowto"?: string | undefined;
|
|
@@ -884,7 +884,7 @@ export declare const StatusIcon: import("@emotion/styled").StyledComponent<{
|
|
|
884
884
|
"aria-description"?: string | undefined;
|
|
885
885
|
"aria-details"?: string | undefined;
|
|
886
886
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
887
|
-
"aria-dropeffect"?: "none" | "
|
|
887
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
888
888
|
"aria-errormessage"?: string | undefined;
|
|
889
889
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
890
890
|
"aria-flowto"?: string | undefined;
|
|
@@ -1148,7 +1148,7 @@ export declare const StatusWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
1148
1148
|
"aria-description"?: string | undefined;
|
|
1149
1149
|
"aria-details"?: string | undefined;
|
|
1150
1150
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
1151
|
-
"aria-dropeffect"?: "none" | "
|
|
1151
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
1152
1152
|
"aria-errormessage"?: string | undefined;
|
|
1153
1153
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
1154
1154
|
"aria-flowto"?: string | undefined;
|
|
@@ -1412,7 +1412,7 @@ export declare const StatusContainer: import("@emotion/styled").StyledComponent<
|
|
|
1412
1412
|
"aria-description"?: string | undefined;
|
|
1413
1413
|
"aria-details"?: string | undefined;
|
|
1414
1414
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
1415
|
-
"aria-dropeffect"?: "none" | "
|
|
1415
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
1416
1416
|
"aria-errormessage"?: string | undefined;
|
|
1417
1417
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
1418
1418
|
"aria-flowto"?: string | undefined;
|
|
@@ -67,7 +67,7 @@ export declare const UnCapturedContainer: import("@emotion/styled").StyledCompon
|
|
|
67
67
|
"aria-description"?: string | undefined;
|
|
68
68
|
"aria-details"?: string | undefined;
|
|
69
69
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
70
|
-
"aria-dropeffect"?: "none" | "
|
|
70
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
71
71
|
"aria-errormessage"?: string | undefined;
|
|
72
72
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
73
73
|
"aria-flowto"?: string | undefined;
|
|
@@ -329,7 +329,7 @@ export declare const ErrorCodeWrapper: import("@emotion/styled").StyledComponent
|
|
|
329
329
|
"aria-description"?: string | undefined;
|
|
330
330
|
"aria-details"?: string | undefined;
|
|
331
331
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
332
|
-
"aria-dropeffect"?: "none" | "
|
|
332
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
333
333
|
"aria-errormessage"?: string | undefined;
|
|
334
334
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
335
335
|
"aria-flowto"?: string | undefined;
|
|
@@ -591,7 +591,7 @@ export declare const ErrorCodeLabel: import("@emotion/styled").StyledComponent<{
|
|
|
591
591
|
"aria-description"?: string | undefined;
|
|
592
592
|
"aria-details"?: string | undefined;
|
|
593
593
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
594
|
-
"aria-dropeffect"?: "none" | "
|
|
594
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
595
595
|
"aria-errormessage"?: string | undefined;
|
|
596
596
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
597
597
|
"aria-flowto"?: string | undefined;
|
|
@@ -854,7 +854,7 @@ export declare const GatewayIconWrapper: import("@emotion/styled").StyledCompone
|
|
|
854
854
|
"aria-description"?: string | undefined;
|
|
855
855
|
"aria-details"?: string | undefined;
|
|
856
856
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
857
|
-
"aria-dropeffect"?: "none" | "
|
|
857
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
858
858
|
"aria-errormessage"?: string | undefined;
|
|
859
859
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
860
860
|
"aria-flowto"?: string | undefined;
|
|
@@ -1116,7 +1116,7 @@ export declare const GatewaysContainer: import("@emotion/styled").StyledComponen
|
|
|
1116
1116
|
"aria-description"?: string | undefined;
|
|
1117
1117
|
"aria-details"?: string | undefined;
|
|
1118
1118
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
1119
|
-
"aria-dropeffect"?: "none" | "
|
|
1119
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
1120
1120
|
"aria-errormessage"?: string | undefined;
|
|
1121
1121
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
1122
1122
|
"aria-flowto"?: string | undefined;
|
|
@@ -72,7 +72,7 @@ export declare const BadgeWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
72
72
|
"aria-description"?: string | undefined;
|
|
73
73
|
"aria-details"?: string | undefined;
|
|
74
74
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
75
|
-
"aria-dropeffect"?: "none" | "
|
|
75
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
76
76
|
"aria-errormessage"?: string | undefined;
|
|
77
77
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
78
78
|
"aria-flowto"?: string | undefined;
|
|
@@ -1,194 +1,54 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
-
import {
|
|
2
|
+
import { memo, useState } from 'react';
|
|
12
3
|
import { useTheme } from '@mui/material/styles';
|
|
13
|
-
import
|
|
14
|
-
import InfiniteLoader from 'react-window-infinite-loader';
|
|
15
|
-
import AutoSizer from 'react-virtualized-auto-sizer';
|
|
16
|
-
import { TABLE_THRESHOLD, TABLE_LIST_OVER_SCAN } from '../../../constants/index.js';
|
|
4
|
+
import { TABLE_THRESHOLD } from '../../../constants/index.js';
|
|
17
5
|
import { useDelayToSetValue } from '../../../hooks/index.js';
|
|
18
|
-
import { isHeightNotFullyFilledByRows
|
|
6
|
+
import { isHeightNotFullyFilledByRows } from '../../../utils/index.js';
|
|
19
7
|
import TableFooter from '../components/TableFooter/TableFooter';
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import ListItemWrapper from '../components/virtualScroll/ListItemWrapper';
|
|
23
|
-
import { StyledBox, StyledTableBox, StyledVirtualList, TableContainer, TableWrapper } from '../components/style';
|
|
24
|
-
import { SheetViewVirtualTableWrapper, PinnedStartColumnWrapper, PinnedEndColumnWrapper, MainTableWrapper, UnpinnedTableHeaderWrapper } from './style';
|
|
8
|
+
import { StyledBox, StyledTableBox, TableContainer, TableWrapper } from '../components/style';
|
|
9
|
+
import { SheetViewVirtualTableWrapper, MainTableWrapper, UnpinnedTableHeaderWrapper } from './style';
|
|
25
10
|
import SheetViewTableHeader from './components/SheetViewTableHeader';
|
|
11
|
+
import VirtualListSection from './components/VirtualListSection';
|
|
12
|
+
import PinnedColumnSection from './components/PinnedColumnSection';
|
|
13
|
+
import NoDataSection from './components/NoDataSection';
|
|
26
14
|
import { usePinnedColumns } from './hooks/usePinnedColumns';
|
|
27
15
|
import { useSynchronizedScroll } from './hooks/useSynchronizedScroll';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
rowProps,
|
|
33
|
-
scrollToIndex,
|
|
34
|
-
totalCount,
|
|
35
|
-
lastItemIndex,
|
|
36
|
-
isError,
|
|
37
|
-
areAllRowsLoaded,
|
|
38
|
-
limit: totalCount,
|
|
39
|
-
newLoadedRowsEndIndex: lastItemIndex,
|
|
40
|
-
isSheetView: true,
|
|
41
|
-
isPinned,
|
|
42
|
-
selectedCell,
|
|
43
|
-
selectedColumn,
|
|
44
|
-
onCellClick,
|
|
45
|
-
containerHeight,
|
|
46
|
-
rowHeight,
|
|
47
|
-
}));
|
|
16
|
+
import { usePinnedWidths } from './hooks/usePinnedWidths';
|
|
17
|
+
import { useSelection } from './hooks/useSelection';
|
|
18
|
+
import { useSheetViewStates } from './hooks/useSheetViewStates';
|
|
19
|
+
import { useSharedItemSize } from './hooks/useSharedItemSize';
|
|
48
20
|
function SheetViewVirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, showHeader, headerProps, rowProps, footerProps, rowHeight = 28, isLoading, error, columnsSorting, onColumnSort, loadMoreItems, isFetchingNextPage, triggerDataRefetch, scrollToIndex, areAllRowsLoaded = false, tableBodyStyles, tableTitle, dragControls, onColumnPin, clearBackdropVisibilityTimeout = 100, isPinnable = false, tableMode, }) {
|
|
21
|
+
var _a;
|
|
22
|
+
const [showBackDrop, setShowBackdrop] = useState(false);
|
|
49
23
|
const theme = useTheme();
|
|
50
24
|
const { pinnedStartColumns, pinnedEndColumns, handleColumnPin, pinnedStartColumnsData, pinnedEndColumnsData, unpinnedColumnsData, orderedColumns, lastColumnId, } = usePinnedColumns(columns, isPinnable, onColumnPin);
|
|
51
25
|
const { pinnedStartVirtualListRef, scrollableVirtualListRef, pinnedEndVirtualListRef, handleScroll } = useSynchronizedScroll();
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
setSelectedCell(null);
|
|
64
|
-
}, []);
|
|
65
|
-
const onPointerDown = (e) => {
|
|
66
|
-
dragControls === null || dragControls === void 0 ? void 0 : dragControls.start(e);
|
|
67
|
-
};
|
|
68
|
-
const isDelayedFetchingNextPage = useDelayToSetValue({
|
|
69
|
-
value: isFetchingNextPage,
|
|
70
|
-
delay: 1000,
|
|
26
|
+
const { getItemSize, updateReferenceHeight } = useSharedItemSize({
|
|
27
|
+
rowsLength: rows.length,
|
|
28
|
+
areAllRowsLoaded,
|
|
29
|
+
rowHeight,
|
|
30
|
+
});
|
|
31
|
+
const { selectedCell, selectedColumn, handleCellClick, handleColumnClick } = useSelection();
|
|
32
|
+
const isDelayedFetchingNextPage = useDelayToSetValue({ value: isFetchingNextPage, delay: 1000 });
|
|
33
|
+
const { isError, tableLoading, tableError, tableEmpty, hasTimeoutError, showNoDataView } = useSheetViewStates({
|
|
34
|
+
rowsLength: rows.length,
|
|
35
|
+
isLoading,
|
|
36
|
+
error,
|
|
71
37
|
});
|
|
72
|
-
const [showBackDrop, setShowBackdrop] = useState(false);
|
|
73
|
-
const isError = hasError(error);
|
|
74
|
-
const tableLoading = isLoading !== null && isLoading !== void 0 ? isLoading : true;
|
|
75
|
-
const tableError = !isLoading && rows.length === 0 && isError && !isNotFoundError(error);
|
|
76
|
-
const tableEmpty = !isLoading && rows.length === 0;
|
|
77
|
-
const hasTimeoutError = isTimeoutError(error);
|
|
78
|
-
const lastItemIndex = rows.length - 1;
|
|
79
38
|
const areTotalRowsNotFillingHeight = isHeightNotFullyFilledByRows(rows.length) && !tableLoading;
|
|
80
39
|
const itemsCount = isDelayedFetchingNextPage || areAllRowsLoaded ? rows.length + 1 : rows.length;
|
|
81
|
-
const
|
|
82
|
-
const tableItemsCount = itemsCount;
|
|
83
|
-
const handleOnLoadMoreItems = () => __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
if (areAllRowsLoaded)
|
|
85
|
-
return;
|
|
86
|
-
yield (loadMoreItems === null || loadMoreItems === void 0 ? void 0 : loadMoreItems());
|
|
87
|
-
});
|
|
88
|
-
const listRef = containerKey === 'pinnedStart' ? pinnedStartVirtualListRef : containerKey === 'pinnedEnd' ? pinnedEndVirtualListRef : scrollableVirtualListRef;
|
|
89
|
-
const handleScrollCallback = (scrollProps) => {
|
|
90
|
-
const source = containerKey === 'pinnedStart' ? 'start' : containerKey === 'pinnedEnd' ? 'end' : 'scrollable';
|
|
91
|
-
handleScroll(scrollProps, source);
|
|
92
|
-
};
|
|
93
|
-
return (_jsx(InfiniteLoader, Object.assign({ isItemLoaded: (index) => index !== lastItemIndex, itemCount: tableItemsCount, loadMoreItems: handleOnLoadMoreItems, threshold: threshold }, { children: ({ onItemsRendered }) => (_jsx(AutoSizer, { children: ({ height, width }) => {
|
|
94
|
-
var _a;
|
|
95
|
-
const getItemSize = (index) => {
|
|
96
|
-
const isLastRow = areAllRowsLoaded && index === rows.length;
|
|
97
|
-
if (isLastRow) {
|
|
98
|
-
const usedHeight = rows.length * rowHeight;
|
|
99
|
-
const remainingHeight = height - usedHeight;
|
|
100
|
-
const minimumLastRowHeight = rowHeight * 2;
|
|
101
|
-
return Math.max(remainingHeight, minimumLastRowHeight);
|
|
102
|
-
}
|
|
103
|
-
return rowHeight;
|
|
104
|
-
};
|
|
105
|
-
const commonItemDataParams = [
|
|
106
|
-
isDelayedFetchingNextPage,
|
|
107
|
-
rows,
|
|
108
|
-
rowProps,
|
|
109
|
-
scrollToIndex,
|
|
110
|
-
lastItemIndex,
|
|
111
|
-
(_a = footerProps === null || footerProps === void 0 ? void 0 : footerProps.totalCount) !== null && _a !== void 0 ? _a : 0,
|
|
112
|
-
isError,
|
|
113
|
-
areAllRowsLoaded,
|
|
114
|
-
];
|
|
115
|
-
const commonItemDataSuffix = [selectedCell, selectedColumn, handleCellClick, height, rowHeight];
|
|
116
|
-
const getItemDataForContainer = (columnsData, isPinnedColumn) => createItemData(columnsData, ...commonItemDataParams, isPinnedColumn, ...commonItemDataSuffix);
|
|
117
|
-
const currentItemData = containerKey === 'pinnedStart'
|
|
118
|
-
? getItemDataForContainer(pinnedStartColumnsData, true)
|
|
119
|
-
: containerKey === 'pinnedEnd'
|
|
120
|
-
? getItemDataForContainer(pinnedEndColumnsData, true)
|
|
121
|
-
: getItemDataForContainer(unpinnedColumnsData, false);
|
|
122
|
-
return (_jsx(StyledVirtualList, Object.assign({ listRef: listRef, height: height, width: fixedWidth || width, itemCount: tableItemsCount, itemSize: getItemSize, itemData: currentItemData, onItemsRendered: onItemsRendered, overscanCount: TABLE_LIST_OVER_SCAN, setBackdropVisibility: setShowBackdrop, scrollToIndex: scrollToIndex, areTotalRowsNotFillingHeight: areTotalRowsNotFillingHeight, useIsScrolling: true, onScroll: handleScrollCallback, clearBackdropVisibilityTimeout: clearBackdropVisibilityTimeout, style: {
|
|
123
|
-
overflowX: isPinned ? 'hidden' : 'auto',
|
|
124
|
-
paddingBottom: isPinned ? '25px' : '13px',
|
|
125
|
-
backgroundColor: isPinned ? 'transparent' : '#F6F8FACC',
|
|
126
|
-
} }, { children: ListItemWrapper })));
|
|
127
|
-
} })) })));
|
|
128
|
-
}, [
|
|
129
|
-
itemsCount,
|
|
130
|
-
areAllRowsLoaded,
|
|
131
|
-
loadMoreItems,
|
|
132
|
-
threshold,
|
|
133
|
-
rowHeight,
|
|
134
|
-
rows,
|
|
135
|
-
pinnedStartColumnsData,
|
|
136
|
-
pinnedEndColumnsData,
|
|
137
|
-
unpinnedColumnsData,
|
|
138
|
-
isDelayedFetchingNextPage,
|
|
139
|
-
rowProps,
|
|
140
|
-
scrollToIndex,
|
|
141
|
-
lastItemIndex,
|
|
142
|
-
footerProps === null || footerProps === void 0 ? void 0 : footerProps.totalCount,
|
|
143
|
-
isError,
|
|
144
|
-
areTotalRowsNotFillingHeight,
|
|
145
|
-
selectedCell,
|
|
146
|
-
selectedColumn,
|
|
147
|
-
handleCellClick,
|
|
148
|
-
handleScroll,
|
|
149
|
-
clearBackdropVisibilityTimeout,
|
|
150
|
-
pinnedEndVirtualListRef,
|
|
151
|
-
pinnedStartVirtualListRef,
|
|
152
|
-
scrollableVirtualListRef,
|
|
153
|
-
theme.palette.background.default,
|
|
154
|
-
]);
|
|
155
|
-
const showNoDataView = tableLoading || tableError || tableEmpty || hasTimeoutError;
|
|
156
|
-
const pinnedStartColumnsWidth = useMemo(() => pinnedStartColumnsData.reduce((acc, col) => {
|
|
157
|
-
const width = typeof col.width === 'string' ? parseInt(col.width) : col.width || 100;
|
|
158
|
-
return acc + width;
|
|
159
|
-
}, 0.2), [pinnedStartColumnsData]);
|
|
160
|
-
const pinnedEndColumnsWidth = useMemo(() => pinnedEndColumnsData.reduce((acc, col) => {
|
|
161
|
-
const width = typeof col.width === 'string' ? parseInt(col.width) : col.width || 100;
|
|
162
|
-
return acc + width;
|
|
163
|
-
}, 0.2), [pinnedEndColumnsData]);
|
|
40
|
+
const { pinnedStartColumnsWidth, pinnedEndColumnsWidth } = usePinnedWidths(pinnedStartColumnsData, pinnedEndColumnsData);
|
|
164
41
|
const renderPinnedColumn = (position, columnsData, columnsWidth, pinnedColumnsList) => {
|
|
165
|
-
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
minWidth: 'fit-content',
|
|
172
|
-
overflowX: 'hidden',
|
|
173
|
-
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_PinnedStyledBox", hidePadding: true, className: "list-wrapper" }, { children: createVirtualTableContainer(columnsData, containerKey, true, columnsWidth) })) }))] })) }));
|
|
42
|
+
var _a;
|
|
43
|
+
const listRef = position === 'start' ? pinnedStartVirtualListRef : pinnedEndVirtualListRef;
|
|
44
|
+
return (_jsx(PinnedColumnSection, { "data-testid": `SheetViewVirtualTable_PinnedColumnSection_${position}`, position: position, columnsData: columnsData, columnsWidth: columnsWidth, pinnedColumnsList: pinnedColumnsList, showHeader: showHeader, headerProps: headerProps, columnsSorting: columnsSorting, onColumnSort: onColumnSort, showBackDrop: showBackDrop, onColumnPin: handleColumnPin, isPinnable: isPinnable, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: handleColumnClick, listRef: listRef, itemsCount: itemsCount, rows: rows, rowProps: rowProps, rowsLength: rows.length, loadMoreItems: loadMoreItems, threshold: threshold, areAllRowsLoaded: areAllRowsLoaded, rowHeight: rowHeight, scrollToIndex: scrollToIndex, totalCount: (_a = footerProps === null || footerProps === void 0 ? void 0 : footerProps.totalCount) !== null && _a !== void 0 ? _a : 0, isError: isError, isDelayedFetchingNextPage: Boolean(isDelayedFetchingNextPage), selectedCell: selectedCell, selectedColumnValue: selectedColumn, handleCellClick: handleCellClick, areTotalRowsNotFillingHeight: areTotalRowsNotFillingHeight, setShowBackdrop: setShowBackdrop, handleScroll: handleScroll, clearBackdropVisibilityTimeout: clearBackdropVisibilityTimeout, getItemSize: getItemSize, tableTitle: tableTitle, areAllRowsLoadedDataAttr: !!areAllRowsLoaded, isFetchingNextPageDataAttr: !!isFetchingNextPage, isLoadingDataAttr: !!isLoading, hasTimeoutErrorDataAttr: !!hasTimeoutError, tableMode: tableMode, showNoDataView: showNoDataView }));
|
|
45
|
+
};
|
|
46
|
+
const onPointerDown = (e) => {
|
|
47
|
+
dragControls === null || dragControls === void 0 ? void 0 : dragControls.start(e);
|
|
174
48
|
};
|
|
175
|
-
return (_jsxs(_Fragment, { children: [_jsx(TableContainer, { children: showNoDataView ? (tableLoading
|
|
176
|
-
marginLeft: '28px',
|
|
177
|
-
maxHeight: 'calc(100vh - 300px)',
|
|
178
|
-
overflow: 'auto',
|
|
179
|
-
} }, { children: _jsxs(TableWrapper, Object.assign({ "data-testid": "SheetViewVirtualTable_LoadingTableWrapper", showNoDataView: showNoDataView, sx: Object.assign(Object.assign({}, tableBodyStyles), { display: 'flex', flexDirection: 'column', height: 'auto' }) }, { children: [showHeader && (_jsx(UnpinnedTableHeaderWrapper, { children: _jsx(SheetViewTableHeader, { "data-testid": "SheetViewVirtualTable_LoadingTableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: orderedColumns, headerProps: headerProps, showBackDrop: showBackDrop, pinnedColumns: [], onColumnPin: handleColumnPin, isPinnable: false, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: handleColumnClick }) })), _jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_LoadingTableWrapper", sx: {
|
|
180
|
-
width: '100%',
|
|
181
|
-
minWidth: 'fit-content',
|
|
182
|
-
height: 'auto',
|
|
183
|
-
display: 'flex',
|
|
184
|
-
flexDirection: 'column',
|
|
185
|
-
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_LoadingStyledBox", hidePadding: true, className: "list-wrapper", sx: {
|
|
186
|
-
height: 'auto',
|
|
187
|
-
display: 'flex',
|
|
188
|
-
flexDirection: 'column',
|
|
189
|
-
} }, { children: _jsx(SheetViewTableNoData, { error: error, tableEmpty: tableEmpty, isTimeoutError: hasTimeoutError, tableError: tableError, tableLoading: tableLoading, orderedColumns: orderedColumns, triggerDataRefetch: triggerDataRefetch, footerProps: footerProps }) })) }))] })) }))) : (_jsx(StyledTableBox, Object.assign({ as: "main", id: "sheet-table-box-container", "aria-labelledby": "sheet-table-box-container", "data-testid": "SheetViewVirtualTable_StyledTableBox", "data-title": tableTitle, "data-direction": theme.direction, "data-are-all-rows-loaded": !!areAllRowsLoaded, "data-is-fetching-next-page": !!isFetchingNextPage, "data-scroll-to-index": scrollToIndex, "data-is-loading": !!isLoading, "data-is-error": !!isError, "data-is-error-timeout": !!hasTimeoutError, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showNoDataView: showNoDataView }, { children: _jsxs(TableWrapper, Object.assign({ isSheetView: true, "data-testid": "SheetViewVirtualTable_TableWrapper", showNoDataView: showNoDataView, sx: tableBodyStyles }, { children: [showHeader && (_jsx(UnpinnedTableHeaderWrapper, { children: _jsx(SheetViewTableHeader, { "data-testid": "SheetViewVirtualTable_LoadingTableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: orderedColumns, headerProps: headerProps, showBackDrop: showBackDrop, pinnedColumns: [], onColumnPin: handleColumnPin, isPinnable: false, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: handleColumnClick }) })), _jsx(TableNoData, { error: error, tableEmpty: tableEmpty, isTimeoutError: hasTimeoutError, tableError: tableError, tableLoading: tableLoading, orderedColumns: orderedColumns, triggerDataRefetch: triggerDataRefetch, footerProps: footerProps })] })) })))) : (_jsxs(SheetViewVirtualTableWrapper, { children: [renderPinnedColumn('start', pinnedStartColumnsData, pinnedStartColumnsWidth, pinnedStartColumns), _jsx(MainTableWrapper, Object.assign({ hasPinnedStart: pinnedStartColumnsData.length > 0, hasPinnedEnd: pinnedEndColumnsData.length > 0 }, { children: _jsx(StyledTableBox, Object.assign({ as: "main", id: "sheet-table-box-container", "aria-labelledby": "sheet-table-box-container", "data-testid": "SheetViewVirtualTable_StyledTableBox", "data-title": tableTitle, "data-direction": theme.direction, "data-are-all-rows-loaded": !!areAllRowsLoaded, "data-is-fetching-next-page": !!isFetchingNextPage, "data-scroll-to-index": scrollToIndex, "data-is-loading": !!isLoading, "data-is-error": !!isError, "data-is-error-timeout": !!hasTimeoutError, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showNoDataView: showNoDataView, scrollable: true }, { children: _jsxs(TableWrapper, Object.assign({ "data-testid": "SheetViewVirtualTable_TableWrapper", showNoDataView: showNoDataView, sx: Object.assign(Object.assign({}, tableBodyStyles), { display: 'flex', flexDirection: 'column', height: '100%' }) }, { children: [showHeader && (_jsx(UnpinnedTableHeaderWrapper, { children: _jsx(SheetViewTableHeader, { "data-testid": "SheetViewVirtualTable_UnpinnedTableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: unpinnedColumnsData, headerProps: headerProps, showBackDrop: showBackDrop, pinnedColumns: [...pinnedStartColumns, ...pinnedEndColumns], onColumnPin: handleColumnPin, isPinnable: isPinnable, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: handleColumnClick }) })), _jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_TableWrapper", sx: {
|
|
49
|
+
return (_jsxs(_Fragment, { children: [_jsx(TableContainer, Object.assign({ "data-testid": "SheetViewVirtualTable_TableContainer" }, { children: showNoDataView ? (_jsx(NoDataSection, { "data-testid": "SheetViewVirtualTable_NoDataSection", showHeader: showHeader, headerProps: headerProps, columnsSorting: columnsSorting, onColumnSort: onColumnSort, showBackDrop: showBackDrop, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: handleColumnClick, orderedColumns: orderedColumns, showNoDataView: showNoDataView, tableLoading: tableLoading, tableTitle: tableTitle, areAllRowsLoaded: areAllRowsLoaded, isFetchingNextPage: isFetchingNextPage, isLoading: isLoading, isError: isError, hasTimeoutError: hasTimeoutError, tableEmpty: tableEmpty, tableError: tableError, error: error, triggerDataRefetch: triggerDataRefetch, footerProps: footerProps, tableBodyStyles: tableBodyStyles, tableMode: tableMode, scrollToIndex: scrollToIndex })) : (_jsxs(SheetViewVirtualTableWrapper, Object.assign({ "data-testid": "SheetViewVirtualTable_Wrapper" }, { children: [renderPinnedColumn('start', pinnedStartColumnsData, pinnedStartColumnsWidth, pinnedStartColumns), _jsx(MainTableWrapper, Object.assign({ hasPinnedStart: pinnedStartColumnsData.length > 0, hasPinnedEnd: pinnedEndColumnsData.length > 0, "data-testid": "SheetViewVirtualTable_MainTableWrapper" }, { children: _jsx(StyledTableBox, Object.assign({ as: "main", id: "sheet-table-box-container", "aria-labelledby": "sheet-table-box-container", "data-testid": "SheetViewVirtualTable_StyledTableBox", "data-title": tableTitle, "data-direction": theme.direction, "data-are-all-rows-loaded": !!areAllRowsLoaded, "data-is-fetching-next-page": !!isFetchingNextPage, "data-scroll-to-index": scrollToIndex, "data-is-loading": !!isLoading, "data-is-error": !!isError, "data-is-error-timeout": !!hasTimeoutError, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showNoDataView: showNoDataView, scrollable: true }, { children: _jsxs(TableWrapper, Object.assign({ "data-testid": "SheetViewVirtualTable_TableWrapper", showNoDataView: showNoDataView, sx: Object.assign(Object.assign({}, tableBodyStyles), { display: 'flex', flexDirection: 'column', height: '100%' }) }, { children: [showHeader && (_jsx(UnpinnedTableHeaderWrapper, Object.assign({ "data-testid": "SheetViewVirtualTable_UnpinnedTableHeaderWrapper" }, { children: _jsx(SheetViewTableHeader, { "data-testid": "SheetViewVirtualTable_UnpinnedTableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: unpinnedColumnsData, headerProps: headerProps, showBackDrop: showBackDrop, pinnedColumns: [...pinnedStartColumns, ...pinnedEndColumns], onColumnPin: handleColumnPin, isPinnable: isPinnable, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: handleColumnClick }) }))), _jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_TableWrapper", sx: {
|
|
190
50
|
width: '100%',
|
|
191
51
|
minWidth: 'fit-content',
|
|
192
|
-
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_ScrollableStyledBox", hidePadding: true, className: "list-wrapper" }, { children:
|
|
52
|
+
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_ScrollableStyledBox", hidePadding: true, className: "list-wrapper" }, { children: _jsx(VirtualListSection, { "data-testid": "SheetViewVirtualTable_VirtualListSection_scrollable", containerKey: "scrollable", isPinned: false, listRef: scrollableVirtualListRef, columnsData: unpinnedColumnsData, itemsCount: itemsCount, rows: rows, rowProps: rowProps, rowsLength: rows.length, loadMoreItems: loadMoreItems, threshold: threshold, areAllRowsLoaded: areAllRowsLoaded, rowHeight: rowHeight, scrollToIndex: scrollToIndex, totalCount: (_a = footerProps === null || footerProps === void 0 ? void 0 : footerProps.totalCount) !== null && _a !== void 0 ? _a : 0, isError: isError, isDelayedFetchingNextPage: Boolean(isDelayedFetchingNextPage), selectedCell: selectedCell, selectedColumn: selectedColumn, handleCellClick: handleCellClick, areTotalRowsNotFillingHeight: areTotalRowsNotFillingHeight, setShowBackdrop: setShowBackdrop, handleScroll: handleScroll, clearBackdropVisibilityTimeout: clearBackdropVisibilityTimeout, getItemSize: getItemSize, updateReferenceHeight: updateReferenceHeight }) })) }))] })) })) })), renderPinnedColumn('end', pinnedEndColumnsData, pinnedEndColumnsWidth, [...pinnedStartColumns, ...pinnedEndColumns])] }))) })), _jsx(TableFooter, Object.assign({ "data-testid": "SheetViewVirtualTable_TableFooter", showSeparator: true, showBackDrop: showBackDrop, onPointerDown: onPointerDown }, footerProps))] }));
|
|
193
53
|
}
|
|
194
54
|
export default memo(SheetViewVirtualTable);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { IColumnProps, IVirtualTable } from '../../../../types/index.js';
|
|
3
|
+
interface NoDataSectionProps {
|
|
4
|
+
showHeader?: boolean;
|
|
5
|
+
headerProps?: IVirtualTable['headerProps'];
|
|
6
|
+
columnsSorting?: IVirtualTable['columnsSorting'];
|
|
7
|
+
onColumnSort?: IVirtualTable['onColumnSort'];
|
|
8
|
+
showBackDrop: boolean;
|
|
9
|
+
lastColumnId?: string | null;
|
|
10
|
+
selectedColumn?: string | null;
|
|
11
|
+
onColumnClick?: (columnId: string, event: React.MouseEvent) => void;
|
|
12
|
+
orderedColumns: IColumnProps[];
|
|
13
|
+
showNoDataView: boolean;
|
|
14
|
+
tableLoading: boolean;
|
|
15
|
+
tableTitle?: string;
|
|
16
|
+
areAllRowsLoaded: boolean;
|
|
17
|
+
isFetchingNextPage?: boolean;
|
|
18
|
+
isLoading?: boolean;
|
|
19
|
+
isError: boolean;
|
|
20
|
+
hasTimeoutError: boolean;
|
|
21
|
+
tableEmpty: boolean;
|
|
22
|
+
tableError: boolean;
|
|
23
|
+
error?: Error | null;
|
|
24
|
+
triggerDataRefetch: () => Promise<unknown>;
|
|
25
|
+
footerProps: IVirtualTable['footerProps'];
|
|
26
|
+
tableBodyStyles?: IVirtualTable['tableBodyStyles'];
|
|
27
|
+
tableMode?: string;
|
|
28
|
+
scrollToIndex?: number;
|
|
29
|
+
}
|
|
30
|
+
declare function NoDataSection({ showHeader, headerProps, columnsSorting, onColumnSort, showBackDrop, lastColumnId, selectedColumn, onColumnClick, orderedColumns, showNoDataView, tableLoading, tableTitle, areAllRowsLoaded, isFetchingNextPage, isLoading, isError, hasTimeoutError, tableEmpty, tableError, error, triggerDataRefetch, footerProps, tableBodyStyles, tableMode, scrollToIndex, }: Readonly<NoDataSectionProps>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare const _default: import("react").MemoExoticComponent<typeof NoDataSection>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { useTheme } from '@mui/material/styles';
|
|
4
|
+
import { StyledBox, StyledTableBox, TableWrapper } from '../../components/style';
|
|
5
|
+
import { UnpinnedTableHeaderWrapper } from '../style';
|
|
6
|
+
import SheetViewTableHeader from './SheetViewTableHeader';
|
|
7
|
+
import { SheetViewTableNoData } from './index';
|
|
8
|
+
import TableNoData from '../../components/TableNoData';
|
|
9
|
+
function NoDataSection({ showHeader, headerProps, columnsSorting, onColumnSort, showBackDrop, lastColumnId, selectedColumn, onColumnClick, orderedColumns, showNoDataView, tableLoading, tableTitle, areAllRowsLoaded, isFetchingNextPage, isLoading, isError, hasTimeoutError, tableEmpty, tableError, error, triggerDataRefetch, footerProps, tableBodyStyles, tableMode, scrollToIndex, }) {
|
|
10
|
+
const theme = useTheme();
|
|
11
|
+
if (tableLoading) {
|
|
12
|
+
return (_jsx(StyledTableBox, Object.assign({ as: "main", id: "sheet-table-box-container", "aria-labelledby": "sheet-table-box-container", "data-testid": "SheetViewVirtualTable_StyledTableBox_Loading", "data-title": tableTitle, "data-direction": theme.direction, "data-are-all-rows-loaded": !!areAllRowsLoaded, "data-is-fetching-next-page": !!isFetchingNextPage, "data-scroll-to-index": scrollToIndex, "data-is-loading": !!isLoading, "data-is-error": !!isError, "data-is-error-timeout": !!hasTimeoutError, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showNoDataView: showNoDataView, scrollable: true, sx: {
|
|
13
|
+
marginLeft: '28px',
|
|
14
|
+
maxHeight: 'calc(100vh - 300px)',
|
|
15
|
+
overflow: 'auto',
|
|
16
|
+
} }, { children: _jsxs(TableWrapper, Object.assign({ "data-testid": "SheetViewVirtualTable_LoadingTableWrapper", showNoDataView: showNoDataView, sx: Object.assign(Object.assign({}, tableBodyStyles), { display: 'flex', flexDirection: 'column', height: 'auto' }) }, { children: [showHeader && (_jsx(UnpinnedTableHeaderWrapper, Object.assign({ "data-testid": "SheetViewVirtualTable_Loading_UnpinnedTableHeaderWrapper" }, { children: _jsx(SheetViewTableHeader, { "data-testid": "SheetViewVirtualTable_LoadingTableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: orderedColumns, headerProps: headerProps, showBackDrop: showBackDrop, pinnedColumns: [], onColumnPin: undefined, isPinnable: false, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: onColumnClick }) }))), _jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_LoadingTableWrapper", sx: {
|
|
17
|
+
width: '100%',
|
|
18
|
+
minWidth: 'fit-content',
|
|
19
|
+
height: 'auto',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_LoadingStyledBox", hidePadding: true, className: "list-wrapper", sx: {
|
|
23
|
+
height: 'auto',
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'column',
|
|
26
|
+
} }, { children: _jsx(SheetViewTableNoData, { error: error !== null && error !== void 0 ? error : null, tableEmpty: tableEmpty, isTimeoutError: hasTimeoutError, tableError: tableError, tableLoading: tableLoading, orderedColumns: orderedColumns, triggerDataRefetch: triggerDataRefetch, footerProps: footerProps }) })) }))] })) })));
|
|
27
|
+
}
|
|
28
|
+
return (_jsx(StyledTableBox, Object.assign({ as: "main", id: "sheet-table-box-container", "aria-labelledby": "sheet-table-box-container", "data-testid": "SheetViewVirtualTable_StyledTableBox", "data-title": tableTitle, "data-direction": theme.direction, "data-are-all-rows-loaded": !!areAllRowsLoaded, "data-is-fetching-next-page": !!isFetchingNextPage, "data-scroll-to-index": scrollToIndex, "data-is-loading": !!isLoading, "data-is-error": !!isError, "data-is-error-timeout": !!hasTimeoutError, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showNoDataView: showNoDataView }, { children: _jsxs(TableWrapper, Object.assign({ isSheetView: true, "data-testid": "SheetViewVirtualTable_TableWrapper", showNoDataView: showNoDataView, sx: tableBodyStyles }, { children: [showHeader && (_jsx(UnpinnedTableHeaderWrapper, { children: _jsx(SheetViewTableHeader, { "data-testid": "SheetViewVirtualTable_LoadingTableHeader", columnsSorting: columnsSorting, onColumnSort: onColumnSort, columns: orderedColumns, headerProps: headerProps, showBackDrop: showBackDrop, pinnedColumns: [], onColumnPin: undefined, isPinnable: false, lastColumnId: lastColumnId, selectedColumn: selectedColumn, onColumnClick: onColumnClick }) })), _jsx(TableNoData, { error: error !== null && error !== void 0 ? error : null, tableEmpty: tableEmpty, isTimeoutError: hasTimeoutError, tableError: tableError, tableLoading: tableLoading, orderedColumns: orderedColumns, triggerDataRefetch: triggerDataRefetch, footerProps: footerProps })] })) })));
|
|
29
|
+
}
|
|
30
|
+
export default memo(NoDataSection);
|
package/build/components/VirtualTables/SheetViewVirtualTable/components/PinnedColumnSection.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ListOnScrollProps, VariableSizeList } from 'react-window';
|
|
3
|
+
import type { IColumnProps, IVirtualTable } from '../../../../types/index.js';
|
|
4
|
+
interface PinnedColumnSectionProps {
|
|
5
|
+
position: 'start' | 'end';
|
|
6
|
+
columnsData: IColumnProps[];
|
|
7
|
+
columnsWidth: number;
|
|
8
|
+
pinnedColumnsList: string[];
|
|
9
|
+
showHeader?: boolean;
|
|
10
|
+
headerProps?: IVirtualTable['headerProps'];
|
|
11
|
+
columnsSorting?: IVirtualTable['columnsSorting'];
|
|
12
|
+
onColumnSort?: IVirtualTable['onColumnSort'];
|
|
13
|
+
showBackDrop: boolean;
|
|
14
|
+
onColumnPin?: (columnId: string, position: 'start' | 'end' | 'unpin') => void;
|
|
15
|
+
isPinnable?: boolean;
|
|
16
|
+
lastColumnId?: string | null;
|
|
17
|
+
selectedColumn?: string | null;
|
|
18
|
+
onColumnClick?: (columnId: string, event: React.MouseEvent) => void;
|
|
19
|
+
listRef: React.RefObject<VariableSizeList>;
|
|
20
|
+
itemsCount: number;
|
|
21
|
+
rows: unknown[];
|
|
22
|
+
rowProps: unknown;
|
|
23
|
+
rowsLength: number;
|
|
24
|
+
loadMoreItems?: () => Promise<unknown>;
|
|
25
|
+
threshold: number;
|
|
26
|
+
areAllRowsLoaded: boolean;
|
|
27
|
+
rowHeight: number;
|
|
28
|
+
scrollToIndex?: number;
|
|
29
|
+
totalCount: number;
|
|
30
|
+
isError: boolean;
|
|
31
|
+
isDelayedFetchingNextPage: boolean;
|
|
32
|
+
selectedCell: string | null;
|
|
33
|
+
selectedColumnValue: string | null;
|
|
34
|
+
handleCellClick: (rowIndex: number, columnId: string, event: React.MouseEvent) => void;
|
|
35
|
+
areTotalRowsNotFillingHeight: boolean;
|
|
36
|
+
setShowBackdrop: (v: boolean) => void;
|
|
37
|
+
handleScroll: (scrollProps: ListOnScrollProps, source: 'start' | 'end' | 'scrollable') => void;
|
|
38
|
+
clearBackdropVisibilityTimeout: number;
|
|
39
|
+
getItemSize?: (index: number) => number;
|
|
40
|
+
updateReferenceHeight?: (height: number) => void;
|
|
41
|
+
tableTitle?: string;
|
|
42
|
+
areAllRowsLoadedDataAttr: boolean;
|
|
43
|
+
isFetchingNextPageDataAttr?: boolean;
|
|
44
|
+
isLoadingDataAttr?: boolean;
|
|
45
|
+
hasTimeoutErrorDataAttr: boolean;
|
|
46
|
+
tableMode?: string;
|
|
47
|
+
showNoDataView: boolean;
|
|
48
|
+
}
|
|
49
|
+
declare function PinnedColumnSection({ position, columnsData, columnsWidth, pinnedColumnsList, showHeader, headerProps, columnsSorting, onColumnSort, showBackDrop, onColumnPin, isPinnable, lastColumnId, selectedColumn, onColumnClick, listRef, itemsCount, rows, rowProps, rowsLength, loadMoreItems, threshold, areAllRowsLoaded, rowHeight, scrollToIndex, totalCount, isError, isDelayedFetchingNextPage, selectedCell, selectedColumnValue, handleCellClick, areTotalRowsNotFillingHeight, setShowBackdrop, handleScroll, clearBackdropVisibilityTimeout, getItemSize, updateReferenceHeight, tableTitle, areAllRowsLoadedDataAttr, isFetchingNextPageDataAttr, isLoadingDataAttr, hasTimeoutErrorDataAttr, tableMode, showNoDataView, }: Readonly<PinnedColumnSectionProps>): import("react/jsx-runtime").JSX.Element | null;
|
|
50
|
+
declare const _default: import("react").MemoExoticComponent<typeof PinnedColumnSection>;
|
|
51
|
+
export default _default;
|