@tap-payments/os-micro-frontend-shared 0.0.90 → 0.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/build/components/RangeCalender/RangeCalender.d.ts +20 -0
  2. package/build/components/RangeCalender/RangeCalender.js +92 -0
  3. package/build/components/RangeCalender/components/CustomTimepicker/CustomTimepicker.d.ts +11 -0
  4. package/build/components/RangeCalender/components/CustomTimepicker/CustomTimepicker.js +33 -0
  5. package/build/components/RangeCalender/components/CustomTimepicker/index.d.ts +2 -0
  6. package/build/components/RangeCalender/components/CustomTimepicker/index.js +2 -0
  7. package/build/components/RangeCalender/components/CustomTimepicker/style.d.ts +15 -0
  8. package/build/components/RangeCalender/components/CustomTimepicker/style.js +132 -0
  9. package/build/components/RangeCalender/components/GroupBy/GroupBy.d.ts +10 -0
  10. package/build/components/RangeCalender/components/GroupBy/GroupBy.js +33 -0
  11. package/build/components/RangeCalender/components/GroupBy/index.d.ts +2 -0
  12. package/build/components/RangeCalender/components/GroupBy/index.js +2 -0
  13. package/build/components/RangeCalender/components/GroupBy/style.d.ts +15 -0
  14. package/build/components/RangeCalender/components/GroupBy/style.js +39 -0
  15. package/build/components/RangeCalender/components/Hijri/Hijri.d.ts +7 -0
  16. package/build/components/RangeCalender/components/Hijri/Hijri.js +13 -0
  17. package/build/components/RangeCalender/components/Hijri/index.d.ts +2 -0
  18. package/build/components/RangeCalender/components/Hijri/index.js +2 -0
  19. package/build/components/RangeCalender/components/Hijri/style.d.ts +4 -0
  20. package/build/components/RangeCalender/components/Hijri/style.js +25 -0
  21. package/build/components/RangeCalender/components/QuickFilters/QuickFilters.d.ts +8 -0
  22. package/build/components/RangeCalender/components/QuickFilters/QuickFilters.js +47 -0
  23. package/build/components/RangeCalender/components/QuickFilters/index.d.ts +2 -0
  24. package/build/components/RangeCalender/components/QuickFilters/index.js +2 -0
  25. package/build/components/RangeCalender/components/QuickFilters/style.d.ts +7 -0
  26. package/build/components/RangeCalender/components/QuickFilters/style.js +27 -0
  27. package/build/components/RangeCalender/components/RangeDatepicker/RangeDatepicker.d.ts +12 -0
  28. package/build/components/RangeCalender/components/RangeDatepicker/RangeDatepicker.js +29 -0
  29. package/build/components/RangeCalender/components/RangeDatepicker/index.d.ts +2 -0
  30. package/build/components/RangeCalender/components/RangeDatepicker/index.js +2 -0
  31. package/build/components/RangeCalender/components/RangeDatepicker/style.d.ts +4 -0
  32. package/build/components/RangeCalender/components/RangeDatepicker/style.js +9 -0
  33. package/build/components/RangeCalender/components/Timezone/Timezone.d.ts +11 -0
  34. package/build/components/RangeCalender/components/Timezone/Timezone.js +32 -0
  35. package/build/components/RangeCalender/components/Timezone/components/EntitiesTimezone.d.ts +12 -0
  36. package/build/components/RangeCalender/components/Timezone/components/EntitiesTimezone.js +37 -0
  37. package/build/components/RangeCalender/components/Timezone/components/UserTimezone.d.ts +8 -0
  38. package/build/components/RangeCalender/components/Timezone/components/UserTimezone.js +14 -0
  39. package/build/components/RangeCalender/components/Timezone/index.d.ts +2 -0
  40. package/build/components/RangeCalender/components/Timezone/index.js +2 -0
  41. package/build/components/RangeCalender/components/Timezone/style.d.ts +21 -0
  42. package/build/components/RangeCalender/components/Timezone/style.js +61 -0
  43. package/build/components/RangeCalender/index.d.ts +2 -0
  44. package/build/components/RangeCalender/index.js +2 -0
  45. package/build/components/RangeCalender/style.d.ts +33 -0
  46. package/build/components/RangeCalender/style.js +189 -0
  47. package/build/components/RangeCalender/type.d.ts +2 -0
  48. package/build/components/RangeCalender/type.js +1 -0
  49. package/build/components/RangeCalender/utils.d.ts +6 -0
  50. package/build/components/RangeCalender/utils.js +15 -0
  51. package/build/components/TableCells/CustomCells/ActionCell/constant.d.ts +3 -0
  52. package/build/components/TableCells/CustomCells/ActionCell/constant.js +4 -1
  53. package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -1
  54. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
  55. package/build/components/VirtualTable/SheetView/SheetViewVirtualTable.js +3 -1
  56. package/build/components/VirtualTable/SheetView/style.js +1 -0
  57. package/build/components/VirtualTable/components/virtualScroll/ListItemWrapper.js +2 -7
  58. package/build/components/VirtualTable/style.d.ts +1 -0
  59. package/build/components/VirtualTable/style.js +20 -2
  60. package/build/components/index.d.ts +1 -0
  61. package/build/components/index.js +1 -0
  62. package/build/constants/assets.d.ts +2 -0
  63. package/build/constants/assets.js +2 -0
  64. package/package.json +1 -1
