@procivis/one-react-native-components 0.3.130 → 0.3.132

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 (54) hide show
  1. package/lib/commonjs/components/history/history-list-item-icon.js +1 -0
  2. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
  3. package/lib/commonjs/components/history/history-list-item.js +3 -4
  4. package/lib/commonjs/components/history/history-list-item.js.map +1 -1
  5. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +3 -1
  6. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
  7. package/lib/commonjs/ui-components/history/history-section-list-item.js +2 -2
  8. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  9. package/lib/commonjs/ui-components/history/index.js +0 -8
  10. package/lib/commonjs/ui-components/history/index.js.map +1 -1
  11. package/lib/commonjs/ui-components/list/index.js +8 -0
  12. package/lib/commonjs/ui-components/list/index.js.map +1 -1
  13. package/lib/commonjs/ui-components/{history/history-item.js → list/list-item.js} +32 -22
  14. package/lib/commonjs/ui-components/list/list-item.js.map +1 -0
  15. package/lib/commonjs/utils/parsers/credential-sharing-v2.js +9 -4
  16. package/lib/commonjs/utils/parsers/credential-sharing-v2.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/history/history-list-item-icon.js +1 -0
  20. package/lib/module/components/history/history-list-item-icon.js.map +1 -1
  21. package/lib/module/components/history/history-list-item.js +4 -5
  22. package/lib/module/components/history/history-list-item.js.map +1 -1
  23. package/lib/module/components/proof-request/v2/share-credential-v2.js +3 -1
  24. package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
  25. package/lib/module/ui-components/history/history-section-list-item.js +2 -2
  26. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  27. package/lib/module/ui-components/history/index.js +0 -2
  28. package/lib/module/ui-components/history/index.js.map +1 -1
  29. package/lib/module/ui-components/list/index.js +2 -0
  30. package/lib/module/ui-components/list/index.js.map +1 -1
  31. package/lib/module/ui-components/{history/history-item.js → list/list-item.js} +32 -22
  32. package/lib/module/ui-components/list/list-item.js.map +1 -0
  33. package/lib/module/utils/parsers/credential-sharing-v2.js +9 -4
  34. package/lib/module/utils/parsers/credential-sharing-v2.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/history/history-section-list-item.d.ts +2 -2
  38. package/lib/typescript/ui-components/history/index.d.ts +0 -3
  39. package/lib/typescript/ui-components/list/index.d.ts +3 -0
  40. package/lib/typescript/ui-components/{history/history-item.d.ts → list/list-item.d.ts} +4 -4
  41. package/lib/typescript/utils/hooks/core/credentials.d.ts +1 -1
  42. package/lib/typescript/utils/parsers/query.d.ts +1 -1
  43. package/package.json +3 -3
  44. package/src/components/history/history-list-item-icon.tsx +1 -0
  45. package/src/components/history/history-list-item.tsx +3 -3
  46. package/src/components/proof-request/v2/share-credential-v2.tsx +2 -0
  47. package/src/ui-components/history/history-section-list-item.tsx +3 -3
  48. package/src/ui-components/history/index.ts +0 -3
  49. package/src/ui-components/list/index.ts +3 -0
  50. package/src/ui-components/{history/history-item.tsx → list/list-item.tsx} +36 -33
  51. package/src/utils/parsers/credential-sharing-v2.tsx +5 -2
  52. package/src/utils/parsers/query.ts +2 -0
  53. package/lib/commonjs/ui-components/history/history-item.js.map +0 -1
  54. package/lib/module/ui-components/history/history-item.js.map +0 -1
