Files
inji-wallet/components/KebabPopUp.tsx
KiruthikaJeyashankar 703e03057d Sync release 0.21 (#2165)
* [INJIMOB-3622] Fix alignment in history screen  (#2140)

* [INJIMOB-3622]: clear the history page issue

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3622]: clear the history page issue

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

---------

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3647] refactor: enhance response structure of credential status check (#2145)

* [INJIMOB-3647] refactor: udpate vc verifier RN module

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: update reverification logic

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: modify status response structure

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: update response resolving of status check in swift bridge

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: update info logs to print status message

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: modify type from map to record

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: remove unnecessary async function

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: Credential summary result structure

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

---------

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* Injimob-3651: revert all the branding changes (#2151)

* Revert "[INJIMOB-3622] Fix alignment in history screen  (#2140)"

This reverts commit a0b08914e5.

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* Revert "Injimob [3622] [3627] - BANNER ISSUE AND BRANDING CHANGES ISSUES  (#2130)"

This reverts commit 522104811c.

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* Revert "[INJIMOB-3633][INJIMOB-3636] fix icon bg color across app (#2134)"

This reverts commit d8d718693d.

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* Revert "[INJIMOB-3633] fix search bar clear icon not apperaing (#2133)"

This reverts commit 6a202b11af.

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3651]: revert all the branding changes

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3651]: update all the snapshot

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

---------

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3647] refactor: update isRevoked data type (#2149)

* [INJIMOB-3647] refactor: modify data type of isRevoked to EvaluationStatus

Type representing any possible value of EvaluationStatus.

- "TRUE" → Condition was evaluated and is positively true
- "FALSE" → Condition was evaluated and is definitively false
- "UNDETERMINED" → Condition could not be evaluated due to an error

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: modify data type of isRevoked to EvaluationStatus

Type representing any possible value of EvaluationStatus.

- "TRUE" → Condition was evaluated and is positively true
- "FALSE" → Condition was evaluated and is definitively false
- "UNDETERMINED" → Condition could not be evaluated due to an error

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: change statuslistVC type to record from string

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

# Conflicts:
#	shared/vcjs/verifyCredential.ts

* [INJIMOB-3647] refactor: update status revoke check to check for null status

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: VCMetadat constructor isRevoked param

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: rename EvaluationStatus to RevocationStatus

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refactor: modify revocation status logs

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

---------

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* Injimob-3651: update the new branding changes (#2154)

* [INJIMOB-3622]: add the new branding changes

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3651]: update the new branding changes

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3651]: update the new snapshots

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3651]: update the changes mentioned deskcheck

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

---------

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>
Signed-off-by: jaswanthkumartw <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3647] fix error condition in ios revocation (#2157)

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-3581] add doc for revocation support (#2158)

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* [INJIMOB-3658] update openid4vp dependencies to 0.6.0 (#2160)

Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>

* INJIMOB-3659: Removing inji wallet ui automation folder from release-0.21.x branch (#2161)

Signed-off-by: maheswaras <maheswara.s@cyberpwn.com>

* INJIMOB-3659: Removing inji wallet ui automation folder from release-0.21.x branch (#2162)

* INJIMOB-3659: Removing inji wallet ui automation folder from release-0.21.x branch

Signed-off-by: maheswaras <maheswara.s@cyberpwn.com>

* INJIMOB-3659: Removing inji wallet ui automation folder from release-0.21.x branch

Signed-off-by: maheswaras <maheswara.s@cyberpwn.com>

---------

Signed-off-by: maheswaras <maheswara.s@cyberpwn.com>

* refactor: replace @expo-google-fonts/montserrat with @expo-google-fonts/inter in package-lock.json

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] fix: change inter to montserrat font

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

* [INJIMOB-3647] refcator: update useFont with montserrat font

Flows - first time VC receved by receiver

Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>

---------

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>
Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com>
Signed-off-by: jaswanthkumartw <jaswanthkumar.p@thoughtworks.com>
Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
Signed-off-by: maheswaras <maheswara.s@cyberpwn.com>
Co-authored-by: jaswanthkumartw <jaswanthkumar.p@thoughtworks.com>
Co-authored-by: abhip2565 <paul.apaul.abhishek.AP@gmail.com>
Co-authored-by: maheswaras <maheswara.s@cyberpwn.com>
2025-12-08 17:09:25 +05:30

104 lines
3.3 KiB
TypeScript

import React from 'react';
import {Icon, ListItem, Overlay} from 'react-native-elements';
import {Theme} from '../components/ui/styleUtils';
import {Button, Column, Row, Text} from '../components/ui';
import {View} from 'react-native';
import {useKebabPopUp} from './KebabPopUpController';
import {ActorRefFrom} from 'xstate';
import {useTranslation} from 'react-i18next';
import {FlatList} from 'react-native-gesture-handler';
import {VCMetadata} from '../shared/VCMetadata';
import testIDProps from '../shared/commonUtil';
import {getKebabMenuOptions} from './kebabMenuUtils';
import {VCItemMachine} from '../machines/VerifiableCredential/VCItemMachine/VCItemMachine';
import {LinearGradient} from 'react-native-linear-gradient';
export const KebabPopUp: React.FC<KebabPopUpProps> = props => {
const controller = useKebabPopUp(props);
const {t} = useTranslation('HomeScreenKebabPopUp');
return (
<Column>
{props.icon ? (
props.icon
) : (
<Icon
{...testIDProps('ellipsis')}
accessible={true}
name={props.iconName}
type={props.iconType}
color={props.iconColor}
size={Theme.ICON_SMALL_SIZE}
/>
)}
<Overlay
isVisible={props.isVisible && !controller.isScanning}
onBackdropPress={props.onDismiss}
overlayStyle={Theme.KebabPopUpStyles.kebabPopUp}>
<Row
style={Theme.KebabPopUpStyles.kebabHeaderStyle}
margin="15"
crossAlign="center">
<Text testID="kebabTitle" weight="bold">
{t('title')}
</Text>
<Icon
{...testIDProps('close')}
name="close"
onPress={props.onDismiss}
color={Theme.Colors.Details}
size={25}
/>
</Row>
<FlatList
data={getKebabMenuOptions(props)}
renderItem={({item}) => (
<ListItem topDivider onPress={item.onPress}>
<Row crossAlign="center" style={{flex: 1}}>
<View style={{width: 25, alignItems: 'center'}}>
{item.icon}
</View>
<Text
style={{fontFamily: 'Montserrat_600SemiBold'}}
color={
item.testID === 'removeFromWallet'
? Theme.Colors.warningText
: undefined
}
testID={item.testID}
margin="0 0 0 10">
{item.label}
</Text>
{item.label === t('reverify') && (
<LinearGradient
start={{x: 0, y: 0}}
end={{x: 1, y: 0}}
colors={Theme.Colors.GradientColors}
style={Theme.KebabPopUpStyles.new}>
<Text color="white" weight="bold" style={{fontSize: 10}}>
{t('new')}
</Text>
</LinearGradient>
)}
</Row>
</ListItem>
)}
/>
</Overlay>
</Column>
);
};
export interface KebabPopUpProps {
iconName?: string;
iconType?: string;
vcMetadata: VCMetadata;
isVisible?: boolean;
onDismiss: () => void;
service: ActorRefFrom<typeof VCItemMachine>;
iconColor?: string;
icon?: any;
vcHasImage: boolean;
}