@procivis/one-react-native-components 0.2.54 → 0.3.27
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 +16 -18
- package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details-with-buttons.js +31 -23
- package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details.js +30 -31
- 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 +97 -0
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -0
- package/lib/commonjs/components/history/history-list-item.js +55 -0
- package/lib/commonjs/components/history/history-list-item.js.map +1 -0
- package/lib/commonjs/components/history/history-list-screen.js +123 -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 +25 -28
- 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 +16 -19
- 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 +36 -9
- package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
- package/lib/commonjs/ui-components/icons/history.js +115 -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 +35 -42
- 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 +44 -34
- 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 +28 -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/identifiers.js +20 -0
- package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/index.js +22 -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 +108 -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 +17 -7
- 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 +24 -25
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js +23 -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 +4 -3
- 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 +13 -14
- package/lib/module/components/entity/entity-attributes.js.map +1 -1
- package/lib/module/components/entity/entity-details-with-buttons.js +29 -20
- package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/module/components/entity/entity-details.js +28 -28
- 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 +87 -0
- package/lib/module/components/history/history-list-item-icon.js.map +1 -0
- package/lib/module/components/history/history-list-item.js +46 -0
- package/lib/module/components/history/history-list-item.js.map +1 -0
- package/lib/module/components/history/history-list-screen.js +114 -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 +23 -26
- 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 +12 -14
- 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 +31 -5
- package/lib/module/ui-components/icons/entity.js.map +1 -1
- package/lib/module/ui-components/icons/history.js +103 -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 +30 -35
- 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 +42 -30
- 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 +27 -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/identifiers.js +13 -0
- package/lib/module/utils/hooks/core/identifiers.js.map +1 -0
- package/lib/module/utils/hooks/core/index.js +2 -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 +102 -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 +16 -6
- 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 +23 -24
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js +23 -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 +4 -3
- 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/entity/entity-details-with-buttons.d.ts +3 -2
- package/lib/typescript/components/entity/entity-details.d.ts +3 -2
- 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 +21 -0
- package/lib/typescript/components/history/history-list-screen.d.ts +24 -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/entity.d.ts +1 -0
- package/lib/typescript/ui-components/icons/history.d.ts +22 -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/screens/nerd-mode-screen.d.ts +4 -4
- 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 +9 -4
- package/lib/typescript/utils/hooks/core/history.d.ts +2 -5
- package/lib/typescript/utils/hooks/core/identifiers.d.ts +2 -0
- package/lib/typescript/utils/hooks/core/index.d.ts +2 -0
- package/lib/typescript/utils/hooks/core/proofs.d.ts +16 -9
- package/lib/typescript/utils/hooks/core/trust-entity.d.ts +6 -1
- 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 +61 -47
- package/src/components/entity/entity-attributes.tsx +5 -4
- package/src/components/entity/entity-details-with-buttons.tsx +20 -13
- package/src/components/entity/entity-details.tsx +24 -27
- package/src/components/history/history-details-screen.tsx +89 -0
- package/src/components/history/history-list-item-icon.tsx +113 -0
- package/src/components/history/history-list-item.tsx +64 -0
- package/src/components/history/history-list-screen.tsx +157 -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/components/proof-request/share-credential.tsx +2 -1
- 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/entity/entity-cluster.tsx +1 -1
- 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/entity.tsx +27 -0
- package/src/ui-components/icons/history.tsx +84 -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 +6 -6
- 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 +45 -27
- package/src/utils/hooks/core/credential-schemas.ts +1 -1
- package/src/utils/hooks/core/credentials.ts +18 -17
- package/src/utils/hooks/core/history.ts +2 -57
- package/src/utils/hooks/core/identifiers.ts +18 -0
- package/src/utils/hooks/core/index.ts +3 -1
- package/src/utils/hooks/core/proof-schemas.ts +1 -1
- package/src/utils/hooks/core/proofs.ts +111 -51
- package/src/utils/hooks/core/trust-entity.ts +21 -13
- 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-sharing.tsx +25 -25
- package/src/utils/parsers/credential.ts +5 -1
- package/src/utils/parsers/index.ts +1 -0
- package/src/utils/parsers/query.tsx +4 -2
- 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
|
@@ -11,43 +11,31 @@ var _coreContext = require("./core-context");
|
|
|
11
11
|
var _credentialSchemas = require("./credential-schemas");
|
|
12
12
|
var _history = require("./history");
|
|
13
13
|
const PAGE_SIZE = 10;
|
|
14
|
-
const PROOF_SCHEMA_LIST_QUERY_KEY = 'proof-schema-list';
|
|
15
|
-
exports.
|
|
16
|
-
const
|
|
17
|
-
exports.
|
|
18
|
-
const
|
|
19
|
-
exports.PROOF_SCHEMA_DETAIL_QUERY_KEY = PROOF_SCHEMA_DETAIL_QUERY_KEY;
|
|
20
|
-
const PROOF_SCHEMA_SHARE_QUERY_KEY = 'proof-schema-share';
|
|
21
|
-
exports.PROOF_SCHEMA_SHARE_QUERY_KEY = PROOF_SCHEMA_SHARE_QUERY_KEY;
|
|
22
|
-
const useProofSchemas = function (queryParams) {
|
|
23
|
-
let keepPreviousData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
14
|
+
const PROOF_SCHEMA_LIST_QUERY_KEY = exports.PROOF_SCHEMA_LIST_QUERY_KEY = 'proof-schema-list';
|
|
15
|
+
const PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY = exports.PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY = 'proof-schema-import';
|
|
16
|
+
const PROOF_SCHEMA_DETAIL_QUERY_KEY = exports.PROOF_SCHEMA_DETAIL_QUERY_KEY = 'proof-schema-detail';
|
|
17
|
+
const PROOF_SCHEMA_SHARE_QUERY_KEY = exports.PROOF_SCHEMA_SHARE_QUERY_KEY = 'proof-schema-share';
|
|
18
|
+
const useProofSchemas = (queryParams, keepPreviousData = true) => {
|
|
24
19
|
const {
|
|
25
20
|
core,
|
|
26
21
|
organisationId
|
|
27
22
|
} = (0, _coreContext.useONECore)();
|
|
28
|
-
return (0, _reactQuery.useInfiniteQuery)([PROOF_SCHEMA_LIST_QUERY_KEY, ...(0, _query.getQueryKeyFromProofSchemaListQueryParams)(queryParams)],
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
let {
|
|
39
|
-
values
|
|
40
|
-
} = _ref2;
|
|
41
|
-
return values;
|
|
42
|
-
});
|
|
43
|
-
}, {
|
|
23
|
+
return (0, _reactQuery.useInfiniteQuery)([PROOF_SCHEMA_LIST_QUERY_KEY, ...(0, _query.getQueryKeyFromProofSchemaListQueryParams)(queryParams)], ({
|
|
24
|
+
pageParam = 0
|
|
25
|
+
}) => core.getProofSchemas({
|
|
26
|
+
organisationId,
|
|
27
|
+
page: pageParam,
|
|
28
|
+
pageSize: PAGE_SIZE,
|
|
29
|
+
...queryParams
|
|
30
|
+
}).then(({
|
|
31
|
+
values
|
|
32
|
+
}) => values), {
|
|
44
33
|
getNextPageParam: (lastPage, allPages) => lastPage.length === PAGE_SIZE ? allPages.length : undefined,
|
|
45
34
|
keepPreviousData
|
|
46
35
|
});
|
|
47
36
|
};
|
|
48
37
|
exports.useProofSchemas = useProofSchemas;
|
|
49
|
-
const useProofSchemaDetail =
|
|
50
|
-
let active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
38
|
+
const useProofSchemaDetail = (proofSchemaId, active = true) => {
|
|
51
39
|
const {
|
|
52
40
|
core
|
|
53
41
|
} = (0, _coreContext.useONECore)();
|
|
@@ -75,15 +63,12 @@ const useProofSchemaAccept = () => {
|
|
|
75
63
|
core,
|
|
76
64
|
organisationId
|
|
77
65
|
} = (0, _coreContext.useONECore)();
|
|
78
|
-
return (0, _reactQuery.useMutation)(async
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
schema
|
|
85
|
-
});
|
|
86
|
-
}, {
|
|
66
|
+
return (0, _reactQuery.useMutation)(async ({
|
|
67
|
+
schema
|
|
68
|
+
}) => core.importProofSchema({
|
|
69
|
+
organisationId,
|
|
70
|
+
schema
|
|
71
|
+
}), {
|
|
87
72
|
onSuccess: async () => {
|
|
88
73
|
await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);
|
|
89
74
|
await queryClient.invalidateQueries(_credentialSchemas.CREDENTIAL_SCHEMA_LIST_QUERY_KEY);
|
|
@@ -114,7 +99,7 @@ const useProofSchemaDelete = () => {
|
|
|
114
99
|
onSuccess: async (_, proofSchemaId) => {
|
|
115
100
|
await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);
|
|
116
101
|
await queryClient.invalidateQueries(_history.HISTORY_LIST_QUERY_KEY);
|
|
117
|
-
await queryClient.
|
|
102
|
+
await queryClient.removeQueries([PROOF_SCHEMA_DETAIL_QUERY_KEY, proofSchemaId]);
|
|
118
103
|
}
|
|
119
104
|
});
|
|
120
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactQuery","require","_query","_client","_coreContext","_credentialSchemas","_history","PAGE_SIZE","PROOF_SCHEMA_LIST_QUERY_KEY","exports","PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY","PROOF_SCHEMA_DETAIL_QUERY_KEY","PROOF_SCHEMA_SHARE_QUERY_KEY","useProofSchemas","queryParams","keepPreviousData","
|
|
1
|
+
{"version":3,"names":["_reactQuery","require","_query","_client","_coreContext","_credentialSchemas","_history","PAGE_SIZE","PROOF_SCHEMA_LIST_QUERY_KEY","exports","PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY","PROOF_SCHEMA_DETAIL_QUERY_KEY","PROOF_SCHEMA_SHARE_QUERY_KEY","useProofSchemas","queryParams","keepPreviousData","core","organisationId","useONECore","useInfiniteQuery","getQueryKeyFromProofSchemaListQueryParams","pageParam","getProofSchemas","page","pageSize","then","values","getNextPageParam","lastPage","allPages","length","undefined","useProofSchemaDetail","proofSchemaId","active","useQuery","getProofSchema","enabled","Boolean","useProofSchemaImportDetail","url","httpClient","useHTTPClient","get","response","ok","originalError","data","useProofSchemaAccept","queryClient","useQueryClient","useMutation","schema","importProofSchema","onSuccess","invalidateQueries","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","HISTORY_LIST_QUERY_KEY","useProofSchemaCreate","proofSchema","createProofSchema","useProofSchemaDelete","deleteProofSchema","_","removeQueries","useShareProofSchema","schemaId","shareProofSchema","Promise","reject"],"sources":["proof-schemas.ts"],"sourcesContent":["import {\n CreateProofSchemaRequest,\n ImportProofSchema,\n ProofSchema,\n ProofSchemaListItem,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromProofSchemaListQueryParams } from '../../parsers/query';\nimport { useHTTPClient } from '../http/client';\nimport { useONECore } from './core-context';\nimport { CREDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 10;\nexport const PROOF_SCHEMA_LIST_QUERY_KEY = 'proof-schema-list';\nexport const PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY = 'proof-schema-import';\nexport const PROOF_SCHEMA_DETAIL_QUERY_KEY = 'proof-schema-detail';\nexport const PROOF_SCHEMA_SHARE_QUERY_KEY = 'proof-schema-share';\n\nexport const useProofSchemas = (queryParams?: Partial<ProofSchemaListQuery>, keepPreviousData = true) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [PROOF_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromProofSchemaListQueryParams(queryParams)],\n ({ pageParam = 0 }) =>\n core\n .getProofSchemas({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n })\n .then(({ values }) => values),\n {\n getNextPageParam: (lastPage, allPages) => (lastPage.length === PAGE_SIZE ? allPages.length : undefined),\n keepPreviousData,\n },\n );\n};\n\nexport const useProofSchemaDetail = (proofSchemaId: ProofSchemaListItem['id'] | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [PROOF_SCHEMA_DETAIL_QUERY_KEY, proofSchemaId],\n () => (proofSchemaId ? core.getProofSchema(proofSchemaId) : undefined),\n {\n enabled: active && Boolean(proofSchemaId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useProofSchemaImportDetail = (url: string) => {\n const httpClient = useHTTPClient();\n\n return useQuery(\n [PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY, url],\n () =>\n httpClient.get(url).then((response) => {\n if (!response.ok) {\n throw response.originalError;\n }\n return response.data as ImportProofSchema;\n }),\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const useProofSchemaAccept = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async ({ schema }: { schema: ImportProofSchema }) =>\n core.importProofSchema({\n organisationId,\n schema,\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useProofSchemaCreate = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (proofSchema: CreateProofSchemaRequest) => core.createProofSchema(proofSchema), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useProofSchemaDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (proofSchemaId: ProofSchema['id']) => core.deleteProofSchema(proofSchemaId), {\n onSuccess: async (_, proofSchemaId) => {\n await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n await queryClient.removeQueries([PROOF_SCHEMA_DETAIL_QUERY_KEY, proofSchemaId]);\n },\n });\n};\n\nexport const useShareProofSchema = (schemaId?: string) => {\n const { core } = useONECore();\n\n return useQuery(\n [PROOF_SCHEMA_SHARE_QUERY_KEY, schemaId],\n () => (schemaId ? core.shareProofSchema(schemaId) : Promise.reject()),\n {\n enabled: Boolean(schemaId),\n keepPreviousData: true,\n },\n );\n};\n"],"mappings":";;;;;;AAOA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAEA,MAAMM,SAAS,GAAG,EAAE;AACb,MAAMC,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,GAAG,mBAAmB;AACvD,MAAME,oCAAoC,GAAAD,OAAA,CAAAC,oCAAA,GAAG,qBAAqB;AAClE,MAAMC,6BAA6B,GAAAF,OAAA,CAAAE,6BAAA,GAAG,qBAAqB;AAC3D,MAAMC,4BAA4B,GAAAH,OAAA,CAAAG,4BAAA,GAAG,oBAAoB;AAEzD,MAAMC,eAAe,GAAGA,CAACC,WAA2C,EAAEC,gBAAgB,GAAG,IAAI,KAAK;EACvG,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAG,IAAAC,uBAAU,EAAC,CAAC;EAE7C,OAAO,IAAAC,4BAAgB,EACrB,CAACX,2BAA2B,EAAE,GAAG,IAAAY,gDAAyC,EAACN,WAAW,CAAC,CAAC,EACxF,CAAC;IAAEO,SAAS,GAAG;EAAE,CAAC,KAChBL,IAAI,CACDM,eAAe,CAAC;IACfL,cAAc;IACdM,IAAI,EAAEF,SAAS;IACfG,QAAQ,EAAEjB,SAAS;IACnB,GAAGO;EACL,CAAC,CAAC,CACDW,IAAI,CAAC,CAAC;IAAEC;EAAO,CAAC,KAAKA,MA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7B,aAAa,CAAC,EAAE;IACpGqB,SAAS,EAAE,MAAAA,CAAOS,CAAC,EAAE9B,aAAa,KAAK;MACrC,MAAMgB,WAAW,CAACM,iBAAiB,CAAC/C,2BAA2B,CAAC;MAChE,MAAMyC,WAAW,CAACM,iBAAiB,CAACE,+BAAsB,CAAC;MAC3D,MAAMR,WAAW,CAACe,aAAa,CAAC,CAACrD,6BAA6B,EAAEsB,aAAa,CAAC,CAAC;IACjF;EACF,CAAC,CAAC;AACJ,CAAC;AAACxB,OAAA,CAAAoD,oBAAA,GAAAA,oBAAA;AAEK,MAAMI,mBAAmB,GAAIC,QAAiB,IAAK;EACxD,MAAM;IAAElD;EAAK,CAAC,GAAG,IAAAE,uBAAU,EAAC,CAAC;EAE7B,OAAO,IAAAiB,oBAAQ,EACb,CAACvB,4BAA4B,EAAEsD,QAAQ,CAAC,EACxC,MAAOA,QAAQ,GAAGlD,IAAI,CAACmD,gBAAgB,CAACD,QAAQ,CAAC,GAAGE,OAAO,CAACC,MAAM,CAAC,CAAE,EACrE;IACEhC,OAAO,EAAEC,OAAO,CAAC4B,QAAQ,CAAC;IAC1BnD,gBAAgB,EAAE;EACpB,CACF,CAAC;AACH,CAAC;AAACN,OAAA,CAAAwD,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useShareProof = exports.useRetainProofCheck = exports.useProposeProof = exports.useProofs = exports.useProofUrl = exports.useProofState = exports.
|
|
6
|
+
exports.useShareProof = exports.useRetainProofCheck = exports.useProposeProof = exports.useProofs = exports.useProofUrl = exports.useProofState = exports.useProofReject = exports.useProofForSchemaIdWithTransport = exports.useProofDetail = exports.useProofDelete = exports.useProofCreate = exports.useProofAccept = exports.useDeleteProofData = exports.useDeleteAllProofsData = exports.useCleanupUnusedProofs = exports.VerificationProtocol = exports.PROOF_STATE_QUERY_KEY = exports.PROOF_LIST_QUERY_KEY = exports.PROOF_DETAIL_QUERY_KEY = exports.IssuanceProtocol = void 0;
|
|
7
7
|
var _reactNativeOneCore = require("@procivis/react-native-one-core");
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _reactQuery = require("react-query");
|
|
@@ -15,12 +15,9 @@ var _errorCode = require("./error-code");
|
|
|
15
15
|
var _history = require("./history");
|
|
16
16
|
var _proofSchemas = require("./proof-schemas");
|
|
17
17
|
const PAGE_SIZE = 10;
|
|
18
|
-
const PROOF_DETAIL_QUERY_KEY = 'proof-detail';
|
|
19
|
-
exports.
|
|
20
|
-
const
|
|
21
|
-
exports.PROOF_STATE_QUERY_KEY = PROOF_STATE_QUERY_KEY;
|
|
22
|
-
const PROOF_LIST_QUERY_KEY = 'proof-list';
|
|
23
|
-
exports.PROOF_LIST_QUERY_KEY = PROOF_LIST_QUERY_KEY;
|
|
18
|
+
const PROOF_DETAIL_QUERY_KEY = exports.PROOF_DETAIL_QUERY_KEY = 'proof-detail';
|
|
19
|
+
const PROOF_STATE_QUERY_KEY = exports.PROOF_STATE_QUERY_KEY = 'proof-state';
|
|
20
|
+
const PROOF_LIST_QUERY_KEY = exports.PROOF_LIST_QUERY_KEY = 'proof-list';
|
|
24
21
|
const useProofDetail = proofId => {
|
|
25
22
|
const {
|
|
26
23
|
core
|
|
@@ -35,7 +32,7 @@ const useProofState = (proofId, isPolling) => {
|
|
|
35
32
|
const {
|
|
36
33
|
core
|
|
37
34
|
} = (0, _coreContext.useONECore)();
|
|
38
|
-
return (0, _reactQuery.useQuery)([PROOF_STATE_QUERY_KEY, proofId], () => core.getProof(proofId).then(proof => proof.state), {
|
|
35
|
+
return (0, _reactQuery.useQuery)([PROOF_STATE_QUERY_KEY, proofId], () => proofId ? core.getProof(proofId).then(proof => proof.state) : undefined, {
|
|
39
36
|
enabled: Boolean(proofId),
|
|
40
37
|
refetchInterval: isPolling ? 1000 : false
|
|
41
38
|
});
|
|
@@ -46,13 +43,10 @@ const useProofUrl = () => {
|
|
|
46
43
|
const {
|
|
47
44
|
core
|
|
48
45
|
} = (0, _coreContext.useONECore)();
|
|
49
|
-
return (0, _reactQuery.useMutation)(async
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} = _ref;
|
|
54
|
-
return core.shareProof(proofId, request !== null && request !== void 0 ? request : {}).then(proof => proof.url);
|
|
55
|
-
}, {
|
|
46
|
+
return (0, _reactQuery.useMutation)(async ({
|
|
47
|
+
proofId,
|
|
48
|
+
request
|
|
49
|
+
}) => core.shareProof(proofId, request !== null && request !== void 0 ? request : {}).then(proof => proof.url), {
|
|
56
50
|
onSuccess: async () => {
|
|
57
51
|
await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);
|
|
58
52
|
await queryClient.invalidateQueries(PROOF_STATE_QUERY_KEY);
|
|
@@ -65,15 +59,13 @@ const useProofAccept = () => {
|
|
|
65
59
|
const {
|
|
66
60
|
core
|
|
67
61
|
} = (0, _coreContext.useONECore)();
|
|
68
|
-
return (0, _reactQuery.useMutation)(async
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return core.holderSubmitProof(interactionId, credentials, didId, keyId);
|
|
76
|
-
}, {
|
|
62
|
+
return (0, _reactQuery.useMutation)(async ({
|
|
63
|
+
interactionId,
|
|
64
|
+
credentials,
|
|
65
|
+
didId,
|
|
66
|
+
identifierId,
|
|
67
|
+
keyId
|
|
68
|
+
}) => core.holderSubmitProof(interactionId, credentials, didId, identifierId, keyId), {
|
|
77
69
|
onError: async () => {
|
|
78
70
|
await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);
|
|
79
71
|
},
|
|
@@ -102,13 +94,18 @@ const useProofReject = () => {
|
|
|
102
94
|
});
|
|
103
95
|
};
|
|
104
96
|
exports.useProofReject = useProofReject;
|
|
105
|
-
let
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
97
|
+
let IssuanceProtocol = exports.IssuanceProtocol = /*#__PURE__*/function (IssuanceProtocol) {
|
|
98
|
+
IssuanceProtocol["OPENID4VCI_DRAFT13"] = "OPENID4VCI_DRAFT13";
|
|
99
|
+
return IssuanceProtocol;
|
|
100
|
+
}({});
|
|
101
|
+
let VerificationProtocol = exports.VerificationProtocol = /*#__PURE__*/function (VerificationProtocol) {
|
|
102
|
+
VerificationProtocol["ISO_MDL"] = "ISO_MDL";
|
|
103
|
+
VerificationProtocol["OPENID4VP_DRAFT20"] = "OPENID4VP_DRAFT20";
|
|
104
|
+
VerificationProtocol["OPENID4VP_DRAFT25"] = "OPENID4VP_DRAFT25";
|
|
105
|
+
VerificationProtocol["OPENID4VP_PROXIMITY_DRAFT00"] = "OPENID4VP_PROXIMITY_DRAFT00";
|
|
106
|
+
VerificationProtocol["SCAN_TO_VERIFY"] = "SCAN_TO_VERIFY";
|
|
107
|
+
return VerificationProtocol;
|
|
108
|
+
}({});
|
|
112
109
|
const useProposeProof = () => {
|
|
113
110
|
const queryClient = (0, _reactQuery.useQueryClient)();
|
|
114
111
|
const {
|
|
@@ -122,13 +119,13 @@ const useProposeProof = () => {
|
|
|
122
119
|
});
|
|
123
120
|
};
|
|
124
121
|
exports.useProposeProof = useProposeProof;
|
|
125
|
-
const
|
|
122
|
+
const useProofDelete = () => {
|
|
126
123
|
const queryClient = (0, _reactQuery.useQueryClient)();
|
|
127
124
|
const {
|
|
128
125
|
core
|
|
129
126
|
} = (0, _coreContext.useONECore)();
|
|
130
127
|
return (0, _reactQuery.useMutation)(async proofId => {
|
|
131
|
-
return core.
|
|
128
|
+
return core.deleteProof(proofId).catch(e => {
|
|
132
129
|
if (e instanceof _reactNativeOneCore.OneError && e.code === _errorCode.OneErrorCode.OperationNotSupported) {
|
|
133
130
|
return;
|
|
134
131
|
}
|
|
@@ -143,24 +140,21 @@ const useProofRetract = () => {
|
|
|
143
140
|
}
|
|
144
141
|
});
|
|
145
142
|
};
|
|
146
|
-
exports.
|
|
143
|
+
exports.useProofDelete = useProofDelete;
|
|
147
144
|
const useProofs = queryParams => {
|
|
148
145
|
const {
|
|
149
146
|
core,
|
|
150
147
|
organisationId
|
|
151
148
|
} = (0, _coreContext.useONECore)();
|
|
152
149
|
const queryKey = [PROOF_LIST_QUERY_KEY, ...(0, _query.getQueryKeyFromProofListQueryParams)(queryParams)];
|
|
153
|
-
return (0, _reactQuery.useQuery)(queryKey,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
...queryParams
|
|
162
|
-
});
|
|
163
|
-
}, {
|
|
150
|
+
return (0, _reactQuery.useQuery)(queryKey, ({
|
|
151
|
+
pageParam = 0
|
|
152
|
+
}) => core.getProofs({
|
|
153
|
+
organisationId,
|
|
154
|
+
page: pageParam,
|
|
155
|
+
pageSize: PAGE_SIZE,
|
|
156
|
+
...queryParams
|
|
157
|
+
}), {
|
|
164
158
|
keepPreviousData: false
|
|
165
159
|
});
|
|
166
160
|
};
|
|
@@ -204,7 +198,7 @@ const getDidFilterForProofSchema = (proofSchema, config) => {
|
|
|
204
198
|
keyStorages
|
|
205
199
|
};
|
|
206
200
|
};
|
|
207
|
-
const
|
|
201
|
+
const useProofForSchemaIdWithTransport = (proofSchemaId, transport, enabled) => {
|
|
208
202
|
const {
|
|
209
203
|
data: proofSchema
|
|
210
204
|
} = (0, _proofSchemas.useProofSchemaDetail)(proofSchemaId, enabled);
|
|
@@ -218,44 +212,74 @@ const useProofCreateOrReuse = (proofSchemaId, transport, enabled) => {
|
|
|
218
212
|
const {
|
|
219
213
|
mutateAsync: createProof
|
|
220
214
|
} = useProofCreate();
|
|
215
|
+
const {
|
|
216
|
+
mutateAsync: deleteProof
|
|
217
|
+
} = useProofDelete();
|
|
218
|
+
const [deleting, setDeleting] = (0, _react.useState)(false);
|
|
219
|
+
const [proofId, setProofIdState] = (0, _react.useState)(undefined);
|
|
220
|
+
const proofIdRef = (0, _react.useRef)();
|
|
221
|
+
const {
|
|
222
|
+
data: proofState
|
|
223
|
+
} = useProofState(deleting ? undefined : proofId, enabled);
|
|
224
|
+
const setProofId = (0, _react.useCallback)(id => {
|
|
225
|
+
proofIdRef.current = id;
|
|
226
|
+
setProofIdState(id);
|
|
227
|
+
}, []);
|
|
228
|
+
(0, _react.useEffect)(() => {
|
|
229
|
+
if (!proofIdRef.current) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
setDeleting(true);
|
|
233
|
+
deleteProof(proofIdRef.current).then(() => {
|
|
234
|
+
setProofId(undefined);
|
|
235
|
+
setDeleting(false);
|
|
236
|
+
}).catch(() => {});
|
|
237
|
+
}, [proofIdRef, deleteProof, proofSchemaId, transport, setProofId]);
|
|
238
|
+
(0, _react.useEffect)(() => {
|
|
239
|
+
if (enabled) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (proofState !== _reactNativeOneCore.ProofStateEnum.CREATED && proofState !== _reactNativeOneCore.ProofStateEnum.PENDING) {
|
|
243
|
+
setProofId(undefined);
|
|
244
|
+
}
|
|
245
|
+
}, [enabled, proofState, setProofId]);
|
|
246
|
+
(0, _react.useEffect)(() => {
|
|
247
|
+
if (deleting || !enabled || proofId || !dids || !didFilter || !dids.values.length || !transport || transport.length === 0) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
createProof({
|
|
251
|
+
exchange: VerificationProtocol.OPENID4VP_PROXIMITY_DRAFT00,
|
|
252
|
+
proofSchemaId,
|
|
253
|
+
transport,
|
|
254
|
+
verifierDidId: dids.values[0].id
|
|
255
|
+
}).then(id => {
|
|
256
|
+
setProofId(id);
|
|
257
|
+
}).catch(() => {});
|
|
258
|
+
}, [proofSchemaId, dids, didFilter, createProof, enabled, transport, proofId, setProofId, deleting]);
|
|
259
|
+
return deleting ? undefined : proofId;
|
|
260
|
+
};
|
|
261
|
+
exports.useProofForSchemaIdWithTransport = useProofForSchemaIdWithTransport;
|
|
262
|
+
const useCleanupUnusedProofs = () => {
|
|
263
|
+
const {
|
|
264
|
+
mutateAsync: deleteProof
|
|
265
|
+
} = useProofDelete();
|
|
221
266
|
const {
|
|
222
267
|
data: proofs
|
|
223
268
|
} = useProofs({
|
|
224
269
|
page: 0,
|
|
225
270
|
pageSize: 100,
|
|
226
|
-
proofSchemaIds: [proofSchemaId],
|
|
227
271
|
proofStates: [_reactNativeOneCore.ProofStateEnum.CREATED, _reactNativeOneCore.ProofStateEnum.PENDING]
|
|
228
272
|
});
|
|
229
|
-
const [
|
|
273
|
+
const [cleaned, setCleaned] = (0, _react.useState)(false);
|
|
230
274
|
(0, _react.useEffect)(() => {
|
|
231
|
-
|
|
232
|
-
if (!dids || !didFilter || !dids.values.length || !proofs || !transport || transport.length === 0) {
|
|
275
|
+
if (cleaned || !proofs) {
|
|
233
276
|
return;
|
|
234
277
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const reusableProof = proof === null || proof === void 0 ? void 0 : proof.id;
|
|
239
|
-
if (!enabled) {
|
|
240
|
-
if (!reusableProof) {
|
|
241
|
-
setProofId(undefined);
|
|
242
|
-
}
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
if (reusableProof) {
|
|
246
|
-
setProofId(reusableProof);
|
|
247
|
-
} else {
|
|
248
|
-
createProof({
|
|
249
|
-
exchange: ExchangeProtocol.OPENID4VC,
|
|
250
|
-
proofSchemaId,
|
|
251
|
-
transport,
|
|
252
|
-
verifierDidId: dids.values[0].id
|
|
253
|
-
}).catch(() => {});
|
|
254
|
-
}
|
|
255
|
-
}, [proofSchemaId, proofs, dids, didFilter, createProof, enabled, transport]);
|
|
256
|
-
return proofId;
|
|
278
|
+
setCleaned(true);
|
|
279
|
+
proofs.values.forEach(proof => deleteProof(proof.id));
|
|
280
|
+
}, [cleaned, deleteProof, proofs]);
|
|
257
281
|
};
|
|
258
|
-
exports.
|
|
282
|
+
exports.useCleanupUnusedProofs = useCleanupUnusedProofs;
|
|
259
283
|
const useShareProof = (proofUrlProps, enabled) => {
|
|
260
284
|
const {
|
|
261
285
|
mutateAsync: shareProof
|
|
@@ -293,11 +317,19 @@ const useShareProof = (proofUrlProps, enabled) => {
|
|
|
293
317
|
return sharedProof;
|
|
294
318
|
};
|
|
295
319
|
exports.useShareProof = useShareProof;
|
|
296
|
-
const useRetainProofCheck =
|
|
320
|
+
const useRetainProofCheck = proofId => {
|
|
321
|
+
const queryClient = (0, _reactQuery.useQueryClient)();
|
|
297
322
|
const {
|
|
298
323
|
core
|
|
299
324
|
} = (0, _coreContext.useONECore)();
|
|
300
|
-
return (0, _reactQuery.useMutation)(async () => core.runTask('RETAIN_PROOF_CHECK')
|
|
325
|
+
return (0, _reactQuery.useMutation)(async () => core.runTask('RETAIN_PROOF_CHECK'), {
|
|
326
|
+
onSuccess: async () => {
|
|
327
|
+
if (proofId) {
|
|
328
|
+
await queryClient.removeQueries([PROOF_DETAIL_QUERY_KEY, proofId]);
|
|
329
|
+
await queryClient.invalidateQueries(_history.HISTORY_LIST_QUERY_KEY);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
});
|
|
301
333
|
};
|
|
302
334
|
exports.useRetainProofCheck = useRetainProofCheck;
|
|
303
335
|
const useDeleteProofData = proofId => {
|
|
@@ -307,7 +339,7 @@ const useDeleteProofData = proofId => {
|
|
|
307
339
|
} = (0, _coreContext.useONECore)();
|
|
308
340
|
return (0, _reactQuery.useMutation)(async () => core.deleteProofClaims(proofId), {
|
|
309
341
|
onSuccess: async () => {
|
|
310
|
-
await queryClient.
|
|
342
|
+
await queryClient.removeQueries([PROOF_DETAIL_QUERY_KEY, proofId]);
|
|
311
343
|
await queryClient.invalidateQueries(_history.HISTORY_LIST_QUERY_KEY);
|
|
312
344
|
}
|
|
313
345
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeOneCore","require","_react","_reactQuery","_query","_coreConfig","_coreContext","_dids","_errorCode","_history","_proofSchemas","PAGE_SIZE","PROOF_DETAIL_QUERY_KEY","exports","PROOF_STATE_QUERY_KEY","PROOF_LIST_QUERY_KEY","useProofDetail","proofId","core","useONECore","useQuery","getProof","undefined","enabled","Boolean","keepPreviousData","useProofState","isPolling","then","proof","state","refetchInterval","useProofUrl","queryClient","useQueryClient","useMutation","_ref","request","shareProof","url","onSuccess","invalidateQueries","useProofAccept","_ref2","interactionId","credentials","didId","keyId","holderSubmitProof","onError","HISTORY_LIST_QUERY_KEY","useProofReject","holderRejectProof","catch","e","OneError","code","OneErrorCode","OperationNotSupported","ExchangeProtocol","useProposeProof","organisationId","exchange","proposeProof","useProofRetract","retractProof","useProofs","queryParams","queryKey","getQueryKeyFromProofListQueryParams","_ref3","pageParam","getProofs","page","pageSize","useProofCreate","data","createProof","getDidFilterForProofSchema","proofSchema","config","requestedFormats","proofInputSchemas","map","schema","credentialSchema","format","requestedFormatsCapabilities","_config$format$format","capabilities","filter","x","keyAlgorithms","reduce","others","_others$filter","current","verificationKeyAlgorithms","item","includes","keyStorages","_others$filter2","verificationKeyStorages","useProofCreateOrReuse","proofSchemaId","transport","useProofSchemaDetail","useCoreConfig","didFilter","useMemo","dids","useDids","mutateAsync","proofs","proofSchemaIds","proofStates","ProofStateEnum","CREATED","PENDING","setProofId","useState","useEffect","_filteredProofs$find","values","length","transportFilter","filteredProofs","p","OPENID4VC","find","reusableProof","id","verifierDidId","useShareProof","proofUrlProps","proofState","sharedProof","setSharedProof","bleAdapterDisabled","err","_err$cause","cause","useRetainProofCheck","runTask","useDeleteProofData","deleteProofClaims","useDeleteAllProofsData","schemaId","ACCEPTED","result","Promise","all","reverse"],"sources":["proofs.ts"],"sourcesContent":["import {\n Config,\n CreateProofRequest,\n DidListQuery,\n OneError,\n PresentationSubmitCredentialRequest,\n ProofListQuery,\n ProofSchema,\n ProofStateEnum,\n ShareProofRequest,\n} from '@procivis/react-native-one-core';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromProofListQueryParams } from '../../parsers/query';\nimport { Transport } from '../connectivity/connectivity';\nimport { useCoreConfig } from './core-config';\nimport { useONECore } from './core-context';\nimport { useDids } from './dids';\nimport { OneErrorCode } from './error-code';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\nimport { useProofSchemaDetail } from './proof-schemas';\n\nconst PAGE_SIZE = 10;\nexport const PROOF_DETAIL_QUERY_KEY = 'proof-detail';\nexport const PROOF_STATE_QUERY_KEY = 'proof-state';\nexport const PROOF_LIST_QUERY_KEY = 'proof-list';\n\nexport const useProofDetail = (proofId: string | undefined) => {\n const { core } = useONECore();\n\n return useQuery([PROOF_DETAIL_QUERY_KEY, proofId], () => (proofId ? core.getProof(proofId) : undefined), {\n enabled: Boolean(proofId),\n keepPreviousData: true,\n });\n};\n\nexport const useProofState = (proofId: string | undefined, isPolling: boolean) => {\n const { core } = useONECore();\n\n return useQuery([PROOF_STATE_QUERY_KEY, proofId], () => core.getProof(proofId!).then((proof) => proof.state), {\n enabled: Boolean(proofId),\n refetchInterval: isPolling ? 1000 : false,\n });\n};\n\ntype ProofUrlHookParams = { proofId: string; request?: ShareProofRequest };\n\nexport const useProofUrl = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async ({ proofId, request }: ProofUrlHookParams) =>\n core.shareProof(proofId, request ?? {}).then((proof) => proof.url),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(PROOF_STATE_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useProofAccept = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async ({\n interactionId,\n credentials,\n didId,\n keyId,\n }: {\n credentials: Record<string, PresentationSubmitCredentialRequest>;\n didId: string;\n interactionId: string;\n keyId?: string;\n }) => core.holderSubmitProof(interactionId, credentials, didId, keyId),\n {\n onError: async () => {\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n },\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useProofReject = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async (interactionId: string) =>\n core.holderRejectProof(interactionId).catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.OperationNotSupported) {\n return;\n }\n throw e;\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport enum ExchangeProtocol {\n ISO_MDL = 'ISO_MDL',\n OPENID4VC = 'OPENID4VC',\n PROCIVIS = 'PROCIVIS_TEMPORARY',\n}\n\nexport const useProposeProof = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(async (exchange: ExchangeProtocol) => core.proposeProof(exchange, organisationId), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useProofRetract = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async (proofId: string) => {\n return core.retractProof(proofId).catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.OperationNotSupported) {\n return;\n }\n throw e;\n });\n },\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(PROOF_STATE_QUERY_KEY);\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useProofs = (queryParams?: Partial<ProofListQuery>) => {\n const { core, organisationId } = useONECore();\n\n const queryKey = [PROOF_LIST_QUERY_KEY, ...getQueryKeyFromProofListQueryParams(queryParams)];\n\n return useQuery(\n queryKey,\n ({ pageParam = 0 }) =>\n core.getProofs({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n }),\n {\n keepPreviousData: false,\n },\n );\n};\n\nexport const useProofCreate = () => {\n const queryClient = useQueryClient();\n\n const { core } = useONECore();\n\n return useMutation(async (data: CreateProofRequest) => core.createProof(data), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(PROOF_STATE_QUERY_KEY);\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n },\n });\n};\n\nconst getDidFilterForProofSchema = (proofSchema: ProofSchema, config: Config): Partial<DidListQuery> => {\n const requestedFormats = proofSchema.proofInputSchemas.map((schema) => schema.credentialSchema.format);\n const requestedFormatsCapabilities = requestedFormats\n .map((format) => config.format[format]?.capabilities)\n .filter((x) => x);\n\n // key algorithms must be supported by all requested formats\n const keyAlgorithms = requestedFormatsCapabilities.reduce<string[] | undefined>((others, capabilities) => {\n const current = capabilities.verificationKeyAlgorithms;\n return others?.filter((item) => current.includes(item)) ?? current;\n }, undefined);\n\n // key storages must be supported by all requested formats\n const keyStorages = requestedFormatsCapabilities.reduce<string[] | undefined>((others, capabilities) => {\n const current = capabilities.verificationKeyStorages;\n return others?.filter((item) => current.includes(item)) ?? current;\n }, undefined);\n\n return { keyAlgorithms, keyStorages };\n};\n\nexport const useProofCreateOrReuse = (proofSchemaId: string, transport: Transport[] | undefined, enabled: boolean) => {\n const { data: proofSchema } = useProofSchemaDetail(proofSchemaId, enabled);\n const { data: config } = useCoreConfig();\n\n const didFilter = useMemo(\n () => (proofSchema && config ? getDidFilterForProofSchema(proofSchema, config) : undefined),\n [config, proofSchema],\n );\n\n const { data: dids } = useDids(didFilter);\n const { mutateAsync: createProof } = useProofCreate();\n const { data: proofs } = useProofs({\n page: 0,\n pageSize: 100,\n proofSchemaIds: [proofSchemaId],\n proofStates: [ProofStateEnum.CREATED, ProofStateEnum.PENDING],\n });\n\n const [proofId, setProofId] = useState<string | undefined>(undefined);\n\n useEffect(() => {\n if (!dids || !didFilter || !dids.values.length || !proofs || !transport || transport.length === 0) {\n return;\n }\n\n const transportFilter = transport.length === 2 ? '' : transport[0];\n const filteredProofs = proofs.values.filter(\n (p) => p.exchange === ExchangeProtocol.OPENID4VC && p.transport === transportFilter,\n );\n const proof =\n filteredProofs.length > 0\n ? filteredProofs.find((p) => p.state === ProofStateEnum.PENDING) ?? filteredProofs[0]\n : undefined;\n\n const reusableProof = proof?.id;\n\n if (!enabled) {\n if (!reusableProof) {\n setProofId(undefined);\n }\n return;\n }\n\n if (reusableProof) {\n setProofId(reusableProof);\n } else {\n createProof({\n exchange: ExchangeProtocol.OPENID4VC,\n proofSchemaId,\n transport,\n verifierDidId: dids.values[0].id,\n }).catch(() => {});\n }\n }, [proofSchemaId, proofs, dids, didFilter, createProof, enabled, transport]);\n\n return proofId;\n};\n\nexport const useShareProof = (proofUrlProps: ProofUrlHookParams | undefined, enabled: boolean) => {\n const { mutateAsync: shareProof } = useProofUrl();\n const { data: proofState } = useProofState(proofUrlProps?.proofId, enabled);\n\n const [sharedProof, setSharedProof] = useState<{\n bleAdapterDisabled: boolean;\n url?: string;\n }>();\n\n // reset when proofId changes or the proof was retracted\n useEffect(() => {\n if (!proofUrlProps?.proofId || proofState === ProofStateEnum.CREATED) {\n setSharedProof(undefined);\n }\n }, [proofUrlProps?.proofId, proofState]);\n\n useEffect(() => {\n if (!proofUrlProps || !enabled || sharedProof) {\n return;\n }\n\n shareProof(proofUrlProps)\n .then((url) => {\n setSharedProof({\n bleAdapterDisabled: false,\n url,\n });\n })\n .catch((err: unknown) => {\n // TODO emit error with specific error code from core.\n if (err instanceof OneError && err.cause?.includes('BLE adapter not enabled')) {\n setSharedProof({\n bleAdapterDisabled: true,\n });\n }\n });\n }, [enabled, proofUrlProps, shareProof, sharedProof]);\n\n return sharedProof;\n};\n\nexport const useRetainProofCheck = () => {\n const { core } = useONECore();\n\n return useMutation(async () => core.runTask('RETAIN_PROOF_CHECK'));\n};\n\nexport const useDeleteProofData = (proofId: string) => {\n const queryClient = useQueryClient();\n\n const { core } = useONECore();\n\n return useMutation(async () => core.deleteProofClaims(proofId), {\n onSuccess: async () => {\n await queryClient.invalidateQueries([PROOF_DETAIL_QUERY_KEY, proofId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useDeleteAllProofsData = (schemaId: string) => {\n const queryClient = useQueryClient();\n\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async () =>\n core\n .getProofs({\n organisationId,\n page: 0,\n pageSize: 1000,\n proofSchemaIds: [schemaId],\n proofStates: [ProofStateEnum.ACCEPTED],\n })\n .then((result) => Promise.all(result.values.reverse().map((proof) => core.deleteProofClaims(proof.id)))),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAWA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AAEA,MAAMU,SAAS,GAAG,EAAE;AACb,MAAMC,sBAAsB,GAAG,cAAc;AAACC,OAAA,CAAAD,sBAAA,GAAAA,sBAAA;AAC9C,MAAME,qBAAqB,GAAG,aAAa;AAACD,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAC5C,MAAMC,oBAAoB,GAAG,YAAY;AAACF,OAAA,CAAAE,oBAAA,GAAAA,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GAAAA,kBAAA;AAEK,MAAME,sBAAsB,GAAIC,QAAgB,IAAK;EAC1D,MAAMlH,WAAW,GAAG,IAAAC,0BAAc,GAAE;EAEpC,MAAM;IAAEhB,IAAI;IAAE2C;EAAe,CAAC,GAAG,IAAA1C,uBAAU,GAAE;EAE7C,OAAO,IAAAgB,uBAAW,EAChB,YACEjB,IAAI,CACDsD,SAAS,CAAC;IACTX,cAAc;IACdY,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,IAAI;IACdwC,cAAc,EAAE,CAACiC,QAAQ,CAAC;IAC1BhC,WAAW,EAAE,CAACC,kCAAc,CAACgC,QAAQ;EACvC,CAAC,CAAC,CACDxH,IAAI,CAAEyH,MAAM,IAAKC,OAAO,CAACC,GAAG,CAACF,MAAM,CAAC1B,MAAM,CAAC6B,OAAO,EAAE,CAACrE,GAAG,CAAEtD,KAAK,IAAKX,IAAI,CAAC+H,iBAAiB,CAACpH,KAAK,CAACsG,EAAE,CAAC,CAAC,CAAC,CAAC,EAC5G;IACE3F,SAAS,EAAE,MAAAA,CAAA,KAAY;MACrB,MAAMP,WAAW,CAACQ,iBAAiB,CAAC7B,sBAAsB,CAAC;MAC3D,MAAMqB,WAAW,CAACQ,iBAAiB,CAACS,+BAAsB,CAAC;IAC7D;EACF,CAAC,CACF;AACH,CAAC;AAACrC,OAAA,CAAAqI,sBAAA,GAAAA,sBAAA"}
|
|
1
|
+
{"version":3,"names":["_reactNativeOneCore","require","_react","_reactQuery","_query","_coreConfig","_coreContext","_dids","_errorCode","_history","_proofSchemas","PAGE_SIZE","PROOF_DETAIL_QUERY_KEY","exports","PROOF_STATE_QUERY_KEY","PROOF_LIST_QUERY_KEY","useProofDetail","proofId","core","useONECore","useQuery","getProof","undefined","enabled","Boolean","keepPreviousData","useProofState","isPolling","then","proof","state","refetchInterval","useProofUrl","queryClient","useQueryClient","useMutation","request","shareProof","url","onSuccess","invalidateQueries","useProofAccept","interactionId","credentials","didId","identifierId","keyId","holderSubmitProof","onError","HISTORY_LIST_QUERY_KEY","useProofReject","holderRejectProof","catch","e","OneError","code","OneErrorCode","OperationNotSupported","IssuanceProtocol","VerificationProtocol","useProposeProof","organisationId","exchange","proposeProof","useProofDelete","deleteProof","useProofs","queryParams","queryKey","getQueryKeyFromProofListQueryParams","pageParam","getProofs","page","pageSize","useProofCreate","data","createProof","getDidFilterForProofSchema","proofSchema","config","requestedFormats","proofInputSchemas","map","schema","credentialSchema","format","requestedFormatsCapabilities","_config$format$format","capabilities","filter","x","keyAlgorithms","reduce","others","_others$filter","current","verificationKeyAlgorithms","item","includes","keyStorages","_others$filter2","verificationKeyStorages","useProofForSchemaIdWithTransport","proofSchemaId","transport","useProofSchemaDetail","useCoreConfig","didFilter","useMemo","dids","useDids","mutateAsync","deleting","setDeleting","useState","setProofIdState","proofIdRef","useRef","proofState","setProofId","useCallback","id","useEffect","ProofStateEnum","CREATED","PENDING","values","length","OPENID4VP_PROXIMITY_DRAFT00","verifierDidId","useCleanupUnusedProofs","proofs","proofStates","cleaned","setCleaned","forEach","useShareProof","proofUrlProps","sharedProof","setSharedProof","bleAdapterDisabled","err","_err$cause","cause","useRetainProofCheck","runTask","removeQueries","useDeleteProofData","deleteProofClaims","useDeleteAllProofsData","schemaId","proofSchemaIds","ACCEPTED","result","Promise","all","reverse"],"sources":["proofs.ts"],"sourcesContent":["import {\n Config,\n CreateProofRequest,\n DidListQuery,\n OneError,\n PresentationSubmitCredentialRequest,\n ProofListQuery,\n ProofSchema,\n ProofStateEnum,\n ShareProofRequest,\n} from '@procivis/react-native-one-core';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromProofListQueryParams } from '../../parsers/query';\nimport { Transport } from '../connectivity/connectivity';\nimport { useCoreConfig } from './core-config';\nimport { useONECore } from './core-context';\nimport { useDids } from './dids';\nimport { OneErrorCode } from './error-code';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\nimport { useProofSchemaDetail } from './proof-schemas';\n\nconst PAGE_SIZE = 10;\nexport const PROOF_DETAIL_QUERY_KEY = 'proof-detail';\nexport const PROOF_STATE_QUERY_KEY = 'proof-state';\nexport const PROOF_LIST_QUERY_KEY = 'proof-list';\n\nexport const useProofDetail = (proofId: string | undefined) => {\n const { core } = useONECore();\n\n return useQuery([PROOF_DETAIL_QUERY_KEY, proofId], () => (proofId ? core.getProof(proofId) : undefined), {\n enabled: Boolean(proofId),\n keepPreviousData: true,\n });\n};\n\nexport const useProofState = (proofId: string | undefined, isPolling: boolean) => {\n const { core } = useONECore();\n\n return useQuery(\n [PROOF_STATE_QUERY_KEY, proofId],\n () => (proofId ? core.getProof(proofId).then((proof) => proof.state) : undefined),\n {\n enabled: Boolean(proofId),\n refetchInterval: isPolling ? 1000 : false,\n },\n );\n};\n\ntype ProofUrlHookParams = { proofId: string; request?: ShareProofRequest };\n\nexport const useProofUrl = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async ({ proofId, request }: ProofUrlHookParams) =>\n core.shareProof(proofId, request ?? {}).then((proof) => proof.url),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(PROOF_STATE_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useProofAccept = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async ({\n interactionId,\n credentials,\n didId,\n identifierId,\n keyId,\n }: {\n credentials: Record<string, PresentationSubmitCredentialRequest>;\n didId?: string;\n identifierId?: string;\n interactionId: string;\n keyId?: string;\n }) => core.holderSubmitProof(interactionId, credentials, didId, identifierId, keyId),\n {\n onError: async () => {\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n },\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useProofReject = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async (interactionId: string) =>\n core.holderRejectProof(interactionId).catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.OperationNotSupported) {\n return;\n }\n throw e;\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport enum IssuanceProtocol {\n OPENID4VCI_DRAFT13 = 'OPENID4VCI_DRAFT13',\n}\n\nexport enum VerificationProtocol {\n ISO_MDL = 'ISO_MDL',\n OPENID4VP_DRAFT20 = 'OPENID4VP_DRAFT20',\n OPENID4VP_DRAFT25 = 'OPENID4VP_DRAFT25',\n OPENID4VP_PROXIMITY_DRAFT00 = 'OPENID4VP_PROXIMITY_DRAFT00',\n SCAN_TO_VERIFY = 'SCAN_TO_VERIFY',\n}\n\nexport const useProposeProof = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(async (exchange: VerificationProtocol) => core.proposeProof(exchange, organisationId), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useProofDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async (proofId: string) => {\n return core.deleteProof(proofId).catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.OperationNotSupported) {\n return;\n }\n throw e;\n });\n },\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(PROOF_STATE_QUERY_KEY);\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useProofs = (queryParams?: Partial<ProofListQuery>) => {\n const { core, organisationId } = useONECore();\n\n const queryKey = [PROOF_LIST_QUERY_KEY, ...getQueryKeyFromProofListQueryParams(queryParams)];\n\n return useQuery(\n queryKey,\n ({ pageParam = 0 }) =>\n core.getProofs({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n }),\n {\n keepPreviousData: false,\n },\n );\n};\n\nexport const useProofCreate = () => {\n const queryClient = useQueryClient();\n\n const { core } = useONECore();\n\n return useMutation(async (data: CreateProofRequest) => core.createProof(data), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(PROOF_STATE_QUERY_KEY);\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n },\n });\n};\n\nconst getDidFilterForProofSchema = (proofSchema: ProofSchema, config: Config): Partial<DidListQuery> => {\n const requestedFormats = proofSchema.proofInputSchemas.map((schema) => schema.credentialSchema.format);\n const requestedFormatsCapabilities = requestedFormats\n .map((format) => config.format[format]?.capabilities)\n .filter((x) => x);\n\n // key algorithms must be supported by all requested formats\n const keyAlgorithms = requestedFormatsCapabilities.reduce<string[] | undefined>((others, capabilities) => {\n const current = capabilities.verificationKeyAlgorithms;\n return others?.filter((item) => current.includes(item)) ?? current;\n }, undefined);\n\n // key storages must be supported by all requested formats\n const keyStorages = requestedFormatsCapabilities.reduce<string[] | undefined>((others, capabilities) => {\n const current = capabilities.verificationKeyStorages;\n return others?.filter((item) => current.includes(item)) ?? current;\n }, undefined);\n\n return { keyAlgorithms, keyStorages };\n};\n\nexport const useProofForSchemaIdWithTransport = (\n proofSchemaId: string,\n transport: Transport[] | undefined,\n enabled: boolean,\n) => {\n const { data: proofSchema } = useProofSchemaDetail(proofSchemaId, enabled);\n const { data: config } = useCoreConfig();\n\n const didFilter = useMemo(\n () => (proofSchema && config ? getDidFilterForProofSchema(proofSchema, config) : undefined),\n [config, proofSchema],\n );\n\n const { data: dids } = useDids(didFilter);\n const { mutateAsync: createProof } = useProofCreate();\n const { mutateAsync: deleteProof } = useProofDelete();\n\n const [deleting, setDeleting] = useState(false);\n const [proofId, setProofIdState] = useState<string | undefined>(undefined);\n const proofIdRef = useRef<string>();\n\n const { data: proofState } = useProofState(deleting ? undefined : proofId, enabled);\n\n const setProofId = useCallback((id: string | undefined) => {\n proofIdRef.current = id;\n setProofIdState(id);\n }, []);\n\n useEffect(() => {\n if (!proofIdRef.current) {\n return;\n }\n setDeleting(true);\n deleteProof(proofIdRef.current)\n .then(() => {\n setProofId(undefined);\n setDeleting(false);\n })\n .catch(() => {});\n }, [proofIdRef, deleteProof, proofSchemaId, transport, setProofId]);\n\n useEffect(() => {\n if (enabled) {\n return;\n }\n if (proofState !== ProofStateEnum.CREATED && proofState !== ProofStateEnum.PENDING) {\n setProofId(undefined);\n }\n }, [enabled, proofState, setProofId]);\n\n useEffect(() => {\n if (\n deleting ||\n !enabled ||\n proofId ||\n !dids ||\n !didFilter ||\n !dids.values.length ||\n !transport ||\n transport.length === 0\n ) {\n return;\n }\n\n createProof({\n exchange: VerificationProtocol.OPENID4VP_PROXIMITY_DRAFT00,\n proofSchemaId,\n transport,\n verifierDidId: dids.values[0].id,\n })\n .then((id) => {\n setProofId(id);\n })\n .catch(() => {});\n }, [proofSchemaId, dids, didFilter, createProof, enabled, transport, proofId, setProofId, deleting]);\n\n return deleting ? undefined : proofId;\n};\n\nexport const useCleanupUnusedProofs = () => {\n const { mutateAsync: deleteProof } = useProofDelete();\n const { data: proofs } = useProofs({\n page: 0,\n pageSize: 100,\n proofStates: [ProofStateEnum.CREATED, ProofStateEnum.PENDING],\n });\n const [cleaned, setCleaned] = useState(false);\n\n useEffect(() => {\n if (cleaned || !proofs) {\n return;\n }\n setCleaned(true);\n proofs.values.forEach((proof) => deleteProof(proof.id));\n }, [cleaned, deleteProof, proofs]);\n};\n\nexport const useShareProof = (proofUrlProps: ProofUrlHookParams | undefined, enabled: boolean) => {\n const { mutateAsync: shareProof } = useProofUrl();\n const { data: proofState } = useProofState(proofUrlProps?.proofId, enabled);\n\n const [sharedProof, setSharedProof] = useState<{\n bleAdapterDisabled: boolean;\n url?: string;\n }>();\n\n // reset when proofId changes or the proof was retracted\n useEffect(() => {\n if (!proofUrlProps?.proofId || proofState === ProofStateEnum.CREATED) {\n setSharedProof(undefined);\n }\n }, [proofUrlProps?.proofId, proofState]);\n\n useEffect(() => {\n if (!proofUrlProps || !enabled || sharedProof) {\n return;\n }\n\n shareProof(proofUrlProps)\n .then((url) => {\n setSharedProof({\n bleAdapterDisabled: false,\n url,\n });\n })\n .catch((err: unknown) => {\n // TODO emit error with specific error code from core.\n if (err instanceof OneError && err.cause?.includes('BLE adapter not enabled')) {\n setSharedProof({\n bleAdapterDisabled: true,\n });\n }\n });\n }, [enabled, proofUrlProps, shareProof, sharedProof]);\n\n return sharedProof;\n};\n\nexport const useRetainProofCheck = (proofId?: string) => {\n const queryClient = useQueryClient();\n\n const { core } = useONECore();\n\n return useMutation(async () => core.runTask('RETAIN_PROOF_CHECK'), {\n onSuccess: async () => {\n if (proofId) {\n await queryClient.removeQueries([PROOF_DETAIL_QUERY_KEY, proofId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n }\n },\n });\n};\n\nexport const useDeleteProofData = (proofId: string) => {\n const queryClient = useQueryClient();\n\n const { core } = useONECore();\n\n return useMutation(async () => core.deleteProofClaims(proofId), {\n onSuccess: async () => {\n await queryClient.removeQueries([PROOF_DETAIL_QUERY_KEY, proofId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useDeleteAllProofsData = (schemaId: string) => {\n const queryClient = useQueryClient();\n\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async () =>\n core\n .getProofs({\n organisationId,\n page: 0,\n pageSize: 1000,\n proofSchemaIds: [schemaId],\n proofStates: [ProofStateEnum.ACCEPTED],\n })\n .then((result) => Promise.all(result.values.reverse().map((proof) => core.deleteProofClaims(proof.id)))),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries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IAAKC,OAAO,CAACC,GAAG,CAACF,MAAM,CAAC3B,MAAM,CAAC8B,OAAO,CAAC,CAAC,CAAC1E,GAAG,CAAErD,KAAK,IAAKX,IAAI,CAACkI,iBAAiB,CAACvH,KAAK,CAAC4F,EAAE,CAAC,CAAC,CAAC,CAAC,EAC5G;IACElF,SAAS,EAAE,MAAAA,CAAA,KAAY;MACrB,MAAMN,WAAW,CAACO,iBAAiB,CAAC5B,sBAAsB,CAAC;MAC3D,MAAMqB,WAAW,CAACO,iBAAiB,CAACS,+BAAsB,CAAC;IAC7D;EACF,CACF,CAAC;AACH,CAAC;AAACpC,OAAA,CAAAwI,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.queryClient = void 0;
|
|
7
7
|
var _reactQuery = require("react-query");
|
|
8
8
|
var _reporting = require("../../reporting");
|
|
9
|
-
const queryClient = new _reactQuery.QueryClient({
|
|
9
|
+
const queryClient = exports.queryClient = new _reactQuery.QueryClient({
|
|
10
10
|
defaultOptions: {
|
|
11
11
|
mutations: {
|
|
12
12
|
onError: err => {
|
|
@@ -21,5 +21,4 @@ const queryClient = new _reactQuery.QueryClient({
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
exports.queryClient = queryClient;
|
|
25
24
|
//# sourceMappingURL=query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactQuery","require","_reporting","queryClient","QueryClient","defaultOptions","mutations","onError","err","reportException","queries","staleTime","Infinity"
|
|
1
|
+
{"version":3,"names":["_reactQuery","require","_reporting","queryClient","exports","QueryClient","defaultOptions","mutations","onError","err","reportException","queries","staleTime","Infinity"],"sources":["query.ts"],"sourcesContent":["import { QueryClient } from 'react-query';\n\nimport { reportException } from '../../reporting';\n\nexport const queryClient = new QueryClient({\n defaultOptions: {\n mutations: {\n onError: (err) => {\n reportException(err, 'Mutation failure');\n },\n },\n queries: {\n onError: (err) => {\n reportException(err, 'Query failure');\n },\n staleTime: Infinity,\n },\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAEO,MAAME,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAIE,uBAAW,CAAC;EACzCC,cAAc,EAAE;IACdC,SAAS,EAAE;MACTC,OAAO,EAAGC,GAAG,IAAK;QAChB,IAAAC,0BAAe,EAACD,GAAG,EAAE,kBAAkB,CAAC;MAC1C;IACF,CAAC;IACDE,OAAO,EAAE;MACPH,OAAO,EAAGC,GAAG,IAAK;QAChB,IAAAC,0BAAe,EAACD,GAAG,EAAE,eAAe,CAAC;MACvC,CAAC;MACDG,SAAS,EAAEC;IACb;EACF;AACF,CAAC,CAAC","ignoreList":[]}
|