@procivis/one-react-native-components 0.3.95 → 0.3.99
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/backup/preview-credentials.js.map +1 -1
- package/lib/commonjs/components/credential/credential.js.map +1 -1
- package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details-with-buttons.js +2 -2
- package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details.js +3 -3
- package/lib/commonjs/components/entity/entity-details.js.map +1 -1
- package/lib/commonjs/components/history/history-details-screen.js +10 -10
- package/lib/commonjs/components/history/history-details-screen.js.map +1 -1
- package/lib/commonjs/components/history/history-list-item-icon.js +12 -8
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
- package/lib/commonjs/components/history/history-list-item.js.map +1 -1
- package/lib/commonjs/components/history/history-list-screen.js.map +1 -1
- package/lib/commonjs/components/history/history-list-section-header.js +1 -1
- package/lib/commonjs/components/history/history-list-section-header.js.map +1 -1
- package/lib/commonjs/components/history/history-list.js.map +1 -1
- package/lib/commonjs/components/proof-request/share-credential-card-notice.js.map +1 -1
- package/lib/commonjs/components/proof-request/v1/select-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/v1/share-credential.js +1 -1
- package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js +2 -2
- 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 +2 -2
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale/fi.json +1 -1
- package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-header.js +1 -1
- package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/commonjs/ui-components/settings/button-setting.js +3 -1
- package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item.js +4 -2
- package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
- package/lib/commonjs/ui-components/settings/switch-setting.js +4 -2
- package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/commonjs/utils/date.js.map +1 -1
- package/lib/commonjs/utils/history.js.map +1 -1
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/backup.js +3 -3
- package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/cache.js +10 -10
- package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-context.js +5 -5
- package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credentials.js +3 -3
- package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/dids.js +1 -1
- package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/history.js +1 -1
- package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/identifiers.js +3 -3
- package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proofs.js +9 -9
- package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/trust-entity.js +5 -5
- package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/wallet-unit.js +1 -1
- package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/commonjs/utils/hooks/revocation/credential-status.js +1 -1
- package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js +11 -10
- package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js +11 -8
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing.js +2 -2
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js +29 -16
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/commonjs/utils/parsers/query.js.map +1 -1
- package/lib/commonjs/utils/url.js.map +1 -1
- package/lib/module/components/backup/preview-credentials.js.map +1 -1
- package/lib/module/components/credential/credential.js.map +1 -1
- package/lib/module/components/entity/EntityButtons.js.map +1 -1
- package/lib/module/components/entity/entity-attributes.js.map +1 -1
- package/lib/module/components/entity/entity-details-with-buttons.js +3 -3
- package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/module/components/entity/entity-details.js +4 -4
- package/lib/module/components/entity/entity-details.js.map +1 -1
- package/lib/module/components/history/history-details-screen.js +11 -11
- package/lib/module/components/history/history-details-screen.js.map +1 -1
- package/lib/module/components/history/history-list-item-icon.js +13 -9
- package/lib/module/components/history/history-list-item-icon.js.map +1 -1
- package/lib/module/components/history/history-list-item.js.map +1 -1
- package/lib/module/components/history/history-list-screen.js.map +1 -1
- package/lib/module/components/history/history-list-section-header.js +1 -1
- package/lib/module/components/history/history-list-section-header.js.map +1 -1
- package/lib/module/components/history/history-list.js.map +1 -1
- package/lib/module/components/proof-request/share-credential-card-notice.js.map +1 -1
- package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
- package/lib/module/components/proof-request/v1/share-credential.js +2 -2
- package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
- package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js +2 -2
- 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 +2 -2
- package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale/fi.json +1 -1
- package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/module/ui-components/header/foldable-header.js.map +1 -1
- package/lib/module/ui-components/history/history-section-header.js +1 -1
- package/lib/module/ui-components/history/history-section-header.js.map +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/module/ui-components/icons/entity.js.map +1 -1
- package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/module/ui-components/settings/button-setting.js +3 -1
- package/lib/module/ui-components/settings/button-setting.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item.js +4 -2
- package/lib/module/ui-components/settings/setting-item.js.map +1 -1
- package/lib/module/ui-components/settings/switch-setting.js +4 -2
- package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/module/utils/date.js.map +1 -1
- package/lib/module/utils/history.js.map +1 -1
- package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/module/utils/hooks/core/backup.js +4 -4
- package/lib/module/utils/hooks/core/backup.js.map +1 -1
- package/lib/module/utils/hooks/core/cache.js +11 -11
- package/lib/module/utils/hooks/core/cache.js.map +1 -1
- package/lib/module/utils/hooks/core/core-context.js +5 -5
- package/lib/module/utils/hooks/core/core-context.js.map +1 -1
- package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/credentials.js +4 -4
- package/lib/module/utils/hooks/core/credentials.js.map +1 -1
- package/lib/module/utils/hooks/core/dids.js +2 -2
- package/lib/module/utils/hooks/core/dids.js.map +1 -1
- package/lib/module/utils/hooks/core/history.js +1 -1
- package/lib/module/utils/hooks/core/history.js.map +1 -1
- package/lib/module/utils/hooks/core/identifiers.js +4 -4
- package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
- package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/proofs.js +10 -10
- package/lib/module/utils/hooks/core/proofs.js.map +1 -1
- package/lib/module/utils/hooks/core/trust-entity.js +6 -6
- package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/module/utils/hooks/core/wallet-unit.js +2 -2
- package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
- package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/module/utils/hooks/revocation/credential-status.js +2 -2
- package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/module/utils/parsers/credential-images.js +12 -11
- package/lib/module/utils/parsers/credential-images.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing-v2.js +11 -8
- package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing.js +2 -2
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js +30 -17
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/module/utils/parsers/query.js.map +1 -1
- package/lib/module/utils/url.js.map +1 -1
- package/lib/typescript/components/backup/preview-credentials.d.ts +2 -2
- package/lib/typescript/components/credential/credential.d.ts +2 -2
- package/lib/typescript/components/entity/EntityButtons.d.ts +2 -2
- package/lib/typescript/components/entity/entity-attributes.d.ts +2 -2
- package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -3
- package/lib/typescript/components/entity/entity-details.d.ts +5 -5
- package/lib/typescript/components/history/history-details-screen.d.ts +2 -2
- package/lib/typescript/components/history/history-list-item-icon.d.ts +3 -3
- package/lib/typescript/components/history/history-list-item.d.ts +5 -5
- package/lib/typescript/components/history/history-list-screen.d.ts +4 -4
- package/lib/typescript/components/history/history-list.d.ts +5 -5
- package/lib/typescript/components/proof-request/v1/select-credential.d.ts +2 -2
- package/lib/typescript/components/proof-request/v1/share-credential.d.ts +6 -6
- package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +3 -3
- package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +4 -4
- package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +5 -5
- package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +2 -2
- package/lib/typescript/ui-components/settings/setting-item.d.ts +1 -0
- package/lib/typescript/utils/history.d.ts +3 -3
- package/lib/typescript/utils/hooks/core/backup.d.ts +3 -3
- package/lib/typescript/utils/hooks/core/cache.d.ts +2 -2
- package/lib/typescript/utils/hooks/core/core-context.d.ts +1 -1
- package/lib/typescript/utils/hooks/core/credential-schemas.d.ts +6 -6
- package/lib/typescript/utils/hooks/core/credentials.d.ts +8 -8
- package/lib/typescript/utils/hooks/core/dids.d.ts +2 -2
- package/lib/typescript/utils/hooks/core/history.d.ts +2 -2
- package/lib/typescript/utils/hooks/core/identifiers.d.ts +3 -3
- package/lib/typescript/utils/hooks/core/proof-schemas.d.ts +7 -7
- package/lib/typescript/utils/hooks/core/proofs.d.ts +9 -9
- package/lib/typescript/utils/hooks/core/trust-entity.d.ts +6 -6
- package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +5 -5
- package/lib/typescript/utils/parsers/credential-images.d.ts +2 -2
- package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +7 -7
- package/lib/typescript/utils/parsers/credential-sharing.d.ts +8 -8
- package/lib/typescript/utils/parsers/credential.d.ts +15 -14
- package/lib/typescript/utils/parsers/query.d.ts +8 -8
- package/package.json +6 -4
- package/src/components/backup/preview-credentials.tsx +2 -2
- package/src/components/credential/credential.tsx +2 -2
- package/src/components/entity/EntityButtons.tsx +2 -2
- package/src/components/entity/entity-attributes.tsx +4 -4
- package/src/components/entity/entity-details-with-buttons.tsx +11 -6
- package/src/components/entity/entity-details.tsx +17 -16
- package/src/components/history/history-details-screen.tsx +13 -16
- package/src/components/history/history-list-item-icon.tsx +19 -11
- package/src/components/history/history-list-item.tsx +9 -5
- package/src/components/history/history-list-screen.tsx +4 -4
- package/src/components/history/history-list-section-header.tsx +1 -1
- package/src/components/history/history-list.tsx +6 -6
- package/src/components/proof-request/share-credential-card-notice.tsx +1 -1
- package/src/components/proof-request/v1/select-credential.tsx +2 -2
- package/src/components/proof-request/v1/share-credential.tsx +13 -11
- package/src/components/proof-request/v2/select-credential-v2.tsx +6 -3
- package/src/components/proof-request/v2/share-credential-v2-group.tsx +12 -12
- package/src/components/proof-request/v2/share-credential-v2.tsx +11 -11
- package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +4 -1
- package/src/ui-components/accessibility/locale/fi.json +1 -1
- package/src/ui-components/buttons/ghost-button.stories.tsx +0 -1
- package/src/ui-components/control/checkbox.stories.tsx +1 -1
- package/src/ui-components/control/switch.stories.tsx +1 -1
- package/src/ui-components/credential/card/credential-header.stories.tsx +0 -1
- package/src/ui-components/entity/entity-cluster.tsx +7 -6
- package/src/ui-components/header/foldable-header.tsx +8 -11
- package/src/ui-components/history/history-section-header.tsx +1 -1
- package/src/ui-components/history/history-section-list-item.tsx +1 -1
- package/src/ui-components/icons/entity.tsx +2 -2
- package/src/ui-components/pin/pin-code-screen.stories.tsx +1 -1
- package/src/ui-components/screens/image-preview-screen.stories.tsx +1 -1
- package/src/ui-components/screens/nerd-mode-screen.tsx +2 -2
- package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +1 -1
- package/src/ui-components/screens/section-list-screen.tsx +10 -1
- package/src/ui-components/searchbar/search-bar.stories.tsx +0 -1
- package/src/ui-components/settings/button-setting.tsx +2 -1
- package/src/ui-components/settings/setting-item.tsx +9 -2
- package/src/ui-components/settings/switch-setting.tsx +9 -2
- package/src/ui-components/text/typography.stories.tsx +2 -2
- package/src/utils/date.ts +2 -2
- package/src/utils/history.ts +4 -4
- package/src/utils/hooks/connectivity/connectivity.test.ts +2 -2
- package/src/utils/hooks/core/backup.ts +4 -4
- package/src/utils/hooks/core/cache.ts +13 -13
- package/src/utils/hooks/core/core-context.tsx +6 -6
- package/src/utils/hooks/core/credential-schemas.ts +7 -4
- package/src/utils/hooks/core/credentials.ts +21 -13
- package/src/utils/hooks/core/dids.ts +3 -3
- package/src/utils/hooks/core/history.ts +3 -3
- package/src/utils/hooks/core/identifiers.ts +9 -5
- package/src/utils/hooks/core/proof-schemas.ts +21 -16
- package/src/utils/hooks/core/proofs.ts +31 -27
- package/src/utils/hooks/core/trust-entity.ts +19 -12
- package/src/utils/hooks/core/wallet-unit.ts +21 -11
- package/src/utils/hooks/navigation/open-settings.ts +1 -1
- package/src/utils/hooks/revocation/credential-status.ts +2 -2
- package/src/utils/parsers/credential-images.tsx +19 -13
- package/src/utils/parsers/credential-sharing-v2.tsx +29 -24
- package/src/utils/parsers/credential-sharing.tsx +24 -24
- package/src/utils/parsers/credential.ts +63 -40
- package/src/utils/parsers/query.ts +16 -14
- package/src/utils/url.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getQueryKeyFromCredentialListQueryParams: (queryParams?: Partial<
|
|
3
|
-
export declare const getQueryKeyFromHistoryListQueryParams: (queryParams?: Partial<
|
|
4
|
-
export declare const getQueryKeyFromCredentialSchemaListQueryParams: (queryParams?: Partial<
|
|
5
|
-
export declare const getQueryKeyFromProofSchemaListQueryParams: (queryParams?: Partial<
|
|
6
|
-
export declare const getQueryKeyFromProofListQueryParams: (queryParams?: Partial<
|
|
7
|
-
export declare const getQueryKeyFromDidListQueryParams: (queryParams?: Partial<
|
|
8
|
-
export declare const getQueryKeyFromIdentifierListQueryParams: (queryParams?: Partial<
|
|
1
|
+
import { CredentialListQueryBindingDto, CredentialSchemaListQueryBindingDto, DidListQueryBindingDto, HistoryListQueryBindingDto, IdentifierListQueryBindingDto, ListProofSchemasFiltersBindingDto, ProofListQueryBindingDto } from '@procivis/react-native-one-core';
|
|
2
|
+
export declare const getQueryKeyFromCredentialListQueryParams: (queryParams?: Partial<CredentialListQueryBindingDto>) => (string | number | string[] | import("@procivis/react-native-one-core").SearchTypeBindingEnum[] | import("@procivis/react-native-one-core").CredentialListQueryExactColumnBindingEnum[] | import("@procivis/react-native-one-core").CredentialRoleBindingDto[] | import("@procivis/react-native-one-core").CredentialStateBindingEnum[] | import("@procivis/react-native-one-core").CredentialListIncludeEntityTypeBindingEnum[] | undefined)[];
|
|
3
|
+
export declare const getQueryKeyFromHistoryListQueryParams: (queryParams?: Partial<HistoryListQueryBindingDto>) => (string | number | string[] | import("@procivis/react-native-one-core").HistorySearchBindingDto | import("@procivis/react-native-one-core").HistoryEntityTypeBindingEnum[] | import("@procivis/react-native-one-core").HistoryActionBindingEnum[] | undefined)[];
|
|
4
|
+
export declare const getQueryKeyFromCredentialSchemaListQueryParams: (queryParams?: Partial<CredentialSchemaListQueryBindingDto>) => (string | number | string[] | import("@procivis/react-native-one-core").CredentialSchemaListQueryExactColumnBindingEnum[] | import("@procivis/react-native-one-core").CredentialSchemaListIncludeEntityType[] | undefined)[];
|
|
5
|
+
export declare const getQueryKeyFromProofSchemaListQueryParams: (queryParams?: Partial<ListProofSchemasFiltersBindingDto>) => (string | number | string[] | import("@procivis/react-native-one-core").ProofSchemaListQueryExactColumnBinding[] | undefined)[];
|
|
6
|
+
export declare const getQueryKeyFromProofListQueryParams: (queryParams?: Partial<ProofListQueryBindingDto>) => (string | number | string[] | import("@procivis/react-native-one-core").ProofListQueryExactColumnBindingEnum[] | import("@procivis/react-native-one-core").ProofStateBindingEnum[] | import("@procivis/react-native-one-core").ProofRoleBindingEnum[] | undefined)[];
|
|
7
|
+
export declare const getQueryKeyFromDidListQueryParams: (queryParams?: Partial<DidListQueryBindingDto>) => (string | number | boolean | string[] | import("@procivis/react-native-one-core").ExactDidFilterColumnBindingEnum[] | import("@procivis/react-native-one-core").KeyRoleBindingEnum[] | undefined)[];
|
|
8
|
+
export declare const getQueryKeyFromIdentifierListQueryParams: (queryParams?: Partial<IdentifierListQueryBindingDto>) => (string | number | boolean | string[] | import("@procivis/react-native-one-core").KeyRoleBindingEnum[] | import("@procivis/react-native-one-core").ExactIdentifierFilterColumnBindingEnum[] | import("@procivis/react-native-one-core").IdentifierStateBindingEnum[] | import("@procivis/react-native-one-core").IdentifierTypeBindingEnum[] | undefined)[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procivis/one-react-native-components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.99",
|
|
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",
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"typescript": "tsc --noEmit",
|
|
24
24
|
"lint:eslint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
25
25
|
"lint:eslint:fix": "eslint \"**/*.{js,ts,tsx}\" --fix",
|
|
26
|
+
"lint:prettier": "prettier --check .",
|
|
27
|
+
"lint:prettier:fix": "prettier --write .",
|
|
26
28
|
"lint:ts": "tsc --noEmit",
|
|
27
29
|
"lint": "pnpm lint:eslint",
|
|
28
30
|
"lint:fix": "pnpm lint:eslint:fix",
|
|
@@ -51,7 +53,7 @@
|
|
|
51
53
|
"@babel/runtime": "^7.25.0",
|
|
52
54
|
"@commitlint/config-conventional": "^11.0.0",
|
|
53
55
|
"@gorhom/bottom-sheet": "^5.1.2",
|
|
54
|
-
"@procivis/react-native-one-core": "1.
|
|
56
|
+
"@procivis/react-native-one-core": "1.80487.0",
|
|
55
57
|
"@procivis/react-native-picker": "5.0.3",
|
|
56
58
|
"@react-native-async-storage/async-storage": "^1.17.3",
|
|
57
59
|
"@react-native-community/blur": "^4.4.0",
|
|
@@ -140,7 +142,7 @@
|
|
|
140
142
|
"vite": "^6.2.2"
|
|
141
143
|
},
|
|
142
144
|
"peerDependencies": {
|
|
143
|
-
"@procivis/react-native-one-core": "^1.
|
|
145
|
+
"@procivis/react-native-one-core": "^1.80487.0",
|
|
144
146
|
"@procivis/react-native-picker": "*",
|
|
145
147
|
"@react-native-community/blur": "*",
|
|
146
148
|
"@react-native-community/netinfo": "^11.4.1",
|
|
@@ -293,4 +295,4 @@
|
|
|
293
295
|
"react-native-web": "patches/react-native-web.patch"
|
|
294
296
|
}
|
|
295
297
|
}
|
|
296
|
-
}
|
|
298
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CredentialListItemBindingDto } from '@procivis/react-native-one-core';
|
|
2
2
|
import React, { FC } from 'react';
|
|
3
3
|
import { ImageSourcePropType, View } from 'react-native';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ import { CardLabels } from '../../utils/parsers/credential';
|
|
|
7
7
|
import { CredentialDetails } from '../credential/credential';
|
|
8
8
|
|
|
9
9
|
interface PreviewCredentialsProps {
|
|
10
|
-
credentials:
|
|
10
|
+
credentials: CredentialListItemBindingDto[] | undefined;
|
|
11
11
|
labels: CardLabels;
|
|
12
12
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
13
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ClaimBindingDto } from '@procivis/react-native-one-core';
|
|
2
2
|
import React, { FC, useMemo } from 'react';
|
|
3
3
|
import { Dimensions, ImageSourcePropType, StyleSheet } from 'react-native';
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ import { useCredentialDetail } from '../../utils/hooks/core/credentials';
|
|
|
9
9
|
import { CardLabels, detailsCardFromCredentialWithClaims } from '../../utils/parsers/credential';
|
|
10
10
|
|
|
11
11
|
export interface CredentialDetailsProps {
|
|
12
|
-
claims?:
|
|
12
|
+
claims?: ClaimBindingDto[];
|
|
13
13
|
credentialId: string;
|
|
14
14
|
expanded?: boolean;
|
|
15
15
|
headerAccessory?: CredentialHeaderProps['accessory'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetTrustEntityResponseBindingDto } from '@procivis/react-native-one-core';
|
|
2
2
|
import React, { FC, memo, useCallback, useMemo } from 'react';
|
|
3
3
|
import { Linking, StyleSheet, View } from 'react-native';
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ export interface EntityButton {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
interface EntityButtonsProps {
|
|
15
|
-
entity?:
|
|
15
|
+
entity?: GetTrustEntityResponseBindingDto;
|
|
16
16
|
labels: EntityLabels;
|
|
17
17
|
testID?: string;
|
|
18
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetTrustEntityResponseBindingDto } from '@procivis/react-native-one-core';
|
|
2
2
|
import React, { FC, memo } from 'react';
|
|
3
3
|
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ import { addElementIf } from '../../utils/array';
|
|
|
9
9
|
interface EntityAttributesProps {
|
|
10
10
|
certificate?: string;
|
|
11
11
|
did?: string;
|
|
12
|
-
trustEntity?:
|
|
12
|
+
trustEntity?: GetTrustEntityResponseBindingDto;
|
|
13
13
|
trusted: boolean;
|
|
14
14
|
labels: AttributesLabels;
|
|
15
15
|
onCopyToClipboard: (value: string) => void;
|
|
@@ -74,7 +74,7 @@ const EntityAttributes: FC<EntityAttributesProps> = ({
|
|
|
74
74
|
const styles = StyleSheet.create({
|
|
75
75
|
wrapper: {
|
|
76
76
|
marginBottom: 20,
|
|
77
|
-
}
|
|
78
|
-
})
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
79
|
|
|
80
80
|
export default memo(EntityAttributes);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
GetIdentifierListItemBindingDto,
|
|
3
|
+
TrustEntityRoleBindingEnum,
|
|
4
|
+
TrustEntityStateBindingEnum,
|
|
5
|
+
} from '@procivis/react-native-one-core';
|
|
2
6
|
import React, { FC, memo } from 'react';
|
|
3
7
|
import { StyleProp, View, ViewStyle } from 'react-native';
|
|
4
8
|
|
|
@@ -10,10 +14,10 @@ import EntityAttributes from './entity-attributes';
|
|
|
10
14
|
import EntityDetails from './entity-details';
|
|
11
15
|
import EntityButtons from './EntityButtons';
|
|
12
16
|
|
|
13
|
-
export type ContextRole = Exclude<
|
|
17
|
+
export type ContextRole = Exclude<TrustEntityRoleBindingEnum, TrustEntityRoleBindingEnum.BOTH>;
|
|
14
18
|
|
|
15
19
|
interface EntityDetailsWithButtonsProps {
|
|
16
|
-
identifier?:
|
|
20
|
+
identifier?: GetIdentifierListItemBindingDto;
|
|
17
21
|
entityLabels: EntityLabels;
|
|
18
22
|
attributesLabels: AttributesLabels;
|
|
19
23
|
style?: StyleProp<ViewStyle>;
|
|
@@ -42,8 +46,8 @@ const EntityDetailsWithButtons: FC<EntityDetailsWithButtonsProps> = ({
|
|
|
42
46
|
|
|
43
47
|
const trusted = Boolean(
|
|
44
48
|
trustEntity &&
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
trustEntity.state === TrustEntityStateBindingEnum.ACTIVE &&
|
|
50
|
+
(trustEntity.role === TrustEntityRoleBindingEnum.BOTH || trustEntity.role === role),
|
|
47
51
|
);
|
|
48
52
|
|
|
49
53
|
return (
|
|
@@ -51,7 +55,8 @@ const EntityDetailsWithButtons: FC<EntityDetailsWithButtonsProps> = ({
|
|
|
51
55
|
<EntityDetails
|
|
52
56
|
identifier={identifier}
|
|
53
57
|
labels={{
|
|
54
|
-
unknown:
|
|
58
|
+
unknown:
|
|
59
|
+
role === TrustEntityRoleBindingEnum.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier,
|
|
55
60
|
}}
|
|
56
61
|
role={role}
|
|
57
62
|
testID={testID}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
CertificateResponseBindingDto,
|
|
3
|
+
GetIdentifierListItemBindingDto,
|
|
4
|
+
GetTrustEntityResponseBindingDto,
|
|
5
|
+
IdentifierTypeBindingEnum,
|
|
6
|
+
TrustEntityRoleBindingEnum,
|
|
7
|
+
TrustEntityStateBindingEnum,
|
|
8
8
|
} from '@procivis/react-native-one-core';
|
|
9
9
|
import React, { FC, ReactNode, useMemo } from 'react';
|
|
10
10
|
import { StyleProp, ViewStyle } from 'react-native';
|
|
@@ -21,22 +21,22 @@ export type EntityDetailsLabels = {
|
|
|
21
21
|
|
|
22
22
|
export type EntityDetailsProps = {
|
|
23
23
|
labels: EntityDetailsLabels;
|
|
24
|
-
renderMore?: (trustEntity:
|
|
25
|
-
role: Exclude<
|
|
24
|
+
renderMore?: (trustEntity: GetTrustEntityResponseBindingDto) => ReactNode;
|
|
25
|
+
role: Exclude<TrustEntityRoleBindingEnum, TrustEntityRoleBindingEnum.BOTH>;
|
|
26
26
|
style?: StyleProp<ViewStyle>;
|
|
27
27
|
sublineColor?: string;
|
|
28
28
|
textColor?: string;
|
|
29
29
|
testID?: string;
|
|
30
30
|
} & (
|
|
31
31
|
| {
|
|
32
|
-
identifier?:
|
|
32
|
+
identifier?: GetIdentifierListItemBindingDto;
|
|
33
33
|
}
|
|
34
34
|
| {
|
|
35
|
-
entity:
|
|
35
|
+
entity: GetTrustEntityResponseBindingDto;
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
-
const getCertificateCommonName = (certificate:
|
|
39
|
+
const getCertificateCommonName = (certificate: CertificateResponseBindingDto): string | undefined => {
|
|
40
40
|
return certificate.x509Attributes.subject
|
|
41
41
|
.split(', ')
|
|
42
42
|
.find((s) => s.startsWith('CN'))
|
|
@@ -57,15 +57,16 @@ const EntityDetails: FC<EntityDetailsProps> = ({
|
|
|
57
57
|
const { data, isLoading: isLoadingTrustEntity } = useTrustEntity(
|
|
58
58
|
'identifier' in props ? props.identifier?.id : undefined,
|
|
59
59
|
);
|
|
60
|
-
const trustEntity:
|
|
60
|
+
const trustEntity: GetTrustEntityResponseBindingDto | undefined =
|
|
61
|
+
'entity' in props ? props.entity : data ?? undefined;
|
|
61
62
|
const { data: identifierDetail, isLoading: isLoadingIdentifier } = useIdentifierDetails(
|
|
62
63
|
'identifier' in props ? props.identifier?.id : undefined,
|
|
63
64
|
);
|
|
64
65
|
|
|
65
66
|
const trusted =
|
|
66
67
|
trustEntity &&
|
|
67
|
-
trustEntity.state ===
|
|
68
|
-
(trustEntity.role ===
|
|
68
|
+
trustEntity.state === TrustEntityStateBindingEnum.ACTIVE &&
|
|
69
|
+
(trustEntity.role === TrustEntityRoleBindingEnum.BOTH || trustEntity.role === role);
|
|
69
70
|
|
|
70
71
|
const isLoading = isLoadingIdentifier || isLoadingTrustEntity;
|
|
71
72
|
|
|
@@ -80,7 +81,7 @@ const EntityDetails: FC<EntityDetailsProps> = ({
|
|
|
80
81
|
: undefined;
|
|
81
82
|
|
|
82
83
|
const placeholderText =
|
|
83
|
-
identifierDetail?.type ===
|
|
84
|
+
identifierDetail?.type === IdentifierTypeBindingEnum.CERTIFICATE && identifierDetail.certificates?.[0]
|
|
84
85
|
? getCertificateCommonName(identifierDetail.certificates[0])?.substring(0, 1)
|
|
85
86
|
: 'D';
|
|
86
87
|
|
|
@@ -110,7 +111,7 @@ const EntityDetails: FC<EntityDetailsProps> = ({
|
|
|
110
111
|
if (isLoading) {
|
|
111
112
|
return '';
|
|
112
113
|
}
|
|
113
|
-
if (identifierDetail?.type ===
|
|
114
|
+
if (identifierDetail?.type === IdentifierTypeBindingEnum.CERTIFICATE && identifierDetail.certificates?.[0]) {
|
|
114
115
|
const commonName = getCertificateCommonName(identifierDetail.certificates[0]);
|
|
115
116
|
if (commonName) {
|
|
116
117
|
return commonName;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HistoryActionEnum,
|
|
3
|
-
HistoryListItem,
|
|
4
|
-
} from '@procivis/react-native-one-core';
|
|
1
|
+
import { HistoryActionBindingEnum, HistoryListItemBindingDto } from '@procivis/react-native-one-core';
|
|
5
2
|
import React, { FC, ReactElement } from 'react';
|
|
6
3
|
import { ImageSourcePropType } from 'react-native';
|
|
7
4
|
|
|
@@ -15,19 +12,19 @@ import { capitalizeFirstLetter, concatTestID, formatDateTimeLocalized } from '..
|
|
|
15
12
|
import { HistoryListItemLabels } from './history-list-item';
|
|
16
13
|
import { getHistoryItemActionIcon } from './history-list-item-icon';
|
|
17
14
|
|
|
18
|
-
const getStatusTextColor = (action:
|
|
15
|
+
const getStatusTextColor = (action: HistoryActionBindingEnum, colorScheme: Readonly<ColorScheme>) => {
|
|
19
16
|
switch (action) {
|
|
20
|
-
case
|
|
21
|
-
case
|
|
22
|
-
case
|
|
23
|
-
case
|
|
24
|
-
case
|
|
25
|
-
case
|
|
17
|
+
case HistoryActionBindingEnum.CLAIMS_REMOVED:
|
|
18
|
+
case HistoryActionBindingEnum.DEACTIVATED:
|
|
19
|
+
case HistoryActionBindingEnum.DELETED:
|
|
20
|
+
case HistoryActionBindingEnum.REJECTED:
|
|
21
|
+
case HistoryActionBindingEnum.REVOKED:
|
|
22
|
+
case HistoryActionBindingEnum.ERRORED:
|
|
26
23
|
return colorScheme.errorText;
|
|
27
|
-
case
|
|
28
|
-
case
|
|
29
|
-
case
|
|
30
|
-
case
|
|
24
|
+
case HistoryActionBindingEnum.SUSPENDED:
|
|
25
|
+
case HistoryActionBindingEnum.OFFERED:
|
|
26
|
+
case HistoryActionBindingEnum.PENDING:
|
|
27
|
+
case HistoryActionBindingEnum.REQUESTED:
|
|
31
28
|
return colorScheme.text;
|
|
32
29
|
default:
|
|
33
30
|
return colorScheme.successText;
|
|
@@ -42,7 +39,7 @@ export type HistoryDetailsScreenProps = {
|
|
|
42
39
|
assets: HistoryDetailsViewProps['assets'];
|
|
43
40
|
dataHeader: HistoryDetailsViewProps['data']['header'];
|
|
44
41
|
headerButton?: ReactElement;
|
|
45
|
-
item:
|
|
42
|
+
item: HistoryListItemBindingDto;
|
|
46
43
|
labels: HistoryDetailsScreenLabels;
|
|
47
44
|
onBackPressed: () => void;
|
|
48
45
|
onInfoPressed?: () => void;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
HistoryActionBindingEnum,
|
|
3
|
+
HistoryEntityTypeBindingEnum,
|
|
4
|
+
HistoryListItemBindingDto,
|
|
5
|
+
} from '@procivis/react-native-one-core';
|
|
2
6
|
import React, { FC, useMemo } from 'react';
|
|
3
7
|
import { SvgProps } from 'react-native-svg';
|
|
4
8
|
|
|
@@ -26,8 +30,8 @@ import {
|
|
|
26
30
|
} from '../../ui-components';
|
|
27
31
|
|
|
28
32
|
const defaultIcons: {
|
|
29
|
-
actions: { [key in keyof typeof
|
|
30
|
-
entityTypes: { [key in keyof typeof
|
|
33
|
+
actions: { [key in keyof typeof HistoryActionBindingEnum]: FC<SvgProps> };
|
|
34
|
+
entityTypes: { [key in keyof typeof HistoryEntityTypeBindingEnum]: FC<SvgProps> };
|
|
31
35
|
} = {
|
|
32
36
|
actions: {
|
|
33
37
|
ACCEPTED: HistoryStatusAcceptedIcon,
|
|
@@ -56,6 +60,9 @@ const defaultIcons: {
|
|
|
56
60
|
EXPIRED: HistoryStatusErrorIcon,
|
|
57
61
|
INTERACTION_CREATED: HistoryStatusAcceptedIcon,
|
|
58
62
|
INTERACTION_ERRORED: HistoryStatusErrorIcon,
|
|
63
|
+
INTERACTION_EXPIRED: HistoryStatusErrorIcon,
|
|
64
|
+
REGISTRATION_CERTIFICATE_CREATED: HistoryStatusAcceptedIcon,
|
|
65
|
+
REGISTRATION_CERTIFICATE_REVOKED: HistoryStatusErrorIcon,
|
|
59
66
|
},
|
|
60
67
|
entityTypes: {
|
|
61
68
|
BACKUP: HistoryRevokeIcon,
|
|
@@ -78,36 +85,37 @@ const defaultIcons: {
|
|
|
78
85
|
STS_ORGANISATION: HistoryOrganisationIcon,
|
|
79
86
|
STS_IAM_ROLE: HistoryIdentifierIcon,
|
|
80
87
|
STS_TOKEN: HistoryKeyIcon,
|
|
88
|
+
SIGNATURE: HistoryCertificateIcon,
|
|
81
89
|
},
|
|
82
90
|
};
|
|
83
91
|
|
|
84
|
-
export const getHistoryItemActionIcon = (action:
|
|
92
|
+
export const getHistoryItemActionIcon = (action: HistoryActionBindingEnum) => {
|
|
85
93
|
return defaultIcons.actions[action] ?? HistoryStatusAcceptedIcon;
|
|
86
94
|
};
|
|
87
95
|
|
|
88
96
|
export type HistoryListItemIconProps = {
|
|
89
|
-
item:
|
|
97
|
+
item: HistoryListItemBindingDto;
|
|
90
98
|
};
|
|
91
99
|
|
|
92
100
|
export const HistoryListItemIcon: FC<HistoryListItemIconProps> = ({ item }) => {
|
|
93
101
|
const statusIcon = getHistoryItemActionIcon(item.action);
|
|
94
102
|
const typeIcon = useMemo(() => {
|
|
95
103
|
switch (item.entityType) {
|
|
96
|
-
case
|
|
104
|
+
case HistoryEntityTypeBindingEnum.BACKUP:
|
|
97
105
|
switch (item.action) {
|
|
98
|
-
case
|
|
106
|
+
case HistoryActionBindingEnum.CREATED:
|
|
99
107
|
return HistoryBackupCreatedIcon;
|
|
100
|
-
case
|
|
108
|
+
case HistoryActionBindingEnum.RESTORED:
|
|
101
109
|
return HistoryBackupRestoredIcon;
|
|
102
110
|
default:
|
|
103
111
|
break;
|
|
104
112
|
}
|
|
105
113
|
break;
|
|
106
|
-
case
|
|
114
|
+
case HistoryEntityTypeBindingEnum.CREDENTIAL:
|
|
107
115
|
switch (item.action) {
|
|
108
|
-
case
|
|
116
|
+
case HistoryActionBindingEnum.REVOKED:
|
|
109
117
|
return HistoryRevokeIcon;
|
|
110
|
-
case
|
|
118
|
+
case HistoryActionBindingEnum.SUSPENDED:
|
|
111
119
|
return HistorySuspendIcon;
|
|
112
120
|
default:
|
|
113
121
|
break;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
HistoryActionBindingEnum,
|
|
3
|
+
HistoryEntityTypeBindingEnum,
|
|
4
|
+
HistoryListItemBindingDto,
|
|
5
|
+
} from '@procivis/react-native-one-core';
|
|
2
6
|
import React, { FC, useCallback, useMemo } from 'react';
|
|
3
7
|
|
|
4
8
|
import { HistoryItemView } from '../../ui-components';
|
|
@@ -6,18 +10,18 @@ import { formatTime, useTrustEntity } from '../../utils';
|
|
|
6
10
|
import { HistoryListItemIcon } from './history-list-item-icon';
|
|
7
11
|
|
|
8
12
|
export type HistoryListItemLabels = {
|
|
9
|
-
actions: { [key in keyof typeof
|
|
10
|
-
entityTypes: { [key in keyof typeof
|
|
13
|
+
actions: { [key in keyof typeof HistoryActionBindingEnum]: string };
|
|
14
|
+
entityTypes: { [key in keyof typeof HistoryEntityTypeBindingEnum]: string };
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
export interface HistoryListItemViewProps {
|
|
14
18
|
dateFormatter?: (date: Date) => string;
|
|
15
19
|
first?: boolean;
|
|
16
20
|
infoLabelMode?: 'entity' | 'associatedLabel' | 'none';
|
|
17
|
-
item:
|
|
21
|
+
item: HistoryListItemBindingDto;
|
|
18
22
|
labels: HistoryListItemLabels;
|
|
19
23
|
last?: boolean;
|
|
20
|
-
onPress?: (item:
|
|
24
|
+
onPress?: (item: HistoryListItemBindingDto) => void;
|
|
21
25
|
testID?: string;
|
|
22
26
|
}
|
|
23
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HistoryListItemBindingDto, HistoryListQueryBindingDto } from '@procivis/react-native-one-core';
|
|
2
2
|
import { debounce } from 'lodash';
|
|
3
3
|
import React, { FC, PropsWithChildren, useEffect, useMemo, useState } from 'react';
|
|
4
4
|
import { Animated, StyleSheet, View } from 'react-native';
|
|
@@ -24,14 +24,14 @@ export type HistoryListScreenLabels = {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export type HistoryListScreenProps = {
|
|
27
|
-
groupItems?: (entries:
|
|
27
|
+
groupItems?: (entries: HistoryListItemBindingDto[]) => HistoryGroupByDaySection[];
|
|
28
28
|
itemInfoLabelMode?: HistoryListItemViewProps['infoLabelMode'];
|
|
29
29
|
labels: HistoryListScreenLabels;
|
|
30
30
|
onBackPressed: () => void;
|
|
31
|
-
onHistoryItemPressed: (historyItem:
|
|
31
|
+
onHistoryItemPressed: (historyItem: HistoryListItemBindingDto) => void;
|
|
32
32
|
onOpenFilter?: () => void;
|
|
33
33
|
onSearchPhraseChange: (searchPhrase: string | undefined) => void;
|
|
34
|
-
queryParams: Partial<
|
|
34
|
+
queryParams: Partial<HistoryListQueryBindingDto>;
|
|
35
35
|
testID?: string;
|
|
36
36
|
};
|
|
37
37
|
|
|
@@ -15,7 +15,7 @@ export type HistoryListSectionHeaderViewProps = {
|
|
|
15
15
|
testID?: string;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
// components used on the history section lists (Settings->History,
|
|
18
|
+
// components used on the history section lists (Settings->History, CredentialDetailBindingDto->History)
|
|
19
19
|
// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev
|
|
20
20
|
|
|
21
21
|
export const HistoryListSectionHeaderView: FC<HistoryListSectionHeaderViewProps> = ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HistoryListItemBindingDto, HistoryListQueryBindingDto } from '@procivis/react-native-one-core';
|
|
2
2
|
import { useIsFocused } from '@react-navigation/native';
|
|
3
3
|
import React, { FC, useCallback, useMemo } from 'react';
|
|
4
4
|
import { Animated, SectionListProps, StyleSheet } from 'react-native';
|
|
@@ -16,15 +16,15 @@ export type HistoryListLabels = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export interface HistoryListViewProps
|
|
19
|
-
extends Omit<SectionListProps<
|
|
19
|
+
extends Omit<SectionListProps<HistoryListItemBindingDto, HistoryGroupByDaySection>, 'sections'> {
|
|
20
20
|
// optional customization of item props
|
|
21
|
-
getItemProps?: (item:
|
|
22
|
-
groupItems?: (entries:
|
|
21
|
+
getItemProps?: (item: HistoryListItemBindingDto) => Partial<HistoryListItemViewProps> | undefined;
|
|
22
|
+
groupItems?: (entries: HistoryListItemBindingDto[]) => HistoryGroupByDaySection[];
|
|
23
23
|
itemProps?: Partial<HistoryListItemViewProps>;
|
|
24
24
|
labels: HistoryListLabels;
|
|
25
25
|
// callback when empty list displayed
|
|
26
26
|
onEmpty?: (empty: boolean) => void;
|
|
27
|
-
query: Partial<
|
|
27
|
+
query: Partial<HistoryListQueryBindingDto>;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export const HistoryListView: FC<HistoryListViewProps> = ({
|
|
@@ -72,7 +72,7 @@ export const HistoryListView: FC<HistoryListViewProps> = ({
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
return (
|
|
75
|
-
<Animated.SectionList<
|
|
75
|
+
<Animated.SectionList<HistoryListItemBindingDto, HistoryGroupByDaySection>
|
|
76
76
|
ListFooterComponent={
|
|
77
77
|
isLoading ? <ListPageLoadingIndicator color={colorScheme.accent} style={styles.footer} /> : undefined
|
|
78
78
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
import { Typography,useAppColorScheme } from '../../ui-components';
|
|
4
|
+
import { Typography, useAppColorScheme } from '../../ui-components';
|
|
5
5
|
|
|
6
6
|
export type ShareCredentialCardNoticeProps = {
|
|
7
7
|
testID: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PresentationDefinitionRequestedCredentialBindingDto } from '@procivis/react-native-one-core';
|
|
2
2
|
import React, { FC, useMemo } from 'react';
|
|
3
3
|
import { Dimensions, ImageSourcePropType } from 'react-native';
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ export const SelectCredential: FC<{
|
|
|
16
16
|
lastItem: boolean;
|
|
17
17
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
18
18
|
onPress?: () => void;
|
|
19
|
-
request:
|
|
19
|
+
request: PresentationDefinitionRequestedCredentialBindingDto;
|
|
20
20
|
selected: boolean;
|
|
21
21
|
testID: string;
|
|
22
22
|
}> = ({ credentialId, labels, lastItem, onImagePreview, onPress, request, selected, testID }) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
CredentialDetailBindingDto,
|
|
3
|
+
CredentialListItemBindingDto,
|
|
4
|
+
CredentialStateBindingEnum,
|
|
5
|
+
PresentationDefinitionFieldBindingDto,
|
|
6
|
+
PresentationDefinitionRequestedCredentialBindingDto,
|
|
7
7
|
} from '@procivis/react-native-one-core';
|
|
8
8
|
import React, { FunctionComponent, useMemo } from 'react';
|
|
9
9
|
import { Dimensions, ImageSourcePropType, StyleProp, StyleSheet, ViewStyle } from 'react-native';
|
|
@@ -28,17 +28,17 @@ export type ShareCredentialLabels = ShareCredentialCardLabels & {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export const ShareCredential: FunctionComponent<{
|
|
31
|
-
allCredentials:
|
|
31
|
+
allCredentials: CredentialDetailBindingDto[];
|
|
32
32
|
expanded?: boolean;
|
|
33
33
|
labels: ShareCredentialLabels;
|
|
34
34
|
lastItem?: boolean;
|
|
35
35
|
onHeaderPress?: (_credentialId?: string) => void;
|
|
36
36
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
37
37
|
onSelectCredential?: () => void;
|
|
38
|
-
onSelectField: (_id:
|
|
39
|
-
request:
|
|
40
|
-
selectedCredentialId?:
|
|
41
|
-
selectedFields?: Array<
|
|
38
|
+
onSelectField: (_id: PresentationDefinitionFieldBindingDto['id'], _selected: boolean) => void;
|
|
39
|
+
request: PresentationDefinitionRequestedCredentialBindingDto;
|
|
40
|
+
selectedCredentialId?: CredentialListItemBindingDto['id'];
|
|
41
|
+
selectedFields?: Array<PresentationDefinitionFieldBindingDto['id']>;
|
|
42
42
|
style?: StyleProp<ViewStyle>;
|
|
43
43
|
testID: string;
|
|
44
44
|
}> = ({
|
|
@@ -64,7 +64,9 @@ export const ShareCredential: FunctionComponent<{
|
|
|
64
64
|
const selectionOptions = useMemo(
|
|
65
65
|
() =>
|
|
66
66
|
request.applicableCredentials.filter((applicableCredentialId) =>
|
|
67
|
-
allCredentials.some(
|
|
67
|
+
allCredentials.some(
|
|
68
|
+
({ id, state }) => id === applicableCredentialId && state === CredentialStateBindingEnum.ACCEPTED,
|
|
69
|
+
),
|
|
68
70
|
),
|
|
69
71
|
[allCredentials, request],
|
|
70
72
|
);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
CredentialListItemBindingDto,
|
|
3
|
+
PresentationDefinitionV2CredentialDetailBindingDto,
|
|
4
|
+
} from '@procivis/react-native-one-core';
|
|
2
5
|
import React, { FC, useCallback, useMemo } from 'react';
|
|
3
6
|
import { Dimensions, ImageSourcePropType } from 'react-native';
|
|
4
7
|
|
|
@@ -7,12 +10,12 @@ import { ShareCredentialCardLabels, useCoreConfig } from '../../../utils';
|
|
|
7
10
|
import { selectCredentialCardFromV2Credential } from '../../../utils/parsers/credential-sharing-v2';
|
|
8
11
|
|
|
9
12
|
export const SelectCredentialV2: FC<{
|
|
10
|
-
credential:
|
|
13
|
+
credential: PresentationDefinitionV2CredentialDetailBindingDto;
|
|
11
14
|
labels: ShareCredentialCardLabels;
|
|
12
15
|
lastItem: boolean;
|
|
13
16
|
multiple: boolean;
|
|
14
17
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
15
|
-
onSelected?: (credentialId:
|
|
18
|
+
onSelected?: (credentialId: CredentialListItemBindingDto['id'], selected: boolean) => void;
|
|
16
19
|
selected: boolean;
|
|
17
20
|
testID: string;
|
|
18
21
|
}> = ({ credential, labels, lastItem, multiple, onImagePreview, onSelected, selected, testID }) => {
|