@@ -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 ]);\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 'schemaId',\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":"AAcU;;AAEV;AACA,SAASA,WAAWA,CAClBC,WAAsB,EACtBC,MAAiB,EACe;EAChC,OAAOA,MAAM,CAACC,GAAG,CAAEC,KAAK,IAAKH,WAAW,CAACG,KAAK,CAAC,CAAC;AAClD;AAEA,OAAO,MAAMC,wCAAwC,GAAGA,CAACJ,WAAyC,GAAG,CAAC,CAAC,KAAK;EAC1G,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,eAAe,EACf,OAAO,EACP,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,CACvB,CAAC;AACJ,CAAC;AAED,OAAO,MAAMK,qCAAqC,GAAGA,CAACL,WAAsC,GAAG,CAAC,CAAC,KAAK;EACpG,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,eAAe,EACf,QAAQ,EACR,OAAO,CACR,CAAC;AACJ,CAAC;AAED,OAAO,MAAMM,8CAA8C,GAAGA,CAC5DN,WAA+C,GAAG,CAAC,CAAC,KACjD;EACH,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,M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,CAAC,KAAK;EAC1G,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,MAAM,EACN,eAAe,EACf,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,UAAU,EACV,eAAe,EACf,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACvB,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,CACrB,CAAC;AACJ,CAAC","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 ]);\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 'schemaId',\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":"AAcU;;AAEV;AACA,SAASA,WAAWA,CAClBC,WAAsB,EACtBC,MAAiB,EACe;EAChC,OAAOA,MAAM,CAACC,GAAG,CAAEC,KAAK,IAAKH,WAAW,CAACG,KAAK,CAAC,CAAC;AAClD;AAEA,OAAO,MAAMC,wCAAwC,GAAGA,CAACJ,WAAyC,GAAG,CAAC,CAAC,KAAK;EAC1G,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,eAAe,EACf,OAAO,EACP,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,EACT,UAAU,EACV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AAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,eAAe,EACf,MAAM,EACN,KAAK,EACL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,CACtB,CAAC;AACJ,CAAC;AAED,OAAO,MAAMS,iCAAiC,GAAGA,CAACT,WAAkC,GAAG,CAAC,CAAC,KAAK;EAC5F,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,eAAe,EACf,MAAM,EACN,KAAK,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,eAAe,EACf,UAAU,EACV,aAAa,EACb,QAAQ,EACR,YAAY,CACb,CAAC;AACJ,CAAC;AAED,OAAO,MAAMU,wCAAwC,GAAGA,CAACV,WAAyC,GAAG,CAAC,CAAC,KAAK;EAC1G,OAAOD,WAAW,CAACC,WAAW,EAAE,CAC9B,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,MAAM,EACN,eAAe,EACf,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,UAAU,EACV,eAAe,EACf,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACvB,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,CACrB,CAAC;AACJ,CAAC","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
- import { HistoryItemViewProps } from './history-item';
3
- export interface HistorySectionListItemProps extends HistoryItemViewProps {
2
+ import { ListItemViewProps } from '../list/list-item';
3
+ export interface HistorySectionListItemProps extends ListItemViewProps {
4
4
  first?: boolean;
5
5
  }
6
6
  declare const HistorySectionListItem: FC<HistorySectionListItemProps>;
@@ -1,12 +1,9 @@
1
1
  import type { DataItemProps } from './data-item';
2
2
  import DataItem from './data-item';
3
- import type { HistoryItemViewProps } from './history-item';
4
- import HistoryItemView from './history-item';
5
3
  import HistorySectionHeaderView from './history-section-header';
6
4
  import type { HistorySectionListItemProps } from './history-section-list-item';
7
5
  import HistorySectionListItem from './history-section-list-item';
8
6
  export * from './history-details';
9
7
  export { DataItem, DataItemProps };
10
- export { HistoryItemView, HistoryItemViewProps };
11
8
  export { HistorySectionHeaderView };
12
9
  export { HistorySectionListItem, HistorySectionListItemProps };
@@ -1,7 +1,10 @@
1
+ import type { ListItemViewProps } from './list-item';
2
+ import ListItemView from './list-item';
1
3
  import type { ListSectionHeaderProps } from './list-section-header';
2
4
  import ListSectionHeader from './list-section-header';
3
5
  import type { ListTitleHeaderProps } from './list-title-header';
4
6
  import ListTitleHeader from './list-title-header';
7
+ export { ListItemView, ListItemViewProps };
5
8
  export { ListSectionHeader, ListSectionHeaderProps };
6
9
  export { ListTitleHeader, ListTitleHeaderProps };
7
10
  export * from './wallet';
@@ -1,6 +1,7 @@
1
1
  import { ComponentType, FC, ReactElement } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
- export type HistoryItemViewProps = {
3
+ export type ListItemViewProps = {
4
+ accessory?: string | ComponentType<any> | ReactElement;
4
5
  first?: boolean;
5
6
  icon: ComponentType<any> | ReactElement;
6
7
  info?: string;
@@ -9,7 +10,6 @@ export type HistoryItemViewProps = {
9
10
  onPress?: () => void;
10
11
  style?: StyleProp<ViewStyle>;
11
12
  testID?: string;
12
- time: string;
13
13
  };
14
- declare const HistoryItemView: FC<HistoryItemViewProps>;
15
- export default HistoryItemView;
14
+ declare const ListItemView: FC<ListItemViewProps>;
15
+ export default ListItemView;
@@ -7,7 +7,7 @@ export declare const useCredentials: (queryParams?: Partial<CredentialListQuery>
7
7
  export declare const usePagedCredentials: (queryParams?: Partial<CredentialListQuery>) => import("react-query").UseInfiniteQueryResult<import("@procivis/react-native-one-core").CredentialList, unknown>;
8
8
  export declare const useCredentialDetail: (credentialId: string | undefined, active?: boolean) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").CredentialDetail | undefined, unknown>;
9
9
  export declare const useInvitationHandler: () => import("react-query").UseMutationResult<HandleInvitationResponse, unknown, Omit<HandleInvitationRequest, "organisationId">, unknown>;
10
- export declare const useCredentialAccept: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").HolderAcceptCredentialResponse, unknown, HolderAcceptCredentialRequest, unknown>;
10
+ export declare const useCredentialAccept: () => import("react-query").UseMutationResult<string, unknown, HolderAcceptCredentialRequest, unknown>;
11
11
  export declare const useCredentialReject: () => import("react-query").UseMutationResult<void, unknown, string, unknown>;
12
12
  export declare const useCredentialRevocationCheck: (forceRefresh: boolean) => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").CredentialRevocationCheckResponse[], unknown, string[], unknown>;
13
13
  export declare const useCredentialDelete: () => import("react-query").UseMutationResult<void, unknown, string, unknown>;
@@ -1,5 +1,5 @@
1
1
  import { CredentialListQuery, CredentialSchemaListQuery, DidListQuery, HistoryListQuery, IdentifierListQuery, ProofListQuery, ProofSchemaListQuery } from '@procivis/react-native-one-core';
2
- export declare const getQueryKeyFromCredentialListQueryParams: (queryParams?: Partial<CredentialListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").CredentialListQuerySearchType[] | import("@procivis/react-native-one-core").CredentialListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialRole[] | import("@procivis/react-native-one-core").CredentialState[] | import("@procivis/react-native-one-core").CredentialListIncludeEntityType[] | undefined)[];
2
+ export declare const getQueryKeyFromCredentialListQueryParams: (queryParams?: Partial<CredentialListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").CredentialListQuerySearchType[] | import("@procivis/react-native-one-core").CredentialListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialRole[] | import("@procivis/react-native-one-core").CredentialState[] | import("@procivis/react-native-one-core").CredentialType[] | import("@procivis/react-native-one-core").CredentialListIncludeEntityType[] | undefined)[];
3
3
  export declare const getQueryKeyFromHistoryListQueryParams: (queryParams?: Partial<HistoryListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").HistorySearch | import("@procivis/react-native-one-core").HistoryEntityType[] | import("@procivis/react-native-one-core").HistoryAction[] | undefined)[];
4
4
  export declare const getQueryKeyFromCredentialSchemaListQueryParams: (queryParams?: Partial<CredentialSchemaListQuery>) => (string | number | boolean | string[] | import("@procivis/react-native-one-core").CredentialSchemaListQueryExactColumn[] | import("@procivis/react-native-one-core").CredentialSchemaListIncludeEntityType[] | undefined)[];
5
5
  export declare const getQueryKeyFromProofSchemaListQueryParams: (queryParams?: Partial<ProofSchemaListQuery>) => (string | number | string[] | import("@procivis/react-native-one-core").ProofSchemaListQueryExactColumn[] | undefined)[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/one-react-native-components",
3
- "version": "0.3.130",
3
+ "version": "0.3.132",
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,7 +53,7 @@
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.106597.0",
56
+ "@procivis/react-native-one-core": "1.108225.0",
57
57
  "@procivis/react-native-picker": "5.0.3",
58
58
  "@react-native-async-storage/async-storage": "^1.17.3",
59
59
  "@react-native-community/blur": "^4.4.0",
@@ -142,7 +142,7 @@
142
142
  "vite": "^6.4.2"
143
143
  },
144
144
  "peerDependencies": {
145
- "@procivis/react-native-one-core": "^1.106597.0",
145
+ "@procivis/react-native-one-core": "^1.108225.0",
146
146
  "@procivis/react-native-picker": "*",
147
147
  "@react-native-community/blur": "*",
148
148
  "@react-native-community/netinfo": "^11.4.1",
@@ -42,6 +42,7 @@ const defaultIcons: {
42
42
  OFFERED: HistoryStatusAcceptedIcon,
43
43
  PENDING: HistoryStatusAcceptedIcon,
44
44
  REJECTED: HistoryStatusErrorIcon,
45
+ REFRESHED: HistoryStatusAcceptedIcon,
45
46
  REMOVED: HistoryStatusDeleteIcon,
46
47
  REQUESTED: HistoryStatusAcceptedIcon,
47
48
  RESTORED: HistoryStatusAcceptedIcon,
@@ -1,7 +1,7 @@
1
1
  import { HistoryAction, HistoryEntityType, HistoryListItem } from '@procivis/react-native-one-core';
2
2
  import React, { FC, useCallback, useMemo } from 'react';
3
3
 
4
- import { HistoryItemView } from '../../ui-components';
4
+ import { ListItemView } from '../../ui-components';
5
5
  import { formatTime } from '../../utils';
6
6
  import { HistoryListItemIcon } from './history-list-item-icon';
7
7
 
@@ -49,7 +49,8 @@ export const HistoryListItemView: FC<HistoryListItemViewProps> = ({
49
49
  }, [onPress, item]);
50
50
 
51
51
  return (
52
- <HistoryItemView
52
+ <ListItemView
53
+ accessory={dateFormatter(new Date(item.createdDate))}
53
54
  first={first}
54
55
  icon={icon}
55
56
  info={info}
@@ -57,7 +58,6 @@ export const HistoryListItemView: FC<HistoryListItemViewProps> = ({
57
58
  last={last}
58
59
  onPress={pressHandler}
59
60
  testID={testID}
60
- time={dateFormatter(new Date(item.createdDate)) ?? ''}
61
61
  />
62
62
  );
63
63
  };
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  ApplicableCredentialOrFailureHint,
3
3
  CredentialListItem,
4
+ CredentialType,
4
5
  PresentationDefinitionV2Claim,
5
6
  } from '@procivis/react-native-one-core';
6
7
  import React, { FunctionComponent, useCallback, useMemo } from 'react';
@@ -75,6 +76,7 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
75
76
  ? {
76
77
  ...credential,
77
78
  issuer: credential?.issuer?.id,
79
+ type: CredentialType.SINGLE,
78
80
  }
79
81
  : undefined,
80
82
  );
@@ -1,13 +1,13 @@
1
1
  import React, { FC } from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
3
 
4
+ import ListItemView, { ListItemViewProps } from '../list/list-item';
4
5
  import { useAppColorScheme } from '../theme/color-scheme-context';
5
- import HistoryItemView, { HistoryItemViewProps } from './history-item';
6
6
 
7
7
  // component used on the history section lists (Settings->History, CredentialDetail->History)
8
8
  // https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev
9
9
 
10
- export interface HistorySectionListItemProps extends HistoryItemViewProps {
10
+ export interface HistorySectionListItemProps extends ListItemViewProps {
11
11
  first?: boolean;
12
12
  }
13
13
 
@@ -15,7 +15,7 @@ const HistorySectionListItem: FC<HistorySectionListItemProps> = ({ first, last,
15
15
  const colorScheme = useAppColorScheme();
16
16
  return (
17
17
  <View style={[styles.item, first && styles.first, last && styles.last, { backgroundColor: colorScheme.white }]}>
18
- <HistoryItemView last={last} {...props} />
18
+ <ListItemView last={last} {...props} />
19
19
  </View>
20
20
  );
21
21
  };
@@ -1,13 +1,10 @@
1
1
  import type { DataItemProps } from './data-item';
2
2
  import DataItem from './data-item';
3
- import type { HistoryItemViewProps } from './history-item';
4
- import HistoryItemView from './history-item';
5
3
  import HistorySectionHeaderView from './history-section-header';
6
4
  import type { HistorySectionListItemProps } from './history-section-list-item';
7
5
  import HistorySectionListItem from './history-section-list-item';
8
6
 
9
7
  export * from './history-details';
10
8
  export { DataItem, DataItemProps };
11
- export { HistoryItemView, HistoryItemViewProps };
12
9
  export { HistorySectionHeaderView };
13
10
  export { HistorySectionListItem, HistorySectionListItemProps };
@@ -1,8 +1,11 @@
1
+ import type { ListItemViewProps } from './list-item';
2
+ import ListItemView from './list-item';
1
3
  import type { ListSectionHeaderProps } from './list-section-header';
2
4
  import ListSectionHeader from './list-section-header';
3
5
  import type { ListTitleHeaderProps } from './list-title-header';
4
6
  import ListTitleHeader from './list-title-header';
5
7
 
8
+ export { ListItemView, ListItemViewProps };
6
9
  export { ListSectionHeader, ListSectionHeaderProps };
7
10
  export { ListTitleHeader, ListTitleHeaderProps };
8
11
  export * from './wallet';
@@ -6,7 +6,8 @@ import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers'
6
6
  import Typography from '../text/typography';
7
7
  import { useAppColorScheme } from '../theme/color-scheme-context';
8
8
 
9
- export type HistoryItemViewProps = {
9
+ export type ListItemViewProps = {
10
+ accessory?: string | ComponentType<any> | ReactElement;
10
11
  first?: boolean;
11
12
  icon: ComponentType<any> | ReactElement;
12
13
  info?: string;
@@ -15,22 +16,31 @@ export type HistoryItemViewProps = {
15
16
  onPress?: () => void;
16
17
  style?: StyleProp<ViewStyle>;
17
18
  testID?: string;
18
- time: string;
19
19
  };
20
20
 
21
- const HistoryItemView: FC<HistoryItemViewProps> = ({
22
- first,
23
- icon,
24
- label,
25
- info,
26
- last,
27
- style,
28
- time,
29
- onPress,
30
- testID,
31
- }) => {
21
+ const ListItemView: FC<ListItemViewProps> = ({ accessory, first, icon, label, info, last, style, onPress, testID }) => {
32
22
  const colorScheme = useAppColorScheme();
33
23
 
24
+ const accessoryView: ReactElement | undefined = useMemo(() => {
25
+ if (typeof accessory === 'string') {
26
+ return (
27
+ <Typography
28
+ color={colorScheme.text}
29
+ numberOfLines={1}
30
+ preset="xs/line-height-small"
31
+ style={styles.time}
32
+ testID={concatTestID(testID, 'timeLabel')}>
33
+ {accessory}
34
+ </Typography>
35
+ );
36
+ } else if (React.isValidElement(accessory)) {
37
+ return accessory;
38
+ } else if (accessory) {
39
+ const AccessoryComponent = accessory as ComponentType<any>;
40
+ return <AccessoryComponent />;
41
+ }
42
+ }, [accessory, colorScheme.text, testID]);
43
+
34
44
  const iconView: ReactElement | undefined = useMemo(() => {
35
45
  if (React.isValidElement(icon)) {
36
46
  return icon;
@@ -45,7 +55,7 @@ const HistoryItemView: FC<HistoryItemViewProps> = ({
45
55
  disabled={!onPress}
46
56
  onPress={() => onPress?.()}
47
57
  style={[
48
- styles.historyItemContainer,
58
+ styles.listItemContainer,
49
59
  {
50
60
  backgroundColor: colorScheme.white,
51
61
  },
@@ -56,7 +66,7 @@ const HistoryItemView: FC<HistoryItemViewProps> = ({
56
66
  testID={testID}>
57
67
  <View
58
68
  style={[
59
- styles.historyItemWrapper,
69
+ styles.listItemWrapper,
60
70
  {
61
71
  backgroundColor: colorScheme.white,
62
72
  borderColor: colorScheme.background,
@@ -84,14 +94,7 @@ const HistoryItemView: FC<HistoryItemViewProps> = ({
84
94
  </Typography>
85
95
  )}
86
96
  </View>
87
- <Typography
88
- color={colorScheme.text}
89
- numberOfLines={1}
90
- preset="xs/line-height-small"
91
- style={styles.time}
92
- testID={concatTestID(testID, 'timeLabel')}>
93
- {time}
94
- </Typography>
97
+ {accessoryView}
95
98
  </View>
96
99
  </TouchableOpacity>
97
100
  );
@@ -110,15 +113,6 @@ const styles = StyleSheet.create({
110
113
  marginBottom: 12,
111
114
  paddingBottom: 12,
112
115
  },
113
- historyItemContainer: {
114
- paddingHorizontal: 12,
115
- },
116
- historyItemWrapper: {
117
- alignItems: 'center',
118
- borderBottomWidth: 1,
119
- flexDirection: 'row',
120
- paddingVertical: 12,
121
- },
122
116
  label: {
123
117
  marginBottom: 2,
124
118
  },
@@ -126,6 +120,15 @@ const styles = StyleSheet.create({
126
120
  flex: 1,
127
121
  marginHorizontal: 12,
128
122
  },
123
+ listItemContainer: {
124
+ paddingHorizontal: 12,
125
+ },
126
+ listItemWrapper: {
127
+ alignItems: 'center',
128
+ borderBottomWidth: 1,
129
+ flexDirection: 'row',
130
+ paddingVertical: 12,
131
+ },
129
132
  shaded: {
130
133
  opacity: 0.7,
131
134
  },
@@ -138,4 +141,4 @@ const styles = StyleSheet.create({
138
141
  },
139
142
  });
140
143
 
141
- export default HistoryItemView;
144
+ export default ListItemView;
@@ -3,6 +3,7 @@ import {
3
3
  ClaimValue,
4
4
  CoreConfig,
5
5
  CredentialQueryFailureHint,
6
+ CredentialType,
6
7
  PresentationDefinitionV2Claim,
7
8
  PresentationDefinitionV2ClaimValue,
8
9
  PresentationDefinitionV2Credential,
@@ -178,7 +179,7 @@ export const shareCredentialCardFromV2PresentationCredential = (
178
179
  language: string | undefined,
179
180
  ): CredentialDetailsCardPropsWithoutWidth => {
180
181
  const selectiveDisclosureSupported = supportsSelectiveDisclosure(
181
- credential ? { ...credential, issuer: credential.issuer?.id } : undefined,
182
+ credential ? { ...credential, issuer: credential.issuer?.id, type: CredentialType.SINGLE } : undefined,
182
183
  config,
183
184
  );
184
185
  const notice: CredentialCardNotice | undefined = purpose
@@ -193,6 +194,7 @@ export const shareCredentialCardFromV2PresentationCredential = (
193
194
  {
194
195
  ...credential,
195
196
  claims: [],
197
+ type: CredentialType.SINGLE,
196
198
  },
197
199
  expanded,
198
200
  selectiveDisclosureSupported,
@@ -224,7 +226,7 @@ export const selectCredentialCardFromV2Credential = (
224
226
  language: string | undefined,
225
227
  ): CredentialDetailsCardPropsWithoutWidth => {
226
228
  const selectiveDisclosureSupported = supportsSelectiveDisclosure(
227
- credential ? { ...credential, issuer: credential.issuer?.id } : undefined,
229
+ credential ? { ...credential, issuer: credential.issuer?.id, type: CredentialType.SINGLE } : undefined,
228
230
  config,
229
231
  );
230
232
  const selectedStatus = multiple ? SelectorStatus.SelectedCheckmark : SelectorStatus.SelectedRadio;
@@ -240,6 +242,7 @@ export const selectCredentialCardFromV2Credential = (
240
242
  {
241
243
  ...credential,
242
244
  claims: credential.claims.map(v2PresentationClaimToClaim),
245
+ type: CredentialType.SINGLE,
243
246
  },
244
247
  credential.claims.map(v2PresentationClaimToClaim),
245
248
  config,
@@ -47,6 +47,8 @@ export const getQueryKeyFromCredentialListQueryParams = (queryParams: Partial<Cr
47
47
  'issuanceDateBefore',
48
48
  'revocationDateAfter',
49
49
  'revocationDateBefore',
50
+ 'types',
51
+ 'parentId',
50
52
  ]);
51
53
  };
52
54
 
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_testID","_accessibilityHistoryWrappers","_typography","_interopRequireDefault","_colorSchemeContext","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","HistoryItemView","first","icon","label","info","last","style","time","onPress","testID","colorScheme","useAppColorScheme","iconView","useMemo","React","isValidElement","IconComponent","createElement","TouchableOpacity","disabled","styles","historyItemContainer","backgroundColor","white","containerFirst","containerLast","View","historyItemWrapper","borderColor","background","wrapperLast","labelAndInfo","color","text","numberOfLines","preset","concatTestID","Boolean","shaded","StyleSheet","create","borderTopLeftRadius","borderTopRightRadius","marginTop","paddingTop","borderBottomLeftRadius","borderBottomRightRadius","marginBottom","paddingBottom","paddingHorizontal","alignItems","borderBottomWidth","flexDirection","paddingVertical","flex","marginHorizontal","opacity","marginRight","_default","exports"],"sources":["history-item.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactElement, useMemo } from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type HistoryItemViewProps = {\n first?: boolean;\n icon: ComponentType<any> | ReactElement;\n info?: string;\n label: string;\n last?: boolean;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n time: string;\n};\n\nconst HistoryItemView: FC<HistoryItemViewProps> = ({\n first,\n icon,\n label,\n info,\n last,\n style,\n time,\n onPress,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const iconView: ReactElement | undefined = useMemo(() => {\n if (React.isValidElement(icon)) {\n return icon;\n } else if (icon) {\n const IconComponent = icon as ComponentType<any>;\n return <IconComponent />;\n }\n }, [icon]);\n\n return (\n <TouchableOpacity\n disabled={!onPress}\n onPress={() => onPress?.()}\n style={[\n styles.historyItemContainer,\n {\n backgroundColor: colorScheme.white,\n },\n first && styles.containerFirst,\n last && styles.containerLast,\n style,\n ]}\n testID={testID}>\n <View\n style={[\n styles.historyItemWrapper,\n {\n backgroundColor: colorScheme.white,\n borderColor: colorScheme.background,\n },\n last && styles.wrapperLast,\n ]}>\n {iconView}\n <View style={styles.labelAndInfo}>\n <Typography\n color={colorScheme.text}\n numberOfLines={1}\n preset=\"s\"\n style={styles.label}\n testID={concatTestID(testID, 'label')}>\n {label}\n </Typography>\n {Boolean(info) && (\n <Typography\n color={colorScheme.text}\n numberOfLines={1}\n preset=\"s/line-height-small\"\n style={styles.shaded}\n testID={concatTestID(testID, 'info')}>\n {info}\n </Typography>\n )}\n </View>\n <Typography\n color={colorScheme.text}\n numberOfLines={1}\n preset=\"xs/line-height-small\"\n style={styles.time}\n testID={concatTestID(testID, 'timeLabel')}>\n {time}\n </Typography>\n </View>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n containerFirst: {\n borderTopLeftRadius: 20,\n borderTopRightRadius: 20,\n marginTop: 8,\n paddingTop: 12,\n },\n containerLast: {\n borderBottomLeftRadius: 20,\n borderBottomRightRadius: 20,\n marginBottom: 12,\n paddingBottom: 12,\n },\n historyItemContainer: {\n paddingHorizontal: 12,\n },\n historyItemWrapper: {\n alignItems: 'center',\n borderBottomWidth: 1,\n flexDirection: 'row',\n paddingVertical: 12,\n },\n label: {\n marginBottom: 2,\n },\n labelAndInfo: {\n flex: 1,\n marginHorizontal: 12,\n },\n shaded: {\n opacity: 0.7,\n },\n time: {\n marginRight: 8,\n opacity: 0.7,\n },\n wrapperLast: {\n borderBottomWidth: 0,\n },\n});\n\nexport default HistoryItemView;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,6BAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OA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AAY,EAAE,EAAE;IAChBC,aAAa,EAAE;EACjB,CAAC;EACD3B,oBAAoB,EAAE;IACpB4B,iBAAiB,EAAE;EACrB,CAAC;EACDtB,kBAAkB,EAAE;IAClBuB,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE,CAAC;IACpBC,aAAa,EAAE,KAAK;IACpBC,eAAe,EAAE;EACnB,CAAC;EACDlD,KAAK,EAAE;IACL4C,YAAY,EAAE;EAChB,CAAC;EACDhB,YAAY,EAAE;IACZuB,IAAI,EAAE,CAAC;IACPC,gBAAgB,EAAE;EACpB,CAAC;EACDjB,MAAM,EAAE;IACNkB,OAAO,EAAE;EACX,CAAC;EACDjD,IAAI,EAAE;IACJkD,WAAW,EAAE,CAAC;IACdD,OAAO,EAAE;EACX,CAAC;EACD1B,WAAW,EAAE;IACXqB,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAA7E,OAAA,GAEYkB,eAAe","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useMemo","StyleSheet","View","concatTestID","TouchableOpacity","Typography","useAppColorScheme","HistoryItemView","first","icon","label","info","last","style","time","onPress","testID","colorScheme","iconView","isValidElement","IconComponent","createElement","disabled","styles","historyItemContainer","backgroundColor","white","containerFirst","containerLast","historyItemWrapper","borderColor","background","wrapperLast","labelAndInfo","color","text","numberOfLines","preset","Boolean","shaded","create","borderTopLeftRadius","borderTopRightRadius","marginTop","paddingTop","borderBottomLeftRadius","borderBottomRightRadius","marginBottom","paddingBottom","paddingHorizontal","alignItems","borderBottomWidth","flexDirection","paddingVertical","flex","marginHorizontal","opacity","marginRight"],"sources":["history-item.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactElement, useMemo } from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type HistoryItemViewProps = {\n first?: boolean;\n icon: ComponentType<any> | ReactElement;\n info?: string;\n label: string;\n last?: boolean;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n time: string;\n};\n\nconst HistoryItemView: FC<HistoryItemViewProps> = ({\n first,\n icon,\n label,\n info,\n last,\n style,\n time,\n onPress,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const iconView: ReactElement | undefined = useMemo(() => {\n if (React.isValidElement(icon)) {\n return icon;\n } else if (icon) {\n const IconComponent = icon as ComponentType<any>;\n return <IconComponent />;\n }\n }, [icon]);\n\n return (\n <TouchableOpacity\n disabled={!onPress}\n onPress={() => onPress?.()}\n style={[\n styles.historyItemContainer,\n {\n backgroundColor: colorScheme.white,\n },\n first && styles.containerFirst,\n last && styles.containerLast,\n style,\n ]}\n testID={testID}>\n <View\n style={[\n styles.historyItemWrapper,\n {\n backgroundColor: colorScheme.white,\n borderColor: colorScheme.background,\n },\n last && styles.wrapperLast,\n ]}>\n {iconView}\n <View style={styles.labelAndInfo}>\n <Typography\n color={colorScheme.text}\n numberOfLines={1}\n preset=\"s\"\n style={styles.label}\n testID={concatTestID(testID, 'label')}>\n {label}\n </Typography>\n {Boolean(info) && (\n <Typography\n color={colorScheme.text}\n numberOfLines={1}\n preset=\"s/line-height-small\"\n style={styles.shaded}\n testID={concatTestID(testID, 'info')}>\n {info}\n </Typography>\n )}\n </View>\n <Typography\n color={colorScheme.text}\n numberOfLines={1}\n preset=\"xs/line-height-small\"\n style={styles.time}\n testID={concatTestID(testID, 'timeLabel')}>\n {time}\n </Typography>\n </View>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n containerFirst: {\n borderTopLeftRadius: 20,\n borderTopRightRadius: 20,\n marginTop: 8,\n paddingTop: 12,\n },\n containerLast: {\n borderBottomLeftRadius: 20,\n borderBottomRightRadius: 20,\n marginBottom: 12,\n paddingBottom: 12,\n },\n historyItemContainer: {\n paddingHorizontal: 12,\n },\n historyItemWrapper: {\n alignItems: 'center',\n borderBottomWidth: 1,\n flexDirection: 'row',\n paddingVertical: 12,\n },\n label: {\n marginBottom: 2,\n },\n labelAndInfo: {\n flex: 1,\n marginHorizontal: 12,\n },\n shaded: {\n opacity: 0.7,\n },\n time: {\n marginRight: 8,\n opacity: 0.7,\n },\n wrapperLast: {\n borderBottomWidth: 0,\n },\n});\n\nexport default HistoryItemView;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAqCC,OAAO,QAAQ,OAAO;AACvE,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAErE,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,gBAAgB,QAAQ,+CAA+C;AAChF,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AAcjE,MAAMC,eAAyC,GAAGA,CAAC;EACjDC,KAAK;EACLC,IAAI;EACJC,KAAK;EACLC,IAAI;EACJC,IAAI;EACJC,KAAK;EACLC,IAAI;EACJC,OAAO;EACPC;AACF,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGX,iBAAiB,CAAC,CAAC;EAEvC,MAAMY,QAAkC,GAAGlB,OAAO,CAAC,MAAM;IACvD,iBAAID,KAAK,CAACoB,cAAc,CAACV,IAAI,CAAC,EAAE;MAC9B,OAAOA,IAAI;IACb,CAAC,MAAM,IAAIA,IAAI,EAAE;MACf,MAAMW,aAAa,GAAGX,IAA0B;MAChD,oBAAOV,KAAA,CAAAsB,aAAA,CAACD,aAAa,MAAE,CAAC;IAC1B;EACF,CAAC,EAAE,CAACX,IAAI,CAAC,CAAC;EAEV,oBACEV,KAAA,CAAAsB,aAAA,CAACjB,gBAAgB;IACfkB,QAAQ,EAAE,CAACP,OAAQ;IACnBA,OAAO,EAAEA,CAAA,KAAMA,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAG,CAAE;IAC3BF,KAAK,EAAE,CACLU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