@procivis/one-react-native-components 0.2.54 → 0.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -8
- package/lib/commonjs/components/backup/index.js.map +1 -1
- package/lib/commonjs/components/backup/preview-credentials.js +18 -22
- package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
- package/lib/commonjs/components/credential/credential.js +11 -12
- package/lib/commonjs/components/credential/credential.js.map +1 -1
- package/lib/commonjs/components/credential/index.js.map +1 -1
- package/lib/commonjs/components/entity/EntityButtons.js +20 -25
- package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-attributes.js +15 -17
- package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details-with-buttons.js +18 -19
- package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details.js +12 -14
- package/lib/commonjs/components/entity/entity-details.js.map +1 -1
- package/lib/commonjs/components/entity/index.js +2 -2
- package/lib/commonjs/components/entity/index.js.map +1 -1
- package/lib/commonjs/components/history/history-details-screen.js +67 -0
- package/lib/commonjs/components/history/history-details-screen.js.map +1 -0
- package/lib/commonjs/components/history/history-list-item-icon.js +94 -0
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -0
- package/lib/commonjs/components/history/history-list-item.js +45 -0
- package/lib/commonjs/components/history/history-list-item.js.map +1 -0
- package/lib/commonjs/components/history/history-list-screen.js +121 -0
- package/lib/commonjs/components/history/history-list-screen.js.map +1 -0
- package/lib/commonjs/components/history/history-list-section-header.js +39 -0
- package/lib/commonjs/components/history/history-list-section-header.js.map +1 -0
- package/lib/commonjs/components/history/history-list.js +100 -0
- package/lib/commonjs/components/history/history-list.js.map +1 -0
- package/lib/commonjs/components/history/index.js +72 -0
- package/lib/commonjs/components/history/index.js.map +1 -0
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/navigation/header-buttons.js +21 -25
- package/lib/commonjs/components/navigation/header-buttons.js.map +1 -1
- package/lib/commonjs/components/navigation/index.js.map +1 -1
- package/lib/commonjs/components/proof-request/group.js +4 -5
- package/lib/commonjs/components/proof-request/group.js.map +1 -1
- package/lib/commonjs/components/proof-request/index.js.map +1 -1
- package/lib/commonjs/components/proof-request/select-credential.js +11 -12
- package/lib/commonjs/components/proof-request/select-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/share-credential.js +23 -27
- package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/normalize-color.d.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibility.js +11 -7
- package/lib/commonjs/ui-components/accessibility/accessibility.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js +8 -12
- package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js +15 -17
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js +8 -10
- package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/index.js +1 -30
- package/lib/commonjs/ui-components/accessibility/index.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale/index.js +2 -3
- package/lib/commonjs/ui-components/accessibility/locale/index.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale.test.js.map +1 -1
- package/lib/commonjs/ui-components/action-modal/ActionModal.js +9 -11
- package/lib/commonjs/ui-components/action-modal/ActionModal.js.map +1 -1
- package/lib/commonjs/ui-components/action-modal/index.js +1 -1
- package/lib/commonjs/ui-components/action-modal/index.js.map +1 -1
- package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js +10 -12
- package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js.map +1 -1
- package/lib/commonjs/ui-components/activity-indicator/index.js +1 -1
- package/lib/commonjs/ui-components/activity-indicator/index.js.map +1 -1
- package/lib/commonjs/ui-components/blur/blur-view.js +13 -15
- package/lib/commonjs/ui-components/blur/blur-view.js.map +1 -1
- package/lib/commonjs/ui-components/blur/index.js +2 -2
- package/lib/commonjs/ui-components/blur/index.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/back-button.js +12 -15
- package/lib/commonjs/ui-components/buttons/back-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/button.js +19 -22
- package/lib/commonjs/ui-components/buttons/button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/connectivity-button.js +16 -18
- package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/filter-button.js +8 -10
- package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/ghost-button.js +12 -14
- package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/hold-button.js +244 -0
- package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -0
- package/lib/commonjs/ui-components/buttons/index.js +9 -37
- package/lib/commonjs/ui-components/buttons/index.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/scan-button.js +7 -9
- package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/commonjs/ui-components/camera/camera-overlay.js +11 -14
- package/lib/commonjs/ui-components/camera/camera-overlay.js.map +1 -1
- package/lib/commonjs/ui-components/camera/index.js +2 -2
- package/lib/commonjs/ui-components/camera/index.js.map +1 -1
- package/lib/commonjs/ui-components/camera/qr-code-scanner.js +12 -14
- package/lib/commonjs/ui-components/camera/qr-code-scanner.js.map +1 -1
- package/lib/commonjs/ui-components/control/checkbox.js +11 -12
- package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
- package/lib/commonjs/ui-components/control/index.js.map +1 -1
- package/lib/commonjs/ui-components/control/switch.js +10 -12
- package/lib/commonjs/ui-components/control/switch.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-card.js +22 -26
- package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +30 -35
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +27 -20
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-header.js +25 -24
- package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +27 -29
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/index.js +6 -41
- package/lib/commonjs/ui-components/credential/card/index.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js +51 -60
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js +18 -21
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/commonjs/ui-components/credential/index.js +2 -25
- package/lib/commonjs/ui-components/credential/index.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector-status.js +3 -4
- package/lib/commonjs/ui-components/credential/selector-status.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector.js +8 -10
- package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
- package/lib/commonjs/ui-components/detail/detail.js +12 -14
- package/lib/commonjs/ui-components/detail/detail.js.map +1 -1
- package/lib/commonjs/ui-components/detail/index.js +1 -1
- package/lib/commonjs/ui-components/detail/index.js.map +1 -1
- package/lib/commonjs/ui-components/entity/avatar.js +14 -16
- package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
- package/lib/commonjs/ui-components/entity/entity-cluster.js +15 -18
- package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/commonjs/ui-components/entity/index.js +2 -2
- package/lib/commonjs/ui-components/entity/index.js.map +1 -1
- package/lib/commonjs/ui-components/header/focus-aware-status-bar.js +3 -4
- package/lib/commonjs/ui-components/header/focus-aware-status-bar.js.map +1 -1
- package/lib/commonjs/ui-components/header/foldable-header.js +14 -17
- package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
- package/lib/commonjs/ui-components/header/header.js +12 -14
- package/lib/commonjs/ui-components/header/header.js.map +1 -1
- package/lib/commonjs/ui-components/header/index.js +4 -24
- package/lib/commonjs/ui-components/header/index.js.map +1 -1
- package/lib/commonjs/ui-components/header/navigation-header.js +27 -33
- package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/data-item.js +30 -23
- package/lib/commonjs/ui-components/history/data-item.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-details.js +181 -0
- package/lib/commonjs/ui-components/history/history-details.js.map +1 -0
- package/lib/commonjs/ui-components/history/{history-list-item.js → history-item.js} +47 -26
- package/lib/commonjs/ui-components/history/history-item.js.map +1 -0
- package/lib/commonjs/ui-components/history/history-section-header.js +7 -9
- package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js +13 -12
- package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/history/index.js +30 -9
- package/lib/commonjs/ui-components/history/index.js.map +1 -1
- package/lib/commonjs/ui-components/icons/connectivity.js +19 -24
- package/lib/commonjs/ui-components/icons/connectivity.js.map +1 -1
- package/lib/commonjs/ui-components/icons/credential.js +60 -71
- package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
- package/lib/commonjs/ui-components/icons/entity.js +7 -8
- package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
- package/lib/commonjs/ui-components/icons/history.js +113 -133
- package/lib/commonjs/ui-components/icons/history.js.map +1 -1
- package/lib/commonjs/ui-components/icons/icons.js +73 -90
- package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
- package/lib/commonjs/ui-components/icons/index.js.map +1 -1
- package/lib/commonjs/ui-components/icons/input.js +3 -3
- package/lib/commonjs/ui-components/icons/input.js.map +1 -1
- package/lib/commonjs/ui-components/icons/keypad.js +69 -81
- package/lib/commonjs/ui-components/icons/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/icons/loader.js +4 -4
- package/lib/commonjs/ui-components/icons/loader.js.map +1 -1
- package/lib/commonjs/ui-components/icons/nerd-view.js +6 -9
- package/lib/commonjs/ui-components/icons/nerd-view.js.map +1 -1
- package/lib/commonjs/ui-components/icons/selector.js +8 -9
- package/lib/commonjs/ui-components/icons/selector.js.map +1 -1
- package/lib/commonjs/ui-components/icons/wallet.js +16 -19
- package/lib/commonjs/ui-components/icons/wallet.js.map +1 -1
- package/lib/commonjs/ui-components/image/image-or-component.js +15 -18
- package/lib/commonjs/ui-components/image/image-or-component.js.map +1 -1
- package/lib/commonjs/ui-components/image/index.js +2 -9
- package/lib/commonjs/ui-components/image/index.js.map +1 -1
- package/lib/commonjs/ui-components/index.js.map +1 -1
- package/lib/commonjs/ui-components/input/index.js +2 -2
- package/lib/commonjs/ui-components/input/index.js.map +1 -1
- package/lib/commonjs/ui-components/input/radio-group.js +28 -25
- package/lib/commonjs/ui-components/input/radio-group.js.map +1 -1
- package/lib/commonjs/ui-components/input/selection-input.js +27 -38
- package/lib/commonjs/ui-components/input/selection-input.js.map +1 -1
- package/lib/commonjs/ui-components/input/text-input.js +25 -28
- package/lib/commonjs/ui-components/input/text-input.js.map +1 -1
- package/lib/commonjs/ui-components/list/index.js +20 -2
- package/lib/commonjs/ui-components/list/index.js.map +1 -1
- package/lib/commonjs/ui-components/list/list-page-loading-indicator.js +14 -0
- package/lib/commonjs/ui-components/list/list-page-loading-indicator.js.map +1 -0
- package/lib/commonjs/ui-components/list/list-section-header.js +10 -12
- package/lib/commonjs/ui-components/list/list-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/list/list-title-header.js +6 -8
- package/lib/commonjs/ui-components/list/list-title-header.js.map +1 -1
- package/lib/commonjs/ui-components/list/wallet/empty-list.js +73 -0
- package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -0
- package/lib/commonjs/ui-components/list/wallet/empty-search-result.js +41 -0
- package/lib/commonjs/ui-components/list/wallet/empty-search-result.js.map +1 -0
- package/lib/commonjs/ui-components/list/wallet/index.js +21 -0
- package/lib/commonjs/ui-components/list/wallet/index.js.map +1 -0
- package/lib/commonjs/ui-components/loader/index.js +2 -2
- package/lib/commonjs/ui-components/loader/index.js.map +1 -1
- package/lib/commonjs/ui-components/loader/loader.js +17 -17
- package/lib/commonjs/ui-components/loader/loader.js.map +1 -1
- package/lib/commonjs/ui-components/loader/loading-result.js +22 -21
- package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
- package/lib/commonjs/ui-components/nerd-view/index.js +2 -8
- package/lib/commonjs/ui-components/nerd-view/index.js.map +1 -1
- package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js +37 -41
- package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
- package/lib/commonjs/ui-components/pin/index.js +2 -2
- package/lib/commonjs/ui-components/pin/index.js.map +1 -1
- package/lib/commonjs/ui-components/pin/keypad.js +19 -23
- package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-code-screen.js +19 -21
- package/lib/commonjs/ui-components/pin/pin-code-screen.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-lock-animation.js +1 -2
- package/lib/commonjs/ui-components/pin/pin-lock-animation.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-lock.js +10 -12
- package/lib/commonjs/ui-components/pin/pin-lock.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pins.js +8 -9
- package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
- package/lib/commonjs/ui-components/screens/backup-screen.js +15 -18
- package/lib/commonjs/ui-components/screens/backup-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/image-preview-screen.js +12 -14
- package/lib/commonjs/ui-components/screens/image-preview-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/index.js +8 -49
- package/lib/commonjs/ui-components/screens/index.js.map +1 -1
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +34 -41
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js +14 -16
- package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/scroll-view-screen.js +12 -14
- package/lib/commonjs/ui-components/screens/scroll-view-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/section-list-screen.js +13 -15
- package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/animated-search-bar.js +10 -12
- package/lib/commonjs/ui-components/searchbar/animated-search-bar.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/index.js +2 -2
- package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/search-bar.js +15 -17
- package/lib/commonjs/ui-components/searchbar/search-bar.js.map +1 -1
- package/lib/commonjs/ui-components/settings/button-setting.js +14 -16
- package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
- package/lib/commonjs/ui-components/settings/index.js +2 -2
- package/lib/commonjs/ui-components/settings/index.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item-separator.js +6 -8
- package/lib/commonjs/ui-components/settings/setting-item-separator.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item.js +11 -13
- package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
- package/lib/commonjs/ui-components/settings/settings-button.js +7 -9
- package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
- package/lib/commonjs/ui-components/settings/switch-setting.js +11 -13
- package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/commonjs/ui-components/state/error-screen.js +10 -12
- package/lib/commonjs/ui-components/state/error-screen.js.map +1 -1
- package/lib/commonjs/ui-components/state/index.js +2 -2
- package/lib/commonjs/ui-components/state/index.js.map +1 -1
- package/lib/commonjs/ui-components/text/base.js +14 -16
- package/lib/commonjs/ui-components/text/base.js.map +1 -1
- package/lib/commonjs/ui-components/text/font.js +11 -13
- package/lib/commonjs/ui-components/text/font.js.map +1 -1
- package/lib/commonjs/ui-components/text/index.js +2 -9
- package/lib/commonjs/ui-components/text/index.js.map +1 -1
- package/lib/commonjs/ui-components/text/typography.js +10 -13
- package/lib/commonjs/ui-components/text/typography.js.map +1 -1
- package/lib/commonjs/ui-components/theme/color-scheme-context.js +2 -1
- package/lib/commonjs/ui-components/theme/color-scheme-context.js.map +1 -1
- package/lib/commonjs/ui-components/theme/color-scheme.js.map +1 -1
- package/lib/commonjs/ui-components/theme/index.js.map +1 -1
- package/lib/commonjs/utils/array.js.map +1 -1
- package/lib/commonjs/utils/backup.js.map +1 -1
- package/lib/commonjs/utils/color.js +1 -1
- package/lib/commonjs/utils/color.js.map +1 -1
- package/lib/commonjs/utils/contrasting-status-bar.js +8 -10
- package/lib/commonjs/utils/contrasting-status-bar.js.map +1 -1
- package/lib/commonjs/utils/date.js +3 -3
- package/lib/commonjs/utils/date.js.map +1 -1
- package/lib/commonjs/utils/filtering.js +11 -0
- package/lib/commonjs/utils/filtering.js.map +1 -0
- package/lib/commonjs/utils/history.js +76 -0
- package/lib/commonjs/utils/history.js.map +1 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.js +37 -23
- package/lib/commonjs/utils/hooks/connectivity/connectivity.js.map +1 -1
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +6 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/backup.js +31 -31
- package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/cache.js +44 -0
- package/lib/commonjs/utils/hooks/core/cache.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/core-config.js +15 -1
- package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-context.js +15 -10
- package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-init.js +18 -12
- package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credential-schemas.js +16 -27
- package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credentials.js +27 -37
- package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/dids.js +4 -6
- package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/error-code.js +3 -4
- package/lib/commonjs/utils/hooks/core/error-code.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/history.js +5 -37
- package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/index.js +11 -0
- package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proof-schemas.js +23 -38
- package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proofs.js +107 -76
- package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/query.js +1 -2
- package/lib/commonjs/utils/hooks/core/query.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/trust-entity.js +8 -4
- package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
- package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +1 -2
- package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -1
- package/lib/commonjs/utils/hooks/http/client.js.map +1 -1
- package/lib/commonjs/utils/hooks/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/list/list-content-inset.js +9 -10
- package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/before-remove.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/deep-link.js +3 -4
- package/lib/commonjs/utils/hooks/navigation/deep-link.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/open-settings.js +1 -2
- package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/commonjs/utils/hooks/pin-security/pin-security.js +1 -2
- package/lib/commonjs/utils/hooks/pin-security/pin-security.js.map +1 -1
- package/lib/commonjs/utils/hooks/revocation/credential-status.js +17 -26
- package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/commonjs/utils/index.js +37 -1
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/navigation.js +5 -5
- package/lib/commonjs/utils/navigation.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing.js +16 -20
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js +16 -26
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/commonjs/utils/parsers/index.js +11 -0
- package/lib/commonjs/utils/parsers/index.js.map +1 -1
- package/lib/commonjs/utils/parsers/query.js +3 -2
- package/lib/commonjs/utils/parsers/query.js.map +1 -1
- package/lib/commonjs/utils/parsers/universal-links.js +33 -0
- package/lib/commonjs/utils/parsers/universal-links.js.map +1 -0
- package/lib/commonjs/utils/parsers/universal-links.test.js +40 -0
- package/lib/commonjs/utils/parsers/universal-links.test.js.map +1 -0
- package/lib/commonjs/utils/ref.js.map +1 -1
- package/lib/commonjs/utils/reporting.js +4 -2
- package/lib/commonjs/utils/reporting.js.map +1 -1
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/utils/testID.js +1 -4
- package/lib/commonjs/utils/testID.js.map +1 -1
- package/lib/commonjs/utils/testID.test.js.map +1 -1
- package/lib/commonjs/utils/useMemoAsync.js +9 -0
- package/lib/commonjs/utils/useMemoAsync.js.map +1 -1
- package/lib/commonjs/utils/uuid.js +1 -1
- package/lib/commonjs/utils/uuid.js.map +1 -1
- package/lib/module/components/backup/index.js.map +1 -1
- package/lib/module/components/backup/preview-credentials.js +17 -21
- package/lib/module/components/backup/preview-credentials.js.map +1 -1
- package/lib/module/components/credential/credential.js +10 -11
- package/lib/module/components/credential/credential.js.map +1 -1
- package/lib/module/components/credential/index.js.map +1 -1
- package/lib/module/components/entity/EntityButtons.js +17 -21
- package/lib/module/components/entity/EntityButtons.js.map +1 -1
- package/lib/module/components/entity/entity-attributes.js +12 -13
- package/lib/module/components/entity/entity-attributes.js.map +1 -1
- package/lib/module/components/entity/entity-details-with-buttons.js +15 -15
- package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/module/components/entity/entity-details.js +8 -9
- package/lib/module/components/entity/entity-details.js.map +1 -1
- package/lib/module/components/entity/index.js.map +1 -1
- package/lib/module/components/history/history-details-screen.js +59 -0
- package/lib/module/components/history/history-details-screen.js.map +1 -0
- package/lib/module/components/history/history-list-item-icon.js +84 -0
- package/lib/module/components/history/history-list-item-icon.js.map +1 -0
- package/lib/module/components/history/history-list-item.js +36 -0
- package/lib/module/components/history/history-list-item.js.map +1 -0
- package/lib/module/components/history/history-list-screen.js +112 -0
- package/lib/module/components/history/history-list-screen.js.map +1 -0
- package/lib/module/components/history/history-list-section-header.js +29 -0
- package/lib/module/components/history/history-list-section-header.js.map +1 -0
- package/lib/module/components/history/history-list.js +90 -0
- package/lib/module/components/history/history-list.js.map +1 -0
- package/lib/module/components/history/index.js +7 -0
- package/lib/module/components/history/index.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/navigation/header-buttons.js +19 -23
- package/lib/module/components/navigation/header-buttons.js.map +1 -1
- package/lib/module/components/navigation/index.js.map +1 -1
- package/lib/module/components/proof-request/group.js +3 -4
- package/lib/module/components/proof-request/group.js.map +1 -1
- package/lib/module/components/proof-request/index.js.map +1 -1
- package/lib/module/components/proof-request/select-credential.js +10 -11
- package/lib/module/components/proof-request/select-credential.js.map +1 -1
- package/lib/module/components/proof-request/share-credential.js +21 -25
- package/lib/module/components/proof-request/share-credential.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/normalize-color.d.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibility.js +5 -7
- package/lib/module/ui-components/accessibility/accessibility.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistory.js +4 -8
- package/lib/module/ui-components/accessibility/accessibilityHistory.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js +10 -8
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityLanguage.js +6 -8
- package/lib/module/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
- package/lib/module/ui-components/accessibility/index.js +4 -4
- package/lib/module/ui-components/accessibility/index.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale/index.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale.test.js.map +1 -1
- package/lib/module/ui-components/action-modal/ActionModal.js +7 -8
- package/lib/module/ui-components/action-modal/ActionModal.js.map +1 -1
- package/lib/module/ui-components/action-modal/index.js.map +1 -1
- package/lib/module/ui-components/activity-indicator/activity-indicator.js +6 -7
- package/lib/module/ui-components/activity-indicator/activity-indicator.js.map +1 -1
- package/lib/module/ui-components/activity-indicator/index.js.map +1 -1
- package/lib/module/ui-components/blur/blur-view.js +10 -11
- package/lib/module/ui-components/blur/blur-view.js.map +1 -1
- package/lib/module/ui-components/blur/index.js.map +1 -1
- package/lib/module/ui-components/buttons/back-button.js +10 -11
- package/lib/module/ui-components/buttons/back-button.js.map +1 -1
- package/lib/module/ui-components/buttons/button.js +17 -18
- package/lib/module/ui-components/buttons/button.js.map +1 -1
- package/lib/module/ui-components/buttons/connectivity-button.js +14 -14
- package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/module/ui-components/buttons/filter-button.js +6 -7
- package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/module/ui-components/buttons/ghost-button.js +9 -10
- package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/module/ui-components/buttons/hold-button.js +236 -0
- package/lib/module/ui-components/buttons/hold-button.js.map +1 -0
- package/lib/module/ui-components/buttons/index.js +8 -7
- package/lib/module/ui-components/buttons/index.js.map +1 -1
- package/lib/module/ui-components/buttons/scan-button.js +5 -6
- package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/module/ui-components/camera/camera-overlay.js +7 -9
- package/lib/module/ui-components/camera/camera-overlay.js.map +1 -1
- package/lib/module/ui-components/camera/index.js.map +1 -1
- package/lib/module/ui-components/camera/qr-code-scanner.js +8 -9
- package/lib/module/ui-components/camera/qr-code-scanner.js.map +1 -1
- package/lib/module/ui-components/control/checkbox.js +9 -10
- package/lib/module/ui-components/control/checkbox.js.map +1 -1
- package/lib/module/ui-components/control/index.js.map +1 -1
- package/lib/module/ui-components/control/switch.js +8 -9
- package/lib/module/ui-components/control/switch.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-card.js +16 -17
- package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js +26 -30
- package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-list-item.js +23 -15
- package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-header.js +21 -19
- package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-image-carousel.js +23 -23
- package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/module/ui-components/credential/card/index.js +10 -10
- package/lib/module/ui-components/credential/card/index.js.map +1 -1
- package/lib/module/ui-components/credential/credential-attribute-item.js +47 -55
- package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js +15 -18
- package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/module/ui-components/credential/index.js +2 -2
- package/lib/module/ui-components/credential/index.js.map +1 -1
- package/lib/module/ui-components/credential/selector-status.js +3 -3
- package/lib/module/ui-components/credential/selector-status.js.map +1 -1
- package/lib/module/ui-components/credential/selector.js +5 -6
- package/lib/module/ui-components/credential/selector.js.map +1 -1
- package/lib/module/ui-components/detail/detail.js +9 -10
- package/lib/module/ui-components/detail/detail.js.map +1 -1
- package/lib/module/ui-components/detail/index.js.map +1 -1
- package/lib/module/ui-components/entity/avatar.js +10 -11
- package/lib/module/ui-components/entity/avatar.js.map +1 -1
- package/lib/module/ui-components/entity/entity-cluster.js +11 -13
- package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/module/ui-components/entity/index.js.map +1 -1
- package/lib/module/ui-components/header/focus-aware-status-bar.js +1 -1
- package/lib/module/ui-components/header/focus-aware-status-bar.js.map +1 -1
- package/lib/module/ui-components/header/foldable-header.js +10 -12
- package/lib/module/ui-components/header/foldable-header.js.map +1 -1
- package/lib/module/ui-components/header/header.js +10 -11
- package/lib/module/ui-components/header/header.js.map +1 -1
- package/lib/module/ui-components/header/index.js +6 -6
- package/lib/module/ui-components/header/index.js.map +1 -1
- package/lib/module/ui-components/header/navigation-header.js +23 -28
- package/lib/module/ui-components/header/navigation-header.js.map +1 -1
- package/lib/module/ui-components/history/data-item.js +23 -15
- package/lib/module/ui-components/history/data-item.js.map +1 -1
- package/lib/module/ui-components/history/history-details.js +171 -0
- package/lib/module/ui-components/history/history-details.js.map +1 -0
- package/lib/module/ui-components/history/{history-list-item.js → history-item.js} +44 -22
- package/lib/module/ui-components/history/history-item.js.map +1 -0
- package/lib/module/ui-components/history/history-section-header.js +6 -7
- package/lib/module/ui-components/history/history-section-header.js.map +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js +8 -9
- package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/module/ui-components/history/index.js +5 -4
- package/lib/module/ui-components/history/index.js.map +1 -1
- package/lib/module/ui-components/icons/connectivity.js +16 -21
- package/lib/module/ui-components/icons/connectivity.js.map +1 -1
- package/lib/module/ui-components/icons/credential.js +57 -68
- package/lib/module/ui-components/icons/credential.js.map +1 -1
- package/lib/module/ui-components/icons/entity.js +4 -5
- package/lib/module/ui-components/icons/entity.js.map +1 -1
- package/lib/module/ui-components/icons/history.js +101 -128
- package/lib/module/ui-components/icons/history.js.map +1 -1
- package/lib/module/ui-components/icons/icons.js +70 -87
- package/lib/module/ui-components/icons/icons.js.map +1 -1
- package/lib/module/ui-components/icons/index.js.map +1 -1
- package/lib/module/ui-components/icons/input.js.map +1 -1
- package/lib/module/ui-components/icons/keypad.js +66 -78
- package/lib/module/ui-components/icons/keypad.js.map +1 -1
- package/lib/module/ui-components/icons/loader.js +1 -1
- package/lib/module/ui-components/icons/loader.js.map +1 -1
- package/lib/module/ui-components/icons/nerd-view.js.map +1 -1
- package/lib/module/ui-components/icons/selector.js +5 -6
- package/lib/module/ui-components/icons/selector.js.map +1 -1
- package/lib/module/ui-components/icons/wallet.js +13 -16
- package/lib/module/ui-components/icons/wallet.js.map +1 -1
- package/lib/module/ui-components/image/image-or-component.js +12 -14
- package/lib/module/ui-components/image/image-or-component.js.map +1 -1
- package/lib/module/ui-components/image/index.js +2 -2
- package/lib/module/ui-components/image/index.js.map +1 -1
- package/lib/module/ui-components/index.js.map +1 -1
- package/lib/module/ui-components/input/index.js.map +1 -1
- package/lib/module/ui-components/input/radio-group.js +26 -22
- package/lib/module/ui-components/input/radio-group.js.map +1 -1
- package/lib/module/ui-components/input/selection-input.js +21 -31
- package/lib/module/ui-components/input/selection-input.js.map +1 -1
- package/lib/module/ui-components/input/text-input.js +21 -22
- package/lib/module/ui-components/input/text-input.js.map +1 -1
- package/lib/module/ui-components/list/index.js +1 -0
- package/lib/module/ui-components/list/index.js.map +1 -1
- package/lib/module/ui-components/list/list-page-loading-indicator.js +7 -0
- package/lib/module/ui-components/list/list-page-loading-indicator.js.map +1 -0
- package/lib/module/ui-components/list/list-section-header.js +8 -9
- package/lib/module/ui-components/list/list-section-header.js.map +1 -1
- package/lib/module/ui-components/list/list-title-header.js +4 -5
- package/lib/module/ui-components/list/list-title-header.js.map +1 -1
- package/lib/module/ui-components/list/wallet/empty-list.js +66 -0
- package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -0
- package/lib/module/ui-components/list/wallet/empty-search-result.js +34 -0
- package/lib/module/ui-components/list/wallet/empty-search-result.js.map +1 -0
- package/lib/module/ui-components/list/wallet/index.js +4 -0
- package/lib/module/ui-components/list/wallet/index.js.map +1 -0
- package/lib/module/ui-components/loader/index.js.map +1 -1
- package/lib/module/ui-components/loader/loader.js +14 -12
- package/lib/module/ui-components/loader/loader.js.map +1 -1
- package/lib/module/ui-components/loader/loading-result.js +21 -19
- package/lib/module/ui-components/loader/loading-result.js.map +1 -1
- package/lib/module/ui-components/nerd-view/index.js +2 -2
- package/lib/module/ui-components/nerd-view/index.js.map +1 -1
- package/lib/module/ui-components/nerd-view/nerd-mode-item.js +31 -34
- package/lib/module/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
- package/lib/module/ui-components/pin/index.js.map +1 -1
- package/lib/module/ui-components/pin/keypad.js +17 -19
- package/lib/module/ui-components/pin/keypad.js.map +1 -1
- package/lib/module/ui-components/pin/pin-code-screen.js +16 -17
- package/lib/module/ui-components/pin/pin-code-screen.js.map +1 -1
- package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -1
- package/lib/module/ui-components/pin/pin-lock.js +6 -7
- package/lib/module/ui-components/pin/pin-lock.js.map +1 -1
- package/lib/module/ui-components/pin/pins.js +7 -8
- package/lib/module/ui-components/pin/pins.js.map +1 -1
- package/lib/module/ui-components/screens/backup-screen.js +13 -14
- package/lib/module/ui-components/screens/backup-screen.js.map +1 -1
- package/lib/module/ui-components/screens/image-preview-screen.js +9 -10
- package/lib/module/ui-components/screens/image-preview-screen.js.map +1 -1
- package/lib/module/ui-components/screens/index.js +12 -12
- package/lib/module/ui-components/screens/index.js.map +1 -1
- package/lib/module/ui-components/screens/nerd-mode-screen.js +29 -34
- package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/module/ui-components/screens/qr-code-scanner-screen.js +10 -11
- package/lib/module/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
- package/lib/module/ui-components/screens/scroll-view-screen.js +10 -11
- package/lib/module/ui-components/screens/scroll-view-screen.js.map +1 -1
- package/lib/module/ui-components/screens/section-list-screen.js +11 -12
- package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/module/ui-components/searchbar/animated-search-bar.js +6 -7
- package/lib/module/ui-components/searchbar/animated-search-bar.js.map +1 -1
- package/lib/module/ui-components/searchbar/index.js.map +1 -1
- package/lib/module/ui-components/searchbar/search-bar.js +11 -12
- package/lib/module/ui-components/searchbar/search-bar.js.map +1 -1
- package/lib/module/ui-components/settings/button-setting.js +10 -11
- package/lib/module/ui-components/settings/button-setting.js.map +1 -1
- package/lib/module/ui-components/settings/index.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item-separator.js +4 -5
- package/lib/module/ui-components/settings/setting-item-separator.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item.js +7 -8
- package/lib/module/ui-components/settings/setting-item.js.map +1 -1
- package/lib/module/ui-components/settings/settings-button.js +5 -6
- package/lib/module/ui-components/settings/settings-button.js.map +1 -1
- package/lib/module/ui-components/settings/switch-setting.js +9 -10
- package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/module/ui-components/state/error-screen.js +7 -8
- package/lib/module/ui-components/state/error-screen.js.map +1 -1
- package/lib/module/ui-components/state/index.js.map +1 -1
- package/lib/module/ui-components/text/base.js +12 -13
- package/lib/module/ui-components/text/base.js.map +1 -1
- package/lib/module/ui-components/text/font.js +10 -11
- package/lib/module/ui-components/text/font.js.map +1 -1
- package/lib/module/ui-components/text/index.js +2 -2
- package/lib/module/ui-components/text/index.js.map +1 -1
- package/lib/module/ui-components/text/typography.js +8 -10
- package/lib/module/ui-components/text/typography.js.map +1 -1
- package/lib/module/ui-components/theme/color-scheme-context.js +1 -0
- package/lib/module/ui-components/theme/color-scheme-context.js.map +1 -1
- package/lib/module/ui-components/theme/color-scheme.js.map +1 -1
- package/lib/module/ui-components/theme/index.js.map +1 -1
- package/lib/module/utils/array.js.map +1 -1
- package/lib/module/utils/backup.js.map +1 -1
- package/lib/module/utils/color.js.map +1 -1
- package/lib/module/utils/contrasting-status-bar.js +5 -6
- package/lib/module/utils/contrasting-status-bar.js.map +1 -1
- package/lib/module/utils/date.js +4 -4
- package/lib/module/utils/date.js.map +1 -1
- package/lib/module/utils/filtering.js +4 -0
- package/lib/module/utils/filtering.js.map +1 -0
- package/lib/module/utils/history.js +66 -0
- package/lib/module/utils/history.js.map +1 -0
- package/lib/module/utils/hooks/connectivity/connectivity.js +36 -19
- package/lib/module/utils/hooks/connectivity/connectivity.js.map +1 -1
- package/lib/module/utils/hooks/connectivity/connectivity.test.js +6 -0
- package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/module/utils/hooks/core/backup.js +31 -31
- package/lib/module/utils/hooks/core/backup.js.map +1 -1
- package/lib/module/utils/hooks/core/cache.js +37 -0
- package/lib/module/utils/hooks/core/cache.js.map +1 -0
- package/lib/module/utils/hooks/core/core-config.js +11 -0
- package/lib/module/utils/hooks/core/core-config.js.map +1 -1
- package/lib/module/utils/hooks/core/core-context.js +14 -9
- package/lib/module/utils/hooks/core/core-context.js.map +1 -1
- package/lib/module/utils/hooks/core/core-init.js +16 -8
- package/lib/module/utils/hooks/core/core-init.js.map +1 -1
- package/lib/module/utils/hooks/core/credential-schemas.js +12 -19
- package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/credentials.js +26 -36
- package/lib/module/utils/hooks/core/credentials.js.map +1 -1
- package/lib/module/utils/hooks/core/dids.js +3 -4
- package/lib/module/utils/hooks/core/dids.js.map +1 -1
- package/lib/module/utils/hooks/core/error-code.js +3 -3
- package/lib/module/utils/hooks/core/error-code.js.map +1 -1
- package/lib/module/utils/hooks/core/history.js +4 -35
- package/lib/module/utils/hooks/core/history.js.map +1 -1
- package/lib/module/utils/hooks/core/index.js +1 -0
- package/lib/module/utils/hooks/core/index.js.map +1 -1
- package/lib/module/utils/hooks/core/proof-schemas.js +19 -30
- package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/proofs.js +101 -67
- package/lib/module/utils/hooks/core/proofs.js.map +1 -1
- package/lib/module/utils/hooks/core/query.js.map +1 -1
- package/lib/module/utils/hooks/core/trust-entity.js +7 -3
- package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/module/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
- package/lib/module/utils/hooks/header/on-scroll-header-state.js +1 -2
- package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -1
- package/lib/module/utils/hooks/http/client.js.map +1 -1
- package/lib/module/utils/hooks/index.js.map +1 -1
- package/lib/module/utils/hooks/list/list-content-inset.js +9 -10
- package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -1
- package/lib/module/utils/hooks/navigation/before-remove.js.map +1 -1
- package/lib/module/utils/hooks/navigation/close-button-timeout.js.map +1 -1
- package/lib/module/utils/hooks/navigation/deep-link.js +3 -4
- package/lib/module/utils/hooks/navigation/deep-link.js.map +1 -1
- package/lib/module/utils/hooks/navigation/index.js.map +1 -1
- package/lib/module/utils/hooks/navigation/open-settings.js +1 -2
- package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/module/utils/hooks/pin-security/pin-security.js +1 -2
- package/lib/module/utils/hooks/pin-security/pin-security.js.map +1 -1
- package/lib/module/utils/hooks/revocation/credential-status.js +17 -26
- package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/module/utils/index.js +3 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/navigation.js +5 -5
- package/lib/module/utils/navigation.js.map +1 -1
- package/lib/module/utils/parsers/credential-images.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing.js +15 -19
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js +16 -25
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/module/utils/parsers/index.js +1 -0
- package/lib/module/utils/parsers/index.js.map +1 -1
- package/lib/module/utils/parsers/query.js +3 -2
- package/lib/module/utils/parsers/query.js.map +1 -1
- package/lib/module/utils/parsers/universal-links.js +25 -0
- package/lib/module/utils/parsers/universal-links.js.map +1 -0
- package/lib/module/utils/parsers/universal-links.test.js +38 -0
- package/lib/module/utils/parsers/universal-links.test.js.map +1 -0
- package/lib/module/utils/ref.js.map +1 -1
- package/lib/module/utils/reporting.js +1 -0
- package/lib/module/utils/reporting.js.map +1 -1
- package/lib/module/utils/string.js.map +1 -1
- package/lib/module/utils/testID.js +1 -4
- package/lib/module/utils/testID.js.map +1 -1
- package/lib/module/utils/testID.test.js.map +1 -1
- package/lib/module/utils/useMemoAsync.js +10 -0
- package/lib/module/utils/useMemoAsync.js.map +1 -1
- package/lib/module/utils/uuid.js.map +1 -1
- package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
- package/lib/typescript/components/history/history-details-screen.d.ts +20 -0
- package/lib/typescript/components/history/history-list-item-icon.d.ts +8 -0
- package/lib/typescript/components/history/history-list-item.d.ts +20 -0
- package/lib/typescript/components/history/history-list-screen.d.ts +22 -0
- package/lib/typescript/components/history/history-list-section-header.d.ts +13 -0
- package/lib/typescript/components/history/history-list.d.ts +19 -0
- package/lib/typescript/components/history/index.d.ts +6 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/ui-components/accessibility/accessibility.d.ts +2 -2
- package/lib/typescript/ui-components/accessibility/accessibilityHistory.d.ts +1 -1
- package/lib/typescript/ui-components/accessibility/accessibilityHistoryWrappers.d.ts +3 -3
- package/lib/typescript/ui-components/accessibility/index.d.ts +5 -3
- package/lib/typescript/ui-components/buttons/button.d.ts +2 -2
- package/lib/typescript/ui-components/buttons/hold-button.d.ts +16 -0
- package/lib/typescript/ui-components/buttons/index.d.ts +15 -7
- package/lib/typescript/ui-components/buttons/scan-button.d.ts +2 -2
- package/lib/typescript/ui-components/credential/card/credential-header.d.ts +1 -1
- package/lib/typescript/ui-components/credential/card/index.d.ts +10 -5
- package/lib/typescript/ui-components/credential/index.d.ts +2 -1
- package/lib/typescript/ui-components/header/index.d.ts +6 -3
- package/lib/typescript/ui-components/history/data-item.d.ts +2 -2
- package/lib/typescript/ui-components/history/history-details.d.ts +51 -0
- package/lib/typescript/ui-components/history/{history-list-item.d.ts → history-item.d.ts} +4 -3
- package/lib/typescript/ui-components/history/history-section-header.d.ts +2 -2
- package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
- package/lib/typescript/ui-components/history/index.d.ts +5 -4
- package/lib/typescript/ui-components/icons/history.d.ts +20 -35
- package/lib/typescript/ui-components/image/index.d.ts +2 -1
- package/lib/typescript/ui-components/input/selection-input.d.ts +1 -1
- package/lib/typescript/ui-components/list/index.d.ts +1 -0
- package/lib/typescript/ui-components/list/list-page-loading-indicator.d.ts +4 -0
- package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +10 -0
- package/lib/typescript/ui-components/list/wallet/empty-search-result.d.ts +7 -0
- package/lib/typescript/ui-components/list/wallet/index.d.ts +3 -0
- package/lib/typescript/ui-components/nerd-view/index.d.ts +2 -1
- package/lib/typescript/ui-components/pin/keypad.d.ts +2 -2
- package/lib/typescript/ui-components/screens/index.d.ts +12 -6
- package/lib/typescript/ui-components/text/index.d.ts +2 -1
- package/lib/typescript/ui-components/text/typography.d.ts +14 -14
- package/lib/typescript/ui-components/theme/color-scheme.d.ts +1 -0
- package/lib/typescript/utils/filtering.d.ts +1 -0
- package/lib/typescript/utils/history.d.ts +10 -0
- package/lib/typescript/utils/hooks/connectivity/connectivity.d.ts +1 -1
- package/lib/typescript/utils/hooks/core/backup.d.ts +2 -1
- package/lib/typescript/utils/hooks/core/cache.d.ts +2 -0
- package/lib/typescript/utils/hooks/core/core-config.d.ts +5 -1
- package/lib/typescript/utils/hooks/core/core-init.d.ts +10 -1
- package/lib/typescript/utils/hooks/core/credentials.d.ts +7 -3
- package/lib/typescript/utils/hooks/core/history.d.ts +2 -5
- package/lib/typescript/utils/hooks/core/index.d.ts +1 -0
- package/lib/typescript/utils/hooks/core/proofs.d.ts +14 -8
- package/lib/typescript/utils/hooks/core/trust-entity.d.ts +5 -0
- package/lib/typescript/utils/hooks/revocation/credential-status.d.ts +2 -1
- package/lib/typescript/utils/index.d.ts +3 -0
- package/lib/typescript/utils/parsers/index.d.ts +1 -0
- package/lib/typescript/utils/parsers/universal-links.d.ts +1 -0
- package/lib/typescript/utils/parsers/universal-links.test.d.ts +1 -0
- package/lib/typescript/utils/ref.d.ts +1 -1
- package/package.json +60 -46
- package/src/components/entity/entity-attributes.tsx +4 -3
- package/src/components/entity/entity-details-with-buttons.tsx +4 -3
- package/src/components/history/history-details-screen.tsx +89 -0
- package/src/components/history/history-list-item-icon.tsx +108 -0
- package/src/components/history/history-list-item.tsx +53 -0
- package/src/components/history/history-list-screen.tsx +154 -0
- package/src/components/history/history-list-section-header.tsx +42 -0
- package/src/components/history/history-list.tsx +116 -0
- package/src/components/history/index.tsx +6 -0
- package/src/components/index.ts +1 -0
- package/src/ui-components/accessibility/accessibility.ts +2 -2
- package/src/ui-components/accessibility/accessibilityHistory.tsx +2 -2
- package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +3 -5
- package/src/ui-components/accessibility/index.ts +4 -3
- package/src/ui-components/action-modal/ActionModal.stories.tsx +7 -3
- package/src/ui-components/activity-indicator/activity-indicator.stories.tsx +3 -6
- package/src/ui-components/buttons/back-button.stories.tsx +7 -8
- package/src/ui-components/buttons/button.stories.tsx +9 -10
- package/src/ui-components/buttons/connectivity-button.stories.tsx +10 -11
- package/src/ui-components/buttons/connectivity-button.tsx +1 -1
- package/src/ui-components/buttons/ghost-button.stories.tsx +8 -8
- package/src/ui-components/buttons/hold-button.stories.tsx +29 -0
- package/src/ui-components/buttons/hold-button.tsx +276 -0
- package/src/ui-components/buttons/index.ts +16 -6
- package/src/ui-components/buttons/scan-button.stories.tsx +8 -4
- package/src/ui-components/control/checkbox.stories.tsx +8 -8
- package/src/ui-components/control/switch.stories.tsx +11 -8
- package/src/ui-components/credential/card/credential-card.stories.tsx +22 -25
- package/src/ui-components/credential/card/credential-details-card.stories.tsx +249 -245
- package/src/ui-components/credential/card/credential-details-card.tsx +2 -2
- package/src/ui-components/credential/card/credential-details-list-item.tsx +16 -6
- package/src/ui-components/credential/card/credential-header.stories.tsx +15 -17
- package/src/ui-components/credential/card/credential-header.tsx +4 -1
- package/src/ui-components/credential/card/credential-image-carousel.tsx +4 -0
- package/src/ui-components/credential/card/index.ts +11 -5
- package/src/ui-components/credential/index.ts +2 -1
- package/src/ui-components/credential/selector.stories.tsx +7 -7
- package/src/ui-components/detail/detail.stories.tsx +11 -8
- package/src/ui-components/entity/avatar.stories.tsx +10 -7
- package/src/ui-components/entity/entity-cluster.stories.tsx +11 -8
- package/src/ui-components/header/header.stories.tsx +10 -7
- package/src/ui-components/header/index.ts +6 -3
- package/src/ui-components/header/navigation-header.stories.tsx +11 -8
- package/src/ui-components/history/data-item.tsx +13 -4
- package/src/ui-components/history/history-details.tsx +247 -0
- package/src/ui-components/history/{history-list-item.tsx → history-item.tsx} +72 -33
- package/src/ui-components/history/history-section-header.tsx +2 -2
- package/src/ui-components/history/history-section-list-item.tsx +3 -3
- package/src/ui-components/history/index.ts +5 -4
- package/src/ui-components/icons/history.tsx +82 -131
- package/src/ui-components/image/index.tsx +2 -1
- package/src/ui-components/input/radio-group.stories.tsx +34 -0
- package/src/ui-components/input/radio-group.tsx +8 -2
- package/src/ui-components/input/selection-input.stories.tsx +20 -17
- package/src/ui-components/list/index.ts +1 -0
- package/src/ui-components/list/list-page-loading-indicator.tsx +8 -0
- package/src/ui-components/list/wallet/empty-list.tsx +75 -0
- package/src/ui-components/list/wallet/empty-search-result.tsx +39 -0
- package/src/ui-components/list/wallet/index.tsx +4 -0
- package/src/ui-components/loader/loader.stories.tsx +6 -9
- package/src/ui-components/loader/loader.tsx +6 -3
- package/src/ui-components/loader/loading-result.stories.tsx +13 -10
- package/src/ui-components/loader/loading-result.tsx +8 -4
- package/src/ui-components/nerd-view/index.ts +2 -1
- package/src/ui-components/nerd-view/nerd-mode-item.tsx +2 -2
- package/src/ui-components/pin/pin-code-screen.stories.tsx +20 -13
- package/src/ui-components/screens/image-preview-screen.stories.tsx +9 -6
- package/src/ui-components/screens/index.ts +12 -6
- package/src/ui-components/screens/nerd-mode-screen.tsx +1 -1
- package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +10 -7
- package/src/ui-components/searchbar/search-bar.stories.tsx +15 -8
- package/src/ui-components/searchbar/search-bar.tsx +2 -2
- package/src/ui-components/state/error-screen.stories.tsx +8 -9
- package/src/ui-components/state/error-screen.tsx +1 -1
- package/src/ui-components/text/index.ts +2 -1
- package/src/ui-components/text/typography.stories.tsx +19 -12
- package/src/ui-components/theme/color-scheme-context.tsx +1 -0
- package/src/ui-components/theme/color-scheme.ts +1 -0
- package/src/utils/date.ts +5 -5
- package/src/utils/filtering.ts +5 -0
- package/src/utils/history.ts +71 -0
- package/src/utils/hooks/connectivity/connectivity.test.ts +8 -0
- package/src/utils/hooks/connectivity/connectivity.ts +28 -4
- package/src/utils/hooks/core/backup.ts +25 -21
- package/src/utils/hooks/core/cache.ts +43 -0
- package/src/utils/hooks/core/core-config.ts +19 -0
- package/src/utils/hooks/core/core-context.tsx +15 -2
- package/src/utils/hooks/core/core-init.ts +21 -7
- package/src/utils/hooks/core/credential-schemas.ts +1 -1
- package/src/utils/hooks/core/credentials.ts +9 -14
- package/src/utils/hooks/core/history.ts +2 -57
- package/src/utils/hooks/core/index.ts +1 -0
- package/src/utils/hooks/core/proof-schemas.ts +1 -1
- package/src/utils/hooks/core/proofs.ts +107 -49
- package/src/utils/hooks/core/trust-entity.ts +7 -3
- package/src/utils/hooks/navigation/open-settings.ts +2 -3
- package/src/utils/hooks/revocation/credential-status.ts +3 -2
- package/src/utils/index.ts +3 -0
- package/src/utils/navigation.ts +4 -2
- package/src/utils/parsers/credential.ts +1 -1
- package/src/utils/parsers/index.ts +1 -0
- package/src/utils/parsers/query.tsx +2 -0
- package/src/utils/parsers/universal-links.test.ts +57 -0
- package/src/utils/parsers/universal-links.ts +26 -0
- package/src/utils/ref.ts +1 -1
- package/src/utils/reporting.ts +1 -0
- package/lib/commonjs/ui-components/history/history-list-item.js.map +0 -1
- package/lib/module/ui-components/history/history-list-item.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { initializeCore } from '@procivis/react-native-one-core';
|
|
2
2
|
import React, { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { reportException } from '../../reporting';
|
|
4
|
-
import {
|
|
4
|
+
import { getEnabledTrustManagement } from './core-config';
|
|
5
|
+
import { TrustManagementEnum, useCreateTrustAnchor } from './trust-entity';
|
|
5
6
|
const defaultContextValue = {
|
|
6
7
|
core: {},
|
|
7
8
|
organisationId: '11111111-2222-3333-a444-ffffffffffff',
|
|
8
9
|
initialize: () => Promise.reject()
|
|
9
10
|
};
|
|
10
11
|
const ONECoreContext = /*#__PURE__*/createContext(defaultContextValue);
|
|
11
|
-
export const ONECoreContextProvider =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} = _ref;
|
|
12
|
+
export const ONECoreContextProvider = ({
|
|
13
|
+
children,
|
|
14
|
+
organisationId = '11111111-2222-3333-a444-ffffffffffff',
|
|
15
|
+
publisherReference,
|
|
16
|
+
config
|
|
17
|
+
}) => {
|
|
18
18
|
const [core, setCore] = useState();
|
|
19
19
|
const createTrustAnchor = useCreateTrustAnchor(publisherReference);
|
|
20
20
|
const initialize = useCallback(async force => {
|
|
@@ -44,7 +44,12 @@ export const ONECoreContextProvider = _ref => {
|
|
|
44
44
|
if (!core) {
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
core.getConfig().then(coreConfig => {
|
|
48
|
+
const trustManagementEnabled = getEnabledTrustManagement(coreConfig).includes(TrustManagementEnum.SimpleTrustList);
|
|
49
|
+
if (trustManagementEnabled) {
|
|
50
|
+
createTrustAnchor(core).catch(() => {});
|
|
51
|
+
}
|
|
52
|
+
}).catch(() => {});
|
|
48
53
|
}, [core, createTrustAnchor]);
|
|
49
54
|
const contextValue = useMemo(() => ({
|
|
50
55
|
core: core !== null && core !== void 0 ? core : defaultContextValue.core,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["initializeCore","React","createContext","useCallback","useContext","useEffect","useMemo","useState","reportException","useCreateTrustAnchor","defaultContextValue","core","organisationId","initialize","Promise","reject","ONECoreContext","ONECoreContextProvider","
|
|
1
|
+
{"version":3,"names":["initializeCore","React","createContext","useCallback","useContext","useEffect","useMemo","useState","reportException","getEnabledTrustManagement","TrustManagementEnum","useCreateTrustAnchor","defaultContextValue","core","organisationId","initialize","Promise","reject","ONECoreContext","ONECoreContextProvider","children","publisherReference","config","setCore","createTrustAnchor","force","coreInstance","e","corePromise","then","c","uninitialize","catch","getConfig","coreConfig","trustManagementEnabled","includes","SimpleTrustList","contextValue","createElement","Provider","value","useONECore"],"sources":["core-context.tsx"],"sourcesContent":["import { initializeCore, ONECore } from '@procivis/react-native-one-core';\nimport React, {\n createContext,\n FC,\n PropsWithChildren,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { reportException } from '../../reporting';\nimport { getEnabledTrustManagement } from './core-config';\nimport { TrustManagementEnum, useCreateTrustAnchor } from './trust-entity';\n\ninterface ContextValue {\n core: ONECore;\n organisationId: string;\n initialize: (force?: boolean) => Promise<ONECore>;\n}\n\nconst defaultContextValue: ContextValue = {\n core: {} as ONECore,\n organisationId: '11111111-2222-3333-a444-ffffffffffff',\n initialize: () => Promise.reject(),\n};\n\nexport type ONECoreContextProviderProps = {\n config?: Record<string, unknown>;\n organisationId?: string;\n publisherReference: string;\n};\n\nconst ONECoreContext = createContext<ContextValue>(defaultContextValue);\n\nexport const ONECoreContextProvider: FC<PropsWithChildren<ONECoreContextProviderProps>> = ({\n children,\n organisationId = '11111111-2222-3333-a444-ffffffffffff',\n publisherReference,\n config,\n}) => {\n const [core, setCore] = useState<ONECore>();\n const createTrustAnchor = useCreateTrustAnchor(publisherReference);\n\n const initialize = useCallback(\n async (force?: boolean) => {\n if (core && !force) {\n return core;\n }\n\n try {\n const coreInstance = await initializeCore(config);\n setCore(coreInstance);\n return coreInstance;\n } catch (e) {\n reportException(e, 'Failed to initialize core');\n throw e;\n }\n },\n [core, config],\n );\n\n useEffect(\n () => {\n const corePromise = initialize();\n return () => {\n corePromise\n .then((c) => c?.uninitialize(false))\n .catch((e) => {\n reportException(e, 'Core uninitialization error');\n });\n };\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n useEffect(() => {\n if (!core) {\n return;\n }\n\n core\n .getConfig()\n .then((coreConfig) => {\n const trustManagementEnabled = getEnabledTrustManagement(coreConfig).includes(\n TrustManagementEnum.SimpleTrustList,\n );\n\n if (trustManagementEnabled) {\n createTrustAnchor(core).catch(() => {});\n }\n })\n .catch(() => {});\n }, [core, createTrustAnchor]);\n\n const contextValue = useMemo(\n () => ({\n core: core ?? defaultContextValue.core,\n organisationId,\n initialize,\n }),\n [core, initialize, organisationId],\n );\n\n if (!core) {\n return null;\n }\n\n return <ONECoreContext.Provider value={contextValue}>{children}</ONECoreContext.Provider>;\n};\n\nexport const useONECore = () => useContext(ONECoreContext);\n"],"mappings":"AAAA,SAASA,cAAc,QAAiB,iCAAiC;AACzE,OAAOC,KAAK,IACVC,aAAa,EAGbC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,OAAO,EACPC,QAAQ,QACH,OAAO;AAEd,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,yBAAyB,QAAQ,eAAe;AACzD,SAASC,mBAAmB,EAAEC,oBAAoB,QAAQ,gBAAgB;AAQ1E,MAAMC,mBAAiC,GAAG;EACxCC,IAAI,EAAE,CAAC,CAAY;EACnBC,cAAc,EAAE,sCAAsC;EACtDC,UAAU,EAAEA,CAAA,KAAMC,OAAO,CAACC,MAAM,CAAC;AACnC,CAAC;AAQD,MAAMC,cAAc,gBAAGhB,aAAa,CAAeU,mBAAmB,CAAC;AAEvE,OAAO,MAAMO,sBAA0E,GAAGA,CAAC;EACzFC,QAAQ;EACRN,cAAc,GAAG,sCAAsC;EACvDO,kBAAkB;EAClBC;AACF,CAAC,KAAK;EACJ,MAAM,CAACT,IAAI,EAAEU,OAAO,CAAC,GAAGhB,QAAQ,CAAU,CAAC;EAC3C,MAAMiB,iBAAiB,GAAGb,oBAAoB,CAACU,kBAAkB,CAAC;EAElE,MAAMN,UAAU,GAAGZ,WAAW,CAC5B,MAAOsB,KAAe,IAAK;IACzB,IAAIZ,IAAI,IAAI,CAACY,KAAK,EAAE;MAClB,OAAOZ,IAAI;IACb;IAEA,IAAI;MACF,MAAMa,YAAY,GAAG,MAAM1B,cAAc,CAACsB,MAAM,CAAC;MACjDC,OAAO,CAACG,YAAY,CAAC;MACrB,OAAOA,YAAY;IACrB,CAAC,CAAC,OAAOC,CAAC,EAAE;MACVn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aAAA,CAACrB,cAAc,CAACsB,QAAQ;IAACC,KAAK,EAAEH;EAAa,GAAElB,QAAkC,CAAC;AAC3F,CAAC;AAED,OAAO,MAAMsB,UAAU,GAAGA,CAAA,KAAMtC,UAAU,CAACc,cAAc,CAAC","ignoreList":[]}
|
|
@@ -8,7 +8,7 @@ export const HW_DID_NAME_PREFIX = 'holder-did-hw-key';
|
|
|
8
8
|
const generateHwDid = async (core, organisationId) => {
|
|
9
9
|
const hwKeyId = await core.generateKey({
|
|
10
10
|
keyParams: {},
|
|
11
|
-
keyType: '
|
|
11
|
+
keyType: 'ECDSA',
|
|
12
12
|
name: 'holder-key-hw',
|
|
13
13
|
organisationId,
|
|
14
14
|
storageParams: {},
|
|
@@ -40,7 +40,7 @@ const generateHwDid = async (core, organisationId) => {
|
|
|
40
40
|
const generateSwDid = async (core, organisationId) => {
|
|
41
41
|
const swKeyId = await core.generateKey({
|
|
42
42
|
keyParams: {},
|
|
43
|
-
keyType: '
|
|
43
|
+
keyType: 'ECDSA',
|
|
44
44
|
name: 'holder-key-sw',
|
|
45
45
|
organisationId,
|
|
46
46
|
storageParams: {},
|
|
@@ -60,23 +60,31 @@ const generateSwDid = async (core, organisationId) => {
|
|
|
60
60
|
params: {}
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Create base local identifiers
|
|
65
|
+
* @param {IdentifiersInitializationConfig} config Select desired keys/dids to be created
|
|
66
|
+
* @returns [hwDidId, swDidId]
|
|
67
|
+
*/
|
|
68
|
+
export const useInitializeONECoreIdentifiers = ({
|
|
69
|
+
generateHwKey,
|
|
70
|
+
generateSwKey
|
|
71
|
+
}) => {
|
|
66
72
|
const {
|
|
67
73
|
core,
|
|
68
74
|
organisationId
|
|
69
75
|
} = useONECore();
|
|
70
76
|
return useCallback(async () => {
|
|
71
|
-
return await core.createOrganisation(
|
|
77
|
+
return await core.createOrganisation({
|
|
78
|
+
id: organisationId
|
|
79
|
+
}).catch(e => {
|
|
72
80
|
if (e instanceof OneError && e.code === OneErrorCode.OrganisationAlreadyExists) {
|
|
73
81
|
return;
|
|
74
82
|
}
|
|
75
83
|
throw e;
|
|
76
|
-
}).then(() => Promise.all([generateHwDid(core, organisationId), generateSwDid(core, organisationId)])).catch(err => {
|
|
84
|
+
}).then(() => Promise.all([generateHwKey ? generateHwDid(core, organisationId) : null, generateSwKey ? generateSwDid(core, organisationId) : null])).catch(err => {
|
|
77
85
|
reportException(err, 'Failed to create base identifiers');
|
|
78
86
|
throw err;
|
|
79
87
|
});
|
|
80
|
-
}, [core, organisationId]);
|
|
88
|
+
}, [core, organisationId, generateHwKey, generateSwKey]);
|
|
81
89
|
};
|
|
82
90
|
//# sourceMappingURL=core-init.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["OneError","useCallback","reportException","useONECore","OneErrorCode","SW_DID_NAME_PREFIX","HW_DID_NAME_PREFIX","generateHwDid","core","organisationId","hwKeyId","generateKey","keyParams","keyType","name","storageParams","storageType","catch","e","code","KeyStorageNotSupported","createDid","didMethod","keys","assertionMethod","authentication","capabilityDelegation","capabilityInvocation","keyAgreement","params","generateSwDid","swKeyId","useInitializeONECoreIdentifiers","createOrganisation","OrganisationAlreadyExists","then","Promise","all","err"],"sources":["core-init.ts"],"sourcesContent":["import { ONECore, OneError } from '@procivis/react-native-one-core';\nimport { useCallback } from 'react';\n\nimport { reportException } from '../../reporting';\nimport { useONECore } from './core-context';\nimport { OneErrorCode } from './error-code';\n\nexport const SW_DID_NAME_PREFIX = 'holder-did-sw-key';\nexport const HW_DID_NAME_PREFIX = 'holder-did-hw-key';\n\nconst generateHwDid = async (core: ONECore, organisationId: string) => {\n const hwKeyId = await core\n .generateKey({\n keyParams: {},\n keyType: '
|
|
1
|
+
{"version":3,"names":["OneError","useCallback","reportException","useONECore","OneErrorCode","SW_DID_NAME_PREFIX","HW_DID_NAME_PREFIX","generateHwDid","core","organisationId","hwKeyId","generateKey","keyParams","keyType","name","storageParams","storageType","catch","e","code","KeyStorageNotSupported","createDid","didMethod","keys","assertionMethod","authentication","capabilityDelegation","capabilityInvocation","keyAgreement","params","generateSwDid","swKeyId","useInitializeONECoreIdentifiers","generateHwKey","generateSwKey","createOrganisation","id","OrganisationAlreadyExists","then","Promise","all","err"],"sources":["core-init.ts"],"sourcesContent":["import { ONECore, OneError } from '@procivis/react-native-one-core';\nimport { useCallback } from 'react';\n\nimport { reportException } from '../../reporting';\nimport { useONECore } from './core-context';\nimport { OneErrorCode } from './error-code';\n\nexport const SW_DID_NAME_PREFIX = 'holder-did-sw-key';\nexport const HW_DID_NAME_PREFIX = 'holder-did-hw-key';\n\nconst generateHwDid = async (core: ONECore, organisationId: string) => {\n const hwKeyId = await core\n .generateKey({\n keyParams: {},\n keyType: 'ECDSA',\n name: 'holder-key-hw',\n organisationId,\n storageParams: {},\n storageType: 'SECURE_ELEMENT',\n })\n .catch((e) => {\n // ignore if HW keys not supported by device\n if (e instanceof OneError && e.code === OneErrorCode.KeyStorageNotSupported) {\n return null;\n }\n throw e;\n });\n\n if (hwKeyId) {\n return core.createDid({\n didMethod: 'KEY',\n keys: {\n assertionMethod: [hwKeyId],\n authentication: [hwKeyId],\n capabilityDelegation: [hwKeyId],\n capabilityInvocation: [hwKeyId],\n keyAgreement: [hwKeyId],\n },\n name: HW_DID_NAME_PREFIX,\n organisationId,\n params: {},\n });\n }\n\n return null;\n};\n\nconst generateSwDid = async (core: ONECore, organisationId: string) => {\n const swKeyId = await core.generateKey({\n keyParams: {},\n keyType: 'ECDSA',\n name: 'holder-key-sw',\n organisationId,\n storageParams: {},\n storageType: 'INTERNAL',\n });\n\n return core.createDid({\n didMethod: 'KEY',\n keys: {\n assertionMethod: [swKeyId],\n authentication: [swKeyId],\n capabilityDelegation: [swKeyId],\n capabilityInvocation: [swKeyId],\n keyAgreement: [swKeyId],\n },\n name: SW_DID_NAME_PREFIX,\n organisationId,\n params: {},\n });\n};\n\nexport interface IdentifiersInitializationConfig {\n generateHwKey: boolean;\n generateSwKey: boolean;\n}\n\n/**\n * Create base local identifiers\n * @param {IdentifiersInitializationConfig} config Select desired keys/dids to be created\n * @returns [hwDidId, swDidId]\n */\nexport const useInitializeONECoreIdentifiers = ({ generateHwKey, generateSwKey }: IdentifiersInitializationConfig) => {\n const { core, organisationId } = useONECore();\n\n return useCallback(async () => {\n return await core\n .createOrganisation({ id: organisationId })\n .catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.OrganisationAlreadyExists) {\n return;\n }\n throw e;\n })\n .then(() =>\n Promise.all([\n generateHwKey ? generateHwDid(core, organisationId) : null,\n generateSwKey ? generateSwDid(core, organisationId) : null,\n ]),\n )\n .catch((err) => {\n reportException(err, 'Failed to create base identifiers');\n throw err;\n });\n }, [core, organisationId, generateHwKey, generateSwKey]);\n};\n"],"mappings":"AAAA,SAAkBA,QAAQ,QAAQ,iCAAiC;AACnE,SAASC,WAAW,QAAQ,OAAO;AAEnC,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,YAAY,QAAQ,cAAc;AAE3C,OAAO,MAAMC,kBAAkB,GAAG,mBAAmB;AACrD,OAAO,MAAMC,kBAAkB,GAAG,mBAAmB;AAErD,MAAMC,aAAa,GAAG,MAAAA,CAAOC,IAAa,EAAEC,cAAsB,KAAK;EACrE,MAAMC,OAAO,GAAG,MAAMF,IAAI,CACvBG,WAAW,CAAC;IACXC,SAAS,EAAE,CAAC,CAAC;IACbC,OAAO,EAAE,OAAO;IAChBC,IAAI,EAAE,eAAe;IACrBL,cAAc;IACdM,aAAa,EAAE,CAAC,CAAC;IACjBC,WAAW,EAAE;EACf,CAAC,CAAC,CACDC,KAAK,CAAEC,CAAC,IAAK;IACZ;IACA,IAAIA,CAAC,YAAYlB,QAAQ,IAAIkB,CAAC,CAACC,IAAI,KAAKf,YAAY,CAACgB,sBAAsB,EAAE;MAC3E,OAAO,IAAI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,KAAK;EACpH,MAAM;IAAE1B,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,CAAC,CAAC;EAE7C,OAAOF,WAAW,CAAC,YAAY;IAC7B,OAAO,MAAMO,IAAI,CACd2B,kBAAkB,CAAC;MAAEC,EAAE,EAAE3B;IAAe,CAAC,CAAC,CAC1CQ,KAAK,CAAEC,CAAC,IAAK;MACZ,IAAIA,CAAC,YAAYlB,QAAQ,IAAIkB,CAAC,CAACC,IAAI,KAAKf,YAAY,CAACiC,yBAAyB,EAAE;QAC9E;MACF;MACA,MAAMnB,CAAC;IACT,CAAC,CAAC,CACDoB,IAAI,CAAC,MACJC,OAAO,CAACC,GAAG,CAAC,CACVP,aAAa,GAAG1B,aAAa,CAACC,IAAI,EAAEC,cAAc,CAAC,GAAG,IAAI,EAC1DyB,aAAa,GAAGJ,aAAa,CAACtB,IAAI,EAAEC,cAAc,CAAC,GAAG,IAAI,CAC3D,CACH,CAAC,CACAQ,KAAK,CAAEwB,GAAG,IAAK;MACdvC,eAAe,CAACuC,GAAG,EAAE,mCAAmC,CAAC;MACzD,MAAMA,GAAG;IACX,CAAC,CAAC;EACN,CAAC,EAAE,CAACjC,IAAI,EAAEC,cAAc,EAAEwB,aAAa,EAAEC,aAAa,CAAC,CAAC;AAC1D,CAAC","ignoreList":[]}
|
|
@@ -13,22 +13,16 @@ export const useCredentialSchemas = queryParams => {
|
|
|
13
13
|
core,
|
|
14
14
|
organisationId
|
|
15
15
|
} = useONECore();
|
|
16
|
-
return useInfiniteQuery([CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)],
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
let {
|
|
27
|
-
values
|
|
28
|
-
} = _ref2;
|
|
29
|
-
return values;
|
|
30
|
-
});
|
|
31
|
-
}, {
|
|
16
|
+
return useInfiniteQuery([CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)], ({
|
|
17
|
+
pageParam = 0
|
|
18
|
+
}) => core.getCredentialSchemas({
|
|
19
|
+
organisationId,
|
|
20
|
+
page: pageParam,
|
|
21
|
+
pageSize: PAGE_SIZE,
|
|
22
|
+
...queryParams
|
|
23
|
+
}).then(({
|
|
24
|
+
values
|
|
25
|
+
}) => values), {
|
|
32
26
|
getNextPageParam: (lastPage, allPages) => lastPage.length === PAGE_SIZE ? allPages.length : undefined,
|
|
33
27
|
keepPreviousData: true
|
|
34
28
|
});
|
|
@@ -60,8 +54,7 @@ export const useCredentialSchemaAccept = () => {
|
|
|
60
54
|
}
|
|
61
55
|
});
|
|
62
56
|
};
|
|
63
|
-
export const useCredentialSchemaDetail =
|
|
64
|
-
let active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
57
|
+
export const useCredentialSchemaDetail = (credentialId, active = true) => {
|
|
65
58
|
const {
|
|
66
59
|
core
|
|
67
60
|
} = useONECore();
|
|
@@ -78,7 +71,7 @@ export const useCredentialSchemaDelete = () => {
|
|
|
78
71
|
return useMutation(async credentialSchemaId => core.deleteCredentialSchema(credentialSchemaId), {
|
|
79
72
|
onSuccess: async (_, credentialId) => {
|
|
80
73
|
await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);
|
|
81
|
-
await queryClient.
|
|
74
|
+
await queryClient.removeQueries([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId]);
|
|
82
75
|
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
83
76
|
}
|
|
84
77
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromCredentialSchemaListQueryParams","useHTTPClient","useONECore","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY","CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY","CREDENTIAL_SCHEMA_SHARE_QUERY_KEY","useCredentialSchemas","queryParams","core","organisationId","
|
|
1
|
+
{"version":3,"names":["useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromCredentialSchemaListQueryParams","useHTTPClient","useONECore","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY","CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY","CREDENTIAL_SCHEMA_SHARE_QUERY_KEY","useCredentialSchemas","queryParams","core","organisationId","pageParam","getCredentialSchemas","page","pageSize","then","values","getNextPageParam","lastPage","allPages","length","undefined","keepPreviousData","useCredentialSchemaPreview","url","httpClient","get","response","ok","originalError","data","useCredentialSchemaAccept","queryClient","schema","importCredentialSchema","onSuccess","invalidateQueries","useCredentialSchemaDetail","credentialId","active","getCredentialSchema","enabled","Boolean","useCredentialSchemaDelete","credentialSchemaId","deleteCredentialSchema","_","removeQueries","useShareCredentialSchema","schemaId","shareCredentialSchema","Promise","reject"],"sources":["credential-schemas.ts"],"sourcesContent":["import { CredentialSchemaListQuery, ImportCredentialSchemaRequestSchema } from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromCredentialSchemaListQueryParams } from '../../parsers/query';\nimport { useHTTPClient } from '../http/client';\nimport { useONECore } from './core-context';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 10;\nexport const CREDENTIAL_SCHEMA_LIST_QUERY_KEY = 'credential-schema-list';\nexport const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';\nexport const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';\nexport const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';\n\nexport const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)],\n ({ pageParam = 0 }) =>\n core\n .getCredentialSchemas({\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: true,\n },\n );\n};\n\nexport const useCredentialSchemaPreview = (url: string) => {\n const httpClient = useHTTPClient();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY, url],\n () =>\n httpClient.get(url).then((response) => {\n if (!response.ok) {\n throw response.originalError;\n }\n return response.data as ImportCredentialSchemaRequestSchema;\n }),\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaAccept = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async (schema: ImportCredentialSchemaRequestSchema) =>\n core.importCredentialSchema({\n organisationId,\n schema,\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialSchemaDetail = (credentialId: string | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId],\n () => (credentialId ? core.getCredentialSchema(credentialId) : undefined),\n {\n enabled: active && Boolean(credentialId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialSchemaId: string) => core.deleteCredentialSchema(credentialSchemaId), {\n onSuccess: async (_, credentialId) => {\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n await queryClient.removeQueries([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useShareCredentialSchema = (schemaId?: string) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_SHARE_QUERY_KEY, schemaId],\n () => (schemaId ? core.shareCredentialSchema(schemaId) : Promise.reject()),\n {\n enabled: Boolean(schemaId),\n keepPreviousData: true,\n },\n );\n};\n"],"mappings":"AACA,SAASA,gBAAgB,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,aAAa;AAErF,SAASC,8CAA8C,QAAQ,qBAAqB;AACpF,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,sBAAsB,QAAQ,WAAW;AAElD,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,gCAAgC,GAAG,wBAAwB;AACxE,OAAO,MAAMC,kCAAkC,GAAG,0BAA0B;AAC5E,OAAO,MAAMC,mCAAmC,GAAG,2BAA2B;AAC9E,OAAO,MAAMC,iCAAiC,GAAG,yBAAyB;AAE1E,OAAO,MAAMC,oBAAoB,GAAIC,WAAgD,IAAK;EACxF,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGV,UAAU,CAAC,CAAC;EAE7C,OAAON,gBAAgB,CACrB,CAACS,gCAAgC,EAAE,GAAGL,8CAA8C,CAACU,WAAW,CAAC,CAAC,EAClG,CAAC;IAAEG,SAAS,GAAG;EAAE,CAAC,KAChBF,IAAI,CACDG,oBAAoB,CAAC;IACpBF,cAAc;IACdG,IAAI,EAAEF,SAAS;IACfG,QAAQ,EAAEZ,SAAS;IACnB,GAAGM;EACL,CAAC,CAAC,CACDO,IAAI,CAAC,CAAC;IAAE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REDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';
|
|
|
6
6
|
import { OneErrorCode } from './error-code';
|
|
7
7
|
import { HISTORY_LIST_QUERY_KEY } from './history';
|
|
8
8
|
const PAGE_SIZE = 20;
|
|
9
|
-
const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';
|
|
10
|
-
const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';
|
|
11
|
-
const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';
|
|
9
|
+
export const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';
|
|
10
|
+
export const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';
|
|
11
|
+
export const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';
|
|
12
12
|
export const useCredentials = queryParams => {
|
|
13
13
|
const {
|
|
14
14
|
core,
|
|
@@ -35,24 +35,20 @@ export const usePagedCredentials = queryParams => {
|
|
|
35
35
|
core,
|
|
36
36
|
organisationId
|
|
37
37
|
} = useONECore();
|
|
38
|
-
return useInfiniteQuery([CREDENTIAL_LIST_QUERY_KEY, CREDENTIAL_LIST_PAGED_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)],
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
...queryParams
|
|
48
|
-
});
|
|
49
|
-
}, {
|
|
38
|
+
return useInfiniteQuery([CREDENTIAL_LIST_QUERY_KEY, CREDENTIAL_LIST_PAGED_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)], ({
|
|
39
|
+
pageParam = 0
|
|
40
|
+
}) => core.getCredentials({
|
|
41
|
+
organisationId,
|
|
42
|
+
page: pageParam,
|
|
43
|
+
pageSize: PAGE_SIZE,
|
|
44
|
+
status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],
|
|
45
|
+
...queryParams
|
|
46
|
+
}), {
|
|
50
47
|
getNextPageParam: (lastPage, allPages) => allPages.length < lastPage.totalPages ? allPages.length : undefined,
|
|
51
48
|
keepPreviousData: true
|
|
52
49
|
});
|
|
53
50
|
};
|
|
54
|
-
export const useCredentialDetail =
|
|
55
|
-
let active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
51
|
+
export const useCredentialDetail = (credentialId, active = true) => {
|
|
56
52
|
const {
|
|
57
53
|
core
|
|
58
54
|
} = useONECore();
|
|
@@ -67,13 +63,10 @@ export const useInvitationHandler = () => {
|
|
|
67
63
|
core,
|
|
68
64
|
organisationId
|
|
69
65
|
} = useONECore();
|
|
70
|
-
return useMutation(async
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
} = _ref2;
|
|
75
|
-
return core.handleInvitation(invitationUrl, organisationId, [transport]);
|
|
76
|
-
}, {
|
|
66
|
+
return useMutation(async ({
|
|
67
|
+
invitationUrl,
|
|
68
|
+
transport
|
|
69
|
+
}) => core.handleInvitation(invitationUrl, organisationId, [transport]), {
|
|
77
70
|
onSuccess: async result => {
|
|
78
71
|
if ('credentialIds' in result) {
|
|
79
72
|
await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
|
|
@@ -88,15 +81,12 @@ export const useCredentialAccept = () => {
|
|
|
88
81
|
const {
|
|
89
82
|
core
|
|
90
83
|
} = useONECore();
|
|
91
|
-
return useMutation(async
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} = _ref3;
|
|
98
|
-
return core.holderAcceptCredential(interactionId, didId, keyId, txCode);
|
|
99
|
-
}, {
|
|
84
|
+
return useMutation(async ({
|
|
85
|
+
interactionId,
|
|
86
|
+
didId,
|
|
87
|
+
keyId,
|
|
88
|
+
txCode
|
|
89
|
+
}) => core.holderAcceptCredential(interactionId, didId, keyId, txCode), {
|
|
100
90
|
onSuccess: async () => {
|
|
101
91
|
await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
|
|
102
92
|
await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);
|
|
@@ -122,12 +112,12 @@ export const useCredentialReject = () => {
|
|
|
122
112
|
}
|
|
123
113
|
});
|
|
124
114
|
};
|
|
125
|
-
export const useCredentialRevocationCheck =
|
|
115
|
+
export const useCredentialRevocationCheck = forceRefresh => {
|
|
126
116
|
const queryClient = useQueryClient();
|
|
127
117
|
const {
|
|
128
118
|
core
|
|
129
119
|
} = useONECore();
|
|
130
|
-
return useMutation(async credentialIds => core.checkRevocation(credentialIds,
|
|
120
|
+
return useMutation(async credentialIds => core.checkRevocation(credentialIds, forceRefresh), {
|
|
131
121
|
onSuccess: async () => {
|
|
132
122
|
await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
|
|
133
123
|
await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);
|
|
@@ -143,7 +133,7 @@ export const useCredentialDelete = () => {
|
|
|
143
133
|
return useMutation(async credentialId => core.deleteCredential(credentialId), {
|
|
144
134
|
onSuccess: async (_, credentialId) => {
|
|
145
135
|
await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
|
|
146
|
-
await queryClient.
|
|
136
|
+
await queryClient.removeQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);
|
|
147
137
|
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
148
138
|
}
|
|
149
139
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CredentialStateEnum","OneError","useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromCredentialListQueryParams","useONECore","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","OneErrorCode","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","CREDENTIAL_LIST_QUERY_KEY","CREDENTIAL_LIST_PAGED_QUERY_KEY","CREDENTIAL_DETAIL_QUERY_KEY","useCredentials","queryParams","core","organisationId","values","getCredentials","page","pageSize","status","ACCEPTED","SUSPENDED","REVOKED","keepPreviousData","usePagedCredentials","_ref","pageParam","getNextPageParam","lastPage","allPages","length","totalPages","undefined","useCredentialDetail","credentialId","active","arguments","getCredential","enabled","Boolean","useInvitationHandler","queryClient","_ref2","invitationUrl","transport","handleInvitation","onSuccess","result","invalidateQueries","useCredentialAccept","_ref3","interactionId","didId","keyId","txCode","holderAcceptCredential","useCredentialReject","holderRejectCredential","catch","e","code","OperationNotSupported","useCredentialRevocationCheck","bypassCache","credentialIds","checkRevocation","useCredentialDelete","deleteCredential","_","useInvalidateCredentialDetails"],"sources":["credentials.ts"],"sourcesContent":["import {\n BypassCache,\n CredentialListQuery,\n CredentialStateEnum,\n InvitationResult,\n OneError,\n} from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromCredentialListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\nimport { CREDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';\nimport { OneErrorCode } from './error-code';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 20;\nconst CREDENTIAL_LIST_QUERY_KEY = 'credential-list';\nconst CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';\nconst CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';\n\nexport const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useQuery(\n [CREDENTIAL_LIST_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)],\n async () => {\n const { values } = await core.getCredentials({\n organisationId,\n page: 0,\n // TODO: workaround pagination for now, until it's supported by UI\n pageSize: 10000,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],\n ...queryParams,\n });\n return values;\n },\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const usePagedCredentials = (queryParams?: Partial<CredentialListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [\n CREDENTIAL_LIST_QUERY_KEY,\n CREDENTIAL_LIST_PAGED_QUERY_KEY,\n ...getQueryKeyFromCredentialListQueryParams(queryParams),\n ],\n ({ pageParam = 0 }) =>\n core.getCredentials({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],\n ...queryParams,\n }),\n {\n getNextPageParam: (lastPage, allPages) => (allPages.length < lastPage.totalPages ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialDetail = (credentialId: string | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_DETAIL_QUERY_KEY, credentialId],\n () => (credentialId ? core.getCredential(credentialId) : undefined),\n {\n enabled: active && Boolean(credentialId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useInvitationHandler = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async ({ invitationUrl, transport }: { invitationUrl: string; transport: 'HTTP' | 'MQTT' | 'BLE' }) =>\n core.handleInvitation(invitationUrl, organisationId, [transport]),\n {\n onSuccess: async (result: InvitationResult) => {\n if ('credentialIds' in result) {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n }\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialAccept = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n type CredentialAcceptHookParams = { didId: string; interactionId: string; keyId?: string; txCode?: string };\n\n return useMutation(\n async ({ interactionId, didId, keyId, txCode }: CredentialAcceptHookParams) =>\n core.holderAcceptCredential(interactionId, didId, keyId, txCode),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialReject = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async (interactionId: string) =>\n core.holderRejectCredential(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(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialRevocationCheck = (bypassCache?: BypassCache[]) => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialIds: string[]) => core.checkRevocation(credentialIds, bypassCache), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useCredentialDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialId: string) => core.deleteCredential(credentialId), {\n onSuccess: async (_, credentialId) => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useInvalidateCredentialDetails = () => {\n const queryClient = useQueryClient();\n\n return (credentialId: string | undefined) =>\n queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);\n};\n"],"mappings":"AAAA,SAGEA,mBAAmB,EAEnBC,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xC,yBAAyB,CAAC;MAC9D,MAAMiC,WAAW,CAACO,iBAAiB,CAAC,CAACtC,2BAA2B,EAAEwB,YAAY,CAAC,CAAC;MAChF,MAAMO,WAAW,CAACO,iBAAiB,CAAC1C,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAM+D,8BAA8B,GAAGA,CAAA,KAAM;EAClD,MAAM5B,WAAW,GAAGxC,cAAc,EAAE;EAEpC,OAAQiC,YAAgC,IACtCO,WAAW,CAACO,iBAAiB,CAAC,CAACtC,2BAA2B,EAAEwB,YAAY,CAAC,CAAC;AAC9E,CAAC"}
|
|
1
|
+
{"version":3,"names":["CredentialStateEnum","OneError","useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromCredentialListQueryParams","useONECore","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","OneErrorCode","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","CREDENTIAL_LIST_QUERY_KEY","CREDENTIAL_LIST_PAGED_QUERY_KEY","CREDENTIAL_DETAIL_QUERY_KEY","useCredentials","queryParams","core","organisationId","values","getCredentials","page","pageSize","status","ACCEPTED","SUSPENDED","REVOKED","keepPreviousData","usePagedCredentials","pageParam","getNextPageParam","lastPage","allPages","length","totalPages","undefined","useCredentialDetail","credentialId","active","getCredential","enabled","Boolean","useInvitationHandler","queryClient","invitationUrl","transport","handleInvitation","onSuccess","result","invalidateQueries","useCredentialAccept","interactionId","didId","keyId","txCode","holderAcceptCredential","useCredentialReject","holderRejectCredential","catch","e","code","OperationNotSupported","useCredentialRevocationCheck","forceRefresh","credentialIds","checkRevocation","useCredentialDelete","deleteCredential","_","removeQueries","useInvalidateCredentialDetails"],"sources":["credentials.ts"],"sourcesContent":["import { CredentialListQuery, CredentialStateEnum, InvitationResult, OneError } from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromCredentialListQueryParams } from '../../parsers/query';\nimport { Transport } from '../connectivity/connectivity';\nimport { useONECore } from './core-context';\nimport { CREDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';\nimport { OneErrorCode } from './error-code';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 20;\nexport const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';\nexport const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';\nexport const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';\n\nexport const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useQuery(\n [CREDENTIAL_LIST_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)],\n async () => {\n const { values } = await core.getCredentials({\n organisationId,\n page: 0,\n // TODO: workaround pagination for now, until it's supported by UI\n pageSize: 10000,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],\n ...queryParams,\n });\n return values;\n },\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const usePagedCredentials = (queryParams?: Partial<CredentialListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [\n CREDENTIAL_LIST_QUERY_KEY,\n CREDENTIAL_LIST_PAGED_QUERY_KEY,\n ...getQueryKeyFromCredentialListQueryParams(queryParams),\n ],\n ({ pageParam = 0 }) =>\n core.getCredentials({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],\n ...queryParams,\n }),\n {\n getNextPageParam: (lastPage, allPages) => (allPages.length < lastPage.totalPages ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialDetail = (credentialId: string | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_DETAIL_QUERY_KEY, credentialId],\n () => (credentialId ? core.getCredential(credentialId) : undefined),\n {\n enabled: active && Boolean(credentialId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useInvitationHandler = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async ({ invitationUrl, transport }: { invitationUrl: string; transport: Transport }) =>\n core.handleInvitation(invitationUrl, organisationId, [transport]),\n {\n onSuccess: async (result: InvitationResult) => {\n if ('credentialIds' in result) {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n }\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialAccept = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n type CredentialAcceptHookParams = { didId: string; interactionId: string; keyId?: string; txCode?: string };\n\n return useMutation(\n async ({ interactionId, didId, keyId, txCode }: CredentialAcceptHookParams) =>\n core.holderAcceptCredential(interactionId, didId, keyId, txCode),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialReject = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async (interactionId: string) =>\n core.holderRejectCredential(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(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialRevocationCheck = (forceRefresh: boolean) => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialIds: string[]) => core.checkRevocation(credentialIds, forceRefresh), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useCredentialDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialId: string) => core.deleteCredential(credentialId), {\n onSuccess: async (_, credentialId) => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.removeQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useInvalidateCredentialDetails = () => {\n const queryClient = useQueryClient();\n\n return (credentialId: string | undefined) =>\n queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);\n};\n"],"mappings":"AAAA,SAA8BA,mBAAmB,EAAoBC,QAAQ,QAAQ,iCAAiC;AACtH,SAASC,gBAAgB,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,aAAa;AAErF,SAASC,wCAAwC,QAAQ,qBAAqB;AAE9E,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,gCAAgC,QAAQ,sBAAsB;AACvE,SAASC,YAAY,QAAQ,cAAc;AAC3C,SAASC,sBAAsB,QAAQ,WAAW;AAElD,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,yBAAyB,GAAG,iBAAiB;AAC1D,OAAO,MAAMC,+BAA+B,GAAG,uBAAuB;AACtE,OAAO,MAAMC,2BAA2B,GAAG,mBAAmB;AAE9D,OAAO,MAAMC,cAAc,GAAIC,WAA0C,IAAK;EAC5E,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGX,UAAU,CAAC,CAAC;EAE7C,OAAOH,QAAQ,CACb,CAACQ,yBAAyB,EAAE,GAAGN,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CAACrC,yBAAyB,CAAC;MAC9D,MAAM+B,WAAW,CAACM,iBAAiB,CAACnC,2BAA2B,CAAC;MAChE,MAAM6B,WAAW,CAACM,iBAAiB,CAACvC,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAMwD,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAMvB,WAAW,GAAGtC,cAAc,CAAC,CAAC;EACpC,MAAM;IAAEY;EAAK,CAAC,GAAGV,UAAU,CAAC,CAAC;EAE7B,OAAOJ,WAAW,CAAC,MAAOkC,YAAoB,IAAKpB,IAAI,CAACkD,gBAAgB,CAAC9B,YAAY,CAAC,EAAE;IACtFU,SAAS,EAAE,MAAAA,CAAOqB,CAAC,EAAE/B,YAAY,KAAK;MACpC,MAAMM,WAAW,CAACM,iBAAiB,CAACrC,yBAAyB,CAAC;MAC9D,MAAM+B,WAAW,CAAC0B,aAAa,CAAC,CAACvD,2BAA2B,EAAEuB,YAAY,CAAC,CAAC;MAC5E,MAAMM,WAAW,CAACM,iBAAiB,CAACvC,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAM4D,8BAA8B,GAAGA,CAAA,KAAM;EAClD,MAAM3B,WAAW,GAAGtC,cAAc,CAAC,CAAC;EAEpC,OAAQgC,YAAgC,IACtCM,WAAW,CAACM,iBAAiB,CAAC,CAACnC,2BAA2B,EAAEuB,YAAY,CAAC,CAAC;AAC9E,CAAC","ignoreList":[]}
|
|
@@ -9,10 +9,9 @@ export const useDids = queryParams => {
|
|
|
9
9
|
core,
|
|
10
10
|
organisationId
|
|
11
11
|
} = useONECore();
|
|
12
|
-
return useQuery([DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)], async
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
12
|
+
return useQuery([DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)], async ({
|
|
13
|
+
pageParam = 0
|
|
14
|
+
}) => {
|
|
16
15
|
const dids = await core.getDids({
|
|
17
16
|
deactivated: false,
|
|
18
17
|
organisationId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DidTypeEnum","useQuery","getQueryKeyFromDidListQueryParams","useONECore","PAGE_SIZE","DID_LIST_QUERY_KEY","useDids","queryParams","core","organisationId","
|
|
1
|
+
{"version":3,"names":["DidTypeEnum","useQuery","getQueryKeyFromDidListQueryParams","useONECore","PAGE_SIZE","DID_LIST_QUERY_KEY","useDids","queryParams","core","organisationId","pageParam","dids","getDids","deactivated","page","pageSize","type","LOCAL"],"sources":["dids.ts"],"sourcesContent":["import { DidListQuery, DidTypeEnum } from '@procivis/react-native-one-core';\nimport { useQuery } from 'react-query';\n\nimport { getQueryKeyFromDidListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\n\nconst PAGE_SIZE = 20;\nexport const DID_LIST_QUERY_KEY = 'did-list';\n\nexport const useDids = (queryParams?: Partial<DidListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useQuery(\n [DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)],\n async ({ pageParam = 0 }) => {\n const dids = await core.getDids({\n deactivated: false,\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n type: DidTypeEnum.LOCAL,\n ...queryParams,\n });\n\n return dids;\n },\n );\n};\n"],"mappings":"AAAA,SAAuBA,WAAW,QAAQ,iCAAiC;AAC3E,SAASC,QAAQ,QAAQ,aAAa;AAEtC,SAASC,iCAAiC,QAAQ,qBAAqB;AACvE,SAASC,UAAU,QAAQ,gBAAgB;AAE3C,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,kBAAkB,GAAG,UAAU;AAE5C,OAAO,MAAMC,OAAO,GAAIC,WAAmC,IAAK;EAC9D,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,CAAC,CAAC;EAE7C,OAAOF,QAAQ,CACb,CAACI,kBAAkB,EAAE,GAAGH,iCAAiC,CAACK,WAAW,CAAC,CAAC,EACvE,OAAO;IAAEG,SAAS,GAAG;EAAE,CAAC,KAAK;IAC3B,MAAMC,IAAI,GAAG,MAAMH,IAAI,CAACI,OAAO,CAAC;MAC9BC,WAAW,EAAE,KAAK;MAClBJ,cAAc;MACdK,IAAI,EAAEJ,SAAS;MACfK,QAAQ,EAAEX,SAAS;MACnBY,IAAI,EAAEhB,WAAW,CAACiB,KAAK;MACvB,GAAGV;IACL,CAAC,CAAC;IAEF,OAAOI,IAAI;EACb,CACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export let OneErrorCode
|
|
2
|
-
(function (OneErrorCode) {
|
|
1
|
+
export let OneErrorCode = /*#__PURE__*/function (OneErrorCode) {
|
|
3
2
|
OneErrorCode["OrganisationAlreadyExists"] = "BR_0023";
|
|
4
3
|
OneErrorCode["KeyStorageNotSupported"] = "BR_0039";
|
|
5
4
|
OneErrorCode["OperationNotSupported"] = "BR_0062";
|
|
6
5
|
OneErrorCode["NoTrustEntityFound"] = "BR_0186";
|
|
7
|
-
|
|
6
|
+
return OneErrorCode;
|
|
7
|
+
}({});
|
|
8
8
|
//# sourceMappingURL=error-code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["OneErrorCode"],"sources":["error-code.ts"],"sourcesContent":["export enum OneErrorCode {\n OrganisationAlreadyExists = 'BR_0023',\n KeyStorageNotSupported = 'BR_0039',\n OperationNotSupported = 'BR_0062',\n NoTrustEntityFound = 'BR_0186',\n}\n"],"mappings":"AAAA,WAAYA,YAAY
|
|
1
|
+
{"version":3,"names":["OneErrorCode"],"sources":["error-code.ts"],"sourcesContent":["export enum OneErrorCode {\n OrganisationAlreadyExists = 'BR_0023',\n KeyStorageNotSupported = 'BR_0039',\n OperationNotSupported = 'BR_0062',\n NoTrustEntityFound = 'BR_0186',\n}\n"],"mappings":"AAAA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { HistoryEntityTypeEnum } from '@procivis/react-native-one-core';
|
|
2
1
|
import { useInfiniteQuery } from 'react-query';
|
|
3
2
|
import { getQueryKeyFromHistoryListQueryParams } from '../../parsers/query';
|
|
4
3
|
import { useONECore } from './core-context';
|
|
@@ -9,46 +8,16 @@ export const useHistory = queryParams => {
|
|
|
9
8
|
core,
|
|
10
9
|
organisationId
|
|
11
10
|
} = useONECore();
|
|
12
|
-
return useInfiniteQuery([HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)], async
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} = _ref;
|
|
11
|
+
return useInfiniteQuery([HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)], async ({
|
|
12
|
+
pageParam = 0
|
|
13
|
+
}) => {
|
|
16
14
|
const historyPage = await core.getHistory({
|
|
17
15
|
organisationId,
|
|
18
16
|
page: pageParam,
|
|
19
17
|
pageSize: PAGE_SIZE,
|
|
20
18
|
...queryParams
|
|
21
19
|
});
|
|
22
|
-
|
|
23
|
-
const proofIds = Array.from(new Set(historyPage.values.filter(historyItem => historyItem.entityType === HistoryEntityTypeEnum.PROOF).map(historyItem => historyItem.entityId)));
|
|
24
|
-
const credentials = await core.getCredentials({
|
|
25
|
-
ids: credentialIds,
|
|
26
|
-
organisationId,
|
|
27
|
-
page: 0,
|
|
28
|
-
pageSize: credentialIds.length
|
|
29
|
-
});
|
|
30
|
-
const credentialDidsMap = Object.assign({}, ...credentials.values.map(credential => ({
|
|
31
|
-
[credential.id]: credential.issuerDid
|
|
32
|
-
})));
|
|
33
|
-
const proofs = await Promise.all(proofIds.map(id => core.getProof(id)));
|
|
34
|
-
const proofDidsMap = Object.assign({}, ...proofs.map(proof => {
|
|
35
|
-
var _proof$verifierDid;
|
|
36
|
-
return {
|
|
37
|
-
[proof.id]: (_proof$verifierDid = proof.verifierDid) === null || _proof$verifierDid === void 0 ? void 0 : _proof$verifierDid.did
|
|
38
|
-
};
|
|
39
|
-
}));
|
|
40
|
-
const result = {
|
|
41
|
-
totalItems: historyPage.totalItems,
|
|
42
|
-
totalPages: historyPage.totalPages,
|
|
43
|
-
values: historyPage.values.map(item => {
|
|
44
|
-
const did = item.entityType === HistoryEntityTypeEnum.CREDENTIAL ? credentialDidsMap[item.entityId] : proofDidsMap[item.entityId];
|
|
45
|
-
return {
|
|
46
|
-
...item,
|
|
47
|
-
did
|
|
48
|
-
};
|
|
49
|
-
})
|
|
50
|
-
};
|
|
51
|
-
return result;
|
|
20
|
+
return historyPage;
|
|
52
21
|
}, {
|
|
53
22
|
getNextPageParam: (lastPage, allPages) => allPages.length < lastPage.totalPages ? allPages.length : undefined,
|
|
54
23
|
keepPreviousData: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useInfiniteQuery","getQueryKeyFromHistoryListQueryParams","useONECore","PAGE_SIZE","HISTORY_LIST_QUERY_KEY","useHistory","queryParams","core","organisationId","pageParam","historyPage","getHistory","page","pageSize","getNextPageParam","lastPage","allPages","length","totalPages","undefined","keepPreviousData"],"sources":["history.ts"],"sourcesContent":["import { HistoryListQuery } from '@procivis/react-native-one-core';\nimport { useInfiniteQuery } from 'react-query';\n\nimport { getQueryKeyFromHistoryListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\n\nconst PAGE_SIZE = 20;\nexport const HISTORY_LIST_QUERY_KEY = 'history-list';\n\nexport const useHistory = (queryParams?: Partial<HistoryListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)],\n async ({ pageParam = 0 }) => {\n const historyPage = await core.getHistory({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n });\n\n return historyPage;\n },\n {\n getNextPageParam: (lastPage, allPages) => (allPages.length < lastPage.totalPages ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n"],"mappings":"AACA,SAASA,gBAAgB,QAAQ,aAAa;AAE9C,SAASC,qCAAqC,QAAQ,qBAAqB;AAC3E,SAASC,UAAU,QAAQ,gBAAgB;AAE3C,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,sBAAsB,GAAG,cAAc;AAEpD,OAAO,MAAMC,UAAU,GAAIC,WAAuC,IAAK;EACrE,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,CAAC,CAAC;EAE7C,OAAOF,gBAAgB,CACrB,CAACI,sBAAsB,EAAE,GAAGH,qCAAqC,CAACK,WAAW,CAAC,CAAC,EAC/E,OAAO;IAAEG,SAAS,GAAG;EAAE,CAAC,KAAK;IAC3B,MAAMC,WAAW,GAAG,MAAMH,IAAI,CAACI,UAAU,CAAC;MACxCH,cAAc;MACdI,IAAI,EAAEH,SAAS;MACfI,QAAQ,EAAEV,SAAS;MACnB,GAAGG;IACL,CAAC,CAAC;IAEF,OAAOI,WAAW;EACpB,CAAC,EACD;IACEI,gBAAgB,EAAEA,CAACC,QAAQ,EAAEC,QAAQ,KAAMA,QAAQ,CAACC,MAAM,GAAGF,QAAQ,CAACG,UAAU,GAAGF,QAAQ,CAACC,MAAM,GAAGE,SAAU;IAC/GC,gBAAgB,EAAE;EACpB,CACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './backup';\nexport * from './core-config';\nexport * from './core-context';\nexport * from './core-init';\nexport * from './credential-schemas';\nexport * from './credentials';\nexport * from './dids';\nexport * from './history';\nexport * from './proof-schemas';\nexport * from './proofs';\nexport * from './query';\nexport * from './trust-entity';\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,gBAAgB"}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './backup';\nexport * from './cache';\nexport * from './core-config';\nexport * from './core-context';\nexport * from './core-init';\nexport * from './credential-schemas';\nexport * from './credentials';\nexport * from './dids';\nexport * from './history';\nexport * from './proof-schemas';\nexport * from './proofs';\nexport * from './query';\nexport * from './trust-entity';\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,gBAAgB","ignoreList":[]}
|