@procivis/one-react-native-components 0.3.143 → 0.3.147

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.
Files changed (53) hide show
  1. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js +6 -3
  2. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  3. package/lib/commonjs/ui-components/credential/card/credential-header.js +8 -38
  4. package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
  5. package/lib/commonjs/ui-components/credential/card/credential-logo.js +71 -0
  6. package/lib/commonjs/ui-components/credential/card/credential-logo.js.map +1 -0
  7. package/lib/commonjs/ui-components/credential/card/index.js +7 -0
  8. package/lib/commonjs/ui-components/credential/card/index.js.map +1 -1
  9. package/lib/commonjs/ui-components/input/selection-input.js +69 -53
  10. package/lib/commonjs/ui-components/input/selection-input.js.map +1 -1
  11. package/lib/commonjs/ui-components/text/index.js +1 -9
  12. package/lib/commonjs/ui-components/text/index.js.map +1 -1
  13. package/lib/commonjs/utils/hooks/core/transaction.js +20 -0
  14. package/lib/commonjs/utils/hooks/core/transaction.js.map +1 -0
  15. package/lib/commonjs/utils/parsers/credential.js +22 -14
  16. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  17. package/lib/commonjs/utils/parsers/query.js +1 -1
  18. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  19. package/lib/module/components/proof-request/v2/share-credential-v2-group.js +6 -3
  20. package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  21. package/lib/module/ui-components/credential/card/credential-header.js +8 -38
  22. package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
  23. package/lib/module/ui-components/credential/card/credential-logo.js +64 -0
  24. package/lib/module/ui-components/credential/card/credential-logo.js.map +1 -0
  25. package/lib/module/ui-components/credential/card/index.js +2 -0
  26. package/lib/module/ui-components/credential/card/index.js.map +1 -1
  27. package/lib/module/ui-components/input/selection-input.js +70 -54
  28. package/lib/module/ui-components/input/selection-input.js.map +1 -1
  29. package/lib/module/ui-components/text/index.js +2 -2
  30. package/lib/module/ui-components/text/index.js.map +1 -1
  31. package/lib/module/utils/hooks/core/transaction.js +13 -0
  32. package/lib/module/utils/hooks/core/transaction.js.map +1 -0
  33. package/lib/module/utils/parsers/credential.js +20 -13
  34. package/lib/module/utils/parsers/credential.js.map +1 -1
  35. package/lib/module/utils/parsers/query.js +1 -1
  36. package/lib/module/utils/parsers/query.js.map +1 -1
  37. package/lib/typescript/ui-components/credential/card/credential-logo.d.ts +17 -0
  38. package/lib/typescript/ui-components/credential/card/index.d.ts +3 -0
  39. package/lib/typescript/ui-components/input/selection-input.d.ts +3 -7
  40. package/lib/typescript/ui-components/text/index.d.ts +2 -1
  41. package/lib/typescript/utils/hooks/core/transaction.d.ts +2 -0
  42. package/lib/typescript/utils/parsers/credential.d.ts +2 -1
  43. package/package.json +5 -3
  44. package/src/components/proof-request/v2/share-credential-v2-group.tsx +3 -0
  45. package/src/ui-components/credential/card/credential-header.tsx +9 -37
  46. package/src/ui-components/credential/card/credential-logo.stories.tsx +45 -0
  47. package/src/ui-components/credential/card/credential-logo.tsx +79 -0
  48. package/src/ui-components/credential/card/index.ts +5 -8
  49. package/src/ui-components/input/selection-input.tsx +85 -65
  50. package/src/ui-components/text/index.ts +2 -1
  51. package/src/utils/hooks/core/transaction.ts +18 -0
  52. package/src/utils/parsers/credential.ts +27 -13
  53. package/src/utils/parsers/query.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"names":["getQueryKey","queryParams","params","map","param","getQueryKeyFromCredentialListQueryParams","getQueryKeyFromHistoryListQueryParams","getQueryKeyFromCredentialSchemaListQueryParams","getQueryKeyFromProofSchemaListQueryParams","getQueryKeyFromProofListQueryParams","getQueryKeyFromDidListQueryParams","getQueryKeyFromIdentifierListQueryParams"],"sources":["query.ts"],"sourcesContent":["import {\n CredentialListQuery,\n CredentialSchemaListQuery,\n DidListQuery,\n HistoryListQuery,\n IdentifierListQuery,\n ProofListQuery,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\n\ntype QueryKey<ListQuery, ParamList> = ParamList extends ReadonlyArray<keyof ListQuery> // all params are inside the ListQuery\n ? keyof ListQuery extends ParamList[number] // all ListQuery fields are in the params\n ? Array<ListQuery[keyof ListQuery]>\n : void\n : void; // otherwise produce a wrong return type which should trigger compilation error\n\n/** Typecheck that all query params are included in the query key */\nfunction getQueryKey<ListQuery extends {}, ParamList extends ReadonlyArray<keyof ListQuery>>(\n queryParams: ListQuery,\n params: ParamList,\n): QueryKey<ListQuery, ParamList> {\n return params.map((param) => queryParams[param]) as QueryKey<ListQuery, ParamList>;\n}\n\nexport const getQueryKeyFromCredentialListQueryParams = (queryParams: Partial<CredentialListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'name',\n 'searchText',\n 'searchType',\n 'sort',\n 'sortDirection',\n 'exact',\n 'roles',\n 'ids',\n 'states',\n 'include',\n 'profiles',\n 'credentialSchemaIds',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n 'issuanceDateAfter',\n 'issuanceDateBefore',\n 'revocationDateAfter',\n 'revocationDateBefore',\n 'types',\n 'parentId',\n ]);\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams: Partial<HistoryListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'sort',\n 'sortDirection',\n 'organisationId',\n 'entityIds',\n 'actions',\n 'entityTypes',\n 'createdDateAfter',\n 'createdDateBefore',\n 'identifierId',\n 'credentialId',\n 'credentialSchemaId',\n 'proofId',\n 'proofSchemaId',\n 'search',\n 'users',\n ]);\n};\n\nexport const getQueryKeyFromCredentialSchemaListQueryParams = (\n queryParams: Partial<CredentialSchemaListQuery> = {},\n) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'name',\n 'sort',\n 'sortDirection',\n 'exact',\n 'ids',\n 'include',\n 'schemaIds',\n 'formats',\n 'usesBatchIssuance',\n 'isMultiformatSchema',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n ]);\n};\n\nexport const getQueryKeyFromProofSchemaListQueryParams = (queryParams: Partial<ProofSchemaListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'name',\n 'sort',\n 'sortDirection',\n 'exact',\n 'ids',\n 'formats',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n ]);\n};\n\nexport const getQueryKeyFromProofListQueryParams = (queryParams: Partial<ProofListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'sort',\n 'sortDirection',\n 'name',\n 'ids',\n 'proofStates',\n 'proofRoles',\n 'proofSchemaIds',\n 'exact',\n 'profiles',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n 'requestedDateAfter',\n 'requestedDateBefore',\n 'completedDateAfter',\n 'completedDateBefore',\n ]);\n};\n\nexport const getQueryKeyFromDidListQueryParams = (queryParams: Partial<DidListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'sort',\n 'sortDirection',\n 'name',\n 'did',\n 'type',\n 'deactivated',\n 'exact',\n 'keyAlgorithms',\n 'keyRoles',\n 'keyStorages',\n 'keyIds',\n 'didMethods',\n ]);\n};\n\nexport const getQueryKeyFromIdentifierListQueryParams = (queryParams: Partial<IdentifierListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'ids',\n 'sort',\n 'sortDirection',\n 'name',\n 'types',\n 'states',\n 'exact',\n 'didMethods',\n 'isRemote',\n 'keyAlgorithms',\n 'keyRoles',\n 'keyStorages',\n 'certificateRoles',\n 'certificateRolesMatchMode',\n 'trustIssuanceSchemaId',\n 'trustVerificationSchemaId',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n ]);\n};\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["getQueryKey","queryParams","params","map","param","getQueryKeyFromCredentialListQueryParams","getQueryKeyFromHistoryListQueryParams","getQueryKeyFromCredentialSchemaListQueryParams","getQueryKeyFromProofSchemaListQueryParams","getQueryKeyFromProofListQueryParams","getQueryKeyFromDidListQueryParams","getQueryKeyFromIdentifierListQueryParams"],"sources":["query.ts"],"sourcesContent":["import {\n CredentialListQuery,\n CredentialSchemaListQuery,\n DidListQuery,\n HistoryListQuery,\n IdentifierListQuery,\n ProofListQuery,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\n\ntype QueryKey<ListQuery, ParamList> = ParamList extends ReadonlyArray<keyof ListQuery> // all params are inside the ListQuery\n ? keyof ListQuery extends ParamList[number] // all ListQuery fields are in the params\n ? Array<ListQuery[keyof ListQuery]>\n : void\n : void; // otherwise produce a wrong return type which should trigger compilation error\n\n/** Typecheck that all query params are included in the query key */\nfunction getQueryKey<ListQuery extends {}, ParamList extends ReadonlyArray<keyof ListQuery>>(\n queryParams: ListQuery,\n params: ParamList,\n): QueryKey<ListQuery, ParamList> {\n return params.map((param) => queryParams[param]) as QueryKey<ListQuery, ParamList>;\n}\n\nexport const getQueryKeyFromCredentialListQueryParams = (queryParams: Partial<CredentialListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'name',\n 'searchText',\n 'searchType',\n 'sort',\n 'sortDirection',\n 'exact',\n 'roles',\n 'ids',\n 'states',\n 'include',\n 'profiles',\n 'credentialSchemaIds',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n 'issuanceDateAfter',\n 'issuanceDateBefore',\n 'revocationDateAfter',\n 'revocationDateBefore',\n 'types',\n 'parentId',\n ]);\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams: Partial<HistoryListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'sort',\n 'sortDirection',\n 'organisationId',\n 'entityIds',\n 'actions',\n 'entityTypes',\n 'createdDateAfter',\n 'createdDateBefore',\n 'identifierId',\n 'credentialId',\n 'credentialSchemaId',\n 'proofId',\n 'proofSchemaId',\n 'search',\n 'users',\n 'trustCollectionId',\n ]);\n};\n\nexport const getQueryKeyFromCredentialSchemaListQueryParams = (\n queryParams: Partial<CredentialSchemaListQuery> = {},\n) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'name',\n 'sort',\n 'sortDirection',\n 'exact',\n 'ids',\n 'include',\n 'schemaIds',\n 'formats',\n 'usesBatchIssuance',\n 'isMultiformatSchema',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n ]);\n};\n\nexport const getQueryKeyFromProofSchemaListQueryParams = (queryParams: Partial<ProofSchemaListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'name',\n 'sort',\n 'sortDirection',\n 'exact',\n 'ids',\n 'formats',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n ]);\n};\n\nexport const getQueryKeyFromProofListQueryParams = (queryParams: Partial<ProofListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'sort',\n 'sortDirection',\n 'name',\n 'ids',\n 'proofStates',\n 'proofRoles',\n 'proofSchemaIds',\n 'exact',\n 'profiles',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n 'requestedDateAfter',\n 'requestedDateBefore',\n 'completedDateAfter',\n 'completedDateBefore',\n ]);\n};\n\nexport const getQueryKeyFromDidListQueryParams = (queryParams: Partial<DidListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'sort',\n 'sortDirection',\n 'name',\n 'did',\n 'type',\n 'deactivated',\n 'exact',\n 'keyAlgorithms',\n 'keyRoles',\n 'keyStorages',\n 'keyIds',\n 'didMethods',\n ]);\n};\n\nexport const getQueryKeyFromIdentifierListQueryParams = (queryParams: Partial<IdentifierListQuery> = {}) => {\n return getQueryKey(queryParams, [\n 'page',\n 'pageSize',\n 'organisationId',\n 'ids',\n 'sort',\n 'sortDirection',\n 'name',\n 'types',\n 'states',\n 'exact',\n 'didMethods',\n 'isRemote',\n 'keyAlgorithms',\n 'keyRoles',\n 'keyStorages',\n 'certificateRoles',\n 'certificateRolesMatchMode',\n 'trustIssuanceSchemaId',\n 'trustVerificationSchemaId',\n 'createdDateAfter',\n 'createdDateBefore',\n 'lastModifiedAfter',\n 'lastModifiedBefore',\n ]);\n};\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ import { FC } from 'react';
2
+ import { ColorValue } from 'react-native';
3
+ import { ImageOrComponentSource } from '../../image/image-or-component';
4
+ export declare enum CredentialLogoSize {
5
+ Regular = 44,
6
+ Small = 20
7
+ }
8
+ export type CredentialLogoProps = {
9
+ color?: ColorValue;
10
+ credentialName: string;
11
+ icon?: ImageOrComponentSource;
12
+ iconLabelColor?: ColorValue;
13
+ size?: CredentialLogoSize;
14
+ testID?: string;
15
+ };
16
+ declare const CredentialLogo: FC<CredentialLogoProps>;
17
+ export default CredentialLogo;
@@ -8,8 +8,11 @@ import type { CredentialHeaderProps } from './credential-header';
8
8
  import CredentialHeader from './credential-header';
9
9
  import type { CarouselImage } from './credential-image-carousel';
10
10
  import { CarouselImageType } from './credential-image-carousel';
11
+ import type { CredentialLogoProps, CredentialLogoSize } from './credential-logo';
12
+ import CredentialLogo from './credential-logo';
11
13
  export { CarouselImage, CarouselImageType };
12
14
  export { CredentialCard, CredentialCardNotice, CredentialCardProps, CredentialCardRatio, CredentialCardShadow };
13
15
  export { CredentialDetailsCard, CredentialDetailsCardProps };
14
16
  export { CredentialDetailsCardListItem, CredentialDetailsCardListItemProps };
15
17
  export { CredentialHeader, CredentialHeaderProps };
18
+ export { CredentialLogo, CredentialLogoProps, CredentialLogoSize };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { TouchableOpacityProps } from 'react-native';
2
+ import { TouchableOpacityProps } from 'react-native';
3
3
  export interface SelectionInputChoice {
4
4
  label: string;
5
5
  /**
@@ -24,9 +24,5 @@ export interface SelectionInputProps extends TouchableOpacityProps {
24
24
  selectedValue?: string | number;
25
25
  values: SelectionInputChoice[];
26
26
  }
27
- /**
28
- * Generic selection input component
29
- * @see https://www.figma.com/file/Gd0Tj0234hxtl3HMcCJThW/App-Component-Library-(Design)?node-id=4%3A127&t=B2Y3PtJHH22XDPkx-0
30
- */
31
- declare const SelectionInput: React.ForwardRefExoticComponent<SelectionInputProps & React.RefAttributes<React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<import("react-native").View>>>>;
32
- export default SelectionInput;
27
+ declare const _default: React.NamedExoticComponent<SelectionInputProps>;
28
+ export default _default;
@@ -1,4 +1,5 @@
1
- import ExpandableTypography, { ExpandableTypographyProps } from './expandableTypography';
1
+ import type { ExpandableTypographyProps } from './expandableTypography';
2
+ import ExpandableTypography from './expandableTypography';
2
3
  import type { TypographyProps } from './typography';
3
4
  import Typography from './typography';
4
5
  export { ExpandableTypography, ExpandableTypographyProps, Typography, TypographyProps };
@@ -0,0 +1,2 @@
1
+ export declare const TRANSACTION_DATA_QUERY_KEY = "proof-detail";
2
+ export declare const useTransactionData: (proofId: string | undefined, transactionDataId: string | undefined) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").ProofTransactionData | undefined, unknown>;
@@ -1,5 +1,5 @@
1
1
  import { Claim, CoreConfig, CredentialDetail, CredentialListItem, CredentialSchemaListItem, PresentationDefinitionV2Credential } from '@procivis/react-native-one-core';
2
- import { CredentialAttribute, CredentialCardProps, CredentialDetailsCardProps, CredentialHeaderProps } from '../../ui-components/credential';
2
+ import { CredentialAttribute, CredentialCardProps, CredentialDetailsCardProps, CredentialHeaderProps, CredentialLogoProps } from '../../ui-components/credential';
3
3
  import { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';
4
4
  export declare enum ValidityState {
5
5
  Revoked = "revoked",
@@ -9,6 +9,7 @@ export declare enum ValidityState {
9
9
  export declare const getValidityState: (credential: CredentialListItem | undefined) => ValidityState;
10
10
  export declare const supportsSelectiveDisclosure: (credential: CredentialListItem | undefined, config: CoreConfig | undefined) => boolean | undefined;
11
11
  export declare const findClaimByPath: (path: string | undefined, claims: Claim[]) => Claim | undefined;
12
+ export declare const credentialLogoFromCredential: (credential: CredentialDetail, config: CoreConfig, testID: string, language: string | undefined) => Omit<CredentialLogoProps, 'size'>;
12
13
  export declare const hasMsoValidityIssues: (credential: CredentialDetail) => boolean;
13
14
  export type CardHeaderLabels = {
14
15
  validityIssues: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/one-react-native-components",
3
- "version": "0.3.143",
3
+ "version": "0.3.147",
4
4
  "author": "Procivis AG (https://procivis.ch)",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Common Procivis ONE UI components for react-native",
@@ -53,8 +53,9 @@
53
53
  "@babel/runtime": "^7.25.0",
54
54
  "@commitlint/config-conventional": "^11.0.0",
55
55
  "@gorhom/bottom-sheet": "^5.1.2",
56
- "@procivis/react-native-one-core": "1.114493.0",
56
+ "@procivis/react-native-one-core": "1.115564.0",
57
57
  "@procivis/react-native-picker": "5.0.3",
58
+ "@quidone/react-native-wheel-picker": "^1.7.0",
58
59
  "@react-native-async-storage/async-storage": "^1.17.3",
59
60
  "@react-native-community/blur": "^4.4.0",
60
61
  "@react-native-community/cli": "15.0.1",
@@ -142,8 +143,9 @@
142
143
  "vite": "^6.4.2"
143
144
  },
144
145
  "peerDependencies": {
145
- "@procivis/react-native-one-core": "^1.114493.0",
146
+ "@procivis/react-native-one-core": "^1.115439.0",
146
147
  "@procivis/react-native-picker": "*",
148
+ "@quidone/react-native-wheel-picker": "^1.7.0",
147
149
  "@react-native-community/blur": "*",
148
150
  "@react-native-community/netinfo": "^11.4.1",
149
151
  "@react-native/normalize-color": "*",
@@ -138,15 +138,18 @@ export const ShareCredentialV2Group: FC<ShareCredentialV2GroupProps> = ({
138
138
  ? {
139
139
  credentialId: credentialQuery.applicableCredentials[0].id,
140
140
  userSelections: [],
141
+ transactionDataIds: [],
141
142
  }
142
143
  : {
143
144
  credentialId: '',
144
145
  userSelections: [],
146
+ transactionDataIds: [],
145
147
  };
146
148
  } else {
147
149
  defaultSelection = {
148
150
  credentialId: '',
149
151
  userSelections: [],
152
+ transactionDataIds: [],
150
153
  };
151
154
  }
152
155
  const request = selectedCredentials[credentialRequestId];
@@ -3,9 +3,10 @@ import { AccessibilityProps, ColorValue, StyleProp, StyleSheet, View, ViewStyle
3
3
 
4
4
  import { concatTestID } from '../../../utils/testID';
5
5
  import BlurView from '../../blur/blur-view';
6
- import ImageOrComponent, { ImageOrComponentSource } from '../../image/image-or-component';
6
+ import { ImageOrComponentSource } from '../../image/image-or-component';
7
7
  import Typography, { TypographyProps } from '../../text/typography';
8
8
  import { useAppColorScheme } from '../../theme/color-scheme-context';
9
+ import CredentialLogo from './credential-logo';
9
10
 
10
11
  export interface CredentialHeaderProps extends AccessibilityProps {
11
12
  accessory?: React.ComponentType<any> | React.ReactElement;
@@ -104,23 +105,13 @@ const CredentialHeader: FC<CredentialHeaderProps> = ({
104
105
  return (
105
106
  <View style={[styles.container, { backgroundColor: blur ? undefined : colorScheme.white }, style]} testID={testID}>
106
107
  {blur && <BlurView blurStyle="strong" style={StyleSheet.absoluteFill} />}
107
- <View style={[styles.imageContainer, { backgroundColor: color }]}>
108
- {icon ? (
109
- <ImageOrComponent testID={concatTestID(testID, 'logoIcon')} source={icon} style={styles.image} />
110
- ) : (
111
- <View testID={concatTestID(testID, 'logoBackgroundColor', String(color))}>
112
- <View testID={concatTestID(testID, 'logoTextColor', String(iconLabelColor))}>
113
- <Typography
114
- testID={concatTestID(testID, 'logoName')}
115
- color={iconLabelColor}
116
- preset="m"
117
- style={styles.imagePlaceholder}>
118
- {credentialName.substring(0, 1)}
119
- </Typography>
120
- </View>
121
- </View>
122
- )}
123
- </View>
108
+ <CredentialLogo
109
+ color={color}
110
+ icon={icon}
111
+ iconLabelColor={iconLabelColor}
112
+ credentialName={credentialName}
113
+ testID={concatTestID(testID, 'logo')}
114
+ />
124
115
  {statusIconView && <View style={styles.statusIconWrapper}>{statusIconView}</View>}
125
116
  <View style={styles.text}>
126
117
  <Typography
@@ -160,25 +151,6 @@ const styles = StyleSheet.create({
160
151
  flexDirection: 'row',
161
152
  marginTop: -1,
162
153
  },
163
- image: {
164
- height: 44,
165
- width: 44,
166
- },
167
- imageContainer: {
168
- alignItems: 'center',
169
- borderRadius: 5,
170
- borderWidth: 0,
171
- height: 44,
172
- justifyContent: 'center',
173
- marginRight: 8,
174
- overflow: 'hidden',
175
- width: 44,
176
- },
177
- imagePlaceholder: {
178
- paddingLeft: 1,
179
- paddingTop: 3,
180
- textTransform: 'uppercase',
181
- },
182
154
  interpunct: {
183
155
  marginHorizontal: 12,
184
156
  opacity: 0.5,
@@ -0,0 +1,45 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+
3
+ import ColorSchemes from '../../../../storybook/colorScheme';
4
+ import CredentialLogo from './credential-logo';
5
+
6
+ const Basic: StoryObj<typeof CredentialLogo> = {
7
+ args: {
8
+ color: undefined,
9
+ credentialName: 'Credential Name',
10
+ icon: undefined,
11
+ iconLabelColor: undefined,
12
+ size: undefined,
13
+ },
14
+ };
15
+
16
+ export { Basic as CredentialLogo };
17
+
18
+ export default {
19
+ title: 'credential/card/CredentialLogo',
20
+ component: CredentialLogo,
21
+ argTypes: {
22
+ color: {
23
+ options: Object.entries(ColorSchemes.procivis)
24
+ .filter(([_, value]) => typeof value === 'string')
25
+ .map(([key]) => key),
26
+ control: { type: 'select' },
27
+ },
28
+ iconLabelColor: {
29
+ options: Object.entries(ColorSchemes.procivis)
30
+ .filter(([_, value]) => typeof value === 'string')
31
+ .map(([key]) => key),
32
+ control: { type: 'select' },
33
+ },
34
+ size: {
35
+ options: [44, 20],
36
+ control: { type: 'select' },
37
+ },
38
+ },
39
+ parameters: {
40
+ design: {
41
+ type: 'figma',
42
+ url: 'https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=401-1807&t=aYYyzt4OQQZxwjRu-0',
43
+ },
44
+ },
45
+ } as Meta<typeof CredentialLogo>;
@@ -0,0 +1,79 @@
1
+ import React, { FC } from 'react';
2
+ import { ColorValue, StyleSheet, View } from 'react-native';
3
+
4
+ import { concatTestID } from '../../../utils/testID';
5
+ import ImageOrComponent, { ImageOrComponentSource } from '../../image/image-or-component';
6
+ import Typography from '../../text/typography';
7
+
8
+ export enum CredentialLogoSize {
9
+ Regular = 44,
10
+ Small = 20,
11
+ }
12
+
13
+ export type CredentialLogoProps = {
14
+ color?: ColorValue;
15
+ credentialName: string;
16
+ icon?: ImageOrComponentSource;
17
+ iconLabelColor?: ColorValue;
18
+ size?: CredentialLogoSize;
19
+ testID?: string;
20
+ };
21
+
22
+ const CredentialLogo: FC<CredentialLogoProps> = ({
23
+ color = '#5A69F3',
24
+ credentialName,
25
+ icon,
26
+ iconLabelColor = '#FFFFFF',
27
+ size = CredentialLogoSize.Regular,
28
+ testID,
29
+ }) => {
30
+ const sizeStyle = {
31
+ height: size,
32
+ width: size,
33
+ };
34
+ return (
35
+ <View style={[styles.imageContainer, sizeStyle, { backgroundColor: color }]} testID={testID}>
36
+ {icon ? (
37
+ <ImageOrComponent testID={concatTestID(testID, 'icon')} source={icon} style={sizeStyle} />
38
+ ) : (
39
+ <View testID={concatTestID(testID, 'backgroundColor', String(color))}>
40
+ <View testID={concatTestID(testID, 'textColor', String(iconLabelColor))}>
41
+ <Typography
42
+ testID={concatTestID(testID, 'name')}
43
+ color={iconLabelColor}
44
+ preset={size === CredentialLogoSize.Regular ? 'm' : 'xs'}
45
+ style={[
46
+ styles.imagePlaceholder,
47
+ size === CredentialLogoSize.Regular ? styles.imagePlaceholderRegular : styles.imagePlaceholderSmall,
48
+ ]}>
49
+ {credentialName.substring(0, 1)}
50
+ </Typography>
51
+ </View>
52
+ </View>
53
+ )}
54
+ </View>
55
+ );
56
+ };
57
+
58
+ const styles = StyleSheet.create({
59
+ imageContainer: {
60
+ alignItems: 'center',
61
+ borderRadius: 5,
62
+ borderWidth: 0,
63
+ justifyContent: 'center',
64
+ marginRight: 8,
65
+ overflow: 'hidden',
66
+ },
67
+ imagePlaceholder: {
68
+ textTransform: 'uppercase',
69
+ },
70
+ imagePlaceholderRegular: {
71
+ paddingLeft: 1,
72
+ paddingTop: 3,
73
+ },
74
+ imagePlaceholderSmall: {
75
+ paddingTop: 1,
76
+ },
77
+ });
78
+
79
+ export default CredentialLogo;
@@ -1,11 +1,5 @@
1
- import type {
2
- CredentialCardNotice,
3
- CredentialCardProps,
4
- } from './credential-card';
5
- import CredentialCard, {
6
- CredentialCardRatio,
7
- CredentialCardShadow,
8
- } from './credential-card';
1
+ import type { CredentialCardNotice, CredentialCardProps } from './credential-card';
2
+ import CredentialCard, { CredentialCardRatio, CredentialCardShadow } from './credential-card';
9
3
  import type { CredentialDetailsCardProps } from './credential-details-card';
10
4
  import CredentialDetailsCard from './credential-details-card';
11
5
  import type { CredentialDetailsCardListItemProps } from './credential-details-list-item';
@@ -14,9 +8,12 @@ import type { CredentialHeaderProps } from './credential-header';
14
8
  import CredentialHeader from './credential-header';
15
9
  import type { CarouselImage } from './credential-image-carousel';
16
10
  import { CarouselImageType } from './credential-image-carousel';
11
+ import type { CredentialLogoProps, CredentialLogoSize } from './credential-logo';
12
+ import CredentialLogo from './credential-logo';
17
13
 
18
14
  export { CarouselImage, CarouselImageType };
19
15
  export { CredentialCard, CredentialCardNotice, CredentialCardProps, CredentialCardRatio, CredentialCardShadow };
20
16
  export { CredentialDetailsCard, CredentialDetailsCardProps };
21
17
  export { CredentialDetailsCardListItem, CredentialDetailsCardListItemProps };
22
18
  export { CredentialHeader, CredentialHeaderProps };
19
+ export { CredentialLogo, CredentialLogoProps, CredentialLogoSize };
@@ -1,11 +1,9 @@
1
- import Picker from '@procivis/react-native-picker';
2
- import React, { forwardRef, useCallback, useMemo, useState } from 'react';
3
- import type { TouchableOpacityProps } from 'react-native';
1
+ import WheelPicker from '@quidone/react-native-wheel-picker';
2
+ import React, { FC, memo, useCallback, useMemo, useState } from 'react';
3
+ import { Modal, StyleSheet, TouchableOpacityProps, View } from 'react-native';
4
4
 
5
- import { useForwardedRef } from '../../utils/ref';
6
- import { focusAccessibility } from '../accessibility/accessibility';
7
- import { TouchableOpacity, TouchableOpacityRef } from '../accessibility/accessibilityHistoryWrappers';
8
- import { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';
5
+ import { Typography } from '..';
6
+ import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
9
7
  import { useAppColorScheme } from '../theme';
10
8
  import TextInput, { TextInputAccessory } from './text-input';
11
9
 
@@ -28,12 +26,10 @@ export interface SelectionInputProps extends TouchableOpacityProps {
28
26
  */
29
27
  onChange?: (value: SelectionInputChoice) => boolean;
30
28
  pickerCancelLabel: string;
31
-
32
29
  pickerConfirmLabel: string;
33
30
  pickerTitle?: string;
34
31
  /** {@link SelectionInputChoice.label} of the selected choice */
35
32
  selectedValue?: string | number;
36
-
37
33
  values: SelectionInputChoice[];
38
34
  }
39
35
 
@@ -41,72 +37,96 @@ export interface SelectionInputProps extends TouchableOpacityProps {
41
37
  * Generic selection input component
42
38
  * @see https://www.figma.com/file/Gd0Tj0234hxtl3HMcCJThW/App-Component-Library-(Design)?node-id=4%3A127&t=B2Y3PtJHH22XDPkx-0
43
39
  */
44
- const SelectionInput = forwardRef<TouchableOpacityRef, SelectionInputProps>(
45
- (
46
- { selectedValue, values, label, pickerTitle, pickerConfirmLabel, pickerCancelLabel, onChange, error, ...props },
47
- ref,
48
- ) => {
49
- const t = useAccessibilityTranslation();
50
- const colorScheme = useAppColorScheme();
51
- const selectedChoice = useMemo(
52
- () => (selectedValue !== undefined ? values.find(({ value }) => value === selectedValue) : undefined),
53
- [selectedValue, values],
54
- );
55
40
 
56
- const [forwardedRef, refObject] = useForwardedRef(ref);
57
- const [pickerOpen, setPickerOpen] = useState(false);
41
+ const SelectionInput: FC<SelectionInputProps> = ({
42
+ selectedValue,
43
+ label,
44
+ values,
45
+ pickerCancelLabel,
46
+ pickerConfirmLabel,
47
+ onChange,
48
+ ...props
49
+ }) => {
50
+ const [modalVisible, setModalVisible] = useState(false);
51
+ const [wheelPickerValue, setWheelPickerValue] = useState(selectedValue);
52
+ const colorScheme = useAppColorScheme();
53
+
54
+ const selectedChoice = useMemo(
55
+ () => (selectedValue !== undefined ? values.find(({ value }) => value === selectedValue) : undefined),
56
+ [selectedValue, values],
57
+ );
58
+
59
+ const onCancel = useCallback(() => {
60
+ setModalVisible(false);
61
+ }, []);
62
+
63
+ const onConfirm = useCallback(() => {
64
+ const choice = values.find(({ value }) => value === wheelPickerValue);
65
+ if (choice && onChange) {
66
+ onChange(choice);
67
+ }
58
68
 
59
- const onOpen = useCallback(() => setPickerOpen(true), []);
60
- const onConfirm = useCallback(
61
- (valueLabel: any) => {
62
- setPickerOpen(false);
63
- const choice = values.find(({ label: choiceLabel }) => choiceLabel === valueLabel);
64
- if (!choice || !onChange?.(choice)) {
65
- setTimeout(() => focusAccessibility(refObject.current), 200);
66
- }
67
- },
68
- [onChange, refObject, values],
69
- );
70
- const onCancel = useCallback(() => {
71
- setPickerOpen(false);
72
- requestAnimationFrame(() => focusAccessibility(refObject.current));
73
- }, [refObject]);
69
+ setModalVisible(false);
70
+ }, [onChange, values, wheelPickerValue]);
74
71
 
75
- const accessibilityLabel = error ? `${label}, ${error}` : label;
76
- return (
77
- <TouchableOpacity
78
- accessibilityHint={t('accessibility.control.combobox.tapToSelect')}
79
- accessibilityLabel={accessibilityLabel}
80
- accessibilityRole="combobox"
81
- accessibilityValue={{ text: selectedChoice?.label }}
82
- onPress={onOpen}
83
- ref={forwardedRef}
84
- {...props}>
72
+ return (
73
+ <>
74
+ <TouchableOpacity onPress={() => setModalVisible(true)} {...props}>
85
75
  <TextInput
86
76
  accessory={TextInputAccessory.Dropdown}
87
77
  disabled={true}
88
- error={error}
89
78
  label={label}
90
79
  pointerEvents="none"
91
80
  value={selectedChoice?.shortLabel ?? selectedChoice?.label}
92
81
  />
93
- <Picker
94
- cancelText={pickerCancelLabel}
95
- confirmText={pickerConfirmLabel}
96
- items={values.map(({ label: itemLabel }) => itemLabel)}
97
- modal
98
- mode="list"
99
- onCancel={onCancel}
100
- onConfirm={onConfirm}
101
- open={pickerOpen}
102
- selectedValue={selectedChoice?.label}
103
- textColor={colorScheme.text}
104
- title={pickerTitle ?? label}
105
- />
106
82
  </TouchableOpacity>
107
- );
83
+ <Modal
84
+ animationType="fade"
85
+ backdropColor={'rgba(0,0,0,0.1)'}
86
+ onDismiss={() => setModalVisible(false)}
87
+ onRequestClose={onCancel}
88
+ style={styles.modal}
89
+ visible={modalVisible}>
90
+ <View style={styles.modalContent}>
91
+ <WheelPicker
92
+ data={values}
93
+ onValueChanged={({ item: { value } }: { item: { value?: string | number } }) => setWheelPickerValue(value)}
94
+ value={wheelPickerValue || ''}
95
+ visibleItemCount={5}
96
+ />
97
+ <View style={styles.buttons}>
98
+ <TouchableOpacity onPress={onCancel}>
99
+ <Typography color={colorScheme.black} preset="s">
100
+ {pickerCancelLabel}
101
+ </Typography>
102
+ </TouchableOpacity>
103
+ <TouchableOpacity onPress={onConfirm}>
104
+ <Typography color={colorScheme.black} preset="s">
105
+ {pickerConfirmLabel}
106
+ </Typography>
107
+ </TouchableOpacity>
108
+ </View>
109
+ </View>
110
+ </Modal>
111
+ </>
112
+ );
113
+ };
114
+
115
+ const styles = StyleSheet.create({
116
+ buttons: {
117
+ flexDirection: 'row',
118
+ gap: 20,
119
+ justifyContent: 'flex-end',
120
+ },
121
+
122
+ modal: {},
123
+ modalContent: {
124
+ backgroundColor: 'white',
125
+ borderRadius: 2,
126
+ margin: 'auto',
127
+ padding: 20,
128
+ width: '80%',
108
129
  },
109
- );
130
+ });
110
131
 
111
- SelectionInput.displayName = 'SelectionInput';
112
- export default SelectionInput;
132
+ export default memo(SelectionInput);
@@ -1,4 +1,5 @@
1
- import ExpandableTypography, { ExpandableTypographyProps } from './expandableTypography';
1
+ import type { ExpandableTypographyProps } from './expandableTypography';
2
+ import ExpandableTypography from './expandableTypography';
2
3
  import type { TypographyProps } from './typography';
3
4
  import Typography from './typography';
4
5
 
@@ -0,0 +1,18 @@
1
+ import { useQuery } from 'react-query';
2
+
3
+ import { useONECore } from './core-context';
4
+
5
+ export const TRANSACTION_DATA_QUERY_KEY = 'proof-detail';
6
+
7
+ export const useTransactionData = (proofId: string | undefined, transactionDataId: string | undefined) => {
8
+ const { core } = useONECore();
9
+
10
+ return useQuery(
11
+ [TRANSACTION_DATA_QUERY_KEY, proofId],
12
+ () => (proofId && transactionDataId ? core.holderGetTransactionData(proofId, transactionDataId) : undefined),
13
+ {
14
+ enabled: Boolean(proofId && transactionDataId),
15
+ keepPreviousData: true,
16
+ },
17
+ );
18
+ };