@procivis/one-react-native-components 0.3.95 → 0.3.102
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 +10 -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 +1 -0
- 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 +3 -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 +3 -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/buttons/connectivity-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/filter-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/ghost-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/hold-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/scan-button.js +3 -0
- package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/share-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/share-button.js.map +1 -1
- package/lib/commonjs/ui-components/control/checkbox.js +1 -0
- package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-card.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +3 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-header.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +2 -0
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js +1 -0
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js +2 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector.js +1 -0
- package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
- package/lib/commonjs/ui-components/entity/avatar.js +1 -0
- package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
- package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
- package/lib/commonjs/ui-components/header/navigation-header.js +1 -0
- package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-details.js +3 -1
- package/lib/commonjs/ui-components/history/history-details.js.map +1 -1
- package/lib/commonjs/ui-components/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/icons/history.js +1 -0
- package/lib/commonjs/ui-components/icons/history.js.map +1 -1
- package/lib/commonjs/ui-components/pin/keypad.js +1 -0
- package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pins.js +1 -0
- package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
- package/lib/commonjs/ui-components/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 +5 -2
- package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
- package/lib/commonjs/ui-components/settings/settings-button.js +1 -0
- package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
- package/lib/commonjs/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 +11 -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 +1 -0
- 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 +3 -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 +3 -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/buttons/connectivity-button.js +1 -0
- package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/module/ui-components/buttons/filter-button.js +1 -0
- package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/module/ui-components/buttons/ghost-button.js +1 -0
- package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/module/ui-components/buttons/hold-button.js +1 -0
- package/lib/module/ui-components/buttons/hold-button.js.map +1 -1
- package/lib/module/ui-components/buttons/scan-button.js +3 -0
- package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/module/ui-components/buttons/share-button.js +1 -0
- package/lib/module/ui-components/buttons/share-button.js.map +1 -1
- package/lib/module/ui-components/control/checkbox.js +1 -0
- package/lib/module/ui-components/control/checkbox.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-card.js +1 -0
- package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js +3 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-list-item.js +1 -0
- package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-header.js +1 -0
- package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-image-carousel.js +2 -0
- package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/module/ui-components/credential/credential-attribute-item.js +1 -0
- package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js +2 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/module/ui-components/credential/selector.js +1 -0
- package/lib/module/ui-components/credential/selector.js.map +1 -1
- package/lib/module/ui-components/entity/avatar.js +1 -0
- package/lib/module/ui-components/entity/avatar.js.map +1 -1
- package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/module/ui-components/header/foldable-header.js.map +1 -1
- package/lib/module/ui-components/header/navigation-header.js +1 -0
- package/lib/module/ui-components/header/navigation-header.js.map +1 -1
- package/lib/module/ui-components/history/history-details.js +3 -1
- package/lib/module/ui-components/history/history-details.js.map +1 -1
- package/lib/module/ui-components/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/icons/history.js +1 -0
- package/lib/module/ui-components/icons/history.js.map +1 -1
- package/lib/module/ui-components/pin/keypad.js +1 -0
- package/lib/module/ui-components/pin/keypad.js.map +1 -1
- package/lib/module/ui-components/pin/pins.js +1 -0
- package/lib/module/ui-components/pin/pins.js.map +1 -1
- package/lib/module/ui-components/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 +5 -2
- package/lib/module/ui-components/settings/setting-item.js.map +1 -1
- package/lib/module/ui-components/settings/settings-button.js +1 -0
- package/lib/module/ui-components/settings/settings-button.js.map +1 -1
- package/lib/module/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 +11 -37
- 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 +17 -11
- package/src/components/history/history-list-item.tsx +9 -5
- package/src/components/history/history-list-screen.tsx +5 -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 +13 -12
- package/src/components/proof-request/v2/share-credential-v2.tsx +12 -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/connectivity-button.tsx +1 -0
- package/src/ui-components/buttons/filter-button.tsx +1 -0
- package/src/ui-components/buttons/ghost-button.stories.tsx +0 -1
- package/src/ui-components/buttons/ghost-button.tsx +1 -0
- package/src/ui-components/buttons/hold-button.tsx +1 -0
- package/src/ui-components/buttons/scan-button.tsx +3 -0
- package/src/ui-components/buttons/share-button.tsx +1 -0
- package/src/ui-components/control/checkbox.stories.tsx +1 -1
- package/src/ui-components/control/checkbox.tsx +1 -0
- package/src/ui-components/control/switch.stories.tsx +1 -1
- package/src/ui-components/credential/card/credential-card.tsx +1 -0
- package/src/ui-components/credential/card/credential-details-card.tsx +2 -0
- package/src/ui-components/credential/card/credential-details-list-item.tsx +1 -0
- package/src/ui-components/credential/card/credential-header.stories.tsx +0 -1
- package/src/ui-components/credential/card/credential-header.tsx +1 -0
- package/src/ui-components/credential/card/credential-image-carousel.tsx +2 -2
- package/src/ui-components/credential/credential-attribute-item.tsx +1 -0
- package/src/ui-components/credential/credential-carousel-images.tsx +1 -0
- package/src/ui-components/credential/selector.tsx +1 -0
- package/src/ui-components/entity/avatar.tsx +1 -0
- package/src/ui-components/entity/entity-cluster.tsx +7 -6
- package/src/ui-components/header/foldable-header.tsx +8 -11
- package/src/ui-components/header/navigation-header.tsx +1 -0
- package/src/ui-components/history/history-details.tsx +2 -0
- 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/icons/history.tsx +1 -0
- package/src/ui-components/pin/keypad.tsx +1 -0
- package/src/ui-components/pin/pin-code-screen.stories.tsx +1 -1
- package/src/ui-components/pin/pins.tsx +1 -0
- 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 +10 -2
- package/src/ui-components/settings/settings-button.tsx +1 -0
- 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,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,7 @@ const defaultIcons: {
|
|
|
56
60
|
EXPIRED: HistoryStatusErrorIcon,
|
|
57
61
|
INTERACTION_CREATED: HistoryStatusAcceptedIcon,
|
|
58
62
|
INTERACTION_ERRORED: HistoryStatusErrorIcon,
|
|
63
|
+
INTERACTION_EXPIRED: HistoryStatusErrorIcon,
|
|
59
64
|
},
|
|
60
65
|
entityTypes: {
|
|
61
66
|
BACKUP: HistoryRevokeIcon,
|
|
@@ -78,36 +83,37 @@ const defaultIcons: {
|
|
|
78
83
|
STS_ORGANISATION: HistoryOrganisationIcon,
|
|
79
84
|
STS_IAM_ROLE: HistoryIdentifierIcon,
|
|
80
85
|
STS_TOKEN: HistoryKeyIcon,
|
|
86
|
+
SIGNATURE: HistoryCertificateIcon,
|
|
81
87
|
},
|
|
82
88
|
};
|
|
83
89
|
|
|
84
|
-
export const getHistoryItemActionIcon = (action:
|
|
90
|
+
export const getHistoryItemActionIcon = (action: HistoryActionBindingEnum) => {
|
|
85
91
|
return defaultIcons.actions[action] ?? HistoryStatusAcceptedIcon;
|
|
86
92
|
};
|
|
87
93
|
|
|
88
94
|
export type HistoryListItemIconProps = {
|
|
89
|
-
item:
|
|
95
|
+
item: HistoryListItemBindingDto;
|
|
90
96
|
};
|
|
91
97
|
|
|
92
98
|
export const HistoryListItemIcon: FC<HistoryListItemIconProps> = ({ item }) => {
|
|
93
99
|
const statusIcon = getHistoryItemActionIcon(item.action);
|
|
94
100
|
const typeIcon = useMemo(() => {
|
|
95
101
|
switch (item.entityType) {
|
|
96
|
-
case
|
|
102
|
+
case HistoryEntityTypeBindingEnum.BACKUP:
|
|
97
103
|
switch (item.action) {
|
|
98
|
-
case
|
|
104
|
+
case HistoryActionBindingEnum.CREATED:
|
|
99
105
|
return HistoryBackupCreatedIcon;
|
|
100
|
-
case
|
|
106
|
+
case HistoryActionBindingEnum.RESTORED:
|
|
101
107
|
return HistoryBackupRestoredIcon;
|
|
102
108
|
default:
|
|
103
109
|
break;
|
|
104
110
|
}
|
|
105
111
|
break;
|
|
106
|
-
case
|
|
112
|
+
case HistoryEntityTypeBindingEnum.CREDENTIAL:
|
|
107
113
|
switch (item.action) {
|
|
108
|
-
case
|
|
114
|
+
case HistoryActionBindingEnum.REVOKED:
|
|
109
115
|
return HistoryRevokeIcon;
|
|
110
|
-
case
|
|
116
|
+
case HistoryActionBindingEnum.SUSPENDED:
|
|
111
117
|
return HistorySuspendIcon;
|
|
112
118
|
default:
|
|
113
119
|
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
|
|
|
@@ -148,6 +148,7 @@ const styles = StyleSheet.create({
|
|
|
148
148
|
},
|
|
149
149
|
emptyNotice: {
|
|
150
150
|
borderRadius: 12,
|
|
151
|
+
borderWidth: 0,
|
|
151
152
|
marginHorizontal: 16,
|
|
152
153
|
paddingBottom: 20,
|
|
153
154
|
paddingHorizontal: 12,
|
|
@@ -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 }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
CredentialListItemBindingDto,
|
|
3
|
+
PresentationDefinitionV2ClaimBindingDto,
|
|
4
|
+
PresentationDefinitionV2ResponseBindingDto,
|
|
5
|
+
PresentationSubmitV2CredentialRequestBindingDto,
|
|
6
6
|
} from '@procivis/react-native-one-core';
|
|
7
7
|
import React, { FC, useCallback, useMemo } from 'react';
|
|
8
8
|
import { ImageSourcePropType, StyleProp, StyleSheet, ViewStyle } from 'react-native';
|
|
@@ -24,7 +24,7 @@ import { GroupedShareCredentialV2Padding, ShareCredentialV2 } from './share-cred
|
|
|
24
24
|
|
|
25
25
|
export type CredentialQuerySelection = Record<
|
|
26
26
|
string,
|
|
27
|
-
|
|
27
|
+
PresentationSubmitV2CredentialRequestBindingDto | PresentationSubmitV2CredentialRequestBindingDto[]
|
|
28
28
|
>;
|
|
29
29
|
|
|
30
30
|
export type ShareCredentialGroupLabels = ShareCredentialLabels & {
|
|
@@ -40,11 +40,11 @@ export type ShareCredentialV2GroupProps = {
|
|
|
40
40
|
onSelectField: (
|
|
41
41
|
requestCredentialId: string,
|
|
42
42
|
) => (
|
|
43
|
-
credentialId:
|
|
44
|
-
fieldPath:
|
|
43
|
+
credentialId: CredentialListItemBindingDto['id'],
|
|
44
|
+
fieldPath: PresentationDefinitionV2ClaimBindingDto['path'],
|
|
45
45
|
selected: boolean,
|
|
46
46
|
) => void;
|
|
47
|
-
presentationDefinition:
|
|
47
|
+
presentationDefinition: PresentationDefinitionV2ResponseBindingDto;
|
|
48
48
|
requestGroup: string[];
|
|
49
49
|
selected?: boolean;
|
|
50
50
|
selectedCredentials?: CredentialQuerySelection;
|
|
@@ -61,7 +61,7 @@ const multipleCredentialsSelected = (
|
|
|
61
61
|
selectedCredentials &&
|
|
62
62
|
selectedCredentials[credentialRequestId] &&
|
|
63
63
|
Array.isArray(selectedCredentials[credentialRequestId]) &&
|
|
64
|
-
(selectedCredentials[credentialRequestId] as
|
|
64
|
+
(selectedCredentials[credentialRequestId] as PresentationSubmitV2CredentialRequestBindingDto[]).length > 1
|
|
65
65
|
);
|
|
66
66
|
};
|
|
67
67
|
|
|
@@ -122,9 +122,9 @@ export const ShareCredentialV2Group: FC<ShareCredentialV2GroupProps> = ({
|
|
|
122
122
|
return requestGroup.flatMap((credentialRequestId, credentialRequestIndex, { length: credentialRequestsLength }) => {
|
|
123
123
|
const lastQuery = credentialRequestIndex === credentialRequestsLength - 1;
|
|
124
124
|
|
|
125
|
-
const credentialQuery = presentationDefinition.credentialQueries[credentialRequestId];
|
|
126
|
-
let defaultSelection:
|
|
127
|
-
if ('
|
|
125
|
+
const credentialQuery = presentationDefinition.credentialQueries[credentialRequestId].credentialOrFailureHint;
|
|
126
|
+
let defaultSelection: PresentationSubmitV2CredentialRequestBindingDto;
|
|
127
|
+
if (credentialQuery.type_ === 'APPLICABLE_CREDENTIALS') {
|
|
128
128
|
defaultSelection = credentialQuery.applicableCredentials?.[0]
|
|
129
129
|
? {
|
|
130
130
|
credentialId: credentialQuery.applicableCredentials[0].id,
|
|
@@ -243,6 +243,7 @@ const styles = StyleSheet.create({
|
|
|
243
243
|
},
|
|
244
244
|
groupedCredentialsWrapper: {
|
|
245
245
|
borderRadius: 10 + GroupedShareCredentialV2Padding,
|
|
246
|
+
borderWidth: 0,
|
|
246
247
|
overflow: 'hidden',
|
|
247
248
|
paddingBottom: GroupedShareCredentialV2Padding,
|
|
248
249
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
ApplicableCredentialOrFailureHintBindingEnum,
|
|
3
|
+
CredentialListItemBindingDto,
|
|
4
|
+
PresentationDefinitionV2ClaimBindingDto,
|
|
5
5
|
} from '@procivis/react-native-one-core';
|
|
6
6
|
import React, { FunctionComponent, useCallback, useMemo } from 'react';
|
|
7
7
|
import { Dimensions, ImageSourcePropType, StyleProp, StyleSheet, ViewStyle } from 'react-native';
|
|
@@ -14,7 +14,7 @@ import { ShareCredentialCardNotice } from '../share-credential-card-notice';
|
|
|
14
14
|
import { ShareCredentialLabels } from '../v1';
|
|
15
15
|
|
|
16
16
|
export type ShareCredentialV2Props = {
|
|
17
|
-
credentialQuery:
|
|
17
|
+
credentialQuery: ApplicableCredentialOrFailureHintBindingEnum;
|
|
18
18
|
credentialRequestId: string;
|
|
19
19
|
expanded?: boolean;
|
|
20
20
|
grouped?: boolean;
|
|
@@ -25,12 +25,12 @@ export type ShareCredentialV2Props = {
|
|
|
25
25
|
onImagePreview: (title: string, image: ImageSourcePropType) => void;
|
|
26
26
|
onSelectCredential?: () => void;
|
|
27
27
|
onSelectField: (
|
|
28
|
-
credentialId:
|
|
29
|
-
fieldPath:
|
|
28
|
+
credentialId: CredentialListItemBindingDto['id'],
|
|
29
|
+
fieldPath: PresentationDefinitionV2ClaimBindingDto['path'],
|
|
30
30
|
selected: boolean,
|
|
31
31
|
) => void;
|
|
32
|
-
selectedCredentialId?:
|
|
33
|
-
selectedFields?: Array<
|
|
32
|
+
selectedCredentialId?: CredentialListItemBindingDto['id'];
|
|
33
|
+
selectedFields?: Array<PresentationDefinitionV2ClaimBindingDto['path']>;
|
|
34
34
|
style?: StyleProp<ViewStyle>;
|
|
35
35
|
testID: string;
|
|
36
36
|
};
|
|
@@ -56,8 +56,8 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
|
|
|
56
56
|
}) => {
|
|
57
57
|
const colorScheme = useAppColorScheme();
|
|
58
58
|
const applicableCredentials =
|
|
59
|
-
'
|
|
60
|
-
const failureHint = '
|
|
59
|
+
credentialQuery.type_ === 'APPLICABLE_CREDENTIALS' ? credentialQuery.applicableCredentials : undefined;
|
|
60
|
+
const failureHint = credentialQuery.type_ === 'FAILURE_HINT' ? credentialQuery.failureHint : undefined;
|
|
61
61
|
const credential = applicableCredentials?.find((c) => c.id === selectedCredentialId) ?? applicableCredentials?.[0];
|
|
62
62
|
const { data: config } = useCoreConfig();
|
|
63
63
|
const cardWidth = useMemo(
|
|
@@ -131,7 +131,7 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
|
|
|
131
131
|
]);
|
|
132
132
|
|
|
133
133
|
const onAttributeSelected = useCallback(
|
|
134
|
-
(fieldPath:
|
|
134
|
+
(fieldPath: PresentationDefinitionV2ClaimBindingDto['path'], selected: boolean) => {
|
|
135
135
|
if (!selectedCredentialId) {
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
@@ -194,6 +194,7 @@ const styles = StyleSheet.create({
|
|
|
194
194
|
},
|
|
195
195
|
credential: {
|
|
196
196
|
borderRadius: 10,
|
|
197
|
+
borderWidth: 0,
|
|
197
198
|
marginBottom: 8,
|
|
198
199
|
},
|
|
199
200
|
groupedCredential: {
|
|
@@ -20,7 +20,10 @@ interface OnPressProps {
|
|
|
20
20
|
onPress?: RNOnPress | null;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const WithAccessibilityFocusHistory = <
|
|
23
|
+
const WithAccessibilityFocusHistory = <
|
|
24
|
+
ComponentProps extends OnPressProps,
|
|
25
|
+
RefType extends React.ElementType<any, any>,
|
|
26
|
+
>(
|
|
24
27
|
C: React.ComponentType<ComponentProps>,
|
|
25
28
|
displayName: string,
|
|
26
29
|
) => {
|