@@ -79,6 +79,8 @@ function SheetViewVirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, sho
79
79
  };
80
80
  return (_jsx(InfiniteLoader, Object.assign({ isItemLoaded: (index) => index !== lastItemIndex, itemCount: tableItemsCount, loadMoreItems: handleOnLoadMoreItems, threshold: threshold }, { children: ({ onItemsRendered }) => (_jsx(AutoSizer, { children: ({ height, width }) => (_jsx(StyledVirtualList, Object.assign({ listRef: listRef, height: height, width: fixedWidth || width, itemCount: tableItemsCount, itemSize: () => rowHeight, itemData: currentItemData, onItemsRendered: onItemsRendered, overscanCount: TABLE_LIST_OVER_SCAN, setBackdropVisibility: setShowBackdrop, scrollToIndex: scrollToIndex, areTotalRowsNotFillingHeight: areTotalRowsNotFillingHeight, useIsScrolling: true, onScroll: handleScrollCallback, clearBackdropVisibilityTimeout: clearBackdropVisibilityTimeout, style: {
81
81
  overflowX: isPinned ? 'hidden' : 'auto',
82
+ paddingBottom: '12px',
83
+ backgroundColor: isPinned ? 'transparent' : theme.palette.background.default,
82
84
  } }, { children: ListItemWrapper }))) })) })));
83
85
  }, [
84
86
  itemsCount,
@@ -112,7 +114,7 @@ function SheetViewVirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, sho
112
114
  minWidth: 'fit-content',
113
115
  } }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_PinnedStyledBox", hidePadding: true, className: "list-wrapper" }, { children: createVirtualTableContainer(columnsData, containerKey, true, columnsWidth) })) }))] })) })));
114
116
  };
