@tap-payments/os-micro-frontend-shared 0.1.374-test.1 → 0.1.374-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/FilterDropdown/FilterDropdown.d.ts +4 -11
- package/build/components/FilterDropdown/FilterDropdown.js +4 -18
- package/build/components/FilterDropdown/style.js +1 -1
- package/build/components/RangeCalender/RangeCalender.js +2 -4
- package/build/components/Sandbox/style.js +3 -2
- package/build/components/TableHeader/FiltersRow.d.ts +1 -1
- package/build/components/TableHeader/FiltersRow.js +4 -2
- package/build/components/TableHeader/TableHeader.d.ts +1 -1
- package/build/components/TableHeader/TableHeader.js +2 -2
- package/build/components/TableHeader/TableView/CreateViewDialog.d.ts +3 -0
- package/build/components/TableHeader/TableView/CreateViewDialog.js +91 -0
- package/build/components/TableHeader/TableView/CustomViews.js +1 -1
- package/build/components/TableHeader/TableView/TableView.js +0 -1
- package/build/components/TableHeader/TableView/ViewSelector.d.ts +5 -0
- package/build/components/TableHeader/TableView/ViewSelector.js +46 -0
- package/build/components/TableHeader/TableView/ViewsDropdown.d.ts +5 -0
- package/build/components/TableHeader/TableView/ViewsDropdown.js +243 -0
- package/build/components/TableHeader/TableView/components/ColumnList.d.ts +3 -0
- package/build/components/TableHeader/TableView/components/ColumnList.js +70 -0
- package/build/components/TableHeader/TableView/components/ViewsSubmenu.d.ts +3 -0
- package/build/components/TableHeader/TableView/components/ViewsSubmenu.js +52 -0
- package/build/components/TableHeader/TableView/components/index.d.ts +2 -0
- package/build/components/TableHeader/TableView/components/index.js +2 -0
- package/build/components/TableHeader/TableView/constants.d.ts +10 -0
- package/build/components/TableHeader/TableView/constants.js +10 -0
- package/build/components/TableHeader/TableView/data.d.ts +5 -0
- package/build/components/TableHeader/TableView/data.js +48 -0
- package/build/components/TableHeader/TableView/hooks/index.d.ts +6 -0
- package/build/components/TableHeader/TableView/hooks/index.js +6 -0
- package/build/components/TableHeader/TableView/hooks/useCreateViewDialog.d.ts +22 -0
- package/build/components/TableHeader/TableView/hooks/useCreateViewDialog.js +88 -0
- package/build/components/TableHeader/TableView/hooks/useDialogPosition.d.ts +8 -0
- package/build/components/TableHeader/TableView/hooks/useDialogPosition.js +16 -0
- package/build/components/TableHeader/TableView/hooks/useNestedSubmenu.d.ts +7 -0
- package/build/components/TableHeader/TableView/hooks/useNestedSubmenu.js +34 -0
- package/build/components/TableHeader/TableView/hooks/useOriginalColumns.d.ts +6 -0
- package/build/components/TableHeader/TableView/hooks/useOriginalColumns.js +18 -0
- package/build/components/TableHeader/TableView/hooks/useSubmenuHover.d.ts +8 -0
- package/build/components/TableHeader/TableView/hooks/useSubmenuHover.js +43 -0
- package/build/components/TableHeader/TableView/hooks/useViewSelector.d.ts +59 -0
- package/build/components/TableHeader/TableView/hooks/useViewSelector.js +219 -0
- package/build/components/TableHeader/TableView/hooks/useViewsManager.d.ts +12 -0
- package/build/components/TableHeader/TableView/hooks/useViewsManager.js +139 -0
- package/build/components/TableHeader/TableView/index.d.ts +12 -3
- package/build/components/TableHeader/TableView/index.js +13 -3
- package/build/components/TableHeader/TableView/styles.d.ts +127 -0
- package/build/components/TableHeader/TableView/styles.js +426 -0
- package/build/components/TableHeader/TableView/types.d.ts +198 -0
- package/build/components/TableHeader/TableView/utils.d.ts +121 -0
- package/build/components/TableHeader/TableView/utils.js +457 -0
- package/build/components/TableHeader/type.d.ts +22 -1
- package/build/components/Toolbar/Toolbar.js +1 -1
- package/build/components/index.d.ts +0 -1
- package/build/components/index.js +0 -1
- package/build/constants/apps.js +0 -2
- package/build/constants/assets.d.ts +1 -2
- package/build/constants/assets.js +1 -2
- package/build/types/index.d.ts +0 -1
- package/build/types/index.js +0 -1
- package/build/types/reports.d.ts +0 -21
- package/build/utils/date.d.ts +0 -5
- package/build/utils/date.js +0 -37
- package/package.json +3 -2
- package/build/components/MultiDatakeyDonut/MultiDatakeyDonut.d.ts +0 -12
- package/build/components/MultiDatakeyDonut/MultiDatakeyDonut.js +0 -19
- package/build/components/MultiDatakeyDonut/index.d.ts +0 -1
- package/build/components/MultiDatakeyDonut/index.js +0 -1
- package/build/components/MultiDatakeyDonut/style.d.ts +0 -10
- package/build/components/MultiDatakeyDonut/style.js +0 -23
- package/build/types/toggleOptions.d.ts +0 -2
- /package/build/{types/toggleOptions.js → components/TableHeader/TableView/types.js} +0 -0
|
@@ -81,14 +81,12 @@ export const closeIcon = `${lightUrl}/close.svg`;
|
|
|
81
81
|
export const dashedCheckIcon = `${lightUrl}/dashedCheckIcon.svg`;
|
|
82
82
|
export const deactivatedIcon = `${lightUrl}/deactivatedIcon.svg`;
|
|
83
83
|
export const topUpIcon = `${lightUrl}/topup.svg`;
|
|
84
|
-
export const AIOverviewIcon = `${lightUrl}/AIOverviewIcon.svg`;
|
|
85
84
|
export const deMaximizeIcon = `${appBaseUrl}/demaximize.svg`;
|
|
86
85
|
export const pendingFlag = `${lightUrl}/pendingFlag.svg`;
|
|
87
86
|
export const ibanIcon = `${lightUrl}/ibanIcon.svg`;
|
|
88
87
|
export const payoutIcon = `${lightUrl}/payoutIcon.svg`;
|
|
89
88
|
export const releasedFlag = `${lightUrl}/releasedFlag.svg`;
|
|
90
89
|
export const acceptedFlag = `${lightUrl}/acceptedFlag.svg`;
|
|
91
|
-
export const clearIcon = `${lightUrl}/clearIcon.svg`;
|
|
92
90
|
export const unCapturedIcon = `${lightUrl}/status/unCaptured.svg`;
|
|
93
91
|
export const newWindowIcon = `${appBaseUrl}/newWindow.svg`;
|
|
94
92
|
export const viewAllIcon = `${appBaseUrl}/viewAll.svg`;
|
|
@@ -346,6 +344,7 @@ export const TAP3DSPROVIDERIcon = `${lightUrl}/provider/TAP3DS.svg`;
|
|
|
346
344
|
export const greyPlusIcon = `${lightUrl}/greyPlusIcon.svg`;
|
|
347
345
|
export const greyMinusIcon = `${lightUrl}/greyMinusIcon.svg`;
|
|
348
346
|
export const noPreviewIcon = `${lightUrl}/noPreviewIcon.svg`;
|
|
347
|
+
export const editIcon = `${lightUrl}/other/editIcon.svg`;
|
|
349
348
|
export const viewInvoiceIcon = `${appBaseUrl}/viewInvoice.svg`;
|
|
350
349
|
export const checkoutStatusIcon = `${appBaseUrl}/checkoutStatus.svg`;
|
|
351
350
|
export const checkoutStatusBlueIcon = `${appBaseUrl}/checkStatusOutBlue.svg`;
|
package/build/types/index.d.ts
CHANGED
package/build/types/index.js
CHANGED
package/build/types/reports.d.ts
CHANGED
|
@@ -4,24 +4,3 @@ export declare enum ReportStatusEnum {
|
|
|
4
4
|
PROCESSING = "PROCESSING",
|
|
5
5
|
INITIATED = "INITIATED"
|
|
6
6
|
}
|
|
7
|
-
export interface Report {
|
|
8
|
-
id: string;
|
|
9
|
-
object: string;
|
|
10
|
-
live_mode: boolean;
|
|
11
|
-
api_version: string;
|
|
12
|
-
feature_version: string;
|
|
13
|
-
type: string;
|
|
14
|
-
status: string;
|
|
15
|
-
segment_id: string;
|
|
16
|
-
created_at: number;
|
|
17
|
-
started_at: number;
|
|
18
|
-
completed_at: number;
|
|
19
|
-
total_records: number;
|
|
20
|
-
result_file: string;
|
|
21
|
-
download_count: string;
|
|
22
|
-
last_downloaded_at: number;
|
|
23
|
-
response: {
|
|
24
|
-
code: string;
|
|
25
|
-
message: string;
|
|
26
|
-
};
|
|
27
|
-
}
|
package/build/utils/date.d.ts
CHANGED
|
@@ -43,9 +43,4 @@ export declare function isWithinTimeAgo(timestampMs: number, amount: number, uni
|
|
|
43
43
|
export declare const formatRelativeTimeWithinHour: (timestampMs: number) => string;
|
|
44
44
|
export declare const isTodayDate: (date: string | Date) => boolean;
|
|
45
45
|
export declare const isYesterdayDate: (date: string | Date) => boolean;
|
|
46
|
-
export interface InsightDateLabelResult {
|
|
47
|
-
label: string;
|
|
48
|
-
isCustom: boolean;
|
|
49
|
-
}
|
|
50
|
-
export declare const getDateLabel: (from: Date, to: Date) => InsightDateLabelResult;
|
|
51
46
|
export {};
|
package/build/utils/date.js
CHANGED
|
@@ -243,40 +243,3 @@ export const formatRelativeTimeWithinHour = (timestampMs) => {
|
|
|
243
243
|
};
|
|
244
244
|
export const isTodayDate = (date) => dayjs(date).isToday();
|
|
245
245
|
export const isYesterdayDate = (date) => dayjs(date).isYesterday();
|
|
246
|
-
export const getDateLabel = (from, to) => {
|
|
247
|
-
const start = dayjs(from).startOf('day');
|
|
248
|
-
const end = dayjs(to).endOf('day');
|
|
249
|
-
const today = dayjs().startOf('day');
|
|
250
|
-
const currentYear = today.year();
|
|
251
|
-
const diffDays = end.diff(start, 'day') + 1;
|
|
252
|
-
// Today / Yesterday
|
|
253
|
-
if (start.isToday() && end.isToday())
|
|
254
|
-
return { label: 'Today', isCustom: false };
|
|
255
|
-
if (start.isYesterday() && end.isYesterday())
|
|
256
|
-
return { label: 'Yesterday', isCustom: false };
|
|
257
|
-
// Last 7 days
|
|
258
|
-
if (diffDays === 7 && end.isSame(today, 'day'))
|
|
259
|
-
return { label: 'Last 7 days', isCustom: false };
|
|
260
|
-
// Last 30 days (inclusive)
|
|
261
|
-
if (diffDays === 31 && end.isSame(today, 'day'))
|
|
262
|
-
return { label: 'Last 30 days', isCustom: false };
|
|
263
|
-
// Full month
|
|
264
|
-
if (start.date() === 1 && end.date() === end.daysInMonth() && start.month() === end.month()) {
|
|
265
|
-
const monthLabel = start.year() === currentYear ? start.format('MMMM') : start.format('MMMM YYYY');
|
|
266
|
-
return { label: monthLabel, isCustom: false };
|
|
267
|
-
}
|
|
268
|
-
// Same day: show Month + Day
|
|
269
|
-
if (start.isSame(end, 'day')) {
|
|
270
|
-
const label = start.format(start.year() === currentYear ? 'MMM D' : 'MMM D YYYY');
|
|
271
|
-
return { label, isCustom: false };
|
|
272
|
-
}
|
|
273
|
-
// Custom range
|
|
274
|
-
const showStartYear = start.year() !== currentYear;
|
|
275
|
-
const showEndYear = end.year() !== currentYear;
|
|
276
|
-
const startLabel = start.format(`MMM D${showStartYear ? ' YYYY' : ''}`);
|
|
277
|
-
const endLabel = end.format(`MMM D${showEndYear ? ' YYYY' : ''}`);
|
|
278
|
-
return {
|
|
279
|
-
label: `${startLabel} – ${endLabel}`,
|
|
280
|
-
isCustom: true,
|
|
281
|
-
};
|
|
282
|
-
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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.1.374-test.1",
|
|
5
|
-
"testVersion":
|
|
4
|
+
"version": "0.1.374-test.1-test.2",
|
|
5
|
+
"testVersion": 2,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "build/index.js",
|
|
8
8
|
"module": "build/index.js",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"@emotion/styled": "^11.11.0",
|
|
79
79
|
"@hookform/resolvers": "^3.3.1",
|
|
80
80
|
"@mui/material": "^5.12.3",
|
|
81
|
+
"@tap-payments/os-micro-frontend-shared": "file:.yalc/@tap-payments/os-micro-frontend-shared",
|
|
81
82
|
"@uiw/react-json-view": "^2.0.0-alpha.16",
|
|
82
83
|
"axios": "^1.4.0",
|
|
83
84
|
"color": "^5.0.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
interface DonutProps {
|
|
3
|
-
size?: number;
|
|
4
|
-
chartData: Array<{
|
|
5
|
-
name: string;
|
|
6
|
-
value: number;
|
|
7
|
-
color: string;
|
|
8
|
-
}>;
|
|
9
|
-
chartInfo?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
export declare const MultiDatakeyDonut: ({ chartData, size, chartInfo }: DonutProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
|
-
import { ResponsiveContainer, PieChart, Pie, Cell } from 'recharts';
|
|
4
|
-
import { DonutWrapper, CenterOverlay, Empty } from './style';
|
|
5
|
-
export const MultiDatakeyDonut = ({ chartData, size = 170, chartInfo }) => {
|
|
6
|
-
const pieSegments = useMemo(() => {
|
|
7
|
-
const total = chartData.reduce((sum, d) => sum + d.value, 0) || 1;
|
|
8
|
-
let cumulative = 0;
|
|
9
|
-
return chartData.map((d) => {
|
|
10
|
-
const start = (cumulative / total) * 360;
|
|
11
|
-
const end = ((cumulative + d.value) / total) * 360;
|
|
12
|
-
cumulative += d.value;
|
|
13
|
-
return Object.assign(Object.assign({}, d), { startAngle: start, endAngle: end });
|
|
14
|
-
});
|
|
15
|
-
}, [chartData]);
|
|
16
|
-
const isEmpty = chartData.every((d) => d.value === 0);
|
|
17
|
-
return (_jsxs(DonutWrapper, Object.assign({ sx: { width: size, height: size } }, { children: [_jsx(ResponsiveContainer, { children: _jsxs(PieChart, { children: [_jsx(Pie, { data: [{ value: 100 }], dataKey: "value", cx: "50%", cy: "50%", innerRadius: "70%", outerRadius: "100%", fill: "#E5E7EB", stroke: "none", isAnimationActive: false }), !isEmpty &&
|
|
18
|
-
pieSegments.map((segment) => (_jsx(Pie, Object.assign({ data: [segment], dataKey: "value", cx: "50%", cy: "50%", innerRadius: "70%", outerRadius: "100%", startAngle: 90 - segment.startAngle, endAngle: 90 - segment.endAngle, cornerRadius: 0, stroke: "none", isAnimationActive: true, animationDuration: 800, style: { outline: 'none' } }, { children: _jsx(Cell, { fill: segment.color, tabIndex: -1 }, segment.name) }), segment.name)))] }) }), _jsx(CenterOverlay, { children: !chartInfo ? _jsx(Empty, { children: "----" }) : chartInfo })] })));
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MultiDatakeyDonut';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MultiDatakeyDonut';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const DonutWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").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").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
-
export declare const CenterOverlay: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
7
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
|
-
export declare const Empty: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Box } from '@mui/material';
|
|
2
|
-
import { styled } from '@mui/material/styles';
|
|
3
|
-
export const DonutWrapper = styled(Box)(() => ({
|
|
4
|
-
width: '100%',
|
|
5
|
-
maxWidth: 500,
|
|
6
|
-
aspectRatio: '1',
|
|
7
|
-
position: 'relative',
|
|
8
|
-
}));
|
|
9
|
-
export const CenterOverlay = styled(Box)(({ theme }) => ({
|
|
10
|
-
position: 'absolute',
|
|
11
|
-
inset: 0,
|
|
12
|
-
display: 'flex',
|
|
13
|
-
flexDirection: 'column',
|
|
14
|
-
justifyContent: 'center',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
pointerEvents: 'none',
|
|
17
|
-
gap: theme.spacing(1),
|
|
18
|
-
}));
|
|
19
|
-
export const Empty = styled(Box)(({ theme }) => ({
|
|
20
|
-
fontSize: 17,
|
|
21
|
-
fontWeight: 700,
|
|
22
|
-
color: '#CFD0D2',
|
|
23
|
-
}));
|
|
File without changes
|