@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,28 +1,28 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
1
|
+
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); }
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { Platform, StyleSheet, View } from 'react-native';
|
|
4
|
-
import {
|
|
4
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
5
|
import { Button } from '../buttons/button';
|
|
6
6
|
import NavigationHeader from '../header/navigation-header';
|
|
7
7
|
import Typography from '../text/typography';
|
|
8
8
|
import { useAppColorScheme } from '../theme/color-scheme-context';
|
|
9
9
|
import LoaderView from './loader';
|
|
10
|
-
const LoadingResultScreen =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
10
|
+
const LoadingResultScreen = ({
|
|
11
|
+
button,
|
|
12
|
+
header,
|
|
13
|
+
loader: {
|
|
14
|
+
label,
|
|
15
|
+
...loaderProps
|
|
16
|
+
},
|
|
17
|
+
secondaryButton: button2,
|
|
18
|
+
style,
|
|
19
|
+
tertiaryButton: button3,
|
|
20
|
+
...viewProps
|
|
21
|
+
}) => {
|
|
23
22
|
const colorScheme = useAppColorScheme();
|
|
24
23
|
const {
|
|
25
|
-
top
|
|
24
|
+
top,
|
|
25
|
+
bottom
|
|
26
26
|
} = useSafeAreaInsets();
|
|
27
27
|
let headerPaddingStyle;
|
|
28
28
|
if (Platform.OS === 'android') {
|
|
@@ -32,6 +32,9 @@ const LoadingResultScreen = _ref => {
|
|
|
32
32
|
} else if (!(header !== null && header !== void 0 && header.modalHandleVisible) && Platform.OS === 'ios') {
|
|
33
33
|
headerPaddingStyle = styles.modalHeaderWithoutHandle;
|
|
34
34
|
}
|
|
35
|
+
let buttonsWrapperMarginStyle = {
|
|
36
|
+
marginBottom: bottom
|
|
37
|
+
};
|
|
35
38
|
return /*#__PURE__*/React.createElement(View, _extends({
|
|
36
39
|
style: [styles.container, {
|
|
37
40
|
backgroundColor: colorScheme.background
|
|
@@ -45,9 +48,8 @@ const LoadingResultScreen = _ref => {
|
|
|
45
48
|
color: colorScheme.text,
|
|
46
49
|
preset: "regular",
|
|
47
50
|
style: styles.label
|
|
48
|
-
}, label)), /*#__PURE__*/React.createElement(
|
|
49
|
-
|
|
50
|
-
style: styles.buttonWrapper
|
|
51
|
+
}, label)), /*#__PURE__*/React.createElement(View, {
|
|
52
|
+
style: [styles.buttonWrapper, buttonsWrapperMarginStyle]
|
|
51
53
|
}, button && /*#__PURE__*/React.createElement(Button, button, button.title), button2 && /*#__PURE__*/React.createElement(Button, button2, button2.title), button3 && /*#__PURE__*/React.createElement(Button, button3, button3.title)));
|
|
52
54
|
};
|
|
53
55
|
const styles = StyleSheet.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","StyleSheet","View","
|
|
1
|
+
{"version":3,"names":["React","Platform","StyleSheet","View","useSafeAreaInsets","Button","NavigationHeader","Typography","useAppColorScheme","LoaderView","LoadingResultScreen","button","header","loader","label","loaderProps","secondaryButton","button2","style","tertiaryButton","button3","viewProps","colorScheme","top","bottom","headerPaddingStyle","OS","paddingTop","modalHandleVisible","styles","modalHeaderWithoutHandle","buttonsWrapperMarginStyle","marginBottom","createElement","_extends","container","backgroundColor","background","headerWrapper","loaderWrapper","align","color","text","preset","buttonWrapper","title","create","gap","height","justifyContent","padding","alignItems","flex","flexDirection","marginHorizontal","marginTop"],"sources":["loading-result.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Platform, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Button, ButtonProps } from '../buttons/button';\nimport NavigationHeader, { NavigationHeaderProps } from '../header/navigation-header';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\nimport LoaderView, { LoaderViewProps } from './loader';\n\nexport type LoadingResultScreenProps = ViewProps & {\n button?: ButtonProps;\n header?: NavigationHeaderProps;\n loader: LoaderViewProps & {\n label?: string;\n };\n secondaryButton?: ButtonProps;\n tertiaryButton?: ButtonProps;\n};\n\nconst LoadingResultScreen: FC<LoadingResultScreenProps> = ({\n button,\n header,\n loader: { label, ...loaderProps },\n secondaryButton: button2,\n style,\n tertiaryButton: button3,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n const { top, bottom } = useSafeAreaInsets();\n\n let headerPaddingStyle: ViewStyle | undefined;\n if (Platform.OS === 'android') {\n headerPaddingStyle = {\n paddingTop: top,\n };\n } else if (!header?.modalHandleVisible && Platform.OS === 'ios') {\n headerPaddingStyle = styles.modalHeaderWithoutHandle;\n }\n\n let buttonsWrapperMarginStyle: ViewStyle = {\n marginBottom: bottom,\n };\n\n return (\n <View style={[styles.container, { backgroundColor: colorScheme.background }, style]} {...viewProps}>\n <View style={[styles.headerWrapper, headerPaddingStyle]}>\n <NavigationHeader {...header} />\n </View>\n <View style={styles.loaderWrapper}>\n <LoaderView {...loaderProps} />\n <Typography align=\"center\" color={colorScheme.text} preset=\"regular\" style={styles.label}>\n {label}\n </Typography>\n </View>\n <View style={[styles.buttonWrapper, buttonsWrapperMarginStyle]}>\n {button && <Button {...button}>{button.title}</Button>}\n {button2 && <Button {...button2}>{button2.title}</Button>}\n {button3 && <Button {...button3}>{button3.title}</Button>}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n buttonWrapper: {\n gap: 12,\n height: 274,\n justifyContent: 'flex-end',\n padding: 12,\n },\n container: {\n alignItems: 'stretch',\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'space-between',\n },\n headerWrapper: {\n height: 215,\n },\n label: {\n marginHorizontal: 20,\n marginTop: 20,\n },\n loaderWrapper: {\n alignItems: 'center',\n flexDirection: 'column',\n height: 108,\n justifyContent: 'space-between',\n },\n modalHeaderWithoutHandle: {\n paddingTop: 15,\n },\n});\n\nexport default LoadingResultScreen;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAA8B,cAAc;AAC/E,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,MAAM,QAAqB,mBAAmB;AACvD,OAAOC,gBAAgB,MAAiC,6BAA6B;AACrF,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,OAAOC,UAAU,MAA2B,UAAU;AAYtD,MAAMC,mBAAiD,GAAGA,CAAC;EACzDC,MAAM;EACNC,MAAM;EACNC,MAAM,EAAE;IAAEC,KAAK;IAAE,GAAGC;EAAY,CAAC;EACjCC,eAAe,EAAEC,OAAO;EACxBC,KAAK;EACLC,cAAc,EAAEC,OAAO;EACvB,GAAGC;AACL,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGd,iBAAiB,CAAC,CAAC;EACvC,MAAM;IAAEe,GAAG;IAAEC;EAAO,CAAC,GAAGpB,iBAAiB,CAAC,CAAC;EAE3C,IAAIqB,kBAAyC;EAC7C,IAAIxB,QAAQ,CAACyB,EAAE,KAAK,SAAS,EAAE;IAC7BD,kBAAkB,GAAG;MACnBE,UAAU,EAAEJ;IACd,CAAC;EACH,CAAC,MAAM,IAAI,EAACX,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEgB,kBAAkB,KAAI3B,QAAQ,CAACyB,EAAE,KAAK,KAAK,EAAE;IAC/DD,kBAAkB,GAAGI,MAAM,CAACC,wBAAwB;EACtD;EAEA,IAAIC,yBAAoC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MAAM,CAAC;EAC/BF,aAAa,EAAE;IACbG,GAAG,EAAE,EAAE;IACPC,MAAM,EAAE,GAAG;IACXC,cAAc,EAAE,UAAU;IAC1BC,OAAO,EAAE;EACX,CAAC;EACDf,SAAS,EAAE;IACTgB,UAAU,EAAE,SAAS;IACrBC,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE,QAAQ;IACvBJ,cAAc,EAAE;EAClB,CAAC;EACDX,aAAa,EAAE;IACbU,MAAM,EAAE;EACV,CAAC;EACDlC,KAAK,EAAE;IACLwC,gBAAgB,EAAE,EAAE;IACpBC,SAAS,EAAE;EACb,CAAC;EACDhB,aAAa,EAAE;IACbY,UAAU,EAAE,QAAQ;IACpBE,aAAa,EAAE,QAAQ;IACvBL,MAAM,EAAE,GAAG;IACXC,cAAc,EAAE;EAClB,CAAC;EACDnB,wBAAwB,EAAE;IACxBH,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAejB,mBAAmB","ignoreList":[]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import NerdModeItem, { ActionIcon
|
|
2
|
-
export { ActionIcon, NerdModeItem
|
|
1
|
+
import NerdModeItem, { ActionIcon } from './nerd-mode-item';
|
|
2
|
+
export { ActionIcon, NerdModeItem };
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NerdModeItem","ActionIcon"
|
|
1
|
+
{"version":3,"names":["NerdModeItem","ActionIcon"],"sources":["index.ts"],"sourcesContent":["import type { NerdModeItemProps } from './nerd-mode-item';\nimport NerdModeItem, { ActionIcon } from './nerd-mode-item';\n\nexport { ActionIcon, NerdModeItem, NerdModeItemProps };\n"],"mappings":"AACA,OAAOA,YAAY,IAAIC,UAAU,QAAQ,kBAAkB;AAE3D,SAASA,UAAU,EAAED,YAAY","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import { Dimensions, Linking, StyleSheet, View } from 'react-native';
|
|
3
|
-
import { TouchableOpacity } from 'react-native-gesture-handler';
|
|
4
3
|
import Animated, { clamp, useAnimatedStyle, useDerivedValue, useSharedValue } from 'react-native-reanimated';
|
|
5
4
|
import { reportException } from '../../utils';
|
|
6
5
|
import { concatTestID } from '../../utils/testID';
|
|
6
|
+
import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
|
|
7
7
|
import { Button, ButtonType } from '../buttons/button';
|
|
8
8
|
import { CopyContentIcon, OpenLinkIcon } from '../icons/nerd-view';
|
|
9
9
|
import Typography from '../text/typography';
|
|
@@ -53,14 +53,13 @@ const styles = StyleSheet.create({
|
|
|
53
53
|
paddingBottom: 30
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
export const ActionIcon =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
} = _ref;
|
|
56
|
+
export const ActionIcon = ({
|
|
57
|
+
value,
|
|
58
|
+
link,
|
|
59
|
+
onCopyToClipboard,
|
|
60
|
+
testID,
|
|
61
|
+
copy
|
|
62
|
+
}) => {
|
|
64
63
|
const handleCopy = useCallback(() => {
|
|
65
64
|
onCopyToClipboard(value);
|
|
66
65
|
}, [onCopyToClipboard, value]);
|
|
@@ -85,13 +84,12 @@ export const ActionIcon = _ref => {
|
|
|
85
84
|
}
|
|
86
85
|
return null;
|
|
87
86
|
};
|
|
88
|
-
const TextWithHighlight =
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
} = _ref2;
|
|
87
|
+
const TextWithHighlight = ({
|
|
88
|
+
highlightedText,
|
|
89
|
+
onLayout,
|
|
90
|
+
testID,
|
|
91
|
+
text
|
|
92
|
+
}) => {
|
|
95
93
|
const colorScheme = useAppColorScheme();
|
|
96
94
|
return /*#__PURE__*/React.createElement(Typography, {
|
|
97
95
|
color: colorScheme.white,
|
|
@@ -104,22 +102,21 @@ const TextWithHighlight = _ref2 => {
|
|
|
104
102
|
preset: "s/code"
|
|
105
103
|
}, highlightedText), text);
|
|
106
104
|
};
|
|
107
|
-
const NerdModeItem =
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
} = _ref3;
|
|
105
|
+
const NerdModeItem = ({
|
|
106
|
+
highlightedText = '',
|
|
107
|
+
attributeText = '',
|
|
108
|
+
attributeKey,
|
|
109
|
+
labels,
|
|
110
|
+
link,
|
|
111
|
+
canBeCopied,
|
|
112
|
+
onCopyToClipboard,
|
|
113
|
+
onExpand,
|
|
114
|
+
expandedAttributes,
|
|
115
|
+
last = false,
|
|
116
|
+
scrollOffset,
|
|
117
|
+
element,
|
|
118
|
+
testID
|
|
119
|
+
}) => {
|
|
123
120
|
const colorScheme = useAppColorScheme();
|
|
124
121
|
const valueViewRef = React.useRef(null);
|
|
125
122
|
const [isSingleLine, setIsSingleLine] = useState();
|
|
@@ -158,7 +155,7 @@ const NerdModeItem = _ref3 => {
|
|
|
158
155
|
translateY: iconTopPosition.value
|
|
159
156
|
}]
|
|
160
157
|
};
|
|
161
|
-
});
|
|
158
|
+
}, [iconTopPosition]);
|
|
162
159
|
const previewText = expanded ? attributeText : attributeText.slice(0, VALUE_PREVIEW_LENGTH) + '...';
|
|
163
160
|
useEffect(() => {
|
|
164
161
|
if (!scrollOffset || isSingleLine === undefined) {
|
|
@@ -166,7 +163,7 @@ const NerdModeItem = _ref3 => {
|
|
|
166
163
|
}
|
|
167
164
|
setTimeout(() => {
|
|
168
165
|
var _valueViewRef$current;
|
|
169
|
-
(_valueViewRef$current = valueViewRef.current) === null || _valueViewRef$current === void 0
|
|
166
|
+
(_valueViewRef$current = valueViewRef.current) === null || _valueViewRef$current === void 0 || _valueViewRef$current.measure((x, y, w, h, px, py) => {
|
|
170
167
|
expandedView.value = {
|
|
171
168
|
expandedAtOffset: isSingleLine ? 0 : scrollOffset.value,
|
|
172
169
|
viewHeight: isSingleLine ? 0 : h - 2 * CONTAINER_PADDING,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useMemo","useState","Dimensions","Linking","StyleSheet","View","TouchableOpacity","Animated","clamp","useAnimatedStyle","useDerivedValue","useSharedValue","reportException","concatTestID","Button","ButtonType","CopyContentIcon","OpenLinkIcon","Typography","useAppColorScheme","VALUE_PREVIEW_LENGTH","ICON_HEIGHT","CONTAINER_PADDING","styles","create","actionIcon","alignItems","flex","height","justifyContent","actionIconSingleLine","attributeLabel","marginBottom","paddingHorizontal","attributeValue","flexGrow","attributeValueContainer","borderRadius","borderWidth","flexDirection","padding","container","paddingTop","expandValueButton","marginTop","lastAttribute","paddingBottom","ActionIcon","_ref","value","link","onCopyToClipboard","testID","copy","handleCopy","openLink","openURL","catch","e","createElement","onPress","TextWithHighlight","_ref2","highlightedText","onLayout","text","colorScheme","color","white","preset","style","nerdView","codeHighlightText","NerdModeItem","_ref3","attributeText","attributeKey","labels","canBeCopied","onExpand","expandedAttributes","last","scrollOffset","element","valueViewRef","useRef","isSingleLine","setIsSingleLine","expandedView","expandedAtOffset","viewHeight","viewStart","expandable","length","expanded","setExpanded","screenMiddle","get","iconTopPosition","undefined","iconHeight","viewEnd","zeroedOffset","iconStyle","transform","translateY","previewText","slice","setTimeout","_valueViewRef$current","current","measure","x","y","w","h","px","py","onTextLayout","event","nativeEvent","layout","backgroundColor","attributeSectionBackground","ref","attributeValueBackground","borderColor","attributeValueBorder","title","collapse","expand","type","SmallTech"],"sources":["nerd-mode-item.tsx"],"sourcesContent":["import React, { FunctionComponent, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Dimensions, LayoutChangeEvent, Linking, StyleSheet, View, ViewStyle } from 'react-native';\nimport { TouchableOpacity } from 'react-native-gesture-handler';\nimport Animated, {\n clamp,\n SharedValue,\n useAnimatedStyle,\n useDerivedValue,\n useSharedValue,\n} from 'react-native-reanimated';\n\nimport { reportException } from '../../utils';\nimport { concatTestID } from '../../utils/testID';\nimport { Button, ButtonType } from '../buttons/button';\nimport { CopyContentIcon, OpenLinkIcon } from '../icons/nerd-view';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nconst VALUE_PREVIEW_LENGTH = 80;\nconst ICON_HEIGHT = 48;\nconst CONTAINER_PADDING = 8;\n\n// The onExpand and expandedAttributes props are used to notify other expanded fields\n// that the layout (and thus the scrollOffset / icon position) has changed. This\n// will trigger a view measurement and repositioning of the icon on all expanded fields.\n\nexport type NerdModeItemProps = {\n attributeKey: string;\n attributeText?: string;\n canBeCopied?: boolean;\n element?: React.ReactElement;\n expandedAttributes?: number;\n highlightedText?: string;\n labels: {\n expand: string;\n collapse: string;\n };\n last?: boolean;\n link?: string;\n onCopyToClipboard: (value: string) => void;\n onExpand?: (expanded: boolean) => void;\n scrollOffset?: SharedValue<number>;\n testID?: string;\n};\n\nconst styles = StyleSheet.create({\n actionIcon: {\n alignItems: 'center',\n flex: 0.15,\n height: ICON_HEIGHT,\n justifyContent: 'center',\n },\n actionIconSingleLine: {\n height: 24,\n },\n attributeLabel: {\n marginBottom: 4,\n paddingHorizontal: 6,\n },\n attributeValue: {\n flex: 0.85,\n flexGrow: 1,\n },\n attributeValueContainer: {\n borderRadius: 2,\n borderWidth: 0.2,\n flexDirection: 'row',\n padding: CONTAINER_PADDING,\n },\n container: {\n paddingHorizontal: 20,\n paddingTop: 16,\n },\n expandValueButton: {\n borderRadius: 4,\n borderWidth: 0,\n marginTop: 4,\n },\n lastAttribute: {\n paddingBottom: 30,\n },\n});\n\nexport const ActionIcon: FunctionComponent<{\n copy?: boolean;\n link?: string;\n onCopyToClipboard: (value: string) => void;\n style?: ViewStyle;\n testID?: string;\n value: string;\n}> = ({ value, link, onCopyToClipboard, testID, copy }) => {\n const handleCopy = useCallback(() => {\n onCopyToClipboard(value);\n }, [onCopyToClipboard, value]);\n\n const openLink = useCallback(() => {\n if (link) {\n Linking.openURL(link).catch((e) => {\n reportException(e, 'Error opening nerd link');\n });\n }\n }, [link]);\n\n if (copy) {\n return (\n <TouchableOpacity onPress={handleCopy} testID={testID}>\n <CopyContentIcon />\n </TouchableOpacity>\n );\n }\n\n if (link) {\n return (\n <TouchableOpacity onPress={openLink} testID={testID}>\n <OpenLinkIcon />\n </TouchableOpacity>\n );\n }\n\n return null;\n};\n\nconst TextWithHighlight: FunctionComponent<{\n highlightedText: string;\n onLayout?: (event: LayoutChangeEvent) => void;\n testID: string;\n text: string;\n}> = ({ highlightedText, onLayout, testID, text }) => {\n const colorScheme = useAppColorScheme();\n return (\n <Typography\n color={colorScheme.white}\n onLayout={onLayout}\n preset=\"s/code\"\n style={styles.attributeValue}\n testID={testID}>\n <Typography color={colorScheme.nerdView.codeHighlightText} preset=\"s/code\">\n {highlightedText}\n </Typography>\n {text}\n </Typography>\n );\n};\n\nconst NerdModeItem: FunctionComponent<NerdModeItemProps> = ({\n highlightedText = '',\n attributeText = '',\n attributeKey,\n labels,\n link,\n canBeCopied,\n onCopyToClipboard,\n onExpand,\n expandedAttributes,\n last = false,\n scrollOffset,\n element,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n const valueViewRef = React.useRef<View>(null);\n const [isSingleLine, setIsSingleLine] = useState<boolean>();\n\n const expandedView = useSharedValue({\n expandedAtOffset: 0,\n viewHeight: 0,\n viewStart: 0,\n });\n\n const expandable = attributeText.length > VALUE_PREVIEW_LENGTH;\n const [expanded, setExpanded] = useState(!expandable);\n\n const screenMiddle = useMemo(() => Dimensions.get('screen').height / 2, []);\n\n const iconTopPosition = useDerivedValue(() => {\n if (isSingleLine === undefined) {\n return 0;\n }\n if (!expanded || !expandable || !scrollOffset || isSingleLine) {\n const iconHeight = isSingleLine ? 0 : ICON_HEIGHT;\n return expandedView.value.viewHeight / 2 - iconHeight / 2;\n }\n\n const viewEnd = expandedView.value.viewStart + expandedView.value.viewHeight;\n let zeroedOffset = scrollOffset.value - expandedView.value.expandedAtOffset;\n\n if (expandedView.value.viewStart > screenMiddle) {\n zeroedOffset = zeroedOffset - (expandedView.value.viewStart - screenMiddle + ICON_HEIGHT / 2);\n } else {\n if (viewEnd < screenMiddle + ICON_HEIGHT) {\n zeroedOffset = zeroedOffset + (screenMiddle - expandedView.value.viewStart - ICON_HEIGHT / 2);\n } else if (expandedView.value.viewStart < screenMiddle && viewEnd > screenMiddle) {\n zeroedOffset = zeroedOffset + (screenMiddle - expandedView.value.viewStart - ICON_HEIGHT / 2);\n }\n }\n\n return clamp(zeroedOffset, 0, expandedView.value.viewHeight - ICON_HEIGHT - 8);\n });\n\n const iconStyle = useAnimatedStyle(() => {\n return {\n transform: [\n {\n translateY: iconTopPosition.value,\n },\n ],\n };\n });\n\n const previewText = expanded ? attributeText : attributeText.slice(0, VALUE_PREVIEW_LENGTH) + '...';\n\n useEffect(() => {\n if (!scrollOffset || isSingleLine === undefined) {\n return;\n }\n\n setTimeout(() => {\n valueViewRef.current?.measure((x, y, w, h, px, py) => {\n expandedView.value = {\n expandedAtOffset: isSingleLine ? 0 : scrollOffset.value,\n viewHeight: isSingleLine ? 0 : h - 2 * CONTAINER_PADDING,\n viewStart: py,\n };\n });\n }, 0);\n // We only recompute when any attribute is expanded\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [expandedAttributes, isSingleLine]);\n\n const onTextLayout = useCallback((event: LayoutChangeEvent) => {\n const { height } = event.nativeEvent.layout;\n setIsSingleLine(height <= 24);\n }, []);\n\n return (\n <View\n style={[\n styles.container,\n { backgroundColor: colorScheme.nerdView.attributeSectionBackground },\n last ? styles.lastAttribute : {},\n ]}\n testID={testID}>\n <Typography\n color={colorScheme.nerdView.attributeLabel}\n preset=\"s/code\"\n style={styles.attributeLabel}\n testID={concatTestID(testID, 'attributeLabel')}>\n {attributeKey}\n </Typography>\n <View\n ref={valueViewRef}\n style={[\n styles.attributeValueContainer,\n {\n backgroundColor: colorScheme.nerdView.attributeValueBackground,\n borderColor: colorScheme.nerdView.attributeValueBorder,\n },\n ]}>\n {element ? (\n element\n ) : (\n <TextWithHighlight\n highlightedText={highlightedText}\n onLayout={onTextLayout}\n testID={concatTestID(testID, 'attributeValue')!}\n text={previewText}\n />\n )}\n {(canBeCopied || link) && isSingleLine !== undefined ? (\n <Animated.View style={[styles.actionIcon, isSingleLine ? styles.actionIconSingleLine : undefined, iconStyle]}>\n {\n <ActionIcon\n copy={canBeCopied}\n link={link}\n onCopyToClipboard={onCopyToClipboard}\n testID={concatTestID(testID, 'actionIcon')}\n value={`${highlightedText}${attributeText}`}\n />\n }\n </Animated.View>\n ) : null}\n </View>\n {expandable ? (\n <Button\n onPress={() => {\n onExpand && onExpand(!expanded);\n setExpanded(!expanded);\n }}\n style={styles.expandValueButton}\n testID={concatTestID(testID, 'expandValueButton')}\n title={expanded ? labels.collapse : labels.expand}\n type={ButtonType.SmallTech}\n />\n ) : null}\n </View>\n );\n};\n\nexport default NerdModeItem;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAuBC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC3F,SAASC,UAAU,EAAqBC,OAAO,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAClG,SAASC,gBAAgB,QAAQ,8BAA8B;AAC/D,OAAOC,QAAQ,IACbC,KAAK,EAELC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,QACT,yBAAyB;AAEhC,SAASC,eAAe,QAAQ,aAAa;AAC7C,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,MAAM,EAAEC,UAAU,QAAQ,mBAAmB;AACtD,SAASC,eAAe,EAAEC,YAAY,QAAQ,oBAAoB;AAClE,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AAEjE,MAA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,CAACuC,MAAM,EAAE,mBAAmB,CAAE;IAClD4E,KAAK,EAAElC,QAAQ,GAAGjB,MAAM,CAACoD,QAAQ,GAAGpD,MAAM,CAACqD,MAAO;IAClDC,IAAI,EAAEpH,UAAU,CAACqH;EAAU,EAC3B,GACA,IAAI,CACH;AAEX,CAAC;AAED,eAAe3D,YAAY"}
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useMemo","useState","Dimensions","Linking","StyleSheet","View","Animated","clamp","useAnimatedStyle","useDerivedValue","useSharedValue","reportException","concatTestID","TouchableOpacity","Button","ButtonType","CopyContentIcon","OpenLinkIcon","Typography","useAppColorScheme","VALUE_PREVIEW_LENGTH","ICON_HEIGHT","CONTAINER_PADDING","styles","create","actionIcon","alignItems","flex","height","justifyContent","actionIconSingleLine","attributeLabel","marginBottom","paddingHorizontal","attributeValue","flexGrow","attributeValueContainer","borderRadius","borderWidth","flexDirection","padding","container","paddingTop","expandValueButton","marginTop","lastAttribute","paddingBottom","ActionIcon","value","link","onCopyToClipboard","testID","copy","handleCopy","openLink","openURL","catch","e","createElement","onPress","TextWithHighlight","highlightedText","onLayout","text","colorScheme","color","white","preset","style","nerdView","codeHighlightText","NerdModeItem","attributeText","attributeKey","labels","canBeCopied","onExpand","expandedAttributes","last","scrollOffset","element","valueViewRef","useRef","isSingleLine","setIsSingleLine","expandedView","expandedAtOffset","viewHeight","viewStart","expandable","length","expanded","setExpanded","screenMiddle","get","iconTopPosition","undefined","iconHeight","viewEnd","zeroedOffset","iconStyle","transform","translateY","previewText","slice","setTimeout","_valueViewRef$current","current","measure","x","y","w","h","px","py","onTextLayout","event","nativeEvent","layout","backgroundColor","attributeSectionBackground","ref","attributeValueBackground","borderColor","attributeValueBorder","title","collapse","expand","type","SmallTech"],"sources":["nerd-mode-item.tsx"],"sourcesContent":["import React, { FunctionComponent, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Dimensions, LayoutChangeEvent, Linking, StyleSheet, View, ViewStyle } from 'react-native';\nimport Animated, {\n clamp,\n SharedValue,\n useAnimatedStyle,\n useDerivedValue,\n useSharedValue,\n} from 'react-native-reanimated';\n\nimport { reportException } from '../../utils';\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport { Button, ButtonType } from '../buttons/button';\nimport { CopyContentIcon, OpenLinkIcon } from '../icons/nerd-view';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nconst VALUE_PREVIEW_LENGTH = 80;\nconst ICON_HEIGHT = 48;\nconst CONTAINER_PADDING = 8;\n\n// The onExpand and expandedAttributes props are used to notify other expanded fields\n// that the layout (and thus the scrollOffset / icon position) has changed. This\n// will trigger a view measurement and repositioning of the icon on all expanded fields.\n\nexport type NerdModeItemProps = {\n attributeKey: string;\n attributeText?: string;\n canBeCopied?: boolean;\n element?: React.ReactElement;\n expandedAttributes?: number;\n highlightedText?: string;\n labels: {\n expand: string;\n collapse: string;\n };\n last?: boolean;\n link?: string;\n onCopyToClipboard: (value: string) => void;\n onExpand?: (expanded: boolean) => void;\n scrollOffset?: SharedValue<number>;\n testID?: string;\n};\n\nconst styles = StyleSheet.create({\n actionIcon: {\n alignItems: 'center',\n flex: 0.15,\n height: ICON_HEIGHT,\n justifyContent: 'center',\n },\n actionIconSingleLine: {\n height: 24,\n },\n attributeLabel: {\n marginBottom: 4,\n paddingHorizontal: 6,\n },\n attributeValue: {\n flex: 0.85,\n flexGrow: 1,\n },\n attributeValueContainer: {\n borderRadius: 2,\n borderWidth: 0.2,\n flexDirection: 'row',\n padding: CONTAINER_PADDING,\n },\n container: {\n paddingHorizontal: 20,\n paddingTop: 16,\n },\n expandValueButton: {\n borderRadius: 4,\n borderWidth: 0,\n marginTop: 4,\n },\n lastAttribute: {\n paddingBottom: 30,\n },\n});\n\nexport const ActionIcon: FunctionComponent<{\n copy?: boolean;\n link?: string;\n onCopyToClipboard: (value: string) => void;\n style?: ViewStyle;\n testID?: string;\n value: string;\n}> = ({ value, link, onCopyToClipboard, testID, copy }) => {\n const handleCopy = useCallback(() => {\n onCopyToClipboard(value);\n }, [onCopyToClipboard, value]);\n\n const openLink = useCallback(() => {\n if (link) {\n Linking.openURL(link).catch((e) => {\n reportException(e, 'Error opening nerd link');\n });\n }\n }, [link]);\n\n if (copy) {\n return (\n <TouchableOpacity onPress={handleCopy} testID={testID}>\n <CopyContentIcon />\n </TouchableOpacity>\n );\n }\n\n if (link) {\n return (\n <TouchableOpacity onPress={openLink} testID={testID}>\n <OpenLinkIcon />\n </TouchableOpacity>\n );\n }\n\n return null;\n};\n\nconst TextWithHighlight: FunctionComponent<{\n highlightedText: string;\n onLayout?: (event: LayoutChangeEvent) => void;\n testID: string;\n text: string;\n}> = ({ highlightedText, onLayout, testID, text }) => {\n const colorScheme = useAppColorScheme();\n return (\n <Typography\n color={colorScheme.white}\n onLayout={onLayout}\n preset=\"s/code\"\n style={styles.attributeValue}\n testID={testID}>\n <Typography color={colorScheme.nerdView.codeHighlightText} preset=\"s/code\">\n {highlightedText}\n </Typography>\n {text}\n </Typography>\n );\n};\n\nconst NerdModeItem: FunctionComponent<NerdModeItemProps> = ({\n highlightedText = '',\n attributeText = '',\n attributeKey,\n labels,\n link,\n canBeCopied,\n onCopyToClipboard,\n onExpand,\n expandedAttributes,\n last = false,\n scrollOffset,\n element,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n const valueViewRef = React.useRef<View>(null);\n const [isSingleLine, setIsSingleLine] = useState<boolean>();\n\n const expandedView = useSharedValue({\n expandedAtOffset: 0,\n viewHeight: 0,\n viewStart: 0,\n });\n\n const expandable = attributeText.length > VALUE_PREVIEW_LENGTH;\n const [expanded, setExpanded] = useState(!expandable);\n\n const screenMiddle = useMemo(() => Dimensions.get('screen').height / 2, []);\n\n const iconTopPosition = useDerivedValue(() => {\n if (isSingleLine === undefined) {\n return 0;\n }\n if (!expanded || !expandable || !scrollOffset || isSingleLine) {\n const iconHeight = isSingleLine ? 0 : ICON_HEIGHT;\n return expandedView.value.viewHeight / 2 - iconHeight / 2;\n }\n\n const viewEnd = expandedView.value.viewStart + expandedView.value.viewHeight;\n let zeroedOffset = scrollOffset.value - expandedView.value.expandedAtOffset;\n\n if (expandedView.value.viewStart > screenMiddle) {\n zeroedOffset = zeroedOffset - (expandedView.value.viewStart - screenMiddle + ICON_HEIGHT / 2);\n } else {\n if (viewEnd < screenMiddle + ICON_HEIGHT) {\n zeroedOffset = zeroedOffset + (screenMiddle - expandedView.value.viewStart - ICON_HEIGHT / 2);\n } else if (expandedView.value.viewStart < screenMiddle && viewEnd > screenMiddle) {\n zeroedOffset = zeroedOffset + (screenMiddle - expandedView.value.viewStart - ICON_HEIGHT / 2);\n }\n }\n\n return clamp(zeroedOffset, 0, expandedView.value.viewHeight - ICON_HEIGHT - 8);\n });\n\n const iconStyle = useAnimatedStyle(() => {\n return {\n transform: [\n {\n translateY: iconTopPosition.value,\n },\n ],\n };\n }, [iconTopPosition]);\n\n const previewText = expanded ? attributeText : attributeText.slice(0, VALUE_PREVIEW_LENGTH) + '...';\n\n useEffect(() => {\n if (!scrollOffset || isSingleLine === undefined) {\n return;\n }\n\n setTimeout(() => {\n valueViewRef.current?.measure((x, y, w, h, px, py) => {\n expandedView.value = {\n expandedAtOffset: isSingleLine ? 0 : scrollOffset.value,\n viewHeight: isSingleLine ? 0 : h - 2 * CONTAINER_PADDING,\n viewStart: py,\n };\n });\n }, 0);\n // We only recompute when any attribute is expanded\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [expandedAttributes, isSingleLine]);\n\n const onTextLayout = useCallback((event: LayoutChangeEvent) => {\n const { height } = event.nativeEvent.layout;\n setIsSingleLine(height <= 24);\n }, []);\n\n return (\n <View\n style={[\n styles.container,\n { backgroundColor: colorScheme.nerdView.attributeSectionBackground },\n last ? styles.lastAttribute : {},\n ]}\n testID={testID}>\n <Typography\n color={colorScheme.nerdView.attributeLabel}\n preset=\"s/code\"\n style={styles.attributeLabel}\n testID={concatTestID(testID, 'attributeLabel')}>\n {attributeKey}\n </Typography>\n <View\n ref={valueViewRef}\n style={[\n styles.attributeValueContainer,\n {\n backgroundColor: colorScheme.nerdView.attributeValueBackground,\n borderColor: colorScheme.nerdView.attributeValueBorder,\n },\n ]}>\n {element ? (\n element\n ) : (\n <TextWithHighlight\n highlightedText={highlightedText}\n onLayout={onTextLayout}\n testID={concatTestID(testID, 'attributeValue')!}\n text={previewText}\n />\n )}\n {(canBeCopied || link) && isSingleLine !== undefined ? (\n <Animated.View style={[styles.actionIcon, isSingleLine ? styles.actionIconSingleLine : undefined, iconStyle]}>\n {\n <ActionIcon\n copy={canBeCopied}\n link={link}\n onCopyToClipboard={onCopyToClipboard}\n testID={concatTestID(testID, 'actionIcon')}\n value={`${highlightedText}${attributeText}`}\n />\n }\n </Animated.View>\n ) : null}\n </View>\n {expandable ? (\n <Button\n onPress={() => {\n onExpand && onExpand(!expanded);\n setExpanded(!expanded);\n }}\n style={styles.expandValueButton}\n testID={concatTestID(testID, 'expandValueButton')}\n title={expanded ? labels.collapse : labels.expand}\n type={ButtonType.SmallTech}\n />\n ) : null}\n </View>\n );\n};\n\nexport default NerdModeItem;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAuBC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC3F,SAASC,UAAU,EAAqBC,OAAO,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAClG,OAAOC,QAAQ,IACbC,KAAK,EAELC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,QACT,yBAAyB;AAEhC,SAASC,eAAe,QAAQ,aAAa;AAC7C,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,gBAAgB,QAAQ,+CAA+C;AAChF,SAASC,MAAM,EAAEC,UAAU,QAAQ,mBAAmB;AACtD,SAASC,eAAe,EAAEC,YAAY,QAAQ,oBAAoB;AAClE,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB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vC,YAAY,CAACuC,MAAM,EAAE,mBAAmB,CAAE;IAClD0E,KAAK,EAAElC,QAAQ,GAAGjB,MAAM,CAACoD,QAAQ,GAAGpD,MAAM,CAACqD,MAAO;IAClDC,IAAI,EAAEjH,UAAU,CAACkH;EAAU,CAC5B,CAAC,GACA,IACA,CAAC;AAEX,CAAC;AAED,eAAe1D,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Biometry","PinCodeScreen","PinCodeScreenActions","PinCodeScreenProps","PinLockModal","PinLockModalLabels"],"sources":["index.ts"],"sourcesContent":["import { Biometry } from './keypad';\nimport { PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps } from './pin-code-screen';\nimport PinLockModal, { PinLockModalLabels } from './pin-lock';\n\nexport { Biometry, PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps, PinLockModal, PinLockModalLabels };\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,UAAU;AACnC,SAASC,aAAa,EAAEC,oBAAoB,EAAEC,kBAAkB,QAAQ,mBAAmB;AAC3F,OAAOC,YAAY,IAAIC,kBAAkB,QAAQ,YAAY;AAE7D,SAASL,QAAQ,EAAEC,aAAa,EAAEC,oBAAoB,EAAEC,kBAAkB,EAAEC,YAAY,EAAEC,kBAAkB"}
|
|
1
|
+
{"version":3,"names":["Biometry","PinCodeScreen","PinCodeScreenActions","PinCodeScreenProps","PinLockModal","PinLockModalLabels"],"sources":["index.ts"],"sourcesContent":["import { Biometry } from './keypad';\nimport { PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps } from './pin-code-screen';\nimport PinLockModal, { PinLockModalLabels } from './pin-lock';\n\nexport { Biometry, PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps, PinLockModal, PinLockModalLabels };\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,UAAU;AACnC,SAASC,aAAa,EAAEC,oBAAoB,EAAEC,kBAAkB,QAAQ,mBAAmB;AAC3F,OAAOC,YAAY,IAAIC,kBAAkB,QAAQ,YAAY;AAE7D,SAASL,QAAQ,EAAEC,aAAa,EAAEC,oBAAoB,EAAEC,kBAAkB,EAAEC,YAAY,EAAEC,kBAAkB","ignoreList":[]}
|
|
@@ -6,12 +6,11 @@ import { useAccessibilityTranslation } from '../accessibility/accessibilityLangu
|
|
|
6
6
|
import { FaceIDIcon, FingerprintIcon, KeypadBackspaceIcon, KeypadClearIcon } from '../icons/keypad';
|
|
7
7
|
import { Typography } from '../text';
|
|
8
8
|
import { useAppColorScheme } from '../theme';
|
|
9
|
-
const DigitKey = /*#__PURE__*/React.forwardRef((
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = _ref;
|
|
9
|
+
const DigitKey = /*#__PURE__*/React.forwardRef(({
|
|
10
|
+
onPress,
|
|
11
|
+
testID,
|
|
12
|
+
digit
|
|
13
|
+
}, ref) => {
|
|
15
14
|
const colorScheme = useAppColorScheme();
|
|
16
15
|
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
17
16
|
testID: concatTestID(testID, String(digit)),
|
|
@@ -29,24 +28,23 @@ const DigitKey = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
29
28
|
}, digit));
|
|
30
29
|
});
|
|
31
30
|
DigitKey.displayName = 'DigitKey';
|
|
32
|
-
export let Biometry
|
|
33
|
-
(function (Biometry) {
|
|
31
|
+
export let Biometry = /*#__PURE__*/function (Biometry) {
|
|
34
32
|
Biometry["FaceID"] = "faceID";
|
|
35
33
|
Biometry["Other"] = "other";
|
|
36
|
-
|
|
34
|
+
return Biometry;
|
|
35
|
+
}({});
|
|
37
36
|
const MIN_HEIGHT = 360;
|
|
38
37
|
const MIN_WIDTH = 264;
|
|
39
38
|
const KEY_SIZE = 72;
|
|
40
|
-
export const Keypad = /*#__PURE__*/React.forwardRef((
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
} = _ref2;
|
|
39
|
+
export const Keypad = /*#__PURE__*/React.forwardRef(({
|
|
40
|
+
testID,
|
|
41
|
+
onPressDigit,
|
|
42
|
+
onPressDelete,
|
|
43
|
+
biometry,
|
|
44
|
+
onBiometricPress,
|
|
45
|
+
style,
|
|
46
|
+
onDeleteAll
|
|
47
|
+
}, ref) => {
|
|
50
48
|
const t = useAccessibilityTranslation();
|
|
51
49
|
const colorScheme = useAppColorScheme();
|
|
52
50
|
const [layout, setLayout] = useState();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useMemo","useState","StyleSheet","View","concatTestID","TouchableOpacity","useAccessibilityTranslation","FaceIDIcon","FingerprintIcon","KeypadBackspaceIcon","KeypadClearIcon","Typography","useAppColorScheme","DigitKey","forwardRef","_ref","ref","onPress","testID","digit","colorScheme","createElement","String","accessibilityRole","style","styles","key","backgroundColor","background","disabled","maxFontSizeMultiplier","color","text","preset","displayName","Biometry","MIN_HEIGHT","MIN_WIDTH","KEY_SIZE","Keypad","_ref2","onPressDigit","onPressDelete","biometry","onBiometricPress","onDeleteAll","t","layout","setLayout","onLayout","event","nativeEvent","width","height","RATIO","gap","undefined","lineStyles","line","marginBottom","cover","accessibilityLabel","FaceID","create","alignItems","flex","justifyContent","maxHeight","maxWidth","minHeight","minWidth","borderRadius","flexDirection"],"sources":["keypad.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { LayoutChangeEvent, LayoutRectangle, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableOpacity, TouchableOpacityRef } from '../accessibility';\nimport { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';\nimport { FaceIDIcon, FingerprintIcon, KeypadBackspaceIcon, KeypadClearIcon } from '../icons/keypad';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\n\ninterface DigitKeyProps {\n testID: string | undefined;\n digit: number;\n onPress?: (digit: number) => void;\n}\n\nconst DigitKey = React.forwardRef<TouchableOpacityRef, DigitKeyProps>(({ onPress, testID, digit }, ref) => {\n const colorScheme = useAppColorScheme();\n return (\n <TouchableOpacity\n testID={concatTestID(testID, String(digit))}\n ref={ref}\n accessibilityRole=\"button\"\n style={[styles.key, { backgroundColor: colorScheme.background }]}\n disabled={!onPress}\n onPress={() => onPress?.(digit)}>\n <Typography maxFontSizeMultiplier={1.5} color={colorScheme.text} preset=\"xl\">\n {digit}\n </Typography>\n </TouchableOpacity>\n );\n});\n\nDigitKey.displayName = 'DigitKey';\n\nexport enum Biometry {\n FaceID = 'faceID',\n Other = 'other',\n}\n\nexport interface KeypadProps {\n testID?: string;\n biometry?: Biometry | null;\n onBiometricPress?: () => void;\n onPressDigit?: (digit: number) => void;\n onPressDelete?: () => void;\n style?: StyleProp<ViewStyle>;\n onDeleteAll?: () => void;\n}\n\nconst MIN_HEIGHT = 360;\nconst MIN_WIDTH = 264;\nconst KEY_SIZE = 72;\n\nexport const Keypad = React.forwardRef<TouchableOpacityRef, KeypadProps>(\n ({ testID, onPressDigit, onPressDelete, biometry, onBiometricPress, style, onDeleteAll }, ref) => {\n const t = useAccessibilityTranslation();\n const colorScheme = useAppColorScheme();\n\n const [layout, setLayout] = useState<LayoutRectangle>();\n const onLayout = useCallback((event: LayoutChangeEvent) => setLayout(event.nativeEvent.layout), []);\n\n const { width, height } = useMemo(() => {\n if (!layout) {\n return {};\n }\n\n const RATIO = MIN_WIDTH / MIN_HEIGHT;\n if (layout.width > layout.height * RATIO) {\n return { height: layout.height, width: layout.height * RATIO };\n } else {\n return { width: layout.width, height: layout.width / RATIO };\n }\n }, [layout]);\n\n const gap = width ? (width - 3 * KEY_SIZE) / 4 : undefined;\n const lineStyles = [styles.line, { width, marginBottom: gap }];\n\n return (\n <View testID={testID} style={[styles.cover, style]} onLayout={onLayout}>\n <View style={{ height }}>\n <View style={lineStyles}>\n <DigitKey testID={testID} ref={ref} digit={1} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={2} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={3} onPress={onPressDigit} />\n </View>\n <View style={lineStyles}>\n <DigitKey testID={testID} digit={4} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={5} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={6} onPress={onPressDigit} />\n </View>\n <View style={lineStyles}>\n <DigitKey testID={testID} digit={7} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={8} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={9} onPress={onPressDigit} />\n </View>\n <View style={lineStyles}>\n <TouchableOpacity\n testID={concatTestID(testID, 'delete-all')}\n accessibilityRole=\"button\"\n accessibilityLabel={t('accessibility.control.clear')}\n style={styles.key}\n disabled={!onDeleteAll}\n onPress={onDeleteAll}>\n {onDeleteAll ? <KeypadClearIcon color={colorScheme.text} /> : null}\n </TouchableOpacity>\n <DigitKey testID={testID} digit={0} onPress={onPressDigit} />\n {biometry ? (\n <TouchableOpacity\n testID={concatTestID(testID, 'biometry')}\n accessibilityRole=\"button\"\n accessibilityLabel={t(\n biometry === Biometry.FaceID ? 'accessibility.key.faceId' : 'accessibility.key.fingerprint',\n )}\n style={styles.key}\n disabled={!onBiometricPress}\n onPress={onBiometricPress}>\n {biometry === Biometry.FaceID ? (\n <FaceIDIcon color={colorScheme.text} />\n ) : (\n <FingerprintIcon color={colorScheme.text} />\n )}\n </TouchableOpacity>\n ) : (\n <TouchableOpacity\n testID={concatTestID(testID, 'delete')}\n accessibilityRole=\"button\"\n accessibilityLabel={t('accessibility.control.delete')}\n style={styles.key}\n disabled={!onPressDelete}\n onPress={onPressDelete}>\n {onPressDelete ? <KeypadBackspaceIcon color={colorScheme.text} /> : null}\n </TouchableOpacity>\n )}\n </View>\n </View>\n </View>\n );\n },\n);\n\nKeypad.displayName = 'Keypad';\n\nconst styles = StyleSheet.create({\n cover: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n maxHeight: 2 * MIN_HEIGHT,\n maxWidth: 2 * MIN_WIDTH,\n minHeight: MIN_HEIGHT,\n minWidth: MIN_WIDTH,\n width: '100%',\n },\n key: {\n alignItems: 'center',\n borderRadius: KEY_SIZE / 2,\n height: KEY_SIZE,\n justifyContent: 'center',\n width: KEY_SIZE,\n },\n line: {\n flexDirection: 'row',\n justifyContent: 'space-evenly',\n },\n});\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC7D,SAAwDC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAEzG,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,gBAAgB,QAA6B,kBAAkB;AACxE,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,UAAU,EAAEC,eAAe,EAAEC,mBAAmB,EAAEC,eAAe,QAAQ,iBAAiB;AACnG,SAASC,UAAU,QAAQ,SAAS;AACpC,SAASC,iBAAiB,QAAQ,UAAU;AAQ5C,MAAMC,QAAQ,gBAAGf,KAAK,CAACgB,UAAU,CAAqC,CAAAC,IAAA,EAA6BC,GAAG,KAAK;EAAA,IAApC;IAAEC,OAAO;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAAJ,IAAA;EAC/F,MAAMK,WAAW,GAAGR,iBAAiB,EAAE;EACvC,oBACEd,KAAA,CAAAuB,aAAA,CAAChB,gBAAgB;IACfa,MAAM,EAAEd,YAAY,CAACc,MAAM,EAAEI,MAAM,CAACH,KAAK,CAAC,CAAE;IAC5CH,GAAG,EAAEA,GAAI;IACTO,iBAAiB,EAAC,QAAQ;IAC1BC,KAAK,EAAE,CAACC,MAAM,CAACC,GAAG,EAAE;MAAEC,eAAe,EAAEP,WAAW,CAACQ;IAAW,CAAC,CAAE;IACjEC,QAAQ,EAAE,CAACZ,OAAQ;IACnBA,OAAO,EAAEA,CAAA,KAAMA,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAGE,KAAK;EAAE,gB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ACL,WAAW,GAAG,QAAQ;AAE7B,MAAMT,MAAM,GAAGvB,UAAU,CAAC6D,MAAM,CAAC;EAC/BH,KAAK,EAAE;IACLI,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,SAAS,EAAE,CAAC,GAAG/B,UAAU;IACzBgC,QAAQ,EAAE,CAAC,GAAG/B,SAAS;IACvBgC,SAAS,EAAEjC,UAAU;IACrBkC,QAAQ,EAAEjC,SAAS;IACnBe,KAAK,EAAE;EACT,CAAC;EACD1B,GAAG,EAAE;IACHsC,UAAU,EAAE,QAAQ;IACpBO,YAAY,EAAEjC,QAAQ,GAAG,CAAC;IAC1Be,MAAM,EAAEf,QAAQ;IAChB4B,cAAc,EAAE,QAAQ;IACxBd,KAAK,EAAEd;EACT,CAAC;EACDoB,IAAI,EAAE;IACJc,aAAa,EAAE,KAAK;IACpBN,cAAc,EAAE;EAClB;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","useState","StyleSheet","View","concatTestID","TouchableOpacity","useAccessibilityTranslation","FaceIDIcon","FingerprintIcon","KeypadBackspaceIcon","KeypadClearIcon","Typography","useAppColorScheme","DigitKey","forwardRef","onPress","testID","digit","ref","colorScheme","createElement","String","accessibilityRole","style","styles","key","backgroundColor","background","disabled","maxFontSizeMultiplier","color","text","preset","displayName","Biometry","MIN_HEIGHT","MIN_WIDTH","KEY_SIZE","Keypad","onPressDigit","onPressDelete","biometry","onBiometricPress","onDeleteAll","t","layout","setLayout","onLayout","event","nativeEvent","width","height","RATIO","gap","undefined","lineStyles","line","marginBottom","cover","accessibilityLabel","FaceID","create","alignItems","flex","justifyContent","maxHeight","maxWidth","minHeight","minWidth","borderRadius","flexDirection"],"sources":["keypad.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { LayoutChangeEvent, LayoutRectangle, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableOpacity, TouchableOpacityRef } from '../accessibility';\nimport { useAccessibilityTranslation } from '../accessibility/accessibilityLanguage';\nimport { FaceIDIcon, FingerprintIcon, KeypadBackspaceIcon, KeypadClearIcon } from '../icons/keypad';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\n\ninterface DigitKeyProps {\n testID: string | undefined;\n digit: number;\n onPress?: (digit: number) => void;\n}\n\nconst DigitKey = React.forwardRef<TouchableOpacityRef, DigitKeyProps>(({ onPress, testID, digit }, ref) => {\n const colorScheme = useAppColorScheme();\n return (\n <TouchableOpacity\n testID={concatTestID(testID, String(digit))}\n ref={ref}\n accessibilityRole=\"button\"\n style={[styles.key, { backgroundColor: colorScheme.background }]}\n disabled={!onPress}\n onPress={() => onPress?.(digit)}>\n <Typography maxFontSizeMultiplier={1.5} color={colorScheme.text} preset=\"xl\">\n {digit}\n </Typography>\n </TouchableOpacity>\n );\n});\n\nDigitKey.displayName = 'DigitKey';\n\nexport enum Biometry {\n FaceID = 'faceID',\n Other = 'other',\n}\n\nexport interface KeypadProps {\n testID?: string;\n biometry?: Biometry | null;\n onBiometricPress?: () => void;\n onPressDigit?: (digit: number) => void;\n onPressDelete?: () => void;\n style?: StyleProp<ViewStyle>;\n onDeleteAll?: () => void;\n}\n\nconst MIN_HEIGHT = 360;\nconst MIN_WIDTH = 264;\nconst KEY_SIZE = 72;\n\nexport const Keypad = React.forwardRef<TouchableOpacityRef, KeypadProps>(\n ({ testID, onPressDigit, onPressDelete, biometry, onBiometricPress, style, onDeleteAll }, ref) => {\n const t = useAccessibilityTranslation();\n const colorScheme = useAppColorScheme();\n\n const [layout, setLayout] = useState<LayoutRectangle>();\n const onLayout = useCallback((event: LayoutChangeEvent) => setLayout(event.nativeEvent.layout), []);\n\n const { width, height } = useMemo(() => {\n if (!layout) {\n return {};\n }\n\n const RATIO = MIN_WIDTH / MIN_HEIGHT;\n if (layout.width > layout.height * RATIO) {\n return { height: layout.height, width: layout.height * RATIO };\n } else {\n return { width: layout.width, height: layout.width / RATIO };\n }\n }, [layout]);\n\n const gap = width ? (width - 3 * KEY_SIZE) / 4 : undefined;\n const lineStyles = [styles.line, { width, marginBottom: gap }];\n\n return (\n <View testID={testID} style={[styles.cover, style]} onLayout={onLayout}>\n <View style={{ height }}>\n <View style={lineStyles}>\n <DigitKey testID={testID} ref={ref} digit={1} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={2} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={3} onPress={onPressDigit} />\n </View>\n <View style={lineStyles}>\n <DigitKey testID={testID} digit={4} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={5} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={6} onPress={onPressDigit} />\n </View>\n <View style={lineStyles}>\n <DigitKey testID={testID} digit={7} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={8} onPress={onPressDigit} />\n <DigitKey testID={testID} digit={9} onPress={onPressDigit} />\n </View>\n <View style={lineStyles}>\n <TouchableOpacity\n testID={concatTestID(testID, 'delete-all')}\n accessibilityRole=\"button\"\n accessibilityLabel={t('accessibility.control.clear')}\n style={styles.key}\n disabled={!onDeleteAll}\n onPress={onDeleteAll}>\n {onDeleteAll ? <KeypadClearIcon color={colorScheme.text} /> : null}\n </TouchableOpacity>\n <DigitKey testID={testID} digit={0} onPress={onPressDigit} />\n {biometry ? (\n <TouchableOpacity\n testID={concatTestID(testID, 'biometry')}\n accessibilityRole=\"button\"\n accessibilityLabel={t(\n biometry === Biometry.FaceID ? 'accessibility.key.faceId' : 'accessibility.key.fingerprint',\n )}\n style={styles.key}\n disabled={!onBiometricPress}\n onPress={onBiometricPress}>\n {biometry === Biometry.FaceID ? (\n <FaceIDIcon color={colorScheme.text} />\n ) : (\n <FingerprintIcon color={colorScheme.text} />\n )}\n </TouchableOpacity>\n ) : (\n <TouchableOpacity\n testID={concatTestID(testID, 'delete')}\n accessibilityRole=\"button\"\n accessibilityLabel={t('accessibility.control.delete')}\n style={styles.key}\n disabled={!onPressDelete}\n onPress={onPressDelete}>\n {onPressDelete ? <KeypadBackspaceIcon color={colorScheme.text} /> : null}\n </TouchableOpacity>\n )}\n </View>\n </View>\n </View>\n );\n },\n);\n\nKeypad.displayName = 'Keypad';\n\nconst styles = StyleSheet.create({\n cover: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n maxHeight: 2 * MIN_HEIGHT,\n maxWidth: 2 * MIN_WIDTH,\n minHeight: MIN_HEIGHT,\n minWidth: MIN_WIDTH,\n width: '100%',\n },\n key: {\n alignItems: 'center',\n borderRadius: KEY_SIZE / 2,\n height: KEY_SIZE,\n justifyContent: 'center',\n width: KEY_SIZE,\n },\n line: {\n flexDirection: 'row',\n justifyContent: 'space-evenly',\n },\n});\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC7D,SAAwDC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAEzG,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,gBAAgB,QAA6B,kBAAkB;AACxE,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,UAAU,EAAEC,eAAe,EAAEC,mBAAmB,EAAEC,eAAe,QAAQ,iBAAiB;AACnG,SAASC,UAAU,QAAQ,SAAS;AACpC,SAASC,iBAAiB,QAAQ,UAAU;AAQ5C,MAAMC,QAAQ,gBAAGf,KAAK,CAACgB,UAAU,CAAqC,CAAC;EAAEC,OAAO;EAAEC,MAAM;EAAEC;AAAM,CAAC,EAAEC,GAAG,KAAK;EACzG,MAAMC,WAAW,GAAGP,iBAAiB,CAAC,CAAC;EACvC,oBACEd,KAAA,CAAAsB,aAAA,CAACf,gBAAgB;IACfW,MAAM,EAAEZ,YAAY,CAACY,MAAM,EAAEK,MAAM,CAACJ,KAAK,CAAC,CAAE;IAC5CC,GAAG,EAAEA,GAAI;IACTI,iBAAiB,EAAC,QAAQ;IAC1BC,KAAK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KAAK,EAAEC,MAAM,CAACC,GAAI;IAClBG,QAAQ,EAAE,CAACY,aAAc;IACzBzB,OAAO,EAAEyB;EAAc,GACtBA,aAAa,gBAAG1C,KAAA,CAAAsB,aAAA,CAACX,mBAAmB;IAACqB,KAAK,EAAEX,WAAW,CAACY;EAAK,CAAE,CAAC,GAAG,IACpD,CAEhB,CACF,CACF,CAAC;AAEX,CACF,CAAC;AAEDO,MAAM,CAACL,WAAW,GAAG,QAAQ;AAE7B,MAAMT,MAAM,GAAGtB,UAAU,CAAC2D,MAAM,CAAC;EAC/BH,KAAK,EAAE;IACLI,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE,QAAQ;IACxBC,SAAS,EAAE,CAAC,GAAG9B,UAAU;IACzB+B,QAAQ,EAAE,CAAC,GAAG9B,SAAS;IACvB+B,SAAS,EAAEhC,UAAU;IACrBiC,QAAQ,EAAEhC,SAAS;IACnBc,KAAK,EAAE;EACT,CAAC;EACDzB,GAAG,EAAE;IACHqC,UAAU,EAAE,QAAQ;IACpBO,YAAY,EAAEhC,QAAQ,GAAG,CAAC;IAC1Bc,MAAM,EAAEd,QAAQ;IAChB2B,cAAc,EAAE,QAAQ;IACxBd,KAAK,EAAEb;EACT,CAAC;EACDmB,IAAI,EAAE;IACJc,aAAa,EAAE,KAAK;IACpBN,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -13,23 +13,22 @@ const animationConfig = {
|
|
|
13
13
|
useNativeDriver: true,
|
|
14
14
|
easing: Easing.linear
|
|
15
15
|
};
|
|
16
|
-
export const PinCodeScreen = /*#__PURE__*/forwardRef((
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref;
|
|
16
|
+
export const PinCodeScreen = /*#__PURE__*/forwardRef(({
|
|
17
|
+
testID,
|
|
18
|
+
length,
|
|
19
|
+
instruction,
|
|
20
|
+
title,
|
|
21
|
+
onBack,
|
|
22
|
+
enteredLength,
|
|
23
|
+
error,
|
|
24
|
+
onPressDigit,
|
|
25
|
+
onPressDelete,
|
|
26
|
+
biometry,
|
|
27
|
+
onBiometricPress,
|
|
28
|
+
keypadRef,
|
|
29
|
+
onDeleteAll,
|
|
30
|
+
...props
|
|
31
|
+
}, ref) => {
|
|
33
32
|
const colorScheme = useAppColorScheme();
|
|
34
33
|
const [shakePosition] = useState(() => new Animated.Value(0));
|
|
35
34
|
useImperativeHandle(ref, () => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","useImperativeHandle","useState","Animated","Easing","StyleSheet","View","SafeAreaView","concatTestID","ContrastingStatusBar","BackButton","Typography","useAppColorScheme","Keypad","Pins","SHAKE_ITERATIONS","animationConfig","useNativeDriver","easing","linear","PinCodeScreen","_ref","ref","testID","length","instruction","title","onBack","enteredLength","error","onPressDigit","onPressDelete","biometry","onBiometricPress","keypadRef","onDeleteAll","props","colorScheme","shakePosition","Value","shakeKeypad","params","amount","duration","partialDuration","Promise","resolve","loop","sequence","timing","toValue","iterations","start","createElement","style","styles","container","backgroundColor","white","backButton","onPress","content","upperContent","accessible","color","text","align","preset","pins","maxLength","announcementActive","onAnnouncementFinished","onAccessibilityAnnounced","Boolean","keyboard","transform","translateX","undefined","create","minHeight","paddingHorizontal","flex","paddingTop","justifyContent","marginVertical","opacity","alignItems","marginBottom","marginTop","displayName"],"sources":["pin-code-screen.tsx"],"sourcesContent":["import React, { forwardRef, Ref, useImperativeHandle, useState } from 'react';\nimport { Animated, Easing, StyleSheet, View } from 'react-native';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\nimport { concatTestID } from '../../utils';\nimport ContrastingStatusBar from '../../utils/contrasting-status-bar';\nimport type { TouchableOpacityRef } from '../accessibility';\nimport { BackButton } from '../buttons';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\nimport { Biometry, Keypad } from './keypad';\nimport { Pins } from './pins';\n\nexport type PinCodeScreenProps = {\n title: string;\n\n testID?: string;\n length: number;\n enteredLength: number;\n onBack?: () => void;\n error?: string;\n\n keypadRef?: Ref<TouchableOpacityRef>;\n onPressDigit: (digit: number) => void;\n onPressDelete: () => void;\n onDeleteAll: () => void;\n\n biometry?: Biometry | null;\n onBiometricPress?: () => void;\n} & (\n | {\n instruction: string;\n onAccessibilityAnnounced?: (finished: boolean) => void;\n }\n | {\n instruction?: undefined;\n onAccessibilityAnnounced?: undefined;\n }\n);\n\nexport interface PinCodeScreenActions {\n shakeKeypad: (params?: { amount?: number; duration?: number }) => Promise<{ finished: boolean }>;\n}\nconst SHAKE_ITERATIONS = 4;\nconst animationConfig = {\n useNativeDriver: true,\n easing: Easing.linear,\n};\n\nexport const PinCodeScreen = forwardRef<PinCodeScreenActions, PinCodeScreenProps>(\n (\n {\n testID,\n length,\n instruction,\n title,\n onBack,\n enteredLength,\n error,\n onPressDigit,\n onPressDelete,\n biometry,\n onBiometricPress,\n keypadRef,\n onDeleteAll,\n ...props\n },\n ref,\n ) => {\n const colorScheme = useAppColorScheme();\n const [shakePosition] = useState(() => new Animated.Value(0));\n useImperativeHandle(\n ref,\n () => ({\n shakeKeypad: (params) => {\n const { amount = 10, duration = 300 } = params ?? {};\n const partialDuration = duration / SHAKE_ITERATIONS / 4;\n return new Promise((resolve) =>\n Animated.loop(\n Animated.sequence([\n Animated.timing(shakePosition, { ...animationConfig, toValue: -amount, duration: partialDuration }),\n Animated.timing(shakePosition, {\n ...animationConfig,\n toValue: amount,\n duration: 2 * partialDuration,\n }),\n Animated.timing(shakePosition, { ...animationConfig, toValue: 0, duration: partialDuration }),\n ]),\n { iterations: SHAKE_ITERATIONS },\n ).start(resolve),\n );\n },\n }),\n [shakePosition],\n );\n\n return (\n <SafeAreaView testID={testID} style={[styles.container, { backgroundColor: colorScheme.white }]}>\n <ContrastingStatusBar backgroundColor={colorScheme.white} />\n <View style={styles.backButton}>\n {onBack && <BackButton testID={concatTestID(testID, 'back')} onPress={onBack} />}\n </View>\n <View style={styles.content}>\n <View style={styles.upperContent}>\n <Typography\n testID={concatTestID(testID, 'title')}\n accessible={false}\n color={colorScheme.text}\n align=\"center\"\n preset=\"l\"\n style={styles.title}>\n {title}\n </Typography>\n <Pins style={styles.pins} enteredLength={enteredLength} maxLength={length} />\n {instruction ? (\n <Typography\n testID={concatTestID(testID, 'instruction')}\n align=\"center\"\n announcementActive={true}\n onAnnouncementFinished={props.onAccessibilityAnnounced}\n color={colorScheme.text}\n style={styles.instruction}>\n {instruction}\n </Typography>\n ) : null}\n <Typography\n testID={concatTestID(testID, 'error')}\n announcementActive={true}\n accessible={Boolean(error)}\n color={colorScheme.error}>\n {error ?? '' /* always displayed to keep the same layout */}\n </Typography>\n </View>\n <Animated.View\n style={[\n styles.keyboard,\n {\n transform: [{ translateX: shakePosition }],\n },\n ]}>\n <Keypad\n testID={concatTestID(testID, 'keypad')}\n ref={keypadRef}\n onPressDigit={enteredLength < length ? onPressDigit : undefined}\n onPressDelete={enteredLength && enteredLength < length ? onPressDelete : undefined}\n biometry={!enteredLength ? biometry : undefined}\n onBiometricPress={onBiometricPress}\n onDeleteAll={enteredLength && enteredLength < length ? onDeleteAll : undefined}\n />\n </Animated.View>\n </View>\n </SafeAreaView>\n );\n },\n);\n\nconst styles = StyleSheet.create({\n backButton: {\n minHeight: 24,\n paddingHorizontal: 24,\n },\n container: {\n flex: 1,\n paddingTop: 8,\n },\n content: {\n flex: 1,\n justifyContent: 'space-between',\n paddingHorizontal: 24,\n },\n instruction: {\n marginVertical: 24,\n opacity: 0.7,\n },\n keyboard: {\n alignItems: 'center',\n flex: 5,\n justifyContent: 'center',\n marginVertical: 24,\n },\n pins: {\n paddingHorizontal: 20,\n },\n title: {\n marginBottom: 24,\n },\n upperContent: {\n alignItems: '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I,EAAE;IACJY,iBAAiB,EAAE;EACrB,CAAC;EACDtD,KAAK,EAAE;IACL6D,YAAY,EAAE;EAChB,CAAC;EACDzB,YAAY,EAAE;IACZwB,UAAU,EAAE,QAAQ;IACpBL,IAAI,EAAE,CAAC;IACPO,SAAS,EAAE,EAAE;IACbR,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAEF5D,aAAa,CAACqE,WAAW,GAAG,eAAe"}
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useImperativeHandle","useState","Animated","Easing","StyleSheet","View","SafeAreaView","concatTestID","ContrastingStatusBar","BackButton","Typography","useAppColorScheme","Keypad","Pins","SHAKE_ITERATIONS","animationConfig","useNativeDriver","easing","linear","PinCodeScreen","testID","length","instruction","title","onBack","enteredLength","error","onPressDigit","onPressDelete","biometry","onBiometricPress","keypadRef","onDeleteAll","props","ref","colorScheme","shakePosition","Value","shakeKeypad","params","amount","duration","partialDuration","Promise","resolve","loop","sequence","timing","toValue","iterations","start","createElement","style","styles","container","backgroundColor","white","backButton","onPress","content","upperContent","accessible","color","text","align","preset","pins","maxLength","announcementActive","onAnnouncementFinished","onAccessibilityAnnounced","Boolean","keyboard","transform","translateX","undefined","create","minHeight","paddingHorizontal","flex","paddingTop","justifyContent","marginVertical","opacity","alignItems","marginBottom","marginTop","displayName"],"sources":["pin-code-screen.tsx"],"sourcesContent":["import React, { forwardRef, Ref, useImperativeHandle, useState } from 'react';\nimport { Animated, Easing, StyleSheet, View } from 'react-native';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\nimport { concatTestID } from '../../utils';\nimport ContrastingStatusBar from '../../utils/contrasting-status-bar';\nimport type { TouchableOpacityRef } from '../accessibility';\nimport { BackButton } from '../buttons';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\nimport { Biometry, Keypad } from './keypad';\nimport { Pins } from './pins';\n\nexport type PinCodeScreenProps = {\n title: string;\n\n testID?: string;\n length: number;\n enteredLength: number;\n onBack?: () => void;\n error?: string;\n\n keypadRef?: Ref<TouchableOpacityRef>;\n onPressDigit: (digit: number) => void;\n onPressDelete: () => void;\n onDeleteAll: () => void;\n\n biometry?: Biometry | null;\n onBiometricPress?: () => void;\n} & (\n | {\n instruction: string;\n onAccessibilityAnnounced?: (finished: boolean) => void;\n }\n | {\n instruction?: undefined;\n onAccessibilityAnnounced?: undefined;\n }\n);\n\nexport interface PinCodeScreenActions {\n shakeKeypad: (params?: { amount?: number; duration?: number }) => Promise<{ finished: boolean }>;\n}\nconst SHAKE_ITERATIONS = 4;\nconst animationConfig = {\n useNativeDriver: true,\n easing: Easing.linear,\n};\n\nexport const PinCodeScreen = forwardRef<PinCodeScreenActions, PinCodeScreenProps>(\n (\n {\n testID,\n length,\n instruction,\n title,\n onBack,\n enteredLength,\n error,\n onPressDigit,\n onPressDelete,\n biometry,\n onBiometricPress,\n keypadRef,\n onDeleteAll,\n ...props\n },\n ref,\n ) => {\n const colorScheme = useAppColorScheme();\n const [shakePosition] = useState(() => new Animated.Value(0));\n useImperativeHandle(\n ref,\n () => ({\n shakeKeypad: (params) => {\n const { amount = 10, duration = 300 } = params ?? {};\n const partialDuration = duration / SHAKE_ITERATIONS / 4;\n return new Promise((resolve) =>\n Animated.loop(\n Animated.sequence([\n Animated.timing(shakePosition, { ...animationConfig, toValue: -amount, duration: partialDuration }),\n Animated.timing(shakePosition, {\n ...animationConfig,\n toValue: amount,\n duration: 2 * partialDuration,\n }),\n Animated.timing(shakePosition, { ...animationConfig, toValue: 0, duration: partialDuration }),\n ]),\n { iterations: SHAKE_ITERATIONS },\n ).start(resolve),\n );\n },\n }),\n [shakePosition],\n );\n\n return (\n <SafeAreaView testID={testID} style={[styles.container, { backgroundColor: colorScheme.white }]}>\n <ContrastingStatusBar backgroundColor={colorScheme.white} />\n <View style={styles.backButton}>\n {onBack && <BackButton testID={concatTestID(testID, 'back')} onPress={onBack} />}\n </View>\n <View style={styles.content}>\n <View style={styles.upperContent}>\n <Typography\n testID={concatTestID(testID, 'title')}\n accessible={false}\n color={colorScheme.text}\n align=\"center\"\n preset=\"l\"\n style={styles.title}>\n {title}\n </Typography>\n <Pins style={styles.pins} enteredLength={enteredLength} maxLength={length} />\n {instruction ? (\n <Typography\n testID={concatTestID(testID, 'instruction')}\n align=\"center\"\n announcementActive={true}\n onAnnouncementFinished={props.onAccessibilityAnnounced}\n color={colorScheme.text}\n style={styles.instruction}>\n {instruction}\n </Typography>\n ) : null}\n <Typography\n testID={concatTestID(testID, 'error')}\n announcementActive={true}\n accessible={Boolean(error)}\n color={colorScheme.error}>\n {error ?? '' /* always displayed to keep the same layout */}\n </Typography>\n </View>\n <Animated.View\n style={[\n styles.keyboard,\n {\n transform: [{ translateX: shakePosition }],\n },\n ]}>\n <Keypad\n testID={concatTestID(testID, 'keypad')}\n ref={keypadRef}\n onPressDigit={enteredLength < length ? onPressDigit : undefined}\n onPressDelete={enteredLength && enteredLength < length ? onPressDelete : undefined}\n biometry={!enteredLength ? biometry : undefined}\n onBiometricPress={onBiometricPress}\n onDeleteAll={enteredLength && enteredLength < length ? onDeleteAll : undefined}\n />\n </Animated.View>\n </View>\n </SafeAreaView>\n );\n },\n);\n\nconst styles = StyleSheet.create({\n backButton: {\n minHeight: 24,\n paddingHorizontal: 24,\n },\n container: {\n flex: 1,\n paddingTop: 8,\n },\n content: {\n flex: 1,\n justifyContent: 'space-between',\n paddingHorizontal: 24,\n },\n instruction: {\n marginVertical: 24,\n opacity: 0.7,\n },\n keyboard: {\n alignItems: 'center',\n flex: 5,\n justifyContent: 'center',\n marginVertical: 24,\n },\n pins: {\n paddingHorizontal: 20,\n },\n title: {\n marginBottom: 24,\n },\n upperContent: {\n alignItems: 'center',\n flex: 3,\n marginTop: 12,\n paddingHorizontal: 20,\n },\n});\n\nPinCodeScreen.displayName = 'PinCodeScreen';\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAOC,mBAAmB,EAAEC,QAAQ,QAAQ,OAAO;AAC7E,SAASC,QAAQ,EAAEC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