115
- return (_jsxs(_Fragment, { children: [_jsxs(TableContainer, { children: [showNoDataView ? (_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-show-background-color": !!showBackgroundColor, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showBackgroundColor: showBackgroundColor, showNoDataView: showNoDataView }, { children: _jsx(TableWrapper, Object.assign({ isSheetView: true, "data-testid": "SheetViewVirtualTable_TableWrapper", showNoDataView: showNoDataView, sx: tableBodyStyles }, { children: _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-show-background-color": !!showBackgroundColor, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showBackgroundColor: showBackgroundColor, showNoDataView: showNoDataView }, { 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 }) })), _jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_TableWrapper", sx: {
117
+ return (_jsxs(_Fragment, { children: [_jsxs(TableContainer, { children: [showNoDataView ? (_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-show-background-color": !!showBackgroundColor, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showBackgroundColor: showBackgroundColor, showNoDataView: showNoDataView }, { children: _jsx(TableWrapper, Object.assign({ isSheetView: true, "data-testid": "SheetViewVirtualTable_TableWrapper", showNoDataView: showNoDataView, sx: tableBodyStyles }, { children: _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-show-background-color": !!showBackgroundColor, "data-table-mode": tableMode, height: "100%", dir: theme.direction, showBackgroundColor: showBackgroundColor, 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 }) })), _jsx(TableWrapper, Object.assign({ "data-testid": "VirtualTable_TableWrapper", sx: {
116
118
  width: '100%',
117
119
  minWidth: 'fit-content',
118
120
  } }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_ScrollableStyledBox", hidePadding: true, className: "list-wrapper" }, { children: createVirtualTableContainer(unpinnedColumnsData, 'scrollable', false) })) }))] })) })) })), renderPinnedColumn('end', pinnedEndColumnsData, pinnedEndColumnsWidth, [...pinnedStartColumns, ...pinnedEndColumns])] })), !showNoDataView && areTotalRowsNotFillingHeight && !isFetchingNextPage && (_jsx(TableLastItem, { height: (itemsCount + 1) * TABLE_ROW_HEIGHT, sandboxMode: footerProps === null || footerProps === void 0 ? void 0 : footerProps.sandboxMode, "data-testid": "SheetViewVirtualTable_TableLastItem" }))] }), _jsx(TableFooter, Object.assign({ "data-testid": "SheetViewVirtualTable_TableFooter", showSeparator: true, showBackDrop: showBackDrop, onPointerDown: onPointerDown }, footerProps))] }));
@@ -86,6 +86,7 @@ export const MainTableWrapper = styled('div', {
86
86
  marginLeft: hasPinnedStart ? '0' : '32px',
87
87
  marginRight: hasPinnedEnd ? '0' : '32px',
88
88
  position: 'relative',
89
+ scrollbarWidth: 'auto',
89
90
  }));
90
91
  export const UnpinnedTableHeaderWrapper = styled('div')({
91
92
  flexShrink: 0,
@@ -56,15 +56,10 @@ function ListItemWrapper(_a) {
56
56
  const lastRowContent = _jsx(LastRowContent, { isLoadingRow: isLoadingRow });
57
57
  const isLastRow = isLoadingRow || (areAllRowsLoaded && index === lastItemIndex + 1);
58
58
  if (isPinned && isLastRow) {
59
- return _jsx(Box, { sx: { height: isSheetView ? SHEET_VIEW_TABLE_ROW_HEIGHT : TABLE_ROW_HEIGHT, backgroundColor: '#F6F8FACC' } });
59
+ return (_jsx(Box, { sx: Object.assign(Object.assign({}, (isSheetView ? { minHeight: SHEET_VIEW_TABLE_ROW_HEIGHT } : { height: TABLE_ROW_HEIGHT })), { backgroundColor: '#F6F8FACC' }) }));
60
60
  }
61
61
  if (isLastRow) {
62
- return (_jsx(Box, Object.assign({ sx: {
63
- height: isSheetView ? SHEET_VIEW_TABLE_ROW_HEIGHT : TABLE_ROW_HEIGHT,
64
- display: 'flex',
65
- justifyContent: 'center',
66
- alignItems: 'center',
67
- } }, { children: _jsx(Box, Object.assign({ sx: {
62
+ return (_jsx(Box, Object.assign({ sx: Object.assign(Object.assign({}, (isSheetView ? { minHeight: SHEET_VIEW_TABLE_ROW_HEIGHT } : { height: TABLE_ROW_HEIGHT })), { display: 'flex', justifyContent: 'center', alignItems: 'center' }) }, { children: _jsx(Box, Object.assign({ sx: {
68
63
  backgroundColor: '#F6F8FACC',
69
64
  display: 'flex',
70
65
  justifyContent: 'center',
@@ -41,6 +41,7 @@ export declare const StyledTableBox: import("@emotion/styled").StyledComponent<i
41
41
  }, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
42
42
  showBackgroundColor: boolean;
43
43
  showNoDataView: boolean;
44
+ scrollable?: boolean | undefined;
44
45
  }, {}, {}>;
45
46
  export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
46
47
  width?: string | number | undefined;
@@ -82,8 +82,8 @@ export const StyledTableRow = styled(MUITableRow, {
82
82
  },
83
83
  }))))));
84
84
  export const StyledTableBox = styled(Box, {
85
- shouldForwardProp: (prop) => prop !== 'showBackgroundColor' && prop !== 'showNoDataView',
86
- })(({ theme, showBackgroundColor, showNoDataView }) => ({
85
+ shouldForwardProp: (prop) => prop !== 'showBackgroundColor' && prop !== 'showNoDataView' && prop !== 'scrollable',
86
+ })(({ theme, showBackgroundColor, showNoDataView, scrollable }) => ({
87
87
  position: 'relative',
88
88
  backgroundColor: showBackgroundColor ? theme.palette.background.default : 'transparent',
89
89
  height: '100%',
@@ -91,6 +91,24 @@ export const StyledTableBox = styled(Box, {
91
91
  paddingBottom: showBackgroundColor ? '52px' : '0',
92
92
  display: 'flex',
93
93
  flexDirection: 'column',
94
+ '&:hover': {
95
+ scrollbarWidth: scrollable ? 'auto' : 'none',
96
+ },
97
+ '&::-webkit-scrollbar': {
98
+ display: 'block',
99
+ height: '13px',
100
+ },
101
+ '&::-webkit-scrollbar-track': {
102
+ background: 'white',
103
+ border: '1px solid #F2F2F2',
104
+ },
105
+ '&::-webkit-scrollbar-thumb': {
106
+ backgroundColor: '#DADCDF',
107
+ borderRadius: '32px',
108
+ border: '3px solid transparent',
109
+ backgroundClip: 'content-box',
110
+ minHeight: '20px',
111
+ },
94
112
  }));
95
113
  export const ActionIcon = styled(motion.img)(() => ({
96
114
  width: '24px',
@@ -88,3 +88,4 @@ export { default as Error } from './Error';
88
88
  export { default as StatusBar } from './StatusBar';
89
89
  export * from './Chip';
90
90
  export * from './TableHeader_V2';
91
+ export { default as RangeCalender } from './RangeCalender';
@@ -88,3 +88,4 @@ export { default as Error } from './Error';
88
88
  export { default as StatusBar } from './StatusBar';
89
89
  export * from './Chip';
90
90
  export * from './TableHeader_V2';
91
+ export { default as RangeCalender } from './RangeCalender';
@@ -351,6 +351,8 @@ export declare const agreementInstallmentIcon: string;
351
351
  export declare const agreementSavedCardIcon: string;
352
352
  export declare const agreementSubscriptionIcon: string;
353
353
  export declare const brandPlaceholderIcon: string;
354
+ export declare const usersIcon: string;
355
+ export declare const clipboardIcon: string;
354
356
  export declare const noAgreementIcon: string;
355
357
  export declare const getPaymentMethodsIcon: (source: string) => string;
356
358
  export declare const getCountriesIcon: (source: string) => string;
@@ -352,6 +352,8 @@ export const agreementInstallmentIcon = `${lightUrl}/status/InstallmentAgreement
352
352
  export const agreementSavedCardIcon = `${lightUrl}/status/CardAgreementIcon.svg`;
353
353
  export const agreementSubscriptionIcon = `${lightUrl}/status/SubscriptionAgreementIcon.svg`;
354
354
  export const brandPlaceholderIcon = `${lightUrl}/brandPlaceholder.svg`;
355
+ export const usersIcon = `${lightUrl}/users-icons.svg`;
356
+ export const clipboardIcon = `${lightUrl}/Board-Icons.svg`;
355
357
  export const noAgreementIcon = `${appBaseUrl}/No Agreement.svg`;
356
358
  export const getPaymentMethodsIcon = (source) => `${lightUrl}/payment-method/v2/${source}.svg`;
357
359
  export const getCountriesIcon = (source) => `${lightUrl}/country/${source}.svg`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tap-payments/os-micro-frontend-shared",
3
3
  "description": "Shared components and utilities for Tap Payments micro frontends",
4
- "version": "0.0.90",
4
+ "version": "0.0.92",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
7
7
  "module": "build/index.js",