@procivis/one-react-native-components 0.2.54 → 0.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -8
- package/lib/commonjs/components/backup/index.js.map +1 -1
- package/lib/commonjs/components/backup/preview-credentials.js +18 -22
- package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
- package/lib/commonjs/components/credential/credential.js +11 -12
- package/lib/commonjs/components/credential/credential.js.map +1 -1
- package/lib/commonjs/components/credential/index.js.map +1 -1
- package/lib/commonjs/components/entity/EntityButtons.js +20 -25
- package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-attributes.js +15 -17
- package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details-with-buttons.js +18 -19
- package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details.js +12 -14
- package/lib/commonjs/components/entity/entity-details.js.map +1 -1
- package/lib/commonjs/components/entity/index.js +2 -2
- package/lib/commonjs/components/entity/index.js.map +1 -1
- package/lib/commonjs/components/history/history-details-screen.js +67 -0
- package/lib/commonjs/components/history/history-details-screen.js.map +1 -0
- package/lib/commonjs/components/history/history-list-item-icon.js +94 -0
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -0
- package/lib/commonjs/components/history/history-list-item.js +45 -0
- package/lib/commonjs/components/history/history-list-item.js.map +1 -0
- package/lib/commonjs/components/history/history-list-screen.js +121 -0
- package/lib/commonjs/components/history/history-list-screen.js.map +1 -0
- package/lib/commonjs/components/history/history-list-section-header.js +39 -0
- package/lib/commonjs/components/history/history-list-section-header.js.map +1 -0
- package/lib/commonjs/components/history/history-list.js +100 -0
- package/lib/commonjs/components/history/history-list.js.map +1 -0
- package/lib/commonjs/components/history/index.js +72 -0
- package/lib/commonjs/components/history/index.js.map +1 -0
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/navigation/header-buttons.js +21 -25
- package/lib/commonjs/components/navigation/header-buttons.js.map +1 -1
- package/lib/commonjs/components/navigation/index.js.map +1 -1
- package/lib/commonjs/components/proof-request/group.js +4 -5
- package/lib/commonjs/components/proof-request/group.js.map +1 -1
- package/lib/commonjs/components/proof-request/index.js.map +1 -1
- package/lib/commonjs/components/proof-request/select-credential.js +11 -12
- package/lib/commonjs/components/proof-request/select-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/share-credential.js +23 -27
- package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/normalize-color.d.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibility.js +11 -7
- package/lib/commonjs/ui-components/accessibility/accessibility.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js +8 -12
- package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js +15 -17
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js +8 -10
- package/lib/commonjs/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/index.js +1 -30
- package/lib/commonjs/ui-components/accessibility/index.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale/index.js +2 -3
- package/lib/commonjs/ui-components/accessibility/locale/index.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale.test.js.map +1 -1
- package/lib/commonjs/ui-components/action-modal/ActionModal.js +9 -11
- package/lib/commonjs/ui-components/action-modal/ActionModal.js.map +1 -1
- package/lib/commonjs/ui-components/action-modal/index.js +1 -1
- package/lib/commonjs/ui-components/action-modal/index.js.map +1 -1
- package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js +10 -12
- package/lib/commonjs/ui-components/activity-indicator/activity-indicator.js.map +1 -1
- package/lib/commonjs/ui-components/activity-indicator/index.js +1 -1
- package/lib/commonjs/ui-components/activity-indicator/index.js.map +1 -1
- package/lib/commonjs/ui-components/blur/blur-view.js +13 -15
- package/lib/commonjs/ui-components/blur/blur-view.js.map +1 -1
- package/lib/commonjs/ui-components/blur/index.js +2 -2
- package/lib/commonjs/ui-components/blur/index.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/back-button.js +12 -15
- package/lib/commonjs/ui-components/buttons/back-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/button.js +19 -22
- package/lib/commonjs/ui-components/buttons/button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/connectivity-button.js +16 -18
- package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/filter-button.js +8 -10
- package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/ghost-button.js +12 -14
- package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/hold-button.js +244 -0
- package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -0
- package/lib/commonjs/ui-components/buttons/index.js +9 -37
- package/lib/commonjs/ui-components/buttons/index.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/scan-button.js +7 -9
- package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/commonjs/ui-components/camera/camera-overlay.js +11 -14
- package/lib/commonjs/ui-components/camera/camera-overlay.js.map +1 -1
- package/lib/commonjs/ui-components/camera/index.js +2 -2
- package/lib/commonjs/ui-components/camera/index.js.map +1 -1
- package/lib/commonjs/ui-components/camera/qr-code-scanner.js +12 -14
- package/lib/commonjs/ui-components/camera/qr-code-scanner.js.map +1 -1
- package/lib/commonjs/ui-components/control/checkbox.js +11 -12
- package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
- package/lib/commonjs/ui-components/control/index.js.map +1 -1
- package/lib/commonjs/ui-components/control/switch.js +10 -12
- package/lib/commonjs/ui-components/control/switch.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-card.js +22 -26
- package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +30 -35
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +27 -20
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-header.js +25 -24
- package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +27 -29
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/index.js +6 -41
- package/lib/commonjs/ui-components/credential/card/index.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js +51 -60
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js +18 -21
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/commonjs/ui-components/credential/index.js +2 -25
- package/lib/commonjs/ui-components/credential/index.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector-status.js +3 -4
- package/lib/commonjs/ui-components/credential/selector-status.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector.js +8 -10
- package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
- package/lib/commonjs/ui-components/detail/detail.js +12 -14
- package/lib/commonjs/ui-components/detail/detail.js.map +1 -1
- package/lib/commonjs/ui-components/detail/index.js +1 -1
- package/lib/commonjs/ui-components/detail/index.js.map +1 -1
- package/lib/commonjs/ui-components/entity/avatar.js +14 -16
- package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
- package/lib/commonjs/ui-components/entity/entity-cluster.js +15 -18
- package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/commonjs/ui-components/entity/index.js +2 -2
- package/lib/commonjs/ui-components/entity/index.js.map +1 -1
- package/lib/commonjs/ui-components/header/focus-aware-status-bar.js +3 -4
- package/lib/commonjs/ui-components/header/focus-aware-status-bar.js.map +1 -1
- package/lib/commonjs/ui-components/header/foldable-header.js +14 -17
- package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
- package/lib/commonjs/ui-components/header/header.js +12 -14
- package/lib/commonjs/ui-components/header/header.js.map +1 -1
- package/lib/commonjs/ui-components/header/index.js +4 -24
- package/lib/commonjs/ui-components/header/index.js.map +1 -1
- package/lib/commonjs/ui-components/header/navigation-header.js +27 -33
- package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/data-item.js +30 -23
- package/lib/commonjs/ui-components/history/data-item.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-details.js +181 -0
- package/lib/commonjs/ui-components/history/history-details.js.map +1 -0
- package/lib/commonjs/ui-components/history/{history-list-item.js → history-item.js} +47 -26
- package/lib/commonjs/ui-components/history/history-item.js.map +1 -0
- package/lib/commonjs/ui-components/history/history-section-header.js +7 -9
- package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js +13 -12
- package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/history/index.js +30 -9
- package/lib/commonjs/ui-components/history/index.js.map +1 -1
- package/lib/commonjs/ui-components/icons/connectivity.js +19 -24
- package/lib/commonjs/ui-components/icons/connectivity.js.map +1 -1
- package/lib/commonjs/ui-components/icons/credential.js +60 -71
- package/lib/commonjs/ui-components/icons/credential.js.map +1 -1
- package/lib/commonjs/ui-components/icons/entity.js +7 -8
- package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
- package/lib/commonjs/ui-components/icons/history.js +113 -133
- package/lib/commonjs/ui-components/icons/history.js.map +1 -1
- package/lib/commonjs/ui-components/icons/icons.js +73 -90
- package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
- package/lib/commonjs/ui-components/icons/index.js.map +1 -1
- package/lib/commonjs/ui-components/icons/input.js +3 -3
- package/lib/commonjs/ui-components/icons/input.js.map +1 -1
- package/lib/commonjs/ui-components/icons/keypad.js +69 -81
- package/lib/commonjs/ui-components/icons/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/icons/loader.js +4 -4
- package/lib/commonjs/ui-components/icons/loader.js.map +1 -1
- package/lib/commonjs/ui-components/icons/nerd-view.js +6 -9
- package/lib/commonjs/ui-components/icons/nerd-view.js.map +1 -1
- package/lib/commonjs/ui-components/icons/selector.js +8 -9
- package/lib/commonjs/ui-components/icons/selector.js.map +1 -1
- package/lib/commonjs/ui-components/icons/wallet.js +16 -19
- package/lib/commonjs/ui-components/icons/wallet.js.map +1 -1
- package/lib/commonjs/ui-components/image/image-or-component.js +15 -18
- package/lib/commonjs/ui-components/image/image-or-component.js.map +1 -1
- package/lib/commonjs/ui-components/image/index.js +2 -9
- package/lib/commonjs/ui-components/image/index.js.map +1 -1
- package/lib/commonjs/ui-components/index.js.map +1 -1
- package/lib/commonjs/ui-components/input/index.js +2 -2
- package/lib/commonjs/ui-components/input/index.js.map +1 -1
- package/lib/commonjs/ui-components/input/radio-group.js +28 -25
- package/lib/commonjs/ui-components/input/radio-group.js.map +1 -1
- package/lib/commonjs/ui-components/input/selection-input.js +27 -38
- package/lib/commonjs/ui-components/input/selection-input.js.map +1 -1
- package/lib/commonjs/ui-components/input/text-input.js +25 -28
- package/lib/commonjs/ui-components/input/text-input.js.map +1 -1
- package/lib/commonjs/ui-components/list/index.js +20 -2
- package/lib/commonjs/ui-components/list/index.js.map +1 -1
- package/lib/commonjs/ui-components/list/list-page-loading-indicator.js +14 -0
- package/lib/commonjs/ui-components/list/list-page-loading-indicator.js.map +1 -0
- package/lib/commonjs/ui-components/list/list-section-header.js +10 -12
- package/lib/commonjs/ui-components/list/list-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/list/list-title-header.js +6 -8
- package/lib/commonjs/ui-components/list/list-title-header.js.map +1 -1
- package/lib/commonjs/ui-components/list/wallet/empty-list.js +73 -0
- package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -0
- package/lib/commonjs/ui-components/list/wallet/empty-search-result.js +41 -0
- package/lib/commonjs/ui-components/list/wallet/empty-search-result.js.map +1 -0
- package/lib/commonjs/ui-components/list/wallet/index.js +21 -0
- package/lib/commonjs/ui-components/list/wallet/index.js.map +1 -0
- package/lib/commonjs/ui-components/loader/index.js +2 -2
- package/lib/commonjs/ui-components/loader/index.js.map +1 -1
- package/lib/commonjs/ui-components/loader/loader.js +17 -17
- package/lib/commonjs/ui-components/loader/loader.js.map +1 -1
- package/lib/commonjs/ui-components/loader/loading-result.js +22 -21
- package/lib/commonjs/ui-components/loader/loading-result.js.map +1 -1
- package/lib/commonjs/ui-components/nerd-view/index.js +2 -8
- package/lib/commonjs/ui-components/nerd-view/index.js.map +1 -1
- package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js +37 -41
- package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
- package/lib/commonjs/ui-components/pin/index.js +2 -2
- package/lib/commonjs/ui-components/pin/index.js.map +1 -1
- package/lib/commonjs/ui-components/pin/keypad.js +19 -23
- package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-code-screen.js +19 -21
- package/lib/commonjs/ui-components/pin/pin-code-screen.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-lock-animation.js +1 -2
- package/lib/commonjs/ui-components/pin/pin-lock-animation.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pin-lock.js +10 -12
- package/lib/commonjs/ui-components/pin/pin-lock.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pins.js +8 -9
- package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
- package/lib/commonjs/ui-components/screens/backup-screen.js +15 -18
- package/lib/commonjs/ui-components/screens/backup-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/image-preview-screen.js +12 -14
- package/lib/commonjs/ui-components/screens/image-preview-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/index.js +8 -49
- package/lib/commonjs/ui-components/screens/index.js.map +1 -1
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +34 -41
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js +14 -16
- package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/scroll-view-screen.js +12 -14
- package/lib/commonjs/ui-components/screens/scroll-view-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/section-list-screen.js +13 -15
- package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/animated-search-bar.js +10 -12
- package/lib/commonjs/ui-components/searchbar/animated-search-bar.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/index.js +2 -2
- package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
- package/lib/commonjs/ui-components/searchbar/search-bar.js +15 -17
- package/lib/commonjs/ui-components/searchbar/search-bar.js.map +1 -1
- package/lib/commonjs/ui-components/settings/button-setting.js +14 -16
- package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
- package/lib/commonjs/ui-components/settings/index.js +2 -2
- package/lib/commonjs/ui-components/settings/index.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item-separator.js +6 -8
- package/lib/commonjs/ui-components/settings/setting-item-separator.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item.js +11 -13
- package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
- package/lib/commonjs/ui-components/settings/settings-button.js +7 -9
- package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
- package/lib/commonjs/ui-components/settings/switch-setting.js +11 -13
- package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/commonjs/ui-components/state/error-screen.js +10 -12
- package/lib/commonjs/ui-components/state/error-screen.js.map +1 -1
- package/lib/commonjs/ui-components/state/index.js +2 -2
- package/lib/commonjs/ui-components/state/index.js.map +1 -1
- package/lib/commonjs/ui-components/text/base.js +14 -16
- package/lib/commonjs/ui-components/text/base.js.map +1 -1
- package/lib/commonjs/ui-components/text/font.js +11 -13
- package/lib/commonjs/ui-components/text/font.js.map +1 -1
- package/lib/commonjs/ui-components/text/index.js +2 -9
- package/lib/commonjs/ui-components/text/index.js.map +1 -1
- package/lib/commonjs/ui-components/text/typography.js +10 -13
- package/lib/commonjs/ui-components/text/typography.js.map +1 -1
- package/lib/commonjs/ui-components/theme/color-scheme-context.js +2 -1
- package/lib/commonjs/ui-components/theme/color-scheme-context.js.map +1 -1
- package/lib/commonjs/ui-components/theme/color-scheme.js.map +1 -1
- package/lib/commonjs/ui-components/theme/index.js.map +1 -1
- package/lib/commonjs/utils/array.js.map +1 -1
- package/lib/commonjs/utils/backup.js.map +1 -1
- package/lib/commonjs/utils/color.js +1 -1
- package/lib/commonjs/utils/color.js.map +1 -1
- package/lib/commonjs/utils/contrasting-status-bar.js +8 -10
- package/lib/commonjs/utils/contrasting-status-bar.js.map +1 -1
- package/lib/commonjs/utils/date.js +3 -3
- package/lib/commonjs/utils/date.js.map +1 -1
- package/lib/commonjs/utils/filtering.js +11 -0
- package/lib/commonjs/utils/filtering.js.map +1 -0
- package/lib/commonjs/utils/history.js +76 -0
- package/lib/commonjs/utils/history.js.map +1 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.js +37 -23
- package/lib/commonjs/utils/hooks/connectivity/connectivity.js.map +1 -1
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +6 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/backup.js +31 -31
- package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/cache.js +44 -0
- package/lib/commonjs/utils/hooks/core/cache.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/core-config.js +15 -1
- package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-context.js +15 -10
- package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-init.js +18 -12
- package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credential-schemas.js +16 -27
- package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credentials.js +27 -37
- package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/dids.js +4 -6
- package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/error-code.js +3 -4
- package/lib/commonjs/utils/hooks/core/error-code.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/history.js +5 -37
- package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/index.js +11 -0
- package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proof-schemas.js +23 -38
- package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proofs.js +107 -76
- package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/query.js +1 -2
- package/lib/commonjs/utils/hooks/core/query.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/trust-entity.js +8 -4
- package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
- package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js +1 -2
- package/lib/commonjs/utils/hooks/header/on-scroll-header-state.js.map +1 -1
- package/lib/commonjs/utils/hooks/http/client.js.map +1 -1
- package/lib/commonjs/utils/hooks/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/list/list-content-inset.js +9 -10
- package/lib/commonjs/utils/hooks/list/list-content-inset.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/before-remove.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/deep-link.js +3 -4
- package/lib/commonjs/utils/hooks/navigation/deep-link.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/open-settings.js +1 -2
- package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/commonjs/utils/hooks/pin-security/pin-security.js +1 -2
- package/lib/commonjs/utils/hooks/pin-security/pin-security.js.map +1 -1
- package/lib/commonjs/utils/hooks/revocation/credential-status.js +17 -26
- package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/commonjs/utils/index.js +37 -1
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/navigation.js +5 -5
- package/lib/commonjs/utils/navigation.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing.js +16 -20
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js +16 -26
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/commonjs/utils/parsers/index.js +11 -0
- package/lib/commonjs/utils/parsers/index.js.map +1 -1
- package/lib/commonjs/utils/parsers/query.js +3 -2
- package/lib/commonjs/utils/parsers/query.js.map +1 -1
- package/lib/commonjs/utils/parsers/universal-links.js +33 -0
- package/lib/commonjs/utils/parsers/universal-links.js.map +1 -0
- package/lib/commonjs/utils/parsers/universal-links.test.js +40 -0
- package/lib/commonjs/utils/parsers/universal-links.test.js.map +1 -0
- package/lib/commonjs/utils/ref.js.map +1 -1
- package/lib/commonjs/utils/reporting.js +4 -2
- package/lib/commonjs/utils/reporting.js.map +1 -1
- package/lib/commonjs/utils/string.js.map +1 -1
- package/lib/commonjs/utils/testID.js +1 -4
- package/lib/commonjs/utils/testID.js.map +1 -1
- package/lib/commonjs/utils/testID.test.js.map +1 -1
- package/lib/commonjs/utils/useMemoAsync.js +9 -0
- package/lib/commonjs/utils/useMemoAsync.js.map +1 -1
- package/lib/commonjs/utils/uuid.js +1 -1
- package/lib/commonjs/utils/uuid.js.map +1 -1
- package/lib/module/components/backup/index.js.map +1 -1
- package/lib/module/components/backup/preview-credentials.js +17 -21
- package/lib/module/components/backup/preview-credentials.js.map +1 -1
- package/lib/module/components/credential/credential.js +10 -11
- package/lib/module/components/credential/credential.js.map +1 -1
- package/lib/module/components/credential/index.js.map +1 -1
- package/lib/module/components/entity/EntityButtons.js +17 -21
- package/lib/module/components/entity/EntityButtons.js.map +1 -1
- package/lib/module/components/entity/entity-attributes.js +12 -13
- package/lib/module/components/entity/entity-attributes.js.map +1 -1
- package/lib/module/components/entity/entity-details-with-buttons.js +15 -15
- package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/module/components/entity/entity-details.js +8 -9
- package/lib/module/components/entity/entity-details.js.map +1 -1
- package/lib/module/components/entity/index.js.map +1 -1
- package/lib/module/components/history/history-details-screen.js +59 -0
- package/lib/module/components/history/history-details-screen.js.map +1 -0
- package/lib/module/components/history/history-list-item-icon.js +84 -0
- package/lib/module/components/history/history-list-item-icon.js.map +1 -0
- package/lib/module/components/history/history-list-item.js +36 -0
- package/lib/module/components/history/history-list-item.js.map +1 -0
- package/lib/module/components/history/history-list-screen.js +112 -0
- package/lib/module/components/history/history-list-screen.js.map +1 -0
- package/lib/module/components/history/history-list-section-header.js +29 -0
- package/lib/module/components/history/history-list-section-header.js.map +1 -0
- package/lib/module/components/history/history-list.js +90 -0
- package/lib/module/components/history/history-list.js.map +1 -0
- package/lib/module/components/history/index.js +7 -0
- package/lib/module/components/history/index.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/navigation/header-buttons.js +19 -23
- package/lib/module/components/navigation/header-buttons.js.map +1 -1
- package/lib/module/components/navigation/index.js.map +1 -1
- package/lib/module/components/proof-request/group.js +3 -4
- package/lib/module/components/proof-request/group.js.map +1 -1
- package/lib/module/components/proof-request/index.js.map +1 -1
- package/lib/module/components/proof-request/select-credential.js +10 -11
- package/lib/module/components/proof-request/select-credential.js.map +1 -1
- package/lib/module/components/proof-request/share-credential.js +21 -25
- package/lib/module/components/proof-request/share-credential.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/normalize-color.d.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibility.js +5 -7
- package/lib/module/ui-components/accessibility/accessibility.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistory.js +4 -8
- package/lib/module/ui-components/accessibility/accessibilityHistory.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js +10 -8
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityLanguage.js +6 -8
- package/lib/module/ui-components/accessibility/accessibilityLanguage.js.map +1 -1
- package/lib/module/ui-components/accessibility/index.js +4 -4
- package/lib/module/ui-components/accessibility/index.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale/index.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale.test.js.map +1 -1
- package/lib/module/ui-components/action-modal/ActionModal.js +7 -8
- package/lib/module/ui-components/action-modal/ActionModal.js.map +1 -1
- package/lib/module/ui-components/action-modal/index.js.map +1 -1
- package/lib/module/ui-components/activity-indicator/activity-indicator.js +6 -7
- package/lib/module/ui-components/activity-indicator/activity-indicator.js.map +1 -1
- package/lib/module/ui-components/activity-indicator/index.js.map +1 -1
- package/lib/module/ui-components/blur/blur-view.js +10 -11
- package/lib/module/ui-components/blur/blur-view.js.map +1 -1
- package/lib/module/ui-components/blur/index.js.map +1 -1
- package/lib/module/ui-components/buttons/back-button.js +10 -11
- package/lib/module/ui-components/buttons/back-button.js.map +1 -1
- package/lib/module/ui-components/buttons/button.js +17 -18
- package/lib/module/ui-components/buttons/button.js.map +1 -1
- package/lib/module/ui-components/buttons/connectivity-button.js +14 -14
- package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/module/ui-components/buttons/filter-button.js +6 -7
- package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/module/ui-components/buttons/ghost-button.js +9 -10
- package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/module/ui-components/buttons/hold-button.js +236 -0
- package/lib/module/ui-components/buttons/hold-button.js.map +1 -0
- package/lib/module/ui-components/buttons/index.js +8 -7
- package/lib/module/ui-components/buttons/index.js.map +1 -1
- package/lib/module/ui-components/buttons/scan-button.js +5 -6
- package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/module/ui-components/camera/camera-overlay.js +7 -9
- package/lib/module/ui-components/camera/camera-overlay.js.map +1 -1
- package/lib/module/ui-components/camera/index.js.map +1 -1
- package/lib/module/ui-components/camera/qr-code-scanner.js +8 -9
- package/lib/module/ui-components/camera/qr-code-scanner.js.map +1 -1
- package/lib/module/ui-components/control/checkbox.js +9 -10
- package/lib/module/ui-components/control/checkbox.js.map +1 -1
- package/lib/module/ui-components/control/index.js.map +1 -1
- package/lib/module/ui-components/control/switch.js +8 -9
- package/lib/module/ui-components/control/switch.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-card.js +16 -17
- package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js +26 -30
- package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-list-item.js +23 -15
- package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-header.js +21 -19
- package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-image-carousel.js +23 -23
- package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/module/ui-components/credential/card/index.js +10 -10
- package/lib/module/ui-components/credential/card/index.js.map +1 -1
- package/lib/module/ui-components/credential/credential-attribute-item.js +47 -55
- package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js +15 -18
- package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/module/ui-components/credential/index.js +2 -2
- package/lib/module/ui-components/credential/index.js.map +1 -1
- package/lib/module/ui-components/credential/selector-status.js +3 -3
- package/lib/module/ui-components/credential/selector-status.js.map +1 -1
- package/lib/module/ui-components/credential/selector.js +5 -6
- package/lib/module/ui-components/credential/selector.js.map +1 -1
- package/lib/module/ui-components/detail/detail.js +9 -10
- package/lib/module/ui-components/detail/detail.js.map +1 -1
- package/lib/module/ui-components/detail/index.js.map +1 -1
- package/lib/module/ui-components/entity/avatar.js +10 -11
- package/lib/module/ui-components/entity/avatar.js.map +1 -1
- package/lib/module/ui-components/entity/entity-cluster.js +11 -13
- package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/module/ui-components/entity/index.js.map +1 -1
- package/lib/module/ui-components/header/focus-aware-status-bar.js +1 -1
- package/lib/module/ui-components/header/focus-aware-status-bar.js.map +1 -1
- package/lib/module/ui-components/header/foldable-header.js +10 -12
- package/lib/module/ui-components/header/foldable-header.js.map +1 -1
- package/lib/module/ui-components/header/header.js +10 -11
- package/lib/module/ui-components/header/header.js.map +1 -1
- package/lib/module/ui-components/header/index.js +6 -6
- package/lib/module/ui-components/header/index.js.map +1 -1
- package/lib/module/ui-components/header/navigation-header.js +23 -28
- package/lib/module/ui-components/header/navigation-header.js.map +1 -1
- package/lib/module/ui-components/history/data-item.js +23 -15
- package/lib/module/ui-components/history/data-item.js.map +1 -1
- package/lib/module/ui-components/history/history-details.js +171 -0
- package/lib/module/ui-components/history/history-details.js.map +1 -0
- package/lib/module/ui-components/history/{history-list-item.js → history-item.js} +44 -22
- package/lib/module/ui-components/history/history-item.js.map +1 -0
- package/lib/module/ui-components/history/history-section-header.js +6 -7
- package/lib/module/ui-components/history/history-section-header.js.map +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js +8 -9
- package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/module/ui-components/history/index.js +5 -4
- package/lib/module/ui-components/history/index.js.map +1 -1
- package/lib/module/ui-components/icons/connectivity.js +16 -21
- package/lib/module/ui-components/icons/connectivity.js.map +1 -1
- package/lib/module/ui-components/icons/credential.js +57 -68
- package/lib/module/ui-components/icons/credential.js.map +1 -1
- package/lib/module/ui-components/icons/entity.js +4 -5
- package/lib/module/ui-components/icons/entity.js.map +1 -1
- package/lib/module/ui-components/icons/history.js +101 -128
- package/lib/module/ui-components/icons/history.js.map +1 -1
- package/lib/module/ui-components/icons/icons.js +70 -87
- package/lib/module/ui-components/icons/icons.js.map +1 -1
- package/lib/module/ui-components/icons/index.js.map +1 -1
- package/lib/module/ui-components/icons/input.js.map +1 -1
- package/lib/module/ui-components/icons/keypad.js +66 -78
- package/lib/module/ui-components/icons/keypad.js.map +1 -1
- package/lib/module/ui-components/icons/loader.js +1 -1
- package/lib/module/ui-components/icons/loader.js.map +1 -1
- package/lib/module/ui-components/icons/nerd-view.js.map +1 -1
- package/lib/module/ui-components/icons/selector.js +5 -6
- package/lib/module/ui-components/icons/selector.js.map +1 -1
- package/lib/module/ui-components/icons/wallet.js +13 -16
- package/lib/module/ui-components/icons/wallet.js.map +1 -1
- package/lib/module/ui-components/image/image-or-component.js +12 -14
- package/lib/module/ui-components/image/image-or-component.js.map +1 -1
- package/lib/module/ui-components/image/index.js +2 -2
- package/lib/module/ui-components/image/index.js.map +1 -1
- package/lib/module/ui-components/index.js.map +1 -1
- package/lib/module/ui-components/input/index.js.map +1 -1
- package/lib/module/ui-components/input/radio-group.js +26 -22
- package/lib/module/ui-components/input/radio-group.js.map +1 -1
- package/lib/module/ui-components/input/selection-input.js +21 -31
- package/lib/module/ui-components/input/selection-input.js.map +1 -1
- package/lib/module/ui-components/input/text-input.js +21 -22
- package/lib/module/ui-components/input/text-input.js.map +1 -1
- package/lib/module/ui-components/list/index.js +1 -0
- package/lib/module/ui-components/list/index.js.map +1 -1
- package/lib/module/ui-components/list/list-page-loading-indicator.js +7 -0
- package/lib/module/ui-components/list/list-page-loading-indicator.js.map +1 -0
- package/lib/module/ui-components/list/list-section-header.js +8 -9
- package/lib/module/ui-components/list/list-section-header.js.map +1 -1
- package/lib/module/ui-components/list/list-title-header.js +4 -5
- package/lib/module/ui-components/list/list-title-header.js.map +1 -1
- package/lib/module/ui-components/list/wallet/empty-list.js +66 -0
- package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -0
- package/lib/module/ui-components/list/wallet/empty-search-result.js +34 -0
- package/lib/module/ui-components/list/wallet/empty-search-result.js.map +1 -0
- package/lib/module/ui-components/list/wallet/index.js +4 -0
- package/lib/module/ui-components/list/wallet/index.js.map +1 -0
- package/lib/module/ui-components/loader/index.js.map +1 -1
- package/lib/module/ui-components/loader/loader.js +14 -12
- package/lib/module/ui-components/loader/loader.js.map +1 -1
- package/lib/module/ui-components/loader/loading-result.js +21 -19
- package/lib/module/ui-components/loader/loading-result.js.map +1 -1
- package/lib/module/ui-components/nerd-view/index.js +2 -2
- package/lib/module/ui-components/nerd-view/index.js.map +1 -1
- package/lib/module/ui-components/nerd-view/nerd-mode-item.js +31 -34
- package/lib/module/ui-components/nerd-view/nerd-mode-item.js.map +1 -1
- package/lib/module/ui-components/pin/index.js.map +1 -1
- package/lib/module/ui-components/pin/keypad.js +17 -19
- package/lib/module/ui-components/pin/keypad.js.map +1 -1
- package/lib/module/ui-components/pin/pin-code-screen.js +16 -17
- package/lib/module/ui-components/pin/pin-code-screen.js.map +1 -1
- package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -1
- package/lib/module/ui-components/pin/pin-lock.js +6 -7
- package/lib/module/ui-components/pin/pin-lock.js.map +1 -1
- package/lib/module/ui-components/pin/pins.js +7 -8
- package/lib/module/ui-components/pin/pins.js.map +1 -1
- package/lib/module/ui-components/screens/backup-screen.js +13 -14
- package/lib/module/ui-components/screens/backup-screen.js.map +1 -1
- package/lib/module/ui-components/screens/image-preview-screen.js +9 -10
- package/lib/module/ui-components/screens/image-preview-screen.js.map +1 -1
- package/lib/module/ui-components/screens/index.js +12 -12
- package/lib/module/ui-components/screens/index.js.map +1 -1
- package/lib/module/ui-components/screens/nerd-mode-screen.js +29 -34
- package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/module/ui-components/screens/qr-code-scanner-screen.js +10 -11
- package/lib/module/ui-components/screens/qr-code-scanner-screen.js.map +1 -1
- package/lib/module/ui-components/screens/scroll-view-screen.js +10 -11
- package/lib/module/ui-components/screens/scroll-view-screen.js.map +1 -1
- package/lib/module/ui-components/screens/section-list-screen.js +11 -12
- package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/module/ui-components/searchbar/animated-search-bar.js +6 -7
- package/lib/module/ui-components/searchbar/animated-search-bar.js.map +1 -1
- package/lib/module/ui-components/searchbar/index.js.map +1 -1
- package/lib/module/ui-components/searchbar/search-bar.js +11 -12
- package/lib/module/ui-components/searchbar/search-bar.js.map +1 -1
- package/lib/module/ui-components/settings/button-setting.js +10 -11
- package/lib/module/ui-components/settings/button-setting.js.map +1 -1
- package/lib/module/ui-components/settings/index.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item-separator.js +4 -5
- package/lib/module/ui-components/settings/setting-item-separator.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item.js +7 -8
- package/lib/module/ui-components/settings/setting-item.js.map +1 -1
- package/lib/module/ui-components/settings/settings-button.js +5 -6
- package/lib/module/ui-components/settings/settings-button.js.map +1 -1
- package/lib/module/ui-components/settings/switch-setting.js +9 -10
- package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/module/ui-components/state/error-screen.js +7 -8
- package/lib/module/ui-components/state/error-screen.js.map +1 -1
- package/lib/module/ui-components/state/index.js.map +1 -1
- package/lib/module/ui-components/text/base.js +12 -13
- package/lib/module/ui-components/text/base.js.map +1 -1
- package/lib/module/ui-components/text/font.js +10 -11
- package/lib/module/ui-components/text/font.js.map +1 -1
- package/lib/module/ui-components/text/index.js +2 -2
- package/lib/module/ui-components/text/index.js.map +1 -1
- package/lib/module/ui-components/text/typography.js +8 -10
- package/lib/module/ui-components/text/typography.js.map +1 -1
- package/lib/module/ui-components/theme/color-scheme-context.js +1 -0
- package/lib/module/ui-components/theme/color-scheme-context.js.map +1 -1
- package/lib/module/ui-components/theme/color-scheme.js.map +1 -1
- package/lib/module/ui-components/theme/index.js.map +1 -1
- package/lib/module/utils/array.js.map +1 -1
- package/lib/module/utils/backup.js.map +1 -1
- package/lib/module/utils/color.js.map +1 -1
- package/lib/module/utils/contrasting-status-bar.js +5 -6
- package/lib/module/utils/contrasting-status-bar.js.map +1 -1
- package/lib/module/utils/date.js +4 -4
- package/lib/module/utils/date.js.map +1 -1
- package/lib/module/utils/filtering.js +4 -0
- package/lib/module/utils/filtering.js.map +1 -0
- package/lib/module/utils/history.js +66 -0
- package/lib/module/utils/history.js.map +1 -0
- package/lib/module/utils/hooks/connectivity/connectivity.js +36 -19
- package/lib/module/utils/hooks/connectivity/connectivity.js.map +1 -1
- package/lib/module/utils/hooks/connectivity/connectivity.test.js +6 -0
- package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/module/utils/hooks/core/backup.js +31 -31
- package/lib/module/utils/hooks/core/backup.js.map +1 -1
- package/lib/module/utils/hooks/core/cache.js +37 -0
- package/lib/module/utils/hooks/core/cache.js.map +1 -0
- package/lib/module/utils/hooks/core/core-config.js +11 -0
- package/lib/module/utils/hooks/core/core-config.js.map +1 -1
- package/lib/module/utils/hooks/core/core-context.js +14 -9
- package/lib/module/utils/hooks/core/core-context.js.map +1 -1
- package/lib/module/utils/hooks/core/core-init.js +16 -8
- package/lib/module/utils/hooks/core/core-init.js.map +1 -1
- package/lib/module/utils/hooks/core/credential-schemas.js +12 -19
- package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/credentials.js +26 -36
- package/lib/module/utils/hooks/core/credentials.js.map +1 -1
- package/lib/module/utils/hooks/core/dids.js +3 -4
- package/lib/module/utils/hooks/core/dids.js.map +1 -1
- package/lib/module/utils/hooks/core/error-code.js +3 -3
- package/lib/module/utils/hooks/core/error-code.js.map +1 -1
- package/lib/module/utils/hooks/core/history.js +4 -35
- package/lib/module/utils/hooks/core/history.js.map +1 -1
- package/lib/module/utils/hooks/core/index.js +1 -0
- package/lib/module/utils/hooks/core/index.js.map +1 -1
- package/lib/module/utils/hooks/core/proof-schemas.js +19 -30
- package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/proofs.js +101 -67
- package/lib/module/utils/hooks/core/proofs.js.map +1 -1
- package/lib/module/utils/hooks/core/query.js.map +1 -1
- package/lib/module/utils/hooks/core/trust-entity.js +7 -3
- package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/module/utils/hooks/credential-card/credential-card-expanding.js.map +1 -1
- package/lib/module/utils/hooks/header/on-scroll-header-state.js +1 -2
- package/lib/module/utils/hooks/header/on-scroll-header-state.js.map +1 -1
- package/lib/module/utils/hooks/http/client.js.map +1 -1
- package/lib/module/utils/hooks/index.js.map +1 -1
- package/lib/module/utils/hooks/list/list-content-inset.js +9 -10
- package/lib/module/utils/hooks/list/list-content-inset.js.map +1 -1
- package/lib/module/utils/hooks/navigation/before-remove.js.map +1 -1
- package/lib/module/utils/hooks/navigation/close-button-timeout.js.map +1 -1
- package/lib/module/utils/hooks/navigation/deep-link.js +3 -4
- package/lib/module/utils/hooks/navigation/deep-link.js.map +1 -1
- package/lib/module/utils/hooks/navigation/index.js.map +1 -1
- package/lib/module/utils/hooks/navigation/open-settings.js +1 -2
- package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/module/utils/hooks/pin-security/pin-security.js +1 -2
- package/lib/module/utils/hooks/pin-security/pin-security.js.map +1 -1
- package/lib/module/utils/hooks/revocation/credential-status.js +17 -26
- package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/module/utils/index.js +3 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/navigation.js +5 -5
- package/lib/module/utils/navigation.js.map +1 -1
- package/lib/module/utils/parsers/credential-images.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing.js +15 -19
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js +16 -25
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/module/utils/parsers/index.js +1 -0
- package/lib/module/utils/parsers/index.js.map +1 -1
- package/lib/module/utils/parsers/query.js +3 -2
- package/lib/module/utils/parsers/query.js.map +1 -1
- package/lib/module/utils/parsers/universal-links.js +25 -0
- package/lib/module/utils/parsers/universal-links.js.map +1 -0
- package/lib/module/utils/parsers/universal-links.test.js +38 -0
- package/lib/module/utils/parsers/universal-links.test.js.map +1 -0
- package/lib/module/utils/ref.js.map +1 -1
- package/lib/module/utils/reporting.js +1 -0
- package/lib/module/utils/reporting.js.map +1 -1
- package/lib/module/utils/string.js.map +1 -1
- package/lib/module/utils/testID.js +1 -4
- package/lib/module/utils/testID.js.map +1 -1
- package/lib/module/utils/testID.test.js.map +1 -1
- package/lib/module/utils/useMemoAsync.js +10 -0
- package/lib/module/utils/useMemoAsync.js.map +1 -1
- package/lib/module/utils/uuid.js.map +1 -1
- package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
- package/lib/typescript/components/history/history-details-screen.d.ts +20 -0
- package/lib/typescript/components/history/history-list-item-icon.d.ts +8 -0
- package/lib/typescript/components/history/history-list-item.d.ts +20 -0
- package/lib/typescript/components/history/history-list-screen.d.ts +22 -0
- package/lib/typescript/components/history/history-list-section-header.d.ts +13 -0
- package/lib/typescript/components/history/history-list.d.ts +19 -0
- package/lib/typescript/components/history/index.d.ts +6 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/ui-components/accessibility/accessibility.d.ts +2 -2
- package/lib/typescript/ui-components/accessibility/accessibilityHistory.d.ts +1 -1
- package/lib/typescript/ui-components/accessibility/accessibilityHistoryWrappers.d.ts +3 -3
- package/lib/typescript/ui-components/accessibility/index.d.ts +5 -3
- package/lib/typescript/ui-components/buttons/button.d.ts +2 -2
- package/lib/typescript/ui-components/buttons/hold-button.d.ts +16 -0
- package/lib/typescript/ui-components/buttons/index.d.ts +15 -7
- package/lib/typescript/ui-components/buttons/scan-button.d.ts +2 -2
- package/lib/typescript/ui-components/credential/card/credential-header.d.ts +1 -1
- package/lib/typescript/ui-components/credential/card/index.d.ts +10 -5
- package/lib/typescript/ui-components/credential/index.d.ts +2 -1
- package/lib/typescript/ui-components/header/index.d.ts +6 -3
- package/lib/typescript/ui-components/history/data-item.d.ts +2 -2
- package/lib/typescript/ui-components/history/history-details.d.ts +51 -0
- package/lib/typescript/ui-components/history/{history-list-item.d.ts → history-item.d.ts} +4 -3
- package/lib/typescript/ui-components/history/history-section-header.d.ts +2 -2
- package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
- package/lib/typescript/ui-components/history/index.d.ts +5 -4
- package/lib/typescript/ui-components/icons/history.d.ts +20 -35
- package/lib/typescript/ui-components/image/index.d.ts +2 -1
- package/lib/typescript/ui-components/input/selection-input.d.ts +1 -1
- package/lib/typescript/ui-components/list/index.d.ts +1 -0
- package/lib/typescript/ui-components/list/list-page-loading-indicator.d.ts +4 -0
- package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +10 -0
- package/lib/typescript/ui-components/list/wallet/empty-search-result.d.ts +7 -0
- package/lib/typescript/ui-components/list/wallet/index.d.ts +3 -0
- package/lib/typescript/ui-components/nerd-view/index.d.ts +2 -1
- package/lib/typescript/ui-components/pin/keypad.d.ts +2 -2
- package/lib/typescript/ui-components/screens/index.d.ts +12 -6
- package/lib/typescript/ui-components/text/index.d.ts +2 -1
- package/lib/typescript/ui-components/text/typography.d.ts +14 -14
- package/lib/typescript/ui-components/theme/color-scheme.d.ts +1 -0
- package/lib/typescript/utils/filtering.d.ts +1 -0
- package/lib/typescript/utils/history.d.ts +10 -0
- package/lib/typescript/utils/hooks/connectivity/connectivity.d.ts +1 -1
- package/lib/typescript/utils/hooks/core/backup.d.ts +2 -1
- package/lib/typescript/utils/hooks/core/cache.d.ts +2 -0
- package/lib/typescript/utils/hooks/core/core-config.d.ts +5 -1
- package/lib/typescript/utils/hooks/core/core-init.d.ts +10 -1
- package/lib/typescript/utils/hooks/core/credentials.d.ts +7 -3
- package/lib/typescript/utils/hooks/core/history.d.ts +2 -5
- package/lib/typescript/utils/hooks/core/index.d.ts +1 -0
- package/lib/typescript/utils/hooks/core/proofs.d.ts +14 -8
- package/lib/typescript/utils/hooks/core/trust-entity.d.ts +5 -0
- package/lib/typescript/utils/hooks/revocation/credential-status.d.ts +2 -1
- package/lib/typescript/utils/index.d.ts +3 -0
- package/lib/typescript/utils/parsers/index.d.ts +1 -0
- package/lib/typescript/utils/parsers/universal-links.d.ts +1 -0
- package/lib/typescript/utils/parsers/universal-links.test.d.ts +1 -0
- package/lib/typescript/utils/ref.d.ts +1 -1
- package/package.json +60 -46
- package/src/components/entity/entity-attributes.tsx +4 -3
- package/src/components/entity/entity-details-with-buttons.tsx +4 -3
- package/src/components/history/history-details-screen.tsx +89 -0
- package/src/components/history/history-list-item-icon.tsx +108 -0
- package/src/components/history/history-list-item.tsx +53 -0
- package/src/components/history/history-list-screen.tsx +154 -0
- package/src/components/history/history-list-section-header.tsx +42 -0
- package/src/components/history/history-list.tsx +116 -0
- package/src/components/history/index.tsx +6 -0
- package/src/components/index.ts +1 -0
- package/src/ui-components/accessibility/accessibility.ts +2 -2
- package/src/ui-components/accessibility/accessibilityHistory.tsx +2 -2
- package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +3 -5
- package/src/ui-components/accessibility/index.ts +4 -3
- package/src/ui-components/action-modal/ActionModal.stories.tsx +7 -3
- package/src/ui-components/activity-indicator/activity-indicator.stories.tsx +3 -6
- package/src/ui-components/buttons/back-button.stories.tsx +7 -8
- package/src/ui-components/buttons/button.stories.tsx +9 -10
- package/src/ui-components/buttons/connectivity-button.stories.tsx +10 -11
- package/src/ui-components/buttons/connectivity-button.tsx +1 -1
- package/src/ui-components/buttons/ghost-button.stories.tsx +8 -8
- package/src/ui-components/buttons/hold-button.stories.tsx +29 -0
- package/src/ui-components/buttons/hold-button.tsx +276 -0
- package/src/ui-components/buttons/index.ts +16 -6
- package/src/ui-components/buttons/scan-button.stories.tsx +8 -4
- package/src/ui-components/control/checkbox.stories.tsx +8 -8
- package/src/ui-components/control/switch.stories.tsx +11 -8
- package/src/ui-components/credential/card/credential-card.stories.tsx +22 -25
- package/src/ui-components/credential/card/credential-details-card.stories.tsx +249 -245
- package/src/ui-components/credential/card/credential-details-card.tsx +2 -2
- package/src/ui-components/credential/card/credential-details-list-item.tsx +16 -6
- package/src/ui-components/credential/card/credential-header.stories.tsx +15 -17
- package/src/ui-components/credential/card/credential-header.tsx +4 -1
- package/src/ui-components/credential/card/credential-image-carousel.tsx +4 -0
- package/src/ui-components/credential/card/index.ts +11 -5
- package/src/ui-components/credential/index.ts +2 -1
- package/src/ui-components/credential/selector.stories.tsx +7 -7
- package/src/ui-components/detail/detail.stories.tsx +11 -8
- package/src/ui-components/entity/avatar.stories.tsx +10 -7
- package/src/ui-components/entity/entity-cluster.stories.tsx +11 -8
- package/src/ui-components/header/header.stories.tsx +10 -7
- package/src/ui-components/header/index.ts +6 -3
- package/src/ui-components/header/navigation-header.stories.tsx +11 -8
- package/src/ui-components/history/data-item.tsx +13 -4
- package/src/ui-components/history/history-details.tsx +247 -0
- package/src/ui-components/history/{history-list-item.tsx → history-item.tsx} +72 -33
- package/src/ui-components/history/history-section-header.tsx +2 -2
- package/src/ui-components/history/history-section-list-item.tsx +3 -3
- package/src/ui-components/history/index.ts +5 -4
- package/src/ui-components/icons/history.tsx +82 -131
- package/src/ui-components/image/index.tsx +2 -1
- package/src/ui-components/input/radio-group.stories.tsx +34 -0
- package/src/ui-components/input/radio-group.tsx +8 -2
- package/src/ui-components/input/selection-input.stories.tsx +20 -17
- package/src/ui-components/list/index.ts +1 -0
- package/src/ui-components/list/list-page-loading-indicator.tsx +8 -0
- package/src/ui-components/list/wallet/empty-list.tsx +75 -0
- package/src/ui-components/list/wallet/empty-search-result.tsx +39 -0
- package/src/ui-components/list/wallet/index.tsx +4 -0
- package/src/ui-components/loader/loader.stories.tsx +6 -9
- package/src/ui-components/loader/loader.tsx +6 -3
- package/src/ui-components/loader/loading-result.stories.tsx +13 -10
- package/src/ui-components/loader/loading-result.tsx +8 -4
- package/src/ui-components/nerd-view/index.ts +2 -1
- package/src/ui-components/nerd-view/nerd-mode-item.tsx +2 -2
- package/src/ui-components/pin/pin-code-screen.stories.tsx +20 -13
- package/src/ui-components/screens/image-preview-screen.stories.tsx +9 -6
- package/src/ui-components/screens/index.ts +12 -6
- package/src/ui-components/screens/nerd-mode-screen.tsx +1 -1
- package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +10 -7
- package/src/ui-components/searchbar/search-bar.stories.tsx +15 -8
- package/src/ui-components/searchbar/search-bar.tsx +2 -2
- package/src/ui-components/state/error-screen.stories.tsx +8 -9
- package/src/ui-components/state/error-screen.tsx +1 -1
- package/src/ui-components/text/index.ts +2 -1
- package/src/ui-components/text/typography.stories.tsx +19 -12
- package/src/ui-components/theme/color-scheme-context.tsx +1 -0
- package/src/ui-components/theme/color-scheme.ts +1 -0
- package/src/utils/date.ts +5 -5
- package/src/utils/filtering.ts +5 -0
- package/src/utils/history.ts +71 -0
- package/src/utils/hooks/connectivity/connectivity.test.ts +8 -0
- package/src/utils/hooks/connectivity/connectivity.ts +28 -4
- package/src/utils/hooks/core/backup.ts +25 -21
- package/src/utils/hooks/core/cache.ts +43 -0
- package/src/utils/hooks/core/core-config.ts +19 -0
- package/src/utils/hooks/core/core-context.tsx +15 -2
- package/src/utils/hooks/core/core-init.ts +21 -7
- package/src/utils/hooks/core/credential-schemas.ts +1 -1
- package/src/utils/hooks/core/credentials.ts +9 -14
- package/src/utils/hooks/core/history.ts +2 -57
- package/src/utils/hooks/core/index.ts +1 -0
- package/src/utils/hooks/core/proof-schemas.ts +1 -1
- package/src/utils/hooks/core/proofs.ts +107 -49
- package/src/utils/hooks/core/trust-entity.ts +7 -3
- package/src/utils/hooks/navigation/open-settings.ts +2 -3
- package/src/utils/hooks/revocation/credential-status.ts +3 -2
- package/src/utils/index.ts +3 -0
- package/src/utils/navigation.ts +4 -2
- package/src/utils/parsers/credential.ts +1 -1
- package/src/utils/parsers/index.ts +1 -0
- package/src/utils/parsers/query.tsx +2 -0
- package/src/utils/parsers/universal-links.test.ts +57 -0
- package/src/utils/parsers/universal-links.ts +26 -0
- package/src/utils/ref.ts +1 -1
- package/src/utils/reporting.ts +1 -0
- package/lib/commonjs/ui-components/history/history-list-item.js.map +0 -1
- package/lib/module/ui-components/history/history-list-item.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["EntityDetails","EntityDetailsLabels","EntityDetailsProps"],"sources":["index.ts"],"sourcesContent":["import EntityDetails, { EntityDetailsLabels, EntityDetailsProps } from './entity-details';\n\nexport { EntityDetails, EntityDetailsLabels, EntityDetailsProps };\n"],"mappings":"AAAA,OAAOA,aAAa,IAAIC,mBAAmB,EAAEC,kBAAkB,QAAQ,kBAAkB;AAEzF,SAASF,aAAa,EAAEC,mBAAmB,EAAEC,kBAAkB"}
|
|
1
|
+
{"version":3,"names":["EntityDetails","EntityDetailsLabels","EntityDetailsProps"],"sources":["index.ts"],"sourcesContent":["import EntityDetails, { EntityDetailsLabels, EntityDetailsProps } from './entity-details';\n\nexport { EntityDetails, EntityDetailsLabels, EntityDetailsProps };\n"],"mappings":"AAAA,OAAOA,aAAa,IAAIC,mBAAmB,EAAEC,kBAAkB,QAAQ,kBAAkB;AAEzF,SAASF,aAAa,EAAEC,mBAAmB,EAAEC,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { HistoryActionEnum } from '@procivis/react-native-one-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useAppColorScheme } from '../../ui-components';
|
|
4
|
+
import { HistoryDetailsView } from '../../ui-components/history/history-details';
|
|
5
|
+
import { capitalizeFirstLetter, concatTestID, formatDateTimeLocalized } from '../../utils';
|
|
6
|
+
import { getHistoryItemActionIcon } from './history-list-item-icon';
|
|
7
|
+
const getStatusTextColor = (action, colorScheme) => {
|
|
8
|
+
switch (action) {
|
|
9
|
+
case HistoryActionEnum.CLAIMS_REMOVED:
|
|
10
|
+
case HistoryActionEnum.DEACTIVATED:
|
|
11
|
+
case HistoryActionEnum.DELETED:
|
|
12
|
+
case HistoryActionEnum.REJECTED:
|
|
13
|
+
case HistoryActionEnum.REVOKED:
|
|
14
|
+
case HistoryActionEnum.ERRORED:
|
|
15
|
+
return colorScheme.errorText;
|
|
16
|
+
case HistoryActionEnum.SUSPENDED:
|
|
17
|
+
case HistoryActionEnum.OFFERED:
|
|
18
|
+
case HistoryActionEnum.PENDING:
|
|
19
|
+
case HistoryActionEnum.REQUESTED:
|
|
20
|
+
return colorScheme.text;
|
|
21
|
+
default:
|
|
22
|
+
return colorScheme.successText;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export const HistoryDetailsScreen = ({
|
|
26
|
+
assets,
|
|
27
|
+
dataHeader,
|
|
28
|
+
headerButton,
|
|
29
|
+
item,
|
|
30
|
+
labels,
|
|
31
|
+
onBackPressed,
|
|
32
|
+
onInfoPressed,
|
|
33
|
+
onImagePreview,
|
|
34
|
+
testID = 'HistoryDetailScreen'
|
|
35
|
+
}) => {
|
|
36
|
+
var _formatDateTimeLocali;
|
|
37
|
+
const colorScheme = useAppColorScheme();
|
|
38
|
+
const actionValueColor = getStatusTextColor(item.action, colorScheme);
|
|
39
|
+
return /*#__PURE__*/React.createElement(HistoryDetailsView, {
|
|
40
|
+
assets: assets,
|
|
41
|
+
data: {
|
|
42
|
+
header: dataHeader,
|
|
43
|
+
date: (_formatDateTimeLocali = formatDateTimeLocalized(new Date(item.createdDate))) !== null && _formatDateTimeLocali !== void 0 ? _formatDateTimeLocali : '',
|
|
44
|
+
action: {
|
|
45
|
+
icon: getHistoryItemActionIcon(item.action),
|
|
46
|
+
label: capitalizeFirstLetter(labels.item.actions[item.action]),
|
|
47
|
+
color: actionValueColor,
|
|
48
|
+
testID: concatTestID(testID, 'action', item.action)
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
headerButton: headerButton,
|
|
52
|
+
labels: labels,
|
|
53
|
+
onBackPressed: onBackPressed,
|
|
54
|
+
onInfoPressed: onInfoPressed,
|
|
55
|
+
onImagePreview: onImagePreview,
|
|
56
|
+
testID: testID
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=history-details-screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HistoryActionEnum","React","useAppColorScheme","HistoryDetailsView","capitalizeFirstLetter","concatTestID","formatDateTimeLocalized","getHistoryItemActionIcon","getStatusTextColor","action","colorScheme","CLAIMS_REMOVED","DEACTIVATED","DELETED","REJECTED","REVOKED","ERRORED","errorText","SUSPENDED","OFFERED","PENDING","REQUESTED","text","successText","HistoryDetailsScreen","assets","dataHeader","headerButton","item","labels","onBackPressed","onInfoPressed","onImagePreview","testID","_formatDateTimeLocali","actionValueColor","createElement","data","header","date","Date","createdDate","icon","label","actions","color"],"sources":["history-details-screen.tsx"],"sourcesContent":["import {\n HistoryActionEnum,\n HistoryListItem,\n} from '@procivis/react-native-one-core';\nimport React, { FC, ReactElement } from 'react';\nimport { ImageSourcePropType } from 'react-native';\n\nimport { ColorScheme, useAppColorScheme } from '../../ui-components';\nimport {\n HistoryDetailsLabels,\n HistoryDetailsView,\n HistoryDetailsViewProps,\n} from '../../ui-components/history/history-details';\nimport { capitalizeFirstLetter, concatTestID, formatDateTimeLocalized } from '../../utils';\nimport { HistoryListItemLabels } from './history-list-item';\nimport { getHistoryItemActionIcon } from './history-list-item-icon';\n\nconst getStatusTextColor = (action: HistoryActionEnum, colorScheme: Readonly<ColorScheme>) => {\n switch (action) {\n case HistoryActionEnum.CLAIMS_REMOVED:\n case HistoryActionEnum.DEACTIVATED:\n case HistoryActionEnum.DELETED:\n case HistoryActionEnum.REJECTED:\n case HistoryActionEnum.REVOKED:\n case HistoryActionEnum.ERRORED:\n return colorScheme.errorText;\n case HistoryActionEnum.SUSPENDED:\n case HistoryActionEnum.OFFERED:\n case HistoryActionEnum.PENDING:\n case HistoryActionEnum.REQUESTED:\n return colorScheme.text;\n default:\n return colorScheme.successText;\n }\n};\n\nexport type HistoryDetailsScreenLabels = HistoryDetailsLabels & {\n item: HistoryListItemLabels;\n};\n\nexport type HistoryDetailsScreenProps = {\n assets: HistoryDetailsViewProps['assets'];\n dataHeader: HistoryDetailsViewProps['data']['header'];\n headerButton?: ReactElement;\n item: HistoryListItem;\n labels: HistoryDetailsScreenLabels;\n onBackPressed: () => void;\n onInfoPressed?: () => void;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n testID?: string;\n};\n\nexport const HistoryDetailsScreen: FC<HistoryDetailsScreenProps> = ({\n assets,\n dataHeader,\n headerButton,\n item,\n labels,\n onBackPressed,\n onInfoPressed,\n onImagePreview,\n testID = 'HistoryDetailScreen',\n}) => {\n const colorScheme = useAppColorScheme();\n\n const actionValueColor = getStatusTextColor(item.action, colorScheme);\n\n return (\n <HistoryDetailsView\n assets={assets}\n data={{\n header: dataHeader,\n date: formatDateTimeLocalized(new Date(item.createdDate)) ?? '',\n action: {\n icon: getHistoryItemActionIcon(item.action),\n label: capitalizeFirstLetter(labels.item.actions[item.action]),\n color: actionValueColor,\n testID: concatTestID(testID, 'action', item.action),\n },\n }}\n headerButton={headerButton}\n labels={labels}\n onBackPressed={onBackPressed}\n onInfoPressed={onInfoPressed}\n onImagePreview={onImagePreview}\n testID={testID}\n />\n );\n};\n"],"mappings":"AAAA,SACEA,iBAAiB,QAEZ,iCAAiC;AACxC,OAAOC,KAAK,MAA4B,OAAO;AAG/C,SAAsBC,iBAAiB,QAAQ,qBAAqB;AACpE,SAEEC,kBAAkB,QAEb,6CAA6C;AACpD,SAASC,qBAAqB,EAAEC,YAAY,EAAEC,uBAAuB,QAAQ,aAAa;AAE1F,SAASC,wBAAwB,QAAQ,0BAA0B;AAEnE,MAAMC,kBAAkB,GAAGA,CAACC,MAAyB,EAAEC,WAAkC,KAAK;EAC5F,QAAQD,MAAM;IACZ,KAAKT,iBAAiB,CAACW,cAAc;IACrC,KAAKX,iBAAiB,CAACY,WAAW;IAClC,KAAKZ,iBAAiB,CAACa,OAAO;IAC9B,KAAKb,iBAAiB,CAACc,QAAQ;IAC/B,KAAKd,iBAAiB,CAACe,OAAO;IAC9B,KAAKf,iBAAiB,CAACgB,OAAO;MAC5B,OAAON,WAAW,CAACO,SAAS;IAC9B,KAAKjB,iBAAiB,CAACkB,SAAS;IAChC,KAAKlB,iBAAiB,CAACmB,OAAO;IAC9B,KAAKnB,iBAAiB,CAACoB,OAAO;IAC9B,KAAKpB,iBAAiB,CAACqB,SAAS;MAC9B,OAAOX,WAAW,CAACY,IAAI;IACzB;MACE,OAAOZ,WAAW,CAACa,WAAW;EAClC;AACF,CAAC;AAkBD,OAAO,MAAMC,oBAAmD,GAAGA,CAAC;EAClEC,MAAM;EACNC,UAAU;EACVC,YAAY;EACZC,IAAI;EACJC,MAAM;EACNC,aAAa;EACbC,aAAa;EACbC,cAAc;EACdC,MAAM,GAAG;AACX,CAAC,KAAK;EAAA,IAAAC,qBAAA;EACJ,MAAMxB,WAAW,GAAGR,iBAAiB,CAAC,CAAC;EAEvC,MAAMiC,gBAAgB,GAAG3B,kBAAkB,CAACoB,IAAI,CAACnB,MAAM,EAAEC,WAAW,CAAC;EAErE,oBACET,KAAA,CAAAmC,aAAA,CAACjC,kBAAkB;IACjBsB,MAAM,EAAEA,MAAO;IACfY,IAAI,EAAE;MACJC,MAAM,EAAEZ,UAAU;MAClBa,IAAI,GAAAL,qBAAA,GAAE5B,uBAAuB,CAAC,IAAIkC,IAAI,CAACZ,IAAI,CAACa,WAAW,CAAC,CAAC,cAAAP,qBAAA,cAAAA,qBAAA,GAAI,EAAE;MAC/DzB,MAAM,EAAE;QACNiC,IAAI,EAAEnC,wBAAwB,CAACqB,IAAI,CAACnB,MAAM,CAAC;QAC3CkC,KAAK,EAAEvC,qBAAqB,CAACyB,MAAM,CAACD,IAAI,CAACgB,OAAO,CAAChB,IAAI,CAACnB,MAAM,CAAC,CAAC;QAC9DoC,KAAK,EAAEV,gBAAgB;QACvBF,MAAM,EAAE5B,YAAY,CAAC4B,MAAM,EAAE,QAAQ,EAAEL,IAAI,CAACnB,MAAM;MACpD;IACF,CAAE;IACFkB,YAAY,EAAEA,YAAa;IAC3BE,MAAM,EAAEA,MAAO;IACfC,aAAa,EAAEA,aAAc;IAC7BC,aAAa,EAAEA,aAAc;IAC7BC,cAAc,EAAEA,cAAe;IAC/BC,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { HistoryActionEnum, HistoryEntityTypeEnum } from '@procivis/react-native-one-core';
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { HistoryBackupCreatedIcon, HistoryBackupRestoredIcon, HistoryCredentialIcon, HistoryDidIcon, HistoryIssueIcon, HistoryItemIcon, HistoryKeyIcon, HistoryOrganisationIcon, HistoryProofRequestIcon, HistoryRevokeIcon, HistorySchemaIcon, HistoryStatusAcceptedIcon, HistoryStatusDeleteIcon, HistoryStatusErrorIcon, HistoryStatusSuspendIcon, HistorySuspendIcon, HistoryTrustAnchorIcon, HistoryTrustedEntityIcon } from '../../ui-components';
|
|
4
|
+
const defaultIcons = {
|
|
5
|
+
actions: {
|
|
6
|
+
ACCEPTED: HistoryStatusAcceptedIcon,
|
|
7
|
+
ACTIVATED: HistoryStatusAcceptedIcon,
|
|
8
|
+
CLAIMS_REMOVED: HistoryStatusDeleteIcon,
|
|
9
|
+
CREATED: HistoryStatusAcceptedIcon,
|
|
10
|
+
DEACTIVATED: HistoryStatusErrorIcon,
|
|
11
|
+
DELETED: HistoryStatusDeleteIcon,
|
|
12
|
+
ERRORED: HistoryStatusErrorIcon,
|
|
13
|
+
IMPORTED: HistoryStatusAcceptedIcon,
|
|
14
|
+
ISSUED: HistoryStatusAcceptedIcon,
|
|
15
|
+
OFFERED: HistoryStatusAcceptedIcon,
|
|
16
|
+
PENDING: HistoryStatusAcceptedIcon,
|
|
17
|
+
REJECTED: HistoryStatusErrorIcon,
|
|
18
|
+
REMOVED: HistoryStatusDeleteIcon,
|
|
19
|
+
REQUESTED: HistoryStatusAcceptedIcon,
|
|
20
|
+
RESTORED: HistoryStatusAcceptedIcon,
|
|
21
|
+
RETRACTED: HistoryStatusErrorIcon,
|
|
22
|
+
REVOKED: HistoryStatusErrorIcon,
|
|
23
|
+
SHARED: HistoryStatusAcceptedIcon,
|
|
24
|
+
SUSPENDED: HistoryStatusSuspendIcon,
|
|
25
|
+
UPDATED: HistoryStatusAcceptedIcon,
|
|
26
|
+
WITHDRAWN: HistoryStatusErrorIcon,
|
|
27
|
+
REACTIVATED: HistoryStatusAcceptedIcon,
|
|
28
|
+
CSR_GENERATED: HistoryStatusAcceptedIcon
|
|
29
|
+
},
|
|
30
|
+
entityTypes: {
|
|
31
|
+
BACKUP: HistoryRevokeIcon,
|
|
32
|
+
CREDENTIAL: HistoryCredentialIcon,
|
|
33
|
+
CREDENTIAL_SCHEMA: HistorySchemaIcon,
|
|
34
|
+
DID: HistoryDidIcon,
|
|
35
|
+
KEY: HistoryKeyIcon,
|
|
36
|
+
ORGANISATION: HistoryOrganisationIcon,
|
|
37
|
+
PROOF: HistoryProofRequestIcon,
|
|
38
|
+
PROOF_SCHEMA: HistorySchemaIcon,
|
|
39
|
+
TRUST_ANCHOR: HistoryTrustAnchorIcon,
|
|
40
|
+
TRUST_ENTITY: HistoryTrustedEntityIcon
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export const getHistoryItemActionIcon = action => {
|
|
44
|
+
var _defaultIcons$actions;
|
|
45
|
+
return (_defaultIcons$actions = defaultIcons.actions[action]) !== null && _defaultIcons$actions !== void 0 ? _defaultIcons$actions : HistoryStatusAcceptedIcon;
|
|
46
|
+
};
|
|
47
|
+
export const HistoryListItemIcon = ({
|
|
48
|
+
item
|
|
49
|
+
}) => {
|
|
50
|
+
const statusIcon = getHistoryItemActionIcon(item.action);
|
|
51
|
+
const typeIcon = useMemo(() => {
|
|
52
|
+
var _defaultIcons$entityT;
|
|
53
|
+
switch (item.entityType) {
|
|
54
|
+
case HistoryEntityTypeEnum.BACKUP:
|
|
55
|
+
switch (item.action) {
|
|
56
|
+
case HistoryActionEnum.CREATED:
|
|
57
|
+
return HistoryBackupCreatedIcon;
|
|
58
|
+
case HistoryActionEnum.RESTORED:
|
|
59
|
+
return HistoryBackupRestoredIcon;
|
|
60
|
+
default:
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
case HistoryEntityTypeEnum.CREDENTIAL:
|
|
65
|
+
switch (item.action) {
|
|
66
|
+
case HistoryActionEnum.REVOKED:
|
|
67
|
+
return HistoryRevokeIcon;
|
|
68
|
+
case HistoryActionEnum.SUSPENDED:
|
|
69
|
+
return HistorySuspendIcon;
|
|
70
|
+
default:
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
default:
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
return (_defaultIcons$entityT = defaultIcons.entityTypes[item.entityType]) !== null && _defaultIcons$entityT !== void 0 ? _defaultIcons$entityT : HistoryIssueIcon;
|
|
78
|
+
}, [item.action, item.entityType]);
|
|
79
|
+
return /*#__PURE__*/React.createElement(HistoryItemIcon, {
|
|
80
|
+
StatusIcon: statusIcon,
|
|
81
|
+
TypeIcon: typeIcon
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=history-list-item-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HistoryActionEnum","HistoryEntityTypeEnum","React","useMemo","HistoryBackupCreatedIcon","HistoryBackupRestoredIcon","HistoryCredentialIcon","HistoryDidIcon","HistoryIssueIcon","HistoryItemIcon","HistoryKeyIcon","HistoryOrganisationIcon","HistoryProofRequestIcon","HistoryRevokeIcon","HistorySchemaIcon","HistoryStatusAcceptedIcon","HistoryStatusDeleteIcon","HistoryStatusErrorIcon","HistoryStatusSuspendIcon","HistorySuspendIcon","HistoryTrustAnchorIcon","HistoryTrustedEntityIcon","defaultIcons","actions","ACCEPTED","ACTIVATED","CLAIMS_REMOVED","CREATED","DEACTIVATED","DELETED","ERRORED","IMPORTED","ISSUED","OFFERED","PENDING","REJECTED","REMOVED","REQUESTED","RESTORED","RETRACTED","REVOKED","SHARED","SUSPENDED","UPDATED","WITHDRAWN","REACTIVATED","CSR_GENERATED","entityTypes","BACKUP","CREDENTIAL","CREDENTIAL_SCHEMA","DID","KEY","ORGANISATION","PROOF","PROOF_SCHEMA","TRUST_ANCHOR","TRUST_ENTITY","getHistoryItemActionIcon","action","_defaultIcons$actions","HistoryListItemIcon","item","statusIcon","typeIcon","_defaultIcons$entityT","entityType","createElement","StatusIcon","TypeIcon"],"sources":["history-list-item-icon.tsx"],"sourcesContent":["import { HistoryActionEnum, HistoryEntityTypeEnum, HistoryListItem } from '@procivis/react-native-one-core';\nimport React, { FC, useMemo } from 'react';\nimport { SvgProps } from 'react-native-svg';\n\nimport {\n HistoryBackupCreatedIcon,\n HistoryBackupRestoredIcon,\n HistoryCredentialIcon,\n HistoryDidIcon,\n HistoryIssueIcon,\n HistoryItemIcon,\n HistoryKeyIcon,\n HistoryOrganisationIcon,\n HistoryProofRequestIcon,\n HistoryRevokeIcon,\n HistorySchemaIcon,\n HistoryStatusAcceptedIcon,\n HistoryStatusDeleteIcon,\n HistoryStatusErrorIcon,\n HistoryStatusSuspendIcon,\n HistorySuspendIcon,\n HistoryTrustAnchorIcon,\n HistoryTrustedEntityIcon,\n} from '../../ui-components';\n\nconst defaultIcons: {\n actions: { [key in keyof typeof HistoryActionEnum]: FC<SvgProps> };\n entityTypes: { [key in keyof typeof HistoryEntityTypeEnum]: FC<SvgProps> };\n} = {\n actions: {\n ACCEPTED: HistoryStatusAcceptedIcon,\n ACTIVATED: HistoryStatusAcceptedIcon,\n CLAIMS_REMOVED: HistoryStatusDeleteIcon,\n CREATED: HistoryStatusAcceptedIcon,\n DEACTIVATED: HistoryStatusErrorIcon,\n DELETED: HistoryStatusDeleteIcon,\n ERRORED: HistoryStatusErrorIcon,\n IMPORTED: HistoryStatusAcceptedIcon,\n ISSUED: HistoryStatusAcceptedIcon,\n OFFERED: HistoryStatusAcceptedIcon,\n PENDING: HistoryStatusAcceptedIcon,\n REJECTED: HistoryStatusErrorIcon,\n REMOVED: HistoryStatusDeleteIcon,\n REQUESTED: HistoryStatusAcceptedIcon,\n RESTORED: HistoryStatusAcceptedIcon,\n RETRACTED: HistoryStatusErrorIcon,\n REVOKED: HistoryStatusErrorIcon,\n SHARED: HistoryStatusAcceptedIcon,\n SUSPENDED: HistoryStatusSuspendIcon,\n UPDATED: HistoryStatusAcceptedIcon,\n WITHDRAWN: HistoryStatusErrorIcon,\n REACTIVATED: HistoryStatusAcceptedIcon,\n CSR_GENERATED: HistoryStatusAcceptedIcon,\n },\n entityTypes: {\n BACKUP: HistoryRevokeIcon,\n CREDENTIAL: HistoryCredentialIcon,\n CREDENTIAL_SCHEMA: HistorySchemaIcon,\n DID: HistoryDidIcon,\n KEY: HistoryKeyIcon,\n ORGANISATION: HistoryOrganisationIcon,\n PROOF: HistoryProofRequestIcon,\n PROOF_SCHEMA: HistorySchemaIcon,\n TRUST_ANCHOR: HistoryTrustAnchorIcon,\n TRUST_ENTITY: HistoryTrustedEntityIcon,\n },\n};\n\nexport const getHistoryItemActionIcon = (action: HistoryActionEnum) => {\n return defaultIcons.actions[action] ?? HistoryStatusAcceptedIcon;\n};\n\nexport type HistoryListItemIconProps = {\n item: HistoryListItem;\n};\n\nexport const HistoryListItemIcon: FC<HistoryListItemIconProps> = ({ item }) => {\n const statusIcon = getHistoryItemActionIcon(item.action);\n const typeIcon = useMemo(() => {\n switch (item.entityType) {\n case HistoryEntityTypeEnum.BACKUP:\n switch (item.action) {\n case HistoryActionEnum.CREATED:\n return HistoryBackupCreatedIcon;\n case HistoryActionEnum.RESTORED:\n return HistoryBackupRestoredIcon;\n default:\n break;\n }\n break;\n case HistoryEntityTypeEnum.CREDENTIAL:\n switch (item.action) {\n case HistoryActionEnum.REVOKED:\n return HistoryRevokeIcon;\n case HistoryActionEnum.SUSPENDED:\n return HistorySuspendIcon;\n default:\n break;\n }\n break;\n default:\n break;\n }\n\n return defaultIcons.entityTypes[item.entityType] ?? HistoryIssueIcon;\n }, [item.action, item.entityType]);\n return <HistoryItemIcon StatusIcon={statusIcon} TypeIcon={typeIcon} />;\n};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { HistoryItemView } from '../../ui-components';
|
|
3
|
+
import { formatTime, useTrustEntity } from '../../utils';
|
|
4
|
+
import { HistoryListItemIcon } from './history-list-item-icon';
|
|
5
|
+
export const HistoryListItemView = ({
|
|
6
|
+
dateFormatter = formatTime,
|
|
7
|
+
first,
|
|
8
|
+
item,
|
|
9
|
+
labels,
|
|
10
|
+
last,
|
|
11
|
+
onPress,
|
|
12
|
+
testID
|
|
13
|
+
}) => {
|
|
14
|
+
var _dateFormatter;
|
|
15
|
+
const {
|
|
16
|
+
data: entity
|
|
17
|
+
} = useTrustEntity(item.target);
|
|
18
|
+
const label = `${labels.entityTypes[item.entityType]} ${labels.actions[item.action]}`;
|
|
19
|
+
const icon = /*#__PURE__*/React.createElement(HistoryListItemIcon, {
|
|
20
|
+
item: item
|
|
21
|
+
});
|
|
22
|
+
const pressHandler = useCallback(() => {
|
|
23
|
+
onPress === null || onPress === void 0 || onPress(item);
|
|
24
|
+
}, [onPress, item]);
|
|
25
|
+
return /*#__PURE__*/React.createElement(HistoryItemView, {
|
|
26
|
+
first: first,
|
|
27
|
+
icon: icon,
|
|
28
|
+
info: entity === null || entity === void 0 ? void 0 : entity.name,
|
|
29
|
+
label: label,
|
|
30
|
+
last: last,
|
|
31
|
+
onPress: pressHandler,
|
|
32
|
+
testID: testID,
|
|
33
|
+
time: (_dateFormatter = dateFormatter(new Date(item.createdDate))) !== null && _dateFormatter !== void 0 ? _dateFormatter : ''
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=history-list-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","HistoryItemView","formatTime","useTrustEntity","HistoryListItemIcon","HistoryListItemView","dateFormatter","first","item","labels","last","onPress","testID","_dateFormatter","data","entity","target","label","entityTypes","entityType","actions","action","icon","createElement","pressHandler","info","name","time","Date","createdDate"],"sources":["history-list-item.tsx"],"sourcesContent":["import { HistoryActionEnum, HistoryEntityTypeEnum, HistoryListItem } from '@procivis/react-native-one-core';\nimport React, { FC, useCallback } from 'react';\n\nimport { HistoryItemView } from '../../ui-components';\nimport { formatTime, useTrustEntity } from '../../utils';\nimport { HistoryListItemIcon } from './history-list-item-icon';\n\nexport type HistoryListItemLabels = {\n actions: { [key in keyof typeof HistoryActionEnum]: string };\n entityTypes: { [key in keyof typeof HistoryEntityTypeEnum]: string };\n};\n\nexport interface HistoryListItemViewProps {\n dateFormatter?: (date: Date) => string;\n first?: boolean;\n item: HistoryListItem;\n labels: HistoryListItemLabels;\n last?: boolean;\n onPress?: (item: HistoryListItem) => void;\n testID?: string;\n}\n\nexport const HistoryListItemView: FC<HistoryListItemViewProps> = ({\n dateFormatter = formatTime,\n first,\n item,\n labels,\n last,\n onPress,\n testID\n}) => {\n const { data: entity } = useTrustEntity(item.target);\n\n const label = `${labels.entityTypes[item.entityType]} ${labels.actions[item.action]}`;\n const icon = <HistoryListItemIcon item={item} />;\n\n const pressHandler = useCallback(() => {\n onPress?.(item);\n }, [onPress, item]);\n\n return (\n <HistoryItemView\n first={first}\n icon={icon}\n info={entity?.name}\n label={label}\n last={last}\n onPress={pressHandler}\n testID={testID}\n time={dateFormatter(new Date(item.createdDate)) ?? ''}\n />\n );\n};\n"],"mappings":"AACA,OAAOA,KAAK,IAAQC,WAAW,QAAQ,OAAO;AAE9C,SAASC,eAAe,QAAQ,qBAAqB;AACrD,SAASC,UAAU,EAAEC,cAAc,QAAQ,aAAa;AACxD,SAASC,mBAAmB,QAAQ,0BAA0B;AAiB9D,OAAO,MAAMC,mBAAiD,GAAGA,CAAC;EAChEC,aAAa,GAAGJ,UAAU;EAC1BK,KAAK;EACLC,IAAI;EACJC,MAAM;EACNC,IAAI;EACJC,OAAO;EACPC;AACF,CAAC,KAAK;EAAA,IAAAC,cAAA;EACJ,MAAM;IAAEC,IAAI,EAAEC;EAAO,CAAC,GAAGZ,cAAc,CAACK,IAAI,CAACQ,MAAM,CAAC;EAEpD,MAAMC,KAAK,GAAG,GAAGR,MAAM,CAACS,WAAW,CAACV,IAAI,CAACW,UAAU,CAAC,IAAIV,MAAM,CAACW,OAAO,CAACZ,IAAI,CAACa,MAAM,CAAC,EAAE;EACrF,MAAMC,IAAI,gBAAGvB,KAAA,CAAAwB,aAAA,CAACnB,mBAAmB;IAACI,IAAI,EAAEA;EAAK,CAAE,CAAC;EAEhD,MAAMgB,YAAY,GAAGxB,WAAW,CAAC,MAAM;IACrCW,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAGH,IAAI,CAAC;EACjB,CAAC,EAAE,CAACG,OAAO,EAAEH,IAAI,CAAC,CAAC;EAEnB,oBACET,KAAA,CAAAwB,aAAA,CAACtB,eAAe;IACdM,KAAK,EAAEA,KAAM;IACbe,IAAI,EAAEA,IAAK;IACXG,IAAI,EAAEV,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEW,IAAK;IACnBT,KAAK,EAAEA,KAAM;IACbP,IAAI,EAAEA,IAAK;IACXC,OAAO,EAAEa,YAAa;IACtBZ,MAAM,EAAEA,MAAO;IACfe,IAAI,GAAAd,cAAA,GAAEP,aAAa,CAAC,IAAIsB,IAAI,CAACpB,IAAI,CAACqB,WAAW,CAAC,CAAC,cAAAhB,cAAA,cAAAA,cAAA,GAAI;EAAG,CACvD,CAAC;AAEN,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { debounce } from 'lodash';
|
|
2
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { Animated, StyleSheet, View } from 'react-native';
|
|
4
|
+
import { BackButton, FilterButton, FoldableHeader, NavigationHeader, Typography, useAppColorScheme } from '../../ui-components';
|
|
5
|
+
import { concatTestID, groupEntriesByDay, useListContentInset } from '../../utils';
|
|
6
|
+
import { HistoryListView } from './history-list';
|
|
7
|
+
export const HistoryListScreen = ({
|
|
8
|
+
children,
|
|
9
|
+
groupItems = groupEntriesByDay,
|
|
10
|
+
labels,
|
|
11
|
+
onBackPressed,
|
|
12
|
+
onHistoryItemPressed,
|
|
13
|
+
onOpenFilter,
|
|
14
|
+
onSearchPhraseChange,
|
|
15
|
+
queryParams,
|
|
16
|
+
testID = 'HistoryScreen'
|
|
17
|
+
}) => {
|
|
18
|
+
const colorScheme = useAppColorScheme();
|
|
19
|
+
const [empty, setEmpty] = useState(false);
|
|
20
|
+
const [scrollOffset] = useState(() => new Animated.Value(0));
|
|
21
|
+
const [searchPhrase, setSearchPhrase] = useState('');
|
|
22
|
+
const searchBarVisible = !empty || Boolean(queryParams.searchText);
|
|
23
|
+
const handleSearchPhraseChange = useMemo(() => debounce(onSearchPhraseChange, 500), [onSearchPhraseChange]);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
handleSearchPhraseChange(searchPhrase || undefined);
|
|
26
|
+
}, [searchPhrase, handleSearchPhraseChange]);
|
|
27
|
+
const headerHeight = searchBarVisible ? 112 : 70;
|
|
28
|
+
const insets = useListContentInset({
|
|
29
|
+
additionalBottomPadding: 24,
|
|
30
|
+
headerHeight
|
|
31
|
+
});
|
|
32
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
33
|
+
style: [styles.container, {
|
|
34
|
+
backgroundColor: colorScheme.background
|
|
35
|
+
}],
|
|
36
|
+
testID: testID
|
|
37
|
+
}, empty && /*#__PURE__*/React.createElement(View, {
|
|
38
|
+
style: [styles.emptyNotice, {
|
|
39
|
+
backgroundColor: colorScheme.white,
|
|
40
|
+
marginTop: insets.paddingTop
|
|
41
|
+
}]
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
43
|
+
align: "center",
|
|
44
|
+
color: colorScheme.text,
|
|
45
|
+
preset: "s"
|
|
46
|
+
}, labels.emptyTitle), /*#__PURE__*/React.createElement(Typography, {
|
|
47
|
+
align: "center",
|
|
48
|
+
color: colorScheme.text,
|
|
49
|
+
preset: "s/line-height-small",
|
|
50
|
+
style: styles.shaded
|
|
51
|
+
}, labels.emptySubtitle)), /*#__PURE__*/React.createElement(HistoryListView, {
|
|
52
|
+
contentContainerStyle: insets,
|
|
53
|
+
groupItems: groupItems,
|
|
54
|
+
itemProps: {
|
|
55
|
+
onPress: onHistoryItemPressed
|
|
56
|
+
},
|
|
57
|
+
onEmpty: setEmpty,
|
|
58
|
+
onScroll: Animated.event([{
|
|
59
|
+
nativeEvent: {
|
|
60
|
+
contentOffset: {
|
|
61
|
+
y: scrollOffset
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}], {
|
|
65
|
+
useNativeDriver: true
|
|
66
|
+
}),
|
|
67
|
+
query: queryParams,
|
|
68
|
+
testID: concatTestID(testID, 'list'),
|
|
69
|
+
labels: labels.list
|
|
70
|
+
}), children, /*#__PURE__*/React.createElement(FoldableHeader, {
|
|
71
|
+
header: /*#__PURE__*/React.createElement(NavigationHeader, {
|
|
72
|
+
backgroundColor: 'transparent',
|
|
73
|
+
leftItem: /*#__PURE__*/React.createElement(BackButton, {
|
|
74
|
+
onPress: onBackPressed,
|
|
75
|
+
testID: concatTestID(testID, 'back')
|
|
76
|
+
}),
|
|
77
|
+
title: labels.title
|
|
78
|
+
}),
|
|
79
|
+
scrollOffset: scrollOffset,
|
|
80
|
+
searchBar: !searchBarVisible ? undefined : {
|
|
81
|
+
rightButton: onOpenFilter ? /*#__PURE__*/React.createElement(FilterButton, {
|
|
82
|
+
active: Boolean(queryParams.credentialSchemaId),
|
|
83
|
+
onPress: onOpenFilter,
|
|
84
|
+
testID: concatTestID(testID, 'filter')
|
|
85
|
+
}) : undefined,
|
|
86
|
+
rightButtonAlwaysVisible: true,
|
|
87
|
+
searchBarProps: {
|
|
88
|
+
onSearchPhraseChange: setSearchPhrase,
|
|
89
|
+
placeholder: labels.search,
|
|
90
|
+
searchPhrase,
|
|
91
|
+
testID: concatTestID(testID, 'search')
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
staticHeader: !searchBarVisible
|
|
95
|
+
}));
|
|
96
|
+
};
|
|
97
|
+
const styles = StyleSheet.create({
|
|
98
|
+
container: {
|
|
99
|
+
flex: 1
|
|
100
|
+
},
|
|
101
|
+
emptyNotice: {
|
|
102
|
+
borderRadius: 12,
|
|
103
|
+
marginHorizontal: 16,
|
|
104
|
+
paddingBottom: 20,
|
|
105
|
+
paddingHorizontal: 12,
|
|
106
|
+
paddingTop: 16
|
|
107
|
+
},
|
|
108
|
+
shaded: {
|
|
109
|
+
opacity: 0.7
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
//# sourceMappingURL=history-list-screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["debounce","React","useEffect","useMemo","useState","Animated","StyleSheet","View","BackButton","FilterButton","FoldableHeader","NavigationHeader","Typography","useAppColorScheme","concatTestID","groupEntriesByDay","useListContentInset","HistoryListView","HistoryListScreen","children","groupItems","labels","onBackPressed","onHistoryItemPressed","onOpenFilter","onSearchPhraseChange","queryParams","testID","colorScheme","empty","setEmpty","scrollOffset","Value","searchPhrase","setSearchPhrase","searchBarVisible","Boolean","searchText","handleSearchPhraseChange","undefined","headerHeight","insets","additionalBottomPadding","createElement","style","styles","container","backgroundColor","background","emptyNotice","white","marginTop","paddingTop","align","color","text","preset","emptyTitle","shaded","emptySubtitle","contentContainerStyle","itemProps","onPress","onEmpty","onScroll","event","nativeEvent","contentOffset","y","useNativeDriver","query","list","header","leftItem","title","searchBar","rightButton","active","credentialSchemaId","rightButtonAlwaysVisible","searchBarProps","placeholder","search","staticHeader","create","flex","borderRadius","marginHorizontal","paddingBottom","paddingHorizontal","opacity"],"sources":["history-list-screen.tsx"],"sourcesContent":["import { HistoryListItem, HistoryListQuery } from '@procivis/react-native-one-core';\nimport { debounce } from 'lodash';\nimport React, { FC, PropsWithChildren, useEffect, useMemo, useState } from 'react';\nimport { Animated, StyleSheet, View } from 'react-native';\n\nimport {\n BackButton,\n FilterButton,\n FoldableHeader,\n NavigationHeader,\n Typography,\n useAppColorScheme,\n} from '../../ui-components';\nimport { concatTestID, groupEntriesByDay, HistoryGroupByDaySection, useListContentInset } from '../../utils';\nimport { HistoryListLabels, HistoryListView } from './history-list';\n\nexport type HistoryListScreenLabels = {\n emptyTitle: string;\n emptySubtitle: string;\n list: HistoryListLabels;\n title: string;\n search: string;\n};\n\nexport type HistoryListScreenProps = {\n groupItems?: (entries: HistoryListItem[]) => HistoryGroupByDaySection[];\n labels: HistoryListScreenLabels;\n onBackPressed: () => void;\n onHistoryItemPressed: (historyItem: HistoryListItem) => void;\n onOpenFilter?: () => void;\n onSearchPhraseChange: (searchPhrase: string | undefined) => void;\n queryParams: Partial<HistoryListQuery>;\n testID?: string;\n};\n\nexport const HistoryListScreen: FC<PropsWithChildren<HistoryListScreenProps>> = ({\n children,\n groupItems = groupEntriesByDay,\n labels,\n onBackPressed,\n onHistoryItemPressed,\n onOpenFilter,\n onSearchPhraseChange,\n queryParams,\n testID = 'HistoryScreen',\n}) => {\n const colorScheme = useAppColorScheme();\n const [empty, setEmpty] = useState<boolean>(false);\n const [scrollOffset] = useState(() => new Animated.Value(0));\n\n const [searchPhrase, setSearchPhrase] = useState<string>('');\n const searchBarVisible = !empty || Boolean(queryParams.searchText);\n\n const handleSearchPhraseChange = useMemo(() => debounce(onSearchPhraseChange, 500), [onSearchPhraseChange]);\n useEffect(() => {\n handleSearchPhraseChange(searchPhrase || undefined);\n }, [searchPhrase, handleSearchPhraseChange]);\n\n const headerHeight = searchBarVisible ? 112 : 70;\n\n const insets = useListContentInset({\n additionalBottomPadding: 24,\n headerHeight,\n });\n\n return (\n <View\n style={[\n styles.container,\n {\n backgroundColor: colorScheme.background,\n },\n ]}\n testID={testID}>\n {empty && (\n <View\n style={[\n styles.emptyNotice,\n {\n backgroundColor: colorScheme.white,\n marginTop: insets.paddingTop,\n },\n ]}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s\">\n {labels.emptyTitle}\n </Typography>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-small\" style={styles.shaded}>\n {labels.emptySubtitle}\n </Typography>\n </View>\n )}\n <HistoryListView\n contentContainerStyle={insets}\n groupItems={groupItems}\n itemProps={{ onPress: onHistoryItemPressed }}\n onEmpty={setEmpty}\n onScroll={Animated.event([{ nativeEvent: { contentOffset: { y: scrollOffset } } }], {\n useNativeDriver: true,\n })}\n query={queryParams}\n testID={concatTestID(testID, 'list')}\n labels={labels.list}\n />\n {children}\n <FoldableHeader\n header={\n <NavigationHeader\n backgroundColor={'transparent'}\n leftItem={<BackButton onPress={onBackPressed} testID={concatTestID(testID, 'back')} />}\n title={labels.title}\n />\n }\n scrollOffset={scrollOffset}\n searchBar={\n !searchBarVisible\n ? undefined\n : {\n rightButton: onOpenFilter ? (\n <FilterButton\n active={Boolean(queryParams.credentialSchemaId)}\n onPress={onOpenFilter}\n testID={concatTestID(testID, 'filter')}\n />\n ) : undefined,\n rightButtonAlwaysVisible: true,\n searchBarProps: {\n onSearchPhraseChange: setSearchPhrase,\n placeholder: labels.search,\n searchPhrase,\n testID: concatTestID(testID, 'search'),\n },\n }\n }\n staticHeader={!searchBarVisible}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n emptyNotice: {\n borderRadius: 12,\n marginHorizontal: 16,\n paddingBottom: 20,\n paddingHorizontal: 12,\n paddingTop: 16,\n },\n shaded: {\n opacity: 0.7,\n },\n});\n"],"mappings":"AACA,SAASA,QAAQ,QAAQ,QAAQ;AACjC,OAAOC,KAAK,IAA2BC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAClF,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAEzD,SACEC,UAAU,EACVC,YAAY,EACZC,cAAc,EACdC,gBAAgB,EAChBC,UAAU,EACVC,iBAAiB,QACZ,qBAAqB;AAC5B,SAASC,YAAY,EAAEC,iBAAiB,EAA4BC,mBAAmB,QAAQ,aAAa;AAC5G,SAA4BC,eAAe,QAAQ,gBAAgB;AAqBnE,OAAO,MAAMC,iBAAgE,GAAGA,CAAC;EAC/EC,QAAQ;EACRC,UAAU,GAAGL,iBAAiB;EAC9BM,MAAM;EACNC,aAAa;EACbC,oBAAoB;EACpBC,YAAY;EACZC,oBAAoB;EACpBC,WAAW;EACXC,MAAM,GAAG;AACX,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGf,iBAAiB,CAAC,CAAC;EACvC,MAAM,CAACgB,KAAK,EAAEC,QAAQ,CAAC,GAAG1B,QAAQ,CAAU,KAAK,CAAC;EAClD,MAAM,CAAC2B,YAAY,CAAC,GAAG3B,QAAQ,CAAC,MAAM,IAAIC,QAAQ,CAAC2B,KAAK,CAAC,CAAC,CAAC,CAAC;EAE5D,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG9B,QAAQ,CAAS,EAAE,CAAC;EAC5D,MAAM+B,gBAAgB,GAAG,CAACN,KAAK,IAAIO,OAAO,CAACV,WAAW,CAACW,UAAU,CAAC;EAElE,MAAMC,wBAAwB,GAAGnC,OAAO,CAAC,MAAMH,QAAQ,CAACyB,oBAAoB,EAAE,GAAG,CAAC,EAAE,CAACA,oBAAoB,CAAC,CAAC;EAC3GvB,SAAS,CAAC,MAAM;IACdoC,wBAAwB,CAACL,YAAY,IAAIM,SAAS,CAAC;EACrD,CAAC,EAAE,CAACN,YAAY,EAAEK,wBAAwB,CAAC,CAAC;EAE5C,MAAME,YAAY,GAAGL,gBAAgB,GAAG,GAAG,GAAG,EAAE;EAEhD,MAAMM,MAAM,GAAGzB,mBAAmB,CAAC;IACjC0B,uBAAuB,EAAE,EAAE;IAC3BF;EACF,CAAC,CAAC;EAEF,oBACEvC,KAAA,CAAA0C,aAAA,CAACpC,IAAI;IACHqC,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MACEC,eAAe,EAAEnB,WAAW,CAACoB;IAC/B,CAAC,CACD;IACFrB,MAAM,EAAEA;EAAO,GACdE,KAAK,iBACJ5B,KAAA,CAAA0C,aAAA,CAACpC,IAAI;IACHqC,KAAK,EAAE,CACLC,MAAM,CAACI,WAAW,EAClB;MACEF,eAAe,EAAEnB,WAAW,CAACsB,KAAK;MAClCC,SAAS,EAAEV,MAAM,CAACW;IACpB,CAAC;EACD,gBACFnD,KAAA,CAAA0C,aAAA,CAAC/B,UAAU;IAACyC,KAAK,EAAC,QAAQ;IAACC,KAAK,EAAE1B,WAAW,CAAC2B,IAAK;IAACC,MAAM,EAAC;EAAG,GAC3DnC,MAAM,CAACoC,UACE,CAAC,eACbxD,KAAA,CAAA0C,aAAA,CAAC/B,UAAU;IAACyC,KAAK,EAAC,QAAQ;IAACC,KAAK,EAAE1B,WAAW,CAAC2B,IAAK;IAACC,MAAM,EAAC,qBAAqB;IAACZ,KAAK,EAAEC,MAAM,CAACa;EAAO,GACnGrC,MAAM,CAACsC,aACE,CACR,CACP,eACD1D,KAAA,CAAA0C,aAAA,CAAC1B,eAAe;IACd2C,qBAAqB,EAAEnB,MAAO;IAC9BrB,UAAU,EAAEA,UAAW;IACvByC,SAAS,EAAE;MAAEC,OAAO,EAAEvC;IAAqB,CAAE;IAC7CwC,OAAO,EAAEjC,QAAS;IAClBkC,QAAQ,EAAE3D,QAAQ,CAAC4D,KAAK,CAAC,CAAC;MAAEC,WAAW,EAAE;QAAEC,aAAa,EAAE;UAAEC,CAAC,EAAErC;QAAa;MAAE;IAAE,CAAC,CAAC,EAAE;MAClFsC,eAAe,EAAE;IACnB,CAAC,CAAE;IACHC,KAAK,EAAE5C,WAAY;IACnBC,MAAM,EAAEb,YAAY,CAACa,MAAM,EAAE,MAAM,CAAE;IACrCN,MAAM,EAAEA,MAAM,CAACkD;EAAK,CACrB,CAAC,EACDpD,QAAQ,eACTlB,KAAA,CAAA0C,aAAA,CAACjC,cAAc;IACb8D,MAAM,eACJvE,KAAA,CAAA0C,aAAA,CAAChC,gBAAgB;MACfoC,eAAe,EAAE,aAAc;MAC/B0B,QAAQ,eAAExE,KAAA,CAAA0C,aAAA,CAACnC,UAAU;QAACsD,OAAO,EAAExC,aAAc;QAACK,MAAM,EAAEb,YAAY,CAACa,MAAM,EAAE,MAAM;MAAE,CAAE,CAAE;MACvF+C,KAAK,EAAErD,MAAM,CAACqD;IAAM,CACrB,CACF;IACD3C,YAAY,EAAEA,YAAa;IAC3B4C,SAAS,EACP,CAACxC,gBAAgB,GACbI,SAAS,GACT;MACEqC,WAAW,EAAEpD,YAAY,gBACvBvB,KAAA,CAAA0C,aAAA,CAAClC,YAAY;QACXoE,MAAM,EAAEzC,OAAO,CAACV,WAAW,CAACoD,kBAAkB,CAAE;QAChDhB,OAAO,EAAEtC,YAAa;QACtBG,MAAM,EAAEb,YAAY,CAACa,MAAM,EAAE,QAAQ;MAAE,CACxC,CAAC,GACAY,SAAS;MACbwC,wBAAwB,EAAE,IAAI;MAC9BC,cAAc,EAAE;QACdvD,oBAAoB,EAAES,eAAe;QACrC+C,WAAW,EAAE5D,MAAM,CAAC6D,MAAM;QAC1BjD,YAAY;QACZN,MAAM,EAAEb,YAAY,CAACa,MAAM,EAAE,QAAQ;MACvC;IACF,CACL;IACDwD,YAAY,EAAE,CAAChD;EAAiB,CACjC,CACG,CAAC;AAEX,CAAC;AAED,MAAMU,MAAM,GAAGvC,UAAU,CAAC8E,MAAM,CAAC;EAC/BtC,SAAS,EAAE;IACTuC,IAAI,EAAE;EACR,CAAC;EACDpC,WAAW,EAAE;IACXqC,YAAY,EAAE,EAAE;IAChBC,gBAAgB,EAAE,EAAE;IACpBC,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE,EAAE;IACrBrC,UAAU,EAAE;EACd,CAAC;EACDM,MAAM,EAAE;IACNgC,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import moment from 'moment';
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { HistorySectionHeaderView } from '../../ui-components';
|
|
4
|
+
// components used on the history section lists (Settings->History, CredentialDetail->History)
|
|
5
|
+
// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev
|
|
6
|
+
|
|
7
|
+
export const HistoryListSectionHeaderView = ({
|
|
8
|
+
date,
|
|
9
|
+
firstYearEntry,
|
|
10
|
+
labels,
|
|
11
|
+
testID
|
|
12
|
+
}) => {
|
|
13
|
+
const day = useMemo(() => {
|
|
14
|
+
const now = moment();
|
|
15
|
+
const dateString = moment(date);
|
|
16
|
+
if (dateString.isSame(now, 'day')) {
|
|
17
|
+
return labels.today;
|
|
18
|
+
} else if (dateString.isSame(now.subtract(1, 'day'), 'day')) {
|
|
19
|
+
return labels.yesterday;
|
|
20
|
+
}
|
|
21
|
+
return dateString.format('Do MMMM');
|
|
22
|
+
}, [date, labels]);
|
|
23
|
+
return /*#__PURE__*/React.createElement(HistorySectionHeaderView, {
|
|
24
|
+
day: day,
|
|
25
|
+
testID: testID,
|
|
26
|
+
year: firstYearEntry ? date.year().toString() : undefined
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=history-list-section-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["moment","React","useMemo","HistorySectionHeaderView","HistoryListSectionHeaderView","date","firstYearEntry","labels","testID","day","now","dateString","isSame","today","subtract","yesterday","format","createElement","year","toString","undefined"],"sources":["history-list-section-header.tsx"],"sourcesContent":["import moment, { Moment } from 'moment';\nimport React, { FC, useMemo } from 'react';\n\nimport { HistorySectionHeaderView } from '../../ui-components';\n\nexport type HistoryListSectionHeaderLabels = {\n today: string;\n yesterday: string;\n};\n\nexport type HistoryListSectionHeaderViewProps = {\n date: Moment;\n firstYearEntry: boolean;\n labels: HistoryListSectionHeaderLabels;\n testID?: string;\n};\n\n// components used on the history section lists (Settings->History, CredentialDetail->History)\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev\n\nexport const HistoryListSectionHeaderView: FC<HistoryListSectionHeaderViewProps> = ({\n date,\n firstYearEntry,\n labels,\n testID,\n}) => {\n const day = useMemo(() => {\n const now = moment();\n const dateString = moment(date);\n\n if (dateString.isSame(now, 'day')) {\n return labels.today;\n } else if (dateString.isSame(now.subtract(1, 'day'), 'day')) {\n return labels.yesterday;\n }\n return dateString.format('Do MMMM');\n }, [date, labels]);\n\n return (\n <HistorySectionHeaderView day={day} testID={testID} year={firstYearEntry ? date.year().toString() : undefined} />\n );\n};\n"],"mappings":"AAAA,OAAOA,MAAM,MAAkB,QAAQ;AACvC,OAAOC,KAAK,IAAQC,OAAO,QAAQ,OAAO;AAE1C,SAASC,wBAAwB,QAAQ,qBAAqB;AAc9D;AACA;;AAEA,OAAO,MAAMC,4BAAmE,GAAGA,CAAC;EAClFC,IAAI;EACJC,cAAc;EACdC,MAAM;EACNC;AACF,CAAC,KAAK;EACJ,MAAMC,GAAG,GAAGP,OAAO,CAAC,MAAM;IACxB,MAAMQ,GAAG,GAAGV,MAAM,CAAC,CAAC;IACpB,MAAMW,UAAU,GAAGX,MAAM,CAACK,IAAI,CAAC;IAE/B,IAAIM,UAAU,CAACC,MAAM,CAACF,GAAG,EAAE,KAAK,CAAC,EAAE;MACjC,OAAOH,MAAM,CAACM,KAAK;IACrB,CAAC,MAAM,IAAIF,UAAU,CAACC,MAAM,CAACF,GAAG,CAACI,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE;MAC3D,OAAOP,MAAM,CAACQ,SAAS;IACzB;IACA,OAAOJ,UAAU,CAACK,MAAM,CAAC,SAAS,CAAC;EACrC,CAAC,EAAE,CAACX,IAAI,EAAEE,MAAM,CAAC,CAAC;EAElB,oBACEN,KAAA,CAAAgB,aAAA,CAACd,wBAAwB;IAACM,GAAG,EAAEA,GAAI;IAACD,MAAM,EAAEA,MAAO;IAACU,IAAI,EAAEZ,cAAc,GAAGD,IAAI,CAACa,IAAI,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,GAAGC;EAAU,CAAE,CAAC;AAErH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
import { useIsFocused } from '@react-navigation/native';
|
|
3
|
+
import React, { useCallback, useMemo } from 'react';
|
|
4
|
+
import { Animated, StyleSheet } from 'react-native';
|
|
5
|
+
import { ActivityIndicator, useAppColorScheme } from '../../ui-components';
|
|
6
|
+
import ListPageLoadingIndicator from '../../ui-components/list/list-page-loading-indicator';
|
|
7
|
+
import { concatTestID, useHistory } from '../../utils';
|
|
8
|
+
import { groupEntriesByDay } from '../../utils/history';
|
|
9
|
+
import { HistoryListItemView } from './history-list-item';
|
|
10
|
+
import { HistoryListSectionHeaderView } from './history-list-section-header';
|
|
11
|
+
export const HistoryListView = ({
|
|
12
|
+
query,
|
|
13
|
+
contentContainerStyle,
|
|
14
|
+
getItemProps,
|
|
15
|
+
groupItems = groupEntriesByDay,
|
|
16
|
+
itemProps,
|
|
17
|
+
labels,
|
|
18
|
+
onEmpty,
|
|
19
|
+
onScroll,
|
|
20
|
+
...props
|
|
21
|
+
}) => {
|
|
22
|
+
const isFocused = useIsFocused();
|
|
23
|
+
const colorScheme = useAppColorScheme();
|
|
24
|
+
const {
|
|
25
|
+
data: historyData,
|
|
26
|
+
fetchNextPage: fetchNextHistoryPage,
|
|
27
|
+
hasNextPage: hasNextHistoryPage,
|
|
28
|
+
isLoading
|
|
29
|
+
} = useHistory(query);
|
|
30
|
+
const history = useMemo(() => {
|
|
31
|
+
const items = historyData === null || historyData === void 0 ? void 0 : historyData.pages.flat().map(page => page.values).flat();
|
|
32
|
+
if (!items) {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
if (historyData) {
|
|
36
|
+
setImmediate(() => onEmpty === null || onEmpty === void 0 ? void 0 : onEmpty(!items.length));
|
|
37
|
+
}
|
|
38
|
+
return groupItems(items);
|
|
39
|
+
}, [historyData, onEmpty, groupItems]);
|
|
40
|
+
const onEndReached = useCallback(() => {
|
|
41
|
+
if (hasNextHistoryPage) {
|
|
42
|
+
fetchNextHistoryPage().catch(() => {});
|
|
43
|
+
}
|
|
44
|
+
}, [fetchNextHistoryPage, hasNextHistoryPage]);
|
|
45
|
+
if (!history) {
|
|
46
|
+
return /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
47
|
+
animate: isFocused
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return /*#__PURE__*/React.createElement(Animated.SectionList, _extends({
|
|
51
|
+
ListFooterComponent: isLoading ? /*#__PURE__*/React.createElement(ListPageLoadingIndicator, {
|
|
52
|
+
color: colorScheme.accent,
|
|
53
|
+
style: styles.footer
|
|
54
|
+
}) : undefined,
|
|
55
|
+
contentContainerStyle: [styles.listContent, contentContainerStyle],
|
|
56
|
+
keyExtractor: item => item.id,
|
|
57
|
+
onEndReached: onEndReached,
|
|
58
|
+
onScroll: onScroll,
|
|
59
|
+
renderItem: ({
|
|
60
|
+
item,
|
|
61
|
+
index,
|
|
62
|
+
section
|
|
63
|
+
}) => /*#__PURE__*/React.createElement(HistoryListItemView, _extends({
|
|
64
|
+
first: !index,
|
|
65
|
+
item: item,
|
|
66
|
+
labels: labels.item,
|
|
67
|
+
last: index === section.data.length - 1,
|
|
68
|
+
testID: concatTestID(props.testID, 'item', index.toString())
|
|
69
|
+
}, itemProps, getItemProps === null || getItemProps === void 0 ? void 0 : getItemProps(item))),
|
|
70
|
+
renderSectionHeader: ({
|
|
71
|
+
section
|
|
72
|
+
}) => /*#__PURE__*/React.createElement(HistoryListSectionHeaderView, {
|
|
73
|
+
date: section.date,
|
|
74
|
+
firstYearEntry: section.firstYearEntry,
|
|
75
|
+
labels: labels.sectionHeader,
|
|
76
|
+
testID: concatTestID(props.testID, 'section')
|
|
77
|
+
}),
|
|
78
|
+
sections: history,
|
|
79
|
+
stickySectionHeadersEnabled: false
|
|
80
|
+
}, props));
|
|
81
|
+
};
|
|
82
|
+
const styles = StyleSheet.create({
|
|
83
|
+
footer: {
|
|
84
|
+
marginVertical: 16
|
|
85
|
+
},
|
|
86
|
+
listContent: {
|
|
87
|
+
paddingHorizontal: 16
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=history-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useIsFocused","React","useCallback","useMemo","Animated","StyleSheet","ActivityIndicator","useAppColorScheme","ListPageLoadingIndicator","concatTestID","useHistory","groupEntriesByDay","HistoryListItemView","HistoryListSectionHeaderView","HistoryListView","query","contentContainerStyle","getItemProps","groupItems","itemProps","labels","onEmpty","onScroll","props","isFocused","colorScheme","data","historyData","fetchNextPage","fetchNextHistoryPage","hasNextPage","hasNextHistoryPage","isLoading","history","items","pages","flat","map","page","values","undefined","setImmediate","length","onEndReached","catch","createElement","animate","SectionList","_extends","ListFooterComponent","color","accent","style","styles","footer","listContent","keyExtractor","item","id","renderItem","index","section","first","last","testID","toString","renderSectionHeader","date","firstYearEntry","sectionHeader","sections","stickySectionHeadersEnabled","create","marginVertical","paddingHorizontal"],"sources":["history-list.tsx"],"sourcesContent":["import { HistoryListItem, HistoryListQuery } from '@procivis/react-native-one-core';\nimport { useIsFocused } from '@react-navigation/native';\nimport React, { FC, useCallback, useMemo } from 'react';\nimport { Animated, SectionListProps, StyleSheet } from 'react-native';\n\nimport { ActivityIndicator, useAppColorScheme } from '../../ui-components';\nimport ListPageLoadingIndicator from '../../ui-components/list/list-page-loading-indicator';\nimport { concatTestID, useHistory } from '../../utils';\nimport { groupEntriesByDay, HistoryGroupByDaySection } from '../../utils/history';\nimport { HistoryListItemLabels, HistoryListItemView, HistoryListItemViewProps } from './history-list-item';\nimport { HistoryListSectionHeaderLabels, HistoryListSectionHeaderView } from './history-list-section-header';\n\nexport type HistoryListLabels = {\n sectionHeader: HistoryListSectionHeaderLabels;\n item: HistoryListItemLabels;\n};\n\nexport interface HistoryListViewProps\n extends Omit<SectionListProps<HistoryListItem, HistoryGroupByDaySection>, 'sections'> {\n // optional customization of item props\n getItemProps?: (item: HistoryListItem) => Partial<HistoryListItemViewProps> | undefined;\n groupItems?: (entries: HistoryListItem[]) => HistoryGroupByDaySection[];\n itemProps?: Partial<HistoryListItemViewProps>;\n labels: HistoryListLabels;\n // callback when empty list displayed\n onEmpty?: (empty: boolean) => void;\n query: Partial<HistoryListQuery>;\n}\n\nexport const HistoryListView: FC<HistoryListViewProps> = ({\n query,\n contentContainerStyle,\n getItemProps,\n groupItems = groupEntriesByDay,\n itemProps,\n labels,\n onEmpty,\n onScroll,\n ...props\n}) => {\n const isFocused = useIsFocused();\n const colorScheme = useAppColorScheme();\n const {\n data: historyData,\n fetchNextPage: fetchNextHistoryPage,\n hasNextPage: hasNextHistoryPage,\n isLoading,\n } = useHistory(query);\n\n const history = useMemo(() => {\n const items = historyData?.pages\n .flat()\n .map((page) => page.values)\n .flat();\n if (!items) {\n return undefined;\n }\n if (historyData) {\n setImmediate(() => onEmpty?.(!items.length));\n }\n return groupItems(items);\n }, [historyData, onEmpty, groupItems]);\n\n const onEndReached = useCallback(() => {\n if (hasNextHistoryPage) {\n fetchNextHistoryPage().catch(() => {});\n }\n }, [fetchNextHistoryPage, hasNextHistoryPage]);\n\n if (!history) {\n return <ActivityIndicator animate={isFocused} />;\n }\n\n return (\n <Animated.SectionList<HistoryListItem, HistoryGroupByDaySection>\n ListFooterComponent={\n isLoading ? <ListPageLoadingIndicator color={colorScheme.accent} style={styles.footer} /> : undefined\n }\n contentContainerStyle={[styles.listContent, contentContainerStyle]}\n keyExtractor={(item) => item.id}\n onEndReached={onEndReached}\n onScroll={onScroll}\n renderItem={({ item, index, section }) => (\n <HistoryListItemView\n first={!index}\n item={item}\n labels={labels.item}\n last={index === section.data.length - 1}\n testID={concatTestID(props.testID, 'item', index.toString())}\n {...itemProps}\n {...getItemProps?.(item)}\n />\n )}\n renderSectionHeader={({ section }) => (\n <HistoryListSectionHeaderView\n date={section.date}\n firstYearEntry={section.firstYearEntry}\n labels={labels.sectionHeader}\n testID={concatTestID(props.testID, 'section')}\n />\n )}\n sections={history}\n stickySectionHeadersEnabled={false}\n {...props}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n footer: {\n marginVertical: 16,\n },\n listContent: {\n paddingHorizontal: 16,\n },\n});\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './history-details-screen';
|
|
2
|
+
export * from './history-list';
|
|
3
|
+
export * from './history-list-item';
|
|
4
|
+
export * from './history-list-item-icon';
|
|
5
|
+
export * from './history-list-screen';
|
|
6
|
+
export * from './history-list-section-header';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from './history-details-screen';\nexport * from './history-list';\nexport * from './history-list-item';\nexport * from './history-list-item-icon';\nexport * from './history-list-screen';\nexport * from './history-list-section-header';\n"],"mappings":"AAAA,cAAc,0BAA0B;AACxC,cAAc,gBAAgB;AAC9B,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,uBAAuB;AACrC,cAAc,+BAA+B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './backup';\nexport * from './credential';\nexport * from './entity';\nexport * from './navigation';\nexport * from './proof-request';\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,cAAc,iBAAiB"}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './backup';\nexport * from './credential';\nexport * from './entity';\nexport * from './history';\nexport * from './navigation';\nexport * from './proof-request';\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,iBAAiB","ignoreList":[]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useNavigation } from '@react-navigation/native';
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { BackButton, BackButtonIcon, GhostButton, InfoIcon, OptionsIcon } from '../../ui-components';
|
|
4
|
-
export const HeaderBackButton =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} = _ref;
|
|
4
|
+
export const HeaderBackButton = ({
|
|
5
|
+
onPress,
|
|
6
|
+
testID
|
|
7
|
+
}) => {
|
|
9
8
|
const navigation = useNavigation();
|
|
10
9
|
const handleBackButtonPress = useCallback(() => {
|
|
11
10
|
if (onPress) {
|
|
@@ -21,11 +20,10 @@ export const HeaderBackButton = _ref => {
|
|
|
21
20
|
testID: testID
|
|
22
21
|
});
|
|
23
22
|
};
|
|
24
|
-
export const HeaderCloseButton =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref2;
|
|
23
|
+
export const HeaderCloseButton = ({
|
|
24
|
+
onPress,
|
|
25
|
+
testID
|
|
26
|
+
}) => {
|
|
29
27
|
const navigation = useNavigation();
|
|
30
28
|
const handleCloseButtonPress = useCallback(() => {
|
|
31
29
|
if (onPress) {
|
|
@@ -39,12 +37,11 @@ export const HeaderCloseButton = _ref2 => {
|
|
|
39
37
|
testID: testID
|
|
40
38
|
});
|
|
41
39
|
};
|
|
42
|
-
export const HeaderInfoButton =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} = _ref3;
|
|
40
|
+
export const HeaderInfoButton = ({
|
|
41
|
+
accessibilityLabel,
|
|
42
|
+
onPress,
|
|
43
|
+
testID
|
|
44
|
+
}) => {
|
|
48
45
|
return /*#__PURE__*/React.createElement(GhostButton, {
|
|
49
46
|
accessibilityLabel: accessibilityLabel,
|
|
50
47
|
icon: InfoIcon,
|
|
@@ -52,13 +49,12 @@ export const HeaderInfoButton = _ref3 => {
|
|
|
52
49
|
testID: testID
|
|
53
50
|
});
|
|
54
51
|
};
|
|
55
|
-
export const HeaderOptionsButton =
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} = _ref4;
|
|
52
|
+
export const HeaderOptionsButton = ({
|
|
53
|
+
onPress,
|
|
54
|
+
testID,
|
|
55
|
+
style,
|
|
56
|
+
accessibilityLabel
|
|
57
|
+
}) => {
|
|
62
58
|
return /*#__PURE__*/React.createElement(GhostButton, {
|
|
63
59
|
accessibilityLabel: accessibilityLabel,
|
|
64
60
|
icon: OptionsIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useNavigation","React","useCallback","BackButton","BackButtonIcon","GhostButton","InfoIcon","OptionsIcon","HeaderBackButton","
|
|
1
|
+
{"version":3,"names":["useNavigation","React","useCallback","BackButton","BackButtonIcon","GhostButton","InfoIcon","OptionsIcon","HeaderBackButton","onPress","testID","navigation","handleBackButtonPress","goBack","canGoBack","createElement","HeaderCloseButton","handleCloseButtonPress","icon","Close","HeaderInfoButton","accessibilityLabel","HeaderOptionsButton","style"],"sources":["header-buttons.tsx"],"sourcesContent":["import { useNavigation } from '@react-navigation/native';\nimport React, { FC, useCallback } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport { BackButton, BackButtonIcon, GhostButton, InfoIcon, OptionsIcon } from '../../ui-components';\n\nexport type HeaderButtonProps = {\n onPress?: () => void;\n testID: string;\n};\n\nexport const HeaderBackButton: FC<HeaderButtonProps> = ({ onPress, testID }) => {\n const navigation = useNavigation();\n const handleBackButtonPress = useCallback(() => {\n if (onPress) {\n return onPress();\n }\n navigation.goBack();\n }, [onPress, navigation]);\n if (!navigation.canGoBack) {\n return null;\n }\n return <BackButton onPress={handleBackButtonPress} testID={testID} />;\n};\n\nexport const HeaderCloseButton: FC<HeaderButtonProps> = ({ onPress, testID }) => {\n const navigation = useNavigation();\n const handleCloseButtonPress = useCallback(() => {\n if (onPress) {\n return onPress();\n }\n navigation.goBack();\n }, [onPress, navigation]);\n return <BackButton icon={BackButtonIcon.Close} onPress={handleCloseButtonPress} testID={testID} />;\n};\n\nexport type HeaderInfoButtonProps = {\n accessibilityLabel: string;\n onPress: () => void;\n testID: string;\n};\n\nexport const HeaderInfoButton: FC<HeaderInfoButtonProps> = ({ accessibilityLabel, onPress, testID }) => {\n return <GhostButton accessibilityLabel={accessibilityLabel} icon={InfoIcon} onPress={onPress} testID={testID} />;\n};\n\nexport type HeaderOptionsButtonProps = {\n accessibilityLabel: string;\n onPress: () => void;\n style?: StyleProp<ViewStyle>;\n testID: string;\n};\n\nexport const HeaderOptionsButton: FC<HeaderOptionsButtonProps> = ({ onPress, testID, style, accessibilityLabel }) => {\n return (\n <GhostButton\n accessibilityLabel={accessibilityLabel}\n icon={OptionsIcon}\n onPress={onPress}\n style={style}\n testID={testID}\n />\n );\n};\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,0BAA0B;AACxD,OAAOC,KAAK,IAAQC,WAAW,QAAQ,OAAO;AAG9C,SAASC,UAAU,EAAEC,cAAc,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,qBAAqB;AAOpG,OAAO,MAAMC,gBAAuC,GAAGA,CAAC;EAAEC,OAAO;EAAEC;AAAO,CAAC,KAAK;EAC9E,MAAMC,UAAU,GAAGX,aAAa,CAAC,CAAC;EAClC,MAAMY,qBAAqB,GAAGV,WAAW,CAAC,MAAM;IAC9C,IAAIO,OAAO,EAAE;MACX,OAAOA,OAAO,CAAC,CAAC;IAClB;IACAE,UAAU,CAACE,MAAM,CAAC,CAAC;EACrB,CAAC,EAAE,CAACJ,OAAO,EAAEE,UAAU,CAAC,CAAC;EACzB,IAAI,CAACA,UAAU,CAACG,SAAS,EAAE;IACzB,OAAO,IAAI;EACb;EACA,oBAAOb,KAAA,CAAAc,aAAA,CAACZ,UAAU;IAACM,OAAO,EAAEG,qBAAsB;IAACF,MAAM,EAAEA;EAAO,CAAE,CAAC;AACvE,CAAC;AAED,OAAO,MAAMM,iBAAwC,GAAGA,CAAC;EAAEP,OAAO;EAAEC;AAAO,CAAC,KAAK;EAC/E,MAAMC,UAAU,GAAGX,aAAa,CAAC,CAAC;EAClC,MAAMiB,sBAAsB,GAAGf,WAAW,CAAC,MAAM;IAC/C,IAAIO,OAAO,EAAE;MACX,OAAOA,OAAO,CAAC,CAAC;IAClB;IACAE,UAAU,CAACE,MAAM,CAAC,CAAC;EACrB,CAAC,EAAE,CAACJ,OAAO,EAAEE,UAAU,CAAC,CAAC;EACzB,oBAAOV,KAAA,CAAAc,aAAA,CAACZ,UAAU;IAACe,IAAI,EAAEd,cAAc,CAACe,KAAM;IAACV,OAAO,EAAEQ,sBAAuB;IAACP,MAAM,EAAEA;EAAO,CAAE,CAAC;AACpG,CAAC;AAQD,OAAO,MAAMU,gBAA2C,GAAGA,CAAC;EAAEC,kBAAkB;EAAEZ,OAAO;EAAEC;AAAO,CAAC,KAAK;EACtG,oBAAOT,KAAA,CAAAc,aAAA,CAACV,WAAW;IAACgB,kBAAkB,EAAEA,kBAAmB;IAACH,IAAI,EAAEZ,QAAS;IAACG,OAAO,EAAEA,OAAQ;IAACC,MAAM,EAAEA;EAAO,CAAE,CAAC;AAClH,CAAC;AASD,OAAO,MAAMY,mBAAiD,GAAGA,CAAC;EAAEb,OAAO;EAAEC,MAAM;EAAEa,KAAK;EAAEF;AAAmB,CAAC,KAAK;EACnH,oBACEpB,KAAA,CAAAc,aAAA,CAACV,WAAW;IACVgB,kBAAkB,EAAEA,kBAAmB;IACvCH,IAAI,EAAEX,WAAY;IAClBE,OAAO,EAAEA,OAAQ;IACjBc,KAAK,EAAEA,KAAM;IACbb,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN,CAAC","ignoreList":[]}
|