@tap-payments/os-micro-frontend-shared 0.0.53 → 0.0.55
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/Chip/style.d.ts +1 -0
- package/build/components/CountBadge/style.d.ts +1 -0
- package/build/components/Dialog/style.d.ts +1 -0
- package/build/components/FlippingCard/style.d.ts +1 -0
- package/build/components/ImageWrapper/ImageWrapper.d.ts +1 -0
- package/build/components/JSONViewer/style.d.ts +1 -0
- package/build/components/SearchButton/styles.d.ts +1 -0
- package/build/components/StatusIcons/AuthIcons/style.d.ts +1 -0
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +1 -0
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +1 -0
- package/build/components/StatusIcons/SourceIcons/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/SourceMergedCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +1 -0
- package/build/components/TableCells/CustomCells/style.d.ts +1 -0
- package/build/components/VirtualTable/style.d.ts +1 -0
- package/build/constants/assets.d.ts +1 -0
- package/build/constants/assets.js +1 -0
- package/build/constants/table/cell/terminalsTableCellWidth.d.ts +26 -14
- package/build/constants/table/cell/terminalsTableCellWidth.js +26 -14
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useCountdown.d.ts +7 -0
- package/build/hooks/useCountdown.js +46 -0
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +10 -0
- package/build/utils/number.d.ts +1 -0
- package/build/utils/number.js +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
import { GetSourceAnimationFunction } from './type';
|
|
3
4
|
export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("react").RefAttributes<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
4
5
|
variant?: import("./type").ChipVariant | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
3
4
|
export declare const ActionsIconContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
4
5
|
selected: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const AuthIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
3
4
|
export declare const AuthCellContainer: import("@emotion/styled").StyledComponent<{
|
|
4
5
|
hidden?: boolean | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
4
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
5
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react" />
|
|
2
3
|
export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
3
4
|
variant?: "Local" | "Global" | "Regional" | undefined;
|
|
4
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -478,3 +478,4 @@ export const digitalReceiptIcon = `${lightUrl}/digitalReceiptIcon.svg`;
|
|
|
478
478
|
export const bankNoteIcon = `${lightUrl}/bankNoteIcon.svg`;
|
|
479
479
|
export const terminalDeviceFrame = `${lightUrl}/terminalDeviceFrame.svg`;
|
|
480
480
|
export const blackBrushIcon = `${lightUrl}/blackBrushIcon.svg`;
|
|
481
|
+
export const mutedOutlinedCheckIcon = `${lightUrl}/mutedOutlinedCheckIcon.svg`;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export declare const terminalsTableCellWidth: {
|
|
2
2
|
readonly device: {
|
|
3
|
-
readonly default: "
|
|
4
|
-
readonly text: "
|
|
3
|
+
readonly default: "180px";
|
|
4
|
+
readonly text: "180px";
|
|
5
|
+
};
|
|
6
|
+
readonly terminalId: {
|
|
7
|
+
readonly default: "100px";
|
|
8
|
+
readonly text: "100px";
|
|
5
9
|
};
|
|
6
10
|
readonly merchantId: {
|
|
7
11
|
readonly default: "120px";
|
|
@@ -12,24 +16,24 @@ export declare const terminalsTableCellWidth: {
|
|
|
12
16
|
readonly text: "80px";
|
|
13
17
|
};
|
|
14
18
|
readonly platform: {
|
|
15
|
-
readonly default: "
|
|
16
|
-
readonly text: "
|
|
19
|
+
readonly default: "60px";
|
|
20
|
+
readonly text: "60px";
|
|
17
21
|
};
|
|
18
22
|
readonly branding: {
|
|
19
|
-
readonly default: "
|
|
20
|
-
readonly text: "
|
|
23
|
+
readonly default: "80px";
|
|
24
|
+
readonly text: "80px";
|
|
21
25
|
};
|
|
22
26
|
readonly features: {
|
|
23
|
-
readonly default: "
|
|
24
|
-
readonly text: "
|
|
27
|
+
readonly default: "80px";
|
|
28
|
+
readonly text: "80px";
|
|
25
29
|
};
|
|
26
30
|
readonly acceptance: {
|
|
27
|
-
readonly default: "
|
|
28
|
-
readonly text: "
|
|
31
|
+
readonly default: "80px";
|
|
32
|
+
readonly text: "80px";
|
|
29
33
|
};
|
|
30
34
|
readonly brand: {
|
|
31
|
-
readonly default: "
|
|
32
|
-
readonly text: "
|
|
35
|
+
readonly default: "60px";
|
|
36
|
+
readonly text: "60px";
|
|
33
37
|
};
|
|
34
38
|
readonly address: {
|
|
35
39
|
readonly default: "120px";
|
|
@@ -40,7 +44,15 @@ export declare const terminalsTableCellWidth: {
|
|
|
40
44
|
readonly text: "80px";
|
|
41
45
|
};
|
|
42
46
|
readonly actions: {
|
|
43
|
-
readonly default: "
|
|
44
|
-
readonly text: "
|
|
47
|
+
readonly default: "80px";
|
|
48
|
+
readonly text: "80px";
|
|
49
|
+
};
|
|
50
|
+
readonly charges: {
|
|
51
|
+
readonly default: "180px";
|
|
52
|
+
readonly text: "180px";
|
|
53
|
+
};
|
|
54
|
+
readonly chargesTransactions: {
|
|
55
|
+
readonly default: "70px";
|
|
56
|
+
readonly text: "70px";
|
|
45
57
|
};
|
|
46
58
|
};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export const terminalsTableCellWidth = {
|
|
2
2
|
device: {
|
|
3
|
-
default: '
|
|
4
|
-
text: '
|
|
3
|
+
default: '180px',
|
|
4
|
+
text: '180px',
|
|
5
|
+
},
|
|
6
|
+
terminalId: {
|
|
7
|
+
default: '100px',
|
|
8
|
+
text: '100px',
|
|
5
9
|
},
|
|
6
10
|
merchantId: {
|
|
7
11
|
default: '120px',
|
|
@@ -12,24 +16,24 @@ export const terminalsTableCellWidth = {
|
|
|
12
16
|
text: '80px',
|
|
13
17
|
},
|
|
14
18
|
platform: {
|
|
15
|
-
default: '
|
|
16
|
-
text: '
|
|
19
|
+
default: '60px',
|
|
20
|
+
text: '60px',
|
|
17
21
|
},
|
|
18
22
|
branding: {
|
|
19
|
-
default: '
|
|
20
|
-
text: '
|
|
23
|
+
default: '80px',
|
|
24
|
+
text: '80px',
|
|
21
25
|
},
|
|
22
26
|
features: {
|
|
23
|
-
default: '
|
|
24
|
-
text: '
|
|
27
|
+
default: '80px',
|
|
28
|
+
text: '80px',
|
|
25
29
|
},
|
|
26
30
|
acceptance: {
|
|
27
|
-
default: '
|
|
28
|
-
text: '
|
|
31
|
+
default: '80px',
|
|
32
|
+
text: '80px',
|
|
29
33
|
},
|
|
30
34
|
brand: {
|
|
31
|
-
default: '
|
|
32
|
-
text: '
|
|
35
|
+
default: '60px',
|
|
36
|
+
text: '60px',
|
|
33
37
|
},
|
|
34
38
|
address: {
|
|
35
39
|
default: '120px',
|
|
@@ -40,7 +44,15 @@ export const terminalsTableCellWidth = {
|
|
|
40
44
|
text: '80px',
|
|
41
45
|
},
|
|
42
46
|
actions: {
|
|
43
|
-
default: '
|
|
44
|
-
text: '
|
|
47
|
+
default: '80px',
|
|
48
|
+
text: '80px',
|
|
49
|
+
},
|
|
50
|
+
charges: {
|
|
51
|
+
default: '180px',
|
|
52
|
+
text: '180px',
|
|
53
|
+
},
|
|
54
|
+
chargesTransactions: {
|
|
55
|
+
default: '70px',
|
|
56
|
+
text: '70px',
|
|
45
57
|
},
|
|
46
58
|
};
|
package/build/hooks/index.d.ts
CHANGED
package/build/hooks/index.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { secondsToTimeString } from '../utils/index.js';
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
export default function useCountdown() {
|
|
4
|
+
const [timer, setTimer] = useState(0);
|
|
5
|
+
const timerInterval = useRef(null);
|
|
6
|
+
const formattedTime = secondsToTimeString(timer);
|
|
7
|
+
const stopTimer = () => {
|
|
8
|
+
if (timerInterval.current) {
|
|
9
|
+
clearInterval(timerInterval.current);
|
|
10
|
+
timerInterval.current = null;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
const resetTimer = () => {
|
|
14
|
+
stopTimer();
|
|
15
|
+
setTimer(0);
|
|
16
|
+
};
|
|
17
|
+
const startTimer = (expiryTime) => {
|
|
18
|
+
if (expiryTime <= 0)
|
|
19
|
+
return;
|
|
20
|
+
if (timerInterval.current) {
|
|
21
|
+
stopTimer();
|
|
22
|
+
}
|
|
23
|
+
setTimer(expiryTime);
|
|
24
|
+
timerInterval.current = setInterval(() => {
|
|
25
|
+
setTimer((prev) => {
|
|
26
|
+
const newTime = prev - 1;
|
|
27
|
+
if (newTime <= 0) {
|
|
28
|
+
stopTimer();
|
|
29
|
+
}
|
|
30
|
+
return newTime;
|
|
31
|
+
});
|
|
32
|
+
}, 1000);
|
|
33
|
+
};
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
return () => {
|
|
36
|
+
stopTimer();
|
|
37
|
+
};
|
|
38
|
+
}, []);
|
|
39
|
+
return {
|
|
40
|
+
timer,
|
|
41
|
+
formattedTime,
|
|
42
|
+
startTimer,
|
|
43
|
+
stopTimer,
|
|
44
|
+
resetTimer,
|
|
45
|
+
};
|
|
46
|
+
}
|
package/build/utils/date.d.ts
CHANGED
package/build/utils/date.js
CHANGED
|
@@ -4,6 +4,7 @@ import timezone from 'dayjs/plugin/timezone';
|
|
|
4
4
|
import utc from 'dayjs/plugin/utc';
|
|
5
5
|
import calendar from 'dayjs/plugin/calendar';
|
|
6
6
|
import { TIMEZONES } from '../constants/index.js';
|
|
7
|
+
import { pad } from './number';
|
|
7
8
|
dayjs.extend(utc);
|
|
8
9
|
dayjs.extend(timezone);
|
|
9
10
|
dayjs.extend(relativeTime);
|
|
@@ -178,3 +179,12 @@ export const generatePastYearList = (length = 10) => Array.from({ length }, (_,
|
|
|
178
179
|
id: year,
|
|
179
180
|
label: year,
|
|
180
181
|
}));
|
|
182
|
+
export function secondsToTimeString(seconds) {
|
|
183
|
+
const hours = Math.floor(seconds / 3600);
|
|
184
|
+
const minutes = Math.floor((seconds % 3600) / 60);
|
|
185
|
+
const secondsValue = Math.floor(seconds % 60);
|
|
186
|
+
if (hours > 0) {
|
|
187
|
+
return `${pad(hours)}:${pad(minutes)}:${pad(secondsValue)}`;
|
|
188
|
+
}
|
|
189
|
+
return `${pad(minutes)}:${pad(secondsValue)}`;
|
|
190
|
+
}
|
package/build/utils/number.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export declare function formatOrdinal(num?: number): string;
|
|
|
2
2
|
export declare function formatNumber(num: number): string;
|
|
3
3
|
export declare const stringToNumber: (value: string) => number;
|
|
4
4
|
export declare const numberToString: (value: number, fixed?: number) => string;
|
|
5
|
+
export declare function pad(num: number, length?: number): string;
|
package/build/utils/number.js
CHANGED
package/package.json
CHANGED