@procivis/one-react-native-components 0.2.54 → 0.3.22
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/README.md +3 -8
- package/lib/commonjs/components/backup/index.js.map +1 -1
- package/lib/commonjs/components/backup/preview-credentials.js +18 -22
- package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
- package/lib/commonjs/components/credential/credential.js +11 -12
- package/lib/commonjs/components/credential/credential.js.map +1 -1
- package/lib/commonjs/components/credential/index.js.map +1 -1
- package/lib/commonjs/components/entity/EntityButtons.js +20 -25
- package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-attributes.js +15 -17
- package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details-with-buttons.js +18 -19
- package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details.js +12 -14
- package/lib/commonjs/components/entity/entity-details.js.map +1 -1
- package/lib/commonjs/components/entity/index.js +2 -2
- package/lib/commonjs/components/entity/index.js.map +1 -1
- package/lib/commonjs/components/history/history-details-screen.js +67 -0
- package/lib/commonjs/components/history/history-details-screen.js.map +1 -0
- package/lib/commonjs/components/history/history-list-item-icon.js +94 -0
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -0
- package/lib/commonjs/components/history/history-list-item.js +45 -0
- package/lib/commonjs/components/history/history-list-item.js.map +1 -0
- package/lib/commonjs/components/history/history-list-screen.js +121 -0
- package/lib/commonjs/components/history/history-list-screen.js.map +1 -0
- package/lib/commonjs/components/history/history-list-section-header.js +39 -0
- package/lib/commonjs/components/history/history-list-section-header.js.map +1 -0
- package/lib/commonjs/components/history/history-list.js +100 -0
- package/lib/commonjs/components/history/history-list.js.map +1 -0
- package/lib/commonjs/components/history/index.js +72 -0
- package/lib/commonjs/components/history/index.js.map +1 -0
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/navigation/header-buttons.js +21 -25
- package/lib/commonjs/components/navigation/header-buttons.js.map +1 -1
- package/lib/commonjs/components/navigation/index.js.map +1 -1
- package/lib/commonjs/components/proof-request/group.js +4 -5
- package/lib/commonjs/components/proof-request/group.js.map +1 -1
- package/lib/commonjs/components/proof-request/index.js.map +1 -1
- package/lib/commonjs/components/proof-request/select-credential.js +11 -12
- package/lib/commonjs/components/proof-request/select-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/share-credential.js +23 -27
- package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/normalize-color.d.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibility.js +11 -7
- package/lib/commonjs/ui-components/accessibility/accessibility.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js +8 -12
- package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js +15 -17
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js +8 -10
- package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/index.js +1 -30
- package/lib/commonjs/ui-components/accessibility/index.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale/index.js +2 -3
- package/lib/commonjs/ui-components/accessibility/locale/index.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale.test.js.map +1 -1
- package/lib/commonjs/ui-components/action-modal/ActionModal.js +9 -11
- package/lib/commonjs/ui-components/action-modal/ActionModal.js.map +1 -1
- package/lib/commonjs/ui-components/action-modal/index.js +1 -1
- package/lib/commonjs/ui-components/action-modal/index.js.map +1 -1
- package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js +10 -12
- package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js.map +1 -1
- package/lib/commonjs/ui-components/activity-indicator/index.js +1 -1
- package/lib/commonjs/ui-components/activity-indicator/index.js.map +1 -1
- package/lib/commonjs/ui-components/blur/blur-view.js +13 -15
- package/lib/commonjs/ui-components/blur/blur-view.js.map +1 -1
- package/lib/commonjs/ui-components/blur/index.js +2 -2
- package/lib/commonjs/ui-components/blur/index.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/back-button.js +12 -15
- package/lib/commonjs/ui-components/buttons/back-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/button.js +19 -22
- package/lib/commonjs/ui-components/buttons/button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/connectivity-button.js +16 -18
- package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/filter-button.js +8 -10
- package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/ghost-button.js +12 -14
- package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/hold-button.js +244 -0
- package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -0
- package/lib/commonjs/ui-components/buttons/index.js +9 -37
- package/lib/commonjs/ui-components/buttons/index.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/scan-button.js +7 -9
- package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/commonjs/ui-components/camera/camera-overlay.js +11 -14
- package/lib/commonjs/ui-components/camera/camera-overlay.js.map +1 -1
- package/lib/commonjs/ui-components/camera/index.js +2 -2
- package/lib/commonjs/ui-components/camera/index.js.map +1 -1
- package/lib/commonjs/ui-components/camera/qr-code-scanner.js +12 -14
- package/lib/commonjs/ui-components/camera/qr-code-scanner.js.map +1 -1
- package/lib/commonjs/ui-components/control/checkbox.js +11 -12
- package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
- package/lib/commonjs/ui-components/control/index.js.map +1 -1
- package/lib/commonjs/ui-components/control/switch.js +10 -12
- package/lib/commonjs/ui-components/control/switch.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-card.js +22 -26
- package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +30 -35
- 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 +27 -20
- 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 +25 -24
- package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +27 -29
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/index.js +6 -41
- package/lib/commonjs/ui-components/credential/card/index.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js +51 -60
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js +18 -21
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/commonjs/ui-components/credential/index.js +2 -25
- package/lib/commonjs/ui-components/credential/index.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector-status.js +3 -4
- package/lib/commonjs/ui-components/credential/selector-status.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector.js +8 -10
- package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
- package/lib/commonjs/ui-components/detail/detail.js +12 -14
- package/lib/commonjs/ui-components/detail/detail.js.map +1 -1
- package/lib/commonjs/ui-components/detail/index.js +1 -1
- package/lib/commonjs/ui-components/detail/index.js.map +1 -1
- package/lib/commonjs/ui-components/entity/avatar.js +14 -16
- package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
- package/lib/commonjs/ui-components/entity/entity-cluster.js +15 -18
- package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/commonjs/ui-components/entity/index.js +2 -2
- package/lib/commonjs/ui-components/entity/index.js.map +1 -1
- package/lib/commonjs/ui-components/header/focus-aware-status-bar.js +3 -4
- package/lib/commonjs/ui-components/header/focus-aware-status-bar.js.map +1 -1
- package/lib/commonjs/ui-components/header/foldable-header.js +14 -17
- package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
- package/lib/commonjs/ui-components/header/header.js +12 -14
- package/lib/commonjs/ui-components/header/header.js.map +1 -1
- package/lib/commonjs/ui-components/header/index.js +4 -24
- package/lib/commonjs/ui-components/header/index.js.map +1 -1
- package/lib/commonjs/ui-components/header/navigation-header.js +27 -33
- package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/data-item.js +30 -23
- package/lib/commonjs/ui-components/history/data-item.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-details.js +181 -0
- package/lib/commonjs/ui-components/history/history-details.js.map +1 -0
- package/lib/commonjs/ui-components/history/{history-list-item.js → history-item.js} +47 -26
- package/lib/commonjs/ui-components/history/history-item.js.map +1 -0
- package/lib/commonjs/ui-components/history/history-section-header.js +7 -9
- package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js +13 -12
- package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/history/index.js +30 -9
- package/lib/commonjs/ui-components/history/index.js.map +1 -1
- package/lib/commonjs/ui-components/icons/connectivity.js +19 -24
- package/lib/commonjs/ui-components/icons/connectivity.js.map +1 -1
- package/lib/commonjs/ui-components/icons/credential.js +60 -71
- package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
- package/lib/commonjs/ui-components/icons/entity.js +7 -8
- package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
- package/lib/commonjs/ui-components/icons/history.js +113 -133
- package/lib/commonjs/ui-components/icons/history.js.map +1 -1
- package/lib/commonjs/ui-components/icons/icons.js +73 -90
- package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
- package/lib/commonjs/ui-components/icons/index.js.map +1 -1
- package/lib/commonjs/ui-components/icons/input.js +3 -3
- package/lib/commonjs/ui-components/icons/input.js.map +1 -1
- package/lib/commonjs/ui-components/icons/keypad.js +69 -81
- package/lib/commonjs/ui-components/icons/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/icons/loader.js +4 -4
- package/lib/commonjs/ui-components/icons/loader.js.map +1 -1
- package/lib/commonjs/ui-components/icons/nerd-view.js +6 -9
- package/lib/commonjs/ui-components/icons/nerd-view.js.map +1 -1
- package/lib/commonjs/ui-components/icons/selector.js +8 -9
- package/lib/commonjs/ui-components/icons/selector.js.map +1 -1
- package/lib/commonjs/ui-components/icons/wallet.js +16 -19
- package/lib/commonjs/ui-components/icons/wallet.js.map +1 -1
- package/lib/commonjs/ui-components/image/image-or-component.js +15 -18
- package/lib/commonjs/ui-components/image/image-or-component.js.map +1 -1
- package/lib/commonjs/ui-components/image/index.js +2 -9
- package/lib/commonjs/ui-components/image/index.js.map +1 -1
- package/lib/commonjs/ui-components/index.js.map +1 -1
- package/lib/commonjs/ui-components/input/index.js +2 -2
- package/lib/commonjs/ui-components/input/index.js.map +1 -1
- package/lib/commonjs/ui-components/input/radio-group.js +28 -25
- package/lib/commonjs/ui-components/input/radio-group.js.map +1 -1
- package/lib/commonjs/ui-components/input/selection-input.js +27 -38
- package/lib/commonjs/ui-components/input/selection-input.js.map +1 -1
- package/lib/commonjs/ui-components/input/text-input.js +25 -28
- package/lib/commonjs/ui-components/input/text-input.js.map +1 -1
- package/lib/commonjs/ui-components/list/index.js +20 -2
- package/lib/commonjs/ui-components/list/index.js.map +1 -1
- package/lib/commonjs/ui-components/list/list-page-loading-indicator.js +14 -0
- package/lib/commonjs/ui-components/list/list-page-loading-indicator.js.map +1 -0
- package/lib/commonjs/ui-components/list/list-section-header.js +10 -12
- package/lib/commonjs/ui-components/list/list-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/list/list-title-header.js +6 -8
- package/lib/commonjs/ui-components/list/list-title-header.js.map +1 -1
- package/lib/commonjs/ui-components/list/wallet/empty-list.js +73 -0
- package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -0
- package/lib/commonjs/ui-components/list/wallet/empty-search-result.js +41 -0
- package/lib/commonjs/ui-components/list/wallet/empty-search-result.js.map +1 -0
- package/lib/commonjs/ui-components/list/wallet/index.js +21 -0
- package/lib/commonjs/ui-components/list/wallet/index.js.map +1 -0
- package/lib/commonjs/ui-components/loader/index.js +2 -2
- package/lib/commonjs/ui-components/loader/index.js.map +1 -1
- package/lib/commonjs/ui-components/loader/loader.js +17 -17
- package/lib/commonjs/ui-components/loader/loader.js.map +1 -1
- package/lib/commonjs/ui-components/loader/loading-result.js +22 -21
- package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
- package/lib/commonjs/ui-components/nerd-view/index.js +2 -8
- package/lib/commonjs/ui-components/nerd-view/index.js.map +1 -1
- package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js +37 -41
- package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
- package/lib/commonjs/ui-components/pin/index.js +2 -2
- package/lib/commonjs/ui-components/pin/index.js.map +1 -1
- package/lib/commonjs/ui-components/pin/keypad.js +19 -23
- package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-code-screen.js +19 -21
- package/lib/commonjs/ui-components/pin/pin-code-screen.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-lock-animation.js +1 -2
- package/lib/commonjs/ui-components/pin/pin-lock-animation.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-lock.js +10 -12
- package/lib/commonjs/ui-components/pin/pin-lock.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pins.js +8 -9
- package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
- package/lib/commonjs/ui-components/screens/backup-screen.js +15 -18
- package/lib/commonjs/ui-components/screens/backup-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/image-preview-screen.js +12 -14
- package/lib/commonjs/ui-components/screens/image-preview-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/index.js +8 -49
- package/lib/commonjs/ui-components/screens/index.js.map +1 -1
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +34 -41
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js +14 -16
- package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/scroll-view-screen.js +12 -14
- package/lib/commonjs/ui-components/screens/scroll-view-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/section-list-screen.js +13 -15
- package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/animated-search-bar.js +10 -12
- package/lib/commonjs/ui-components/searchbar/animated-search-bar.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/index.js +2 -2
- package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/search-bar.js +15 -17
- package/lib/commonjs/ui-components/searchbar/search-bar.js.map +1 -1
- package/lib/commonjs/ui-components/settings/button-setting.js +14 -16
- package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
- package/lib/commonjs/ui-components/settings/index.js +2 -2
- package/lib/commonjs/ui-components/settings/index.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item-separator.js +6 -8
- package/lib/commonjs/ui-components/settings/setting-item-separator.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item.js +11 -13
- package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
- package/lib/commonjs/ui-components/settings/settings-button.js +7 -9
- package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
- package/lib/commonjs/ui-components/settings/switch-setting.js +11 -13
- package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/commonjs/ui-components/state/error-screen.js +10 -12
- package/lib/commonjs/ui-components/state/error-screen.js.map +1 -1
- package/lib/commonjs/ui-components/state/index.js +2 -2
- package/lib/commonjs/ui-components/state/index.js.map +1 -1
- package/lib/commonjs/ui-components/text/base.js +14 -16
- package/lib/commonjs/ui-components/text/base.js.map +1 -1
- package/lib/commonjs/ui-components/text/font.js +11 -13
- package/lib/commonjs/ui-components/text/font.js.map +1 -1
- package/lib/commonjs/ui-components/text/index.js +2 -9
- package/lib/commonjs/ui-components/text/index.js.map +1 -1
- package/lib/commonjs/ui-components/text/typography.js +10 -13
- package/lib/commonjs/ui-components/text/typography.js.map +1 -1
- package/lib/commonjs/ui-components/theme/color-scheme-context.js +2 -1
- package/lib/commonjs/ui-components/theme/color-scheme-context.js.map +1 -1
- package/lib/commonjs/ui-components/theme/color-scheme.js.map +1 -1
- package/lib/commonjs/ui-components/theme/index.js.map +1 -1
- package/lib/commonjs/utils/array.js.map +1 -1
- package/lib/commonjs/utils/backup.js.map +1 -1
- package/lib/commonjs/utils/color.js +1 -1
- package/lib/commonjs/utils/color.js.map +1 -1
- package/lib/commonjs/utils/contrasting-status-bar.js +8 -10
- package/lib/commonjs/utils/contrasting-status-bar.js.map +1 -1
- package/lib/commonjs/utils/date.js +3 -3
- package/lib/commonjs/utils/date.js.map +1 -1
- package/lib/commonjs/utils/filtering.js +11 -0
- package/lib/commonjs/utils/filtering.js.map +1 -0
- package/lib/commonjs/utils/history.js +76 -0
- package/lib/commonjs/utils/history.js.map +1 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.js +37 -23
- package/lib/commonjs/utils/hooks/connectivity/connectivity.js.map +1 -1
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +6 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/backup.js +31 -31
- package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/cache.js +44 -0
- package/lib/commonjs/utils/hooks/core/cache.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/core-config.js +15 -1
- package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-context.js +15 -10
- package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-init.js +18 -12
- package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credential-schemas.js +16 -27
- package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credentials.js +27 -37
- package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/dids.js +4 -6
- package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/error-code.js +3 -4
- package/lib/commonjs/utils/hooks/core/error-code.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/history.js +5 -37
- package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/index.js +11 -0
- package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proof-schemas.js +23 -38
- package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proofs.js +107 -76
- package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/query.js +1 -2
- package/lib/commonjs/utils/hooks/core/query.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/trust-entity.js +8 -4
- package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
- package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +1 -2
- package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -1
- package/lib/commonjs/utils/hooks/http/client.js.map +1 -1
- package/lib/commonjs/utils/hooks/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/list/list-content-inset.js +9 -10
- package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/before-remove.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/deep-link.js +3 -4
- package/lib/commonjs/utils/hooks/navigation/deep-link.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/open-settings.js +1 -2
- package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/commonjs/utils/hooks/pin-security/pin-security.js +1 -2
- package/lib/commonjs/utils/hooks/pin-security/pin-security.js.map +1 -1
- package/lib/commonjs/utils/hooks/revocation/credential-status.js +17 -26
- package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/commonjs/utils/index.js +37 -1
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/navigation.js +5 -5
- package/lib/commonjs/utils/navigation.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing.js +16 -20
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js +16 -26
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/commonjs/utils/parsers/index.js +11 -0
- package/lib/commonjs/utils/parsers/index.js.map +1 -1
- package/lib/commonjs/utils/parsers/query.js +3 -2
- package/lib/commonjs/utils/parsers/query.js.map +1 -1
- package/lib/commonjs/utils/parsers/universal-links.js +33 -0
- package/lib/commonjs/utils/parsers/universal-links.js.map +1 -0
- package/lib/commonjs/utils/parsers/universal-links.test.js +40 -0
- package/lib/commonjs/utils/parsers/universal-links.test.js.map +1 -0
- package/lib/commonjs/utils/ref.js.map +1 -1
- package/lib/commonjs/utils/reporting.js +4 -2
- package/lib/commonjs/utils/reporting.js.map +1 -1
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/utils/testID.js +1 -4
- package/lib/commonjs/utils/testID.js.map +1 -1
- package/lib/commonjs/utils/testID.test.js.map +1 -1
- package/lib/commonjs/utils/useMemoAsync.js +9 -0
- package/lib/commonjs/utils/useMemoAsync.js.map +1 -1
- package/lib/commonjs/utils/uuid.js +1 -1
- package/lib/commonjs/utils/uuid.js.map +1 -1
- package/lib/module/components/backup/index.js.map +1 -1
- package/lib/module/components/backup/preview-credentials.js +17 -21
- package/lib/module/components/backup/preview-credentials.js.map +1 -1
- package/lib/module/components/credential/credential.js +10 -11
- package/lib/module/components/credential/credential.js.map +1 -1
- package/lib/module/components/credential/index.js.map +1 -1
- package/lib/module/components/entity/EntityButtons.js +17 -21
- package/lib/module/components/entity/EntityButtons.js.map +1 -1
- package/lib/module/components/entity/entity-attributes.js +12 -13
- package/lib/module/components/entity/entity-attributes.js.map +1 -1
- package/lib/module/components/entity/entity-details-with-buttons.js +15 -15
- package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/module/components/entity/entity-details.js +8 -9
- package/lib/module/components/entity/entity-details.js.map +1 -1
- package/lib/module/components/entity/index.js.map +1 -1
- package/lib/module/components/history/history-details-screen.js +59 -0
- package/lib/module/components/history/history-details-screen.js.map +1 -0
- package/lib/module/components/history/history-list-item-icon.js +84 -0
- package/lib/module/components/history/history-list-item-icon.js.map +1 -0
- package/lib/module/components/history/history-list-item.js +36 -0
- package/lib/module/components/history/history-list-item.js.map +1 -0
- package/lib/module/components/history/history-list-screen.js +112 -0
- package/lib/module/components/history/history-list-screen.js.map +1 -0
- package/lib/module/components/history/history-list-section-header.js +29 -0
- package/lib/module/components/history/history-list-section-header.js.map +1 -0
- package/lib/module/components/history/history-list.js +90 -0
- package/lib/module/components/history/history-list.js.map +1 -0
- package/lib/module/components/history/index.js +7 -0
- package/lib/module/components/history/index.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/navigation/header-buttons.js +19 -23
- package/lib/module/components/navigation/header-buttons.js.map +1 -1
- package/lib/module/components/navigation/index.js.map +1 -1
- package/lib/module/components/proof-request/group.js +3 -4
- package/lib/module/components/proof-request/group.js.map +1 -1
- package/lib/module/components/proof-request/index.js.map +1 -1
- package/lib/module/components/proof-request/select-credential.js +10 -11
- package/lib/module/components/proof-request/select-credential.js.map +1 -1
- package/lib/module/components/proof-request/share-credential.js +21 -25
- package/lib/module/components/proof-request/share-credential.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/normalize-color.d.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibility.js +5 -7
- package/lib/module/ui-components/accessibility/accessibility.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistory.js +4 -8
- package/lib/module/ui-components/accessibility/accessibilityHistory.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js +10 -8
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityLanguage.js +6 -8
- package/lib/module/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
- package/lib/module/ui-components/accessibility/index.js +4 -4
- package/lib/module/ui-components/accessibility/index.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale/index.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale.test.js.map +1 -1
- package/lib/module/ui-components/action-modal/ActionModal.js +7 -8
- package/lib/module/ui-components/action-modal/ActionModal.js.map +1 -1
- package/lib/module/ui-components/action-modal/index.js.map +1 -1
- package/lib/module/ui-components/activity-indicator/activity-indicator.js +6 -7
- package/lib/module/ui-components/activity-indicator/activity-indicator.js.map +1 -1
- package/lib/module/ui-components/activity-indicator/index.js.map +1 -1
- package/lib/module/ui-components/blur/blur-view.js +10 -11
- package/lib/module/ui-components/blur/blur-view.js.map +1 -1
- package/lib/module/ui-components/blur/index.js.map +1 -1
- package/lib/module/ui-components/buttons/back-button.js +10 -11
- package/lib/module/ui-components/buttons/back-button.js.map +1 -1
- package/lib/module/ui-components/buttons/button.js +17 -18
- package/lib/module/ui-components/buttons/button.js.map +1 -1
- package/lib/module/ui-components/buttons/connectivity-button.js +14 -14
- package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/module/ui-components/buttons/filter-button.js +6 -7
- package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/module/ui-components/buttons/ghost-button.js +9 -10
- package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/module/ui-components/buttons/hold-button.js +236 -0
- package/lib/module/ui-components/buttons/hold-button.js.map +1 -0
- package/lib/module/ui-components/buttons/index.js +8 -7
- package/lib/module/ui-components/buttons/index.js.map +1 -1
- package/lib/module/ui-components/buttons/scan-button.js +5 -6
- package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/module/ui-components/camera/camera-overlay.js +7 -9
- package/lib/module/ui-components/camera/camera-overlay.js.map +1 -1
- package/lib/module/ui-components/camera/index.js.map +1 -1
- package/lib/module/ui-components/camera/qr-code-scanner.js +8 -9
- package/lib/module/ui-components/camera/qr-code-scanner.js.map +1 -1
- package/lib/module/ui-components/control/checkbox.js +9 -10
- package/lib/module/ui-components/control/checkbox.js.map +1 -1
- package/lib/module/ui-components/control/index.js.map +1 -1
- package/lib/module/ui-components/control/switch.js +8 -9
- package/lib/module/ui-components/control/switch.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-card.js +16 -17
- package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js +26 -30
- 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 +23 -15
- 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 +21 -19
- package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-image-carousel.js +23 -23
- package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/module/ui-components/credential/card/index.js +10 -10
- package/lib/module/ui-components/credential/card/index.js.map +1 -1
- package/lib/module/ui-components/credential/credential-attribute-item.js +47 -55
- package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js +15 -18
- package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/module/ui-components/credential/index.js +2 -2
- package/lib/module/ui-components/credential/index.js.map +1 -1
- package/lib/module/ui-components/credential/selector-status.js +3 -3
- package/lib/module/ui-components/credential/selector-status.js.map +1 -1
- package/lib/module/ui-components/credential/selector.js +5 -6
- package/lib/module/ui-components/credential/selector.js.map +1 -1
- package/lib/module/ui-components/detail/detail.js +9 -10
- package/lib/module/ui-components/detail/detail.js.map +1 -1
- package/lib/module/ui-components/detail/index.js.map +1 -1
- package/lib/module/ui-components/entity/avatar.js +10 -11
- package/lib/module/ui-components/entity/avatar.js.map +1 -1
- package/lib/module/ui-components/entity/entity-cluster.js +11 -13
- package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/module/ui-components/entity/index.js.map +1 -1
- package/lib/module/ui-components/header/focus-aware-status-bar.js +1 -1
- package/lib/module/ui-components/header/focus-aware-status-bar.js.map +1 -1
- package/lib/module/ui-components/header/foldable-header.js +10 -12
- package/lib/module/ui-components/header/foldable-header.js.map +1 -1
- package/lib/module/ui-components/header/header.js +10 -11
- package/lib/module/ui-components/header/header.js.map +1 -1
- package/lib/module/ui-components/header/index.js +6 -6
- package/lib/module/ui-components/header/index.js.map +1 -1
- package/lib/module/ui-components/header/navigation-header.js +23 -28
- package/lib/module/ui-components/header/navigation-header.js.map +1 -1
- package/lib/module/ui-components/history/data-item.js +23 -15
- package/lib/module/ui-components/history/data-item.js.map +1 -1
- package/lib/module/ui-components/history/history-details.js +171 -0
- package/lib/module/ui-components/history/history-details.js.map +1 -0
- package/lib/module/ui-components/history/{history-list-item.js → history-item.js} +44 -22
- package/lib/module/ui-components/history/history-item.js.map +1 -0
- package/lib/module/ui-components/history/history-section-header.js +6 -7
- package/lib/module/ui-components/history/history-section-header.js.map +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js +8 -9
- package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/module/ui-components/history/index.js +5 -4
- package/lib/module/ui-components/history/index.js.map +1 -1
- package/lib/module/ui-components/icons/connectivity.js +16 -21
- package/lib/module/ui-components/icons/connectivity.js.map +1 -1
- package/lib/module/ui-components/icons/credential.js +57 -68
- package/lib/module/ui-components/icons/credential.js.map +1 -1
- package/lib/module/ui-components/icons/entity.js +4 -5
- package/lib/module/ui-components/icons/entity.js.map +1 -1
- package/lib/module/ui-components/icons/history.js +101 -128
- package/lib/module/ui-components/icons/history.js.map +1 -1
- package/lib/module/ui-components/icons/icons.js +70 -87
- package/lib/module/ui-components/icons/icons.js.map +1 -1
- package/lib/module/ui-components/icons/index.js.map +1 -1
- package/lib/module/ui-components/icons/input.js.map +1 -1
- package/lib/module/ui-components/icons/keypad.js +66 -78
- package/lib/module/ui-components/icons/keypad.js.map +1 -1
- package/lib/module/ui-components/icons/loader.js +1 -1
- package/lib/module/ui-components/icons/loader.js.map +1 -1
- package/lib/module/ui-components/icons/nerd-view.js.map +1 -1
- package/lib/module/ui-components/icons/selector.js +5 -6
- package/lib/module/ui-components/icons/selector.js.map +1 -1
- package/lib/module/ui-components/icons/wallet.js +13 -16
- package/lib/module/ui-components/icons/wallet.js.map +1 -1
- package/lib/module/ui-components/image/image-or-component.js +12 -14
- package/lib/module/ui-components/image/image-or-component.js.map +1 -1
- package/lib/module/ui-components/image/index.js +2 -2
- package/lib/module/ui-components/image/index.js.map +1 -1
- package/lib/module/ui-components/index.js.map +1 -1
- package/lib/module/ui-components/input/index.js.map +1 -1
- package/lib/module/ui-components/input/radio-group.js +26 -22
- package/lib/module/ui-components/input/radio-group.js.map +1 -1
- package/lib/module/ui-components/input/selection-input.js +21 -31
- package/lib/module/ui-components/input/selection-input.js.map +1 -1
- package/lib/module/ui-components/input/text-input.js +21 -22
- package/lib/module/ui-components/input/text-input.js.map +1 -1
- package/lib/module/ui-components/list/index.js +1 -0
- package/lib/module/ui-components/list/index.js.map +1 -1
- package/lib/module/ui-components/list/list-page-loading-indicator.js +7 -0
- package/lib/module/ui-components/list/list-page-loading-indicator.js.map +1 -0
- package/lib/module/ui-components/list/list-section-header.js +8 -9
- package/lib/module/ui-components/list/list-section-header.js.map +1 -1
- package/lib/module/ui-components/list/list-title-header.js +4 -5
- package/lib/module/ui-components/list/list-title-header.js.map +1 -1
- package/lib/module/ui-components/list/wallet/empty-list.js +66 -0
- package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -0
- package/lib/module/ui-components/list/wallet/empty-search-result.js +34 -0
- package/lib/module/ui-components/list/wallet/empty-search-result.js.map +1 -0
- package/lib/module/ui-components/list/wallet/index.js +4 -0
- package/lib/module/ui-components/list/wallet/index.js.map +1 -0
- package/lib/module/ui-components/loader/index.js.map +1 -1
- package/lib/module/ui-components/loader/loader.js +14 -12
- package/lib/module/ui-components/loader/loader.js.map +1 -1
- package/lib/module/ui-components/loader/loading-result.js +21 -19
- package/lib/module/ui-components/loader/loading-result.js.map +1 -1
- package/lib/module/ui-components/nerd-view/index.js +2 -2
- package/lib/module/ui-components/nerd-view/index.js.map +1 -1
- package/lib/module/ui-components/nerd-view/nerd-mode-item.js +31 -34
- package/lib/module/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
- package/lib/module/ui-components/pin/index.js.map +1 -1
- package/lib/module/ui-components/pin/keypad.js +17 -19
- package/lib/module/ui-components/pin/keypad.js.map +1 -1
- package/lib/module/ui-components/pin/pin-code-screen.js +16 -17
- package/lib/module/ui-components/pin/pin-code-screen.js.map +1 -1
- package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -1
- package/lib/module/ui-components/pin/pin-lock.js +6 -7
- package/lib/module/ui-components/pin/pin-lock.js.map +1 -1
- package/lib/module/ui-components/pin/pins.js +7 -8
- package/lib/module/ui-components/pin/pins.js.map +1 -1
- package/lib/module/ui-components/screens/backup-screen.js +13 -14
- package/lib/module/ui-components/screens/backup-screen.js.map +1 -1
- package/lib/module/ui-components/screens/image-preview-screen.js +9 -10
- package/lib/module/ui-components/screens/image-preview-screen.js.map +1 -1
- package/lib/module/ui-components/screens/index.js +12 -12
- package/lib/module/ui-components/screens/index.js.map +1 -1
- package/lib/module/ui-components/screens/nerd-mode-screen.js +29 -34
- package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/module/ui-components/screens/qr-code-scanner-screen.js +10 -11
- package/lib/module/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
- package/lib/module/ui-components/screens/scroll-view-screen.js +10 -11
- package/lib/module/ui-components/screens/scroll-view-screen.js.map +1 -1
- package/lib/module/ui-components/screens/section-list-screen.js +11 -12
- package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/module/ui-components/searchbar/animated-search-bar.js +6 -7
- package/lib/module/ui-components/searchbar/animated-search-bar.js.map +1 -1
- package/lib/module/ui-components/searchbar/index.js.map +1 -1
- package/lib/module/ui-components/searchbar/search-bar.js +11 -12
- package/lib/module/ui-components/searchbar/search-bar.js.map +1 -1
- package/lib/module/ui-components/settings/button-setting.js +10 -11
- package/lib/module/ui-components/settings/button-setting.js.map +1 -1
- package/lib/module/ui-components/settings/index.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item-separator.js +4 -5
- package/lib/module/ui-components/settings/setting-item-separator.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item.js +7 -8
- package/lib/module/ui-components/settings/setting-item.js.map +1 -1
- package/lib/module/ui-components/settings/settings-button.js +5 -6
- package/lib/module/ui-components/settings/settings-button.js.map +1 -1
- package/lib/module/ui-components/settings/switch-setting.js +9 -10
- package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/module/ui-components/state/error-screen.js +7 -8
- package/lib/module/ui-components/state/error-screen.js.map +1 -1
- package/lib/module/ui-components/state/index.js.map +1 -1
- package/lib/module/ui-components/text/base.js +12 -13
- package/lib/module/ui-components/text/base.js.map +1 -1
- package/lib/module/ui-components/text/font.js +10 -11
- package/lib/module/ui-components/text/font.js.map +1 -1
- package/lib/module/ui-components/text/index.js +2 -2
- package/lib/module/ui-components/text/index.js.map +1 -1
- package/lib/module/ui-components/text/typography.js +8 -10
- package/lib/module/ui-components/text/typography.js.map +1 -1
- package/lib/module/ui-components/theme/color-scheme-context.js +1 -0
- package/lib/module/ui-components/theme/color-scheme-context.js.map +1 -1
- package/lib/module/ui-components/theme/color-scheme.js.map +1 -1
- package/lib/module/ui-components/theme/index.js.map +1 -1
- package/lib/module/utils/array.js.map +1 -1
- package/lib/module/utils/backup.js.map +1 -1
- package/lib/module/utils/color.js.map +1 -1
- package/lib/module/utils/contrasting-status-bar.js +5 -6
- package/lib/module/utils/contrasting-status-bar.js.map +1 -1
- package/lib/module/utils/date.js +4 -4
- package/lib/module/utils/date.js.map +1 -1
- package/lib/module/utils/filtering.js +4 -0
- package/lib/module/utils/filtering.js.map +1 -0
- package/lib/module/utils/history.js +66 -0
- package/lib/module/utils/history.js.map +1 -0
- package/lib/module/utils/hooks/connectivity/connectivity.js +36 -19
- package/lib/module/utils/hooks/connectivity/connectivity.js.map +1 -1
- package/lib/module/utils/hooks/connectivity/connectivity.test.js +6 -0
- package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/module/utils/hooks/core/backup.js +31 -31
- package/lib/module/utils/hooks/core/backup.js.map +1 -1
- package/lib/module/utils/hooks/core/cache.js +37 -0
- package/lib/module/utils/hooks/core/cache.js.map +1 -0
- package/lib/module/utils/hooks/core/core-config.js +11 -0
- package/lib/module/utils/hooks/core/core-config.js.map +1 -1
- package/lib/module/utils/hooks/core/core-context.js +14 -9
- package/lib/module/utils/hooks/core/core-context.js.map +1 -1
- package/lib/module/utils/hooks/core/core-init.js +16 -8
- package/lib/module/utils/hooks/core/core-init.js.map +1 -1
- package/lib/module/utils/hooks/core/credential-schemas.js +12 -19
- package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/credentials.js +26 -36
- package/lib/module/utils/hooks/core/credentials.js.map +1 -1
- package/lib/module/utils/hooks/core/dids.js +3 -4
- package/lib/module/utils/hooks/core/dids.js.map +1 -1
- package/lib/module/utils/hooks/core/error-code.js +3 -3
- package/lib/module/utils/hooks/core/error-code.js.map +1 -1
- package/lib/module/utils/hooks/core/history.js +4 -35
- package/lib/module/utils/hooks/core/history.js.map +1 -1
- package/lib/module/utils/hooks/core/index.js +1 -0
- package/lib/module/utils/hooks/core/index.js.map +1 -1
- package/lib/module/utils/hooks/core/proof-schemas.js +19 -30
- package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/proofs.js +101 -67
- package/lib/module/utils/hooks/core/proofs.js.map +1 -1
- package/lib/module/utils/hooks/core/query.js.map +1 -1
- package/lib/module/utils/hooks/core/trust-entity.js +7 -3
- package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/module/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
- package/lib/module/utils/hooks/header/on-scroll-header-state.js +1 -2
- package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -1
- package/lib/module/utils/hooks/http/client.js.map +1 -1
- package/lib/module/utils/hooks/index.js.map +1 -1
- package/lib/module/utils/hooks/list/list-content-inset.js +9 -10
- package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -1
- package/lib/module/utils/hooks/navigation/before-remove.js.map +1 -1
- package/lib/module/utils/hooks/navigation/close-button-timeout.js.map +1 -1
- package/lib/module/utils/hooks/navigation/deep-link.js +3 -4
- package/lib/module/utils/hooks/navigation/deep-link.js.map +1 -1
- package/lib/module/utils/hooks/navigation/index.js.map +1 -1
- package/lib/module/utils/hooks/navigation/open-settings.js +1 -2
- package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/module/utils/hooks/pin-security/pin-security.js +1 -2
- package/lib/module/utils/hooks/pin-security/pin-security.js.map +1 -1
- package/lib/module/utils/hooks/revocation/credential-status.js +17 -26
- package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/module/utils/index.js +3 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/navigation.js +5 -5
- package/lib/module/utils/navigation.js.map +1 -1
- package/lib/module/utils/parsers/credential-images.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing.js +15 -19
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js +16 -25
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/module/utils/parsers/index.js +1 -0
- package/lib/module/utils/parsers/index.js.map +1 -1
- package/lib/module/utils/parsers/query.js +3 -2
- package/lib/module/utils/parsers/query.js.map +1 -1
- package/lib/module/utils/parsers/universal-links.js +25 -0
- package/lib/module/utils/parsers/universal-links.js.map +1 -0
- package/lib/module/utils/parsers/universal-links.test.js +38 -0
- package/lib/module/utils/parsers/universal-links.test.js.map +1 -0
- package/lib/module/utils/ref.js.map +1 -1
- package/lib/module/utils/reporting.js +1 -0
- package/lib/module/utils/reporting.js.map +1 -1
- package/lib/module/utils/string.js.map +1 -1
- package/lib/module/utils/testID.js +1 -4
- package/lib/module/utils/testID.js.map +1 -1
- package/lib/module/utils/testID.test.js.map +1 -1
- package/lib/module/utils/useMemoAsync.js +10 -0
- package/lib/module/utils/useMemoAsync.js.map +1 -1
- package/lib/module/utils/uuid.js.map +1 -1
- package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
- package/lib/typescript/components/history/history-details-screen.d.ts +20 -0
- package/lib/typescript/components/history/history-list-item-icon.d.ts +8 -0
- package/lib/typescript/components/history/history-list-item.d.ts +20 -0
- package/lib/typescript/components/history/history-list-screen.d.ts +22 -0
- package/lib/typescript/components/history/history-list-section-header.d.ts +13 -0
- package/lib/typescript/components/history/history-list.d.ts +19 -0
- package/lib/typescript/components/history/index.d.ts +6 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/ui-components/accessibility/accessibility.d.ts +2 -2
- package/lib/typescript/ui-components/accessibility/accessibilityHistory.d.ts +1 -1
- package/lib/typescript/ui-components/accessibility/accessibilityHistoryWrappers.d.ts +3 -3
- package/lib/typescript/ui-components/accessibility/index.d.ts +5 -3
- package/lib/typescript/ui-components/buttons/button.d.ts +2 -2
- package/lib/typescript/ui-components/buttons/hold-button.d.ts +16 -0
- package/lib/typescript/ui-components/buttons/index.d.ts +15 -7
- package/lib/typescript/ui-components/buttons/scan-button.d.ts +2 -2
- package/lib/typescript/ui-components/credential/card/credential-header.d.ts +1 -1
- package/lib/typescript/ui-components/credential/card/index.d.ts +10 -5
- package/lib/typescript/ui-components/credential/index.d.ts +2 -1
- package/lib/typescript/ui-components/header/index.d.ts +6 -3
- package/lib/typescript/ui-components/history/data-item.d.ts +2 -2
- package/lib/typescript/ui-components/history/history-details.d.ts +51 -0
- package/lib/typescript/ui-components/history/{history-list-item.d.ts → history-item.d.ts} +4 -3
- package/lib/typescript/ui-components/history/history-section-header.d.ts +2 -2
- package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
- package/lib/typescript/ui-components/history/index.d.ts +5 -4
- package/lib/typescript/ui-components/icons/history.d.ts +20 -35
- package/lib/typescript/ui-components/image/index.d.ts +2 -1
- package/lib/typescript/ui-components/input/selection-input.d.ts +1 -1
- package/lib/typescript/ui-components/list/index.d.ts +1 -0
- package/lib/typescript/ui-components/list/list-page-loading-indicator.d.ts +4 -0
- package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +10 -0
- package/lib/typescript/ui-components/list/wallet/empty-search-result.d.ts +7 -0
- package/lib/typescript/ui-components/list/wallet/index.d.ts +3 -0
- package/lib/typescript/ui-components/nerd-view/index.d.ts +2 -1
- package/lib/typescript/ui-components/pin/keypad.d.ts +2 -2
- package/lib/typescript/ui-components/screens/index.d.ts +12 -6
- package/lib/typescript/ui-components/text/index.d.ts +2 -1
- package/lib/typescript/ui-components/text/typography.d.ts +14 -14
- package/lib/typescript/ui-components/theme/color-scheme.d.ts +1 -0
- package/lib/typescript/utils/filtering.d.ts +1 -0
- package/lib/typescript/utils/history.d.ts +10 -0
- package/lib/typescript/utils/hooks/connectivity/connectivity.d.ts +1 -1
- package/lib/typescript/utils/hooks/core/backup.d.ts +2 -1
- package/lib/typescript/utils/hooks/core/cache.d.ts +2 -0
- package/lib/typescript/utils/hooks/core/core-config.d.ts +5 -1
- package/lib/typescript/utils/hooks/core/core-init.d.ts +10 -1
- package/lib/typescript/utils/hooks/core/credentials.d.ts +7 -3
- package/lib/typescript/utils/hooks/core/history.d.ts +2 -5
- package/lib/typescript/utils/hooks/core/index.d.ts +1 -0
- package/lib/typescript/utils/hooks/core/proofs.d.ts +14 -8
- package/lib/typescript/utils/hooks/core/trust-entity.d.ts +5 -0
- package/lib/typescript/utils/hooks/revocation/credential-status.d.ts +2 -1
- package/lib/typescript/utils/index.d.ts +3 -0
- package/lib/typescript/utils/parsers/index.d.ts +1 -0
- package/lib/typescript/utils/parsers/universal-links.d.ts +1 -0
- package/lib/typescript/utils/parsers/universal-links.test.d.ts +1 -0
- package/lib/typescript/utils/ref.d.ts +1 -1
- package/package.json +60 -46
- package/src/components/entity/entity-attributes.tsx +4 -3
- package/src/components/entity/entity-details-with-buttons.tsx +4 -3
- package/src/components/history/history-details-screen.tsx +89 -0
- package/src/components/history/history-list-item-icon.tsx +108 -0
- package/src/components/history/history-list-item.tsx +53 -0
- package/src/components/history/history-list-screen.tsx +154 -0
- package/src/components/history/history-list-section-header.tsx +42 -0
- package/src/components/history/history-list.tsx +116 -0
- package/src/components/history/index.tsx +6 -0
- package/src/components/index.ts +1 -0
- package/src/ui-components/accessibility/accessibility.ts +2 -2
- package/src/ui-components/accessibility/accessibilityHistory.tsx +2 -2
- package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +3 -5
- package/src/ui-components/accessibility/index.ts +4 -3
- package/src/ui-components/action-modal/ActionModal.stories.tsx +7 -3
- package/src/ui-components/activity-indicator/activity-indicator.stories.tsx +3 -6
- package/src/ui-components/buttons/back-button.stories.tsx +7 -8
- package/src/ui-components/buttons/button.stories.tsx +9 -10
- package/src/ui-components/buttons/connectivity-button.stories.tsx +10 -11
- package/src/ui-components/buttons/connectivity-button.tsx +1 -1
- package/src/ui-components/buttons/ghost-button.stories.tsx +8 -8
- package/src/ui-components/buttons/hold-button.stories.tsx +29 -0
- package/src/ui-components/buttons/hold-button.tsx +276 -0
- package/src/ui-components/buttons/index.ts +16 -6
- package/src/ui-components/buttons/scan-button.stories.tsx +8 -4
- package/src/ui-components/control/checkbox.stories.tsx +8 -8
- package/src/ui-components/control/switch.stories.tsx +11 -8
- package/src/ui-components/credential/card/credential-card.stories.tsx +22 -25
- package/src/ui-components/credential/card/credential-details-card.stories.tsx +249 -245
- package/src/ui-components/credential/card/credential-details-card.tsx +2 -2
- package/src/ui-components/credential/card/credential-details-list-item.tsx +16 -6
- package/src/ui-components/credential/card/credential-header.stories.tsx +15 -17
- package/src/ui-components/credential/card/credential-header.tsx +4 -1
- package/src/ui-components/credential/card/credential-image-carousel.tsx +4 -0
- package/src/ui-components/credential/card/index.ts +11 -5
- package/src/ui-components/credential/index.ts +2 -1
- package/src/ui-components/credential/selector.stories.tsx +7 -7
- package/src/ui-components/detail/detail.stories.tsx +11 -8
- package/src/ui-components/entity/avatar.stories.tsx +10 -7
- package/src/ui-components/entity/entity-cluster.stories.tsx +11 -8
- package/src/ui-components/header/header.stories.tsx +10 -7
- package/src/ui-components/header/index.ts +6 -3
- package/src/ui-components/header/navigation-header.stories.tsx +11 -8
- package/src/ui-components/history/data-item.tsx +13 -4
- package/src/ui-components/history/history-details.tsx +247 -0
- package/src/ui-components/history/{history-list-item.tsx → history-item.tsx} +72 -33
- package/src/ui-components/history/history-section-header.tsx +2 -2
- package/src/ui-components/history/history-section-list-item.tsx +3 -3
- package/src/ui-components/history/index.ts +5 -4
- package/src/ui-components/icons/history.tsx +82 -131
- package/src/ui-components/image/index.tsx +2 -1
- package/src/ui-components/input/radio-group.stories.tsx +34 -0
- package/src/ui-components/input/radio-group.tsx +8 -2
- package/src/ui-components/input/selection-input.stories.tsx +20 -17
- package/src/ui-components/list/index.ts +1 -0
- package/src/ui-components/list/list-page-loading-indicator.tsx +8 -0
- package/src/ui-components/list/wallet/empty-list.tsx +75 -0
- package/src/ui-components/list/wallet/empty-search-result.tsx +39 -0
- package/src/ui-components/list/wallet/index.tsx +4 -0
- package/src/ui-components/loader/loader.stories.tsx +6 -9
- package/src/ui-components/loader/loader.tsx +6 -3
- package/src/ui-components/loader/loading-result.stories.tsx +13 -10
- package/src/ui-components/loader/loading-result.tsx +8 -4
- package/src/ui-components/nerd-view/index.ts +2 -1
- package/src/ui-components/nerd-view/nerd-mode-item.tsx +2 -2
- package/src/ui-components/pin/pin-code-screen.stories.tsx +20 -13
- package/src/ui-components/screens/image-preview-screen.stories.tsx +9 -6
- package/src/ui-components/screens/index.ts +12 -6
- package/src/ui-components/screens/nerd-mode-screen.tsx +1 -1
- package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +10 -7
- package/src/ui-components/searchbar/search-bar.stories.tsx +15 -8
- package/src/ui-components/searchbar/search-bar.tsx +2 -2
- package/src/ui-components/state/error-screen.stories.tsx +8 -9
- package/src/ui-components/state/error-screen.tsx +1 -1
- package/src/ui-components/text/index.ts +2 -1
- package/src/ui-components/text/typography.stories.tsx +19 -12
- package/src/ui-components/theme/color-scheme-context.tsx +1 -0
- package/src/ui-components/theme/color-scheme.ts +1 -0
- package/src/utils/date.ts +5 -5
- package/src/utils/filtering.ts +5 -0
- package/src/utils/history.ts +71 -0
- package/src/utils/hooks/connectivity/connectivity.test.ts +8 -0
- package/src/utils/hooks/connectivity/connectivity.ts +28 -4
- package/src/utils/hooks/core/backup.ts +25 -21
- package/src/utils/hooks/core/cache.ts +43 -0
- package/src/utils/hooks/core/core-config.ts +19 -0
- package/src/utils/hooks/core/core-context.tsx +15 -2
- package/src/utils/hooks/core/core-init.ts +21 -7
- package/src/utils/hooks/core/credential-schemas.ts +1 -1
- package/src/utils/hooks/core/credentials.ts +9 -14
- package/src/utils/hooks/core/history.ts +2 -57
- package/src/utils/hooks/core/index.ts +1 -0
- package/src/utils/hooks/core/proof-schemas.ts +1 -1
- package/src/utils/hooks/core/proofs.ts +107 -49
- package/src/utils/hooks/core/trust-entity.ts +7 -3
- package/src/utils/hooks/navigation/open-settings.ts +2 -3
- package/src/utils/hooks/revocation/credential-status.ts +3 -2
- package/src/utils/index.ts +3 -0
- package/src/utils/navigation.ts +4 -2
- package/src/utils/parsers/credential.ts +1 -1
- package/src/utils/parsers/index.ts +1 -0
- package/src/utils/parsers/query.tsx +2 -0
- package/src/utils/parsers/universal-links.test.ts +57 -0
- package/src/utils/parsers/universal-links.ts +26 -0
- package/src/utils/ref.ts +1 -1
- package/src/utils/reporting.ts +1 -0
- package/lib/commonjs/ui-components/history/history-list-item.js.map +0 -1
- package/lib/module/ui-components/history/history-list-item.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["create","useMemo","useHTTPClient","headers","Accept","baseURL","undefined"],"sources":["client.ts"],"sourcesContent":["import { ApisauceInstance, create } from 'apisauce';\nimport { useMemo } from 'react';\n\nexport const useHTTPClient = () => {\n return useMemo<ApisauceInstance>(() => {\n return create({\n headers: {\n Accept: 'application/json',\n },\n baseURL: undefined,\n });\n }, []);\n};\n"],"mappings":"AAAA,SAA2BA,MAAM,QAAQ,UAAU;AACnD,SAASC,OAAO,QAAQ,OAAO;AAE/B,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EACjC,OAAOD,OAAO,CAAmB,MAAM;IACrC,OAAOD,MAAM,CAAC;MACZG,OAAO,EAAE;QACPC,MAAM,EAAE;MACV,CAAC;MACDC,OAAO,EAAEC;IACX,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;AACR,CAAC"}
|
|
1
|
+
{"version":3,"names":["create","useMemo","useHTTPClient","headers","Accept","baseURL","undefined"],"sources":["client.ts"],"sourcesContent":["import { ApisauceInstance, create } from 'apisauce';\nimport { useMemo } from 'react';\n\nexport const useHTTPClient = () => {\n return useMemo<ApisauceInstance>(() => {\n return create({\n headers: {\n Accept: 'application/json',\n },\n baseURL: undefined,\n });\n }, []);\n};\n"],"mappings":"AAAA,SAA2BA,MAAM,QAAQ,UAAU;AACnD,SAASC,OAAO,QAAQ,OAAO;AAE/B,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EACjC,OAAOD,OAAO,CAAmB,MAAM;IACrC,OAAOD,MAAM,CAAC;MACZG,OAAO,EAAE;QACPC,MAAM,EAAE;MACV,CAAC;MACDC,OAAO,EAAEC;IACX,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;AACR,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './connectivity/connectivity';\nexport * from './core';\nexport * from './credential-card/credential-card-expanding';\nexport * from './header/on-scroll-header-state';\nexport * from './list/list-content-inset';\nexport * from './navigation';\nexport * from './pin-security/pin-security';\nexport * from './revocation/credential-status';\n"],"mappings":"AAAA,cAAc,6BAA6B;AAC3C,cAAc,QAAQ;AACtB,cAAc,6CAA6C;AAC3D,cAAc,iCAAiC;AAC/C,cAAc,2BAA2B;AACzC,cAAc,cAAc;AAC5B,cAAc,6BAA6B;AAC3C,cAAc,gCAAgC"}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './connectivity/connectivity';\nexport * from './core';\nexport * from './credential-card/credential-card-expanding';\nexport * from './header/on-scroll-header-state';\nexport * from './list/list-content-inset';\nexport * from './navigation';\nexport * from './pin-security/pin-security';\nexport * from './revocation/credential-status';\n"],"mappings":"AAAA,cAAc,6BAA6B;AAC3C,cAAc,QAAQ;AACtB,cAAc,6CAA6C;AAC3D,cAAc,iCAAiC;AAC/C,cAAc,2BAA2B;AACzC,cAAc,cAAc;AAC5B,cAAc,6BAA6B;AAC3C,cAAc,gCAAgC","ignoreList":[]}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
3
|
-
export const useListContentInset =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
3
|
+
export const useListContentInset = ({
|
|
4
|
+
additionalBottomPadding = 54,
|
|
5
|
+
headerHeight = 48,
|
|
6
|
+
modalPresentation = false
|
|
7
|
+
} = {
|
|
8
|
+
additionalBottomPadding: 54,
|
|
9
|
+
headerHeight: 48,
|
|
10
|
+
modalPresentation: false
|
|
11
|
+
}) => {
|
|
13
12
|
const {
|
|
14
13
|
top,
|
|
15
14
|
bottom
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","useSafeAreaInsets","useListContentInset","additionalBottomPadding","headerHeight","modalPresentation","
|
|
1
|
+
{"version":3,"names":["Platform","useSafeAreaInsets","useListContentInset","additionalBottomPadding","headerHeight","modalPresentation","top","bottom","topSafeAreaInset","OS","contentInsetsStyle","paddingBottom","paddingTop"],"sources":["list-content-inset.ts"],"sourcesContent":["import { Platform, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\ntype ListContentInsetProps = {\n additionalBottomPadding?: number;\n headerHeight?: number;\n modalPresentation?: boolean;\n};\n\nexport const useListContentInset = (\n { additionalBottomPadding = 54, headerHeight = 48, modalPresentation = false }: ListContentInsetProps = {\n additionalBottomPadding: 54,\n headerHeight: 48,\n modalPresentation: false,\n },\n) => {\n const { top, bottom } = useSafeAreaInsets();\n const topSafeAreaInset = !modalPresentation || Platform.OS === 'android' ? top : 0;\n const contentInsetsStyle: ViewStyle = {\n paddingBottom: bottom + additionalBottomPadding,\n paddingTop: topSafeAreaInset + headerHeight,\n };\n return contentInsetsStyle;\n};\n"],"mappings":"AAAA,SAASA,QAAQ,QAAmB,cAAc;AAClD,SAASC,iBAAiB,QAAQ,gCAAgC;AAQlE,OAAO,MAAMC,mBAAmB,GAAGA,CACjC;EAAEC,uBAAuB,GAAG,EAAE;EAAEC,YAAY,GAAG,EAAE;EAAEC,iBAAiB,GAAG;AAA6B,CAAC,GAAG;EACtGF,uBAAuB,EAAE,EAAE;EAC3BC,YAAY,EAAE,EAAE;EAChBC,iBAAiB,EAAE;AACrB,CAAC,KACE;EACH,MAAM;IAAEC,GAAG;IAAEC;EAAO,CAAC,GAAGN,iBAAiB,CAAC,CAAC;EAC3C,MAAMO,gBAAgB,GAAG,CAACH,iBAAiB,IAAIL,QAAQ,CAACS,EAAE,KAAK,SAAS,GAAGH,GAAG,GAAG,CAAC;EAClF,MAAMI,kBAA6B,GAAG;IACpCC,aAAa,EAAEJ,MAAM,GAAGJ,uBAAuB;IAC/CS,UAAU,EAAEJ,gBAAgB,GAAGJ;EACjC,CAAC;EACD,OAAOM,kBAAkB;AAC3B,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useNavigation","useEffect","useRef","useBeforeRemove","callback","navigation","removed","current","addListener","e","preventDefault","dispatch","data","action"],"sources":["before-remove.tsx"],"sourcesContent":["import { useNavigation } from '@react-navigation/native';\nimport { useEffect, useRef } from 'react';\n\nexport const useBeforeRemove = (callback: () => void) => {\n const navigation = useNavigation();\n const removed = useRef<boolean>();\n\n useEffect(() => {\n if (removed.current) {\n return;\n }\n return navigation.addListener('beforeRemove', (e) => {\n if (removed.current) {\n return;\n }\n removed.current = true;\n e.preventDefault();\n callback();\n navigation.dispatch(e.data.action);\n });\n }, [callback, navigation]);\n};\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,0BAA0B;AACxD,SAASC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,OAAO,MAAMC,eAAe,GAAIC,QAAoB,IAAK;EACvD,MAAMC,UAAU,GAAGL,aAAa,
|
|
1
|
+
{"version":3,"names":["useNavigation","useEffect","useRef","useBeforeRemove","callback","navigation","removed","current","addListener","e","preventDefault","dispatch","data","action"],"sources":["before-remove.tsx"],"sourcesContent":["import { useNavigation } from '@react-navigation/native';\nimport { useEffect, useRef } from 'react';\n\nexport const useBeforeRemove = (callback: () => void) => {\n const navigation = useNavigation();\n const removed = useRef<boolean>();\n\n useEffect(() => {\n if (removed.current) {\n return;\n }\n return navigation.addListener('beforeRemove', (e) => {\n if (removed.current) {\n return;\n }\n removed.current = true;\n e.preventDefault();\n callback();\n navigation.dispatch(e.data.action);\n });\n }, [callback, navigation]);\n};\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,0BAA0B;AACxD,SAASC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEzC,OAAO,MAAMC,eAAe,GAAIC,QAAoB,IAAK;EACvD,MAAMC,UAAU,GAAGL,aAAa,CAAC,CAAC;EAClC,MAAMM,OAAO,GAAGJ,MAAM,CAAU,CAAC;EAEjCD,SAAS,CAAC,MAAM;IACd,IAAIK,OAAO,CAACC,OAAO,EAAE;MACnB;IACF;IACA,OAAOF,UAAU,CAACG,WAAW,CAAC,cAAc,EAAGC,CAAC,IAAK;MACnD,IAAIH,OAAO,CAACC,OAAO,EAAE;QACnB;MACF;MACAD,OAAO,CAACC,OAAO,GAAG,IAAI;MACtBE,CAAC,CAACC,cAAc,CAAC,CAAC;MAClBN,QAAQ,CAAC,CAAC;MACVC,UAAU,CAACM,QAAQ,CAACF,CAAC,CAACG,IAAI,CAACC,MAAM,CAAC;IACpC,CAAC,CAAC;EACJ,CAAC,EAAE,CAACT,QAAQ,EAAEC,UAAU,CAAC,CAAC;AAC5B,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","useCloseButtonTimeout","active","closeButtonHandler","closeTimeout","setCloseTimeout","interval","setInterval","prev","next","clearInterval"],"sources":["close-button-timeout.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nexport const useCloseButtonTimeout = (active: boolean, closeButtonHandler: () => void) => {\n const [closeTimeout, setCloseTimeout] = useState(5);\n\n useEffect(() => {\n if (!active) {\n return;\n }\n\n const interval = setInterval(() => {\n setCloseTimeout((prev) => {\n const next = prev - 1;\n return next > 0 ? next : 0;\n });\n }, 1000);\n return () => {\n clearInterval(interval);\n };\n }, [active]);\n\n useEffect(() => {\n if (active && closeTimeout === 0) {\n closeButtonHandler();\n }\n }, [closeTimeout, active, closeButtonHandler]);\n\n return { closeTimeout };\n};\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,OAAO,MAAMC,qBAAqB,GAAGA,CAACC,MAAe,EAAEC,kBAA8B,KAAK;EACxF,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGL,QAAQ,CAAC,CAAC,CAAC;EAEnDD,SAAS,CAAC,MAAM;IACd,IAAI,CAACG,MAAM,EAAE;MACX;IACF;IAEA,MAAMI,QAAQ,GAAGC,WAAW,CAAC,MAAM;MACjCF,eAAe,CAAEG,IAAI,IAAK;QACxB,MAAMC,IAAI,GAAGD,IAAI,GAAG,CAAC;QACrB,OAAOC,IAAI,GAAG,CAAC,GAAGA,IAAI,GAAG,CAAC;MAC5B,CAAC,CAAC;IACJ,CAAC,EAAE,IAAI,CAAC;IACR,OAAO,MAAM;MACXC,aAAa,CAACJ,QAAQ,CAAC;IACzB,CAAC;EACH,CAAC,EAAE,CAACJ,MAAM,CAAC,CAAC;EAEZH,SAAS,CAAC,MAAM;IACd,IAAIG,MAAM,IAAIE,YAAY,KAAK,CAAC,EAAE;MAChCD,kBAAkB,
|
|
1
|
+
{"version":3,"names":["useEffect","useState","useCloseButtonTimeout","active","closeButtonHandler","closeTimeout","setCloseTimeout","interval","setInterval","prev","next","clearInterval"],"sources":["close-button-timeout.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nexport const useCloseButtonTimeout = (active: boolean, closeButtonHandler: () => void) => {\n const [closeTimeout, setCloseTimeout] = useState(5);\n\n useEffect(() => {\n if (!active) {\n return;\n }\n\n const interval = setInterval(() => {\n setCloseTimeout((prev) => {\n const next = prev - 1;\n return next > 0 ? next : 0;\n });\n }, 1000);\n return () => {\n clearInterval(interval);\n };\n }, [active]);\n\n useEffect(() => {\n if (active && closeTimeout === 0) {\n closeButtonHandler();\n }\n }, [closeTimeout, active, closeButtonHandler]);\n\n return { closeTimeout };\n};\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,OAAO,MAAMC,qBAAqB,GAAGA,CAACC,MAAe,EAAEC,kBAA8B,KAAK;EACxF,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGL,QAAQ,CAAC,CAAC,CAAC;EAEnDD,SAAS,CAAC,MAAM;IACd,IAAI,CAACG,MAAM,EAAE;MACX;IACF;IAEA,MAAMI,QAAQ,GAAGC,WAAW,CAAC,MAAM;MACjCF,eAAe,CAAEG,IAAI,IAAK;QACxB,MAAMC,IAAI,GAAGD,IAAI,GAAG,CAAC;QACrB,OAAOC,IAAI,GAAG,CAAC,GAAGA,IAAI,GAAG,CAAC;MAC5B,CAAC,CAAC;IACJ,CAAC,EAAE,IAAI,CAAC;IACR,OAAO,MAAM;MACXC,aAAa,CAACJ,QAAQ,CAAC;IACzB,CAAC;EACH,CAAC,EAAE,CAACJ,MAAM,CAAC,CAAC;EAEZH,SAAS,CAAC,MAAM;IACd,IAAIG,MAAM,IAAIE,YAAY,KAAK,CAAC,EAAE;MAChCD,kBAAkB,CAAC,CAAC;IACtB;EACF,CAAC,EAAE,CAACC,YAAY,EAAEF,MAAM,EAAEC,kBAAkB,CAAC,CAAC;EAE9C,OAAO;IAAEC;EAAa,CAAC;AACzB,CAAC","ignoreList":[]}
|
|
@@ -4,10 +4,9 @@ import { reportException, reportTraceInfo } from '../../reporting';
|
|
|
4
4
|
export const useRuntimeDeepLinkHandling = (enabled, handleInvitationUrl) => {
|
|
5
5
|
const [deepLinkURL, setDeepLinkURL] = useState();
|
|
6
6
|
useEffect(() => {
|
|
7
|
-
const subscription = Linking.addEventListener('url',
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} = _ref;
|
|
7
|
+
const subscription = Linking.addEventListener('url', ({
|
|
8
|
+
url
|
|
9
|
+
}) => {
|
|
11
10
|
reportTraceInfo('Connection', 'Runtime deep link');
|
|
12
11
|
setDeepLinkURL(url);
|
|
13
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","useState","Linking","reportException","reportTraceInfo","useRuntimeDeepLinkHandling","enabled","handleInvitationUrl","deepLinkURL","setDeepLinkURL","subscription","addEventListener","
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useState","Linking","reportException","reportTraceInfo","useRuntimeDeepLinkHandling","enabled","handleInvitationUrl","deepLinkURL","setDeepLinkURL","subscription","addEventListener","url","remove","undefined","initialDeepLinkHandled","useInitialDeepLinkHandling","getInitialURL","then","catch","e"],"sources":["deep-link.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\nimport { Linking } from 'react-native';\n\nimport { reportException, reportTraceInfo } from '../../reporting';\n\nexport const useRuntimeDeepLinkHandling = (enabled: boolean, handleInvitationUrl: (invitationUrl: string) => void) => {\n const [deepLinkURL, setDeepLinkURL] = useState<string>();\n useEffect(() => {\n const subscription = Linking.addEventListener('url', ({ url }) => {\n reportTraceInfo('Connection', 'Runtime deep link');\n setDeepLinkURL(url);\n });\n return () => subscription.remove();\n }, []);\n\n useEffect(() => {\n if (!enabled || !deepLinkURL) {\n return;\n }\n setDeepLinkURL(undefined);\n handleInvitationUrl(deepLinkURL);\n }, [deepLinkURL, enabled, handleInvitationUrl]);\n};\n\nlet initialDeepLinkHandled = false;\nexport const useInitialDeepLinkHandling = (handleInvitationUrl: (invitationUrl: string) => void) => {\n return useCallback(() => {\n if (!initialDeepLinkHandled) {\n Linking.getInitialURL()\n .then((url) => {\n initialDeepLinkHandled = true;\n if (url) {\n reportTraceInfo('Connection', 'Initial deep link');\n handleInvitationUrl(url);\n }\n })\n .catch((e) => reportException(e, 'Failed to get initial deep link'));\n }\n }, [handleInvitationUrl]);\n};\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACxD,SAASC,OAAO,QAAQ,cAAc;AAEtC,SAASC,eAAe,EAAEC,eAAe,QAAQ,iBAAiB;AAElE,OAAO,MAAMC,0BAA0B,GAAGA,CAACC,OAAgB,EAAEC,mBAAoD,KAAK;EACpH,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGR,QAAQ,CAAS,CAAC;EACxDD,SAAS,CAAC,MAAM;IACd,MAAMU,YAAY,GAAGR,OAAO,CAACS,gBAAgB,CAAC,KAAK,EAAE,CAAC;MAAEC;IAAI,CAAC,KAAK;MAChER,eAAe,CAAC,YAAY,EAAE,mBAAmB,CAAC;MAClDK,cAAc,CAACG,GAAG,CAAC;IACrB,CAAC,CAAC;IACF,OAAO,MAAMF,YAAY,CAACG,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,EAAE,CAAC;EAENb,SAAS,CAAC,MAAM;IACd,IAAI,CAACM,OAAO,IAAI,CAACE,WAAW,EAAE;MAC5B;IACF;IACAC,cAAc,CAACK,SAAS,CAAC;IACzBP,mBAAmB,CAACC,WAAW,CAAC;EAClC,CAAC,EAAE,CAACA,WAAW,EAAEF,OAAO,EAAEC,mBAAmB,CAAC,CAAC;AACjD,CAAC;AAED,IAAIQ,sBAAsB,GAAG,KAAK;AAClC,OAAO,MAAMC,0BAA0B,GAAIT,mBAAoD,IAAK;EAClG,OAAOR,WAAW,CAAC,MAAM;IACvB,IAAI,CAACgB,sBAAsB,EAAE;MAC3Bb,OAAO,CAACe,aAAa,CAAC,CAAC,CACpBC,IAAI,CAAEN,GAAG,IAAK;QACbG,sBAAsB,GAAG,IAAI;QAC7B,IAAIH,GAAG,EAAE;UACPR,eAAe,CAAC,YAAY,EAAE,mBAAmB,CAAC;UAClDG,mBAAmB,CAACK,GAAG,CAAC;QAC1B;MACF,CAAC,CAAC,CACDO,KAAK,CAAEC,CAAC,IAAKjB,eAAe,CAACiB,CAAC,EAAE,iCAAiC,CAAC,CAAC;IACxE;EACF,CAAC,EAAE,CAACb,mBAAmB,CAAC,CAAC;AAC3B,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './before-remove';\nexport * from './close-button-timeout';\nexport * from './deep-link';\nexport * from './open-settings';\n"],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,aAAa;AAC3B,cAAc,iBAAiB"}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './before-remove';\nexport * from './close-button-timeout';\nexport * from './deep-link';\nexport * from './open-settings';\n"],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,aAAa;AAC3B,cAAc,iBAAiB","ignoreList":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
2
|
import { Linking, Platform } from 'react-native';
|
|
3
|
-
import { openSettings } from 'react-native-bluetooth-state-manager';
|
|
4
3
|
export const useOpenSettings = () => {
|
|
5
4
|
const openBleSettings = useCallback(() => {
|
|
6
5
|
if (Platform.OS === 'ios') {
|
|
@@ -24,7 +23,7 @@ export const useOpenSettings = () => {
|
|
|
24
23
|
}
|
|
25
24
|
}, []);
|
|
26
25
|
const openAppPermissionSettings = useCallback(() => {
|
|
27
|
-
openSettings().catch(() => {});
|
|
26
|
+
Linking.openSettings().catch(() => {});
|
|
28
27
|
}, []);
|
|
29
28
|
return {
|
|
30
29
|
openAppPermissionSettings,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","Linking","Platform","
|
|
1
|
+
{"version":3,"names":["useCallback","Linking","Platform","useOpenSettings","openBleSettings","OS","openURL","catch","sendIntent","openMobileNetworkSettings","openWiFiSettings","openAppPermissionSettings","openSettings"],"sources":["open-settings.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { Linking, Platform } from 'react-native';\n\nexport const useOpenSettings = () => {\n const openBleSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=Bluetooth').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.BLUETOOTH_SETTINGS').catch(() => {});\n }\n }, []);\n\n const openMobileNetworkSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=MOBILE_DATA_SETTINGS_ID').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.WIRELESS_SETTINGS').catch(() => {});\n }\n }, []);\n\n const openWiFiSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=WIFI').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.WIFI_SETTINGS').catch(() => {});\n }\n }, []);\n \n const openAppPermissionSettings = useCallback(() => {\n Linking.openSettings().catch(() => {});\n }, []);\n\n return {\n openAppPermissionSettings,\n openBleSettings,\n openMobileNetworkSettings,\n openWiFiSettings,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAEhD,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,eAAe,GAAGJ,WAAW,CAAC,MAAM;IACxC,IAAIE,QAAQ,CAACG,EAAE,KAAK,KAAK,EAAE;MACzBJ,OAAO,CAACK,OAAO,CAAC,0BAA0B,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC,MAAM;MACLN,OAAO,CAACO,UAAU,CAAC,qCAAqC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,yBAAyB,GAAGT,WAAW,CAAC,MAAM;IAClD,IAAIE,QAAQ,CAACG,EAAE,KAAK,KAAK,EAAE;MACzBJ,OAAO,CAACK,OAAO,CAAC,wCAAwC,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E,CAAC,MAAM;MACLN,OAAO,CAACO,UAAU,CAAC,oCAAoC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1E;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,gBAAgB,GAAGV,WAAW,CAAC,MAAM;IACzC,IAAIE,QAAQ,CAACG,EAAE,KAAK,KAAK,EAAE;MACzBJ,OAAO,CAACK,OAAO,CAAC,qBAAqB,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,CAAC,MAAM;MACLN,OAAO,CAACO,UAAU,CAAC,gCAAgC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMI,yBAAyB,GAAGX,WAAW,CAAC,MAAM;IAClDC,OAAO,CAACW,YAAY,CAAC,CAAC,CAACL,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;EACxC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACLI,yBAAyB;IACzBP,eAAe;IACfK,yBAAyB;IACzBC;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -5,8 +5,7 @@ const getSecureSystemTime = async () => {
|
|
|
5
5
|
// converting nanoseconds to seconds
|
|
6
6
|
return Math.floor((await getTime()) / 1000000000);
|
|
7
7
|
};
|
|
8
|
-
export const usePinCodeSecurity =
|
|
9
|
-
let allowedAttempts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 3;
|
|
8
|
+
export const usePinCodeSecurity = (failedAttempts, lastAttemptTimestamp, setPinCodeSecurity, allowedAttempts = 3) => {
|
|
10
9
|
const [attempts, setAttempts] = useState(failedAttempts);
|
|
11
10
|
const [lastTimestamp, setLastTimestamp] = useState(lastAttemptTimestamp);
|
|
12
11
|
const [isBlocked, setIsBlocked] = useState(failedAttempts >= allowedAttempts && lastAttemptTimestamp !== undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","useRef","useState","getTime","reportException","getSecureSystemTime","Math","floor","usePinCodeSecurity","failedAttempts","lastAttemptTimestamp","setPinCodeSecurity","allowedAttempts","
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useRef","useState","getTime","reportException","getSecureSystemTime","Math","floor","usePinCodeSecurity","failedAttempts","lastAttemptTimestamp","setPinCodeSecurity","allowedAttempts","attempts","setAttempts","lastTimestamp","setLastTimestamp","isBlocked","setIsBlocked","undefined","blockRemainingTime","setBlockRemainingTime","timer","calculateBlockTime","then","currentTime","waitingtime","pow","timepassed","blockTime","max","catch","e","addFailedAttempt","newAttempts","resetPinSecurity","current","setInterval","clearInterval"],"sources":["pin-security.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport { getTime } from 'react-native-system-time';\n\nimport { reportException } from '../../reporting';\n\nconst getSecureSystemTime = async () => {\n // converting nanoseconds to seconds\n return Math.floor((await getTime()) / 1000000000);\n};\n\nexport const usePinCodeSecurity = (\n failedAttempts: number,\n lastAttemptTimestamp: number | undefined,\n setPinCodeSecurity: (failedAttempts: number, lastAttemptTimestamp: number | undefined) => void,\n allowedAttempts = 3,\n) => {\n const [attempts, setAttempts] = useState(failedAttempts);\n const [lastTimestamp, setLastTimestamp] = useState(lastAttemptTimestamp);\n const [isBlocked, setIsBlocked] = useState(failedAttempts >= allowedAttempts && lastAttemptTimestamp !== undefined);\n const [blockRemainingTime, setBlockRemainingTime] = useState(0);\n const timer = useRef<ReturnType<typeof setInterval>>();\n\n const calculateBlockTime = useCallback(() => {\n if (!lastTimestamp) {\n return;\n }\n // Get seconds since device boot\n getSecureSystemTime()\n .then((currentTime) => {\n // Compute how long should the user wait\n const waitingtime = Math.pow(2, attempts - allowedAttempts) * 60;\n\n // Get how much time passed since the last attempt\n const timepassed = currentTime - lastTimestamp;\n\n let blockTime = waitingtime - timepassed;\n\n if (timepassed < 0) {\n // Device was rebooted since the last attempt\n // Current time goes from zero again\n blockTime = waitingtime - currentTime;\n }\n\n setIsBlocked(blockTime > 0);\n setBlockRemainingTime(Math.max(0, blockTime));\n if (blockTime <= 0) {\n setPinCodeSecurity(attempts, undefined);\n setLastTimestamp(undefined);\n }\n })\n .catch((e) => {\n reportException(e, 'failed to get secure system time');\n });\n }, [allowedAttempts, attempts, lastTimestamp, setPinCodeSecurity]);\n\n const addFailedAttempt = useCallback(() => {\n getSecureSystemTime()\n .then((currentTime) => {\n const newAttempts = attempts + 1;\n setPinCodeSecurity(newAttempts, currentTime);\n setAttempts(newAttempts);\n setLastTimestamp(currentTime);\n if (newAttempts === allowedAttempts) {\n calculateBlockTime();\n }\n })\n .catch((e) => {\n reportException(e, 'failed to get secure system time');\n });\n }, [allowedAttempts, attempts, calculateBlockTime, setPinCodeSecurity]);\n\n const resetPinSecurity = useCallback(() => {\n setPinCodeSecurity(0, undefined);\n setLastTimestamp(undefined);\n setAttempts(0);\n }, [setPinCodeSecurity]);\n\n useEffect(() => {\n if (isBlocked && timer.current === undefined) {\n timer.current = setInterval(calculateBlockTime, 500);\n } else if (!isBlocked && timer.current !== undefined) {\n clearInterval(timer.current);\n timer.current = undefined;\n }\n }, [isBlocked, calculateBlockTime]);\n\n useEffect(() => {\n if (attempts >= allowedAttempts && lastAttemptTimestamp && !isBlocked) {\n calculateBlockTime();\n }\n }, [allowedAttempts, attempts, calculateBlockTime, isBlocked, lastAtt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C;IAChCH,gBAAgB,CAACG,SAAS,CAAC;IAC3BL,WAAW,CAAC,CAAC,CAAC;EAChB,CAAC,EAAE,CAACH,kBAAkB,CAAC,CAAC;EAExBX,SAAS,CAAC,MAAM;IACd,IAAIiB,SAAS,IAAIK,KAAK,CAACc,OAAO,KAAKjB,SAAS,EAAE;MAC5CG,KAAK,CAACc,OAAO,GAAGC,WAAW,CAACd,kBAAkB,EAAE,GAAG,CAAC;IACtD,CAAC,MAAM,IAAI,CAACN,SAAS,IAAIK,KAAK,CAACc,OAAO,KAAKjB,SAAS,EAAE;MACpDmB,aAAa,CAAChB,KAAK,CAACc,OAAO,CAAC;MAC5Bd,KAAK,CAACc,OAAO,GAAGjB,SAAS;IAC3B;EACF,CAAC,EAAE,CAACF,SAAS,EAAEM,kBAAkB,CAAC,CAAC;EAEnCvB,SAAS,CAAC,MAAM;IACd,IAAIa,QAAQ,IAAID,eAAe,IAAIF,oBAAoB,IAAI,CAACO,SAAS,EAAE;MACrEM,kBAAkB,CAAC,CAAC;IACtB;EACF,CAAC,EAAE,CAACX,eAAe,EAAEC,QAAQ,EAAEU,kBAAkB,EAAEN,SAAS,EAAEP,oBAAoB,CAAC,CAAC;EAEpF,OAAO;IACLuB,gBAAgB;IAChBb,kBAAkB;IAClBH,SAAS;IACTkB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -9,13 +9,14 @@ import { useCredentialRevocationCheck, useCredentials } from '../core/credential
|
|
|
9
9
|
*
|
|
10
10
|
* Navigates to the result page if some credential states were updated
|
|
11
11
|
* @param {string[]} credentialIds if specified only those credentials get checked, otherwise all potentially eligible credentials
|
|
12
|
+
* @param {boolean} forceRefresh revocation check forces cache refresh
|
|
12
13
|
*/
|
|
13
|
-
export const useCredentialStatusCheck = credentialIds => {
|
|
14
|
+
export const useCredentialStatusCheck = (credentialIds, forceRefresh = false) => {
|
|
14
15
|
const isFocused = useIsFocused();
|
|
15
16
|
const checkDone = useRef(false);
|
|
16
17
|
const {
|
|
17
18
|
mutateAsync: check
|
|
18
|
-
} = useCredentialRevocationCheck();
|
|
19
|
+
} = useCredentialRevocationCheck(forceRefresh);
|
|
19
20
|
const {
|
|
20
21
|
data: credentials
|
|
21
22
|
} = useCredentials({
|
|
@@ -26,34 +27,24 @@ export const useCredentialStatusCheck = credentialIds => {
|
|
|
26
27
|
if (!credentials || !credentials.length || checkDone.current || !isFocused) {
|
|
27
28
|
return [];
|
|
28
29
|
}
|
|
29
|
-
const results = await check(credentials.map(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref;
|
|
33
|
-
return id;
|
|
34
|
-
})).catch(e => {
|
|
30
|
+
const results = await check(credentials.map(({
|
|
31
|
+
id
|
|
32
|
+
}) => id)).catch(e => {
|
|
35
33
|
reportException(e, 'Revocation check failed');
|
|
36
34
|
return [];
|
|
37
35
|
});
|
|
38
|
-
const updatedCredentialIds = results.filter(
|
|
36
|
+
const updatedCredentialIds = results.filter(({
|
|
37
|
+
credentialId,
|
|
38
|
+
status: newStatus,
|
|
39
|
+
success
|
|
40
|
+
}) => {
|
|
39
41
|
var _credentials$find;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
let {
|
|
47
|
-
id
|
|
48
|
-
} = _ref3;
|
|
49
|
-
return id === credentialId;
|
|
50
|
-
})) === null || _credentials$find === void 0 ? void 0 : _credentials$find.state) !== newStatus;
|
|
51
|
-
}).map(_ref4 => {
|
|
52
|
-
let {
|
|
53
|
-
credentialId
|
|
54
|
-
} = _ref4;
|
|
55
|
-
return credentialId;
|
|
56
|
-
});
|
|
42
|
+
return success && ((_credentials$find = credentials.find(({
|
|
43
|
+
id
|
|
44
|
+
}) => id === credentialId)) === null || _credentials$find === void 0 ? void 0 : _credentials$find.state) !== newStatus;
|
|
45
|
+
}).map(({
|
|
46
|
+
credentialId
|
|
47
|
+
}) => credentialId);
|
|
57
48
|
return updatedCredentialIds;
|
|
58
49
|
}, [check, credentials, isFocused]);
|
|
59
50
|
return checkCredentialsStatus;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CredentialStateEnum","useIsFocused","useCallback","useRef","reportException","useCredentialRevocationCheck","useCredentials","useCredentialStatusCheck","credentialIds","isFocused","checkDone","mutateAsync","check","data","credentials","ids","status","ACCEPTED","SUSPENDED","checkCredentialsStatus","length","current","results","map","
|
|
1
|
+
{"version":3,"names":["CredentialStateEnum","useIsFocused","useCallback","useRef","reportException","useCredentialRevocationCheck","useCredentials","useCredentialStatusCheck","credentialIds","forceRefresh","isFocused","checkDone","mutateAsync","check","data","credentials","ids","status","ACCEPTED","SUSPENDED","checkCredentialsStatus","length","current","results","map","id","catch","e","updatedCredentialIds","filter","credentialId","newStatus","success","_credentials$find","find","state"],"sources":["credential-status.ts"],"sourcesContent":["import { CredentialStateEnum } from '@procivis/react-native-one-core';\nimport { useIsFocused } from '@react-navigation/native';\nimport { useCallback, useRef } from 'react';\n\nimport { reportException } from '../../reporting';\nimport { useCredentialRevocationCheck, useCredentials } from '../core/credentials';\n\n/**\n * Runs revocation check on background for all potential updates\n *\n * Navigates to the result page if some credential states were updated\n * @param {string[]} credentialIds if specified only those credentials get checked, otherwise all potentially eligible credentials\n * @param {boolean} forceRefresh revocation check forces cache refresh\n */\nexport const useCredentialStatusCheck = (credentialIds?: string[], forceRefresh = false) => {\n const isFocused = useIsFocused();\n const checkDone = useRef(false);\n const { mutateAsync: check } = useCredentialRevocationCheck(forceRefresh);\n const { data: credentials } = useCredentials({\n ids: credentialIds,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED],\n });\n\n const checkCredentialsStatus = useCallback(async () => {\n if (!credentials || !credentials.length || checkDone.current || !isFocused) {\n return [];\n }\n\n const results = await check(credentials.map(({ id }) => id)).catch((e) => {\n reportException(e, 'Revocation check failed');\n return [];\n });\n\n const updatedCredentialIds = results\n .filter(\n ({ credentialId, status: newStatus, success }) =>\n success && credentials.find(({ id }) => id === credentialId)?.state !== newStatus,\n )\n .map(({ credentialId }) => credentialId);\n\n return updatedCredentialIds;\n }, [check, credentials, isFocused]);\n\n return checkCredentialsStatus;\n};\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAE3C,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,4BAA4B,EAAEC,cAAc,QAAQ,qBAAqB;;AAElF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAGA,CAACC,aAAwB,EAAEC,YAAY,GAAG,KAAK,KAAK;EAC1F,MAAMC,SAAS,GAAGT,YAAY,CAAC,CAAC;EAChC,MAAMU,SAAS,GAAGR,MAAM,CAAC,KAAK,CAAC;EAC/B,MAAM;IAAES,WAAW,EAAEC;EAAM,CAAC,GAAGR,4BAA4B,CAACI,YAAY,CAAC;EACzE,MAAM;IAAEK,IAAI,EAAEC;EAAY,CAAC,GAAGT,cAAc,CAAC;IAC3CU,GAAG,EAAER,aAAa;IAClBS,MAAM,EAAE,CAACjB,mBAAmB,CAACkB,QAAQ,EAAElB,mBAAmB,CAACmB,SAAS;EACtE,CAAC,CAAC;EAEF,MAAMC,sBAAsB,GAAGlB,WAAW,CAAC,YAAY;IACrD,IAAI,CAACa,WAAW,IAAI,CAACA,WAAW,CAACM,MAAM,IAAIV,SAAS,CAACW,OAAO,IAAI,CAACZ,SAAS,EAAE;MAC1E,OAAO,EAAE;IACX;IAEA,MAAMa,OAAO,GAAG,MAAMV,KAAK,CAACE,WAAW,CAACS,GAAG,CAAC,CAAC;MAAEC;IAAG,CAAC,KAAKA,EAAE,CAAC,CAAC,CAACC,KAAK,CAAEC,CAAC,IAAK;MACxEvB,eAAe,CAACuB,CAAC,EAAE,yBAAyB,CAAC;MAC7C,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,MAAMC,oBAAoB,GAAGL,OAAO,CACjCM,MAAM,CACL,CAAC;MAAEC,YAAY;MAAEb,MAAM,EAAEc,SAAS;MAAEC;IAAQ,CAAC;MAAA,IAAAC,iBAAA;MAAA,OAC3CD,OAAO,IAAI,EAAAC,iBAAA,GAAAlB,WAAW,CAACmB,IAAI,CAAC,CAAC;QAAET;MAAG,CAAC,KAAKA,EAAE,KAAKK,YAAY,CAAC,cAAAG,iBAAA,uBAAjDA,iBAAA,CAAmDE,KAAK,MAAKJ,SAAS;IAAA,CACrF,CAAC,CACAP,GAAG,CAAC,CAAC;MAAEM;IAAa,CAAC,KAAKA,YAAY,CAAC;IAE1C,OAAOF,oBAAoB;EAC7B,CAAC,EAAE,CAACf,KAAK,EAAEE,WAAW,EAAEL,SAAS,CAAC,CAAC;EAEnC,OAAOU,sBAAsB;AAC/B,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import ContrastingStatusBar from './contrasting-status-bar';
|
|
2
2
|
import { concatTestID } from './testID';
|
|
3
3
|
export { concatTestID, ContrastingStatusBar };
|
|
4
|
+
export * from './array';
|
|
4
5
|
export * from './backup';
|
|
5
6
|
export * from './color';
|
|
6
7
|
export * from './date';
|
|
8
|
+
export * from './filtering';
|
|
9
|
+
export * from './history';
|
|
7
10
|
export * from './hooks';
|
|
8
11
|
export * from './navigation';
|
|
9
12
|
export * from './parsers';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ContrastingStatusBar","concatTestID"],"sources":["index.ts"],"sourcesContent":["import ContrastingStatusBar from './contrasting-status-bar';\nimport { concatTestID } from './testID';\n\nexport { concatTestID, ContrastingStatusBar };\n\nexport * from './backup';\nexport * from './color';\nexport * from './date';\nexport * from './hooks';\nexport * from './navigation';\nexport * from './parsers';\nexport * from './ref';\nexport * from './reporting';\nexport * from './string';\nexport * from './useMemoAsync';\nexport * from './uuid';\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,0BAA0B;AAC3D,SAASC,YAAY,QAAQ,UAAU;AAEvC,SAASA,YAAY,EAAED,oBAAoB;AAE3C,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,OAAO;AACrB,cAAc,aAAa;AAC3B,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,QAAQ"}
|
|
1
|
+
{"version":3,"names":["ContrastingStatusBar","concatTestID"],"sources":["index.ts"],"sourcesContent":["import ContrastingStatusBar from './contrasting-status-bar';\nimport { concatTestID } from './testID';\n\nexport { concatTestID, ContrastingStatusBar };\n\nexport * from './array';\nexport * from './backup';\nexport * from './color';\nexport * from './date';\nexport * from './filtering';\nexport * from './history';\nexport * from './hooks';\nexport * from './navigation';\nexport * from './parsers';\nexport * from './ref';\nexport * from './reporting';\nexport * from './string';\nexport * from './useMemoAsync';\nexport * from './uuid';\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,0BAA0B;AAC3D,SAASC,YAAY,QAAQ,UAAU;AAEvC,SAASA,YAAY,EAAED,oBAAoB;AAE3C,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,aAAa;AAC3B,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,OAAO;AACrB,cAAc,aAAa;AAC3B,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,QAAQ","ignoreList":[]}
|
|
@@ -10,9 +10,7 @@ import { BackHandler } from 'react-native';
|
|
|
10
10
|
* @param onAndroidBack (Android only) Custom callback triggered when OS back button is pressed while blocked
|
|
11
11
|
* * return `false` to allow back navigation, return `true` to block back navigation
|
|
12
12
|
*/
|
|
13
|
-
export const useBlockOSBackNavigation =
|
|
14
|
-
let block = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
15
|
-
let onAndroidBack = arguments.length > 1 ? arguments[1] : undefined;
|
|
13
|
+
export const useBlockOSBackNavigation = (block = true, onAndroidBack) => {
|
|
16
14
|
const navigation = useNavigation();
|
|
17
15
|
const isFocused = useIsFocused();
|
|
18
16
|
|
|
@@ -36,8 +34,10 @@ export const useBlockOSBackNavigation = function () {
|
|
|
36
34
|
var _onAndroidBack;
|
|
37
35
|
return (_onAndroidBack = onAndroidBack === null || onAndroidBack === void 0 ? void 0 : onAndroidBack()) !== null && _onAndroidBack !== void 0 ? _onAndroidBack : true;
|
|
38
36
|
};
|
|
39
|
-
BackHandler.addEventListener('hardwareBackPress', handler);
|
|
40
|
-
return () =>
|
|
37
|
+
const subscription = BackHandler.addEventListener('hardwareBackPress', handler);
|
|
38
|
+
return () => {
|
|
39
|
+
subscription.remove();
|
|
40
|
+
};
|
|
41
41
|
}
|
|
42
42
|
return undefined;
|
|
43
43
|
}, [block, isFocused, onAndroidBack]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useIsFocused","useNavigation","useEffect","BackHandler","useBlockOSBackNavigation","block","
|
|
1
|
+
{"version":3,"names":["useIsFocused","useNavigation","useEffect","BackHandler","useBlockOSBackNavigation","block","onAndroidBack","navigation","isFocused","setOptions","gestureEnabled","undefined","handler","_onAndroidBack","subscription","addEventListener","remove"],"sources":["navigation.ts"],"sourcesContent":["import { NavigationProp, useIsFocused, useNavigation } from '@react-navigation/native';\nimport { useEffect } from 'react';\nimport { BackHandler } from 'react-native';\n\n/**\n * Prevent OS back navigation\n * * iOS: block back swipe gesture\n * * Android: block back button from system task bar\n * @param block Whether to prevent the default behavior (default: true)\n * @param onAndroidBack (Android only) Custom callback triggered when OS back button is pressed while blocked\n * * return `false` to allow back navigation, return `true` to block back navigation\n */\nexport const useBlockOSBackNavigation = (block: boolean = true, onAndroidBack?: () => boolean) => {\n const navigation = useNavigation<NavigationProp<{}>>();\n const isFocused = useIsFocused();\n\n // iOS: block back swipe (via screen options)\n useEffect(() => {\n if (block) {\n navigation.setOptions({ gestureEnabled: false });\n return () => navigation.setOptions({ gestureEnabled: true });\n }\n return undefined;\n }, [block, navigation]);\n\n // Anroid: block system back button\n useEffect(() => {\n if (block && isFocused) {\n const handler = () => {\n return onAndroidBack?.() ?? true;\n };\n const subscription = BackHandler.addEventListener('hardwareBackPress', handler);\n return () => {\n subscription.remove();\n };\n }\n return undefined;\n }, [block, isFocused, onAndroidBack]);\n};\n"],"mappings":"AAAA,SAAyBA,YAAY,EAAEC,aAAa,QAAQ,0BAA0B;AACtF,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,WAAW,QAAQ,cAAc;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAGA,CAACC,KAAc,GAAG,IAAI,EAAEC,aAA6B,KAAK;EAChG,MAAMC,UAAU,GAAGN,aAAa,CAAqB,CAAC;EACtD,MAAMO,SAAS,GAAGR,YAAY,CAAC,CAAC;;EAEhC;EACAE,SAAS,CAAC,MAAM;IACd,IAAIG,KAAK,EAAE;MACTE,UAAU,CAACE,UAAU,CAAC;QAAEC,cAAc,EAAE;MAAM,CAAC,CAAC;MAChD,OAAO,MAAMH,UAAU,CAACE,UAAU,CAAC;QAAEC,cAAc,EAAE;MAAK,CAAC,CAAC;IAC9D;IACA,OAAOC,SAAS;EAClB,CAAC,EAAE,CAACN,KAAK,EAAEE,UAAU,CAAC,CAAC;;EAEvB;EACAL,SAAS,CAAC,MAAM;IACd,IAAIG,KAAK,IAAIG,SAAS,EAAE;MACtB,MAAMI,OAAO,GAAGA,CAAA,KAAM;QAAA,IAAAC,cAAA;QACpB,QAAAA,cAAA,GAAOP,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAG,CAAC,cAAAO,cAAA,cAAAA,cAAA,GAAI,IAAI;MAClC,CAAC;MACD,MAAMC,YAAY,GAAGX,WAAW,CAACY,gBAAgB,CAAC,mBAAmB,EAAEH,OAAO,CAAC;MAC/E,OAAO,MAAM;QACXE,YAAY,CAACE,MAAM,CAAC,CAAC;MACvB,CAAC;IACH;IACA,OAAOL,SAAS;EAClB,CAAC,EAAE,CAACN,KAAK,EAAEG,SAAS,EAAEF,aAAa,CAAC,CAAC;AACvC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CredentialSchemaCodeType","React","StyleSheet","Barcode","CarouselImageType","Mrz","QrCode","ImageOrComponent","isASCII","concatTestID","findClaimByPath","styles","create","container","height","justifyContent","width","getCarouselImagesFromClaims","claims","layoutProperties","testID","result","code","pictureAttribute","pictureClaim","push","element","createElement","source","imageSource","uri","value","style","Photo","type","claim","attribute","String","QR_CODE","content","BARCODE","MRZ"],"sources":["credential-images.tsx"],"sourcesContent":["import { Claim, CredentialSchemaCodeType, CredentialSchemaLayoutProperties } from '@procivis/react-native-one-core';\nimport React from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport { Barcode, CarouselImage, CarouselImageType, Mrz, QrCode } from '../../ui-components/credential';\nimport { ImageOrComponent } from '../../ui-components/image';\nimport { isASCII } from '../string';\nimport { concatTestID } from '../testID';\nimport { findClaimByPath } from './credential';\n\nconst styles = StyleSheet.create({\n container: {\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n});\n\nexport const getCarouselImagesFromClaims = (\n claims: Claim[],\n layoutProperties?: CredentialSchemaLayoutProperties,\n testID?: string,\n): CarouselImage[] => {\n const result: CarouselImage[] = [];\n\n if (!layoutProperties) {\n return result;\n }\n\n const { code, pictureAttribute } = layoutProperties;\n\n if (pictureAttribute) {\n const pictureClaim = findClaimByPath(pictureAttribute, claims);\n if (pictureClaim) {\n result.push({\n element: (\n <ImageOrComponent\n source={{ imageSource: { uri: pictureClaim.value as string } }}\n style={styles.container}\n testID={concatTestID(testID, CarouselImageType.Photo)}\n />\n ),\n type: CarouselImageType.Photo,\n });\n }\n }\n\n if (code) {\n const claim = findClaimByPath(code.attribute, claims);\n\n if (claim && typeof claim.value === 'number') {\n claim.value = String(claim.value);\n }\n\n if (!claim || typeof claim.value !== 'string') {\n return result;\n }\n\n if (code.type === CredentialSchemaCodeType.QR_CODE) {\n result.push({\n element: <QrCode content={claim.value} testID={concatTestID(testID, CarouselImageType.QrCode)} />,\n type: CarouselImageType.QrCode,\n });\n } else if (code.type === CredentialSchemaCodeType.BARCODE && isASCII(claim.value)) {\n result.push({\n element: <Barcode content={claim.value} testID={concatTestID(testID, CarouselImageType.Barcode)} />,\n type: CarouselImageType.Barcode,\n });\n } else if (code.type === CredentialSchemaCodeType.MRZ) {\n result.push({\n element: <Mrz content={claim.value} testID={concatTestID(testID, CarouselImageType.MRZ)} />,\n type: CarouselImageType.MRZ,\n });\n }\n }\n\n return result;\n};\n"],"mappings":"AAAA,SAAgBA,wBAAwB,QAA0C,iCAAiC;AACnH,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,OAAO,EAAiBC,iBAAiB,EAAEC,GAAG,EAAEC,MAAM,QAAQ,gCAAgC;AACvG,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,eAAe,QAAQ,cAAc;AAE9C,MAAMC,MAAM,GAAGT,UAAU,CAACU,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,MAAM,EAAE,MAAM;IACdC,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,2BAA2B,GAAGA,CACzCC,MAAe,EACfC,gBAAmD,EACnDC,MAAe,KACK;EACpB,MAAMC,MAAuB,GAAG,EAAE;EAElC,IAAI,CAACF,gBAAgB,EAAE;IACrB,OAAOE,MAAM;EACf;EAEA,MAAM;IAAEC,IAAI;IAAEC;EAAiB,CAAC,GAAGJ,gBAAgB;EAEnD,IAAII,gBAAgB,EAAE;IACpB,MAAMC,YAAY,GAAGd,eAAe,CAACa,gBAAgB,EAAEL,MAAM,CAAC;IAC9D,IAAIM,YAAY,EAAE;MAChBH,MAAM,CAACI,IAAI,CAAC;QACVC,OAAO,eACLzB,KAAA,CAAA0B,aAAA,CAACpB,gBAAgB;UACfqB,MAAM,EAAE;YAAEC,WAAW,EAAE;cAAEC,GAAG,EAAEN,YAAY,CAACO;YAAgB;UAAE,CAAE;UAC/DC,KAAK,EAAErB,MAAM,CAACE,SAAU;UACxBO,MAAM,EAAEX,YAAY,CAACW,MAAM,EAAEhB,iBAAiB,CAAC6B,KAAK;QAAE,
|
|
1
|
+
{"version":3,"names":["CredentialSchemaCodeType","React","StyleSheet","Barcode","CarouselImageType","Mrz","QrCode","ImageOrComponent","isASCII","concatTestID","findClaimByPath","styles","create","container","height","justifyContent","width","getCarouselImagesFromClaims","claims","layoutProperties","testID","result","code","pictureAttribute","pictureClaim","push","element","createElement","source","imageSource","uri","value","style","Photo","type","claim","attribute","String","QR_CODE","content","BARCODE","MRZ"],"sources":["credential-images.tsx"],"sourcesContent":["import { Claim, CredentialSchemaCodeType, CredentialSchemaLayoutProperties } from '@procivis/react-native-one-core';\nimport React from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport { Barcode, CarouselImage, CarouselImageType, Mrz, QrCode } from '../../ui-components/credential';\nimport { ImageOrComponent } from '../../ui-components/image';\nimport { isASCII } from '../string';\nimport { concatTestID } from '../testID';\nimport { findClaimByPath } from './credential';\n\nconst styles = StyleSheet.create({\n container: {\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n});\n\nexport const getCarouselImagesFromClaims = (\n claims: Claim[],\n layoutProperties?: CredentialSchemaLayoutProperties,\n testID?: string,\n): CarouselImage[] => {\n const result: CarouselImage[] = [];\n\n if (!layoutProperties) {\n return result;\n }\n\n const { code, pictureAttribute } = layoutProperties;\n\n if (pictureAttribute) {\n const pictureClaim = findClaimByPath(pictureAttribute, claims);\n if (pictureClaim) {\n result.push({\n element: (\n <ImageOrComponent\n source={{ imageSource: { uri: pictureClaim.value as string } }}\n style={styles.container}\n testID={concatTestID(testID, CarouselImageType.Photo)}\n />\n ),\n type: CarouselImageType.Photo,\n });\n }\n }\n\n if (code) {\n const claim = findClaimByPath(code.attribute, claims);\n\n if (claim && typeof claim.value === 'number') {\n claim.value = String(claim.value);\n }\n\n if (!claim || typeof claim.value !== 'string') {\n return result;\n }\n\n if (code.type === CredentialSchemaCodeType.QR_CODE) {\n result.push({\n element: <QrCode content={claim.value} testID={concatTestID(testID, CarouselImageType.QrCode)} />,\n type: CarouselImageType.QrCode,\n });\n } else if (code.type === CredentialSchemaCodeType.BARCODE && isASCII(claim.value)) {\n result.push({\n element: <Barcode content={claim.value} testID={concatTestID(testID, CarouselImageType.Barcode)} />,\n type: CarouselImageType.Barcode,\n });\n } else if (code.type === CredentialSchemaCodeType.MRZ) {\n result.push({\n element: <Mrz content={claim.value} testID={concatTestID(testID, CarouselImageType.MRZ)} />,\n type: CarouselImageType.MRZ,\n });\n }\n }\n\n return result;\n};\n"],"mappings":"AAAA,SAAgBA,wBAAwB,QAA0C,iCAAiC;AACnH,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,OAAO,EAAiBC,iBAAiB,EAAEC,GAAG,EAAEC,MAAM,QAAQ,gCAAgC;AACvG,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,eAAe,QAAQ,cAAc;AAE9C,MAAMC,MAAM,GAAGT,UAAU,CAACU,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,MAAM,EAAE,MAAM;IACdC,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,2BAA2B,GAAGA,CACzCC,MAAe,EACfC,gBAAmD,EACnDC,MAAe,KACK;EACpB,MAAMC,MAAuB,GAAG,EAAE;EAElC,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AC;QACjG4B,IAAI,EAAE9B,iBAAiB,CAACE;MAC1B,CAAC,CAAC;IACJ,CAAC,MAAM,IAAIgB,IAAI,CAACY,IAAI,KAAKlC,wBAAwB,CAACwC,OAAO,IAAIhC,OAAO,CAAC2B,KAAK,CAACJ,KAAK,CAAC,EAAE;MACjFV,MAAM,CAACI,IAAI,CAAC;QACVC,OAAO,eAAEzB,KAAA,CAAA0B,aAAA,CAACxB,OAAO;UAACoC,OAAO,EAAEJ,KAAK,CAACJ,KAAM;UAACX,MAAM,EAAEX,YAAY,CAACW,MAAM,EAAEhB,iBAAiB,CAACD,OAAO;QAAE,CAAE,CAAC;QACnG+B,IAAI,EAAE9B,iBAAiB,CAACD;MAC1B,CAAC,CAAC;IACJ,CAAC,MAAM,IAAImB,IAAI,CAACY,IAAI,KAAKlC,wBAAwB,CAACyC,GAAG,EAAE;MACrDpB,MAAM,CAACI,IAAI,CAAC;QACVC,OAAO,eAAEzB,KAAA,CAAA0B,aAAA,CAACtB,GAAG;UAACkC,OAAO,EAAEJ,KAAK,CAACJ,KAAM;UAACX,MAAM,EAAEX,YAAY,CAACW,MAAM,EAAEhB,iBAAiB,CAACqC,GAAG;QAAE,CAAE,CAAC;QAC3FP,IAAI,EAAE9B,iBAAiB,CAACqC;MAC1B,CAAC,CAAC;IACJ;EACF;EAEA,OAAOpB,MAAM;AACf,CAAC","ignoreList":[]}
|
|
@@ -61,8 +61,7 @@ const getAttributeSelectorStatus = (field, validityState, credential, claim, sel
|
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
// Returns a spread list of all claims with their full JSON path as key, including all intermediate objects
|
|
64
|
-
const spreadClaims =
|
|
65
|
-
let parentClaimPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
64
|
+
const spreadClaims = (claims, parentClaimPath = '') => {
|
|
66
65
|
return claims.reduce((acc, claim) => {
|
|
67
66
|
const result = [claim];
|
|
68
67
|
if (Array.isArray(claim.value)) {
|
|
@@ -82,10 +81,9 @@ const getDisplayedAttributes = (request, validityState, credential, selectiveDis
|
|
|
82
81
|
}
|
|
83
82
|
return request.fields.map(field => {
|
|
84
83
|
const selected = !field.required && (selectedFields === null || selectedFields === void 0 ? void 0 : selectedFields.includes(field.id));
|
|
85
|
-
const claim = credential && spreadClaims(credential.claims).find(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
} = _ref;
|
|
84
|
+
const claim = credential && spreadClaims(credential.claims).find(({
|
|
85
|
+
key
|
|
86
|
+
}) => {
|
|
89
87
|
return key === field.keyMap[credential.id];
|
|
90
88
|
});
|
|
91
89
|
const status = getAttributeSelectorStatus(field, validityState, credential, claim, selected);
|
|
@@ -108,7 +106,7 @@ export const shareCredentialCardAttributeFromClaim = (id, config, testID, labels
|
|
|
108
106
|
}
|
|
109
107
|
return {
|
|
110
108
|
id,
|
|
111
|
-
name: (_field$name$split$pop = field === null || field === void 0
|
|
109
|
+
name: (_field$name$split$pop = field === null || field === void 0 || (_field$name = field.name) === null || _field$name === void 0 ? void 0 : _field$name.split('/').pop()) !== null && _field$name$split$pop !== void 0 ? _field$name$split$pop : id,
|
|
112
110
|
path: (_field$name2 = field === null || field === void 0 ? void 0 : field.name) !== null && _field$name2 !== void 0 ? _field$name2 : id,
|
|
113
111
|
value: labels.missingAttribute,
|
|
114
112
|
valueErrorColor: true
|
|
@@ -164,14 +162,13 @@ export const shareCredentialCardFromCredential = (credential, invalidLVVC, expan
|
|
|
164
162
|
issuerDid: (_credential$issuerDid2 = credential.issuerDid) === null || _credential$issuerDid2 === void 0 ? void 0 : _credential$issuerDid2.did
|
|
165
163
|
} : undefined);
|
|
166
164
|
const displayedAttributes = getDisplayedAttributes(request, validityState, credential, selectiveDisclosureSupported, selectedFields);
|
|
167
|
-
const attributes = displayedAttributes.map((
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
} = _ref2;
|
|
165
|
+
const attributes = displayedAttributes.map(({
|
|
166
|
+
claim,
|
|
167
|
+
field,
|
|
168
|
+
id,
|
|
169
|
+
selected,
|
|
170
|
+
status
|
|
171
|
+
}, index) => {
|
|
175
172
|
const disabled = !credential || !field || field.required || !claim;
|
|
176
173
|
const attribute = {
|
|
177
174
|
...shareCredentialCardAttributeFromClaim(id, config, concatTestID(testID, 'attribute', `${index}`), labels, claim, field),
|
|
@@ -220,10 +217,9 @@ export const selectCredentialCardFromCredential = (credential, selected, request
|
|
|
220
217
|
...cardProps
|
|
221
218
|
};
|
|
222
219
|
const attributes = request.fields.map(field => {
|
|
223
|
-
const claim = spreadClaims(credential.claims).find(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
} = _ref3;
|
|
220
|
+
const claim = spreadClaims(credential.claims).find(({
|
|
221
|
+
key
|
|
222
|
+
}) => {
|
|
227
223
|
return key === field.keyMap[credential.id];
|
|
228
224
|
});
|
|
229
225
|
const attribute = selectCredentialCardAttributeFromClaim(field.id, config, testID, labels, claim, field);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Selector","SelectorStatus","CredentialNoticeWarningIcon","CredentialWarningIcon","RequiredAttributeIcon","concatTestID","detailsCardAttributeFromClaim","getCredentialCardPropsFromCredential","getValidityState","nestAttributes","supportsSelectiveDisclosure","ValidityState","validityCheckedCardFromCredential","credential","invalidLVVC","expanded","multipleCredentialsAvailable","config","notice","testID","labels","credentialHeaderDetail","credentialDetailErrorColor","credentialDetailPrimary","revoked","credentialDetailTestID","multipleCredentials","statusIcon","card","claims","header","missingCredentialCardFromRequest","request","_request$name","cardImage","undefined","color","missingCredential","credentialName","name","id","getAttributeSelectorStatus","field","validityState","claim","selected","Valid","Rejected","required","Required","Disabled","SelectedCheckmark","Empty","spreadClaims","parentClaimPath","arguments","length","reduce","acc","result","Array","isArray","value","claimPath","key","push","getDisplayedAttributes","selectiveDisclosureSupported","selectedFields","map","status","fields","includes","find","_ref","keyMap","shareCredentialCardAttributeFromClaim","_field$name$split$pop","_field$name","_field$name2","split","pop","path","missingAttribute","valueErrorColor","setStatusForNestedObjectOrArrayFields","attribute","disabled","accessory","createElement","isObject","attributes","values","rightAccessory","_attribute$attributes","nested","nestedAttribute","shareCredentialCardFromCredential","_credential$issuerDid","_credential$issuerDid2","issuerDid","did","text","selectiveDisclosureNotice","noticeIcon","cardTestId","displayedAttributes","_ref2","index","selectCredentialCardAttributeFromClaim","selectCredentialCardFromCredential","_credential$issuerDid3","SelectedRadio","cardProps","_ref3"],"sources":["credential-sharing.tsx"],"sourcesContent":["import {\n Claim,\n Config,\n CredentialDetail,\n PresentationDefinitionField,\n PresentationDefinitionRequestedCredential,\n} from '@procivis/react-native-one-core';\nimport React from 'react';\n\nimport {\n CredentialAttribute,\n CredentialCardProps,\n CredentialDetailsCardProps,\n CredentialHeaderProps,\n Selector,\n SelectorStatus,\n} from '../../ui-components/credential';\nimport { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';\nimport { CredentialNoticeWarningIcon, CredentialWarningIcon, RequiredAttributeIcon } from '../../ui-components/icons';\nimport { concatTestID } from '../testID';\nimport {\n CardLabels,\n detailsCardAttributeFromClaim,\n getCredentialCardPropsFromCredential,\n getValidityState,\n nestAttributes,\n supportsSelectiveDisclosure,\n ValidityState,\n} from './credential';\n\nexport const validityCheckedCardFromCredential = (\n credential: CredentialDetail,\n invalidLVVC: boolean,\n expanded: boolean,\n multipleCredentialsAvailable: boolean,\n config: Config,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID'> => {\n let credentialHeaderDetail:\n | Pick<\n CredentialHeaderProps,\n | 'credentialDetailPrimary'\n | 'credentialDetailSecondary'\n | 'credentialDetailErrorColor'\n | 'credentialDetailTestID'\n | 'statusIcon'\n >\n | undefined;\n if (invalidLVVC) {\n credentialHeaderDetail = {\n credentialDetailErrorColor: true,\n credentialDetailPrimary: labels.revoked,\n credentialDetailTestID: concatTestID(testID, 'header.invalid'),\n };\n } else if (!expanded && multipleCredentialsAvailable) {\n credentialHeaderDetail = {\n credentialDetailPrimary: labels.multipleCredentials,\n credentialDetailTestID: concatTestID(testID, 'header.multiple'),\n statusIcon: CredentialWarningIcon,\n };\n }\n\n const card = getCredentialCardPropsFromCredential(credential, credential.claims, config, notice, testID, labels);\n return {\n ...card,\n header: {\n ...card.header,\n ...credentialHeaderDetail,\n },\n };\n};\n\nexport const missingCredentialCardFromRequest = (\n request: PresentationDefinitionRequestedCredential,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style'> => {\n return {\n cardImage: undefined,\n color: undefined,\n testID,\n header: {\n credentialDetailErrorColor: true,\n credentialDetailPrimary: labels.missingCredential,\n credentialDetailTestID: concatTestID(testID, 'header.missing'),\n credentialName: request.name ?? request.id,\n statusIcon: CredentialWarningIcon,\n },\n ...notice,\n };\n};\n\ninterface DisplayedAttribute {\n claim?: Claim;\n field?: PresentationDefinitionField;\n id: string;\n selected?: boolean;\n status: SelectorStatus;\n}\n\nconst getAttributeSelectorStatus = (\n field: PresentationDefinitionField,\n validityState: ValidityState,\n credential?: CredentialDetail,\n claim?: Claim,\n selected?: boolean,\n): SelectorStatus => {\n if (!credential || validityState !== ValidityState.Valid) {\n return SelectorStatus.Rejected;\n }\n if (field.required) {\n if (claim) {\n return SelectorStatus.Required;\n } else {\n return SelectorStatus.Rejected;\n }\n }\n if (!claim) {\n return SelectorStatus.Disabled;\n }\n return selected ? SelectorStatus.SelectedCheckmark : SelectorStatus.Empty;\n};\n\n// Returns a spread list of all claims with their full JSON path as key, including all intermediate objects\nconst spreadClaims = (claims: Claim[], parentClaimPath = ''): Claim[] => {\n return claims.reduce((acc, claim) => {\n const result = [claim];\n if (Array.isArray(claim.value)) {\n const claimPath = parentClaimPath ? `${parentClaimPath}/${claim.key}` : claim.key;\n result.push(...spreadClaims(claim.value, claimPath));\n }\n return [...acc, ...result];\n }, [] as Claim[]);\n};\n\nconst getDisplayedAttributes = (\n request: PresentationDefinitionRequestedCredential,\n validityState: ValidityState,\n credential?: CredentialDetail,\n selectiveDisclosureSupported?: boolean,\n selectedFields?: string[],\n): DisplayedAttribute[] => {\n if (credential && selectiveDisclosureSupported === false) {\n return credential.claims.map((claim) => ({\n claim,\n id: claim.id,\n status: SelectorStatus.Required,\n }));\n }\n\n return request.fields.map((field) => {\n const selected = !field.required && selectedFields?.includes(field.id);\n const claim =\n credential &&\n spreadClaims(credential.claims).find(({ key }) => {\n return key === field.keyMap[credential.id];\n });\n const status = getAttributeSelectorStatus(field, validityState, credential, claim, selected);\n return { claim, field, id: field.id, selected, status };\n });\n};\n\nexport const shareCredentialCardAttributeFromClaim = (\n id: string,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n claim?: Claim,\n field?: PresentationDefinitionField,\n): CredentialAttribute => {\n if (claim) {\n return { ...detailsCardAttributeFromClaim(claim, config, testID), id };\n }\n return {\n id,\n name: field?.name?.split('/').pop() ?? id,\n path: field?.name ?? id,\n value: labels.missingAttribute,\n valueErrorColor: true,\n };\n};\n\n// Will propagate the attribute status (right accessory + selected?) for all nested attributes\n// Note: This function MUTATES the input attribute\nconst setStatusForNestedObjectOrArrayFields = (\n attribute: CredentialAttribute,\n status?: SelectorStatus,\n disabled?: boolean,\n) => {\n const accessory = status && <Selector status={status} />;\n const isObject = attribute.attributes && attribute.attributes.length > 0;\n const isArray = attribute.values && attribute.values.length > 0;\n\n // If the attribute is not an object or array, we update the attribute and return\n if (!isObject && !isArray) {\n attribute.rightAccessory = accessory;\n attribute.disabled = disabled;\n return attribute;\n }\n\n // The object can be optional (tappable radio-checkmark), or required (checkmark)\n if (status === SelectorStatus.SelectedCheckmark || status === SelectorStatus.Empty) {\n // If it's a selectable object, the accessory is rendered next to the object title,\n // The nested attributes have no accessory, and can not be selected\n attribute.rightAccessory = accessory;\n setStatusForNestedObjectOrArrayFields(attribute, undefined, true);\n } else {\n const nested = attribute.attributes ?? attribute.values;\n // If the object is required / rejected, the accessory is rendered next to each nested attribute (except other object titles)\n // all fields are disabled\n for (const nestedAttribute of nested) {\n setStatusForNestedObjectOrArrayFields(nestedAttribute, status, true);\n }\n }\n};\n\nexport type ShareCredentialCardLabels = CardLabels & {\n selectiveDisclosureNotice: string;\n missingAttribute: string;\n missingCredential: string;\n multipleCredentials: string;\n};\n\nexport const shareCredentialCardFromCredential = (\n credential: CredentialDetail | undefined,\n invalidLVVC: boolean,\n expanded: boolean,\n multipleCredentialsAvailable: boolean,\n request: PresentationDefinitionRequestedCredential,\n selectedFields: string[] | undefined,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const selectiveDisclosureSupported = supportsSelectiveDisclosure(\n credential ? { ...credential, issuerDid: credential.issuerDid?.did } : undefined,\n config,\n );\n const notice: CredentialCardNotice | undefined =\n selectiveDisclosureSupported === false\n ? {\n text: labels.selectiveDisclosureNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n }\n : undefined;\n const cardTestId = concatTestID(testID, 'card');\n const card = credential\n ? validityCheckedCardFromCredential(\n credential,\n invalidLVVC,\n expanded,\n multipleCredentialsAvailable,\n config,\n notice,\n cardTestId,\n labels,\n )\n : missingCredentialCardFromRequest(request, notice, cardTestId, labels);\n const validityState = getValidityState(\n credential ? { ...credential, issuerDid: credential.issuerDid?.did } : undefined,\n );\n const displayedAttributes = getDisplayedAttributes(\n request,\n validityState,\n credential,\n selectiveDisclosureSupported,\n selectedFields,\n );\n\n const attributes: CredentialAttribute[] = displayedAttributes.map(({ claim, field, id, selected, status }, index) => {\n const disabled = !credential || !field || field.required || !claim;\n const attribute: CredentialAttribute = {\n ...shareCredentialCardAttributeFromClaim(\n id,\n config,\n concatTestID(testID, 'attribute', `${index}`),\n labels,\n claim,\n field,\n ),\n selected,\n };\n\n setStatusForNestedObjectOrArrayFields(attribute, status, disabled);\n return attribute;\n });\n return {\n attributes: nestAttributes(attributes),\n card,\n };\n};\n\nexport const selectCredentialCardAttributeFromClaim = (\n id: string,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n claim?: Claim,\n field?: PresentationDefinitionField,\n): CredentialAttribute => {\n const attribute = shareCredentialCardAttributeFromClaim(id, config, testID, labels, claim, field);\n if (!claim) {\n return attribute;\n }\n return {\n ...attribute,\n rightAccessory: RequiredAttributeIcon,\n };\n};\n\nexport const selectCredentialCardFromCredential = (\n credential: CredentialDetail,\n selected: boolean,\n request: PresentationDefinitionRequestedCredential,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const selectiveDisclosureSupported = supportsSelectiveDisclosure(\n credential ? { ...credential, issuerDid: credential.issuerDid?.did } : undefined,\n config,\n );\n const rightAccessory = <Selector status={selected ? SelectorStatus.SelectedRadio : SelectorStatus.Empty} />;\n const notice: CredentialCardNotice | undefined =\n selectiveDisclosureSupported === false\n ? {\n text: labels.selectiveDisclosureNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n }\n : undefined;\n const { header, ...cardProps } = getCredentialCardPropsFromCredential(\n credential,\n credential.claims,\n config,\n notice,\n testID,\n labels,\n );\n const card = {\n header: {\n ...header,\n accessory: rightAccessory,\n },\n ...cardProps,\n };\n const attributes: CredentialAttribute[] = request.fields.map((field) => {\n const claim = spreadClaims(credential.claims).find(({ key }) => {\n return key === field.keyMap[credential.id];\n });\n\n const attribute = selectCredentialCardAttributeFromClaim(field.id, config, testID, labels, claim, field);\n return {\n ...attribute,\n rightAccessory: (\n <Selector status={field.required && !claim ? SelectorStatus.Rejected : SelectorStatus.Required} />\n ),\n };\n });\n return {\n attributes: nestAttributes(attributes),\n card,\n };\n};\n"],"mappings":"AAOA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAKEC,QAAQ,EACRC,cAAc,QACT,gCAAgC;AAEvC,SAASC,2BAA2B,EAAEC,qBAAqB,EAAEC,qBAAqB,QAA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M,EACjBZ,MAAM,EACNC,MAAM,EACNC,MAAM,EACNC,MAAM,CACP;EACD,MAAMQ,IAAI,GAAG;IACXE,MAAM,EAAE;MACN,GAAGA,MAAM;MACT0D,SAAS,EAAEK;IACb,CAAC;IACD,GAAGoB;EACL,CAAC;EACD,MAAMtB,UAAiC,GAAG3D,OAAO,CAACuC,MAAM,CAACF,GAAG,CAAE3B,KAAK,IAAK;IACtE,MAAME,KAAK,GAAGS,YAAY,CAACxC,UAAU,CAACgB,MAAM,CAAC,CAAC4C,IAAI,CAACyC,KAAA,IAAa;MAAA,IAAZ;QAAElD;MAAI,CAAC,GAAAkD,KAAA;MACzD,OAAOlD,GAAG,KAAKtB,KAAK,CAACiC,MAAM,CAAC9D,UAAU,CAAC2B,EAAE,CAAC;IAC5C,CAAC,CAAC;IAEF,MAAM8C,SAAS,GAAGuB,sCAAsC,CAACnE,KAAK,CAACF,EAAE,EAAEvB,MAAM,EAAEE,MAAM,EAAEC,MAAM,EAAEwB,KAAK,EAAEF,KAAK,CAAC;IACxG,OAAO;MACL,GAAG4C,SAAS;MACZO,cAAc,eACZ9F,KAAA,CAAA0F,aAAA,CAACzF,QAAQ;QAACsE,MAAM,EAAE5B,KAAK,CAACM,QAAQ,IAAI,CAACJ,KAAK,GAAG3C,cAAc,CAAC8C,QAAQ,GAAG9C,cAAc,CAACgD;MAAS;IAEnG,CAAC;EACH,CAAC,CAAC;EACF,OAAO;IACL0C,UAAU,EAAElF,cAAc,CAACkF,UAAU,CAAC;IACtC/D;EACF,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"names":["React","Selector","SelectorStatus","CredentialNoticeWarningIcon","CredentialWarningIcon","RequiredAttributeIcon","concatTestID","detailsCardAttributeFromClaim","getCredentialCardPropsFromCredential","getValidityState","nestAttributes","supportsSelectiveDisclosure","ValidityState","validityCheckedCardFromCredential","credential","invalidLVVC","expanded","multipleCredentialsAvailable","config","notice","testID","labels","credentialHeaderDetail","credentialDetailErrorColor","credentialDetailPrimary","revoked","credentialDetailTestID","multipleCredentials","statusIcon","card","claims","header","missingCredentialCardFromRequest","request","_request$name","cardImage","undefined","color","missingCredential","credentialName","name","id","getAttributeSelectorStatus","field","validityState","claim","selected","Valid","Rejected","required","Required","Disabled","SelectedCheckmark","Empty","spreadClaims","parentClaimPath","reduce","acc","result","Array","isArray","value","claimPath","key","push","getDisplayedAttributes","selectiveDisclosureSupported","selectedFields","map","status","fields","includes","find","keyMap","shareCredentialCardAttributeFromClaim","_field$name$split$pop","_field$name","_field$name2","split","pop","path","missingAttribute","valueErrorColor","setStatusForNestedObjectOrArrayFields","attribute","disabled","accessory","createElement","isObject","attributes","length","values","rightAccessory","_attribute$attributes","nested","nestedAttribute","shareCredentialCardFromCredential","_credential$issuerDid","_credential$issuerDid2","issuerDid","did","text","selectiveDisclosureNotice","noticeIcon","cardTestId","displayedAttributes","index","selectCredentialCardAttributeFromClaim","selectCredentialCardFromCredential","_credential$issuerDid3","SelectedRadio","cardProps"],"sources":["credential-sharing.tsx"],"sourcesContent":["import {\n Claim,\n Config,\n CredentialDetail,\n PresentationDefinitionField,\n PresentationDefinitionRequestedCredential,\n} from '@procivis/react-native-one-core';\nimport React from 'react';\n\nimport {\n CredentialAttribute,\n CredentialCardProps,\n CredentialDetailsCardProps,\n CredentialHeaderProps,\n Selector,\n SelectorStatus,\n} from '../../ui-components/credential';\nimport { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';\nimport { CredentialNoticeWarningIcon, CredentialWarningIcon, RequiredAttributeIcon } from '../../ui-components/icons';\nimport { concatTestID } from '../testID';\nimport {\n CardLabels,\n detailsCardAttributeFromClaim,\n getCredentialCardPropsFromCredential,\n getValidityState,\n nestAttributes,\n supportsSelectiveDisclosure,\n ValidityState,\n} from './credential';\n\nexport const validityCheckedCardFromCredential = (\n credential: CredentialDetail,\n invalidLVVC: boolean,\n expanded: boolean,\n multipleCredentialsAvailable: boolean,\n config: Config,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID'> => {\n let credentialHeaderDetail:\n | Pick<\n CredentialHeaderProps,\n | 'credentialDetailPrimary'\n | 'credentialDetailSecondary'\n | 'credentialDetailErrorColor'\n | 'credentialDetailTestID'\n | 'statusIcon'\n >\n | undefined;\n if (invalidLVVC) {\n credentialHeaderDetail = {\n credentialDetailErrorColor: true,\n credentialDetailPrimary: labels.revoked,\n credentialDetailTestID: concatTestID(testID, 'header.invalid'),\n };\n } else if (!expanded && multipleCredentialsAvailable) {\n credentialHeaderDetail = {\n credentialDetailPrimary: labels.multipleCredentials,\n credentialDetailTestID: concatTestID(testID, 'header.multiple'),\n statusIcon: CredentialWarningIcon,\n };\n }\n\n const card = getCredentialCardPropsFromCredential(credential, credential.claims, config, notice, testID, labels);\n return {\n ...card,\n header: {\n ...card.header,\n ...credentialHeaderDetail,\n },\n };\n};\n\nexport const missingCredentialCardFromRequest = (\n request: PresentationDefinitionRequestedCredential,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style'> => {\n return {\n cardImage: undefined,\n color: undefined,\n testID,\n header: {\n credentialDetailErrorColor: true,\n credentialDetailPrimary: labels.missingCredential,\n credentialDetailTestID: concatTestID(testID, 'header.missing'),\n credentialName: request.name ?? request.id,\n statusIcon: CredentialWarningIcon,\n },\n ...notice,\n };\n};\n\ninterface DisplayedAttribute {\n claim?: Claim;\n field?: PresentationDefinitionField;\n id: string;\n selected?: boolean;\n status: SelectorStatus;\n}\n\nconst getAttributeSelectorStatus = (\n field: PresentationDefinitionField,\n validityState: ValidityState,\n credential?: CredentialDetail,\n claim?: Claim,\n selected?: boolean,\n): SelectorStatus => {\n if (!credential || validityState !== ValidityState.Valid) {\n return SelectorStatus.Rejected;\n }\n if (field.required) {\n if (claim) {\n return SelectorStatus.Required;\n } else {\n return SelectorStatus.Rejected;\n }\n }\n if (!claim) {\n return SelectorStatus.Disabled;\n }\n return selected ? SelectorStatus.SelectedCheckmark : SelectorStatus.Empty;\n};\n\n// Returns a spread list of all claims with their full JSON path as key, including all intermediate objects\nconst spreadClaims = (claims: Claim[], parentClaimPath = ''): Claim[] => {\n return claims.reduce((acc, claim) => {\n const result = [claim];\n if (Array.isArray(claim.value)) {\n const claimPath = parentClaimPath ? `${parentClaimPath}/${claim.key}` : claim.key;\n result.push(...spreadClaims(claim.value, claimPath));\n }\n return [...acc, ...result];\n }, [] as Claim[]);\n};\n\nconst getDisplayedAttributes = (\n request: PresentationDefinitionRequestedCredential,\n validityState: ValidityState,\n credential?: CredentialDetail,\n selectiveDisclosureSupported?: boolean,\n selectedFields?: string[],\n): DisplayedAttribute[] => {\n if (credential && selectiveDisclosureSupported === false) {\n return credential.claims.map((claim) => ({\n claim,\n id: claim.id,\n status: SelectorStatus.Required,\n }));\n }\n\n return request.fields.map((field) => {\n const selected = !field.required && selectedFields?.includes(field.id);\n const claim =\n credential &&\n spreadClaims(credential.claims).find(({ key }) => {\n return key === field.keyMap[credential.id];\n });\n const status = getAttributeSelectorStatus(field, validityState, credential, claim, selected);\n return { claim, field, id: field.id, selected, status };\n });\n};\n\nexport const shareCredentialCardAttributeFromClaim = (\n id: string,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n claim?: Claim,\n field?: PresentationDefinitionField,\n): CredentialAttribute => {\n if (claim) {\n return { ...detailsCardAttributeFromClaim(claim, config, testID), id };\n }\n return {\n id,\n name: field?.name?.split('/').pop() ?? id,\n path: field?.name ?? id,\n value: labels.missingAttribute,\n valueErrorColor: true,\n };\n};\n\n// Will propagate the attribute status (right accessory + selected?) for all nested attributes\n// Note: This function MUTATES the input attribute\nconst setStatusForNestedObjectOrArrayFields = (\n attribute: CredentialAttribute,\n status?: SelectorStatus,\n disabled?: boolean,\n) => {\n const accessory = status && <Selector status={status} />;\n const isObject = attribute.attributes && attribute.attributes.length > 0;\n const isArray = attribute.values && attribute.values.length > 0;\n\n // If the attribute is not an object or array, we update the attribute and return\n if (!isObject && !isArray) {\n attribute.rightAccessory = accessory;\n attribute.disabled = disabled;\n return attribute;\n }\n\n // The object can be optional (tappable radio-checkmark), or required (checkmark)\n if (status === SelectorStatus.SelectedCheckmark || status === SelectorStatus.Empty) {\n // If it's a selectable object, the accessory is rendered next to the object title,\n // The nested attributes have no accessory, and can not be selected\n attribute.rightAccessory = accessory;\n setStatusForNestedObjectOrArrayFields(attribute, undefined, true);\n } else {\n const nested = attribute.attributes ?? attribute.values;\n // If the object is required / rejected, the accessory is rendered next to each nested attribute (except other object titles)\n // all fields are disabled\n for (const nestedAttribute of nested) {\n setStatusForNestedObjectOrArrayFields(nestedAttribute, status, true);\n }\n }\n};\n\nexport type ShareCredentialCardLabels = CardLabels & {\n selectiveDisclosureNotice: string;\n missingAttribute: string;\n missingCredential: string;\n multipleCredentials: string;\n};\n\nexport const shareCredentialCardFromCredential = (\n credential: CredentialDetail | undefined,\n invalidLVVC: boolean,\n expanded: boolean,\n multipleCredentialsAvailable: boolean,\n request: PresentationDefinitionRequestedCredential,\n selectedFields: string[] | undefined,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const selectiveDisclosureSupported = supportsSelectiveDisclosure(\n credential ? { ...credential, issuerDid: credential.issuerDid?.did } : undefined,\n config,\n );\n const notice: CredentialCardNotice | undefined =\n selectiveDisclosureSupported === false\n ? {\n text: labels.selectiveDisclosureNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n }\n : undefined;\n const cardTestId = concatTestID(testID, 'card');\n const card = credential\n ? validityCheckedCardFromCredential(\n credential,\n invalidLVVC,\n expanded,\n multipleCredentialsAvailable,\n config,\n notice,\n cardTestId,\n labels,\n )\n : missingCredentialCardFromRequest(request, notice, cardTestId, labels);\n const validityState = getValidityState(\n credential ? { ...credential, issuerDid: credential.issuerDid?.did } : undefined,\n );\n const displayedAttributes = getDisplayedAttributes(\n request,\n validityState,\n credential,\n selectiveDisclosureSupported,\n selectedFields,\n );\n\n const attributes: CredentialAttribute[] = displayedAttributes.map(({ claim, field, id, selected, status }, index) => {\n const disabled = !credential || !field || field.required || !claim;\n const attribute: CredentialAttribute = {\n ...shareCredentialCardAttributeFromClaim(\n id,\n config,\n concatTestID(testID, 'attribute', `${index}`),\n labels,\n claim,\n field,\n ),\n selected,\n };\n\n setStatusForNestedObjectOrArrayFields(attribute, status, disabled);\n return attribute;\n });\n return {\n attributes: nestAttributes(attributes),\n card,\n };\n};\n\nexport const selectCredentialCardAttributeFromClaim = (\n id: string,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n claim?: Claim,\n field?: PresentationDefinitionField,\n): CredentialAttribute => {\n const attribute = shareCredentialCardAttributeFromClaim(id, config, testID, labels, claim, field);\n if (!claim) {\n return attribute;\n }\n return {\n ...attribute,\n rightAccessory: RequiredAttributeIcon,\n };\n};\n\nexport const selectCredentialCardFromCredential = (\n credential: CredentialDetail,\n selected: boolean,\n request: PresentationDefinitionRequestedCredential,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const selectiveDisclosureSupported = supportsSelectiveDisclosure(\n credential ? { ...credential, issuerDid: credential.issuerDid?.did } : undefined,\n config,\n );\n const rightAccessory = <Selector status={selected ? SelectorStatus.SelectedRadio : SelectorStatus.Empty} />;\n const notice: CredentialCardNotice | undefined =\n selectiveDisclosureSupported === false\n ? {\n text: labels.selectiveDisclosureNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n }\n : undefined;\n const { header, ...cardProps } = getCredentialCardPropsFromCredential(\n credential,\n credential.claims,\n config,\n notice,\n testID,\n labels,\n );\n const card = {\n header: {\n ...header,\n accessory: rightAccessory,\n },\n ...cardProps,\n };\n const attributes: CredentialAttribute[] = request.fields.map((field) => {\n const claim = spreadClaims(credential.claims).find(({ key }) => {\n return key === field.keyMap[credential.id];\n });\n\n const attribute = selectCredentialCardAttributeFromClaim(field.id, config, testID, labels, claim, field);\n return {\n ...attribute,\n rightAccessory: (\n <Selector status={field.required && !claim ? SelectorStatus.Rejected : SelectorStatus.Required} />\n ),\n };\n });\n return {\n attributes: nestAttributes(attributes),\n card,\n };\n};\n"],"mappings":"AAOA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAKEC,QAAQ,EACRC,cAAc,QACT,gCAAgC;AAEvC,SAASC,2BAA2B,EAAEC,qBAAqB,EAAEC,qBAAqB,QAAQ,2BAA2B;AACrH,SAASC,YAAY,QAAQ,WAAW;AACxC,SAEEC,6BAA6B,EAC7BC,oCAAoC,EACpCC,gBAAgB,EAChBC,cAAc,EACdC,2BAA2B,EAC3BC,aAAa,QACR,cAAc;AAErB,OAAO,MAAMC,iCAAiC,GAAGA,CAC/CC,UAA4B,EAC5BC,WAAoB,EACpBC,QAAiB,EACjBC,4BAAqC,EACrCC,MAAc,EACdC,MAAwC,EACxCC,MAAc,EACdC,MAAiC,KACmC;EACpE,IAAIC,sBASS;EACb,IAAIP,WAAW,EAAE;IACfO,sBAAsB,GAAG;MACvBC,0BAA0B,EAAE,IAAI;MAChCC,uBAAuB,EAAEH,MAAM,CAACI,OAAO;MACvCC,sBAAsB,EAAEpB,YAAY,CAACc,MAAM,EAAE,gBAAgB;IAC/D,CAAC;EACH,CAAC,MAAM,IAAI,CAACJ,QAAQ,IAAIC,4BAA4B,EAAE;IACpDK,sBAAsB,GAAG;MACvBE,uBAAuB,EAAEH,MAAM,CAACM,mBAAmB;MACnDD,sBAAsB,EAAEpB,YAAY,CAACc,MAAM,EAAE,iBAAiB,CAAC;MAC/DQ,UAAU,EAAExB;IACd,CAAC;EACH;EAEA,MAAMyB,IAAI,GAAGrB,oCAAoC,CAACM,UAAU,EAAEA,UAAU,CAACgB,MAAM,EAAEZ,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAEC,MAAM,CAAC;EAChH,OAAO;IACL,GAAGQ,IAAI;IACPE,MAAM,EAAE;MACN,G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