@procivis/one-react-native-components 0.2.54 → 0.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -8
- package/lib/commonjs/components/backup/index.js.map +1 -1
- package/lib/commonjs/components/backup/preview-credentials.js +18 -22
- package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
- package/lib/commonjs/components/credential/credential.js +11 -12
- package/lib/commonjs/components/credential/credential.js.map +1 -1
- package/lib/commonjs/components/credential/index.js.map +1 -1
- package/lib/commonjs/components/entity/EntityButtons.js +20 -25
- package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-attributes.js +16 -18
- package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details-with-buttons.js +31 -23
- package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details.js +30 -31
- package/lib/commonjs/components/entity/entity-details.js.map +1 -1
- package/lib/commonjs/components/entity/index.js +2 -2
- package/lib/commonjs/components/entity/index.js.map +1 -1
- package/lib/commonjs/components/history/history-details-screen.js +67 -0
- package/lib/commonjs/components/history/history-details-screen.js.map +1 -0
- package/lib/commonjs/components/history/history-list-item-icon.js +97 -0
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -0
- package/lib/commonjs/components/history/history-list-item.js +55 -0
- package/lib/commonjs/components/history/history-list-item.js.map +1 -0
- package/lib/commonjs/components/history/history-list-screen.js +123 -0
- package/lib/commonjs/components/history/history-list-screen.js.map +1 -0
- package/lib/commonjs/components/history/history-list-section-header.js +39 -0
- package/lib/commonjs/components/history/history-list-section-header.js.map +1 -0
- package/lib/commonjs/components/history/history-list.js +100 -0
- package/lib/commonjs/components/history/history-list.js.map +1 -0
- package/lib/commonjs/components/history/index.js +72 -0
- package/lib/commonjs/components/history/index.js.map +1 -0
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/navigation/header-buttons.js +21 -25
- package/lib/commonjs/components/navigation/header-buttons.js.map +1 -1
- package/lib/commonjs/components/navigation/index.js.map +1 -1
- package/lib/commonjs/components/proof-request/group.js +4 -5
- package/lib/commonjs/components/proof-request/group.js.map +1 -1
- package/lib/commonjs/components/proof-request/index.js.map +1 -1
- package/lib/commonjs/components/proof-request/select-credential.js +11 -12
- package/lib/commonjs/components/proof-request/select-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/share-credential.js +25 -28
- package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/normalize-color.d.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibility.js +11 -7
- package/lib/commonjs/ui-components/accessibility/accessibility.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js +8 -12
- package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js +15 -17
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js +8 -10
- package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/index.js +1 -30
- package/lib/commonjs/ui-components/accessibility/index.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale/index.js +2 -3
- package/lib/commonjs/ui-components/accessibility/locale/index.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale.test.js.map +1 -1
- package/lib/commonjs/ui-components/action-modal/ActionModal.js +9 -11
- package/lib/commonjs/ui-components/action-modal/ActionModal.js.map +1 -1
- package/lib/commonjs/ui-components/action-modal/index.js +1 -1
- package/lib/commonjs/ui-components/action-modal/index.js.map +1 -1
- package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js +10 -12
- package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js.map +1 -1
- package/lib/commonjs/ui-components/activity-indicator/index.js +1 -1
- package/lib/commonjs/ui-components/activity-indicator/index.js.map +1 -1
- package/lib/commonjs/ui-components/blur/blur-view.js +13 -15
- package/lib/commonjs/ui-components/blur/blur-view.js.map +1 -1
- package/lib/commonjs/ui-components/blur/index.js +2 -2
- package/lib/commonjs/ui-components/blur/index.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/back-button.js +12 -15
- package/lib/commonjs/ui-components/buttons/back-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/button.js +19 -22
- package/lib/commonjs/ui-components/buttons/button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/connectivity-button.js +16 -18
- package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/filter-button.js +8 -10
- package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/ghost-button.js +12 -14
- package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/hold-button.js +244 -0
- package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -0
- package/lib/commonjs/ui-components/buttons/index.js +9 -37
- package/lib/commonjs/ui-components/buttons/index.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/scan-button.js +7 -9
- package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/commonjs/ui-components/camera/camera-overlay.js +11 -14
- package/lib/commonjs/ui-components/camera/camera-overlay.js.map +1 -1
- package/lib/commonjs/ui-components/camera/index.js +2 -2
- package/lib/commonjs/ui-components/camera/index.js.map +1 -1
- package/lib/commonjs/ui-components/camera/qr-code-scanner.js +12 -14
- package/lib/commonjs/ui-components/camera/qr-code-scanner.js.map +1 -1
- package/lib/commonjs/ui-components/control/checkbox.js +11 -12
- package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
- package/lib/commonjs/ui-components/control/index.js.map +1 -1
- package/lib/commonjs/ui-components/control/switch.js +10 -12
- package/lib/commonjs/ui-components/control/switch.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-card.js +22 -26
- package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +30 -35
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +27 -20
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-header.js +25 -24
- package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +27 -29
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/index.js +6 -41
- package/lib/commonjs/ui-components/credential/card/index.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js +51 -60
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js +18 -21
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/commonjs/ui-components/credential/index.js +2 -25
- package/lib/commonjs/ui-components/credential/index.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector-status.js +3 -4
- package/lib/commonjs/ui-components/credential/selector-status.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector.js +8 -10
- package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
- package/lib/commonjs/ui-components/detail/detail.js +12 -14
- package/lib/commonjs/ui-components/detail/detail.js.map +1 -1
- package/lib/commonjs/ui-components/detail/index.js +1 -1
- package/lib/commonjs/ui-components/detail/index.js.map +1 -1
- package/lib/commonjs/ui-components/entity/avatar.js +14 -16
- package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
- package/lib/commonjs/ui-components/entity/entity-cluster.js +16 -19
- package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/commonjs/ui-components/entity/index.js +2 -2
- package/lib/commonjs/ui-components/entity/index.js.map +1 -1
- package/lib/commonjs/ui-components/header/focus-aware-status-bar.js +3 -4
- package/lib/commonjs/ui-components/header/focus-aware-status-bar.js.map +1 -1
- package/lib/commonjs/ui-components/header/foldable-header.js +14 -17
- package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
- package/lib/commonjs/ui-components/header/header.js +12 -14
- package/lib/commonjs/ui-components/header/header.js.map +1 -1
- package/lib/commonjs/ui-components/header/index.js +4 -24
- package/lib/commonjs/ui-components/header/index.js.map +1 -1
- package/lib/commonjs/ui-components/header/navigation-header.js +27 -33
- package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/data-item.js +30 -23
- package/lib/commonjs/ui-components/history/data-item.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-details.js +181 -0
- package/lib/commonjs/ui-components/history/history-details.js.map +1 -0
- package/lib/commonjs/ui-components/history/{history-list-item.js → history-item.js} +47 -26
- package/lib/commonjs/ui-components/history/history-item.js.map +1 -0
- package/lib/commonjs/ui-components/history/history-section-header.js +7 -9
- package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js +13 -12
- package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/history/index.js +30 -9
- package/lib/commonjs/ui-components/history/index.js.map +1 -1
- package/lib/commonjs/ui-components/icons/connectivity.js +19 -24
- package/lib/commonjs/ui-components/icons/connectivity.js.map +1 -1
- package/lib/commonjs/ui-components/icons/credential.js +60 -71
- package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
- package/lib/commonjs/ui-components/icons/entity.js +36 -9
- package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
- package/lib/commonjs/ui-components/icons/history.js +115 -133
- package/lib/commonjs/ui-components/icons/history.js.map +1 -1
- package/lib/commonjs/ui-components/icons/icons.js +73 -90
- package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
- package/lib/commonjs/ui-components/icons/index.js.map +1 -1
- package/lib/commonjs/ui-components/icons/input.js +3 -3
- package/lib/commonjs/ui-components/icons/input.js.map +1 -1
- package/lib/commonjs/ui-components/icons/keypad.js +69 -81
- package/lib/commonjs/ui-components/icons/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/icons/loader.js +4 -4
- package/lib/commonjs/ui-components/icons/loader.js.map +1 -1
- package/lib/commonjs/ui-components/icons/nerd-view.js +6 -9
- package/lib/commonjs/ui-components/icons/nerd-view.js.map +1 -1
- package/lib/commonjs/ui-components/icons/selector.js +8 -9
- package/lib/commonjs/ui-components/icons/selector.js.map +1 -1
- package/lib/commonjs/ui-components/icons/wallet.js +16 -19
- package/lib/commonjs/ui-components/icons/wallet.js.map +1 -1
- package/lib/commonjs/ui-components/image/image-or-component.js +15 -18
- package/lib/commonjs/ui-components/image/image-or-component.js.map +1 -1
- package/lib/commonjs/ui-components/image/index.js +2 -9
- package/lib/commonjs/ui-components/image/index.js.map +1 -1
- package/lib/commonjs/ui-components/index.js.map +1 -1
- package/lib/commonjs/ui-components/input/index.js +2 -2
- package/lib/commonjs/ui-components/input/index.js.map +1 -1
- package/lib/commonjs/ui-components/input/radio-group.js +28 -25
- package/lib/commonjs/ui-components/input/radio-group.js.map +1 -1
- package/lib/commonjs/ui-components/input/selection-input.js +27 -38
- package/lib/commonjs/ui-components/input/selection-input.js.map +1 -1
- package/lib/commonjs/ui-components/input/text-input.js +25 -28
- package/lib/commonjs/ui-components/input/text-input.js.map +1 -1
- package/lib/commonjs/ui-components/list/index.js +20 -2
- package/lib/commonjs/ui-components/list/index.js.map +1 -1
- package/lib/commonjs/ui-components/list/list-page-loading-indicator.js +14 -0
- package/lib/commonjs/ui-components/list/list-page-loading-indicator.js.map +1 -0
- package/lib/commonjs/ui-components/list/list-section-header.js +10 -12
- package/lib/commonjs/ui-components/list/list-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/list/list-title-header.js +6 -8
- package/lib/commonjs/ui-components/list/list-title-header.js.map +1 -1
- package/lib/commonjs/ui-components/list/wallet/empty-list.js +73 -0
- package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -0
- package/lib/commonjs/ui-components/list/wallet/empty-search-result.js +41 -0
- package/lib/commonjs/ui-components/list/wallet/empty-search-result.js.map +1 -0
- package/lib/commonjs/ui-components/list/wallet/index.js +21 -0
- package/lib/commonjs/ui-components/list/wallet/index.js.map +1 -0
- package/lib/commonjs/ui-components/loader/index.js +2 -2
- package/lib/commonjs/ui-components/loader/index.js.map +1 -1
- package/lib/commonjs/ui-components/loader/loader.js +17 -17
- package/lib/commonjs/ui-components/loader/loader.js.map +1 -1
- package/lib/commonjs/ui-components/loader/loading-result.js +22 -21
- package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
- package/lib/commonjs/ui-components/nerd-view/index.js +2 -8
- package/lib/commonjs/ui-components/nerd-view/index.js.map +1 -1
- package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js +37 -41
- package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
- package/lib/commonjs/ui-components/pin/index.js +2 -2
- package/lib/commonjs/ui-components/pin/index.js.map +1 -1
- package/lib/commonjs/ui-components/pin/keypad.js +19 -23
- package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-code-screen.js +19 -21
- package/lib/commonjs/ui-components/pin/pin-code-screen.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-lock-animation.js +1 -2
- package/lib/commonjs/ui-components/pin/pin-lock-animation.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-lock.js +10 -12
- package/lib/commonjs/ui-components/pin/pin-lock.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pins.js +8 -9
- package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
- package/lib/commonjs/ui-components/screens/backup-screen.js +15 -18
- package/lib/commonjs/ui-components/screens/backup-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/image-preview-screen.js +12 -14
- package/lib/commonjs/ui-components/screens/image-preview-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/index.js +8 -49
- package/lib/commonjs/ui-components/screens/index.js.map +1 -1
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +35 -42
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js +14 -16
- package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/scroll-view-screen.js +12 -14
- package/lib/commonjs/ui-components/screens/scroll-view-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/section-list-screen.js +13 -15
- package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/animated-search-bar.js +10 -12
- package/lib/commonjs/ui-components/searchbar/animated-search-bar.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/index.js +2 -2
- package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/search-bar.js +15 -17
- package/lib/commonjs/ui-components/searchbar/search-bar.js.map +1 -1
- package/lib/commonjs/ui-components/settings/button-setting.js +14 -16
- package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
- package/lib/commonjs/ui-components/settings/index.js +2 -2
- package/lib/commonjs/ui-components/settings/index.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item-separator.js +6 -8
- package/lib/commonjs/ui-components/settings/setting-item-separator.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item.js +11 -13
- package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
- package/lib/commonjs/ui-components/settings/settings-button.js +7 -9
- package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
- package/lib/commonjs/ui-components/settings/switch-setting.js +11 -13
- package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/commonjs/ui-components/state/error-screen.js +10 -12
- package/lib/commonjs/ui-components/state/error-screen.js.map +1 -1
- package/lib/commonjs/ui-components/state/index.js +2 -2
- package/lib/commonjs/ui-components/state/index.js.map +1 -1
- package/lib/commonjs/ui-components/text/base.js +14 -16
- package/lib/commonjs/ui-components/text/base.js.map +1 -1
- package/lib/commonjs/ui-components/text/font.js +11 -13
- package/lib/commonjs/ui-components/text/font.js.map +1 -1
- package/lib/commonjs/ui-components/text/index.js +2 -9
- package/lib/commonjs/ui-components/text/index.js.map +1 -1
- package/lib/commonjs/ui-components/text/typography.js +10 -13
- package/lib/commonjs/ui-components/text/typography.js.map +1 -1
- package/lib/commonjs/ui-components/theme/color-scheme-context.js +2 -1
- package/lib/commonjs/ui-components/theme/color-scheme-context.js.map +1 -1
- package/lib/commonjs/ui-components/theme/color-scheme.js.map +1 -1
- package/lib/commonjs/ui-components/theme/index.js.map +1 -1
- package/lib/commonjs/utils/array.js.map +1 -1
- package/lib/commonjs/utils/backup.js.map +1 -1
- package/lib/commonjs/utils/color.js +1 -1
- package/lib/commonjs/utils/color.js.map +1 -1
- package/lib/commonjs/utils/contrasting-status-bar.js +8 -10
- package/lib/commonjs/utils/contrasting-status-bar.js.map +1 -1
- package/lib/commonjs/utils/date.js +3 -3
- package/lib/commonjs/utils/date.js.map +1 -1
- package/lib/commonjs/utils/filtering.js +11 -0
- package/lib/commonjs/utils/filtering.js.map +1 -0
- package/lib/commonjs/utils/history.js +76 -0
- package/lib/commonjs/utils/history.js.map +1 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.js +37 -23
- package/lib/commonjs/utils/hooks/connectivity/connectivity.js.map +1 -1
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +6 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/backup.js +31 -31
- package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/cache.js +44 -0
- package/lib/commonjs/utils/hooks/core/cache.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/core-config.js +15 -1
- package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-context.js +15 -10
- package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-init.js +44 -34
- package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credential-schemas.js +16 -27
- package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credentials.js +28 -37
- package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/dids.js +4 -6
- package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/error-code.js +3 -4
- package/lib/commonjs/utils/hooks/core/error-code.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/history.js +5 -37
- package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/identifiers.js +20 -0
- package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/index.js +22 -0
- package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proof-schemas.js +23 -38
- package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proofs.js +108 -76
- package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/query.js +1 -2
- package/lib/commonjs/utils/hooks/core/query.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/trust-entity.js +17 -7
- package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
- package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +1 -2
- package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -1
- package/lib/commonjs/utils/hooks/http/client.js.map +1 -1
- package/lib/commonjs/utils/hooks/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/list/list-content-inset.js +9 -10
- package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/before-remove.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/deep-link.js +3 -4
- package/lib/commonjs/utils/hooks/navigation/deep-link.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/open-settings.js +1 -2
- package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/commonjs/utils/hooks/pin-security/pin-security.js +1 -2
- package/lib/commonjs/utils/hooks/pin-security/pin-security.js.map +1 -1
- package/lib/commonjs/utils/hooks/revocation/credential-status.js +17 -26
- package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/commonjs/utils/index.js +37 -1
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/navigation.js +5 -5
- package/lib/commonjs/utils/navigation.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing.js +24 -25
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js +23 -26
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/commonjs/utils/parsers/index.js +11 -0
- package/lib/commonjs/utils/parsers/index.js.map +1 -1
- package/lib/commonjs/utils/parsers/query.js +4 -3
- package/lib/commonjs/utils/parsers/query.js.map +1 -1
- package/lib/commonjs/utils/parsers/universal-links.js +33 -0
- package/lib/commonjs/utils/parsers/universal-links.js.map +1 -0
- package/lib/commonjs/utils/parsers/universal-links.test.js +40 -0
- package/lib/commonjs/utils/parsers/universal-links.test.js.map +1 -0
- package/lib/commonjs/utils/ref.js.map +1 -1
- package/lib/commonjs/utils/reporting.js +4 -2
- package/lib/commonjs/utils/reporting.js.map +1 -1
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/utils/testID.js +1 -4
- package/lib/commonjs/utils/testID.js.map +1 -1
- package/lib/commonjs/utils/testID.test.js.map +1 -1
- package/lib/commonjs/utils/useMemoAsync.js +9 -0
- package/lib/commonjs/utils/useMemoAsync.js.map +1 -1
- package/lib/commonjs/utils/uuid.js +1 -1
- package/lib/commonjs/utils/uuid.js.map +1 -1
- package/lib/module/components/backup/index.js.map +1 -1
- package/lib/module/components/backup/preview-credentials.js +17 -21
- package/lib/module/components/backup/preview-credentials.js.map +1 -1
- package/lib/module/components/credential/credential.js +10 -11
- package/lib/module/components/credential/credential.js.map +1 -1
- package/lib/module/components/credential/index.js.map +1 -1
- package/lib/module/components/entity/EntityButtons.js +17 -21
- package/lib/module/components/entity/EntityButtons.js.map +1 -1
- package/lib/module/components/entity/entity-attributes.js +13 -14
- package/lib/module/components/entity/entity-attributes.js.map +1 -1
- package/lib/module/components/entity/entity-details-with-buttons.js +29 -20
- package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/module/components/entity/entity-details.js +28 -28
- package/lib/module/components/entity/entity-details.js.map +1 -1
- package/lib/module/components/entity/index.js.map +1 -1
- package/lib/module/components/history/history-details-screen.js +59 -0
- package/lib/module/components/history/history-details-screen.js.map +1 -0
- package/lib/module/components/history/history-list-item-icon.js +87 -0
- package/lib/module/components/history/history-list-item-icon.js.map +1 -0
- package/lib/module/components/history/history-list-item.js +46 -0
- package/lib/module/components/history/history-list-item.js.map +1 -0
- package/lib/module/components/history/history-list-screen.js +114 -0
- package/lib/module/components/history/history-list-screen.js.map +1 -0
- package/lib/module/components/history/history-list-section-header.js +29 -0
- package/lib/module/components/history/history-list-section-header.js.map +1 -0
- package/lib/module/components/history/history-list.js +90 -0
- package/lib/module/components/history/history-list.js.map +1 -0
- package/lib/module/components/history/index.js +7 -0
- package/lib/module/components/history/index.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/navigation/header-buttons.js +19 -23
- package/lib/module/components/navigation/header-buttons.js.map +1 -1
- package/lib/module/components/navigation/index.js.map +1 -1
- package/lib/module/components/proof-request/group.js +3 -4
- package/lib/module/components/proof-request/group.js.map +1 -1
- package/lib/module/components/proof-request/index.js.map +1 -1
- package/lib/module/components/proof-request/select-credential.js +10 -11
- package/lib/module/components/proof-request/select-credential.js.map +1 -1
- package/lib/module/components/proof-request/share-credential.js +23 -26
- package/lib/module/components/proof-request/share-credential.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/normalize-color.d.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibility.js +5 -7
- package/lib/module/ui-components/accessibility/accessibility.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistory.js +4 -8
- package/lib/module/ui-components/accessibility/accessibilityHistory.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js +10 -8
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityLanguage.js +6 -8
- package/lib/module/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
- package/lib/module/ui-components/accessibility/index.js +4 -4
- package/lib/module/ui-components/accessibility/index.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale/index.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale.test.js.map +1 -1
- package/lib/module/ui-components/action-modal/ActionModal.js +7 -8
- package/lib/module/ui-components/action-modal/ActionModal.js.map +1 -1
- package/lib/module/ui-components/action-modal/index.js.map +1 -1
- package/lib/module/ui-components/activity-indicator/activity-indicator.js +6 -7
- package/lib/module/ui-components/activity-indicator/activity-indicator.js.map +1 -1
- package/lib/module/ui-components/activity-indicator/index.js.map +1 -1
- package/lib/module/ui-components/blur/blur-view.js +10 -11
- package/lib/module/ui-components/blur/blur-view.js.map +1 -1
- package/lib/module/ui-components/blur/index.js.map +1 -1
- package/lib/module/ui-components/buttons/back-button.js +10 -11
- package/lib/module/ui-components/buttons/back-button.js.map +1 -1
- package/lib/module/ui-components/buttons/button.js +17 -18
- package/lib/module/ui-components/buttons/button.js.map +1 -1
- package/lib/module/ui-components/buttons/connectivity-button.js +14 -14
- package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/module/ui-components/buttons/filter-button.js +6 -7
- package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/module/ui-components/buttons/ghost-button.js +9 -10
- package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/module/ui-components/buttons/hold-button.js +236 -0
- package/lib/module/ui-components/buttons/hold-button.js.map +1 -0
- package/lib/module/ui-components/buttons/index.js +8 -7
- package/lib/module/ui-components/buttons/index.js.map +1 -1
- package/lib/module/ui-components/buttons/scan-button.js +5 -6
- package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/module/ui-components/camera/camera-overlay.js +7 -9
- package/lib/module/ui-components/camera/camera-overlay.js.map +1 -1
- package/lib/module/ui-components/camera/index.js.map +1 -1
- package/lib/module/ui-components/camera/qr-code-scanner.js +8 -9
- package/lib/module/ui-components/camera/qr-code-scanner.js.map +1 -1
- package/lib/module/ui-components/control/checkbox.js +9 -10
- package/lib/module/ui-components/control/checkbox.js.map +1 -1
- package/lib/module/ui-components/control/index.js.map +1 -1
- package/lib/module/ui-components/control/switch.js +8 -9
- package/lib/module/ui-components/control/switch.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-card.js +16 -17
- package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js +26 -30
- package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-list-item.js +23 -15
- package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-header.js +21 -19
- package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-image-carousel.js +23 -23
- package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/module/ui-components/credential/card/index.js +10 -10
- package/lib/module/ui-components/credential/card/index.js.map +1 -1
- package/lib/module/ui-components/credential/credential-attribute-item.js +47 -55
- package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js +15 -18
- package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/module/ui-components/credential/index.js +2 -2
- package/lib/module/ui-components/credential/index.js.map +1 -1
- package/lib/module/ui-components/credential/selector-status.js +3 -3
- package/lib/module/ui-components/credential/selector-status.js.map +1 -1
- package/lib/module/ui-components/credential/selector.js +5 -6
- package/lib/module/ui-components/credential/selector.js.map +1 -1
- package/lib/module/ui-components/detail/detail.js +9 -10
- package/lib/module/ui-components/detail/detail.js.map +1 -1
- package/lib/module/ui-components/detail/index.js.map +1 -1
- package/lib/module/ui-components/entity/avatar.js +10 -11
- package/lib/module/ui-components/entity/avatar.js.map +1 -1
- package/lib/module/ui-components/entity/entity-cluster.js +12 -14
- package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/module/ui-components/entity/index.js.map +1 -1
- package/lib/module/ui-components/header/focus-aware-status-bar.js +1 -1
- package/lib/module/ui-components/header/focus-aware-status-bar.js.map +1 -1
- package/lib/module/ui-components/header/foldable-header.js +10 -12
- package/lib/module/ui-components/header/foldable-header.js.map +1 -1
- package/lib/module/ui-components/header/header.js +10 -11
- package/lib/module/ui-components/header/header.js.map +1 -1
- package/lib/module/ui-components/header/index.js +6 -6
- package/lib/module/ui-components/header/index.js.map +1 -1
- package/lib/module/ui-components/header/navigation-header.js +23 -28
- package/lib/module/ui-components/header/navigation-header.js.map +1 -1
- package/lib/module/ui-components/history/data-item.js +23 -15
- package/lib/module/ui-components/history/data-item.js.map +1 -1
- package/lib/module/ui-components/history/history-details.js +171 -0
- package/lib/module/ui-components/history/history-details.js.map +1 -0
- package/lib/module/ui-components/history/{history-list-item.js → history-item.js} +44 -22
- package/lib/module/ui-components/history/history-item.js.map +1 -0
- package/lib/module/ui-components/history/history-section-header.js +6 -7
- package/lib/module/ui-components/history/history-section-header.js.map +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js +8 -9
- package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/module/ui-components/history/index.js +5 -4
- package/lib/module/ui-components/history/index.js.map +1 -1
- package/lib/module/ui-components/icons/connectivity.js +16 -21
- package/lib/module/ui-components/icons/connectivity.js.map +1 -1
- package/lib/module/ui-components/icons/credential.js +57 -68
- package/lib/module/ui-components/icons/credential.js.map +1 -1
- package/lib/module/ui-components/icons/entity.js +31 -5
- package/lib/module/ui-components/icons/entity.js.map +1 -1
- package/lib/module/ui-components/icons/history.js +103 -128
- package/lib/module/ui-components/icons/history.js.map +1 -1
- package/lib/module/ui-components/icons/icons.js +70 -87
- package/lib/module/ui-components/icons/icons.js.map +1 -1
- package/lib/module/ui-components/icons/index.js.map +1 -1
- package/lib/module/ui-components/icons/input.js.map +1 -1
- package/lib/module/ui-components/icons/keypad.js +66 -78
- package/lib/module/ui-components/icons/keypad.js.map +1 -1
- package/lib/module/ui-components/icons/loader.js +1 -1
- package/lib/module/ui-components/icons/loader.js.map +1 -1
- package/lib/module/ui-components/icons/nerd-view.js.map +1 -1
- package/lib/module/ui-components/icons/selector.js +5 -6
- package/lib/module/ui-components/icons/selector.js.map +1 -1
- package/lib/module/ui-components/icons/wallet.js +13 -16
- package/lib/module/ui-components/icons/wallet.js.map +1 -1
- package/lib/module/ui-components/image/image-or-component.js +12 -14
- package/lib/module/ui-components/image/image-or-component.js.map +1 -1
- package/lib/module/ui-components/image/index.js +2 -2
- package/lib/module/ui-components/image/index.js.map +1 -1
- package/lib/module/ui-components/index.js.map +1 -1
- package/lib/module/ui-components/input/index.js.map +1 -1
- package/lib/module/ui-components/input/radio-group.js +26 -22
- package/lib/module/ui-components/input/radio-group.js.map +1 -1
- package/lib/module/ui-components/input/selection-input.js +21 -31
- package/lib/module/ui-components/input/selection-input.js.map +1 -1
- package/lib/module/ui-components/input/text-input.js +21 -22
- package/lib/module/ui-components/input/text-input.js.map +1 -1
- package/lib/module/ui-components/list/index.js +1 -0
- package/lib/module/ui-components/list/index.js.map +1 -1
- package/lib/module/ui-components/list/list-page-loading-indicator.js +7 -0
- package/lib/module/ui-components/list/list-page-loading-indicator.js.map +1 -0
- package/lib/module/ui-components/list/list-section-header.js +8 -9
- package/lib/module/ui-components/list/list-section-header.js.map +1 -1
- package/lib/module/ui-components/list/list-title-header.js +4 -5
- package/lib/module/ui-components/list/list-title-header.js.map +1 -1
- package/lib/module/ui-components/list/wallet/empty-list.js +66 -0
- package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -0
- package/lib/module/ui-components/list/wallet/empty-search-result.js +34 -0
- package/lib/module/ui-components/list/wallet/empty-search-result.js.map +1 -0
- package/lib/module/ui-components/list/wallet/index.js +4 -0
- package/lib/module/ui-components/list/wallet/index.js.map +1 -0
- package/lib/module/ui-components/loader/index.js.map +1 -1
- package/lib/module/ui-components/loader/loader.js +14 -12
- package/lib/module/ui-components/loader/loader.js.map +1 -1
- package/lib/module/ui-components/loader/loading-result.js +21 -19
- package/lib/module/ui-components/loader/loading-result.js.map +1 -1
- package/lib/module/ui-components/nerd-view/index.js +2 -2
- package/lib/module/ui-components/nerd-view/index.js.map +1 -1
- package/lib/module/ui-components/nerd-view/nerd-mode-item.js +31 -34
- package/lib/module/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
- package/lib/module/ui-components/pin/index.js.map +1 -1
- package/lib/module/ui-components/pin/keypad.js +17 -19
- package/lib/module/ui-components/pin/keypad.js.map +1 -1
- package/lib/module/ui-components/pin/pin-code-screen.js +16 -17
- package/lib/module/ui-components/pin/pin-code-screen.js.map +1 -1
- package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -1
- package/lib/module/ui-components/pin/pin-lock.js +6 -7
- package/lib/module/ui-components/pin/pin-lock.js.map +1 -1
- package/lib/module/ui-components/pin/pins.js +7 -8
- package/lib/module/ui-components/pin/pins.js.map +1 -1
- package/lib/module/ui-components/screens/backup-screen.js +13 -14
- package/lib/module/ui-components/screens/backup-screen.js.map +1 -1
- package/lib/module/ui-components/screens/image-preview-screen.js +9 -10
- package/lib/module/ui-components/screens/image-preview-screen.js.map +1 -1
- package/lib/module/ui-components/screens/index.js +12 -12
- package/lib/module/ui-components/screens/index.js.map +1 -1
- package/lib/module/ui-components/screens/nerd-mode-screen.js +30 -35
- package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/module/ui-components/screens/qr-code-scanner-screen.js +10 -11
- package/lib/module/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
- package/lib/module/ui-components/screens/scroll-view-screen.js +10 -11
- package/lib/module/ui-components/screens/scroll-view-screen.js.map +1 -1
- package/lib/module/ui-components/screens/section-list-screen.js +11 -12
- package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/module/ui-components/searchbar/animated-search-bar.js +6 -7
- package/lib/module/ui-components/searchbar/animated-search-bar.js.map +1 -1
- package/lib/module/ui-components/searchbar/index.js.map +1 -1
- package/lib/module/ui-components/searchbar/search-bar.js +11 -12
- package/lib/module/ui-components/searchbar/search-bar.js.map +1 -1
- package/lib/module/ui-components/settings/button-setting.js +10 -11
- package/lib/module/ui-components/settings/button-setting.js.map +1 -1
- package/lib/module/ui-components/settings/index.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item-separator.js +4 -5
- package/lib/module/ui-components/settings/setting-item-separator.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item.js +7 -8
- package/lib/module/ui-components/settings/setting-item.js.map +1 -1
- package/lib/module/ui-components/settings/settings-button.js +5 -6
- package/lib/module/ui-components/settings/settings-button.js.map +1 -1
- package/lib/module/ui-components/settings/switch-setting.js +9 -10
- package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/module/ui-components/state/error-screen.js +7 -8
- package/lib/module/ui-components/state/error-screen.js.map +1 -1
- package/lib/module/ui-components/state/index.js.map +1 -1
- package/lib/module/ui-components/text/base.js +12 -13
- package/lib/module/ui-components/text/base.js.map +1 -1
- package/lib/module/ui-components/text/font.js +10 -11
- package/lib/module/ui-components/text/font.js.map +1 -1
- package/lib/module/ui-components/text/index.js +2 -2
- package/lib/module/ui-components/text/index.js.map +1 -1
- package/lib/module/ui-components/text/typography.js +8 -10
- package/lib/module/ui-components/text/typography.js.map +1 -1
- package/lib/module/ui-components/theme/color-scheme-context.js +1 -0
- package/lib/module/ui-components/theme/color-scheme-context.js.map +1 -1
- package/lib/module/ui-components/theme/color-scheme.js.map +1 -1
- package/lib/module/ui-components/theme/index.js.map +1 -1
- package/lib/module/utils/array.js.map +1 -1
- package/lib/module/utils/backup.js.map +1 -1
- package/lib/module/utils/color.js.map +1 -1
- package/lib/module/utils/contrasting-status-bar.js +5 -6
- package/lib/module/utils/contrasting-status-bar.js.map +1 -1
- package/lib/module/utils/date.js +4 -4
- package/lib/module/utils/date.js.map +1 -1
- package/lib/module/utils/filtering.js +4 -0
- package/lib/module/utils/filtering.js.map +1 -0
- package/lib/module/utils/history.js +66 -0
- package/lib/module/utils/history.js.map +1 -0
- package/lib/module/utils/hooks/connectivity/connectivity.js +36 -19
- package/lib/module/utils/hooks/connectivity/connectivity.js.map +1 -1
- package/lib/module/utils/hooks/connectivity/connectivity.test.js +6 -0
- package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/module/utils/hooks/core/backup.js +31 -31
- package/lib/module/utils/hooks/core/backup.js.map +1 -1
- package/lib/module/utils/hooks/core/cache.js +37 -0
- package/lib/module/utils/hooks/core/cache.js.map +1 -0
- package/lib/module/utils/hooks/core/core-config.js +11 -0
- package/lib/module/utils/hooks/core/core-config.js.map +1 -1
- package/lib/module/utils/hooks/core/core-context.js +14 -9
- package/lib/module/utils/hooks/core/core-context.js.map +1 -1
- package/lib/module/utils/hooks/core/core-init.js +42 -30
- package/lib/module/utils/hooks/core/core-init.js.map +1 -1
- package/lib/module/utils/hooks/core/credential-schemas.js +12 -19
- package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/credentials.js +27 -36
- package/lib/module/utils/hooks/core/credentials.js.map +1 -1
- package/lib/module/utils/hooks/core/dids.js +3 -4
- package/lib/module/utils/hooks/core/dids.js.map +1 -1
- package/lib/module/utils/hooks/core/error-code.js +3 -3
- package/lib/module/utils/hooks/core/error-code.js.map +1 -1
- package/lib/module/utils/hooks/core/history.js +4 -35
- package/lib/module/utils/hooks/core/history.js.map +1 -1
- package/lib/module/utils/hooks/core/identifiers.js +13 -0
- package/lib/module/utils/hooks/core/identifiers.js.map +1 -0
- package/lib/module/utils/hooks/core/index.js +2 -0
- package/lib/module/utils/hooks/core/index.js.map +1 -1
- package/lib/module/utils/hooks/core/proof-schemas.js +19 -30
- package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/proofs.js +102 -67
- package/lib/module/utils/hooks/core/proofs.js.map +1 -1
- package/lib/module/utils/hooks/core/query.js.map +1 -1
- package/lib/module/utils/hooks/core/trust-entity.js +16 -6
- package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/module/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
- package/lib/module/utils/hooks/header/on-scroll-header-state.js +1 -2
- package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -1
- package/lib/module/utils/hooks/http/client.js.map +1 -1
- package/lib/module/utils/hooks/index.js.map +1 -1
- package/lib/module/utils/hooks/list/list-content-inset.js +9 -10
- package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -1
- package/lib/module/utils/hooks/navigation/before-remove.js.map +1 -1
- package/lib/module/utils/hooks/navigation/close-button-timeout.js.map +1 -1
- package/lib/module/utils/hooks/navigation/deep-link.js +3 -4
- package/lib/module/utils/hooks/navigation/deep-link.js.map +1 -1
- package/lib/module/utils/hooks/navigation/index.js.map +1 -1
- package/lib/module/utils/hooks/navigation/open-settings.js +1 -2
- package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/module/utils/hooks/pin-security/pin-security.js +1 -2
- package/lib/module/utils/hooks/pin-security/pin-security.js.map +1 -1
- package/lib/module/utils/hooks/revocation/credential-status.js +17 -26
- package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/module/utils/index.js +3 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/navigation.js +5 -5
- package/lib/module/utils/navigation.js.map +1 -1
- package/lib/module/utils/parsers/credential-images.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing.js +23 -24
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js +23 -25
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/module/utils/parsers/index.js +1 -0
- package/lib/module/utils/parsers/index.js.map +1 -1
- package/lib/module/utils/parsers/query.js +4 -3
- package/lib/module/utils/parsers/query.js.map +1 -1
- package/lib/module/utils/parsers/universal-links.js +25 -0
- package/lib/module/utils/parsers/universal-links.js.map +1 -0
- package/lib/module/utils/parsers/universal-links.test.js +38 -0
- package/lib/module/utils/parsers/universal-links.test.js.map +1 -0
- package/lib/module/utils/ref.js.map +1 -1
- package/lib/module/utils/reporting.js +1 -0
- package/lib/module/utils/reporting.js.map +1 -1
- package/lib/module/utils/string.js.map +1 -1
- package/lib/module/utils/testID.js +1 -4
- package/lib/module/utils/testID.js.map +1 -1
- package/lib/module/utils/testID.test.js.map +1 -1
- package/lib/module/utils/useMemoAsync.js +10 -0
- package/lib/module/utils/useMemoAsync.js.map +1 -1
- package/lib/module/utils/uuid.js.map +1 -1
- package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
- package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -2
- package/lib/typescript/components/entity/entity-details.d.ts +3 -2
- package/lib/typescript/components/history/history-details-screen.d.ts +20 -0
- package/lib/typescript/components/history/history-list-item-icon.d.ts +8 -0
- package/lib/typescript/components/history/history-list-item.d.ts +21 -0
- package/lib/typescript/components/history/history-list-screen.d.ts +24 -0
- package/lib/typescript/components/history/history-list-section-header.d.ts +13 -0
- package/lib/typescript/components/history/history-list.d.ts +19 -0
- package/lib/typescript/components/history/index.d.ts +6 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/ui-components/accessibility/accessibility.d.ts +2 -2
- package/lib/typescript/ui-components/accessibility/accessibilityHistory.d.ts +1 -1
- package/lib/typescript/ui-components/accessibility/accessibilityHistoryWrappers.d.ts +3 -3
- package/lib/typescript/ui-components/accessibility/index.d.ts +5 -3
- package/lib/typescript/ui-components/buttons/button.d.ts +2 -2
- package/lib/typescript/ui-components/buttons/hold-button.d.ts +16 -0
- package/lib/typescript/ui-components/buttons/index.d.ts +15 -7
- package/lib/typescript/ui-components/buttons/scan-button.d.ts +2 -2
- package/lib/typescript/ui-components/credential/card/credential-header.d.ts +1 -1
- package/lib/typescript/ui-components/credential/card/index.d.ts +10 -5
- package/lib/typescript/ui-components/credential/index.d.ts +2 -1
- package/lib/typescript/ui-components/header/index.d.ts +6 -3
- package/lib/typescript/ui-components/history/data-item.d.ts +2 -2
- package/lib/typescript/ui-components/history/history-details.d.ts +51 -0
- package/lib/typescript/ui-components/history/{history-list-item.d.ts → history-item.d.ts} +4 -3
- package/lib/typescript/ui-components/history/history-section-header.d.ts +2 -2
- package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
- package/lib/typescript/ui-components/history/index.d.ts +5 -4
- package/lib/typescript/ui-components/icons/entity.d.ts +1 -0
- package/lib/typescript/ui-components/icons/history.d.ts +22 -35
- package/lib/typescript/ui-components/image/index.d.ts +2 -1
- package/lib/typescript/ui-components/input/selection-input.d.ts +1 -1
- package/lib/typescript/ui-components/list/index.d.ts +1 -0
- package/lib/typescript/ui-components/list/list-page-loading-indicator.d.ts +4 -0
- package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +10 -0
- package/lib/typescript/ui-components/list/wallet/empty-search-result.d.ts +7 -0
- package/lib/typescript/ui-components/list/wallet/index.d.ts +3 -0
- package/lib/typescript/ui-components/nerd-view/index.d.ts +2 -1
- package/lib/typescript/ui-components/pin/keypad.d.ts +2 -2
- package/lib/typescript/ui-components/screens/index.d.ts +12 -6
- package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +4 -4
- package/lib/typescript/ui-components/text/index.d.ts +2 -1
- package/lib/typescript/ui-components/text/typography.d.ts +14 -14
- package/lib/typescript/ui-components/theme/color-scheme.d.ts +1 -0
- package/lib/typescript/utils/filtering.d.ts +1 -0
- package/lib/typescript/utils/history.d.ts +10 -0
- package/lib/typescript/utils/hooks/connectivity/connectivity.d.ts +1 -1
- package/lib/typescript/utils/hooks/core/backup.d.ts +2 -1
- package/lib/typescript/utils/hooks/core/cache.d.ts +2 -0
- package/lib/typescript/utils/hooks/core/core-config.d.ts +5 -1
- package/lib/typescript/utils/hooks/core/core-init.d.ts +10 -1
- package/lib/typescript/utils/hooks/core/credentials.d.ts +9 -4
- package/lib/typescript/utils/hooks/core/history.d.ts +2 -5
- package/lib/typescript/utils/hooks/core/identifiers.d.ts +2 -0
- package/lib/typescript/utils/hooks/core/index.d.ts +2 -0
- package/lib/typescript/utils/hooks/core/proofs.d.ts +16 -9
- package/lib/typescript/utils/hooks/core/trust-entity.d.ts +6 -1
- package/lib/typescript/utils/hooks/revocation/credential-status.d.ts +2 -1
- package/lib/typescript/utils/index.d.ts +3 -0
- package/lib/typescript/utils/parsers/index.d.ts +1 -0
- package/lib/typescript/utils/parsers/universal-links.d.ts +1 -0
- package/lib/typescript/utils/parsers/universal-links.test.d.ts +1 -0
- package/lib/typescript/utils/ref.d.ts +1 -1
- package/package.json +61 -47
- package/src/components/entity/entity-attributes.tsx +5 -4
- package/src/components/entity/entity-details-with-buttons.tsx +20 -13
- package/src/components/entity/entity-details.tsx +24 -27
- package/src/components/history/history-details-screen.tsx +89 -0
- package/src/components/history/history-list-item-icon.tsx +113 -0
- package/src/components/history/history-list-item.tsx +64 -0
- package/src/components/history/history-list-screen.tsx +157 -0
- package/src/components/history/history-list-section-header.tsx +42 -0
- package/src/components/history/history-list.tsx +116 -0
- package/src/components/history/index.tsx +6 -0
- package/src/components/index.ts +1 -0
- package/src/components/proof-request/share-credential.tsx +2 -1
- package/src/ui-components/accessibility/accessibility.ts +2 -2
- package/src/ui-components/accessibility/accessibilityHistory.tsx +2 -2
- package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +3 -5
- package/src/ui-components/accessibility/index.ts +4 -3
- package/src/ui-components/action-modal/ActionModal.stories.tsx +7 -3
- package/src/ui-components/activity-indicator/activity-indicator.stories.tsx +3 -6
- package/src/ui-components/buttons/back-button.stories.tsx +7 -8
- package/src/ui-components/buttons/button.stories.tsx +9 -10
- package/src/ui-components/buttons/connectivity-button.stories.tsx +10 -11
- package/src/ui-components/buttons/connectivity-button.tsx +1 -1
- package/src/ui-components/buttons/ghost-button.stories.tsx +8 -8
- package/src/ui-components/buttons/hold-button.stories.tsx +29 -0
- package/src/ui-components/buttons/hold-button.tsx +276 -0
- package/src/ui-components/buttons/index.ts +16 -6
- package/src/ui-components/buttons/scan-button.stories.tsx +8 -4
- package/src/ui-components/control/checkbox.stories.tsx +8 -8
- package/src/ui-components/control/switch.stories.tsx +11 -8
- package/src/ui-components/credential/card/credential-card.stories.tsx +22 -25
- package/src/ui-components/credential/card/credential-details-card.stories.tsx +249 -245
- package/src/ui-components/credential/card/credential-details-card.tsx +2 -2
- package/src/ui-components/credential/card/credential-details-list-item.tsx +16 -6
- package/src/ui-components/credential/card/credential-header.stories.tsx +15 -17
- package/src/ui-components/credential/card/credential-header.tsx +4 -1
- package/src/ui-components/credential/card/credential-image-carousel.tsx +4 -0
- package/src/ui-components/credential/card/index.ts +11 -5
- package/src/ui-components/credential/index.ts +2 -1
- package/src/ui-components/credential/selector.stories.tsx +7 -7
- package/src/ui-components/detail/detail.stories.tsx +11 -8
- package/src/ui-components/entity/avatar.stories.tsx +10 -7
- package/src/ui-components/entity/entity-cluster.stories.tsx +11 -8
- package/src/ui-components/entity/entity-cluster.tsx +1 -1
- package/src/ui-components/header/header.stories.tsx +10 -7
- package/src/ui-components/header/index.ts +6 -3
- package/src/ui-components/header/navigation-header.stories.tsx +11 -8
- package/src/ui-components/history/data-item.tsx +13 -4
- package/src/ui-components/history/history-details.tsx +247 -0
- package/src/ui-components/history/{history-list-item.tsx → history-item.tsx} +72 -33
- package/src/ui-components/history/history-section-header.tsx +2 -2
- package/src/ui-components/history/history-section-list-item.tsx +3 -3
- package/src/ui-components/history/index.ts +5 -4
- package/src/ui-components/icons/entity.tsx +27 -0
- package/src/ui-components/icons/history.tsx +84 -131
- package/src/ui-components/image/index.tsx +2 -1
- package/src/ui-components/input/radio-group.stories.tsx +34 -0
- package/src/ui-components/input/radio-group.tsx +8 -2
- package/src/ui-components/input/selection-input.stories.tsx +20 -17
- package/src/ui-components/list/index.ts +1 -0
- package/src/ui-components/list/list-page-loading-indicator.tsx +8 -0
- package/src/ui-components/list/wallet/empty-list.tsx +75 -0
- package/src/ui-components/list/wallet/empty-search-result.tsx +39 -0
- package/src/ui-components/list/wallet/index.tsx +4 -0
- package/src/ui-components/loader/loader.stories.tsx +6 -9
- package/src/ui-components/loader/loader.tsx +6 -3
- package/src/ui-components/loader/loading-result.stories.tsx +13 -10
- package/src/ui-components/loader/loading-result.tsx +8 -4
- package/src/ui-components/nerd-view/index.ts +2 -1
- package/src/ui-components/nerd-view/nerd-mode-item.tsx +2 -2
- package/src/ui-components/pin/pin-code-screen.stories.tsx +20 -13
- package/src/ui-components/screens/image-preview-screen.stories.tsx +9 -6
- package/src/ui-components/screens/index.ts +12 -6
- package/src/ui-components/screens/nerd-mode-screen.tsx +6 -6
- package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +10 -7
- package/src/ui-components/searchbar/search-bar.stories.tsx +15 -8
- package/src/ui-components/searchbar/search-bar.tsx +2 -2
- package/src/ui-components/state/error-screen.stories.tsx +8 -9
- package/src/ui-components/state/error-screen.tsx +1 -1
- package/src/ui-components/text/index.ts +2 -1
- package/src/ui-components/text/typography.stories.tsx +19 -12
- package/src/ui-components/theme/color-scheme-context.tsx +1 -0
- package/src/ui-components/theme/color-scheme.ts +1 -0
- package/src/utils/date.ts +5 -5
- package/src/utils/filtering.ts +5 -0
- package/src/utils/history.ts +71 -0
- package/src/utils/hooks/connectivity/connectivity.test.ts +8 -0
- package/src/utils/hooks/connectivity/connectivity.ts +28 -4
- package/src/utils/hooks/core/backup.ts +25 -21
- package/src/utils/hooks/core/cache.ts +43 -0
- package/src/utils/hooks/core/core-config.ts +19 -0
- package/src/utils/hooks/core/core-context.tsx +15 -2
- package/src/utils/hooks/core/core-init.ts +45 -27
- package/src/utils/hooks/core/credential-schemas.ts +1 -1
- package/src/utils/hooks/core/credentials.ts +18 -17
- package/src/utils/hooks/core/history.ts +2 -57
- package/src/utils/hooks/core/identifiers.ts +18 -0
- package/src/utils/hooks/core/index.ts +3 -1
- package/src/utils/hooks/core/proof-schemas.ts +1 -1
- package/src/utils/hooks/core/proofs.ts +111 -51
- package/src/utils/hooks/core/trust-entity.ts +21 -13
- package/src/utils/hooks/navigation/open-settings.ts +2 -3
- package/src/utils/hooks/revocation/credential-status.ts +3 -2
- package/src/utils/index.ts +3 -0
- package/src/utils/navigation.ts +4 -2
- package/src/utils/parsers/credential-sharing.tsx +25 -25
- package/src/utils/parsers/credential.ts +5 -1
- package/src/utils/parsers/index.ts +1 -0
- package/src/utils/parsers/query.tsx +4 -2
- package/src/utils/parsers/universal-links.test.ts +57 -0
- package/src/utils/parsers/universal-links.ts +26 -0
- package/src/utils/ref.ts +1 -1
- package/src/utils/reporting.ts +1 -0
- package/lib/commonjs/ui-components/history/history-list-item.js.map +0 -1
- package/lib/module/ui-components/history/history-list-item.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_theme","_base","_font","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_theme","_base","_font","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","presets","xl","font","heading","fontSize","lineHeight","letterSpacing","l","regular","m","medium","s","code","xs","Typography","React","forwardRef","preset","color","caps","style","props","ref","colorScheme","useAppColorScheme","createElement","BaseText","styles","text","displayName","StyleSheet","create","textTransform","_default","exports"],"sources":["typography.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text } from 'react-native';\n\nimport { useAppColorScheme } from '../theme';\nimport { BaseText, BaseTextProps } from './base';\nimport font from './font';\n\nconst presets = {\n xl: {\n ...font.heading,\n fontSize: 26,\n lineHeight: 36,\n letterSpacing: 0.2,\n },\n l: {\n ...font.heading,\n fontSize: 24,\n lineHeight: 33,\n },\n 'l/line-height-large': {\n ...font.heading,\n fontSize: 24,\n lineHeight: 28,\n },\n regular: {\n ...font.regular,\n fontSize: 17,\n lineHeight: 24,\n },\n m: {\n ...font.medium,\n fontSize: 17,\n lineHeight: 22,\n letterSpacing: -0.2,\n },\n 'm/heading': {\n ...font.heading,\n fontSize: 17,\n lineHeight: 22,\n letterSpacing: -0.2,\n },\n s: {\n ...font.regular,\n fontSize: 14,\n lineHeight: 22,\n },\n 's/line-height-capped': {\n ...font.regular,\n fontSize: 14,\n lineHeight: 22,\n letterSpacing: -0.2,\n // TODO: vertical trim: cap height\n },\n 's/line-height-small': {\n ...font.regular,\n fontSize: 14,\n lineHeight: 18,\n letterSpacing: 0.3,\n },\n 's/code': {\n ...font.code,\n fontSize: 14,\n lineHeight: 22,\n letterSpacing: 0.2,\n },\n xs: {\n ...font.regular,\n fontSize: 12,\n lineHeight: 22,\n letterSpacing: -0.1,\n },\n 'xs/line-height-small': {\n ...font.regular,\n fontSize: 12,\n lineHeight: 18,\n letterSpacing: 0.3,\n },\n 'xs/code': {\n ...font.code,\n fontSize: 12,\n lineHeight: 18,\n letterSpacing: 0.3,\n },\n} as const;\n\nexport type TypographyProps = BaseTextProps & {\n preset?: keyof typeof presets;\n caps?: boolean;\n};\n\n/**\n * General text component\n * @see https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=1045-30326\n */\nconst Typography = React.forwardRef<Text, TypographyProps>(\n ({ preset = 'regular', color, caps, style, ...props }, ref) => {\n const colorScheme = useAppColorScheme();\n return (\n <BaseText\n ref={ref}\n style={[presets[preset], caps && styles.caps, style]}\n color={color ?? colorScheme.text}\n {...props}\n />\n );\n },\n);\n\nTypography.displayName = 'Typography';\n\nconst styles = StyleSheet.create({\n caps: {\n textTransform: 'uppercase',\n },\n});\n\nexport default Typography;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAA0B,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,C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C,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA/C,OAAA,GAEY2B,UAAU","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.ColorSchemeProvider = ColorSchemeProvider;
|
|
7
7
|
exports.useAppColorScheme = useAppColorScheme;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
function _interopRequireDefault(
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
const defaultColorScheme = {
|
|
11
11
|
accent: '#0F151A',
|
|
12
12
|
accentText: '#EBF2F4',
|
|
@@ -16,6 +16,7 @@ const defaultColorScheme = {
|
|
|
16
16
|
codeAccent: '#CFD2E7',
|
|
17
17
|
credentialHeaderBackground: 'rgba(255, 255, 255, 0.87)',
|
|
18
18
|
error: '#D90D0D',
|
|
19
|
+
errorText: '#A73535',
|
|
19
20
|
grayDark: '#CDD4DA',
|
|
20
21
|
linkText: '#3F7BA6',
|
|
21
22
|
success: '#00D066',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","e","__esModule","default","defaultColorScheme","accent","accentText","background","backgroundScroll","black","codeAccent","credentialHeaderBackground","error","errorText","grayDark","linkText","success","successText","text","warning","white","darkMode","nerdView","attributeLabel","attributeValueBackground","attributeValueBorder","attributeSectionBackground","button","codeHighlightText","ColorSchemeContext","React","createContext","displayName","ColorSchemeProvider","props","createElement","Provider","value","colorScheme","children","useAppColorScheme","useContext"],"sources":["color-scheme-context.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react';\n\nimport type { ColorScheme } from './color-scheme';\n\nconst defaultColorScheme: ColorScheme = {\n accent: '#0F151A',\n accentText: '#EBF2F4',\n background: '#F1F3F5',\n backgroundScroll: 'rgba(241, 243, 245, 0.7)',\n black: '#000000',\n codeAccent: '#CFD2E7',\n credentialHeaderBackground: 'rgba(255, 255, 255, 0.87)',\n error: '#D90D0D',\n errorText: '#A73535',\n grayDark: '#CDD4DA',\n linkText: '#3F7BA6',\n success: '#00D066',\n successText: '#006B34',\n text: '#0D0E10',\n warning: '#F7BF0B',\n white: '#FFFFFF',\n darkMode: false,\n nerdView: {\n background: 'rgba(2, 4, 21, 0.95)',\n attributeLabel: '#929497',\n attributeValueBackground: 'rgba(255, 255, 255, 0.02)',\n attributeValueBorder: 'rgba(255, 255, 255, 0.2)',\n attributeSectionBackground: 'rgba(2, 4, 21, 0.8)',\n button: 'rgba(255, 255, 255, 0.05)',\n codeHighlightText: 'rgba(232, 135, 114, 1)',\n },\n};\n\nconst ColorSchemeContext = React.createContext<ColorScheme>(defaultColorScheme);\nColorSchemeContext.displayName = 'ColorSchemeContext';\n\nexport function ColorSchemeProvider<Scheme extends ColorScheme = ColorScheme>(\n props: PropsWithChildren<{ colorScheme: Scheme }>,\n) {\n return <ColorSchemeContext.Provider value={props.colorScheme}>{props.children}</ColorSchemeContext.Provider>;\n}\n\n/**\n * A hook to gain access to the current `ColorScheme`\n * @note A custom superset of `ColorScheme` can be used (must also be passed to the `ColorSchemeProvider`)\n */\nexport function useAppColorScheme<Scheme extends ColorScheme = ColorScheme>(): Readonly<Scheme> {\n return React.useContext(ColorSchemeContext) as Scheme;\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAiD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAIjD,MAAMG,kBAA+B,GAAG;EACtCC,MAAM,EAAE,SAAS;EACjBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,gBAAgB,EAAE,0BAA0B;EAC5CC,KAAK,EAAE,SAAS;EAChBC,UAAU,EAAE,SAAS;EACrBC,0BAA0B,EAAE,2BAA2B;EACvDC,KAAK,EAAE,SAAS;EAChBC,SAAS,EAAE,SAAS;EACpBC,QAAQ,EAAE,SAAS;EACnBC,QAAQ,EAAE,SAAS;EACnBC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,SAAS;EACtBC,IAAI,EAAE,SAAS;EACfC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,QAAQ,EAAE,KAAK;EACfC,QAAQ,EAAE;IACRf,UAAU,EAAE,sBAAsB;IAClCgB,cAAc,EAAE,SAAS;IACzBC,wBAAwB,EAAE,2BAA2B;IACrDC,oBAAoB,EAAE,0BAA0B;IAChDC,0BAA0B,EAAE,qBAAqB;IACjDC,MAAM,EAAE,2BAA2B;IACnCC,iBAAiB,EAAE;EACrB;AACF,CAAC;AAED,MAAMC,kBAAkB,gBAAGC,cAAK,CAACC,aAAa,CAAc3B,kBAAkB,CAAC;AAC/EyB,kBAAkB,CAACG,WAAW,GAAG,oBAAoB;AAE9C,SAASC,mBAAmBA,CACjCC,KAAiD,EACjD;EACA,oBAAOpC,MAAA,CAAAK,OAAA,CAAAgC,aAAA,CAACN,kBAAkB,CAACO,QAAQ;IAACC,KAAK,EAAEH,KAAK,CAACI;EAAY,GAAEJ,KAAK,CAACK,QAAsC,CAAC;AAC9G;;AAEA;AACA;AACA;AACA;AACO,SAASC,iBAAiBA,CAAA,EAA+D;EAC9F,OAAOV,cAAK,CAACW,UAAU,CAACZ,kBAAkB,CAAC;AAC7C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["color-scheme.ts"],"sourcesContent":["/**\n * Color flavour of the application\n * colors according to figma design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=0-1\n */\nexport interface ColorScheme {\n accent: string;\n accentText: string;\n background: string;\n backgroundScroll: string;\n black: string;\n codeAccent: string;\n credentialHeaderBackground: string;\n error: string;\n grayDark: string;\n linkText: string;\n success: string;\n successText: string;\n text: string;\n warning: string;\n white: string;\n darkMode: boolean;\n nerdView: {\n background: string;\n attributeLabel: string;\n attributeSectionBackground: string;\n attributeValueBackground: string;\n attributeValueBorder: string;\n button: string;\n codeHighlightText: string;\n };\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["color-scheme.ts"],"sourcesContent":["/**\n * Color flavour of the application\n * colors according to figma design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=0-1\n */\nexport interface ColorScheme {\n accent: string;\n accentText: string;\n background: string;\n backgroundScroll: string;\n black: string;\n codeAccent: string;\n credentialHeaderBackground: string;\n error: string;\n errorText: string;\n grayDark: string;\n linkText: string;\n success: string;\n successText: string;\n text: string;\n warning: string;\n white: string;\n darkMode: boolean;\n nerdView: {\n background: string;\n attributeLabel: string;\n attributeSectionBackground: string;\n attributeValueBackground: string;\n attributeValueBorder: string;\n button: string;\n codeHighlightText: string;\n };\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_colorSchemeContext","require"],"sources":["index.ts"],"sourcesContent":["export type { ColorScheme } from './color-scheme';\nimport { ColorSchemeProvider, useAppColorScheme } from './color-scheme-context';\n\nexport { ColorSchemeProvider, useAppColorScheme };\n"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAAA,mBAAA,GAAAC,OAAA"}
|
|
1
|
+
{"version":3,"names":["_colorSchemeContext","require"],"sources":["index.ts"],"sourcesContent":["export type { ColorScheme } from './color-scheme';\nimport { ColorSchemeProvider, useAppColorScheme } from './color-scheme-context';\n\nexport { ColorSchemeProvider, useAppColorScheme };\n"],"mappings":";;;;;;;;;;;;;;;;;AACA,IAAAA,mBAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["addElementIf","condition","obj","Array"],"sources":["array.ts"],"sourcesContent":["export function addElementIf<T>(condition: boolean, obj: T) {\n return condition ? Array(obj) : [];\n}\n"],"mappings":";;;;;;AAAO,SAASA,YAAYA,CAAIC,SAAkB,EAAEC,GAAM,EAAE;EAC1D,OAAOD,SAAS,GAAGE,KAAK,CAACD,GAAG,CAAC,GAAG,EAAE;AACpC"}
|
|
1
|
+
{"version":3,"names":["addElementIf","condition","obj","Array"],"sources":["array.ts"],"sourcesContent":["export function addElementIf<T>(condition: boolean, obj: T) {\n return condition ? Array(obj) : [];\n}\n"],"mappings":";;;;;;AAAO,SAASA,YAAYA,CAAIC,SAAkB,EAAEC,GAAM,EAAE;EAC1D,OAAOD,SAAS,GAAGE,KAAK,CAACD,GAAG,CAAC,GAAG,EAAE;AACpC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_uuid","require","getBackupFileName","generateUUID","exports"],"sources":["backup.ts"],"sourcesContent":["import { generateUUID } from './uuid';\n\nexport const getBackupFileName = (): string => {\n return `procivis-one-backup-${generateUUID()}.zip`;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEO,MAAMC,iBAAiB,GAAGA,CAAA,KAAc;EAC7C,
|
|
1
|
+
{"version":3,"names":["_uuid","require","getBackupFileName","generateUUID","exports"],"sources":["backup.ts"],"sourcesContent":["import { generateUUID } from './uuid';\n\nexport const getBackupFileName = (): string => {\n return `procivis-one-backup-${generateUUID()}.zip`;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAEO,MAAMC,iBAAiB,GAAGA,CAAA,KAAc;EAC7C,OAAO,uBAAuB,IAAAC,kBAAY,EAAC,CAAC,MAAM;AACpD,CAAC;AAACC,OAAA,CAAAF,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getBrightness = exports.colorWithAlphaComponent = exports.colorArray = void 0;
|
|
7
7
|
var _normalizeColor = _interopRequireDefault(require("@react-native/normalize-color"));
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
/* eslint-disable no-bitwise */
|
|
10
10
|
|
|
11
11
|
const colorArray = color => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_normalizeColor","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_normalizeColor","_interopRequireDefault","require","e","__esModule","default","colorArray","color","normalized","normalizeColor","r","g","b","a","exports","colorWithAlphaComponent","alpha","Math","min","max","colorValues","colorHexString","map","value","round","toString","padStart","join","getBrightness","rgb"],"sources":["color.ts"],"sourcesContent":["/* eslint-disable no-bitwise */\nimport normalizeColor from '@react-native/normalize-color';\nimport type { ColorValue } from 'react-native';\n\nexport const colorArray = (color: ColorValue) => {\n const normalized = normalizeColor(color);\n\n const r = (normalized >> 24) & 0xff;\n const g = (normalized >> 16) & 0xff;\n const b = (normalized >> 8) & 0xff;\n const a = normalized & 0xff;\n\n return [r / 255, g / 255, b / 255, a / 255];\n};\n\nexport const colorWithAlphaComponent = (color: ColorValue, alpha: number): ColorValue => {\n alpha = Math.min(1, Math.max(0, alpha));\n const colorValues = colorArray(color);\n colorValues[3] = alpha;\n const colorHexString = colorValues\n .map((value) =>\n Math.round(255 * value)\n .toString(16)\n .padStart(2, '0'),\n )\n .join('');\n return `#${colorHexString}`;\n};\n\nexport const getBrightness = (color: ColorValue) => {\n const rgb = colorArray(color);\n // https://en.wikipedia.org/wiki/Relative_luminance\n return 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2];\n};\n"],"mappings":";;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2D,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAD3D;;AAIO,MAAMG,UAAU,GAAIC,KAAiB,IAAK;EAC/C,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GAAG,CAAC,CAAC,CAAC;AAC5D,CAAC;AAACf,OAAA,CAAAc,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -7,17 +7,16 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _color = require("./color");
|
|
10
|
-
function _getRequireWildcardCache(
|
|
11
|
-
function _interopRequireWildcard(
|
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
13
|
/**
|
|
14
14
|
* Defines transparent status bar with content contrasting to the background
|
|
15
15
|
*/
|
|
16
|
-
const ContrastingStatusBar =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
16
|
+
const ContrastingStatusBar = ({
|
|
17
|
+
backgroundColor,
|
|
18
|
+
...props
|
|
19
|
+
}) => {
|
|
21
20
|
const barStyle = (0, _react.useMemo)(() => (0, _color.getBrightness)(backgroundColor) > 0.5 ? 'dark-content' : 'light-content', [backgroundColor]);
|
|
22
21
|
return /*#__PURE__*/_react.default.createElement(_reactNative.StatusBar, _extends({
|
|
23
22
|
translucent: true,
|
|
@@ -25,6 +24,5 @@ const ContrastingStatusBar = _ref => {
|
|
|
25
24
|
backgroundColor: 'transparent'
|
|
26
25
|
}, props));
|
|
27
26
|
};
|
|
28
|
-
var _default = ContrastingStatusBar;
|
|
29
|
-
exports.default = _default;
|
|
27
|
+
var _default = exports.default = ContrastingStatusBar;
|
|
30
28
|
//# sourceMappingURL=contrasting-status-bar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_color","_getRequireWildcardCache","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_color","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","ContrastingStatusBar","backgroundColor","props","barStyle","useMemo","getBrightness","createElement","StatusBar","translucent","_default","exports"],"sources":["contrasting-status-bar.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport { ColorValue, StatusBar, StatusBarProps, StatusBarStyle } from 'react-native';\n\nimport { getBrightness } from './color';\n\ninterface ContrastingStatusBarProps extends Omit<StatusBarProps, 'barStyle'> {\n backgroundColor: ColorValue;\n}\n\n/**\n * Defines transparent status bar with content contrasting to the background\n */\nconst ContrastingStatusBar: FC<ContrastingStatusBarProps> = ({ backgroundColor, ...props }) => {\n const barStyle = useMemo<StatusBarStyle>(\n () => (getBrightness(backgroundColor) > 0.5 ? 'dark-content' : 'light-content'),\n [backgroundColor],\n );\n return <StatusBar translucent={true} barStyle={barStyle} backgroundColor={'transparent'} {...props} />;\n};\n\nexport default ContrastingStatusBar;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC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b,CAAA,aAAAR,CAAA,MAAAA,CAAA,GAAAsB,SAAA,CAAAC,MAAA,EAAAvB,CAAA,UAAAG,CAAA,GAAAmB,SAAA,CAAAtB,CAAA,YAAAE,CAAA,IAAAC,CAAA,OAAAY,cAAA,CAAAC,IAAA,CAAAb,CAAA,EAAAD,CAAA,MAAAM,CAAA,CAAAN,CAAA,IAAAC,CAAA,CAAAD,CAAA,aAAAM,CAAA,KAAAW,QAAA,CAAAK,KAAA,OAAAF,SAAA;AAMxC;AACA;AACA;AACA,MAAMG,oBAAmD,GAAGA,CAAC;EAAEC,eAAe;EAAE,GAAGC;AAAM,CAAC,KAAK;EAC7F,MAAMC,QAAQ,GAAG,IAAAC,cAAO,EACtB,MAAO,IAAAC,oBAAa,EAACJ,eAAe,CAAC,GAAG,GAAG,GAAG,cAAc,GAAG,eAAgB,EAC/E,CAACA,eAAe,CAClB,CAAC;EACD,oBAAOhC,MAAA,CAAAW,OAAA,CAAA0B,aAAA,CAAClC,YAAA,CAAAmC,SAAS,EAAAb,QAAA;IAACc,WAAW,EAAE,IAAK;IAACL,QAAQ,EAAEA,QAAS;IAACF,eAAe,EAAE;EAAc,GAAKC,KAAK,CAAG,CAAC;AACxG,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAA9B,OAAA,GAEaoB,oBAAoB","ignoreList":[]}
|
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.formatTimestamp = exports.formatTimeAgo = exports.formatTime = exports.formatMonth = exports.formatDateTimeLocalized = exports.formatDateTime = exports.formatDateOnlyFromUTCTimestamp = exports.formatDateLocalized = exports.formatDate = exports.convertDateToUTCTimestamp = exports.convertDateStrToLocalDate = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
var _timeago = require("timeago.js");
|
|
9
|
-
var
|
|
9
|
+
var _I18nManager$getConst, _ref; // Date & Time formatted as specified in SW-610
|
|
10
10
|
const MINUTE = 60 * 1000;
|
|
11
11
|
const DAY = 24 * 60 * MINUTE;
|
|
12
12
|
|
|
13
13
|
// OS locale
|
|
14
|
-
const systemLocale = (
|
|
14
|
+
const systemLocale = (_I18nManager$getConst = _reactNative.I18nManager.getConstants().localeIdentifier) === null || _I18nManager$getConst === void 0 ? void 0 : _I18nManager$getConst.replace(/_/g, '-').split('#')[0].replace(/-$/, '');
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Date only format
|
|
@@ -142,7 +142,7 @@ const formatDateOnlyFromUTCTimestamp = utcTimestamp => {
|
|
|
142
142
|
return (_formatDate = formatDate(convertDateStrToLocalDate(`${utcDate.getUTCFullYear()}-${pad(utcDate.getUTCMonth() + 1)}-${pad(utcDate.getUTCDate())}`))) !== null && _formatDate !== void 0 ? _formatDate : '';
|
|
143
143
|
};
|
|
144
144
|
exports.formatDateOnlyFromUTCTimestamp = formatDateOnlyFromUTCTimestamp;
|
|
145
|
-
const locale = (_reactNative.Platform.OS === 'ios' ? _reactNative.
|
|
145
|
+
const locale = (_ref = _reactNative.Platform.OS === 'ios' ? _reactNative.Settings.get('AppleLocale') : _reactNative.I18nManager.getConstants().localeIdentifier) === null || _ref === void 0 ? void 0 : _ref.split('@')[0].replace('_', '-');
|
|
146
146
|
const formatDateTimeLocalized = date => {
|
|
147
147
|
return formatDateTime(date, locale);
|
|
148
148
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_timeago","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_timeago","_I18nManager$getConst","_ref","MINUTE","DAY","systemLocale","I18nManager","getConstants","localeIdentifier","replace","split","formatDate","date","locale","options","toLocaleDateString","undefined","exports","formatTime","toLocaleTimeString","hour","minute","formatDateTime","toLocaleString","year","month","day","hour12","formatMonth","getFullYear","formatTimeAgo","format","formatTimestamp","nowLabel","_formatDateTime2","now","Date","timestamp","getTime","_formatDateTime","pad","x","String","convertDateToUTCTimestamp","parse","getMonth","getDate","convertDateStrToLocalDate","Platform","select","android","timezoneOffset","getTimezoneOffset","default","formatDateOnlyFromUTCTimestamp","utcTimestamp","_formatDate","utcDate","getUTCFullYear","getUTCMonth","getUTCDate","OS","Settings","get","formatDateTimeLocalized","formatDateLocalized"],"sources":["date.ts"],"sourcesContent":["// Date & Time formatted as specified in SW-610\n\nimport { I18nManager, Platform, Settings } from 'react-native';\nimport { format } from 'timeago.js';\n\nconst MINUTE = 60 * 1000;\nconst DAY = 24 * 60 * MINUTE;\n\n// OS locale\nconst systemLocale: string | undefined = I18nManager.getConstants().localeIdentifier\n ?.replace(/_/g, '-')\n .split('#')[0]\n .replace(/-$/, '');\n\n/**\n * Date only format\n */\nexport const formatDate = (date: Date, locale?: string, options?: Intl.DateTimeFormatOptions) => {\n try {\n return date.toLocaleDateString(locale || systemLocale, options);\n } catch {\n return undefined;\n }\n};\n\n/**\n * Time only format\n */\nexport const formatTime = (date: Date, locale?: string) => {\n try {\n return date.toLocaleTimeString(locale || systemLocale, { hour: '2-digit', minute: '2-digit' });\n } catch {\n return undefined;\n }\n};\n\n/**\n * Date and time format\n */\nexport const formatDateTime = (date: Date, locale?: string) => {\n try {\n return date.toLocaleString(locale || systemLocale, {\n hour: '2-digit',\n minute: '2-digit',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour12: locale === 'en-US',\n });\n } catch {\n return undefined;\n }\n};\n\n/**\n * Month format\n */\nexport const formatMonth = (date: Date, locale: string): string => {\n return `${date.toLocaleString(locale, {\n month: 'long',\n })} ${date.getFullYear()}`;\n};\n\n/**\n * Time-ago format\n */\nexport const formatTimeAgo = (date: Date, locale: string): string => {\n return format(date, locale);\n};\n\n/**\n * Timestamp formatted for general use\n */\nexport const formatTimestamp = (date: Date, locale: string, nowLabel: string): string => {\n const now = Date.now();\n const timestamp = date.getTime();\n if (now < timestamp) {\n // in the future\n return formatDateTime(date, locale) ?? '';\n }\n\n // in the past\n if (now - timestamp < MINUTE) {\n // less than a minute ago\n return nowLabel;\n }\n\n // less than a day ago\n if (now - timestamp < DAY) {\n return formatTimeAgo(date, locale);\n }\n\n // longer ago\n return formatDateTime(date, locale) ?? '';\n};\n\nconst pad = (x: number) => (x >= 0 && x < 10 ? `0${x}` : String(x));\n\n/**\n * Utility function to deal with `date`-type attributes\n * @param {Date} date local timezone representation\n * @returns {number} the same day, but UTC timezone with midnight time\n */\nexport const convertDateToUTCTimestamp = (date: Date): number =>\n Date.parse(`${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`);\n\n/**\n * Utility function to deal with `date`-type attributes\n * @param {string} date in YYYY-MM-DD representation\n * @returns {Date} the same day, but local timezone with midnight time\n */\nexport const convertDateStrToLocalDate = (date: string): Date =>\n Platform.select({\n // android conversion using the standard date parsing doesn't work, computing the timestamp manually\n android: (() => {\n const timestamp = Date.parse(date);\n const timezoneOffset = new Date(date).getTimezoneOffset();\n return new Date(timestamp + timezoneOffset * MINUTE);\n })(),\n default: new Date(`${date}T00:00:00`),\n });\n\n/**\n * Inverted function to {@link convertDateToUTCTimestamp}\n * @param {number} utcTimestamp date timestamp represented as midnight UTC time\n * @returns {string} formatted date (based on locale settings, e.g. `21/02/2021`)\n */\nexport const formatDateOnlyFromUTCTimestamp = (utcTimestamp: number): string => {\n const utcDate = new Date(utcTimestamp);\n return (\n formatDate(\n convertDateStrToLocalDate(\n `${utcDate.getUTCFullYear()}-${pad(utcDate.getUTCMonth() + 1)}-${pad(utcDate.getUTCDate())}`,\n ),\n ) ?? ''\n );\n};\n\nconst locale = (\n Platform.OS === 'ios'\n ? Settings.get('AppleLocale')\n : I18nManager.getConstants().localeIdentifier\n)\n ?.split('@')[0]\n .replace('_', '-');\n\nexport const formatDateTimeLocalized = (date: Date) => {\n return formatDateTime(date, locale);\n};\n\nexport const formatDateLocalized = (date: Date) => {\n return formatDate(date, locale);\n};\n"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAAoC,IAAAE,qBAAA,EAA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IrB,IAAI,CAACmB,YAAY,CAAC;EACtC,QAAAC,WAAA,GACE7C,UAAU,CACRoC,yBAAyB,CACvB,GAAGU,OAAO,CAACC,cAAc,CAAC,CAAC,IAAIlB,GAAG,CAACiB,OAAO,CAACE,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,IAAInB,GAAG,CAACiB,OAAO,CAACG,UAAU,CAAC,CAAC,CAAC,EAC5F,CACF,CAAC,cAAAJ,WAAA,cAAAA,WAAA,GAAI,EAAE;AAEX,CAAC;AAACvC,OAAA,CAAAqC,8BAAA,GAAAA,8BAAA;AAEF,MAAMzC,MAAM,IAAAX,IAAA,GACV8C,qBAAQ,CAACa,EAAE,KAAK,KAAK,GACjBC,qBAAQ,CAACC,GAAG,CAAC,aAAa,CAAC,GAC3BzD,wBAAW,CAACC,YAAY,CAAC,CAAC,CAACC,gBAAgB,cAAAN,IAAA,uBAHlCA,IAAA,CAKXQ,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACdD,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;AAEb,MAAMuD,uBAAuB,GAAIpD,IAAU,IAAK;EACrD,OAAOU,cAAc,CAACV,IAAI,EAAEC,MAAM,CAAC;AACrC,CAAC;AAACI,OAAA,CAAA+C,uBAAA,GAAAA,uBAAA;AAEK,MAAMC,mBAAmB,GAAIrD,IAAU,IAAK;EACjD,OAAOD,UAAU,CAACC,IAAI,EAAEC,MAAM,CAAC;AACjC,CAAC;AAACI,OAAA,CAAAgD,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.nonEmptyFilter = void 0;
|
|
7
|
+
const nonEmptyFilter = value => {
|
|
8
|
+
return value !== null && value !== undefined;
|
|
9
|
+
};
|
|
10
|
+
exports.nonEmptyFilter = nonEmptyFilter;
|
|
11
|
+
//# sourceMappingURL=filtering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["nonEmptyFilter","value","undefined","exports"],"sources":["filtering.ts"],"sourcesContent":["export const nonEmptyFilter = <TValue>(\n value: TValue | null | undefined,\n): value is TValue => {\n return value !== null && value !== undefined;\n};\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GACzBC,KAAgC,IACZ;EACpB,OAAOA,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAKC,SAAS;AAC9C,CAAC;AAACC,OAAA,CAAAH,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.groupEntriesByDay = exports.claimValueFromProofInputClaim = exports.claimFromProofInputClaim = void 0;
|
|
7
|
+
var _reactNativeOneCore = require("@procivis/react-native-one-core");
|
|
8
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
9
|
+
var _filtering = require("./filtering");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const groupEntriesByDay = entries => {
|
|
12
|
+
const groupedEntries = entries.reduce((result, entry) => {
|
|
13
|
+
const entryDate = (0, _moment.default)(entry.createdDate);
|
|
14
|
+
const matchingEntry = result.find(({
|
|
15
|
+
date
|
|
16
|
+
}) => date.isSame(entryDate, 'day'));
|
|
17
|
+
if (matchingEntry) {
|
|
18
|
+
matchingEntry.data.push(entry);
|
|
19
|
+
} else {
|
|
20
|
+
result.push({
|
|
21
|
+
data: [entry],
|
|
22
|
+
date: entryDate,
|
|
23
|
+
firstYearEntry: false
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
}, []);
|
|
28
|
+
return groupedEntries.sort(({
|
|
29
|
+
date: a
|
|
30
|
+
}, {
|
|
31
|
+
date: b
|
|
32
|
+
}) => b.valueOf() - a.valueOf()).map((item, index, list) => {
|
|
33
|
+
item.firstYearEntry = !index || !list[index - 1].date.isSame(item.date, 'year');
|
|
34
|
+
return item;
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
exports.groupEntriesByDay = groupEntriesByDay;
|
|
38
|
+
const claimValueFromProofInputClaim = ({
|
|
39
|
+
schema,
|
|
40
|
+
value
|
|
41
|
+
}) => {
|
|
42
|
+
if (!value) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
if (Array.isArray(value)) {
|
|
46
|
+
const values = value.map(claimFromProofInputClaim).filter(_filtering.nonEmptyFilter);
|
|
47
|
+
return schema.dataType === _reactNativeOneCore.DataTypeEnum.Object ? {
|
|
48
|
+
array: schema.array,
|
|
49
|
+
dataType: _reactNativeOneCore.DataTypeEnum.Object,
|
|
50
|
+
value: values
|
|
51
|
+
} : {
|
|
52
|
+
array: true,
|
|
53
|
+
dataType: schema.dataType,
|
|
54
|
+
value: values
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
array: false,
|
|
59
|
+
dataType: schema.dataType,
|
|
60
|
+
value
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
exports.claimValueFromProofInputClaim = claimValueFromProofInputClaim;
|
|
64
|
+
const claimFromProofInputClaim = input => {
|
|
65
|
+
const value = claimValueFromProofInputClaim(input);
|
|
66
|
+
if (!value) {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
...value,
|
|
71
|
+
id: input.schema.id,
|
|
72
|
+
key: input.schema.key
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
exports.claimFromProofInputClaim = claimFromProofInputClaim;
|
|
76
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeOneCore","require","_moment","_interopRequireDefault","_filtering","e","__esModule","default","groupEntriesByDay","entries","groupedEntries","reduce","result","entry","entryDate","moment","createdDate","matchingEntry","find","date","isSame","data","push","firstYearEntry","sort","a","b","valueOf","map","item","index","list","exports","claimValueFromProofInputClaim","schema","value","undefined","Array","isArray","values","claimFromProofInputClaim","filter","nonEmptyFilter","dataType","DataTypeEnum","Object","array","input","id","key"],"sources":["history.ts"],"sourcesContent":["import { Claim, ClaimValue, DataTypeEnum, HistoryListItem, ProofInputClaim } from '@procivis/react-native-one-core';\nimport moment, { Moment } from 'moment';\n\nimport { nonEmptyFilter } from './filtering';\n\nexport interface HistoryGroupByDaySection {\n data: HistoryListItem[];\n date: Moment;\n firstYearEntry: boolean;\n}\n\nexport const groupEntriesByDay = (entries: HistoryListItem[]) => {\n const groupedEntries = entries.reduce((result: HistoryGroupByDaySection[], entry: HistoryListItem) => {\n const entryDate = moment(entry.createdDate);\n\n const matchingEntry = result.find(({ date }) => date.isSame(entryDate, 'day'));\n if (matchingEntry) {\n matchingEntry.data.push(entry);\n } else {\n result.push({ data: [entry], date: entryDate, firstYearEntry: false });\n }\n\n return result;\n }, []);\n\n return groupedEntries\n .sort(({ date: a }, { date: b }) => b.valueOf() - a.valueOf())\n .map((item, index, list) => {\n item.firstYearEntry = !index || !list[index - 1].date.isSame(item.date, 'year');\n return item;\n });\n};\n\nexport const claimValueFromProofInputClaim = ({ schema, value }: ProofInputClaim): ClaimValue | undefined => {\n if (!value) {\n return undefined;\n }\n\n if (Array.isArray(value)) {\n const values = value.map(claimFromProofInputClaim).filter(nonEmptyFilter);\n return schema.dataType === (DataTypeEnum.Object as string)\n ? {\n array: schema.array,\n dataType: DataTypeEnum.Object,\n value: values,\n }\n : {\n array: true,\n dataType: schema.dataType,\n value: values,\n };\n }\n\n return {\n array: false,\n dataType: schema.dataType,\n value,\n };\n};\n\nexport const claimFromProofInputClaim = (input: ProofInputClaim): Claim | undefined => {\n const value = claimValueFromProofInputClaim(input);\n if (!value) {\n return undefined;\n }\n return {\n ...value,\n id: input.schema.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 +8,44 @@ var _netinfo = require("@react-native-community/netinfo");
|
|
|
8
8
|
var _parseUrl = _interopRequireDefault(require("parse-url"));
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _reactNativeBluetoothStateManager = _interopRequireDefault(require("react-native-bluetooth-state-manager"));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
exports.InternetState = InternetState
|
|
14
|
-
(function (InternetState) {
|
|
11
|
+
var _coreConfig = require("../core/core-config");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
let InternetState = exports.InternetState = /*#__PURE__*/function (InternetState) {
|
|
15
14
|
InternetState[InternetState["Available"] = 0] = "Available";
|
|
16
15
|
InternetState[InternetState["Unreachable"] = 1] = "Unreachable";
|
|
17
16
|
InternetState[InternetState["Disabled"] = 2] = "Disabled";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.BluetoothState = BluetoothState
|
|
21
|
-
(function (BluetoothState) {
|
|
17
|
+
return InternetState;
|
|
18
|
+
}({});
|
|
19
|
+
let BluetoothState = exports.BluetoothState = /*#__PURE__*/function (BluetoothState) {
|
|
22
20
|
BluetoothState[BluetoothState["Available"] = 0] = "Available";
|
|
23
21
|
BluetoothState[BluetoothState["Unauthorized"] = 1] = "Unauthorized";
|
|
24
22
|
BluetoothState[BluetoothState["Disabled"] = 2] = "Disabled";
|
|
25
23
|
BluetoothState[BluetoothState["Unavailable"] = 3] = "Unavailable";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
exports.Transport = Transport
|
|
29
|
-
(function (Transport) {
|
|
24
|
+
return BluetoothState;
|
|
25
|
+
}({});
|
|
26
|
+
let Transport = exports.Transport = /*#__PURE__*/function (Transport) {
|
|
30
27
|
Transport["Bluetooth"] = "BLE";
|
|
31
28
|
Transport["HTTP"] = "HTTP";
|
|
32
29
|
Transport["MQTT"] = "MQTT";
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
return Transport;
|
|
31
|
+
}({});
|
|
32
|
+
const useAvailableTransports = possibleTransports => {
|
|
35
33
|
const [internetState, setInternetState] = (0, _react.useState)();
|
|
36
34
|
const [bluetoothState, setBluetoothState] = (0, _react.useState)();
|
|
35
|
+
const {
|
|
36
|
+
data: coreConfig
|
|
37
|
+
} = (0, _coreConfig.useCoreConfig)();
|
|
38
|
+
const supportedTransports = (0, _react.useMemo)(() => {
|
|
39
|
+
if (!coreConfig) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const enabledTransports = (0, _coreConfig.getEnabledTransports)(coreConfig);
|
|
43
|
+
return possibleTransports.filter(t => enabledTransports.includes(t));
|
|
44
|
+
}, [possibleTransports, coreConfig]);
|
|
37
45
|
(0, _react.useEffect)(() => {
|
|
46
|
+
if (!supportedTransports) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
38
49
|
let btSubscription;
|
|
39
50
|
if (supportedTransports.includes(Transport.Bluetooth)) {
|
|
40
51
|
btSubscription = _reactNativeBluetoothStateManager.default.onStateChange(state => {
|
|
@@ -72,11 +83,17 @@ const useAvailableTransports = supportedTransports => {
|
|
|
72
83
|
}
|
|
73
84
|
return () => {
|
|
74
85
|
var _btSubscription, _netSubscription;
|
|
75
|
-
(_btSubscription = btSubscription) === null || _btSubscription === void 0
|
|
76
|
-
(_netSubscription = netSubscription) === null || _netSubscription === void 0
|
|
86
|
+
(_btSubscription = btSubscription) === null || _btSubscription === void 0 || _btSubscription.remove();
|
|
87
|
+
(_netSubscription = netSubscription) === null || _netSubscription === void 0 || _netSubscription();
|
|
77
88
|
};
|
|
78
89
|
}, [supportedTransports]);
|
|
79
90
|
const transportStatus = (0, _react.useMemo)(() => {
|
|
91
|
+
if (!supportedTransports) {
|
|
92
|
+
return {
|
|
93
|
+
availableTransport: undefined,
|
|
94
|
+
transportError: {}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
80
97
|
const waitingForInternetState = (supportedTransports.includes(Transport.HTTP) || supportedTransports.includes(Transport.MQTT)) && internetState === undefined;
|
|
81
98
|
const waitingForBluetoothState = supportedTransports.includes(Transport.Bluetooth) && bluetoothState === undefined;
|
|
82
99
|
if (waitingForInternetState || waitingForBluetoothState) {
|
|
@@ -88,8 +105,8 @@ const useAvailableTransports = supportedTransports => {
|
|
|
88
105
|
const availableTransport = [];
|
|
89
106
|
const transportError = {};
|
|
90
107
|
if (internetState === InternetState.Available) {
|
|
91
|
-
availableTransport.push(Transport.MQTT);
|
|
92
|
-
availableTransport.push(Transport.HTTP);
|
|
108
|
+
supportedTransports.includes(Transport.MQTT) && availableTransport.push(Transport.MQTT);
|
|
109
|
+
supportedTransports.includes(Transport.HTTP) && availableTransport.push(Transport.HTTP);
|
|
93
110
|
} else {
|
|
94
111
|
transportError.internet = internetState;
|
|
95
112
|
}
|
|
@@ -121,10 +138,7 @@ const getInvitationUrlTransports = (url, customOpenIdUrlScheme) => {
|
|
|
121
138
|
return [Transport.HTTP];
|
|
122
139
|
}
|
|
123
140
|
const query = parsedUrl.query;
|
|
124
|
-
const hasAllParameters =
|
|
125
|
-
for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
126
|
-
params[_key] = arguments[_key];
|
|
127
|
-
}
|
|
141
|
+
const hasAllParameters = (...params) => {
|
|
128
142
|
return params.every(param => param in query);
|
|
129
143
|
};
|
|
130
144
|
const transports = [];
|
|
@@ -133,7 +147,7 @@ const getInvitationUrlTransports = (url, customOpenIdUrlScheme) => {
|
|
|
133
147
|
if (hasAllParameters('name', 'key')) {
|
|
134
148
|
transports.push(Transport.Bluetooth);
|
|
135
149
|
}
|
|
136
|
-
if (hasAllParameters('
|
|
150
|
+
if (hasAllParameters('brokerUrl', 'topicId')) {
|
|
137
151
|
transports.push(Transport.MQTT);
|
|
138
152
|
}
|
|
139
153
|
return transports;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_netinfo","require","_parseUrl","_interopRequireDefault","_react","_reactNativeBluetoothStateManager","obj","__esModule","default","InternetState","exports","BluetoothState","Transport","useAvailableTransports","supportedTransports","internetState","setInternetState","useState","bluetoothState","setBluetoothState","useEffect","btSubscription","includes","Bluetooth","BTStateManager","onStateChange","state","Available","Disabled","Unauthorized","Unavailable","netSubscription","HTTP","MQTT","onNetworkStateChange","type","NetInfoStateType","none","isInternetReachable","Unreachable","_btSubscription","_netSubscription","remove","transportStatus","useMemo","waitingForInternetState","undefined","waitingForBluetoothState","availableTransport","transportError","push","internet","ble","getInvitationUrlTransports","url","customOpenIdUrlScheme","parsedUrl","parseUrl","e","parse_failed","protocol","toLowerCase","query","hasAllParameters","_len","arguments","length","params","Array","_key","every","param","transports","host"],"sources":["connectivity.ts"],"sourcesContent":["import {\n addEventListener as onNetworkStateChange,\n NetInfoStateType,\n NetInfoSubscription,\n} from '@react-native-community/netinfo';\nimport parseUrl from 'parse-url';\nimport { useEffect, useMemo, useState } from 'react';\nimport { EventSubscription } from 'react-native';\nimport BTStateManager from 'react-native-bluetooth-state-manager';\n\nexport enum InternetState {\n Available,\n Unreachable,\n Disabled,\n}\n\nexport type InternetError = Exclude<InternetState, InternetState.Available>;\n\nexport enum BluetoothState {\n Available,\n Unauthorized,\n Disabled,\n Unavailable,\n}\n\nexport type BluetoothError = Exclude<BluetoothState, BluetoothState.Available>;\n\nexport enum Transport {\n Bluetooth = 'BLE',\n HTTP = 'HTTP',\n MQTT = 'MQTT',\n}\n\nexport type TransportError = {\n ble?: BluetoothError;\n internet?: InternetError;\n};\n\nexport const useAvailableTransports = (\n supportedTransports: Transport[],\n): {\n availableTransport: Transport[] | undefined;\n transportError: TransportError;\n} => {\n const [internetState, setInternetState] = useState<InternetState>();\n const [bluetoothState, setBluetoothState] = useState<BluetoothState>();\n\n useEffect(() => {\n let btSubscription: EventSubscription | undefined;\n if (supportedTransports.includes(Transport.Bluetooth)) {\n btSubscription = BTStateManager.onStateChange((state) => {\n switch (state) {\n case 'PoweredOn':\n setBluetoothState(BluetoothState.Available);\n break;\n case 'PoweredOff':\n setBluetoothState(BluetoothState.Disabled);\n break;\n case 'Unauthorized':\n setBluetoothState(BluetoothState.Unauthorized);\n break;\n default:\n setBluetoothState(BluetoothState.Unavailable);\n }\n }, true);\n }\n let netSubscription: NetInfoSubscription | undefined;\n if (supportedTransports.includes(Transport.HTTP) || supportedTransports.includes(Transport.MQTT)) {\n netSubscription = onNetworkStateChange((state) => {\n if (state.type === NetInfoStateType.none) {\n setInternetState(InternetState.Disabled);\n return;\n }\n if (state.isInternetReachable === null) {\n return;\n }\n if (state.isInternetReachable) {\n setInternetState(InternetState.Available);\n } else {\n setInternetState(InternetState.Unreachable);\n }\n });\n }\n return () => {\n btSubscription?.remove();\n netSubscription?.();\n };\n }, [supportedTransports]);\n\n const transportStatus = useMemo(() => {\n const waitingForInternetState =\n (supportedTransports.includes(Transport.HTTP) || supportedTransports.includes(Transport.MQTT)) &&\n internetState === undefined;\n const waitingForBluetoothState = supportedTransports.includes(Transport.Bluetooth) && bluetoothState === undefined;\n if (waitingForInternetState || waitingForBluetoothState) {\n return {\n availableTransport: undefined,\n transportError: {},\n };\n }\n const availableTransport: Transport[] = [];\n const transportError: TransportError = {};\n if (internetState === InternetState.Available) {\n availableTransport.push(Transport.MQTT);\n availableTransport.push(Transport.HTTP);\n } else {\n transportError.internet = internetState;\n }\n if (bluetoothState === BluetoothState.Available) {\n availableTransport.push(Transport.Bluetooth);\n } else {\n transportError.ble = bluetoothState;\n }\n return { availableTransport, transportError };\n }, [bluetoothState, internetState, supportedTransports]);\n\n return transportStatus;\n};\n\nexport const getInvitationUrlTransports = (url: string, customOpenIdUrlScheme?: string): Transport[] => {\n let parsedUrl: parseUrl.ParsedUrl;\n try {\n parsedUrl = parseUrl(url);\n } catch (e) {\n return [];\n }\n\n if (parsedUrl.parse_failed) {\n return [];\n }\n const protocol = parsedUrl.protocol as string;\n if (protocol !== 'openid4vp' && protocol !== customOpenIdUrlScheme?.toLowerCase()) {\n return [Transport.HTTP];\n }\n\n const query = parsedUrl.query as Record<string, string>;\n const hasAllParameters = (...params: string[]): boolean => {\n return params.every((param) => param in query);\n };\n\n const transports: Transport[] = [];\n // BLE/MQTT\n if (parsedUrl.host === 'connect') {\n if (hasAllParameters('name', 'key')) {\n transports.push(Transport.Bluetooth);\n }\n if (hasAllParameters('key', 'brokerUrl', 'topicId')) {\n transports.push(Transport.MQTT);\n }\n\n return transports;\n }\n // HTTP\n if (\n hasAllParameters('response_type', 'state', 'nonce', 'presentation_definition_uri') ||\n hasAllParameters('client_id', 'request_uri')\n ) {\n transports.push(Transport.HTTP);\n }\n\n return transports;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,iCAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAkE,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAEtDG,aAAa;AAAAC,OAAA,CAAAD,aAAA,GAAAA,aAAA;AAAA,WAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;AAAA,GAAbA,aAAa,KAAAC,OAAA,CAAAD,aAAA,GAAbA,aAAa;AAAA,IAQbE,cAAc;AAAAD,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAAA,WAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;AAAA,GAAdA,cAAc,KAAAD,OAAA,CAAAC,cAAA,GAAdA,cAAc;AAAA,IASdC,SAAS;AAAAF,OAAA,CAAAE,SAAA,GAAAA,SAAA;AAAA,WAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;AAAA,GAATA,SAAS,KAAAF,OAAA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IV,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;MACnCS,UAAU,CAACtB,IAAI,CAACtC,SAAS,CAACW,SAAS,CAAC;IACtC;IACA,IAAIwC,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE;MACnDS,UAAU,CAACtB,IAAI,CAACtC,SAAS,CAACqB,IAAI,CAAC;IACjC;IAEA,OAAOuC,UAAU;EACnB;EACA;EACA,IACET,gBAAgB,CAAC,eAAe,EAAE,OAAO,EAAE,OAAO,EAAE,6BAA6B,CAAC,IAClFA,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,EAC5C;IACAS,UAAU,CAACtB,IAAI,CAACtC,SAAS,CAACoB,IAAI,CAAC;EACjC;EAEA,OAAOwC,UAAU;AACnB,CAAC;AAAC9D,OAAA,CAAA2C,0BAAA,GAAAA,0BAAA"}
|
|
1
|
+
{"version":3,"names":["_netinfo","require","_parseUrl","_interopRequireDefault","_react","_reactNativeBluetoothStateManager","_coreConfig","e","__esModule","default","InternetState","exports","BluetoothState","Transport","useAvailableTransports","possibleTransports","internetState","setInternetState","useState","bluetoothState","setBluetoothState","data","coreConfig","useCoreConfig","supportedTransports","useMemo","enabledTransports","getEnabledTransports","filter","t","includes","useEffect","btSubscription","Bluetooth","BTStateManager","onStateChange","state","Available","Disabled","Unauthorized","Unavailable","netSubscription","HTTP","MQTT","onNetworkStateChange","type","NetInfoStateType","none","isInternetReachable","Unreachable","_btSubscription","_netSubscription","remove","transportStatus","availableTransport","undefined","transportError","waitingForInternetState","waitingForBluetoothState","push","internet","ble","getInvitationUrlTransports","url","customOpenIdUrlScheme","parsedUrl","parseUrl","parse_failed","protocol","toLowerCase","query","hasAllParameters","params","every","param","transports","host"],"sources":["connectivity.ts"],"sourcesContent":["import {\n addEventListener as onNetworkStateChange,\n NetInfoStateType,\n NetInfoSubscription,\n} from '@react-native-community/netinfo';\nimport parseUrl from 'parse-url';\nimport { useEffect, useMemo, useState } from 'react';\nimport { EventSubscription } from 'react-native';\nimport BTStateManager from 'react-native-bluetooth-state-manager';\n\nimport { getEnabledTransports, useCoreConfig } from '../core/core-config';\n\nexport enum InternetState {\n Available,\n Unreachable,\n Disabled,\n}\n\nexport type InternetError = Exclude<InternetState, InternetState.Available>;\n\nexport enum BluetoothState {\n Available,\n Unauthorized,\n Disabled,\n Unavailable,\n}\n\nexport type BluetoothError = Exclude<BluetoothState, BluetoothState.Available>;\n\nexport enum Transport {\n Bluetooth = 'BLE',\n HTTP = 'HTTP',\n MQTT = 'MQTT',\n}\n\nexport type TransportError = {\n ble?: BluetoothError;\n internet?: InternetError;\n};\n\nexport const useAvailableTransports = (\n possibleTransports: Transport[],\n): {\n availableTransport: Transport[] | undefined;\n transportError: TransportError;\n} => {\n const [internetState, setInternetState] = useState<InternetState>();\n const [bluetoothState, setBluetoothState] = useState<BluetoothState>();\n\n const { data: coreConfig } = useCoreConfig();\n\n const supportedTransports = useMemo(() => {\n if (!coreConfig) {\n return;\n }\n const enabledTransports = getEnabledTransports(coreConfig);\n\n return possibleTransports.filter((t) => enabledTransports.includes(t));\n }, [possibleTransports, coreConfig]);\n\n useEffect(() => {\n if (!supportedTransports) {\n return;\n }\n\n let btSubscription: EventSubscription | undefined;\n if (supportedTransports.includes(Transport.Bluetooth)) {\n btSubscription = BTStateManager.onStateChange((state) => {\n switch (state) {\n case 'PoweredOn':\n setBluetoothState(BluetoothState.Available);\n break;\n case 'PoweredOff':\n setBluetoothState(BluetoothState.Disabled);\n break;\n case 'Unauthorized':\n setBluetoothState(BluetoothState.Unauthorized);\n break;\n default:\n setBluetoothState(BluetoothState.Unavailable);\n }\n }, true);\n }\n let netSubscription: NetInfoSubscription | undefined;\n if (supportedTransports.includes(Transport.HTTP) || supportedTransports.includes(Transport.MQTT)) {\n netSubscription = onNetworkStateChange((state) => {\n if (state.type === NetInfoStateType.none) {\n setInternetState(InternetState.Disabled);\n return;\n }\n if (state.isInternetReachable === null) {\n return;\n }\n if (state.isInternetReachable) {\n setInternetState(InternetState.Available);\n } else {\n setInternetState(InternetState.Unreachable);\n }\n });\n }\n return () => {\n btSubscription?.remove();\n netSubscription?.();\n };\n }, [supportedTransports]);\n\n const transportStatus = useMemo(() => {\n if (!supportedTransports) {\n return {\n availableTransport: undefined,\n transportError: {},\n };\n }\n\n const waitingForInternetState =\n (supportedTransports.includes(Transport.HTTP) || supportedTransports.includes(Transport.MQTT)) &&\n internetState === undefined;\n const waitingForBluetoothState = supportedTransports.includes(Transport.Bluetooth) && bluetoothState === undefined;\n if (waitingForInternetState || waitingForBluetoothState) {\n return {\n availableTransport: undefined,\n transportError: {},\n };\n }\n const availableTransport: Transport[] = [];\n const transportError: TransportError = {};\n if (internetState === InternetState.Available) {\n supportedTransports.includes(Transport.MQTT) && availableTransport.push(Transport.MQTT);\n supportedTransports.includes(Transport.HTTP) && availableTransport.push(Transport.HTTP);\n } else {\n transportError.internet = internetState;\n }\n if (bluetoothState === BluetoothState.Available) {\n availableTransport.push(Transport.Bluetooth);\n } else {\n transportError.ble = bluetoothState;\n }\n return { availableTransport, transportError };\n }, [bluetoothState, internetState, supportedTransports]);\n\n return transportStatus;\n};\n\nexport const getInvitationUrlTransports = (url: string, customOpenIdUrlScheme?: string): Transport[] => {\n let parsedUrl: parseUrl.ParsedUrl;\n try {\n parsedUrl = parseUrl(url);\n } catch (e) {\n return [];\n }\n\n if (parsedUrl.parse_failed) {\n return [];\n }\n const protocol = parsedUrl.protocol as string;\n if (protocol !== 'openid4vp' && protocol !== customOpenIdUrlScheme?.toLowerCase()) {\n return [Transport.HTTP];\n }\n\n const query = parsedUrl.query as Record<string, string>;\n const hasAllParameters = (...params: string[]): boolean => {\n return params.every((param) => param in query);\n };\n\n const transports: Transport[] = [];\n // BLE/MQTT\n if (parsedUrl.host === 'connect') {\n if (hasAllParameters('name', 'key')) {\n transports.push(Transport.Bluetooth);\n }\n if (hasAllParameters('brokerUrl', 'topicId')) {\n transports.push(Transport.MQTT);\n }\n\n return transports;\n }\n // HTTP\n if (\n hasAllParameters('response_type', 'state', 'nonce', 'presentation_definition_uri') ||\n hasAllParameters('client_id', 'request_uri')\n ) {\n transports.push(Transport.HTTP);\n }\n\n return transports;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,iCAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AAA0E,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAE9DG,aAAa,GAAAC,OAAA,CAAAD,aAAA,0BAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAbA,aAAa,CAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAAA,IAQbE,cAAc,GAAAD,OAAA,CAAAC,cAAA,0BAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA;AAAA,IASdC,SAAS,GAAAF,OAAA,CAAAE,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAWd,MAAMC,sBAAsB,GACjCC,kBAA+B,IAI5B;EACH,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAG,IAAAC,eAAQ,EAAgB,CAAC;EACnE,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAF,eAAQ,EAAiB,CAAC;EAEtE,MAAM;IAAEG,IAAI,EAAEC;EAAW,CAAC,GAAG,IAAAC,yBAAa,EAAC,CAAC;EAE5C,MAAMC,mBAAmB,GAAG,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GAAGC,MAAgB,KAAc;IACzD,OAAOA,MAAM,CAACC,KAAK,CAAEC,KAAK,IAAKA,KAAK,IAAIJ,KAAK,CAAC;EAChD,CAAC;EAED,MAAMK,UAAuB,GAAG,EAAE;EAClC;EACA,IAAIV,SAAS,CAACW,IAAI,KAAK,SAAS,EAAE;IAChC,IAAIL,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;MACnCI,UAAU,CAAChB,IAAI,CAAC9C,SAAS,CAACoB,SAAS,CAAC;IACtC;IACA,IAAIsC,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE;MAC5CI,UAAU,CAAChB,IAAI,CAAC9C,SAAS,CAAC8B,IAAI,CAAC;IACjC;IAEA,OAAOgC,UAAU;EACnB;EACA;EACA,IACEJ,gBAAgB,CAAC,eAAe,EAAE,OAAO,EAAE,OAAO,EAAE,6BAA6B,CAAC,IAClFA,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC,EAC5C;IACAI,UAAU,CAAChB,IAAI,CAAC9C,SAAS,CAAC6B,IAAI,CAAC;EACjC;EAEA,OAAOiC,UAAU;AACnB,CAAC;AAAChE,OAAA,CAAAmD,0BAAA,GAAAA,0BAAA","ignoreList":[]}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _connectivity = require("./connectivity");
|
|
4
|
+
jest.mock('@procivis/react-native-one-core', () => ({
|
|
5
|
+
initializeCore: () => Promise.resolve({})
|
|
6
|
+
}));
|
|
7
|
+
jest.mock('@sentry/react-native', () => ({
|
|
8
|
+
captureException: () => {}
|
|
9
|
+
}));
|
|
4
10
|
jest.mock('@react-native-community/netinfo', () => ({
|
|
5
11
|
addEventListener: () => {}
|
|
6
12
|
}));
|