@procivis/one-react-native-components 0.3.99 → 0.3.106
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/lib/commonjs/components/history/history-list-item-icon.js +5 -3
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
- package/lib/commonjs/components/history/history-list-screen.js +1 -0
- package/lib/commonjs/components/history/history-list-screen.js.map +1 -1
- package/lib/commonjs/components/proof-request/v1/share-credential.js +2 -14
- package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js +1 -0
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +1 -0
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/connectivity-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/filter-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/ghost-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/hold-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/scan-button.js +3 -0
- package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/share-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/share-button.js.map +1 -1
- package/lib/commonjs/ui-components/control/checkbox.js +1 -0
- package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-card.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +3 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-header.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +2 -0
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js +1 -0
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js +2 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector.js +1 -0
- package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
- package/lib/commonjs/ui-components/entity/avatar.js +1 -0
- package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
- package/lib/commonjs/ui-components/header/foldable-header.js +26 -16
- package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
- package/lib/commonjs/ui-components/header/navigation-header.js +1 -0
- package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-details.js +3 -1
- package/lib/commonjs/ui-components/history/history-details.js.map +1 -1
- package/lib/commonjs/ui-components/icons/history.js +1 -0
- package/lib/commonjs/ui-components/icons/history.js.map +1 -1
- package/lib/commonjs/ui-components/index.js +11 -0
- package/lib/commonjs/ui-components/index.js.map +1 -1
- package/lib/commonjs/ui-components/notice/index.js +14 -0
- package/lib/commonjs/ui-components/notice/index.js.map +1 -0
- package/lib/commonjs/ui-components/notice/wallet-notice.js +80 -0
- package/lib/commonjs/ui-components/notice/wallet-notice.js.map +1 -0
- package/lib/commonjs/ui-components/pin/keypad.js +1 -0
- package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pins.js +1 -0
- package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item.js +1 -0
- package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
- package/lib/commonjs/ui-components/settings/settings-button.js +1 -0
- package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proofs.js +12 -2
- package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing.js +4 -10
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/module/components/history/history-list-item-icon.js +5 -3
- package/lib/module/components/history/history-list-item-icon.js.map +1 -1
- package/lib/module/components/history/history-list-screen.js +1 -0
- package/lib/module/components/history/history-list-screen.js.map +1 -1
- package/lib/module/components/proof-request/v1/share-credential.js +2 -14
- package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js +1 -0
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2.js +1 -0
- package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/module/ui-components/buttons/connectivity-button.js +1 -0
- package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/module/ui-components/buttons/filter-button.js +1 -0
- package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/module/ui-components/buttons/ghost-button.js +1 -0
- package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/module/ui-components/buttons/hold-button.js +1 -0
- package/lib/module/ui-components/buttons/hold-button.js.map +1 -1
- package/lib/module/ui-components/buttons/scan-button.js +3 -0
- package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/module/ui-components/buttons/share-button.js +1 -0
- package/lib/module/ui-components/buttons/share-button.js.map +1 -1
- package/lib/module/ui-components/control/checkbox.js +1 -0
- package/lib/module/ui-components/control/checkbox.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-card.js +1 -0
- package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js +3 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-list-item.js +1 -0
- package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-header.js +1 -0
- package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-image-carousel.js +2 -0
- package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/module/ui-components/credential/credential-attribute-item.js +1 -0
- package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js +2 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/module/ui-components/credential/selector.js +1 -0
- package/lib/module/ui-components/credential/selector.js.map +1 -1
- package/lib/module/ui-components/entity/avatar.js +1 -0
- package/lib/module/ui-components/entity/avatar.js.map +1 -1
- package/lib/module/ui-components/header/foldable-header.js +26 -16
- package/lib/module/ui-components/header/foldable-header.js.map +1 -1
- package/lib/module/ui-components/header/navigation-header.js +1 -0
- package/lib/module/ui-components/header/navigation-header.js.map +1 -1
- package/lib/module/ui-components/history/history-details.js +3 -1
- package/lib/module/ui-components/history/history-details.js.map +1 -1
- package/lib/module/ui-components/icons/history.js +1 -0
- package/lib/module/ui-components/icons/history.js.map +1 -1
- package/lib/module/ui-components/index.js +1 -0
- package/lib/module/ui-components/index.js.map +1 -1
- package/lib/module/ui-components/notice/index.js +3 -0
- package/lib/module/ui-components/notice/index.js.map +1 -0
- package/lib/module/ui-components/notice/wallet-notice.js +72 -0
- package/lib/module/ui-components/notice/wallet-notice.js.map +1 -0
- package/lib/module/ui-components/pin/keypad.js +1 -0
- package/lib/module/ui-components/pin/keypad.js.map +1 -1
- package/lib/module/ui-components/pin/pins.js +1 -0
- package/lib/module/ui-components/pin/pins.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item.js +1 -0
- package/lib/module/ui-components/settings/setting-item.js.map +1 -1
- package/lib/module/ui-components/settings/settings-button.js +1 -0
- package/lib/module/ui-components/settings/settings-button.js.map +1 -1
- package/lib/module/utils/hooks/core/proofs.js +12 -2
- package/lib/module/utils/hooks/core/proofs.js.map +1 -1
- package/lib/module/utils/parsers/credential-images.js +1 -1
- package/lib/module/utils/parsers/credential-images.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing-v2.js +1 -1
- package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing.js +4 -10
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/typescript/ui-components/index.d.ts +1 -0
- package/lib/typescript/ui-components/notice/index.d.ts +2 -0
- package/lib/typescript/ui-components/notice/wallet-notice.d.ts +11 -0
- package/lib/typescript/utils/hooks/core/proofs.d.ts +5 -3
- package/lib/typescript/utils/parsers/credential-sharing.d.ts +2 -2
- package/lib/typescript/utils/parsers/credential.d.ts +2 -29
- package/package.json +3 -3
- package/src/components/history/history-list-item-icon.tsx +4 -2
- package/src/components/history/history-list-screen.tsx +1 -0
- package/src/components/proof-request/v1/share-credential.tsx +1 -18
- package/src/components/proof-request/v2/share-credential-v2-group.tsx +1 -0
- package/src/components/proof-request/v2/share-credential-v2.tsx +1 -0
- package/src/ui-components/buttons/connectivity-button.tsx +1 -0
- package/src/ui-components/buttons/filter-button.tsx +1 -0
- package/src/ui-components/buttons/ghost-button.tsx +1 -0
- package/src/ui-components/buttons/hold-button.tsx +1 -0
- package/src/ui-components/buttons/scan-button.tsx +3 -0
- package/src/ui-components/buttons/share-button.tsx +1 -0
- package/src/ui-components/control/checkbox.tsx +1 -0
- package/src/ui-components/credential/card/credential-card.tsx +1 -0
- package/src/ui-components/credential/card/credential-details-card.tsx +2 -0
- package/src/ui-components/credential/card/credential-details-list-item.tsx +1 -0
- package/src/ui-components/credential/card/credential-header.tsx +1 -0
- package/src/ui-components/credential/card/credential-image-carousel.tsx +2 -2
- package/src/ui-components/credential/credential-attribute-item.tsx +1 -0
- package/src/ui-components/credential/credential-carousel-images.tsx +1 -0
- package/src/ui-components/credential/selector.tsx +1 -0
- package/src/ui-components/entity/avatar.tsx +1 -0
- package/src/ui-components/header/foldable-header.tsx +27 -20
- package/src/ui-components/header/navigation-header.tsx +1 -0
- package/src/ui-components/history/history-details.tsx +2 -0
- package/src/ui-components/icons/history.tsx +1 -0
- package/src/ui-components/index.ts +1 -0
- package/src/ui-components/notice/index.ts +3 -0
- package/src/ui-components/notice/wallet-notice.tsx +82 -0
- package/src/ui-components/pin/keypad.tsx +1 -0
- package/src/ui-components/pin/pins.tsx +1 -0
- package/src/ui-components/settings/setting-item.tsx +1 -0
- package/src/ui-components/settings/settings-button.tsx +1 -0
- package/src/utils/hooks/core/proofs.ts +10 -2
- package/src/utils/parsers/credential-images.tsx +1 -1
- package/src/utils/parsers/credential-sharing-v2.tsx +0 -1
- package/src/utils/parsers/credential-sharing.tsx +1 -10
- package/src/utils/parsers/credential.ts +2 -2
|
@@ -78,7 +78,7 @@ const CarouselComponent: FC<CarouselProps> = ({ carouselSize, imagesToRender, st
|
|
|
78
78
|
|
|
79
79
|
const styles = StyleSheet.create({
|
|
80
80
|
// eslint-disable-next-line react-native/no-unused-styles
|
|
81
|
-
Barcode: { borderRadius: 4, height: '50%', width: '80%' },
|
|
81
|
+
Barcode: { borderRadius: 4, borderWidth: 0, height: '50%', width: '80%' },
|
|
82
82
|
// eslint-disable-next-line react-native/no-unused-styles
|
|
83
83
|
MRZ: {
|
|
84
84
|
height: '50%',
|
|
@@ -94,7 +94,7 @@ const styles = StyleSheet.create({
|
|
|
94
94
|
overflow: 'hidden',
|
|
95
95
|
},
|
|
96
96
|
// eslint-disable-next-line react-native/no-unused-styles
|
|
97
|
-
QrCode: { aspectRatio: 1, borderRadius: 4, height: '70%' },
|
|
97
|
+
QrCode: { aspectRatio: 1, borderRadius: 4, borderWidth: 0, height: '70%' },
|
|
98
98
|
carouselItem: {
|
|
99
99
|
alignItems: 'center',
|
|
100
100
|
height: '100%',
|
|
@@ -27,8 +27,9 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
|
|
|
27
27
|
const [collapsed, setCollapsed] = useState(header ? false : true);
|
|
28
28
|
const [headerHeight, setHeaderHeight] = useState<number>();
|
|
29
29
|
|
|
30
|
+
const containerPaddingTop = withNotice ? 15 : safeAreaInsets.top;
|
|
30
31
|
const containerPaddingStyle = {
|
|
31
|
-
paddingTop:
|
|
32
|
+
paddingTop: containerPaddingTop,
|
|
32
33
|
};
|
|
33
34
|
|
|
34
35
|
useEffect(() => {
|
|
@@ -52,11 +53,13 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
|
|
|
52
53
|
|
|
53
54
|
const scrollHeaderAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> | undefined = playHeaderFoldAnimation
|
|
54
55
|
? {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
transform: [{
|
|
57
|
+
translateY: scrollOffset.interpolate({
|
|
58
|
+
extrapolate: 'clamp',
|
|
59
|
+
inputRange: [0, headerHeight],
|
|
60
|
+
outputRange: [0, -headerHeight],
|
|
61
|
+
}),
|
|
62
|
+
}],
|
|
60
63
|
}
|
|
61
64
|
: undefined;
|
|
62
65
|
|
|
@@ -80,32 +83,36 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
|
|
|
80
83
|
return (
|
|
81
84
|
<Animated.View
|
|
82
85
|
style={[styles.headerContainer, containerPaddingStyle, withNotice ? styles.noticeBorderRadius : undefined]}>
|
|
83
|
-
<View style={
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{searchBar && <AnimatedSearchBar {...searchBar} collapsed={collapsed} />}
|
|
93
|
-
</Animated.View>
|
|
86
|
+
<Animated.View style={scrollHeaderAnimatedStyle}>
|
|
87
|
+
<View
|
|
88
|
+
style={[styles.blurFill, { top: -containerPaddingTop }]}>
|
|
89
|
+
<BlurView
|
|
90
|
+
blurStyle={'header'}
|
|
91
|
+
color={colorScheme.background}
|
|
92
|
+
style={[StyleSheet.absoluteFill, withNotice ? styles.noticeBorderRadius : undefined]}
|
|
93
|
+
/>
|
|
94
|
+
</View>
|
|
94
95
|
{header && (
|
|
95
|
-
<Animated.View onLayout={onHeaderLayout} style={
|
|
96
|
+
<Animated.View onLayout={onHeaderLayout} style={fadeHeaderOutAnimatedStyle}>
|
|
96
97
|
{header}
|
|
97
98
|
</Animated.View>
|
|
98
99
|
)}
|
|
99
|
-
|
|
100
|
+
{searchBar && <AnimatedSearchBar {...searchBar} collapsed={collapsed} />}
|
|
101
|
+
</Animated.View>
|
|
100
102
|
</Animated.View>
|
|
101
103
|
);
|
|
102
104
|
};
|
|
103
105
|
|
|
104
106
|
const styles = StyleSheet.create({
|
|
105
|
-
|
|
107
|
+
blurFill: {
|
|
108
|
+
bottom: 0,
|
|
109
|
+
left: 0,
|
|
106
110
|
overflow: 'hidden',
|
|
111
|
+
position: 'absolute',
|
|
112
|
+
right: 0,
|
|
107
113
|
},
|
|
108
114
|
headerContainer: {
|
|
115
|
+
overflow: 'hidden',
|
|
109
116
|
position: 'absolute',
|
|
110
117
|
width: '100%',
|
|
111
118
|
},
|
|
@@ -222,6 +222,7 @@ export const HistoryDetailsView: FC<HistoryDetailsViewProps> = ({
|
|
|
222
222
|
const styles = StyleSheet.create({
|
|
223
223
|
assetsHeader: {
|
|
224
224
|
borderRadius: 8,
|
|
225
|
+
borderWidth: 0,
|
|
225
226
|
},
|
|
226
227
|
content: {
|
|
227
228
|
paddingHorizontal: 16,
|
|
@@ -242,6 +243,7 @@ const styles = StyleSheet.create({
|
|
|
242
243
|
},
|
|
243
244
|
section: {
|
|
244
245
|
borderRadius: 8,
|
|
246
|
+
borderWidth: 0,
|
|
245
247
|
marginBottom: 12,
|
|
246
248
|
padding: 12,
|
|
247
249
|
},
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React, { ComponentType, FunctionComponent, JSXElementConstructor, ReactElement, useMemo } from 'react';
|
|
2
|
+
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { concatTestID } from '../../utils';
|
|
5
|
+
import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
|
|
6
|
+
import { CloseIcon } from '../icons';
|
|
7
|
+
import { Typography } from '../text';
|
|
8
|
+
import { useAppColorScheme } from '../theme';
|
|
9
|
+
|
|
10
|
+
export type WalletNoticeProps = {
|
|
11
|
+
accessory?: ComponentType<any> | ReactElement;
|
|
12
|
+
icon?: ComponentType<any> | ReactElement;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
text: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const testID = 'WalletNotice';
|
|
19
|
+
|
|
20
|
+
const WalletNotice: FunctionComponent<WalletNoticeProps> = ({ accessory, icon, style, text, onClose }) => {
|
|
21
|
+
const colorScheme = useAppColorScheme();
|
|
22
|
+
|
|
23
|
+
const iconView: React.ReactElement | undefined = useMemo(() => {
|
|
24
|
+
if (!icon) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
if (React.isValidElement(icon)) {
|
|
28
|
+
return icon;
|
|
29
|
+
} else {
|
|
30
|
+
const IconComponent = icon as JSXElementConstructor<any>;
|
|
31
|
+
return <IconComponent />;
|
|
32
|
+
}
|
|
33
|
+
}, [icon]);
|
|
34
|
+
|
|
35
|
+
const accessoryView: React.ReactElement | undefined = useMemo(() => {
|
|
36
|
+
if (!accessory) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
if (React.isValidElement(accessory)) {
|
|
40
|
+
return accessory;
|
|
41
|
+
} else {
|
|
42
|
+
const AccessoryComponent = accessory as JSXElementConstructor<any>;
|
|
43
|
+
return <AccessoryComponent />;
|
|
44
|
+
}
|
|
45
|
+
}, [accessory]);
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<View style={[styles.noticeContainer, style]}>
|
|
49
|
+
<View style={styles.title}>
|
|
50
|
+
{iconView}
|
|
51
|
+
<Typography color={colorScheme.white}>{text}</Typography>
|
|
52
|
+
{accessoryView}
|
|
53
|
+
</View>
|
|
54
|
+
{onClose && (
|
|
55
|
+
<TouchableOpacity onPress={onClose} style={styles.closeIcon} testID={concatTestID(testID, 'close')}>
|
|
56
|
+
<CloseIcon color="white" />
|
|
57
|
+
</TouchableOpacity>
|
|
58
|
+
)}
|
|
59
|
+
</View>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const styles = StyleSheet.create({
|
|
64
|
+
closeIcon: {
|
|
65
|
+
position: 'absolute',
|
|
66
|
+
right: 20,
|
|
67
|
+
top: 5,
|
|
68
|
+
},
|
|
69
|
+
noticeContainer: {
|
|
70
|
+
flexDirection: 'row',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
position: 'relative',
|
|
73
|
+
},
|
|
74
|
+
title: {
|
|
75
|
+
alignItems: 'center',
|
|
76
|
+
flexDirection: 'row',
|
|
77
|
+
gap: 5,
|
|
78
|
+
justifyContent: 'center',
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export default WalletNotice;
|
|
@@ -151,7 +151,6 @@ export enum VerificationProtocol {
|
|
|
151
151
|
OPENID4VP_DRAFT20 = 'OPENID4VP_DRAFT20',
|
|
152
152
|
OPENID4VP_DRAFT25 = 'OPENID4VP_DRAFT25',
|
|
153
153
|
OPENID4VP_PROXIMITY_DRAFT00 = 'OPENID4VP_PROXIMITY_DRAFT00',
|
|
154
|
-
SCAN_TO_VERIFY = 'SCAN_TO_VERIFY',
|
|
155
154
|
}
|
|
156
155
|
|
|
157
156
|
export enum VerificationEngagement {
|
|
@@ -284,6 +283,15 @@ export const useProofForSchemaIdWithTransport = (
|
|
|
284
283
|
setProofIdState(id);
|
|
285
284
|
}, []);
|
|
286
285
|
|
|
286
|
+
const retract = useCallback(async () => {
|
|
287
|
+
const id = proofIdRef.current;
|
|
288
|
+
if (!id) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
setProofId(undefined);
|
|
292
|
+
await deleteProof(id).catch(() => {});
|
|
293
|
+
}, [deleteProof, setProofId]);
|
|
294
|
+
|
|
287
295
|
useEffect(() => {
|
|
288
296
|
if (!proofIdRef.current) {
|
|
289
297
|
return;
|
|
@@ -341,7 +349,7 @@ export const useProofForSchemaIdWithTransport = (
|
|
|
341
349
|
.catch(() => {});
|
|
342
350
|
}, [proofSchemaId, identifiers, identifierFilter, createProof, enabled, transport, proofId, setProofId, deleting]);
|
|
343
351
|
|
|
344
|
-
return deleting ? undefined : proofId;
|
|
352
|
+
return { proofId: deleting ? undefined : proofId, retract };
|
|
345
353
|
};
|
|
346
354
|
|
|
347
355
|
export const useCleanupUnusedProofs = () => {
|
|
@@ -54,7 +54,7 @@ export const getCarouselImagesFromClaims = (
|
|
|
54
54
|
|
|
55
55
|
let claimValue = '';
|
|
56
56
|
|
|
57
|
-
if (claim && (claim.value.type_ === 'FLOAT' || claim.value.type_ === 'INTEGER')) {
|
|
57
|
+
if (claim && (claim.value.type_ === 'FLOAT' || claim.value.type_ === 'INTEGER' || claim.value.type_ === 'STRING')) {
|
|
58
58
|
claimValue = String(claim.value.value);
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -30,7 +30,6 @@ import {
|
|
|
30
30
|
|
|
31
31
|
export const validityCheckedCardFromCredential = (
|
|
32
32
|
credential: CredentialDetailBindingDto,
|
|
33
|
-
invalidLVVC: boolean,
|
|
34
33
|
expanded: boolean,
|
|
35
34
|
multipleCredentialsAvailable: boolean,
|
|
36
35
|
config: Config,
|
|
@@ -48,13 +47,7 @@ export const validityCheckedCardFromCredential = (
|
|
|
48
47
|
| 'statusIcon'
|
|
49
48
|
>
|
|
50
49
|
| undefined;
|
|
51
|
-
if (
|
|
52
|
-
credentialHeaderDetail = {
|
|
53
|
-
credentialDetailErrorColor: true,
|
|
54
|
-
credentialDetailPrimary: labels.revoked,
|
|
55
|
-
credentialDetailTestID: concatTestID(testID, 'header.invalid'),
|
|
56
|
-
};
|
|
57
|
-
} else if (!expanded && multipleCredentialsAvailable) {
|
|
50
|
+
if (!expanded && multipleCredentialsAvailable) {
|
|
58
51
|
credentialHeaderDetail = {
|
|
59
52
|
credentialDetailPrimary: labels.multipleCredentials,
|
|
60
53
|
credentialDetailTestID: concatTestID(testID, 'header.multiple'),
|
|
@@ -258,7 +251,6 @@ export type ShareCredentialCardLabels = CardLabels & {
|
|
|
258
251
|
|
|
259
252
|
export const shareCredentialCardFromCredential = (
|
|
260
253
|
credential: CredentialDetailBindingDto | undefined,
|
|
261
|
-
invalidLVVC: boolean,
|
|
262
254
|
expanded: boolean,
|
|
263
255
|
multipleCredentialsAvailable: boolean,
|
|
264
256
|
request: PresentationDefinitionRequestedCredentialBindingDto,
|
|
@@ -282,7 +274,6 @@ export const shareCredentialCardFromCredential = (
|
|
|
282
274
|
const card = credential
|
|
283
275
|
? validityCheckedCardFromCredential(
|
|
284
276
|
credential,
|
|
285
|
-
invalidLVVC,
|
|
286
277
|
expanded,
|
|
287
278
|
multipleCredentialsAvailable,
|
|
288
279
|
config,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
Config,
|
|
4
4
|
CredentialDetailBindingDto,
|
|
5
5
|
CredentialListItemBindingDto,
|
|
6
|
-
|
|
6
|
+
CredentialSchemaBindingDto,
|
|
7
7
|
CredentialStateBindingEnum,
|
|
8
8
|
DataTypeEnum,
|
|
9
9
|
FormatFeatureEnum,
|
|
@@ -402,7 +402,7 @@ function parseBase64Image(image: string | undefined) {
|
|
|
402
402
|
return image ? '__BASE64IMAGE__' : '';
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
export function getCredentialSchemaWithoutImages(credentialSchema:
|
|
405
|
+
export function getCredentialSchemaWithoutImages<T extends CredentialSchemaBindingDto>(credentialSchema: T): T {
|
|
406
406
|
return {
|
|
407
407
|
...credentialSchema,
|
|
408
408
|
layoutProperties: {
|