@tap-payments/os-micro-frontend-shared 0.0.89 → 0.0.90
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/StatusBar/StatusBar.d.ts +12 -0
- package/build/components/StatusBar/StatusBar.js +32 -0
- package/build/components/StatusBar/index.d.ts +2 -0
- package/build/components/StatusBar/index.js +2 -0
- package/build/components/TableCells/CustomCells/ActionCell/constant.d.ts +0 -3
- package/build/components/TableCells/CustomCells/ActionCell/constant.js +1 -4
- package/build/components/TableCells/CustomCells/ActionCell/hooks/useActionCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -1
- package/build/components/VirtualTable/SheetView/SheetViewVirtualTable.js +1 -3
- package/build/components/VirtualTable/SheetView/style.js +0 -1
- package/build/components/VirtualTable/components/virtualScroll/ListItemWrapper.js +7 -2
- package/build/components/VirtualTable/style.d.ts +0 -1
- package/build/components/VirtualTable/style.js +2 -20
- package/build/components/index.d.ts +1 -1
- package/build/components/index.js +1 -1
- package/build/constants/assets.d.ts +0 -2
- package/build/constants/assets.js +0 -2
- package/package.json +4 -1
- package/build/components/RangeCalender/RangeCalender.d.ts +0 -20
- package/build/components/RangeCalender/RangeCalender.js +0 -92
- package/build/components/RangeCalender/components/CustomTimepicker/CustomTimepicker.d.ts +0 -11
- package/build/components/RangeCalender/components/CustomTimepicker/CustomTimepicker.js +0 -33
- package/build/components/RangeCalender/components/CustomTimepicker/index.d.ts +0 -2
- package/build/components/RangeCalender/components/CustomTimepicker/index.js +0 -2
- package/build/components/RangeCalender/components/CustomTimepicker/style.d.ts +0 -15
- package/build/components/RangeCalender/components/CustomTimepicker/style.js +0 -132
- package/build/components/RangeCalender/components/GroupBy/GroupBy.d.ts +0 -10
- package/build/components/RangeCalender/components/GroupBy/GroupBy.js +0 -33
- package/build/components/RangeCalender/components/GroupBy/index.d.ts +0 -2
- package/build/components/RangeCalender/components/GroupBy/index.js +0 -2
- package/build/components/RangeCalender/components/GroupBy/style.d.ts +0 -15
- package/build/components/RangeCalender/components/GroupBy/style.js +0 -39
- package/build/components/RangeCalender/components/Hijri/Hijri.d.ts +0 -7
- package/build/components/RangeCalender/components/Hijri/Hijri.js +0 -13
- package/build/components/RangeCalender/components/Hijri/index.d.ts +0 -2
- package/build/components/RangeCalender/components/Hijri/index.js +0 -2
- package/build/components/RangeCalender/components/Hijri/style.d.ts +0 -4
- package/build/components/RangeCalender/components/Hijri/style.js +0 -25
- package/build/components/RangeCalender/components/QuickFilters/QuickFilters.d.ts +0 -8
- package/build/components/RangeCalender/components/QuickFilters/QuickFilters.js +0 -47
- package/build/components/RangeCalender/components/QuickFilters/index.d.ts +0 -2
- package/build/components/RangeCalender/components/QuickFilters/index.js +0 -2
- package/build/components/RangeCalender/components/QuickFilters/style.d.ts +0 -7
- package/build/components/RangeCalender/components/QuickFilters/style.js +0 -27
- package/build/components/RangeCalender/components/RangeDatepicker/RangeDatepicker.d.ts +0 -12
- package/build/components/RangeCalender/components/RangeDatepicker/RangeDatepicker.js +0 -29
- package/build/components/RangeCalender/components/RangeDatepicker/index.d.ts +0 -2
- package/build/components/RangeCalender/components/RangeDatepicker/index.js +0 -2
- package/build/components/RangeCalender/components/RangeDatepicker/style.d.ts +0 -4
- package/build/components/RangeCalender/components/RangeDatepicker/style.js +0 -9
- package/build/components/RangeCalender/components/Timezone/Timezone.d.ts +0 -11
- package/build/components/RangeCalender/components/Timezone/Timezone.js +0 -32
- package/build/components/RangeCalender/components/Timezone/components/EntitiesTimezone.d.ts +0 -12
- package/build/components/RangeCalender/components/Timezone/components/EntitiesTimezone.js +0 -37
- package/build/components/RangeCalender/components/Timezone/components/UserTimezone.d.ts +0 -8
- package/build/components/RangeCalender/components/Timezone/components/UserTimezone.js +0 -14
- package/build/components/RangeCalender/components/Timezone/index.d.ts +0 -2
- package/build/components/RangeCalender/components/Timezone/index.js +0 -2
- package/build/components/RangeCalender/components/Timezone/style.d.ts +0 -21
- package/build/components/RangeCalender/components/Timezone/style.js +0 -61
- package/build/components/RangeCalender/index.d.ts +0 -2
- package/build/components/RangeCalender/index.js +0 -2
- package/build/components/RangeCalender/style.d.ts +0 -33
- package/build/components/RangeCalender/style.js +0 -189
- package/build/components/RangeCalender/type.d.ts +0 -2
- package/build/components/RangeCalender/type.js +0 -1
- package/build/components/RangeCalender/utils.d.ts +0 -6
- package/build/components/RangeCalender/utils.js +0 -15
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AvailableStatus } from '../TableHeader_V2';
|
|
3
|
+
import { TableHeaderStatus } from '../../types/index.js';
|
|
4
|
+
interface StatusBarProps {
|
|
5
|
+
status?: TableHeaderStatus;
|
|
6
|
+
availableStatuses?: AvailableStatus[];
|
|
7
|
+
isFilteredIdsShown?: boolean;
|
|
8
|
+
onStatusChange?: (status: TableHeaderStatus) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function StatusBar({ isFilteredIdsShown, onStatusChange, availableStatuses, status }: StatusBarProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const _default: import("react").MemoExoticComponent<typeof StatusBar>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as _createElement } from "react";
|
|
3
|
+
import { memo, useCallback } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { StatusButton } from '../TableHeader_V2';
|
|
6
|
+
function StatusBar({ isFilteredIdsShown, onStatusChange, availableStatuses, status }) {
|
|
7
|
+
const { t } = useTranslation();
|
|
8
|
+
const getButtonStatus = useCallback((buttonStatus) => (buttonStatus === status && !isFilteredIdsShown ? 'active' : 'inActive'), [status, isFilteredIdsShown]);
|
|
9
|
+
return (_jsx(_Fragment, { children: availableStatuses === null || availableStatuses === void 0 ? void 0 : availableStatuses.map((s) => {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
if (!Array.isArray(s.status)) {
|
|
12
|
+
return (_createElement(StatusButton, Object.assign({}, s, { key: `status-button-array-${s.status}`, variant: getButtonStatus(s.status), onClick: () => {
|
|
13
|
+
if (!Array.isArray(s.status)) {
|
|
14
|
+
onStatusChange === null || onStatusChange === void 0 ? void 0 : onStatusChange(s.status);
|
|
15
|
+
}
|
|
16
|
+
} })));
|
|
17
|
+
}
|
|
18
|
+
const isCurrentStatusDropdown = (_a = s.status) === null || _a === void 0 ? void 0 : _a.includes(status || '');
|
|
19
|
+
const variant = isCurrentStatusDropdown ? 'active' : 'inActive';
|
|
20
|
+
const statusLabel = isCurrentStatusDropdown ? status : s.status[0];
|
|
21
|
+
return (_jsx("div", { children: _jsx(StatusButton, Object.assign({}, s, { label: t(statusLabel || ''), variant: variant, onButtonBodyClick: (buttonStatus) => {
|
|
22
|
+
onStatusChange === null || onStatusChange === void 0 ? void 0 : onStatusChange(buttonStatus);
|
|
23
|
+
}, dropdownOptions: s.status.map((stat) => ({
|
|
24
|
+
label: t(stat || ''),
|
|
25
|
+
onClick: () => {
|
|
26
|
+
onStatusChange === null || onStatusChange === void 0 ? void 0 : onStatusChange(stat);
|
|
27
|
+
},
|
|
28
|
+
status: stat,
|
|
29
|
+
})) })) }, (_b = s === null || s === void 0 ? void 0 : s.status) === null || _b === void 0 ? void 0 : _b[0]));
|
|
30
|
+
}) }));
|
|
31
|
+
}
|
|
32
|
+
export default memo(StatusBar);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BadgeVariants } from '../../../CountBadge';
|
|
2
|
-
import { flagIcon, clockIcon, disputeIcon, redFlagIcon, cancelledIcon, closedFlagIcon, orangeFlagIcon, refundInitiatedIcon, viewInvoiceIcon, reverseActionIcon, voidedIcon, capturedDropdownIcon, destinationReversedTableIcon,
|
|
2
|
+
import { flagIcon, clockIcon, disputeIcon, redFlagIcon, cancelledIcon, closedFlagIcon, orangeFlagIcon, refundInitiatedIcon, viewInvoiceIcon, reverseActionIcon, voidedIcon, capturedDropdownIcon, destinationReversedTableIcon, } from '../../../../constants/index.js';
|
|
3
3
|
export const flags = {
|
|
4
4
|
GRAY: { icon: closedFlagIcon, color: '#CFCFCF' },
|
|
5
5
|
ORANGE: { icon: orangeFlagIcon, color: '#FFD503' },
|
|
@@ -21,7 +21,4 @@ export const actionIcons = {
|
|
|
21
21
|
reverse: reverseActionIcon,
|
|
22
22
|
destination: destinationReversedTableIcon,
|
|
23
23
|
invoice: viewInvoiceIcon,
|
|
24
|
-
users: usersIcon,
|
|
25
|
-
brand: brandPlaceholderIcon,
|
|
26
|
-
clipboard: clipboardIcon,
|
|
27
24
|
};
|
|
@@ -12,7 +12,7 @@ export declare function useActionCell({ actions, isDropdownShown, onCloseDropdow
|
|
|
12
12
|
label: string;
|
|
13
13
|
onClick: (e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void;
|
|
14
14
|
onRightClick?: ((e: React.MouseEvent<HTMLLIElement, MouseEvent>) => void) | undefined;
|
|
15
|
-
icon: "
|
|
15
|
+
icon: "reverse" | "refund" | "destination" | "cancel" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice";
|
|
16
16
|
isLoading?: boolean | undefined;
|
|
17
17
|
isError?: boolean | undefined;
|
|
18
18
|
isSuccess?: boolean | undefined;
|
|
@@ -280,5 +280,5 @@ export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
|
|
|
280
280
|
sizes?: string | undefined;
|
|
281
281
|
srcSet?: string | undefined;
|
|
282
282
|
} & import("framer-motion").MotionProps & import("react").RefAttributes<HTMLImageElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
283
|
-
icon?: "
|
|
283
|
+
icon?: "reverse" | "refund" | "destination" | "cancel" | "capture" | "flag" | "dispute" | "void" | "clock" | "invoice" | undefined;
|
|
284
284
|
}, {}, {}>;
|
|
@@ -79,8 +79,6 @@ 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,
|
|
84
82
|
} }, { children: ListItemWrapper }))) })) })));
|
|
85
83
|
}, [
|
|
86
84
|
itemsCount,
|
|
@@ -114,7 +112,7 @@ function SheetViewVirtualTable({ columns, rows, threshold = TABLE_THRESHOLD, sho
|
|
|
114
112
|
minWidth: 'fit-content',
|
|
115
113
|
} }, { children: _jsx(StyledBox, Object.assign({ "data-testid": "SheetViewVirtualTable_PinnedStyledBox", hidePadding: true, className: "list-wrapper" }, { children: createVirtualTableContainer(columnsData, containerKey, true, columnsWidth) })) }))] })) })));
|
|
116
114
|
};
|
|
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
|
|
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: {
|
|
118
116
|
width: '100%',
|
|
119
117
|
minWidth: 'fit-content',
|
|
120
118
|
} }, { 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,7 +86,6 @@ export const MainTableWrapper = styled('div', {
|
|
|
86
86
|
marginLeft: hasPinnedStart ? '0' : '32px',
|
|
87
87
|
marginRight: hasPinnedEnd ? '0' : '32px',
|
|
88
88
|
position: 'relative',
|
|
89
|
-
scrollbarWidth: 'auto',
|
|
90
89
|
}));
|
|
91
90
|
export const UnpinnedTableHeaderWrapper = styled('div')({
|
|
92
91
|
flexShrink: 0,
|
|
@@ -56,10 +56,15 @@ 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
|
|
59
|
+
return _jsx(Box, { sx: { height: isSheetView ? SHEET_VIEW_TABLE_ROW_HEIGHT : TABLE_ROW_HEIGHT, backgroundColor: '#F6F8FACC' } });
|
|
60
60
|
}
|
|
61
61
|
if (isLastRow) {
|
|
62
|
-
return (_jsx(Box, Object.assign({ sx:
|
|
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: {
|
|
63
68
|
backgroundColor: '#F6F8FACC',
|
|
64
69
|
display: 'flex',
|
|
65
70
|
justifyContent: 'center',
|
|
@@ -41,7 +41,6 @@ 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;
|
|
45
44
|
}, {}, {}>;
|
|
46
45
|
export declare const ActionIcon: import("@emotion/styled").StyledComponent<{
|
|
47
46
|
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',
|
|
86
|
+
})(({ theme, showBackgroundColor, showNoDataView }) => ({
|
|
87
87
|
position: 'relative',
|
|
88
88
|
backgroundColor: showBackgroundColor ? theme.palette.background.default : 'transparent',
|
|
89
89
|
height: '100%',
|
|
@@ -91,24 +91,6 @@ 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
|
-
},
|
|
112
94
|
}));
|
|
113
95
|
export const ActionIcon = styled(motion.img)(() => ({
|
|
114
96
|
width: '24px',
|
|
@@ -85,6 +85,6 @@ export { default as OTPInput } from './OTPInput';
|
|
|
85
85
|
export { default as FlagDetails } from './FlagDetails';
|
|
86
86
|
export { default as TapLoader } from './Loaders';
|
|
87
87
|
export { default as Error } from './Error';
|
|
88
|
+
export { default as StatusBar } from './StatusBar';
|
|
88
89
|
export * from './Chip';
|
|
89
90
|
export * from './TableHeader_V2';
|
|
90
|
-
export { default as RangeCalender } from './RangeCalender';
|
|
@@ -85,6 +85,6 @@ export { default as OTPInput } from './OTPInput';
|
|
|
85
85
|
export { default as FlagDetails } from './FlagDetails';
|
|
86
86
|
export { default as TapLoader } from './Loaders';
|
|
87
87
|
export { default as Error } from './Error';
|
|
88
|
+
export { default as StatusBar } from './StatusBar';
|
|
88
89
|
export * from './Chip';
|
|
89
90
|
export * from './TableHeader_V2';
|
|
90
|
-
export { default as RangeCalender } from './RangeCalender';
|
|
@@ -351,8 +351,6 @@ 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;
|
|
356
354
|
export declare const noAgreementIcon: string;
|
|
357
355
|
export declare const getPaymentMethodsIcon: (source: string) => string;
|
|
358
356
|
export declare const getCountriesIcon: (source: string) => string;
|
|
@@ -352,8 +352,6 @@ 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`;
|
|
357
355
|
export const noAgreementIcon = `${appBaseUrl}/No Agreement.svg`;
|
|
358
356
|
export const getPaymentMethodsIcon = (source) => `${lightUrl}/payment-method/v2/${source}.svg`;
|
|
359
357
|
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.
|
|
4
|
+
"version": "0.0.90",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"module": "build/index.js",
|
|
@@ -125,5 +125,8 @@
|
|
|
125
125
|
"yarn run prettier:fix",
|
|
126
126
|
"yarn run lint"
|
|
127
127
|
]
|
|
128
|
+
},
|
|
129
|
+
"publishConfig": {
|
|
130
|
+
"registry": "https://registry.npmjs.org/"
|
|
128
131
|
}
|
|
129
132
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { CalenderMode, Timezone } from '../../types/index.js';
|
|
2
|
-
interface RangeCalendarProps {
|
|
3
|
-
defaultDate: [Date, Date];
|
|
4
|
-
onDateChange: (date: [Date, Date], timezoneOffset?: number) => void;
|
|
5
|
-
mode?: CalenderMode;
|
|
6
|
-
onCalendarModeSwitch?: (mode: CalenderMode) => void;
|
|
7
|
-
numberOfMonths?: number;
|
|
8
|
-
noTimezone?: boolean;
|
|
9
|
-
noQuickFilter?: boolean;
|
|
10
|
-
maxDateRange?: number;
|
|
11
|
-
onCalendarGroupChange?: (value: string) => void;
|
|
12
|
-
groupBy?: string;
|
|
13
|
-
timezone: Timezone;
|
|
14
|
-
onChangeTimezoneHistory?: (timezone: Timezone) => void;
|
|
15
|
-
onChangeTimezone?: (timezone: Timezone) => void;
|
|
16
|
-
defaultTimezone: Timezone;
|
|
17
|
-
browserTimezone: string;
|
|
18
|
-
}
|
|
19
|
-
declare function RangeCalender({ defaultDate, onDateChange, mode, onCalendarModeSwitch, numberOfMonths, noTimezone, noQuickFilter, maxDateRange, onCalendarGroupChange, groupBy, timezone, onChangeTimezoneHistory, onChangeTimezone, defaultTimezone, browserTimezone, }: RangeCalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export default RangeCalender;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useRef, useState } from 'react';
|
|
3
|
-
import Box from '@mui/material/Box';
|
|
4
|
-
import Collapse from '@mui/material/Collapse';
|
|
5
|
-
import Popper from '@mui/material/Popper';
|
|
6
|
-
import dayjs from 'dayjs';
|
|
7
|
-
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import { DateObject } from 'react-multi-date-picker';
|
|
9
|
-
import { CustomBackdrop, Error } from '../index.js';
|
|
10
|
-
import GroupBy from './components/GroupBy';
|
|
11
|
-
import Hijri from './components/Hijri';
|
|
12
|
-
import QuickFilters from './components/QuickFilters';
|
|
13
|
-
import RangeDatePicker from './components/RangeDatepicker';
|
|
14
|
-
import CustomTimezone from './components/Timezone';
|
|
15
|
-
import { ButtonsWrapper, CalenderWrapper, CancelButton, FiltersArea, Footer, Main, OkayButton, SelectedDate, TimeZone, Settings } from './style';
|
|
16
|
-
function RangeCalender({ defaultDate, onDateChange, mode = 'gregorian', onCalendarModeSwitch, numberOfMonths, noTimezone, noQuickFilter, maxDateRange, onCalendarGroupChange, groupBy, timezone, onChangeTimezoneHistory, onChangeTimezone, defaultTimezone, browserTimezone, }) {
|
|
17
|
-
const [dates, setDates] = useState([new DateObject(defaultDate[0]), new DateObject(defaultDate[1])]);
|
|
18
|
-
const [values, setValues] = useState(dates);
|
|
19
|
-
const [selectedTimezone, setSelectedTimezone] = useState(timezone);
|
|
20
|
-
const [selectedGroupBy, setSelectedGroupBy] = useState(groupBy || 'day');
|
|
21
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
22
|
-
const open = Boolean(anchorEl);
|
|
23
|
-
const [isError, setIsError] = useState(false);
|
|
24
|
-
const { t } = useTranslation();
|
|
25
|
-
const calendarRef = useRef();
|
|
26
|
-
const isHijri = mode === 'hijri';
|
|
27
|
-
const onCloseCalender = () => {
|
|
28
|
-
setAnchorEl(null);
|
|
29
|
-
};
|
|
30
|
-
const onOpenCalender = (event) => {
|
|
31
|
-
setAnchorEl(event.currentTarget);
|
|
32
|
-
};
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (!open) {
|
|
35
|
-
if (numberOfMonths === 1)
|
|
36
|
-
return;
|
|
37
|
-
setValues([new DateObject(defaultDate[0]), new DateObject(defaultDate[1])]);
|
|
38
|
-
}
|
|
39
|
-
}, [open]);
|
|
40
|
-
useEffect(() => {
|
|
41
|
-
setSelectedTimezone(timezone);
|
|
42
|
-
}, [timezone, open]);
|
|
43
|
-
const updateTimezone = (newTimezone) => {
|
|
44
|
-
onChangeTimezone === null || onChangeTimezone === void 0 ? void 0 : onChangeTimezone(newTimezone);
|
|
45
|
-
onChangeTimezoneHistory === null || onChangeTimezoneHistory === void 0 ? void 0 : onChangeTimezoneHistory(newTimezone);
|
|
46
|
-
};
|
|
47
|
-
const formatDate = (date) => new Date(date.setHour(new Date().getHours()).setMinute(new Date().getMinutes()).setSecond(new Date().getSeconds()).toDate().toLocaleString('en-us', {
|
|
48
|
-
timeZone: selectedTimezone === null || selectedTimezone === void 0 ? void 0 : selectedTimezone.timezone,
|
|
49
|
-
}));
|
|
50
|
-
const submitDate = () => {
|
|
51
|
-
setDates(values);
|
|
52
|
-
onCloseCalender();
|
|
53
|
-
onDateChange([formatDate(values[0]), formatDate(values[1] || values[0])], timezone === null || timezone === void 0 ? void 0 : timezone.offset);
|
|
54
|
-
onCalendarGroupChange === null || onCalendarGroupChange === void 0 ? void 0 : onCalendarGroupChange(selectedGroupBy || 'day');
|
|
55
|
-
updateTimezone(selectedTimezone);
|
|
56
|
-
};
|
|
57
|
-
const getSelectedDate = () => {
|
|
58
|
-
const startSelectedTime = dates[0].format('MMM D');
|
|
59
|
-
const endSelectedTime = dates[1] ? dates[1].format('MMM D') : dates[0].format('MMM D');
|
|
60
|
-
return startSelectedTime === endSelectedTime && !noTimezone ? startSelectedTime : `${startSelectedTime} - ${endSelectedTime}`;
|
|
61
|
-
};
|
|
62
|
-
const onChange = (newDate) => {
|
|
63
|
-
if (newDate.length < 2 || !maxDateRange) {
|
|
64
|
-
setValues(newDate);
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
const startDate = newDate[0].toDate();
|
|
68
|
-
const endDate = newDate[1].toDate();
|
|
69
|
-
const numberOfDays = dayjs(endDate).diff(startDate, 'day');
|
|
70
|
-
if (numberOfDays <= maxDateRange) {
|
|
71
|
-
setValues(newDate);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
setIsError(true);
|
|
75
|
-
setValues([newDate[0], newDate[1].subtract(numberOfDays - maxDateRange, 'd')]);
|
|
76
|
-
setTimeout(() => {
|
|
77
|
-
setIsError(false);
|
|
78
|
-
}, 3000);
|
|
79
|
-
};
|
|
80
|
-
const onChangeQuickFilter = (newValues) => {
|
|
81
|
-
setValues(newValues);
|
|
82
|
-
if (calendarRef.current)
|
|
83
|
-
calendarRef.current.set({ date: newValues[0] });
|
|
84
|
-
};
|
|
85
|
-
return (_jsxs(Main, Object.assign({ "data-testid": "RangeCalender" }, { children: [_jsx(SelectedDate, Object.assign({ onClick: onOpenCalender, open: open }, { children: (dates[0] || dates[1]) && getSelectedDate() })), open && (_jsx(CustomBackdrop, { onClick: (e) => {
|
|
86
|
-
e.stopPropagation();
|
|
87
|
-
onCloseCalender();
|
|
88
|
-
} })), _jsx(Popper, Object.assign({ open: open, anchorEl: anchorEl, placement: "bottom-end", sx: { zIndex: 3 } }, { children: _jsxs(CalenderWrapper, { children: [!noQuickFilter && (_jsxs(FiltersArea, { children: [_jsx(QuickFilters, { onChange: onChangeQuickFilter, isHijri: isHijri }), _jsxs(Settings, { children: [groupBy && (_jsx(GroupBy, { groupBy: selectedGroupBy, isCalenderOpen: open, onUpdate: (group) => {
|
|
89
|
-
setSelectedGroupBy(group);
|
|
90
|
-
} })), _jsx(Hijri, { isHijri: isHijri, onCalendarModeSwitch: onCalendarModeSwitch })] })] })), _jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: 'column', justifyContent: 'space-between' } }, { children: [_jsx(RangeDatePicker, { values: values, onChange: onChange, isHijri: isHijri, ref: calendarRef, numberOfMonths: numberOfMonths }), _jsx(Collapse, Object.assign({ in: isError && Boolean(maxDateRange) }, { children: _jsx(Error, { error: t('dateRangeError', { number: maxDateRange }), sx: { marginInline: '16px', marginBottom: '16px' } }) })), _jsxs(Footer, Object.assign({ sx: { borderBottomLeftRadius: '8px' } }, { children: [!noTimezone ? (_jsx(TimeZone, { children: _jsx(CustomTimezone, { onChange: setSelectedTimezone, selectedTimezone: selectedTimezone, defaultTimezone: defaultTimezone, browserTimezone: browserTimezone }, String(open)) })) : (_jsx("div", {})), _jsxs(ButtonsWrapper, { children: [_jsx(CancelButton, Object.assign({ variant: "contained", onClick: onCloseCalender }, { children: t('cancel') })), _jsx(OkayButton, Object.assign({ variant: "contained", onClick: submitDate }, { children: t('okay') }))] })] }))] }))] }) }))] })));
|
|
91
|
-
}
|
|
92
|
-
export default RangeCalender;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DateObject } from 'react-multi-date-picker';
|
|
2
|
-
import { Dates } from '../../type';
|
|
3
|
-
interface CustomTimePickerProps {
|
|
4
|
-
values: Dates;
|
|
5
|
-
startTime: DateObject;
|
|
6
|
-
endTime: DateObject;
|
|
7
|
-
onChangeStartTime: (value: DateObject) => void;
|
|
8
|
-
onChangeEndTime: (value: DateObject) => void;
|
|
9
|
-
}
|
|
10
|
-
declare function CustomTimePicker({ values, onChangeStartTime, onChangeEndTime, startTime, endTime }: CustomTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default CustomTimePicker;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import DatePicker, { DateObject } from 'react-multi-date-picker';
|
|
5
|
-
import TimePicker from 'react-multi-date-picker/plugins/time_picker';
|
|
6
|
-
import { IOSSwitch } from '../../../index.js';
|
|
7
|
-
import { AllDayStyled, TimeArea, TimePickerWrapper, TimeAreaInner } from './style';
|
|
8
|
-
function CustomTimePicker({ values, onChangeStartTime, onChangeEndTime, startTime, endTime }) {
|
|
9
|
-
const [isAllDay, setIsAllDay] = useState(false);
|
|
10
|
-
const [lastTime, setLastTime] = useState([startTime, endTime]);
|
|
11
|
-
const { t } = useTranslation();
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
if (isAllDay)
|
|
14
|
-
setIsAllDay(new DateObject(values[0]).dayOfYear === new DateObject(values[1]).dayOfYear);
|
|
15
|
-
}, [values]);
|
|
16
|
-
return (_jsx(_Fragment, { children: new DateObject(values[0]).dayOfYear === new DateObject(values[1]).dayOfYear && (_jsx(TimeArea, { children: _jsxs(TimeAreaInner, { children: [_jsxs(AllDayStyled, Object.assign({ isAllDay: isAllDay }, { children: [_jsx("span", Object.assign({ className: "label" }, { children: t('allDay') })), _jsx(IOSSwitch, { checked: isAllDay, onChange: (e) => {
|
|
17
|
-
setIsAllDay(!isAllDay);
|
|
18
|
-
if (e.target.checked) {
|
|
19
|
-
setLastTime([startTime, endTime]);
|
|
20
|
-
onChangeStartTime(new DateObject().setHour(0).setMinute(0));
|
|
21
|
-
onChangeEndTime(new DateObject().setHour(23).setMinute(59));
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
onChangeStartTime(lastTime[0]);
|
|
25
|
-
onChangeEndTime(lastTime[1]);
|
|
26
|
-
}
|
|
27
|
-
} })] })), !isAllDay && (_jsxs(TimePickerWrapper, { children: [_jsx(DatePicker, { arrow: false, disableDayPicker: true, hideOnScroll: true, format: "hh:mma", value: startTime, onChange: (time) => {
|
|
28
|
-
onChangeStartTime(time);
|
|
29
|
-
}, type: "button", plugins: [_jsx(TimePicker, { position: "top", hideSeconds: true })] }), _jsx(DatePicker, { arrow: false, disableDayPicker: true, hideOnScroll: true, format: "hh:mma", value: endTime, onChange: (time) => {
|
|
30
|
-
onChangeEndTime(time);
|
|
31
|
-
}, type: "button", plugins: [_jsx(TimePicker, { position: "top", hideSeconds: true })] })] }))] }) })) }));
|
|
32
|
-
}
|
|
33
|
-
export default CustomTimePicker;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const AllDayStyled: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
5
|
-
isAllDay: boolean;
|
|
6
|
-
}, {}, {}>;
|
|
7
|
-
export declare const TimeArea: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
10
|
-
export declare const TimePickerWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
12
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
13
|
-
export declare const TimeAreaInner: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
15
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import Box from '@mui/material/Box';
|
|
2
|
-
import { styled } from '@mui/material/styles';
|
|
3
|
-
import { grayUpArrowIcon } from '../../../../constants/index.js';
|
|
4
|
-
export const AllDayStyled = styled(Box, { shouldForwardProp: (props) => props !== 'isAllDay' })(({ theme, isAllDay }) => (Object.assign({ display: 'flex', alignItems: 'center', gap: theme.spacing(1), position: 'relative', paddingInline: '5px', '.label': {
|
|
5
|
-
width: 'max-content',
|
|
6
|
-
} }, (!isAllDay && {
|
|
7
|
-
paddingRight: theme.spacing(1),
|
|
8
|
-
'&:after': {
|
|
9
|
-
content: '""',
|
|
10
|
-
position: 'absolute',
|
|
11
|
-
width: '1px',
|
|
12
|
-
background: theme.palette.divider,
|
|
13
|
-
right: 0,
|
|
14
|
-
height: 17,
|
|
15
|
-
},
|
|
16
|
-
}))));
|
|
17
|
-
export const TimeArea = styled(Box)(() => ({
|
|
18
|
-
width: 235,
|
|
19
|
-
}));
|
|
20
|
-
export const TimePickerWrapper = styled(Box)(({ theme }) => ({
|
|
21
|
-
display: 'flex',
|
|
22
|
-
gap: '4px',
|
|
23
|
-
'.rmdp-input': {
|
|
24
|
-
width: '64px',
|
|
25
|
-
borderRadius: '19px',
|
|
26
|
-
border: '1px solid',
|
|
27
|
-
borderColor: theme.palette.divider,
|
|
28
|
-
color: theme.palette.text.primary,
|
|
29
|
-
fontSize: '11px',
|
|
30
|
-
fontWeight: 500,
|
|
31
|
-
background: 'transparent',
|
|
32
|
-
cursor: 'pointer',
|
|
33
|
-
},
|
|
34
|
-
'.rmdp-input:focus': {
|
|
35
|
-
boxShadow: theme.shadows[7],
|
|
36
|
-
border: `1px solid ${theme.palette.info.dark}`,
|
|
37
|
-
borderRadius: '19px',
|
|
38
|
-
},
|
|
39
|
-
'.rmdp-time-picker': {
|
|
40
|
-
boxShadow: theme.shadows[5],
|
|
41
|
-
borderRadius: theme.spacing(1),
|
|
42
|
-
padding: theme.spacing(2),
|
|
43
|
-
minWidth: 'auto !important',
|
|
44
|
-
div: {
|
|
45
|
-
marginTop: 0,
|
|
46
|
-
display: 'block',
|
|
47
|
-
},
|
|
48
|
-
'> div': {
|
|
49
|
-
width: 32,
|
|
50
|
-
height: 64,
|
|
51
|
-
},
|
|
52
|
-
'.rmdp-arrow': {
|
|
53
|
-
borderColor: `${theme.palette.background.transparent[1]} !important`,
|
|
54
|
-
},
|
|
55
|
-
'.rmdp-arrow-container': {
|
|
56
|
-
justifyContent: 'center',
|
|
57
|
-
'&:hover': {
|
|
58
|
-
backgroundColor: 'transparent',
|
|
59
|
-
boxShadow: 'unset',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
input: {
|
|
63
|
-
borderRadius: '4px',
|
|
64
|
-
border: `1px solid ${theme.palette.divider}`,
|
|
65
|
-
padding: 0,
|
|
66
|
-
width: 32,
|
|
67
|
-
height: 32,
|
|
68
|
-
fontSize: '11px',
|
|
69
|
-
color: theme.palette.text.primary,
|
|
70
|
-
fontWeight: 500,
|
|
71
|
-
'&:focus, &:focus-visible': {
|
|
72
|
-
border: `1px solid ${theme.palette.info.dark}`,
|
|
73
|
-
outline: 'unset',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
'.dvdr': {
|
|
77
|
-
margin: '7px 4px 0',
|
|
78
|
-
},
|
|
79
|
-
'.rmdp-am, .rmdp-pm': {
|
|
80
|
-
margin: 0,
|
|
81
|
-
width: 32,
|
|
82
|
-
height: 32,
|
|
83
|
-
flex: 'auto',
|
|
84
|
-
justifyContent: 'center',
|
|
85
|
-
fontSize: '11px',
|
|
86
|
-
color: theme.palette.text.primary,
|
|
87
|
-
fontWeight: 500,
|
|
88
|
-
display: 'flex',
|
|
89
|
-
cursor: 'default',
|
|
90
|
-
},
|
|
91
|
-
'> div:last-child': {
|
|
92
|
-
marginInlineStart: '4px',
|
|
93
|
-
display: 'block !important',
|
|
94
|
-
},
|
|
95
|
-
'.rmdp-down, .rmdp-up': {
|
|
96
|
-
position: 'relative',
|
|
97
|
-
i: {
|
|
98
|
-
display: 'none',
|
|
99
|
-
},
|
|
100
|
-
'&:before': {
|
|
101
|
-
content: '""',
|
|
102
|
-
position: 'absolute',
|
|
103
|
-
top: '5px',
|
|
104
|
-
width: '10px',
|
|
105
|
-
height: '10px',
|
|
106
|
-
backgroundImage: `url(${grayUpArrowIcon})`,
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
'.rmdp-down:before': {
|
|
110
|
-
transform: 'rotate(180deg)',
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
'.rmdp-container': {
|
|
114
|
-
position: 'relative',
|
|
115
|
-
'> div': {
|
|
116
|
-
top: 'unset !important',
|
|
117
|
-
bottom: '28px',
|
|
118
|
-
transform: 'unset !important',
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
}));
|
|
122
|
-
export const TimeAreaInner = styled(Box)(({ theme }) => ({
|
|
123
|
-
display: 'flex',
|
|
124
|
-
gap: '8px',
|
|
125
|
-
alignItems: 'center',
|
|
126
|
-
borderRadius: '50px',
|
|
127
|
-
border: '1px solid',
|
|
128
|
-
borderColor: theme.palette.divider,
|
|
129
|
-
paddingInline: '5px',
|
|
130
|
-
width: 'fit-content',
|
|
131
|
-
height: 32,
|
|
132
|
-
}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BoxProps } from '@mui/material/Box';
|
|
3
|
-
interface GroupByProps extends BoxProps {
|
|
4
|
-
groupBy: string;
|
|
5
|
-
isCalenderOpen: boolean;
|
|
6
|
-
onUpdate?: (value: string) => void;
|
|
7
|
-
}
|
|
8
|
-
declare function GroupBy({ sx, groupBy, isCalenderOpen, onUpdate }: GroupByProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare const _default: import("react").MemoExoticComponent<typeof GroupBy>;
|
|
10
|
-
export default _default;
|