@procivis/one-react-native-components 0.1.63 → 0.2.54
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 +17 -6
- package/lib/commonjs/components/backup/index.js +17 -0
- package/lib/commonjs/components/backup/index.js.map +1 -0
- package/lib/commonjs/components/backup/preview-credentials.js +42 -0
- package/lib/commonjs/components/backup/preview-credentials.js.map +1 -0
- package/lib/commonjs/components/credential/credential.js +63 -0
- package/lib/commonjs/components/credential/credential.js.map +1 -0
- package/lib/commonjs/components/credential/index.js +17 -0
- package/lib/commonjs/components/credential/index.js.map +1 -0
- package/lib/commonjs/components/entity/EntityButtons.js +69 -0
- package/lib/commonjs/components/entity/EntityButtons.js.map +1 -0
- package/lib/commonjs/components/entity/entity-attributes.js +52 -0
- package/lib/commonjs/components/entity/entity-attributes.js.map +1 -0
- package/lib/commonjs/components/entity/entity-details-with-buttons.js +91 -0
- package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -0
- package/lib/commonjs/components/entity/entity-details.js +74 -0
- package/lib/commonjs/components/entity/entity-details.js.map +1 -0
- package/lib/commonjs/components/entity/index.js +27 -0
- package/lib/commonjs/components/entity/index.js.map +1 -0
- package/lib/commonjs/components/index.js +61 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/components/navigation/header-buttons.js +82 -0
- package/lib/commonjs/components/navigation/header-buttons.js.map +1 -0
- package/lib/commonjs/components/navigation/index.js +17 -0
- package/lib/commonjs/components/navigation/index.js.map +1 -0
- package/lib/commonjs/components/proof-request/group.js +36 -0
- package/lib/commonjs/components/proof-request/group.js.map +1 -0
- package/lib/commonjs/components/proof-request/index.js +39 -0
- package/lib/commonjs/components/proof-request/index.js.map +1 -0
- package/lib/commonjs/components/proof-request/select-credential.js +49 -0
- package/lib/commonjs/components/proof-request/select-credential.js.map +1 -0
- package/lib/commonjs/components/proof-request/share-credential.js +163 -0
- package/lib/commonjs/components/proof-request/share-credential.js.map +1 -0
- package/lib/commonjs/index.js +8 -261
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js +81 -0
- package/lib/commonjs/ui-components/accessibility/accessibilityHistory.js.map +1 -0
- package/lib/commonjs/ui-components/blur/blur-view.js +76 -0
- package/lib/commonjs/ui-components/blur/blur-view.js.map +1 -0
- package/lib/commonjs/ui-components/buttons/back-button.js.map +1 -0
- package/lib/commonjs/ui-components/buttons/button.js +153 -0
- package/lib/commonjs/ui-components/buttons/button.js.map +1 -0
- package/lib/commonjs/ui-components/buttons/connectivity-button.js +82 -0
- package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-card.js +183 -0
- package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +199 -0
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-header.js +173 -0
- package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +124 -0
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -0
- package/lib/commonjs/ui-components/credential/card/index.js +91 -0
- package/lib/commonjs/ui-components/credential/card/index.js.map +1 -0
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js +289 -0
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -0
- package/lib/commonjs/ui-components/credential/selector.js +79 -0
- package/lib/commonjs/ui-components/credential/selector.js.map +1 -0
- package/lib/commonjs/ui-components/detail/detail.js +84 -0
- package/lib/commonjs/ui-components/detail/detail.js.map +1 -0
- package/lib/commonjs/ui-components/entity/avatar.js +106 -0
- package/lib/commonjs/ui-components/entity/avatar.js.map +1 -0
- package/lib/commonjs/ui-components/entity/entity-cluster.js +75 -0
- package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -0
- package/lib/commonjs/ui-components/header/header.js +105 -0
- package/lib/commonjs/ui-components/header/header.js.map +1 -0
- package/lib/commonjs/ui-components/header/navigation-header.js +148 -0
- package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -0
- package/lib/commonjs/ui-components/history/data-item.js +70 -0
- package/lib/commonjs/ui-components/history/data-item.js.map +1 -0
- package/lib/commonjs/ui-components/history/history-list-item.js +90 -0
- package/lib/commonjs/ui-components/history/history-list-item.js.map +1 -0
- package/lib/commonjs/ui-components/history/history-section-header.js +49 -0
- package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -0
- package/lib/commonjs/ui-components/icons/entity.js +52 -0
- package/lib/commonjs/ui-components/icons/entity.js.map +1 -0
- package/lib/commonjs/ui-components/index.js +281 -0
- package/lib/commonjs/ui-components/index.js.map +1 -0
- package/lib/commonjs/ui-components/input/selection-input.js +102 -0
- package/lib/commonjs/ui-components/input/selection-input.js.map +1 -0
- package/lib/commonjs/ui-components/input/text-input.js +195 -0
- package/lib/commonjs/ui-components/input/text-input.js.map +1 -0
- package/lib/commonjs/ui-components/loader/loader.js +140 -0
- package/lib/commonjs/ui-components/loader/loader.js.map +1 -0
- package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js +238 -0
- package/lib/commonjs/ui-components/nerd-view/nerd-mode-item.js.map +1 -0
- package/lib/commonjs/ui-components/pin/index.js +47 -0
- package/lib/commonjs/ui-components/pin/index.js.map +1 -0
- package/lib/commonjs/ui-components/pin/keypad.js +201 -0
- package/lib/commonjs/ui-components/pin/keypad.js.map +1 -0
- package/lib/commonjs/ui-components/pin/pin-code-screen.js +162 -0
- package/lib/commonjs/ui-components/pin/pin-code-screen.js.map +1 -0
- package/lib/commonjs/ui-components/pin/pin-lock-animation.js +824 -0
- package/lib/commonjs/ui-components/pin/pin-lock-animation.js.map +1 -0
- package/lib/commonjs/ui-components/pin/pin-lock.js +83 -0
- package/lib/commonjs/ui-components/pin/pin-lock.js.map +1 -0
- package/lib/commonjs/ui-components/screens/backup-screen.js +87 -0
- package/lib/commonjs/ui-components/screens/backup-screen.js.map +1 -0
- package/lib/commonjs/ui-components/screens/image-preview-screen.js +92 -0
- package/lib/commonjs/ui-components/screens/image-preview-screen.js.map +1 -0
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js +172 -0
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -0
- package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js +120 -0
- package/lib/commonjs/ui-components/screens/qr-code-scanner-screen.js.map +1 -0
- package/lib/commonjs/ui-components/screens/scroll-view-screen.js +94 -0
- package/lib/commonjs/ui-components/screens/scroll-view-screen.js.map +1 -0
- package/lib/commonjs/ui-components/screens/section-list-screen.js +67 -0
- package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -0
- package/lib/commonjs/ui-components/searchbar/search-bar.js +99 -0
- package/lib/commonjs/ui-components/searchbar/search-bar.js.map +1 -0
- package/lib/commonjs/utils/array.js +10 -0
- package/lib/commonjs/utils/array.js.map +1 -0
- package/lib/commonjs/utils/backup.js +12 -0
- package/lib/commonjs/utils/backup.js.map +1 -0
- package/lib/commonjs/utils/date.js +98 -1
- package/lib/commonjs/utils/date.js.map +1 -1
- package/lib/commonjs/utils/hooks/connectivity/connectivity.js +148 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.js.map +1 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +56 -0
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/backup.js +155 -0
- package/lib/commonjs/utils/hooks/core/backup.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/core-config.js +19 -0
- package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/core-context.js +72 -0
- package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/core-init.js +91 -0
- package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/credential-schemas.js +111 -0
- package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/credentials.js +170 -0
- package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/dids.js +35 -0
- package/lib/commonjs/utils/hooks/core/dids.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/error-code.js +15 -0
- package/lib/commonjs/utils/hooks/core/error-code.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/history.js +65 -0
- package/lib/commonjs/utils/hooks/core/history.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/index.js +138 -0
- package/lib/commonjs/utils/hooks/core/index.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/proof-schemas.js +132 -0
- package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/proofs.js +336 -0
- package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/query.js +25 -0
- package/lib/commonjs/utils/hooks/core/query.js.map +1 -0
- package/lib/commonjs/utils/hooks/core/trust-entity.js +95 -0
- package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -0
- package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js +51 -0
- package/lib/commonjs/utils/hooks/credential-card/credential-card-expanding.js.map +1 -0
- package/lib/commonjs/utils/hooks/http/client.js +20 -0
- package/lib/commonjs/utils/hooks/http/client.js.map +1 -0
- package/lib/commonjs/utils/hooks/index.js +85 -11
- package/lib/commonjs/utils/hooks/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/before-remove.js +28 -0
- package/lib/commonjs/utils/hooks/navigation/before-remove.js.map +1 -0
- package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js +34 -0
- package/lib/commonjs/utils/hooks/navigation/close-button-timeout.js.map +1 -0
- package/lib/commonjs/utils/hooks/navigation/deep-link.js +46 -0
- package/lib/commonjs/utils/hooks/navigation/deep-link.js.map +1 -0
- package/lib/commonjs/utils/hooks/navigation/index.js +50 -0
- package/lib/commonjs/utils/hooks/navigation/index.js.map +1 -0
- package/lib/commonjs/utils/hooks/navigation/open-settings.js +43 -0
- package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -0
- package/lib/commonjs/utils/hooks/pin-security/pin-security.js +87 -0
- package/lib/commonjs/utils/hooks/pin-security/pin-security.js.map +1 -0
- package/lib/commonjs/utils/hooks/revocation/credential-status.js +67 -0
- package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -0
- package/lib/commonjs/utils/index.js +119 -45
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js +86 -0
- package/lib/commonjs/utils/parsers/credential-images.js.map +1 -0
- package/lib/commonjs/utils/parsers/credential-sharing.js +255 -0
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -0
- package/lib/commonjs/utils/parsers/credential.js +323 -0
- package/lib/commonjs/utils/parsers/credential.js.map +1 -0
- package/lib/commonjs/utils/parsers/index.js +50 -0
- package/lib/commonjs/utils/parsers/index.js.map +1 -0
- package/lib/commonjs/utils/parsers/query.js +103 -0
- package/lib/commonjs/utils/parsers/query.js.map +1 -0
- package/lib/commonjs/utils/reporting.js +86 -0
- package/lib/commonjs/utils/reporting.js.map +1 -0
- package/lib/commonjs/utils/string.js +20 -0
- package/lib/commonjs/utils/string.js.map +1 -0
- package/lib/commonjs/utils/useMemoAsync.js +1 -1
- package/lib/commonjs/utils/useMemoAsync.js.map +1 -1
- package/lib/commonjs/utils/uuid.js +16 -0
- package/lib/commonjs/utils/uuid.js.map +1 -0
- package/lib/module/components/backup/index.js +2 -0
- package/lib/module/components/backup/index.js.map +1 -0
- package/lib/module/components/backup/preview-credentials.js +34 -0
- package/lib/module/components/backup/preview-credentials.js.map +1 -0
- package/lib/module/components/credential/credential.js +55 -0
- package/lib/module/components/credential/credential.js.map +1 -0
- package/lib/module/components/credential/index.js +2 -0
- package/lib/module/components/credential/index.js.map +1 -0
- package/lib/module/components/entity/EntityButtons.js +60 -0
- package/lib/module/components/entity/EntityButtons.js.map +1 -0
- package/lib/module/components/entity/entity-attributes.js +43 -0
- package/lib/module/components/entity/entity-attributes.js.map +1 -0
- package/lib/module/components/entity/entity-details-with-buttons.js +81 -0
- package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -0
- package/lib/module/components/entity/entity-details.js +64 -0
- package/lib/module/components/entity/entity-details.js.map +1 -0
- package/lib/module/components/entity/index.js +3 -0
- package/lib/module/components/entity/index.js.map +1 -0
- package/lib/module/components/index.js +6 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/components/navigation/header-buttons.js +70 -0
- package/lib/module/components/navigation/header-buttons.js.map +1 -0
- package/lib/module/components/navigation/index.js +2 -0
- package/lib/module/components/navigation/index.js.map +1 -0
- package/lib/module/components/proof-request/group.js +28 -0
- package/lib/module/components/proof-request/group.js.map +1 -0
- package/lib/module/components/proof-request/index.js +4 -0
- package/lib/module/components/proof-request/index.js.map +1 -0
- package/lib/module/components/proof-request/select-credential.js +41 -0
- package/lib/module/components/proof-request/select-credential.js.map +1 -0
- package/lib/module/components/proof-request/share-credential.js +154 -0
- package/lib/module/components/proof-request/share-credential.js.map +1 -0
- package/lib/module/index.js +2 -25
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistory.js +71 -0
- package/lib/module/ui-components/accessibility/accessibilityHistory.js.map +1 -0
- package/lib/module/ui-components/blur/blur-view.js +67 -0
- package/lib/module/ui-components/blur/blur-view.js.map +1 -0
- package/lib/module/ui-components/buttons/back-button.js.map +1 -0
- package/lib/module/ui-components/buttons/button.js +143 -0
- package/lib/module/ui-components/buttons/button.js.map +1 -0
- package/lib/module/ui-components/buttons/connectivity-button.js +73 -0
- package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -0
- package/lib/module/ui-components/credential/card/credential-card.js +171 -0
- package/lib/module/ui-components/credential/card/credential-card.js.map +1 -0
- package/lib/module/ui-components/credential/card/credential-details-card.js +189 -0
- package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -0
- package/lib/module/ui-components/credential/card/credential-header.js +163 -0
- package/lib/module/ui-components/credential/card/credential-header.js.map +1 -0
- package/lib/module/ui-components/credential/card/credential-image-carousel.js +113 -0
- package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -0
- package/lib/module/ui-components/credential/card/index.js +11 -0
- package/lib/module/ui-components/credential/card/index.js.map +1 -0
- package/lib/module/ui-components/credential/credential-attribute-item.js +279 -0
- package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -0
- package/lib/module/ui-components/credential/selector.js +70 -0
- package/lib/module/ui-components/credential/selector.js.map +1 -0
- package/lib/module/ui-components/detail/detail.js +75 -0
- package/lib/module/ui-components/detail/detail.js.map +1 -0
- package/lib/module/ui-components/entity/avatar.js +96 -0
- package/lib/module/ui-components/entity/avatar.js.map +1 -0
- package/lib/module/ui-components/entity/entity-cluster.js +65 -0
- package/lib/module/ui-components/entity/entity-cluster.js.map +1 -0
- package/lib/module/ui-components/header/header.js +97 -0
- package/lib/module/ui-components/header/header.js.map +1 -0
- package/lib/module/ui-components/header/navigation-header.js +138 -0
- package/lib/module/ui-components/header/navigation-header.js.map +1 -0
- package/lib/module/ui-components/history/data-item.js +60 -0
- package/lib/module/ui-components/history/data-item.js.map +1 -0
- package/lib/module/ui-components/history/history-list-item.js +80 -0
- package/lib/module/ui-components/history/history-list-item.js.map +1 -0
- package/lib/module/ui-components/history/history-section-header.js +42 -0
- package/lib/module/ui-components/history/history-section-header.js.map +1 -0
- package/lib/module/ui-components/icons/entity.js +43 -0
- package/lib/module/ui-components/icons/entity.js.map +1 -0
- package/lib/module/ui-components/index.js +26 -0
- package/lib/module/ui-components/index.js.map +1 -0
- package/lib/module/ui-components/input/selection-input.js +92 -0
- package/lib/module/ui-components/input/selection-input.js.map +1 -0
- package/lib/module/ui-components/input/text-input.js +185 -0
- package/lib/module/ui-components/input/text-input.js.map +1 -0
- package/lib/module/ui-components/loader/loader.js +130 -0
- package/lib/module/ui-components/loader/loader.js.map +1 -0
- package/lib/module/ui-components/nerd-view/nerd-mode-item.js +227 -0
- package/lib/module/ui-components/nerd-view/nerd-mode-item.js.map +1 -0
- package/lib/module/ui-components/pin/index.js +5 -0
- package/lib/module/ui-components/pin/index.js.map +1 -0
- package/lib/module/ui-components/pin/keypad.js +191 -0
- package/lib/module/ui-components/pin/keypad.js.map +1 -0
- package/lib/module/ui-components/pin/pin-code-screen.js +152 -0
- package/lib/module/ui-components/pin/pin-code-screen.js.map +1 -0
- package/lib/module/ui-components/pin/pin-lock-animation.js +817 -0
- package/lib/module/ui-components/pin/pin-lock-animation.js.map +1 -0
- package/lib/module/ui-components/pin/pin-lock.js +73 -0
- package/lib/module/ui-components/pin/pin-lock.js.map +1 -0
- package/lib/module/ui-components/screens/backup-screen.js +78 -0
- package/lib/module/ui-components/screens/backup-screen.js.map +1 -0
- package/lib/module/ui-components/screens/image-preview-screen.js +83 -0
- package/lib/module/ui-components/screens/image-preview-screen.js.map +1 -0
- package/lib/module/ui-components/screens/nerd-mode-screen.js +161 -0
- package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -0
- package/lib/module/ui-components/screens/qr-code-scanner-screen.js +110 -0
- package/lib/module/ui-components/screens/qr-code-scanner-screen.js.map +1 -0
- package/lib/module/ui-components/screens/scroll-view-screen.js +86 -0
- package/lib/module/ui-components/screens/scroll-view-screen.js.map +1 -0
- package/lib/module/ui-components/screens/section-list-screen.js +59 -0
- package/lib/module/ui-components/screens/section-list-screen.js.map +1 -0
- package/lib/module/ui-components/searchbar/search-bar.js +89 -0
- package/lib/module/ui-components/searchbar/search-bar.js.map +1 -0
- package/lib/module/utils/array.js +4 -0
- package/lib/module/utils/array.js.map +1 -0
- package/lib/module/utils/backup.js +5 -0
- package/lib/module/utils/backup.js.map +1 -0
- package/lib/module/utils/date.js +89 -1
- package/lib/module/utils/date.js.map +1 -1
- package/lib/module/utils/hooks/connectivity/connectivity.js +136 -0
- package/lib/module/utils/hooks/connectivity/connectivity.js.map +1 -0
- package/lib/module/utils/hooks/connectivity/connectivity.test.js +54 -0
- package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -0
- package/lib/module/utils/hooks/core/backup.js +143 -0
- package/lib/module/utils/hooks/core/backup.js.map +1 -0
- package/lib/module/utils/hooks/core/core-config.js +12 -0
- package/lib/module/utils/hooks/core/core-config.js.map +1 -0
- package/lib/module/utils/hooks/core/core-context.js +62 -0
- package/lib/module/utils/hooks/core/core-context.js.map +1 -0
- package/lib/module/utils/hooks/core/core-init.js +82 -0
- package/lib/module/utils/hooks/core/core-init.js.map +1 -0
- package/lib/module/utils/hooks/core/credential-schemas.js +95 -0
- package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -0
- package/lib/module/utils/hooks/core/credentials.js +155 -0
- package/lib/module/utils/hooks/core/credentials.js.map +1 -0
- package/lib/module/utils/hooks/core/dids.js +27 -0
- package/lib/module/utils/hooks/core/dids.js.map +1 -0
- package/lib/module/utils/hooks/core/error-code.js +8 -0
- package/lib/module/utils/hooks/core/error-code.js.map +1 -0
- package/lib/module/utils/hooks/core/history.js +57 -0
- package/lib/module/utils/hooks/core/history.js.map +1 -0
- package/lib/module/utils/hooks/core/index.js +13 -0
- package/lib/module/utils/hooks/core/index.js.map +1 -0
- package/lib/module/utils/hooks/core/proof-schemas.js +115 -0
- package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -0
- package/lib/module/utils/hooks/core/proofs.js +312 -0
- package/lib/module/utils/hooks/core/proofs.js.map +1 -0
- package/lib/module/utils/hooks/core/query.js +18 -0
- package/lib/module/utils/hooks/core/query.js.map +1 -0
- package/lib/module/utils/hooks/core/trust-entity.js +84 -0
- package/lib/module/utils/hooks/core/trust-entity.js.map +1 -0
- package/lib/module/utils/hooks/credential-card/credential-card-expanding.js +43 -0
- package/lib/module/utils/hooks/credential-card/credential-card-expanding.js.map +1 -0
- package/lib/module/utils/hooks/http/client.js +13 -0
- package/lib/module/utils/hooks/http/client.js.map +1 -0
- package/lib/module/utils/hooks/index.js +8 -4
- package/lib/module/utils/hooks/index.js.map +1 -1
- package/lib/module/utils/hooks/navigation/before-remove.js +21 -0
- package/lib/module/utils/hooks/navigation/before-remove.js.map +1 -0
- package/lib/module/utils/hooks/navigation/close-button-timeout.js +27 -0
- package/lib/module/utils/hooks/navigation/close-button-timeout.js.map +1 -0
- package/lib/module/utils/hooks/navigation/deep-link.js +38 -0
- package/lib/module/utils/hooks/navigation/deep-link.js.map +1 -0
- package/lib/module/utils/hooks/navigation/index.js +5 -0
- package/lib/module/utils/hooks/navigation/index.js.map +1 -0
- package/lib/module/utils/hooks/navigation/open-settings.js +36 -0
- package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -0
- package/lib/module/utils/hooks/pin-security/pin-security.js +80 -0
- package/lib/module/utils/hooks/pin-security/pin-security.js.map +1 -0
- package/lib/module/utils/hooks/revocation/credential-status.js +61 -0
- package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -0
- package/lib/module/utils/index.js +11 -5
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/parsers/credential-images.js +78 -0
- package/lib/module/utils/parsers/credential-images.js.map +1 -0
- package/lib/module/utils/parsers/credential-sharing.js +242 -0
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -0
- package/lib/module/utils/parsers/credential.js +304 -0
- package/lib/module/utils/parsers/credential.js.map +1 -0
- package/lib/module/utils/parsers/index.js +5 -0
- package/lib/module/utils/parsers/index.js.map +1 -0
- package/lib/module/utils/parsers/query.js +91 -0
- package/lib/module/utils/parsers/query.js.map +1 -0
- package/lib/module/utils/reporting.js +76 -0
- package/lib/module/utils/reporting.js.map +1 -0
- package/lib/module/utils/string.js +10 -0
- package/lib/module/utils/string.js.map +1 -0
- package/lib/module/utils/useMemoAsync.js +1 -1
- package/lib/module/utils/useMemoAsync.js.map +1 -1
- package/lib/module/utils/uuid.js +9 -0
- package/lib/module/utils/uuid.js.map +1 -0
- package/lib/typescript/components/backup/index.d.ts +1 -0
- package/lib/typescript/components/backup/preview-credentials.d.ts +11 -0
- package/lib/typescript/components/credential/credential.d.ts +16 -0
- package/lib/typescript/components/credential/index.d.ts +1 -0
- package/lib/typescript/components/entity/EntityButtons.d.ts +14 -0
- package/lib/typescript/components/entity/entity-attributes.d.ts +12 -0
- package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +18 -0
- package/lib/typescript/components/entity/entity-details.d.ts +19 -0
- package/lib/typescript/components/entity/index.d.ts +2 -0
- package/lib/typescript/components/index.d.ts +5 -0
- package/lib/typescript/components/navigation/header-buttons.d.ts +21 -0
- package/lib/typescript/components/navigation/index.d.ts +1 -0
- package/lib/typescript/components/proof-request/group.d.ts +2 -0
- package/lib/typescript/components/proof-request/index.d.ts +3 -0
- package/lib/typescript/components/proof-request/select-credential.d.ts +14 -0
- package/lib/typescript/components/proof-request/share-credential.d.ts +27 -0
- package/lib/typescript/index.d.ts +2 -25
- package/lib/typescript/ui-components/accessibility/accessibilityHistory.d.ts +13 -0
- package/lib/typescript/ui-components/buttons/back-button.d.ts +9 -0
- package/lib/typescript/ui-components/credential/card/credential-card.d.ts +25 -0
- package/lib/typescript/ui-components/credential/card/index.d.ts +10 -0
- package/lib/typescript/ui-components/credential/credential-attribute-item.d.ts +49 -0
- package/lib/typescript/ui-components/entity/avatar.d.ts +11 -0
- package/lib/typescript/ui-components/entity/entity-cluster.d.ts +13 -0
- package/lib/typescript/ui-components/index.d.ts +25 -0
- package/lib/typescript/ui-components/pin/index.d.ts +4 -0
- package/lib/typescript/ui-components/pin/pin-lock-animation.d.ts +731 -0
- package/lib/typescript/ui-components/pin/pin-lock.d.ts +13 -0
- package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +49 -0
- package/lib/typescript/ui-components/text/typography.d.ts +112 -0
- package/lib/typescript/utils/array.d.ts +1 -0
- package/lib/typescript/utils/backup.d.ts +1 -0
- package/lib/typescript/utils/date.d.ts +32 -0
- package/lib/typescript/utils/hooks/connectivity/connectivity.d.ts +27 -0
- package/lib/typescript/utils/hooks/connectivity/connectivity.test.d.ts +1 -0
- package/lib/typescript/utils/hooks/core/backup.d.ts +12 -0
- package/lib/typescript/utils/hooks/core/core-config.d.ts +1 -0
- package/lib/typescript/utils/hooks/core/core-context.d.ts +15 -0
- package/lib/typescript/utils/hooks/core/core-init.d.ts +3 -0
- package/lib/typescript/utils/hooks/core/credential-schemas.d.ts +11 -0
- package/lib/typescript/utils/hooks/core/credentials.d.ts +18 -0
- package/lib/typescript/utils/hooks/core/dids.d.ts +3 -0
- package/lib/typescript/utils/hooks/core/error-code.d.ts +6 -0
- package/lib/typescript/utils/hooks/core/history.d.ts +6 -0
- package/lib/typescript/utils/hooks/core/index.d.ts +12 -0
- package/lib/typescript/utils/hooks/core/proof-schemas.d.ts +14 -0
- package/lib/typescript/utils/hooks/core/proofs.d.ts +37 -0
- package/lib/typescript/utils/hooks/core/query.d.ts +2 -0
- package/lib/typescript/utils/hooks/core/trust-entity.d.ts +6 -0
- package/lib/typescript/utils/hooks/credential-card/credential-card-expanding.d.ts +10 -0
- package/lib/typescript/utils/hooks/http/client.d.ts +2 -0
- package/lib/typescript/utils/hooks/index.d.ts +8 -4
- package/lib/typescript/utils/hooks/navigation/before-remove.d.ts +1 -0
- package/lib/typescript/utils/hooks/navigation/close-button-timeout.d.ts +3 -0
- package/lib/typescript/utils/hooks/navigation/deep-link.d.ts +2 -0
- package/lib/typescript/utils/hooks/navigation/index.d.ts +4 -0
- package/lib/typescript/utils/hooks/navigation/open-settings.d.ts +6 -0
- package/lib/typescript/utils/hooks/pin-security/pin-security.d.ts +6 -0
- package/lib/typescript/utils/hooks/revocation/credential-status.d.ts +7 -0
- package/lib/typescript/utils/index.d.ts +11 -5
- package/lib/typescript/utils/parsers/credential-images.d.ts +3 -0
- package/lib/typescript/utils/parsers/credential-sharing.d.ts +16 -0
- package/lib/typescript/utils/parsers/credential.d.ts +76 -0
- package/lib/typescript/utils/parsers/index.d.ts +4 -0
- package/lib/typescript/utils/parsers/query.d.ts +7 -0
- package/lib/typescript/utils/ref.d.ts +1 -1
- package/lib/typescript/utils/reporting.d.ts +4 -0
- package/lib/typescript/utils/string.d.ts +4 -0
- package/lib/typescript/utils/uuid.d.ts +6 -0
- package/package.json +29 -2
- package/src/components/backup/index.ts +1 -0
- package/src/components/backup/preview-credentials.tsx +38 -0
- package/src/components/credential/credential.tsx +72 -0
- package/src/components/credential/index.ts +1 -0
- package/src/components/entity/EntityButtons.tsx +79 -0
- package/src/components/entity/entity-attributes.tsx +62 -0
- package/src/components/entity/entity-details-with-buttons.tsx +98 -0
- package/src/components/entity/entity-details.tsx +85 -0
- package/src/components/entity/index.ts +3 -0
- package/src/components/index.ts +5 -0
- package/src/components/navigation/header-buttons.tsx +64 -0
- package/src/components/navigation/index.ts +1 -0
- package/src/components/proof-request/group.tsx +26 -0
- package/src/components/proof-request/index.ts +3 -0
- package/src/components/proof-request/select-credential.tsx +48 -0
- package/src/components/proof-request/share-credential.tsx +194 -0
- package/src/index.ts +2 -25
- package/src/ui-components/accessibility/accessibilityHistory.tsx +77 -0
- package/src/ui-components/blur/blur-view.tsx +82 -0
- package/src/ui-components/buttons/back-button.tsx +30 -0
- package/src/ui-components/buttons/button.tsx +169 -0
- package/src/ui-components/buttons/connectivity-button.tsx +95 -0
- package/src/ui-components/credential/card/credential-card.stories.tsx +54 -0
- package/src/ui-components/credential/card/credential-card.tsx +189 -0
- package/src/ui-components/credential/card/credential-details-card.stories.tsx +299 -0
- package/src/ui-components/credential/card/credential-details-card.tsx +242 -0
- package/src/ui-components/credential/card/credential-header.stories.tsx +50 -0
- package/src/ui-components/credential/card/credential-header.tsx +196 -0
- package/src/ui-components/credential/card/credential-image-carousel.tsx +113 -0
- package/src/ui-components/credential/card/index.ts +16 -0
- package/src/ui-components/credential/credential-attribute-item.tsx +373 -0
- package/src/ui-components/credential/selector.tsx +64 -0
- package/src/ui-components/detail/detail.stories.tsx +65 -0
- package/src/ui-components/detail/detail.tsx +98 -0
- package/src/ui-components/entity/avatar.tsx +100 -0
- package/src/ui-components/entity/entity-cluster.tsx +82 -0
- package/src/ui-components/header/header.stories.tsx +59 -0
- package/src/ui-components/header/header.tsx +105 -0
- package/src/ui-components/header/navigation-header.stories.tsx +56 -0
- package/src/ui-components/header/navigation-header.tsx +147 -0
- package/src/ui-components/history/data-item.tsx +79 -0
- package/src/ui-components/history/history-list-item.tsx +102 -0
- package/src/ui-components/history/history-section-header.tsx +44 -0
- package/src/ui-components/icons/entity.tsx +31 -0
- package/src/ui-components/index.ts +25 -0
- package/src/ui-components/input/selection-input.tsx +112 -0
- package/src/ui-components/input/text-input.tsx +253 -0
- package/src/ui-components/loader/loader.tsx +171 -0
- package/src/ui-components/nerd-view/nerd-mode-item.tsx +299 -0
- package/src/ui-components/pin/index.ts +5 -0
- package/src/ui-components/pin/keypad.tsx +166 -0
- package/src/ui-components/pin/pin-code-screen.tsx +195 -0
- package/src/ui-components/pin/pin-lock-animation.tsx +500 -0
- package/src/ui-components/pin/pin-lock.tsx +82 -0
- package/src/ui-components/screens/backup-screen.tsx +92 -0
- package/src/ui-components/screens/image-preview-screen.stories.tsx +28 -0
- package/src/ui-components/screens/image-preview-screen.tsx +82 -0
- package/src/ui-components/screens/nerd-mode-screen.tsx +214 -0
- package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +37 -0
- package/src/ui-components/screens/qr-code-scanner-screen.tsx +124 -0
- package/src/ui-components/screens/scroll-view-screen.tsx +91 -0
- package/src/ui-components/screens/section-list-screen.tsx +61 -0
- package/src/ui-components/searchbar/search-bar.tsx +94 -0
- package/src/ui-components/text/typography.stories.tsx +70 -0
- package/src/utils/array.ts +3 -0
- package/src/utils/backup.ts +5 -0
- package/src/utils/date.ts +105 -1
- package/src/utils/hooks/connectivity/connectivity.test.ts +87 -0
- package/src/utils/hooks/connectivity/connectivity.ts +162 -0
- package/src/utils/hooks/core/backup.ts +140 -0
- package/src/utils/hooks/core/core-config.ts +13 -0
- package/src/utils/hooks/core/core-context.tsx +101 -0
- package/src/utils/hooks/core/core-init.ts +92 -0
- package/src/utils/hooks/core/credential-schemas.ts +110 -0
- package/src/utils/hooks/core/credentials.ts +171 -0
- package/src/utils/hooks/core/dids.ts +28 -0
- package/src/utils/hooks/core/error-code.ts +6 -0
- package/src/utils/hooks/core/history.ts +85 -0
- package/src/utils/hooks/core/index.ts +12 -0
- package/src/utils/hooks/core/proof-schemas.ts +130 -0
- package/src/utils/hooks/core/proofs.ts +351 -0
- package/src/utils/hooks/core/query.ts +19 -0
- package/src/utils/hooks/core/trust-entity.ts +109 -0
- package/src/utils/hooks/credential-card/credential-card-expanding.tsx +45 -0
- package/src/utils/hooks/http/client.ts +13 -0
- package/src/utils/hooks/index.ts +8 -5
- package/src/utils/hooks/navigation/before-remove.tsx +22 -0
- package/src/utils/hooks/navigation/close-button-timeout.tsx +29 -0
- package/src/utils/hooks/navigation/deep-link.ts +40 -0
- package/src/utils/hooks/navigation/index.ts +4 -0
- package/src/utils/hooks/navigation/open-settings.ts +40 -0
- package/src/utils/hooks/pin-security/pin-security.ts +99 -0
- package/src/utils/hooks/revocation/credential-status.ts +44 -0
- package/src/utils/index.ts +11 -14
- package/src/utils/parsers/credential-images.tsx +78 -0
- package/src/utils/parsers/credential-sharing.tsx +366 -0
- package/src/utils/parsers/credential.ts +365 -0
- package/src/utils/parsers/index.ts +4 -0
- package/src/utils/parsers/query.tsx +80 -0
- package/src/utils/reporting.ts +84 -0
- package/src/utils/string.ts +17 -0
- package/src/utils/useMemoAsync.ts +1 -1
- package/src/utils/uuid.ts +8 -0
- package/lib/commonjs/accessibility/accessibilityHistory.js +0 -81
- package/lib/commonjs/accessibility/accessibilityHistory.js.map +0 -1
- package/lib/commonjs/blur/blur-view.js +0 -76
- package/lib/commonjs/blur/blur-view.js.map +0 -1
- package/lib/commonjs/buttons/back-button.js.map +0 -1
- package/lib/commonjs/buttons/button.js +0 -153
- package/lib/commonjs/buttons/button.js.map +0 -1
- package/lib/commonjs/buttons/connectivity-button.js +0 -82
- package/lib/commonjs/buttons/connectivity-button.js.map +0 -1
- package/lib/commonjs/credential/card/credential-card.js +0 -189
- package/lib/commonjs/credential/card/credential-card.js.map +0 -1
- package/lib/commonjs/credential/card/credential-details-card.js +0 -201
- package/lib/commonjs/credential/card/credential-details-card.js.map +0 -1
- package/lib/commonjs/credential/card/credential-header.js +0 -172
- package/lib/commonjs/credential/card/credential-header.js.map +0 -1
- package/lib/commonjs/credential/card/credential-image-carousel.js +0 -124
- package/lib/commonjs/credential/card/credential-image-carousel.js.map +0 -1
- package/lib/commonjs/credential/card/index.js +0 -85
- package/lib/commonjs/credential/card/index.js.map +0 -1
- package/lib/commonjs/credential/credential-attribute-item.js +0 -289
- package/lib/commonjs/credential/credential-attribute-item.js.map +0 -1
- package/lib/commonjs/credential/selector.js +0 -79
- package/lib/commonjs/credential/selector.js.map +0 -1
- package/lib/commonjs/detail/detail.js +0 -84
- package/lib/commonjs/detail/detail.js.map +0 -1
- package/lib/commonjs/entity/avatar.js +0 -96
- package/lib/commonjs/entity/avatar.js.map +0 -1
- package/lib/commonjs/entity/entity-cluster.js +0 -66
- package/lib/commonjs/entity/entity-cluster.js.map +0 -1
- package/lib/commonjs/header/header.js +0 -105
- package/lib/commonjs/header/header.js.map +0 -1
- package/lib/commonjs/header/navigation-header.js +0 -148
- package/lib/commonjs/header/navigation-header.js.map +0 -1
- package/lib/commonjs/history/data-item.js +0 -70
- package/lib/commonjs/history/data-item.js.map +0 -1
- package/lib/commonjs/history/history-list-item.js +0 -90
- package/lib/commonjs/history/history-list-item.js.map +0 -1
- package/lib/commonjs/history/history-section-header.js +0 -49
- package/lib/commonjs/history/history-section-header.js.map +0 -1
- package/lib/commonjs/icons/entity.js +0 -34
- package/lib/commonjs/icons/entity.js.map +0 -1
- package/lib/commonjs/input/selection-input.js +0 -102
- package/lib/commonjs/input/selection-input.js.map +0 -1
- package/lib/commonjs/input/text-input.js +0 -195
- package/lib/commonjs/input/text-input.js.map +0 -1
- package/lib/commonjs/loader/loader.js +0 -140
- package/lib/commonjs/loader/loader.js.map +0 -1
- package/lib/commonjs/nerd-view/nerd-mode-item.js +0 -235
- package/lib/commonjs/nerd-view/nerd-mode-item.js.map +0 -1
- package/lib/commonjs/pin/index.js +0 -32
- package/lib/commonjs/pin/index.js.map +0 -1
- package/lib/commonjs/pin/keypad.js +0 -201
- package/lib/commonjs/pin/keypad.js.map +0 -1
- package/lib/commonjs/pin/pin-code-screen.js +0 -162
- package/lib/commonjs/pin/pin-code-screen.js.map +0 -1
- package/lib/commonjs/screens/backup-screen.js +0 -87
- package/lib/commonjs/screens/backup-screen.js.map +0 -1
- package/lib/commonjs/screens/image-preview-screen.js +0 -92
- package/lib/commonjs/screens/image-preview-screen.js.map +0 -1
- package/lib/commonjs/screens/nerd-mode-screen.js +0 -142
- package/lib/commonjs/screens/nerd-mode-screen.js.map +0 -1
- package/lib/commonjs/screens/qr-code-scanner-screen.js +0 -120
- package/lib/commonjs/screens/qr-code-scanner-screen.js.map +0 -1
- package/lib/commonjs/screens/scroll-view-screen.js +0 -94
- package/lib/commonjs/screens/scroll-view-screen.js.map +0 -1
- package/lib/commonjs/screens/section-list-screen.js +0 -67
- package/lib/commonjs/screens/section-list-screen.js.map +0 -1
- package/lib/commonjs/searchbar/search-bar.js +0 -99
- package/lib/commonjs/searchbar/search-bar.js.map +0 -1
- package/lib/module/accessibility/accessibilityHistory.js +0 -71
- package/lib/module/accessibility/accessibilityHistory.js.map +0 -1
- package/lib/module/blur/blur-view.js +0 -67
- package/lib/module/blur/blur-view.js.map +0 -1
- package/lib/module/buttons/back-button.js.map +0 -1
- package/lib/module/buttons/button.js +0 -143
- package/lib/module/buttons/button.js.map +0 -1
- package/lib/module/buttons/connectivity-button.js +0 -73
- package/lib/module/buttons/connectivity-button.js.map +0 -1
- package/lib/module/credential/card/credential-card.js +0 -177
- package/lib/module/credential/card/credential-card.js.map +0 -1
- package/lib/module/credential/card/credential-details-card.js +0 -191
- package/lib/module/credential/card/credential-details-card.js.map +0 -1
- package/lib/module/credential/card/credential-header.js +0 -162
- package/lib/module/credential/card/credential-header.js.map +0 -1
- package/lib/module/credential/card/credential-image-carousel.js +0 -113
- package/lib/module/credential/card/credential-image-carousel.js.map +0 -1
- package/lib/module/credential/card/index.js +0 -11
- package/lib/module/credential/card/index.js.map +0 -1
- package/lib/module/credential/credential-attribute-item.js +0 -279
- package/lib/module/credential/credential-attribute-item.js.map +0 -1
- package/lib/module/credential/selector.js +0 -70
- package/lib/module/credential/selector.js.map +0 -1
- package/lib/module/detail/detail.js +0 -75
- package/lib/module/detail/detail.js.map +0 -1
- package/lib/module/entity/avatar.js +0 -86
- package/lib/module/entity/avatar.js.map +0 -1
- package/lib/module/entity/entity-cluster.js +0 -56
- package/lib/module/entity/entity-cluster.js.map +0 -1
- package/lib/module/header/header.js +0 -97
- package/lib/module/header/header.js.map +0 -1
- package/lib/module/header/navigation-header.js +0 -138
- package/lib/module/header/navigation-header.js.map +0 -1
- package/lib/module/history/data-item.js +0 -60
- package/lib/module/history/data-item.js.map +0 -1
- package/lib/module/history/history-list-item.js +0 -80
- package/lib/module/history/history-list-item.js.map +0 -1
- package/lib/module/history/history-section-header.js +0 -42
- package/lib/module/history/history-section-header.js.map +0 -1
- package/lib/module/icons/entity.js +0 -25
- package/lib/module/icons/entity.js.map +0 -1
- package/lib/module/input/selection-input.js +0 -92
- package/lib/module/input/selection-input.js.map +0 -1
- package/lib/module/input/text-input.js +0 -185
- package/lib/module/input/text-input.js.map +0 -1
- package/lib/module/loader/loader.js +0 -130
- package/lib/module/loader/loader.js.map +0 -1
- package/lib/module/nerd-view/nerd-mode-item.js +0 -224
- package/lib/module/nerd-view/nerd-mode-item.js.map +0 -1
- package/lib/module/pin/index.js +0 -4
- package/lib/module/pin/index.js.map +0 -1
- package/lib/module/pin/keypad.js +0 -191
- package/lib/module/pin/keypad.js.map +0 -1
- package/lib/module/pin/pin-code-screen.js +0 -152
- package/lib/module/pin/pin-code-screen.js.map +0 -1
- package/lib/module/screens/backup-screen.js +0 -78
- package/lib/module/screens/backup-screen.js.map +0 -1
- package/lib/module/screens/image-preview-screen.js +0 -83
- package/lib/module/screens/image-preview-screen.js.map +0 -1
- package/lib/module/screens/nerd-mode-screen.js +0 -132
- package/lib/module/screens/nerd-mode-screen.js.map +0 -1
- package/lib/module/screens/qr-code-scanner-screen.js +0 -110
- package/lib/module/screens/qr-code-scanner-screen.js.map +0 -1
- package/lib/module/screens/scroll-view-screen.js +0 -86
- package/lib/module/screens/scroll-view-screen.js.map +0 -1
- package/lib/module/screens/section-list-screen.js +0 -59
- package/lib/module/screens/section-list-screen.js.map +0 -1
- package/lib/module/searchbar/search-bar.js +0 -89
- package/lib/module/searchbar/search-bar.js.map +0 -1
- package/lib/typescript/accessibility/accessibilityHistory.d.ts +0 -13
- package/lib/typescript/buttons/back-button.d.ts +0 -9
- package/lib/typescript/credential/card/credential-card.d.ts +0 -22
- package/lib/typescript/credential/card/index.d.ts +0 -10
- package/lib/typescript/credential/credential-attribute-item.d.ts +0 -48
- package/lib/typescript/entity/avatar.d.ts +0 -10
- package/lib/typescript/entity/entity-cluster.d.ts +0 -12
- package/lib/typescript/pin/index.d.ts +0 -3
- package/lib/typescript/screens/nerd-mode-screen.d.ts +0 -22
- package/lib/typescript/text/typography.d.ts +0 -112
- package/src/accessibility/accessibilityHistory.tsx +0 -77
- package/src/blur/blur-view.tsx +0 -82
- package/src/buttons/back-button.tsx +0 -31
- package/src/buttons/button.tsx +0 -169
- package/src/buttons/connectivity-button.tsx +0 -95
- package/src/credential/card/credential-card.stories.tsx +0 -52
- package/src/credential/card/credential-card.tsx +0 -195
- package/src/credential/card/credential-details-card.stories.tsx +0 -268
- package/src/credential/card/credential-details-card.tsx +0 -242
- package/src/credential/card/credential-header.stories.tsx +0 -50
- package/src/credential/card/credential-header.tsx +0 -195
- package/src/credential/card/credential-image-carousel.tsx +0 -113
- package/src/credential/card/index.ts +0 -11
- package/src/credential/credential-attribute-item.tsx +0 -372
- package/src/credential/selector.tsx +0 -64
- package/src/detail/detail.stories.tsx +0 -65
- package/src/detail/detail.tsx +0 -98
- package/src/entity/avatar.tsx +0 -87
- package/src/entity/entity-cluster.tsx +0 -72
- package/src/header/header.stories.tsx +0 -59
- package/src/header/header.tsx +0 -105
- package/src/header/navigation-header.stories.tsx +0 -56
- package/src/header/navigation-header.tsx +0 -147
- package/src/history/data-item.tsx +0 -79
- package/src/history/history-list-item.tsx +0 -102
- package/src/history/history-section-header.tsx +0 -44
- package/src/icons/entity.tsx +0 -21
- package/src/input/selection-input.tsx +0 -112
- package/src/input/text-input.tsx +0 -253
- package/src/loader/loader.tsx +0 -169
- package/src/nerd-view/nerd-mode-item.tsx +0 -296
- package/src/pin/index.ts +0 -4
- package/src/pin/keypad.tsx +0 -166
- package/src/pin/pin-code-screen.tsx +0 -195
- package/src/screens/backup-screen.tsx +0 -92
- package/src/screens/image-preview-screen.stories.tsx +0 -28
- package/src/screens/image-preview-screen.tsx +0 -82
- package/src/screens/nerd-mode-screen.tsx +0 -150
- package/src/screens/qr-code-scanner-screen.stories.tsx +0 -37
- package/src/screens/qr-code-scanner-screen.tsx +0 -124
- package/src/screens/scroll-view-screen.tsx +0 -91
- package/src/screens/section-list-screen.tsx +0 -61
- package/src/searchbar/search-bar.tsx +0 -94
- package/src/text/typography.stories.tsx +0 -70
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/accessibility.js +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/accessibility.js.map +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/accessibilityHistoryWrappers.js +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/accessibilityHistoryWrappers.js.map +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/accessibilityLanguage.js +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/accessibilityLanguage.js.map +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/index.js +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/index.js.map +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/locale/de.json +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/locale/en.json +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/locale/fr.json +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/locale/index.js +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/locale/index.js.map +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/locale/it.json +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/locale.test.js +0 -0
- /package/lib/commonjs/{accessibility → ui-components/accessibility}/locale.test.js.map +0 -0
- /package/lib/commonjs/{action-modal → ui-components/action-modal}/ActionModal.js +0 -0
- /package/lib/commonjs/{action-modal → ui-components/action-modal}/ActionModal.js.map +0 -0
- /package/lib/commonjs/{action-modal → ui-components/action-modal}/index.js +0 -0
- /package/lib/commonjs/{action-modal → ui-components/action-modal}/index.js.map +0 -0
- /package/lib/commonjs/{activity-indicator → ui-components/activity-indicator}/activity-indicator.js +0 -0
- /package/lib/commonjs/{activity-indicator → ui-components/activity-indicator}/activity-indicator.js.map +0 -0
- /package/lib/commonjs/{activity-indicator → ui-components/activity-indicator}/index.js +0 -0
- /package/lib/commonjs/{activity-indicator → ui-components/activity-indicator}/index.js.map +0 -0
- /package/lib/commonjs/{blur → ui-components/blur}/index.js +0 -0
- /package/lib/commonjs/{blur → ui-components/blur}/index.js.map +0 -0
- /package/lib/commonjs/{buttons → ui-components/buttons}/back-button.js +0 -0
- /package/lib/commonjs/{buttons → ui-components/buttons}/filter-button.js +0 -0
- /package/lib/commonjs/{buttons → ui-components/buttons}/filter-button.js.map +0 -0
- /package/lib/commonjs/{buttons → ui-components/buttons}/ghost-button.js +0 -0
- /package/lib/commonjs/{buttons → ui-components/buttons}/ghost-button.js.map +0 -0
- /package/lib/commonjs/{buttons → ui-components/buttons}/index.js +0 -0
- /package/lib/commonjs/{buttons → ui-components/buttons}/index.js.map +0 -0
- /package/lib/commonjs/{buttons → ui-components/buttons}/scan-button.js +0 -0
- /package/lib/commonjs/{buttons → ui-components/buttons}/scan-button.js.map +0 -0
- /package/lib/commonjs/{camera → ui-components/camera}/camera-overlay.js +0 -0
- /package/lib/commonjs/{camera → ui-components/camera}/camera-overlay.js.map +0 -0
- /package/lib/commonjs/{camera → ui-components/camera}/index.js +0 -0
- /package/lib/commonjs/{camera → ui-components/camera}/index.js.map +0 -0
- /package/lib/commonjs/{camera → ui-components/camera}/qr-code-scanner.js +0 -0
- /package/lib/commonjs/{camera → ui-components/camera}/qr-code-scanner.js.map +0 -0
- /package/lib/commonjs/{control → ui-components/control}/checkbox.js +0 -0
- /package/lib/commonjs/{control → ui-components/control}/checkbox.js.map +0 -0
- /package/lib/commonjs/{control → ui-components/control}/index.js +0 -0
- /package/lib/commonjs/{control → ui-components/control}/index.js.map +0 -0
- /package/lib/commonjs/{control → ui-components/control}/switch.js +0 -0
- /package/lib/commonjs/{control → ui-components/control}/switch.js.map +0 -0
- /package/lib/commonjs/{credential → ui-components/credential}/card/credential-details-list-item.js +0 -0
- /package/lib/commonjs/{credential → ui-components/credential}/card/credential-details-list-item.js.map +0 -0
- /package/lib/commonjs/{credential → ui-components/credential}/credential-carousel-images.js +0 -0
- /package/lib/commonjs/{credential → ui-components/credential}/credential-carousel-images.js.map +0 -0
- /package/lib/commonjs/{credential → ui-components/credential}/index.js +0 -0
- /package/lib/commonjs/{credential → ui-components/credential}/index.js.map +0 -0
- /package/lib/commonjs/{credential → ui-components/credential}/selector-status.js +0 -0
- /package/lib/commonjs/{credential → ui-components/credential}/selector-status.js.map +0 -0
- /package/lib/commonjs/{detail → ui-components/detail}/index.js +0 -0
- /package/lib/commonjs/{detail → ui-components/detail}/index.js.map +0 -0
- /package/lib/commonjs/{entity → ui-components/entity}/index.js +0 -0
- /package/lib/commonjs/{entity → ui-components/entity}/index.js.map +0 -0
- /package/lib/commonjs/{header → ui-components/header}/focus-aware-status-bar.js +0 -0
- /package/lib/commonjs/{header → ui-components/header}/focus-aware-status-bar.js.map +0 -0
- /package/lib/commonjs/{header → ui-components/header}/foldable-header.js +0 -0
- /package/lib/commonjs/{header → ui-components/header}/foldable-header.js.map +0 -0
- /package/lib/commonjs/{header → ui-components/header}/index.js +0 -0
- /package/lib/commonjs/{header → ui-components/header}/index.js.map +0 -0
- /package/lib/commonjs/{history → ui-components/history}/history-section-list-item.js +0 -0
- /package/lib/commonjs/{history → ui-components/history}/history-section-list-item.js.map +0 -0
- /package/lib/commonjs/{history → ui-components/history}/index.js +0 -0
- /package/lib/commonjs/{history → ui-components/history}/index.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/connectivity.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/connectivity.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/credential.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/credential.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/history.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/history.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/icons.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/icons.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/index.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/index.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/input.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/input.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/keypad.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/keypad.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/loader.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/loader.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/nerd-view.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/nerd-view.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/selector.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/selector.js.map +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/wallet.js +0 -0
- /package/lib/commonjs/{icons → ui-components/icons}/wallet.js.map +0 -0
- /package/lib/commonjs/{image → ui-components/image}/image-or-component.js +0 -0
- /package/lib/commonjs/{image → ui-components/image}/image-or-component.js.map +0 -0
- /package/lib/commonjs/{image → ui-components/image}/index.js +0 -0
- /package/lib/commonjs/{image → ui-components/image}/index.js.map +0 -0
- /package/lib/commonjs/{input → ui-components/input}/index.js +0 -0
- /package/lib/commonjs/{input → ui-components/input}/index.js.map +0 -0
- /package/lib/commonjs/{input → ui-components/input}/radio-group.js +0 -0
- /package/lib/commonjs/{input → ui-components/input}/radio-group.js.map +0 -0
- /package/lib/commonjs/{list → ui-components/list}/index.js +0 -0
- /package/lib/commonjs/{list → ui-components/list}/index.js.map +0 -0
- /package/lib/commonjs/{list → ui-components/list}/list-section-header.js +0 -0
- /package/lib/commonjs/{list → ui-components/list}/list-section-header.js.map +0 -0
- /package/lib/commonjs/{list → ui-components/list}/list-title-header.js +0 -0
- /package/lib/commonjs/{list → ui-components/list}/list-title-header.js.map +0 -0
- /package/lib/commonjs/{loader → ui-components/loader}/index.js +0 -0
- /package/lib/commonjs/{loader → ui-components/loader}/index.js.map +0 -0
- /package/lib/commonjs/{loader → ui-components/loader}/loading-result.js +0 -0
- /package/lib/commonjs/{loader → ui-components/loader}/loading-result.js.map +0 -0
- /package/lib/commonjs/{nerd-view → ui-components/nerd-view}/index.js +0 -0
- /package/lib/commonjs/{nerd-view → ui-components/nerd-view}/index.js.map +0 -0
- /package/lib/commonjs/{pin → ui-components/pin}/pins.js +0 -0
- /package/lib/commonjs/{pin → ui-components/pin}/pins.js.map +0 -0
- /package/lib/commonjs/{screens → ui-components/screens}/index.js +0 -0
- /package/lib/commonjs/{screens → ui-components/screens}/index.js.map +0 -0
- /package/lib/commonjs/{searchbar → ui-components/searchbar}/animated-search-bar.js +0 -0
- /package/lib/commonjs/{searchbar → ui-components/searchbar}/animated-search-bar.js.map +0 -0
- /package/lib/commonjs/{searchbar → ui-components/searchbar}/index.js +0 -0
- /package/lib/commonjs/{searchbar → ui-components/searchbar}/index.js.map +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/button-setting.js +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/button-setting.js.map +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/index.js +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/index.js.map +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/setting-item-separator.js +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/setting-item-separator.js.map +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/setting-item.js +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/setting-item.js.map +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/settings-button.js +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/settings-button.js.map +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/switch-setting.js +0 -0
- /package/lib/commonjs/{settings → ui-components/settings}/switch-setting.js.map +0 -0
- /package/lib/commonjs/{state → ui-components/state}/error-screen.js +0 -0
- /package/lib/commonjs/{state → ui-components/state}/error-screen.js.map +0 -0
- /package/lib/commonjs/{state → ui-components/state}/index.js +0 -0
- /package/lib/commonjs/{state → ui-components/state}/index.js.map +0 -0
- /package/lib/commonjs/{text → ui-components/text}/base.js +0 -0
- /package/lib/commonjs/{text → ui-components/text}/base.js.map +0 -0
- /package/lib/commonjs/{text → ui-components/text}/font.js +0 -0
- /package/lib/commonjs/{text → ui-components/text}/font.js.map +0 -0
- /package/lib/commonjs/{text → ui-components/text}/index.js +0 -0
- /package/lib/commonjs/{text → ui-components/text}/index.js.map +0 -0
- /package/lib/commonjs/{text → ui-components/text}/typography.js +0 -0
- /package/lib/commonjs/{text → ui-components/text}/typography.js.map +0 -0
- /package/lib/commonjs/{theme → ui-components/theme}/color-scheme-context.js +0 -0
- /package/lib/commonjs/{theme → ui-components/theme}/color-scheme-context.js.map +0 -0
- /package/lib/commonjs/{theme → ui-components/theme}/color-scheme.js +0 -0
- /package/lib/commonjs/{theme → ui-components/theme}/color-scheme.js.map +0 -0
- /package/lib/commonjs/{theme → ui-components/theme}/index.js +0 -0
- /package/lib/commonjs/{theme → ui-components/theme}/index.js.map +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/accessibility.js +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/accessibility.js.map +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/accessibilityHistoryWrappers.js +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/accessibilityHistoryWrappers.js.map +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/accessibilityLanguage.js +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/accessibilityLanguage.js.map +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/index.js +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/index.js.map +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/locale/de.json +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/locale/en.json +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/locale/fr.json +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/locale/index.js +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/locale/index.js.map +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/locale/it.json +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/locale.test.js +0 -0
- /package/lib/module/{accessibility → ui-components/accessibility}/locale.test.js.map +0 -0
- /package/lib/module/{action-modal → ui-components/action-modal}/ActionModal.js +0 -0
- /package/lib/module/{action-modal → ui-components/action-modal}/ActionModal.js.map +0 -0
- /package/lib/module/{action-modal → ui-components/action-modal}/index.js +0 -0
- /package/lib/module/{action-modal → ui-components/action-modal}/index.js.map +0 -0
- /package/lib/module/{activity-indicator → ui-components/activity-indicator}/activity-indicator.js +0 -0
- /package/lib/module/{activity-indicator → ui-components/activity-indicator}/activity-indicator.js.map +0 -0
- /package/lib/module/{activity-indicator → ui-components/activity-indicator}/index.js +0 -0
- /package/lib/module/{activity-indicator → ui-components/activity-indicator}/index.js.map +0 -0
- /package/lib/module/{blur → ui-components/blur}/index.js +0 -0
- /package/lib/module/{blur → ui-components/blur}/index.js.map +0 -0
- /package/lib/module/{buttons → ui-components/buttons}/back-button.js +0 -0
- /package/lib/module/{buttons → ui-components/buttons}/filter-button.js +0 -0
- /package/lib/module/{buttons → ui-components/buttons}/filter-button.js.map +0 -0
- /package/lib/module/{buttons → ui-components/buttons}/ghost-button.js +0 -0
- /package/lib/module/{buttons → ui-components/buttons}/ghost-button.js.map +0 -0
- /package/lib/module/{buttons → ui-components/buttons}/index.js +0 -0
- /package/lib/module/{buttons → ui-components/buttons}/index.js.map +0 -0
- /package/lib/module/{buttons → ui-components/buttons}/scan-button.js +0 -0
- /package/lib/module/{buttons → ui-components/buttons}/scan-button.js.map +0 -0
- /package/lib/module/{camera → ui-components/camera}/camera-overlay.js +0 -0
- /package/lib/module/{camera → ui-components/camera}/camera-overlay.js.map +0 -0
- /package/lib/module/{camera → ui-components/camera}/index.js +0 -0
- /package/lib/module/{camera → ui-components/camera}/index.js.map +0 -0
- /package/lib/module/{camera → ui-components/camera}/qr-code-scanner.js +0 -0
- /package/lib/module/{camera → ui-components/camera}/qr-code-scanner.js.map +0 -0
- /package/lib/module/{control → ui-components/control}/checkbox.js +0 -0
- /package/lib/module/{control → ui-components/control}/checkbox.js.map +0 -0
- /package/lib/module/{control → ui-components/control}/index.js +0 -0
- /package/lib/module/{control → ui-components/control}/index.js.map +0 -0
- /package/lib/module/{control → ui-components/control}/switch.js +0 -0
- /package/lib/module/{control → ui-components/control}/switch.js.map +0 -0
- /package/lib/module/{credential → ui-components/credential}/card/credential-details-list-item.js +0 -0
- /package/lib/module/{credential → ui-components/credential}/card/credential-details-list-item.js.map +0 -0
- /package/lib/module/{credential → ui-components/credential}/credential-carousel-images.js +0 -0
- /package/lib/module/{credential → ui-components/credential}/credential-carousel-images.js.map +0 -0
- /package/lib/module/{credential → ui-components/credential}/index.js +0 -0
- /package/lib/module/{credential → ui-components/credential}/index.js.map +0 -0
- /package/lib/module/{credential → ui-components/credential}/selector-status.js +0 -0
- /package/lib/module/{credential → ui-components/credential}/selector-status.js.map +0 -0
- /package/lib/module/{detail → ui-components/detail}/index.js +0 -0
- /package/lib/module/{detail → ui-components/detail}/index.js.map +0 -0
- /package/lib/module/{entity → ui-components/entity}/index.js +0 -0
- /package/lib/module/{entity → ui-components/entity}/index.js.map +0 -0
- /package/lib/module/{header → ui-components/header}/focus-aware-status-bar.js +0 -0
- /package/lib/module/{header → ui-components/header}/focus-aware-status-bar.js.map +0 -0
- /package/lib/module/{header → ui-components/header}/foldable-header.js +0 -0
- /package/lib/module/{header → ui-components/header}/foldable-header.js.map +0 -0
- /package/lib/module/{header → ui-components/header}/index.js +0 -0
- /package/lib/module/{header → ui-components/header}/index.js.map +0 -0
- /package/lib/module/{history → ui-components/history}/history-section-list-item.js +0 -0
- /package/lib/module/{history → ui-components/history}/history-section-list-item.js.map +0 -0
- /package/lib/module/{history → ui-components/history}/index.js +0 -0
- /package/lib/module/{history → ui-components/history}/index.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/connectivity.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/connectivity.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/credential.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/credential.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/history.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/history.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/icons.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/icons.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/index.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/index.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/input.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/input.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/keypad.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/keypad.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/loader.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/loader.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/nerd-view.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/nerd-view.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/selector.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/selector.js.map +0 -0
- /package/lib/module/{icons → ui-components/icons}/wallet.js +0 -0
- /package/lib/module/{icons → ui-components/icons}/wallet.js.map +0 -0
- /package/lib/module/{image → ui-components/image}/image-or-component.js +0 -0
- /package/lib/module/{image → ui-components/image}/image-or-component.js.map +0 -0
- /package/lib/module/{image → ui-components/image}/index.js +0 -0
- /package/lib/module/{image → ui-components/image}/index.js.map +0 -0
- /package/lib/module/{input → ui-components/input}/index.js +0 -0
- /package/lib/module/{input → ui-components/input}/index.js.map +0 -0
- /package/lib/module/{input → ui-components/input}/radio-group.js +0 -0
- /package/lib/module/{input → ui-components/input}/radio-group.js.map +0 -0
- /package/lib/module/{list → ui-components/list}/index.js +0 -0
- /package/lib/module/{list → ui-components/list}/index.js.map +0 -0
- /package/lib/module/{list → ui-components/list}/list-section-header.js +0 -0
- /package/lib/module/{list → ui-components/list}/list-section-header.js.map +0 -0
- /package/lib/module/{list → ui-components/list}/list-title-header.js +0 -0
- /package/lib/module/{list → ui-components/list}/list-title-header.js.map +0 -0
- /package/lib/module/{loader → ui-components/loader}/index.js +0 -0
- /package/lib/module/{loader → ui-components/loader}/index.js.map +0 -0
- /package/lib/module/{loader → ui-components/loader}/loading-result.js +0 -0
- /package/lib/module/{loader → ui-components/loader}/loading-result.js.map +0 -0
- /package/lib/module/{nerd-view → ui-components/nerd-view}/index.js +0 -0
- /package/lib/module/{nerd-view → ui-components/nerd-view}/index.js.map +0 -0
- /package/lib/module/{pin → ui-components/pin}/pins.js +0 -0
- /package/lib/module/{pin → ui-components/pin}/pins.js.map +0 -0
- /package/lib/module/{screens → ui-components/screens}/index.js +0 -0
- /package/lib/module/{screens → ui-components/screens}/index.js.map +0 -0
- /package/lib/module/{searchbar → ui-components/searchbar}/animated-search-bar.js +0 -0
- /package/lib/module/{searchbar → ui-components/searchbar}/animated-search-bar.js.map +0 -0
- /package/lib/module/{searchbar → ui-components/searchbar}/index.js +0 -0
- /package/lib/module/{searchbar → ui-components/searchbar}/index.js.map +0 -0
- /package/lib/module/{settings → ui-components/settings}/button-setting.js +0 -0
- /package/lib/module/{settings → ui-components/settings}/button-setting.js.map +0 -0
- /package/lib/module/{settings → ui-components/settings}/index.js +0 -0
- /package/lib/module/{settings → ui-components/settings}/index.js.map +0 -0
- /package/lib/module/{settings → ui-components/settings}/setting-item-separator.js +0 -0
- /package/lib/module/{settings → ui-components/settings}/setting-item-separator.js.map +0 -0
- /package/lib/module/{settings → ui-components/settings}/setting-item.js +0 -0
- /package/lib/module/{settings → ui-components/settings}/setting-item.js.map +0 -0
- /package/lib/module/{settings → ui-components/settings}/settings-button.js +0 -0
- /package/lib/module/{settings → ui-components/settings}/settings-button.js.map +0 -0
- /package/lib/module/{settings → ui-components/settings}/switch-setting.js +0 -0
- /package/lib/module/{settings → ui-components/settings}/switch-setting.js.map +0 -0
- /package/lib/module/{state → ui-components/state}/error-screen.js +0 -0
- /package/lib/module/{state → ui-components/state}/error-screen.js.map +0 -0
- /package/lib/module/{state → ui-components/state}/index.js +0 -0
- /package/lib/module/{state → ui-components/state}/index.js.map +0 -0
- /package/lib/module/{text → ui-components/text}/base.js +0 -0
- /package/lib/module/{text → ui-components/text}/base.js.map +0 -0
- /package/lib/module/{text → ui-components/text}/font.js +0 -0
- /package/lib/module/{text → ui-components/text}/font.js.map +0 -0
- /package/lib/module/{text → ui-components/text}/index.js +0 -0
- /package/lib/module/{text → ui-components/text}/index.js.map +0 -0
- /package/lib/module/{text → ui-components/text}/typography.js +0 -0
- /package/lib/module/{text → ui-components/text}/typography.js.map +0 -0
- /package/lib/module/{theme → ui-components/theme}/color-scheme-context.js +0 -0
- /package/lib/module/{theme → ui-components/theme}/color-scheme-context.js.map +0 -0
- /package/lib/module/{theme → ui-components/theme}/color-scheme.js +0 -0
- /package/lib/module/{theme → ui-components/theme}/color-scheme.js.map +0 -0
- /package/lib/module/{theme → ui-components/theme}/index.js +0 -0
- /package/lib/module/{theme → ui-components/theme}/index.js.map +0 -0
- /package/lib/typescript/{accessibility → ui-components/accessibility}/accessibility.d.ts +0 -0
- /package/lib/typescript/{accessibility → ui-components/accessibility}/accessibilityHistoryWrappers.d.ts +0 -0
- /package/lib/typescript/{accessibility → ui-components/accessibility}/accessibilityLanguage.d.ts +0 -0
- /package/lib/typescript/{accessibility → ui-components/accessibility}/index.d.ts +0 -0
- /package/lib/typescript/{accessibility → ui-components/accessibility}/locale/index.d.ts +0 -0
- /package/lib/typescript/{accessibility → ui-components/accessibility}/locale.test.d.ts +0 -0
- /package/lib/typescript/{action-modal → ui-components/action-modal}/ActionModal.d.ts +0 -0
- /package/lib/typescript/{action-modal → ui-components/action-modal}/index.d.ts +0 -0
- /package/lib/typescript/{activity-indicator → ui-components/activity-indicator}/activity-indicator.d.ts +0 -0
- /package/lib/typescript/{activity-indicator → ui-components/activity-indicator}/index.d.ts +0 -0
- /package/lib/typescript/{blur → ui-components/blur}/blur-view.d.ts +0 -0
- /package/lib/typescript/{blur → ui-components/blur}/index.d.ts +0 -0
- /package/lib/typescript/{buttons → ui-components/buttons}/button.d.ts +0 -0
- /package/lib/typescript/{buttons → ui-components/buttons}/connectivity-button.d.ts +0 -0
- /package/lib/typescript/{buttons → ui-components/buttons}/filter-button.d.ts +0 -0
- /package/lib/typescript/{buttons → ui-components/buttons}/ghost-button.d.ts +0 -0
- /package/lib/typescript/{buttons → ui-components/buttons}/index.d.ts +0 -0
- /package/lib/typescript/{buttons → ui-components/buttons}/scan-button.d.ts +0 -0
- /package/lib/typescript/{camera → ui-components/camera}/camera-overlay.d.ts +0 -0
- /package/lib/typescript/{camera → ui-components/camera}/index.d.ts +0 -0
- /package/lib/typescript/{camera → ui-components/camera}/qr-code-scanner.d.ts +0 -0
- /package/lib/typescript/{control → ui-components/control}/checkbox.d.ts +0 -0
- /package/lib/typescript/{control → ui-components/control}/index.d.ts +0 -0
- /package/lib/typescript/{control → ui-components/control}/switch.d.ts +0 -0
- /package/lib/typescript/{credential → ui-components/credential}/card/credential-details-card.d.ts +0 -0
- /package/lib/typescript/{credential → ui-components/credential}/card/credential-details-list-item.d.ts +0 -0
- /package/lib/typescript/{credential → ui-components/credential}/card/credential-header.d.ts +0 -0
- /package/lib/typescript/{credential → ui-components/credential}/card/credential-image-carousel.d.ts +0 -0
- /package/lib/typescript/{credential → ui-components/credential}/credential-carousel-images.d.ts +0 -0
- /package/lib/typescript/{credential → ui-components/credential}/index.d.ts +0 -0
- /package/lib/typescript/{credential → ui-components/credential}/selector-status.d.ts +0 -0
- /package/lib/typescript/{credential → ui-components/credential}/selector.d.ts +0 -0
- /package/lib/typescript/{detail → ui-components/detail}/detail.d.ts +0 -0
- /package/lib/typescript/{detail → ui-components/detail}/index.d.ts +0 -0
- /package/lib/typescript/{entity → ui-components/entity}/index.d.ts +0 -0
- /package/lib/typescript/{header → ui-components/header}/focus-aware-status-bar.d.ts +0 -0
- /package/lib/typescript/{header → ui-components/header}/foldable-header.d.ts +0 -0
- /package/lib/typescript/{header → ui-components/header}/header.d.ts +0 -0
- /package/lib/typescript/{header → ui-components/header}/index.d.ts +0 -0
- /package/lib/typescript/{header → ui-components/header}/navigation-header.d.ts +0 -0
- /package/lib/typescript/{history → ui-components/history}/data-item.d.ts +0 -0
- /package/lib/typescript/{history → ui-components/history}/history-list-item.d.ts +0 -0
- /package/lib/typescript/{history → ui-components/history}/history-section-header.d.ts +0 -0
- /package/lib/typescript/{history → ui-components/history}/history-section-list-item.d.ts +0 -0
- /package/lib/typescript/{history → ui-components/history}/index.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/connectivity.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/credential.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/entity.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/history.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/icons.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/index.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/input.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/keypad.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/loader.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/nerd-view.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/selector.d.ts +0 -0
- /package/lib/typescript/{icons → ui-components/icons}/wallet.d.ts +0 -0
- /package/lib/typescript/{image → ui-components/image}/image-or-component.d.ts +0 -0
- /package/lib/typescript/{image → ui-components/image}/index.d.ts +0 -0
- /package/lib/typescript/{input → ui-components/input}/index.d.ts +0 -0
- /package/lib/typescript/{input → ui-components/input}/radio-group.d.ts +0 -0
- /package/lib/typescript/{input → ui-components/input}/selection-input.d.ts +0 -0
- /package/lib/typescript/{input → ui-components/input}/text-input.d.ts +0 -0
- /package/lib/typescript/{list → ui-components/list}/index.d.ts +0 -0
- /package/lib/typescript/{list → ui-components/list}/list-section-header.d.ts +0 -0
- /package/lib/typescript/{list → ui-components/list}/list-title-header.d.ts +0 -0
- /package/lib/typescript/{loader → ui-components/loader}/index.d.ts +0 -0
- /package/lib/typescript/{loader → ui-components/loader}/loader.d.ts +0 -0
- /package/lib/typescript/{loader → ui-components/loader}/loading-result.d.ts +0 -0
- /package/lib/typescript/{nerd-view → ui-components/nerd-view}/index.d.ts +0 -0
- /package/lib/typescript/{nerd-view → ui-components/nerd-view}/nerd-mode-item.d.ts +0 -0
- /package/lib/typescript/{pin → ui-components/pin}/keypad.d.ts +0 -0
- /package/lib/typescript/{pin → ui-components/pin}/pin-code-screen.d.ts +0 -0
- /package/lib/typescript/{pin → ui-components/pin}/pins.d.ts +0 -0
- /package/lib/typescript/{screens → ui-components/screens}/backup-screen.d.ts +0 -0
- /package/lib/typescript/{screens → ui-components/screens}/image-preview-screen.d.ts +0 -0
- /package/lib/typescript/{screens → ui-components/screens}/index.d.ts +0 -0
- /package/lib/typescript/{screens → ui-components/screens}/qr-code-scanner-screen.d.ts +0 -0
- /package/lib/typescript/{screens → ui-components/screens}/scroll-view-screen.d.ts +0 -0
- /package/lib/typescript/{screens → ui-components/screens}/section-list-screen.d.ts +0 -0
- /package/lib/typescript/{searchbar → ui-components/searchbar}/animated-search-bar.d.ts +0 -0
- /package/lib/typescript/{searchbar → ui-components/searchbar}/index.d.ts +0 -0
- /package/lib/typescript/{searchbar → ui-components/searchbar}/search-bar.d.ts +0 -0
- /package/lib/typescript/{settings → ui-components/settings}/button-setting.d.ts +0 -0
- /package/lib/typescript/{settings → ui-components/settings}/index.d.ts +0 -0
- /package/lib/typescript/{settings → ui-components/settings}/setting-item-separator.d.ts +0 -0
- /package/lib/typescript/{settings → ui-components/settings}/setting-item.d.ts +0 -0
- /package/lib/typescript/{settings → ui-components/settings}/settings-button.d.ts +0 -0
- /package/lib/typescript/{settings → ui-components/settings}/switch-setting.d.ts +0 -0
- /package/lib/typescript/{state → ui-components/state}/error-screen.d.ts +0 -0
- /package/lib/typescript/{state → ui-components/state}/index.d.ts +0 -0
- /package/lib/typescript/{text → ui-components/text}/base.d.ts +0 -0
- /package/lib/typescript/{text → ui-components/text}/font.d.ts +0 -0
- /package/lib/typescript/{text → ui-components/text}/index.d.ts +0 -0
- /package/lib/typescript/{theme → ui-components/theme}/color-scheme-context.d.ts +0 -0
- /package/lib/typescript/{theme → ui-components/theme}/color-scheme.d.ts +0 -0
- /package/lib/typescript/{theme → ui-components/theme}/index.d.ts +0 -0
- /package/src/{accessibility → ui-components/accessibility}/accessibility.ts +0 -0
- /package/src/{accessibility → ui-components/accessibility}/accessibilityHistoryWrappers.tsx +0 -0
- /package/src/{accessibility → ui-components/accessibility}/accessibilityLanguage.tsx +0 -0
- /package/src/{accessibility → ui-components/accessibility}/index.ts +0 -0
- /package/src/{accessibility → ui-components/accessibility}/locale/de.json +0 -0
- /package/src/{accessibility → ui-components/accessibility}/locale/en.json +0 -0
- /package/src/{accessibility → ui-components/accessibility}/locale/fr.json +0 -0
- /package/src/{accessibility → ui-components/accessibility}/locale/index.ts +0 -0
- /package/src/{accessibility → ui-components/accessibility}/locale/it.json +0 -0
- /package/src/{accessibility → ui-components/accessibility}/locale.test.ts +0 -0
- /package/src/{action-modal → ui-components/action-modal}/ActionModal.stories.tsx +0 -0
- /package/src/{action-modal → ui-components/action-modal}/ActionModal.tsx +0 -0
- /package/src/{action-modal → ui-components/action-modal}/index.ts +0 -0
- /package/src/{activity-indicator → ui-components/activity-indicator}/activity-indicator.stories.tsx +0 -0
- /package/src/{activity-indicator → ui-components/activity-indicator}/activity-indicator.tsx +0 -0
- /package/src/{activity-indicator → ui-components/activity-indicator}/index.ts +0 -0
- /package/src/{blur → ui-components/blur}/index.ts +0 -0
- /package/src/{buttons → ui-components/buttons}/back-button.stories.tsx +0 -0
- /package/src/{buttons → ui-components/buttons}/button.stories.tsx +0 -0
- /package/src/{buttons → ui-components/buttons}/connectivity-button.stories.tsx +0 -0
- /package/src/{buttons → ui-components/buttons}/filter-button.tsx +0 -0
- /package/src/{buttons → ui-components/buttons}/ghost-button.stories.tsx +0 -0
- /package/src/{buttons → ui-components/buttons}/ghost-button.tsx +0 -0
- /package/src/{buttons → ui-components/buttons}/index.ts +0 -0
- /package/src/{buttons → ui-components/buttons}/scan-button.stories.tsx +0 -0
- /package/src/{buttons → ui-components/buttons}/scan-button.tsx +0 -0
- /package/src/{camera → ui-components/camera}/camera-overlay.tsx +0 -0
- /package/src/{camera → ui-components/camera}/index.tsx +0 -0
- /package/src/{camera → ui-components/camera}/qr-code-scanner.tsx +0 -0
- /package/src/{control → ui-components/control}/checkbox.stories.tsx +0 -0
- /package/src/{control → ui-components/control}/checkbox.tsx +0 -0
- /package/src/{control → ui-components/control}/index.ts +0 -0
- /package/src/{control → ui-components/control}/switch.stories.tsx +0 -0
- /package/src/{control → ui-components/control}/switch.tsx +0 -0
- /package/src/{credential → ui-components/credential}/card/credential-details-list-item.tsx +0 -0
- /package/src/{credential → ui-components/credential}/credential-carousel-images.tsx +0 -0
- /package/src/{credential → ui-components/credential}/index.ts +0 -0
- /package/src/{credential → ui-components/credential}/selector-status.ts +0 -0
- /package/src/{credential → ui-components/credential}/selector.stories.tsx +0 -0
- /package/src/{detail → ui-components/detail}/index.tsx +0 -0
- /package/src/{entity → ui-components/entity}/avatar.stories.tsx +0 -0
- /package/src/{entity → ui-components/entity}/entity-cluster.stories.tsx +0 -0
- /package/src/{entity → ui-components/entity}/index.ts +0 -0
- /package/src/{header → ui-components/header}/focus-aware-status-bar.tsx +0 -0
- /package/src/{header → ui-components/header}/foldable-header.tsx +0 -0
- /package/src/{header → ui-components/header}/index.ts +0 -0
- /package/src/{history → ui-components/history}/history-section-list-item.tsx +0 -0
- /package/src/{history → ui-components/history}/index.ts +0 -0
- /package/src/{icons → ui-components/icons}/connectivity.tsx +0 -0
- /package/src/{icons → ui-components/icons}/credential.tsx +0 -0
- /package/src/{icons → ui-components/icons}/history.tsx +0 -0
- /package/src/{icons → ui-components/icons}/icons.tsx +0 -0
- /package/src/{icons → ui-components/icons}/index.ts +0 -0
- /package/src/{icons → ui-components/icons}/input.tsx +0 -0
- /package/src/{icons → ui-components/icons}/keypad.tsx +0 -0
- /package/src/{icons → ui-components/icons}/loader.tsx +0 -0
- /package/src/{icons → ui-components/icons}/nerd-view.tsx +0 -0
- /package/src/{icons → ui-components/icons}/selector.tsx +0 -0
- /package/src/{icons → ui-components/icons}/wallet.tsx +0 -0
- /package/src/{image → ui-components/image}/image-or-component.tsx +0 -0
- /package/src/{image → ui-components/image}/index.tsx +0 -0
- /package/src/{input → ui-components/input}/index.ts +0 -0
- /package/src/{input → ui-components/input}/radio-group.tsx +0 -0
- /package/src/{input → ui-components/input}/selection-input.stories.tsx +0 -0
- /package/src/{list → ui-components/list}/index.ts +0 -0
- /package/src/{list → ui-components/list}/list-section-header.tsx +0 -0
- /package/src/{list → ui-components/list}/list-title-header.tsx +0 -0
- /package/src/{loader → ui-components/loader}/index.ts +0 -0
- /package/src/{loader → ui-components/loader}/loader.stories.tsx +0 -0
- /package/src/{loader → ui-components/loader}/loading-result.stories.tsx +0 -0
- /package/src/{loader → ui-components/loader}/loading-result.tsx +0 -0
- /package/src/{nerd-view → ui-components/nerd-view}/index.ts +0 -0
- /package/src/{pin → ui-components/pin}/pin-code-screen.stories.tsx +0 -0
- /package/src/{pin → ui-components/pin}/pins.tsx +0 -0
- /package/src/{screens → ui-components/screens}/index.ts +0 -0
- /package/src/{searchbar → ui-components/searchbar}/animated-search-bar.tsx +0 -0
- /package/src/{searchbar → ui-components/searchbar}/index.ts +0 -0
- /package/src/{searchbar → ui-components/searchbar}/search-bar.stories.tsx +0 -0
- /package/src/{settings → ui-components/settings}/button-setting.tsx +0 -0
- /package/src/{settings → ui-components/settings}/index.ts +0 -0
- /package/src/{settings → ui-components/settings}/setting-item-separator.tsx +0 -0
- /package/src/{settings → ui-components/settings}/setting-item.tsx +0 -0
- /package/src/{settings → ui-components/settings}/settings-button.tsx +0 -0
- /package/src/{settings → ui-components/settings}/switch-setting.tsx +0 -0
- /package/src/{state → ui-components/state}/error-screen.stories.tsx +0 -0
- /package/src/{state → ui-components/state}/error-screen.tsx +0 -0
- /package/src/{state → ui-components/state}/index.ts +0 -0
- /package/src/{text → ui-components/text}/base.tsx +0 -0
- /package/src/{text → ui-components/text}/font.ts +0 -0
- /package/src/{text → ui-components/text}/index.ts +0 -0
- /package/src/{text → ui-components/text}/typography.tsx +0 -0
- /package/src/{theme → ui-components/theme}/color-scheme-context.tsx +0 -0
- /package/src/{theme → ui-components/theme}/color-scheme.ts +0 -0
- /package/src/{theme → ui-components/theme}/index.ts +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
2
|
+
import { Linking } from 'react-native';
|
|
3
|
+
import { reportException, reportTraceInfo } from '../../reporting';
|
|
4
|
+
export const useRuntimeDeepLinkHandling = (enabled, handleInvitationUrl) => {
|
|
5
|
+
const [deepLinkURL, setDeepLinkURL] = useState();
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const subscription = Linking.addEventListener('url', _ref => {
|
|
8
|
+
let {
|
|
9
|
+
url
|
|
10
|
+
} = _ref;
|
|
11
|
+
reportTraceInfo('Connection', 'Runtime deep link');
|
|
12
|
+
setDeepLinkURL(url);
|
|
13
|
+
});
|
|
14
|
+
return () => subscription.remove();
|
|
15
|
+
}, []);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (!enabled || !deepLinkURL) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
setDeepLinkURL(undefined);
|
|
21
|
+
handleInvitationUrl(deepLinkURL);
|
|
22
|
+
}, [deepLinkURL, enabled, handleInvitationUrl]);
|
|
23
|
+
};
|
|
24
|
+
let initialDeepLinkHandled = false;
|
|
25
|
+
export const useInitialDeepLinkHandling = handleInvitationUrl => {
|
|
26
|
+
return useCallback(() => {
|
|
27
|
+
if (!initialDeepLinkHandled) {
|
|
28
|
+
Linking.getInitialURL().then(url => {
|
|
29
|
+
initialDeepLinkHandled = true;
|
|
30
|
+
if (url) {
|
|
31
|
+
reportTraceInfo('Connection', 'Initial deep link');
|
|
32
|
+
handleInvitationUrl(url);
|
|
33
|
+
}
|
|
34
|
+
}).catch(e => reportException(e, 'Failed to get initial deep link'));
|
|
35
|
+
}
|
|
36
|
+
}, [handleInvitationUrl]);
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=deep-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useState","Linking","reportException","reportTraceInfo","useRuntimeDeepLinkHandling","enabled","handleInvitationUrl","deepLinkURL","setDeepLinkURL","subscription","addEventListener","_ref","url","remove","undefined","initialDeepLinkHandled","useInitialDeepLinkHandling","getInitialURL","then","catch","e"],"sources":["deep-link.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\nimport { Linking } from 'react-native';\n\nimport { reportException, reportTraceInfo } from '../../reporting';\n\nexport const useRuntimeDeepLinkHandling = (enabled: boolean, handleInvitationUrl: (invitationUrl: string) => void) => {\n const [deepLinkURL, setDeepLinkURL] = useState<string>();\n useEffect(() => {\n const subscription = Linking.addEventListener('url', ({ url }) => {\n reportTraceInfo('Connection', 'Runtime deep link');\n setDeepLinkURL(url);\n });\n return () => subscription.remove();\n }, []);\n\n useEffect(() => {\n if (!enabled || !deepLinkURL) {\n return;\n }\n setDeepLinkURL(undefined);\n handleInvitationUrl(deepLinkURL);\n }, [deepLinkURL, enabled, handleInvitationUrl]);\n};\n\nlet initialDeepLinkHandled = false;\nexport const useInitialDeepLinkHandling = (handleInvitationUrl: (invitationUrl: string) => void) => {\n return useCallback(() => {\n if (!initialDeepLinkHandled) {\n Linking.getInitialURL()\n .then((url) => {\n initialDeepLinkHandled = true;\n if (url) {\n reportTraceInfo('Connection', 'Initial deep link');\n handleInvitationUrl(url);\n }\n })\n .catch((e) => reportException(e, 'Failed to get initial deep link'));\n }\n }, [handleInvitationUrl]);\n};\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACxD,SAASC,OAAO,QAAQ,cAAc;AAEtC,SAASC,eAAe,EAAEC,eAAe,QAAQ,iBAAiB;AAElE,OAAO,MAAMC,0BAA0B,GAAGA,CAACC,OAAgB,EAAEC,mBAAoD,KAAK;EACpH,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGR,QAAQ,EAAU;EACxDD,SAAS,CAAC,MAAM;IACd,MAAMU,YAAY,GAAGR,OAAO,CAACS,gBAAgB,CAAC,KAAK,EAAEC,IAAA,IAAa;MAAA,IAAZ;QAAEC;MAAI,CAAC,GAAAD,IAAA;MAC3DR,eAAe,CAAC,YAAY,EAAE,mBAAmB,CAAC;MAClDK,cAAc,CAACI,GAAG,CAAC;IACrB,CAAC,CAAC;IACF,OAAO,MAAMH,YAAY,CAACI,MAAM,EAAE;EACpC,CAAC,EAAE,EAAE,CAAC;EAENd,SAAS,CAAC,MAAM;IACd,IAAI,CAACM,OAAO,IAAI,CAACE,WAAW,EAAE;MAC5B;IACF;IACAC,cAAc,CAACM,SAAS,CAAC;IACzBR,mBAAmB,CAACC,WAAW,CAAC;EAClC,CAAC,EAAE,CAACA,WAAW,EAAEF,OAAO,EAAEC,mBAAmB,CAAC,CAAC;AACjD,CAAC;AAED,IAAIS,sBAAsB,GAAG,KAAK;AAClC,OAAO,MAAMC,0BAA0B,GAAIV,mBAAoD,IAAK;EAClG,OAAOR,WAAW,CAAC,MAAM;IACvB,IAAI,CAACiB,sBAAsB,EAAE;MAC3Bd,OAAO,CAACgB,aAAa,EAAE,CACpBC,IAAI,CAAEN,GAAG,IAAK;QACbG,sBAAsB,GAAG,IAAI;QAC7B,IAAIH,GAAG,EAAE;UACPT,eAAe,CAAC,YAAY,EAAE,mBAAmB,CAAC;UAClDG,mBAAmB,CAACM,GAAG,CAAC;QAC1B;MACF,CAAC,CAAC,CACDO,KAAK,CAAEC,CAAC,IAAKlB,eAAe,CAACkB,CAAC,EAAE,iCAAiC,CAAC,CAAC;IACxE;EACF,CAAC,EAAE,CAACd,mBAAmB,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './before-remove';\nexport * from './close-button-timeout';\nexport * from './deep-link';\nexport * from './open-settings';\n"],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,aAAa;AAC3B,cAAc,iBAAiB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { useCallback } from 'react';
|
|
2
|
+
import { Linking, Platform } from 'react-native';
|
|
3
|
+
import { openSettings } from 'react-native-bluetooth-state-manager';
|
|
4
|
+
export const useOpenSettings = () => {
|
|
5
|
+
const openBleSettings = useCallback(() => {
|
|
6
|
+
if (Platform.OS === 'ios') {
|
|
7
|
+
Linking.openURL('App-prefs:root=Bluetooth').catch(() => {});
|
|
8
|
+
} else {
|
|
9
|
+
Linking.sendIntent('android.settings.BLUETOOTH_SETTINGS').catch(() => {});
|
|
10
|
+
}
|
|
11
|
+
}, []);
|
|
12
|
+
const openMobileNetworkSettings = useCallback(() => {
|
|
13
|
+
if (Platform.OS === 'ios') {
|
|
14
|
+
Linking.openURL('App-prefs:root=MOBILE_DATA_SETTINGS_ID').catch(() => {});
|
|
15
|
+
} else {
|
|
16
|
+
Linking.sendIntent('android.settings.WIRELESS_SETTINGS').catch(() => {});
|
|
17
|
+
}
|
|
18
|
+
}, []);
|
|
19
|
+
const openWiFiSettings = useCallback(() => {
|
|
20
|
+
if (Platform.OS === 'ios') {
|
|
21
|
+
Linking.openURL('App-prefs:root=WIFI').catch(() => {});
|
|
22
|
+
} else {
|
|
23
|
+
Linking.sendIntent('android.settings.WIFI_SETTINGS').catch(() => {});
|
|
24
|
+
}
|
|
25
|
+
}, []);
|
|
26
|
+
const openAppPermissionSettings = useCallback(() => {
|
|
27
|
+
openSettings().catch(() => {});
|
|
28
|
+
}, []);
|
|
29
|
+
return {
|
|
30
|
+
openAppPermissionSettings,
|
|
31
|
+
openBleSettings,
|
|
32
|
+
openMobileNetworkSettings,
|
|
33
|
+
openWiFiSettings
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=open-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","Linking","Platform","openSettings","useOpenSettings","openBleSettings","OS","openURL","catch","sendIntent","openMobileNetworkSettings","openWiFiSettings","openAppPermissionSettings"],"sources":["open-settings.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { Linking, Platform } from 'react-native';\nimport { openSettings } from 'react-native-bluetooth-state-manager';\n\nexport const useOpenSettings = () => {\n const openBleSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=Bluetooth').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.BLUETOOTH_SETTINGS').catch(() => {});\n }\n }, []);\n\n const openMobileNetworkSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=MOBILE_DATA_SETTINGS_ID').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.WIRELESS_SETTINGS').catch(() => {});\n }\n }, []);\n\n const openWiFiSettings = useCallback(() => {\n if (Platform.OS === 'ios') {\n Linking.openURL('App-prefs:root=WIFI').catch(() => {});\n } else {\n Linking.sendIntent('android.settings.WIFI_SETTINGS').catch(() => {});\n }\n }, []);\n\n const openAppPermissionSettings = useCallback(() => {\n openSettings().catch(() => {});\n }, []);\n\n return {\n openAppPermissionSettings,\n openBleSettings,\n openMobileNetworkSettings,\n openWiFiSettings,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAChD,SAASC,YAAY,QAAQ,sCAAsC;AAEnE,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,eAAe,GAAGL,WAAW,CAAC,MAAM;IACxC,IAAIE,QAAQ,CAACI,EAAE,KAAK,KAAK,EAAE;MACzBL,OAAO,CAACM,OAAO,CAAC,0BAA0B,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,CAAC,MAAM;MACLP,OAAO,CAACQ,UAAU,CAAC,qCAAqC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,yBAAyB,GAAGV,WAAW,CAAC,MAAM;IAClD,IAAIE,QAAQ,CAACI,EAAE,KAAK,KAAK,EAAE;MACzBL,OAAO,CAACM,OAAO,CAAC,wCAAwC,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E,CAAC,MAAM;MACLP,OAAO,CAACQ,UAAU,CAAC,oCAAoC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1E;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,gBAAgB,GAAGX,WAAW,CAAC,MAAM;IACzC,IAAIE,QAAQ,CAACI,EAAE,KAAK,KAAK,EAAE;MACzBL,OAAO,CAACM,OAAO,CAAC,qBAAqB,CAAC,CAACC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,CAAC,MAAM;MACLP,OAAO,CAACQ,UAAU,CAAC,gCAAgC,CAAC,CAACD,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMI,yBAAyB,GAAGZ,WAAW,CAAC,MAAM;IAClDG,YAAY,EAAE,CAACK,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;EAChC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACLI,yBAAyB;IACzBP,eAAe;IACfK,yBAAyB;IACzBC;EACF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { getTime } from 'react-native-system-time';
|
|
3
|
+
import { reportException } from '../../reporting';
|
|
4
|
+
const getSecureSystemTime = async () => {
|
|
5
|
+
// converting nanoseconds to seconds
|
|
6
|
+
return Math.floor((await getTime()) / 1000000000);
|
|
7
|
+
};
|
|
8
|
+
export const usePinCodeSecurity = function (failedAttempts, lastAttemptTimestamp, setPinCodeSecurity) {
|
|
9
|
+
let allowedAttempts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 3;
|
|
10
|
+
const [attempts, setAttempts] = useState(failedAttempts);
|
|
11
|
+
const [lastTimestamp, setLastTimestamp] = useState(lastAttemptTimestamp);
|
|
12
|
+
const [isBlocked, setIsBlocked] = useState(failedAttempts >= allowedAttempts && lastAttemptTimestamp !== undefined);
|
|
13
|
+
const [blockRemainingTime, setBlockRemainingTime] = useState(0);
|
|
14
|
+
const timer = useRef();
|
|
15
|
+
const calculateBlockTime = useCallback(() => {
|
|
16
|
+
if (!lastTimestamp) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
// Get seconds since device boot
|
|
20
|
+
getSecureSystemTime().then(currentTime => {
|
|
21
|
+
// Compute how long should the user wait
|
|
22
|
+
const waitingtime = Math.pow(2, attempts - allowedAttempts) * 60;
|
|
23
|
+
|
|
24
|
+
// Get how much time passed since the last attempt
|
|
25
|
+
const timepassed = currentTime - lastTimestamp;
|
|
26
|
+
let blockTime = waitingtime - timepassed;
|
|
27
|
+
if (timepassed < 0) {
|
|
28
|
+
// Device was rebooted since the last attempt
|
|
29
|
+
// Current time goes from zero again
|
|
30
|
+
blockTime = waitingtime - currentTime;
|
|
31
|
+
}
|
|
32
|
+
setIsBlocked(blockTime > 0);
|
|
33
|
+
setBlockRemainingTime(Math.max(0, blockTime));
|
|
34
|
+
if (blockTime <= 0) {
|
|
35
|
+
setPinCodeSecurity(attempts, undefined);
|
|
36
|
+
setLastTimestamp(undefined);
|
|
37
|
+
}
|
|
38
|
+
}).catch(e => {
|
|
39
|
+
reportException(e, 'failed to get secure system time');
|
|
40
|
+
});
|
|
41
|
+
}, [allowedAttempts, attempts, lastTimestamp, setPinCodeSecurity]);
|
|
42
|
+
const addFailedAttempt = useCallback(() => {
|
|
43
|
+
getSecureSystemTime().then(currentTime => {
|
|
44
|
+
const newAttempts = attempts + 1;
|
|
45
|
+
setPinCodeSecurity(newAttempts, currentTime);
|
|
46
|
+
setAttempts(newAttempts);
|
|
47
|
+
setLastTimestamp(currentTime);
|
|
48
|
+
if (newAttempts === allowedAttempts) {
|
|
49
|
+
calculateBlockTime();
|
|
50
|
+
}
|
|
51
|
+
}).catch(e => {
|
|
52
|
+
reportException(e, 'failed to get secure system time');
|
|
53
|
+
});
|
|
54
|
+
}, [allowedAttempts, attempts, calculateBlockTime, setPinCodeSecurity]);
|
|
55
|
+
const resetPinSecurity = useCallback(() => {
|
|
56
|
+
setPinCodeSecurity(0, undefined);
|
|
57
|
+
setLastTimestamp(undefined);
|
|
58
|
+
setAttempts(0);
|
|
59
|
+
}, [setPinCodeSecurity]);
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (isBlocked && timer.current === undefined) {
|
|
62
|
+
timer.current = setInterval(calculateBlockTime, 500);
|
|
63
|
+
} else if (!isBlocked && timer.current !== undefined) {
|
|
64
|
+
clearInterval(timer.current);
|
|
65
|
+
timer.current = undefined;
|
|
66
|
+
}
|
|
67
|
+
}, [isBlocked, calculateBlockTime]);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (attempts >= allowedAttempts && lastAttemptTimestamp && !isBlocked) {
|
|
70
|
+
calculateBlockTime();
|
|
71
|
+
}
|
|
72
|
+
}, [allowedAttempts, attempts, calculateBlockTime, isBlocked, lastAttemptTimestamp]);
|
|
73
|
+
return {
|
|
74
|
+
addFailedAttempt,
|
|
75
|
+
blockRemainingTime,
|
|
76
|
+
isBlocked,
|
|
77
|
+
resetPinSecurity
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=pin-security.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useRef","useState","getTime","reportException","getSecureSystemTime","Math","floor","usePinCodeSecurity","failedAttempts","lastAttemptTimestamp","setPinCodeSecurity","allowedAttempts","arguments","length","undefined","attempts","setAttempts","lastTimestamp","setLastTimestamp","isBlocked","setIsBlocked","blockRemainingTime","setBlockRemainingTime","timer","calculateBlockTime","then","currentTime","waitingtime","pow","timepassed","blockTime","max","catch","e","addFailedAttempt","newAttempts","resetPinSecurity","current","setInterval","clearInterval"],"sources":["pin-security.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react';\nimport { getTime } from 'react-native-system-time';\n\nimport { reportException } from '../../reporting';\n\nconst getSecureSystemTime = async () => {\n // converting nanoseconds to seconds\n return Math.floor((await getTime()) / 1000000000);\n};\n\nexport const usePinCodeSecurity = (\n failedAttempts: number,\n lastAttemptTimestamp: number | undefined,\n setPinCodeSecurity: (failedAttempts: number, lastAttemptTimestamp: number | undefined) => void,\n allowedAttempts = 3,\n) => {\n const [attempts, setAttempts] = useState(failedAttempts);\n const [lastTimestamp, setLastTimestamp] = useState(lastAttemptTimestamp);\n const [isBlocked, setIsBlocked] = useState(failedAttempts >= allowedAttempts && lastAttemptTimestamp !== undefined);\n const [blockRemainingTime, setBlockRemainingTime] = useState(0);\n const timer = useRef<ReturnType<typeof setInterval>>();\n\n const calculateBlockTime = useCallback(() => {\n if (!lastTimestamp) {\n return;\n }\n // Get seconds since device boot\n getSecureSystemTime()\n .then((currentTime) => {\n // Compute how long should the user wait\n const waitingtime = Math.pow(2, attempts - allowedAttempts) * 60;\n\n // Get how much time passed since the last attempt\n const timepassed = currentTime - lastTimestamp;\n\n let blockTime = waitingtime - timepassed;\n\n if (timepassed < 0) {\n // Device was rebooted since the last attempt\n // Current time goes from zero again\n blockTime = waitingtime - currentTime;\n }\n\n setIsBlocked(blockTime > 0);\n setBlockRemainingTime(Math.max(0, blockTime));\n if (blockTime <= 0) {\n setPinCodeSecurity(attempts, undefined);\n setLastTimestamp(undefined);\n }\n })\n .catch((e) => {\n reportException(e, 'failed to get secure system time');\n });\n }, [allowedAttempts, attempts, lastTimestamp, setPinCodeSecurity]);\n\n const addFailedAttempt = useCallback(() => {\n getSecureSystemTime()\n .then((currentTime) => {\n const newAttempts = attempts + 1;\n setPinCodeSecurity(newAttempts, currentTime);\n setAttempts(newAttempts);\n setLastTimestamp(currentTime);\n if (newAttempts === allowedAttempts) {\n calculateBlockTime();\n }\n })\n .catch((e) => {\n reportException(e, 'failed to get secure system time');\n });\n }, [allowedAttempts, attempts, calculateBlockTime, setPinCodeSecurity]);\n\n const resetPinSecurity = useCallback(() => {\n setPinCodeSecurity(0, undefined);\n setLastTimestamp(undefined);\n setAttempts(0);\n }, [setPinCodeSecurity]);\n\n useEffect(() => {\n if (isBlocked && timer.current === undefined) {\n timer.current = setInterval(calculateBlockTime, 500);\n } else if (!isBlocked && timer.current !== undefined) {\n clearInterval(timer.current);\n timer.current = undefined;\n }\n }, [isBlocked, calculateBlockTime]);\n\n useEffect(() => {\n if (attempts >= allowedAttempts && lastAttemptTimestamp && !isBlocked) {\n calculateBlockTime();\n }\n }, [allowedAttempts, attempts, calculateBlockTime, isBlocked, lastAttemptTimestamp]);\n\n return {\n addFailedAttempt,\n blockRemainingTime,\n isBlocked,\n resetPinSecurity,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAChE,SAASC,OAAO,QAAQ,0BAA0B;AAElD,SAASC,eAAe,QAAQ,iBAAiB;AAEjD,MAAMC,mBAAmB,GAAG,MAAAA,CAAA,KAAY;EACtC;EACA,OAAOC,IAAI,CAACC,KAAK,CAAC,CAAC,MAAMJ,OAAO,EAAE,IAAI,UAAU,CAAC;AACnD,CAAC;AAED,OAAO,MAAMK,kBAAkB,GAAG,SAAAA,CAChCC,cAAsB,EACtBC,oBAAwC,EACxCC,kBAA8F,EAE3F;EAAA,IADHC,eAAe,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAEnB,MAAM,CAACG,QAAQ,EAAEC,WAAW,CAAC,GAAGf,QAAQ,CAACO,cAAc,CAAC;EACxD,MAAM,CAACS,aAAa,EAAEC,gBAAgB,CAAC,GAAGjB,QAAQ,CAACQ,oBAAoB,CAAC;EACxE,MAAM,CAACU,SAAS,EAAEC,YAAY,CAAC,GAAGnB,QAAQ,CAACO,cAAc,IAAIG,eAAe,IAAIF,oBAAoB,KAAKK,SAAS,CAAC;EACnH,MAAM,CAACO,kBAAkB,EAAEC,qBAAqB,CAAC,GAAGrB,QAAQ,CAAC,CAAC,CAAC;EAC/D,MAAMsB,KAAK,GAAGvB,MAAM,EAAkC;EAEtD,MAAMwB,kBAAkB,GAAG1B,WAAW,CAAC,MAAM;IAC3C,IAAI,CAACmB,aAAa,EAAE;MAClB;IACF;IACA;IACAb,mBAAmB,EAAE,CAClBqB,IAAI,CAAEC,WAAW,IAAK;MACrB;MACA,MAAMC,WAAW,GAAGtB,IAAI,CAACuB,GAAG,CAAC,CAAC,EAAEb,QAAQ,GAAGJ,eAAe,CAAC,GAAG,EAAE;;MAEhE;MACA,MAAMkB,UAAU,GAAGH,WAAW,GAAGT,aAAa;MAE9C,IAAIa,SAAS,GAAGH,WAAW,GAAGE,UAAU;MAExC,IAAIA,UAAU,GAAG,CAAC,EAAE;QAClB;QACA;QACAC,SAAS,GAAGH,WAAW,GAAGD,WAAW;MACvC;MAEAN,YAAY,CAACU,SAAS,GAAG,CAAC,CAAC;MAC3BR,qBAAqB,CAACjB,IAAI,CAAC0B,GAAG,CAAC,CAAC,EAAED,SAAS,CAAC,CAAC;MAC7C,IAAIA,SAAS,IAAI,CAAC,EAAE;QAClBpB,kBAAkB,CAACK,QAAQ,EAAED,SAAS,CAAC;QACvCI,gBAAgB,CAACJ,SAAS,CAAC;MAC7B;IACF,CAAC,CAAC,CACDkB,KAAK,CAAEC,CAAC,IAAK;MACZ9B,eAAe,CAAC8B,CAAC,EAAE,kCAAkC,CAAC;IACxD,CAAC,CAAC;EACN,CAAC,EAAE,CAACtB,eAAe,EAAEI,QAAQ,EAAEE,aAAa,EAAEP,kBAAkB,CAAC,CAAC;EAElE,MAAMwB,gBAAgB,GAAGpC,WAAW,CAAC,MAAM;IACzCM,mBAAmB,EAAE,CAClBqB,IAAI,CAAEC,WAAW,IAAK;MACrB,MAAMS,WAAW,GAAGpB,QAAQ,GAAG,CAAC;MAChCL,kBAAkB,CAACyB,WAAW,EAAET,WAAW,CAAC;MAC5CV,WAAW,CAACmB,WAAW,CAAC;MACxBjB,gBAAgB,CAACQ,WAAW,CAAC;MAC7B,IAAIS,WAAW,KAAKxB,eAAe,EAAE;QACnCa,kBAAkB,EAAE;MACtB;IACF,CAAC,CAAC,CACDQ,KAAK,CAAEC,CAAC,IAAK;MACZ9B,eAAe,CAAC8B,CAAC,EAAE,kCAAkC,CAAC;IACxD,CAAC,CAAC;EACN,CAAC,EAAE,CAACtB,eAAe,EAAEI,QAAQ,EAAES,kBAAkB,EAAEd,kBAAkB,CAAC,CAAC;EAEvE,MAAM0B,gBAAgB,GAAGtC,WAAW,CAAC,MAAM;IACzCY,kBAAkB,CAAC,CAAC,EAAEI,SAAS,CAAC;IAChCI,gBAAgB,CAACJ,SAAS,CAAC;IAC3BE,WAAW,CAAC,CAAC,CAAC;EAChB,CAAC,EAAE,CAACN,kBAAkB,CAAC,CAAC;EAExBX,SAAS,CAAC,MAAM;IACd,IAAIoB,SAAS,IAAII,KAAK,CAACc,OAAO,KAAKvB,SAAS,EAAE;MAC5CS,KAAK,CAACc,OAAO,GAAGC,WAAW,CAACd,kBAAkB,EAAE,GAAG,CAAC;IACtD,CAAC,MAAM,IAAI,CAACL,SAAS,IAAII,KAAK,CAACc,OAAO,KAAKvB,SAAS,EAAE;MACpDyB,aAAa,CAAChB,KAAK,CAACc,OAAO,CAAC;MAC5Bd,KAAK,CAACc,OAAO,GAAGvB,SAAS;IAC3B;EACF,CAAC,EAAE,CAACK,SAAS,EAAEK,kBAAkB,CAAC,CAAC;EAEnCzB,SAAS,CAAC,MAAM;IACd,IAAIgB,QAAQ,IAAIJ,eAAe,IAAIF,oBAAoB,IAAI,CAACU,SAAS,EAAE;MACrEK,kBAAkB,EAAE;IACtB;EACF,CAAC,EAAE,CAACb,eAAe,EAAEI,QAAQ,EAAES,kBAAkB,EAAEL,SAAS,EAAEV,oBAAoB,CAAC,CAAC;EAEpF,OAAO;IACLyB,gBAAgB;IAChBb,kBAAkB;IAClBF,SAAS;IACTiB;EACF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CredentialStateEnum } from '@procivis/react-native-one-core';
|
|
2
|
+
import { useIsFocused } from '@react-navigation/native';
|
|
3
|
+
import { useCallback, useRef } from 'react';
|
|
4
|
+
import { reportException } from '../../reporting';
|
|
5
|
+
import { useCredentialRevocationCheck, useCredentials } from '../core/credentials';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Runs revocation check on background for all potential updates
|
|
9
|
+
*
|
|
10
|
+
* Navigates to the result page if some credential states were updated
|
|
11
|
+
* @param {string[]} credentialIds if specified only those credentials get checked, otherwise all potentially eligible credentials
|
|
12
|
+
*/
|
|
13
|
+
export const useCredentialStatusCheck = credentialIds => {
|
|
14
|
+
const isFocused = useIsFocused();
|
|
15
|
+
const checkDone = useRef(false);
|
|
16
|
+
const {
|
|
17
|
+
mutateAsync: check
|
|
18
|
+
} = useCredentialRevocationCheck();
|
|
19
|
+
const {
|
|
20
|
+
data: credentials
|
|
21
|
+
} = useCredentials({
|
|
22
|
+
ids: credentialIds,
|
|
23
|
+
status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED]
|
|
24
|
+
});
|
|
25
|
+
const checkCredentialsStatus = useCallback(async () => {
|
|
26
|
+
if (!credentials || !credentials.length || checkDone.current || !isFocused) {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
const results = await check(credentials.map(_ref => {
|
|
30
|
+
let {
|
|
31
|
+
id
|
|
32
|
+
} = _ref;
|
|
33
|
+
return id;
|
|
34
|
+
})).catch(e => {
|
|
35
|
+
reportException(e, 'Revocation check failed');
|
|
36
|
+
return [];
|
|
37
|
+
});
|
|
38
|
+
const updatedCredentialIds = results.filter(_ref2 => {
|
|
39
|
+
var _credentials$find;
|
|
40
|
+
let {
|
|
41
|
+
credentialId,
|
|
42
|
+
status: newStatus,
|
|
43
|
+
success
|
|
44
|
+
} = _ref2;
|
|
45
|
+
return success && ((_credentials$find = credentials.find(_ref3 => {
|
|
46
|
+
let {
|
|
47
|
+
id
|
|
48
|
+
} = _ref3;
|
|
49
|
+
return id === credentialId;
|
|
50
|
+
})) === null || _credentials$find === void 0 ? void 0 : _credentials$find.state) !== newStatus;
|
|
51
|
+
}).map(_ref4 => {
|
|
52
|
+
let {
|
|
53
|
+
credentialId
|
|
54
|
+
} = _ref4;
|
|
55
|
+
return credentialId;
|
|
56
|
+
});
|
|
57
|
+
return updatedCredentialIds;
|
|
58
|
+
}, [check, credentials, isFocused]);
|
|
59
|
+
return checkCredentialsStatus;
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=credential-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CredentialStateEnum","useIsFocused","useCallback","useRef","reportException","useCredentialRevocationCheck","useCredentials","useCredentialStatusCheck","credentialIds","isFocused","checkDone","mutateAsync","check","data","credentials","ids","status","ACCEPTED","SUSPENDED","checkCredentialsStatus","length","current","results","map","_ref","id","catch","e","updatedCredentialIds","filter","_ref2","_credentials$find","credentialId","newStatus","success","find","_ref3","state","_ref4"],"sources":["credential-status.ts"],"sourcesContent":["import { CredentialStateEnum } from '@procivis/react-native-one-core';\nimport { useIsFocused } from '@react-navigation/native';\nimport { useCallback, useRef } from 'react';\n\nimport { reportException } from '../../reporting';\nimport { useCredentialRevocationCheck, useCredentials } from '../core/credentials';\n\n/**\n * Runs revocation check on background for all potential updates\n *\n * Navigates to the result page if some credential states were updated\n * @param {string[]} credentialIds if specified only those credentials get checked, otherwise all potentially eligible credentials\n */\nexport const useCredentialStatusCheck = (credentialIds?: string[]) => {\n const isFocused = useIsFocused();\n const checkDone = useRef(false);\n const { mutateAsync: check } = useCredentialRevocationCheck();\n const { data: credentials } = useCredentials({\n ids: credentialIds,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED],\n });\n\n const checkCredentialsStatus = useCallback(async () => {\n if (!credentials || !credentials.length || checkDone.current || !isFocused) {\n return [];\n }\n\n const results = await check(credentials.map(({ id }) => id)).catch((e) => {\n reportException(e, 'Revocation check failed');\n return [];\n });\n\n const updatedCredentialIds = results\n .filter(\n ({ credentialId, status: newStatus, success }) =>\n success && credentials.find(({ id }) => id === credentialId)?.state !== newStatus,\n )\n .map(({ credentialId }) => credentialId);\n\n return updatedCredentialIds;\n }, [check, credentials, isFocused]);\n\n return checkCredentialsStatus;\n};\n"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,iCAAiC;AACrE,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAE3C,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,4BAA4B,EAAEC,cAAc,QAAQ,qBAAqB;;AAElF;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAIC,aAAwB,IAAK;EACpE,MAAMC,SAAS,GAAGR,YAAY,EAAE;EAChC,MAAMS,SAAS,GAAGP,MAAM,CAAC,KAAK,CAAC;EAC/B,MAAM;IAAEQ,WAAW,EAAEC;EAAM,CAAC,GAAGP,4BAA4B,EAAE;EAC7D,MAAM;IAAEQ,IAAI,EAAEC;EAAY,CAAC,GAAGR,cAAc,CAAC;IAC3CS,GAAG,EAAEP,aAAa;IAClBQ,MAAM,EAAE,CAAChB,mBAAmB,CAACiB,QAAQ,EAAEjB,mBAAmB,CAACkB,SAAS;EACtE,CAAC,CAAC;EAEF,MAAMC,sBAAsB,GAAGjB,WAAW,CAAC,YAAY;IACrD,IAAI,CAACY,WAAW,IAAI,CAACA,WAAW,CAACM,MAAM,IAAIV,SAAS,CAACW,OAAO,IAAI,CAACZ,SAAS,EAAE;MAC1E,OAAO,EAAE;IACX;IAEA,MAAMa,OAAO,GAAG,MAAMV,KAAK,CAACE,WAAW,CAACS,GAAG,CAACC,IAAA;MAAA,IAAC;QAAEC;MAAG,CAAC,GAAAD,IAAA;MAAA,OAAKC,EAAE;IAAA,EAAC,CAAC,CAACC,KAAK,CAAEC,CAAC,IAAK;MACxEvB,eAAe,CAACuB,CAAC,EAAE,yBAAyB,CAAC;MAC7C,OAAO,EAAE;IACX,CAAC,CAAC;IAEF,MAAMC,oBAAoB,GAAGN,OAAO,CACjCO,MAAM,CACLC,KAAA;MAAA,IAAAC,iBAAA;MAAA,IAAC;QAAEC,YAAY;QAAEhB,MAAM,EAAEiB,SAAS;QAAEC;MAAQ,CAAC,GAAAJ,KAAA;MAAA,OAC3CI,OAAO,IAAI,EAAAH,iBAAA,GAAAjB,WAAW,CAACqB,IAAI,CAACC,KAAA;QAAA,IAAC;UAAEX;QAAG,CAAC,GAAAW,KAAA;QAAA,OAAKX,EAAE,KAAKO,YAAY;MAAA,EAAC,cAAAD,iBAAA,uBAAjDA,iBAAA,CAAmDM,KAAK,MAAKJ,SAAS;IAAA,EACpF,CACAV,GAAG,CAACe,KAAA;MAAA,IAAC;QAAEN;MAAa,CAAC,GAAAM,KAAA;MAAA,OAAKN,YAAY;IAAA,EAAC;IAE1C,OAAOJ,oBAAoB;EAC7B,CAAC,EAAE,CAAChB,KAAK,EAAEE,WAAW,EAAEL,SAAS,CAAC,CAAC;EAEnC,OAAOU,sBAAsB;AAC/B,CAAC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import ContrastingStatusBar from './contrasting-status-bar';
|
|
2
|
-
import { formatDate, formatDateTime, formatTime } from './date';
|
|
3
|
-
import { useBlockOSBackNavigation } from './navigation';
|
|
4
|
-
import { useForwardedRef } from './ref';
|
|
5
2
|
import { concatTestID } from './testID';
|
|
6
|
-
|
|
7
|
-
export
|
|
3
|
+
export { concatTestID, ContrastingStatusBar };
|
|
4
|
+
export * from './backup';
|
|
5
|
+
export * from './color';
|
|
6
|
+
export * from './date';
|
|
8
7
|
export * from './hooks';
|
|
8
|
+
export * from './navigation';
|
|
9
|
+
export * from './parsers';
|
|
10
|
+
export * from './ref';
|
|
11
|
+
export * from './reporting';
|
|
12
|
+
export * from './string';
|
|
13
|
+
export * from './useMemoAsync';
|
|
14
|
+
export * from './uuid';
|
|
9
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ContrastingStatusBar","
|
|
1
|
+
{"version":3,"names":["ContrastingStatusBar","concatTestID"],"sources":["index.ts"],"sourcesContent":["import ContrastingStatusBar from './contrasting-status-bar';\nimport { concatTestID } from './testID';\n\nexport { concatTestID, ContrastingStatusBar };\n\nexport * from './backup';\nexport * from './color';\nexport * from './date';\nexport * from './hooks';\nexport * from './navigation';\nexport * from './parsers';\nexport * from './ref';\nexport * from './reporting';\nexport * from './string';\nexport * from './useMemoAsync';\nexport * from './uuid';\n"],"mappings":"AAAA,OAAOA,oBAAoB,MAAM,0BAA0B;AAC3D,SAASC,YAAY,QAAQ,UAAU;AAEvC,SAASA,YAAY,EAAED,oBAAoB;AAE3C,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,OAAO;AACrB,cAAc,aAAa;AAC3B,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,QAAQ"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { CredentialSchemaCodeType } from '@procivis/react-native-one-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
import { Barcode, CarouselImageType, Mrz, QrCode } from '../../ui-components/credential';
|
|
5
|
+
import { ImageOrComponent } from '../../ui-components/image';
|
|
6
|
+
import { isASCII } from '../string';
|
|
7
|
+
import { concatTestID } from '../testID';
|
|
8
|
+
import { findClaimByPath } from './credential';
|
|
9
|
+
const styles = StyleSheet.create({
|
|
10
|
+
container: {
|
|
11
|
+
height: '100%',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
width: '100%'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
export const getCarouselImagesFromClaims = (claims, layoutProperties, testID) => {
|
|
17
|
+
const result = [];
|
|
18
|
+
if (!layoutProperties) {
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
const {
|
|
22
|
+
code,
|
|
23
|
+
pictureAttribute
|
|
24
|
+
} = layoutProperties;
|
|
25
|
+
if (pictureAttribute) {
|
|
26
|
+
const pictureClaim = findClaimByPath(pictureAttribute, claims);
|
|
27
|
+
if (pictureClaim) {
|
|
28
|
+
result.push({
|
|
29
|
+
element: /*#__PURE__*/React.createElement(ImageOrComponent, {
|
|
30
|
+
source: {
|
|
31
|
+
imageSource: {
|
|
32
|
+
uri: pictureClaim.value
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
style: styles.container,
|
|
36
|
+
testID: concatTestID(testID, CarouselImageType.Photo)
|
|
37
|
+
}),
|
|
38
|
+
type: CarouselImageType.Photo
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (code) {
|
|
43
|
+
const claim = findClaimByPath(code.attribute, claims);
|
|
44
|
+
if (claim && typeof claim.value === 'number') {
|
|
45
|
+
claim.value = String(claim.value);
|
|
46
|
+
}
|
|
47
|
+
if (!claim || typeof claim.value !== 'string') {
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
if (code.type === CredentialSchemaCodeType.QR_CODE) {
|
|
51
|
+
result.push({
|
|
52
|
+
element: /*#__PURE__*/React.createElement(QrCode, {
|
|
53
|
+
content: claim.value,
|
|
54
|
+
testID: concatTestID(testID, CarouselImageType.QrCode)
|
|
55
|
+
}),
|
|
56
|
+
type: CarouselImageType.QrCode
|
|
57
|
+
});
|
|
58
|
+
} else if (code.type === CredentialSchemaCodeType.BARCODE && isASCII(claim.value)) {
|
|
59
|
+
result.push({
|
|
60
|
+
element: /*#__PURE__*/React.createElement(Barcode, {
|
|
61
|
+
content: claim.value,
|
|
62
|
+
testID: concatTestID(testID, CarouselImageType.Barcode)
|
|
63
|
+
}),
|
|
64
|
+
type: CarouselImageType.Barcode
|
|
65
|
+
});
|
|
66
|
+
} else if (code.type === CredentialSchemaCodeType.MRZ) {
|
|
67
|
+
result.push({
|
|
68
|
+
element: /*#__PURE__*/React.createElement(Mrz, {
|
|
69
|
+
content: claim.value,
|
|
70
|
+
testID: concatTestID(testID, CarouselImageType.MRZ)
|
|
71
|
+
}),
|
|
72
|
+
type: CarouselImageType.MRZ
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return result;
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=credential-images.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CredentialSchemaCodeType","React","StyleSheet","Barcode","CarouselImageType","Mrz","QrCode","ImageOrComponent","isASCII","concatTestID","findClaimByPath","styles","create","container","height","justifyContent","width","getCarouselImagesFromClaims","claims","layoutProperties","testID","result","code","pictureAttribute","pictureClaim","push","element","createElement","source","imageSource","uri","value","style","Photo","type","claim","attribute","String","QR_CODE","content","BARCODE","MRZ"],"sources":["credential-images.tsx"],"sourcesContent":["import { Claim, CredentialSchemaCodeType, CredentialSchemaLayoutProperties } from '@procivis/react-native-one-core';\nimport React from 'react';\nimport { StyleSheet } from 'react-native';\n\nimport { Barcode, CarouselImage, CarouselImageType, Mrz, QrCode } from '../../ui-components/credential';\nimport { ImageOrComponent } from '../../ui-components/image';\nimport { isASCII } from '../string';\nimport { concatTestID } from '../testID';\nimport { findClaimByPath } from './credential';\n\nconst styles = StyleSheet.create({\n container: {\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n});\n\nexport const getCarouselImagesFromClaims = (\n claims: Claim[],\n layoutProperties?: CredentialSchemaLayoutProperties,\n testID?: string,\n): CarouselImage[] => {\n const result: CarouselImage[] = [];\n\n if (!layoutProperties) {\n return result;\n }\n\n const { code, pictureAttribute } = layoutProperties;\n\n if (pictureAttribute) {\n const pictureClaim = findClaimByPath(pictureAttribute, claims);\n if (pictureClaim) {\n result.push({\n element: (\n <ImageOrComponent\n source={{ imageSource: { uri: pictureClaim.value as string } }}\n style={styles.container}\n testID={concatTestID(testID, CarouselImageType.Photo)}\n />\n ),\n type: CarouselImageType.Photo,\n });\n }\n }\n\n if (code) {\n const claim = findClaimByPath(code.attribute, claims);\n\n if (claim && typeof claim.value === 'number') {\n claim.value = String(claim.value);\n }\n\n if (!claim || typeof claim.value !== 'string') {\n return result;\n }\n\n if (code.type === CredentialSchemaCodeType.QR_CODE) {\n result.push({\n element: <QrCode content={claim.value} testID={concatTestID(testID, CarouselImageType.QrCode)} />,\n type: CarouselImageType.QrCode,\n });\n } else if (code.type === CredentialSchemaCodeType.BARCODE && isASCII(claim.value)) {\n result.push({\n element: <Barcode content={claim.value} testID={concatTestID(testID, CarouselImageType.Barcode)} />,\n type: CarouselImageType.Barcode,\n });\n } else if (code.type === CredentialSchemaCodeType.MRZ) {\n result.push({\n element: <Mrz content={claim.value} testID={concatTestID(testID, CarouselImageType.MRZ)} />,\n type: CarouselImageType.MRZ,\n });\n }\n }\n\n return result;\n};\n"],"mappings":"AAAA,SAAgBA,wBAAwB,QAA0C,iCAAiC;AACnH,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AAEzC,SAASC,OAAO,EAAiBC,iBAAiB,EAAEC,GAAG,EAAEC,MAAM,QAAQ,gCAAgC;AACvG,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,eAAe,QAAQ,cAAc;AAE9C,MAAMC,MAAM,GAAGT,UAAU,CAACU,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,MAAM,EAAE,MAAM;IACdC,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,2BAA2B,GAAGA,CACzCC,MAAe,EACfC,gBAAmD,EACnDC,MAAe,KACK;EACpB,MAAMC,MAAuB,GAAG,EAAE;EAElC,IAAI,CAACF,gBAAgB,EAAE;IACrB,OAAOE,MAAM;EACf;EAEA,MAAM;IAAEC,IAAI;IAAEC;EAAiB,CAAC,GAAGJ,gBAAgB;EAEnD,IAAII,gBAAgB,EAAE;IACpB,MAAMC,YAAY,GAAGd,eAAe,CAACa,gBAAgB,EAAEL,MAAM,CAAC;IAC9D,IAAIM,YAAY,EAAE;MAChBH,MAAM,CAACI,IAAI,CAAC;QACVC,OAAO,eACLzB,KAAA,CAAA0B,aAAA,CAACpB,gBAAgB;UACfqB,MAAM,EAAE;YAAEC,WAAW,EAAE;cAAEC,GAAG,EAAEN,YAAY,CAACO;YAAgB;UAAE,CAAE;UAC/DC,KAAK,EAAErB,MAAM,CAACE,SAAU;UACxBO,MAAM,EAAEX,YAAY,CAACW,MAAM,EAAEhB,iBAAiB,CAAC6B,KAAK;QAAE,EAEzD;QACDC,IAAI,EAAE9B,iBAAiB,CAAC6B;MAC1B,CAAC,CAAC;IACJ;EACF;EAEA,IAAIX,IAAI,EAAE;IACR,MAAMa,KAAK,GAAGzB,eAAe,CAACY,IAAI,CAACc,SAAS,EAAElB,MAAM,CAAC;IAErD,IAAIiB,KAAK,IAAI,OAAOA,KAAK,CAACJ,KAAK,KAAK,QAAQ,EAAE;MAC5CI,KAAK,CAACJ,KAAK,GAAGM,MAAM,CAACF,KAAK,CAACJ,KAAK,CAAC;IACnC;IAEA,IAAI,CAACI,KAAK,IAAI,OAAOA,KAAK,CAACJ,KAAK,KAAK,QAAQ,EAAE;MAC7C,OAAOV,MAAM;IACf;IAEA,IAAIC,IAAI,CAACY,IAAI,KAAKlC,wBAAwB,CAACsC,OAAO,EAAE;MAClDjB,MAAM,CAACI,IAAI,CAAC;QACVC,OAAO,eAAEzB,KAAA,CAAA0B,aAAA,CAACrB,MAAM;UAACiC,OAAO,EAAEJ,KAAK,CAACJ,KAAM;UAACX,MAAM,EAAEX,YAAY,CAACW,MAAM,EAAEhB,iBAAiB,CAACE,MAAM;QAAE,EAAG;QACjG4B,IAAI,EAAE9B,iBAAiB,CAACE;MAC1B,CAAC,CAAC;IACJ,CAAC,MAAM,IAAIgB,IAAI,CAACY,IAAI,KAAKlC,wBAAwB,CAACwC,OAAO,IAAIhC,OAAO,CAAC2B,KAAK,CAACJ,KAAK,CAAC,EAAE;MACjFV,MAAM,CAACI,IAAI,CAAC;QACVC,OAAO,eAAEzB,KAAA,CAAA0B,aAAA,CAACxB,OAAO;UAACoC,OAAO,EAAEJ,KAAK,CAACJ,KAAM;UAACX,MAAM,EAAEX,YAAY,CAACW,MAAM,EAAEhB,iBAAiB,CAACD,OAAO;QAAE,EAAG;QACnG+B,IAAI,EAAE9B,iBAAiB,CAACD;MAC1B,CAAC,CAAC;IACJ,CAAC,MAAM,IAAImB,IAAI,CAACY,IAAI,KAAKlC,wBAAwB,CAACyC,GAAG,EAAE;MACrDpB,MAAM,CAACI,IAAI,CAAC;QACVC,OAAO,eAAEzB,KAAA,CAAA0B,aAAA,CAACtB,GAAG;UAACkC,OAAO,EAAEJ,KAAK,CAACJ,KAAM;UAACX,MAAM,EAAEX,YAAY,CAACW,MAAM,EAAEhB,iBAAiB,CAACqC,GAAG;QAAE,EAAG;QAC3FP,IAAI,EAAE9B,iBAAiB,CAACqC;MAC1B,CAAC,CAAC;IACJ;EACF;EAEA,OAAOpB,MAAM;AACf,CAAC"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Selector, SelectorStatus } from '../../ui-components/credential';
|
|
3
|
+
import { CredentialNoticeWarningIcon, CredentialWarningIcon, RequiredAttributeIcon } from '../../ui-components/icons';
|
|
4
|
+
import { concatTestID } from '../testID';
|
|
5
|
+
import { detailsCardAttributeFromClaim, getCredentialCardPropsFromCredential, getValidityState, nestAttributes, supportsSelectiveDisclosure, ValidityState } from './credential';
|
|
6
|
+
export const validityCheckedCardFromCredential = (credential, invalidLVVC, expanded, multipleCredentialsAvailable, config, notice, testID, labels) => {
|
|
7
|
+
let credentialHeaderDetail;
|
|
8
|
+
if (invalidLVVC) {
|
|
9
|
+
credentialHeaderDetail = {
|
|
10
|
+
credentialDetailErrorColor: true,
|
|
11
|
+
credentialDetailPrimary: labels.revoked,
|
|
12
|
+
credentialDetailTestID: concatTestID(testID, 'header.invalid')
|
|
13
|
+
};
|
|
14
|
+
} else if (!expanded && multipleCredentialsAvailable) {
|
|
15
|
+
credentialHeaderDetail = {
|
|
16
|
+
credentialDetailPrimary: labels.multipleCredentials,
|
|
17
|
+
credentialDetailTestID: concatTestID(testID, 'header.multiple'),
|
|
18
|
+
statusIcon: CredentialWarningIcon
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const card = getCredentialCardPropsFromCredential(credential, credential.claims, config, notice, testID, labels);
|
|
22
|
+
return {
|
|
23
|
+
...card,
|
|
24
|
+
header: {
|
|
25
|
+
...card.header,
|
|
26
|
+
...credentialHeaderDetail
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export const missingCredentialCardFromRequest = (request, notice, testID, labels) => {
|
|
31
|
+
var _request$name;
|
|
32
|
+
return {
|
|
33
|
+
cardImage: undefined,
|
|
34
|
+
color: undefined,
|
|
35
|
+
testID,
|
|
36
|
+
header: {
|
|
37
|
+
credentialDetailErrorColor: true,
|
|
38
|
+
credentialDetailPrimary: labels.missingCredential,
|
|
39
|
+
credentialDetailTestID: concatTestID(testID, 'header.missing'),
|
|
40
|
+
credentialName: (_request$name = request.name) !== null && _request$name !== void 0 ? _request$name : request.id,
|
|
41
|
+
statusIcon: CredentialWarningIcon
|
|
42
|
+
},
|
|
43
|
+
...notice
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
const getAttributeSelectorStatus = (field, validityState, credential, claim, selected) => {
|
|
47
|
+
if (!credential || validityState !== ValidityState.Valid) {
|
|
48
|
+
return SelectorStatus.Rejected;
|
|
49
|
+
}
|
|
50
|
+
if (field.required) {
|
|
51
|
+
if (claim) {
|
|
52
|
+
return SelectorStatus.Required;
|
|
53
|
+
} else {
|
|
54
|
+
return SelectorStatus.Rejected;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (!claim) {
|
|
58
|
+
return SelectorStatus.Disabled;
|
|
59
|
+
}
|
|
60
|
+
return selected ? SelectorStatus.SelectedCheckmark : SelectorStatus.Empty;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// Returns a spread list of all claims with their full JSON path as key, including all intermediate objects
|
|
64
|
+
const spreadClaims = function (claims) {
|
|
65
|
+
let parentClaimPath = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
66
|
+
return claims.reduce((acc, claim) => {
|
|
67
|
+
const result = [claim];
|
|
68
|
+
if (Array.isArray(claim.value)) {
|
|
69
|
+
const claimPath = parentClaimPath ? `${parentClaimPath}/${claim.key}` : claim.key;
|
|
70
|
+
result.push(...spreadClaims(claim.value, claimPath));
|
|
71
|
+
}
|
|
72
|
+
return [...acc, ...result];
|
|
73
|
+
}, []);
|
|
74
|
+
};
|
|
75
|
+
const getDisplayedAttributes = (request, validityState, credential, selectiveDisclosureSupported, selectedFields) => {
|
|
76
|
+
if (credential && selectiveDisclosureSupported === false) {
|
|
77
|
+
return credential.claims.map(claim => ({
|
|
78
|
+
claim,
|
|
79
|
+
id: claim.id,
|
|
80
|
+
status: SelectorStatus.Required
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
return request.fields.map(field => {
|
|
84
|
+
const selected = !field.required && (selectedFields === null || selectedFields === void 0 ? void 0 : selectedFields.includes(field.id));
|
|
85
|
+
const claim = credential && spreadClaims(credential.claims).find(_ref => {
|
|
86
|
+
let {
|
|
87
|
+
key
|
|
88
|
+
} = _ref;
|
|
89
|
+
return key === field.keyMap[credential.id];
|
|
90
|
+
});
|
|
91
|
+
const status = getAttributeSelectorStatus(field, validityState, credential, claim, selected);
|
|
92
|
+
return {
|
|
93
|
+
claim,
|
|
94
|
+
field,
|
|
95
|
+
id: field.id,
|
|
96
|
+
selected,
|
|
97
|
+
status
|
|
98
|
+
};
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
export const shareCredentialCardAttributeFromClaim = (id, config, testID, labels, claim, field) => {
|
|
102
|
+
var _field$name$split$pop, _field$name, _field$name2;
|
|
103
|
+
if (claim) {
|
|
104
|
+
return {
|
|
105
|
+
...detailsCardAttributeFromClaim(claim, config, testID),
|
|
106
|
+
id
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
id,
|
|
111
|
+
name: (_field$name$split$pop = field === null || field === void 0 ? void 0 : (_field$name = field.name) === null || _field$name === void 0 ? void 0 : _field$name.split('/').pop()) !== null && _field$name$split$pop !== void 0 ? _field$name$split$pop : id,
|
|
112
|
+
path: (_field$name2 = field === null || field === void 0 ? void 0 : field.name) !== null && _field$name2 !== void 0 ? _field$name2 : id,
|
|
113
|
+
value: labels.missingAttribute,
|
|
114
|
+
valueErrorColor: true
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// Will propagate the attribute status (right accessory + selected?) for all nested attributes
|
|
119
|
+
// Note: This function MUTATES the input attribute
|
|
120
|
+
const setStatusForNestedObjectOrArrayFields = (attribute, status, disabled) => {
|
|
121
|
+
const accessory = status && /*#__PURE__*/React.createElement(Selector, {
|
|
122
|
+
status: status
|
|
123
|
+
});
|
|
124
|
+
const isObject = attribute.attributes && attribute.attributes.length > 0;
|
|
125
|
+
const isArray = attribute.values && attribute.values.length > 0;
|
|
126
|
+
|
|
127
|
+
// If the attribute is not an object or array, we update the attribute and return
|
|
128
|
+
if (!isObject && !isArray) {
|
|
129
|
+
attribute.rightAccessory = accessory;
|
|
130
|
+
attribute.disabled = disabled;
|
|
131
|
+
return attribute;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// The object can be optional (tappable radio-checkmark), or required (checkmark)
|
|
135
|
+
if (status === SelectorStatus.SelectedCheckmark || status === SelectorStatus.Empty) {
|
|
136
|
+
// If it's a selectable object, the accessory is rendered next to the object title,
|
|
137
|
+
// The nested attributes have no accessory, and can not be selected
|
|
138
|
+
attribute.rightAccessory = accessory;
|
|
139
|
+
setStatusForNestedObjectOrArrayFields(attribute, undefined, true);
|
|
140
|
+
} else {
|
|
141
|
+
var _attribute$attributes;
|
|
142
|
+
const nested = (_attribute$attributes = attribute.attributes) !== null && _attribute$attributes !== void 0 ? _attribute$attributes : attribute.values;
|
|
143
|
+
// If the object is required / rejected, the accessory is rendered next to each nested attribute (except other object titles)
|
|
144
|
+
// all fields are disabled
|
|
145
|
+
for (const nestedAttribute of nested) {
|
|
146
|
+
setStatusForNestedObjectOrArrayFields(nestedAttribute, status, true);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
export const shareCredentialCardFromCredential = (credential, invalidLVVC, expanded, multipleCredentialsAvailable, request, selectedFields, config, testID, labels) => {
|
|
151
|
+
var _credential$issuerDid, _credential$issuerDid2;
|
|
152
|
+
const selectiveDisclosureSupported = supportsSelectiveDisclosure(credential ? {
|
|
153
|
+
...credential,
|
|
154
|
+
issuerDid: (_credential$issuerDid = credential.issuerDid) === null || _credential$issuerDid === void 0 ? void 0 : _credential$issuerDid.did
|
|
155
|
+
} : undefined, config);
|
|
156
|
+
const notice = selectiveDisclosureSupported === false ? {
|
|
157
|
+
text: labels.selectiveDisclosureNotice,
|
|
158
|
+
noticeIcon: CredentialNoticeWarningIcon
|
|
159
|
+
} : undefined;
|
|
160
|
+
const cardTestId = concatTestID(testID, 'card');
|
|
161
|
+
const card = credential ? validityCheckedCardFromCredential(credential, invalidLVVC, expanded, multipleCredentialsAvailable, config, notice, cardTestId, labels) : missingCredentialCardFromRequest(request, notice, cardTestId, labels);
|
|
162
|
+
const validityState = getValidityState(credential ? {
|
|
163
|
+
...credential,
|
|
164
|
+
issuerDid: (_credential$issuerDid2 = credential.issuerDid) === null || _credential$issuerDid2 === void 0 ? void 0 : _credential$issuerDid2.did
|
|
165
|
+
} : undefined);
|
|
166
|
+
const displayedAttributes = getDisplayedAttributes(request, validityState, credential, selectiveDisclosureSupported, selectedFields);
|
|
167
|
+
const attributes = displayedAttributes.map((_ref2, index) => {
|
|
168
|
+
let {
|
|
169
|
+
claim,
|
|
170
|
+
field,
|
|
171
|
+
id,
|
|
172
|
+
selected,
|
|
173
|
+
status
|
|
174
|
+
} = _ref2;
|
|
175
|
+
const disabled = !credential || !field || field.required || !claim;
|
|
176
|
+
const attribute = {
|
|
177
|
+
...shareCredentialCardAttributeFromClaim(id, config, concatTestID(testID, 'attribute', `${index}`), labels, claim, field),
|
|
178
|
+
selected
|
|
179
|
+
};
|
|
180
|
+
setStatusForNestedObjectOrArrayFields(attribute, status, disabled);
|
|
181
|
+
return attribute;
|
|
182
|
+
});
|
|
183
|
+
return {
|
|
184
|
+
attributes: nestAttributes(attributes),
|
|
185
|
+
card
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
export const selectCredentialCardAttributeFromClaim = (id, config, testID, labels, claim, field) => {
|
|
189
|
+
const attribute = shareCredentialCardAttributeFromClaim(id, config, testID, labels, claim, field);
|
|
190
|
+
if (!claim) {
|
|
191
|
+
return attribute;
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
...attribute,
|
|
195
|
+
rightAccessory: RequiredAttributeIcon
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
export const selectCredentialCardFromCredential = (credential, selected, request, config, testID, labels) => {
|
|
199
|
+
var _credential$issuerDid3;
|
|
200
|
+
const selectiveDisclosureSupported = supportsSelectiveDisclosure(credential ? {
|
|
201
|
+
...credential,
|
|
202
|
+
issuerDid: (_credential$issuerDid3 = credential.issuerDid) === null || _credential$issuerDid3 === void 0 ? void 0 : _credential$issuerDid3.did
|
|
203
|
+
} : undefined, config);
|
|
204
|
+
const rightAccessory = /*#__PURE__*/React.createElement(Selector, {
|
|
205
|
+
status: selected ? SelectorStatus.SelectedRadio : SelectorStatus.Empty
|
|
206
|
+
});
|
|
207
|
+
const notice = selectiveDisclosureSupported === false ? {
|
|
208
|
+
text: labels.selectiveDisclosureNotice,
|
|
209
|
+
noticeIcon: CredentialNoticeWarningIcon
|
|
210
|
+
} : undefined;
|
|
211
|
+
const {
|
|
212
|
+
header,
|
|
213
|
+
...cardProps
|
|
214
|
+
} = getCredentialCardPropsFromCredential(credential, credential.claims, config, notice, testID, labels);
|
|
215
|
+
const card = {
|
|
216
|
+
header: {
|
|
217
|
+
...header,
|
|
218
|
+
accessory: rightAccessory
|
|
219
|
+
},
|
|
220
|
+
...cardProps
|
|
221
|
+
};
|
|
222
|
+
const attributes = request.fields.map(field => {
|
|
223
|
+
const claim = spreadClaims(credential.claims).find(_ref3 => {
|
|
224
|
+
let {
|
|
225
|
+
key
|
|
226
|
+
} = _ref3;
|
|
227
|
+
return key === field.keyMap[credential.id];
|
|
228
|
+
});
|
|
229
|
+
const attribute = selectCredentialCardAttributeFromClaim(field.id, config, testID, labels, claim, field);
|
|
230
|
+
return {
|
|
231
|
+
...attribute,
|
|
232
|
+
rightAccessory: /*#__PURE__*/React.createElement(Selector, {
|
|
233
|
+
status: field.required && !claim ? SelectorStatus.Rejected : SelectorStatus.Required
|
|
234
|
+
})
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
return {
|
|
238
|
+
attributes: nestAttributes(attributes),
|
|
239
|
+
card
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
//# sourceMappingURL=credential-sharing.js.map
|