@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 @@
|
|
|
1
|
+
{"version":3,"names":["React","Selector","SelectorStatus","CredentialNoticeWarningIcon","CredentialWarningIcon","RequiredAttributeIcon","concatTestID","detailsCardAttributeFromClaim","getCredentialCardPropsFromCredential","getValidityState","nestAttributes","supportsSelectiveDisclosure","ValidityState","validityCheckedCardFromCredential","credential","invalidLVVC","expanded","multipleCredentialsAvailable","config","notice","testID","labels","credentialHeaderDetail","credentialDetailErrorColor","credentialDetailPrimary","revoked","credentialDetailTestID","multipleCredentials","statusIcon","card","claims","header","missingCredentialCardFromRequest","request","_request$name","cardImage","undefined","color","missingCredential","credentialName","name","id","getAttributeSelectorStatus","field","validityState","claim","selected","Valid","Rejected","required","Required","Disabled","SelectedCheckmark","Empty","spreadClaims","parentClaimPath","arguments","length","reduce","acc","result","Array","isArray","value","claimPath","key","push","getDisplayedAttributes","selectiveDisclosureSupported","selectedFields","map","status","fields","includes","find","_ref","keyMap","shareCredentialCardAttributeFromClaim","_field$name$split$pop","_field$name","_field$name2","split","pop","path","missingAttribute","valueErrorColor","setStatusForNestedObjectOrArrayFields","attribute","disabled","accessory","createElement","isObject","attributes","values","rightAccessory","_attribute$attributes","nested","nestedAttribute","shareCredentialCardFromCredential","_credential$issuerDid","_credential$issuerDid2","issuerDid","did","text","selectiveDisclosureNotice","noticeIcon","cardTestId","displayedAttributes","_ref2","index","selectCredentialCardAttributeFromClaim","selectCredentialCardFromCredential","_credential$issuerDid3","SelectedRadio","cardProps","_ref3"],"sources":["credential-sharing.tsx"],"sourcesContent":["import {\n Claim,\n Config,\n CredentialDetail,\n PresentationDefinitionField,\n PresentationDefinitionRequestedCredential,\n} from '@procivis/react-native-one-core';\nimport React from 'react';\n\nimport {\n CredentialAttribute,\n CredentialCardProps,\n CredentialDetailsCardProps,\n CredentialHeaderProps,\n Selector,\n SelectorStatus,\n} from '../../ui-components/credential';\nimport { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';\nimport { CredentialNoticeWarningIcon, CredentialWarningIcon, RequiredAttributeIcon } from '../../ui-components/icons';\nimport { concatTestID } from '../testID';\nimport {\n CardLabels,\n detailsCardAttributeFromClaim,\n getCredentialCardPropsFromCredential,\n getValidityState,\n nestAttributes,\n supportsSelectiveDisclosure,\n ValidityState,\n} from './credential';\n\nexport const validityCheckedCardFromCredential = (\n credential: CredentialDetail,\n invalidLVVC: boolean,\n expanded: boolean,\n multipleCredentialsAvailable: boolean,\n config: Config,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID'> => {\n let credentialHeaderDetail:\n | Pick<\n CredentialHeaderProps,\n | 'credentialDetailPrimary'\n | 'credentialDetailSecondary'\n | 'credentialDetailErrorColor'\n | 'credentialDetailTestID'\n | 'statusIcon'\n >\n | undefined;\n if (invalidLVVC) {\n credentialHeaderDetail = {\n credentialDetailErrorColor: true,\n credentialDetailPrimary: labels.revoked,\n credentialDetailTestID: concatTestID(testID, 'header.invalid'),\n };\n } else if (!expanded && multipleCredentialsAvailable) {\n credentialHeaderDetail = {\n credentialDetailPrimary: labels.multipleCredentials,\n credentialDetailTestID: concatTestID(testID, 'header.multiple'),\n statusIcon: CredentialWarningIcon,\n };\n }\n\n const card = getCredentialCardPropsFromCredential(credential, credential.claims, config, notice, testID, labels);\n return {\n ...card,\n header: {\n ...card.header,\n ...credentialHeaderDetail,\n },\n };\n};\n\nexport const missingCredentialCardFromRequest = (\n request: PresentationDefinitionRequestedCredential,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style'> => {\n return {\n cardImage: undefined,\n color: undefined,\n testID,\n header: {\n credentialDetailErrorColor: true,\n credentialDetailPrimary: labels.missingCredential,\n credentialDetailTestID: concatTestID(testID, 'header.missing'),\n credentialName: request.name ?? request.id,\n statusIcon: CredentialWarningIcon,\n },\n ...notice,\n };\n};\n\ninterface DisplayedAttribute {\n claim?: Claim;\n field?: PresentationDefinitionField;\n id: string;\n selected?: boolean;\n status: SelectorStatus;\n}\n\nconst getAttributeSelectorStatus = (\n field: PresentationDefinitionField,\n validityState: ValidityState,\n credential?: CredentialDetail,\n claim?: Claim,\n selected?: boolean,\n): SelectorStatus => {\n if (!credential || validityState !== ValidityState.Valid) {\n return SelectorStatus.Rejected;\n }\n if (field.required) {\n if (claim) {\n return SelectorStatus.Required;\n } else {\n return SelectorStatus.Rejected;\n }\n }\n if (!claim) {\n return SelectorStatus.Disabled;\n }\n return selected ? SelectorStatus.SelectedCheckmark : SelectorStatus.Empty;\n};\n\n// Returns a spread list of all claims with their full JSON path as key, including all intermediate objects\nconst spreadClaims = (claims: Claim[], parentClaimPath = ''): Claim[] => {\n return claims.reduce((acc, claim) => {\n const result = [claim];\n if (Array.isArray(claim.value)) {\n const claimPath = parentClaimPath ? `${parentClaimPath}/${claim.key}` : claim.key;\n result.push(...spreadClaims(claim.value, claimPath));\n }\n return [...acc, ...result];\n }, [] as Claim[]);\n};\n\nconst getDisplayedAttributes = (\n request: PresentationDefinitionRequestedCredential,\n validityState: ValidityState,\n credential?: CredentialDetail,\n selectiveDisclosureSupported?: boolean,\n selectedFields?: string[],\n): DisplayedAttribute[] => {\n if (credential && selectiveDisclosureSupported === false) {\n return credential.claims.map((claim) => ({\n claim,\n id: claim.id,\n status: SelectorStatus.Required,\n }));\n }\n\n return request.fields.map((field) => {\n const selected = !field.required && selectedFields?.includes(field.id);\n const claim =\n credential &&\n spreadClaims(credential.claims).find(({ key }) => {\n return key === field.keyMap[credential.id];\n });\n const status = getAttributeSelectorStatus(field, validityState, credential, claim, selected);\n return { claim, field, id: field.id, selected, status };\n });\n};\n\nexport const shareCredentialCardAttributeFromClaim = (\n id: string,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n claim?: Claim,\n field?: PresentationDefinitionField,\n): CredentialAttribute => {\n if (claim) {\n return { ...detailsCardAttributeFromClaim(claim, config, testID), id };\n }\n return {\n id,\n name: field?.name?.split('/').pop() ?? id,\n path: field?.name ?? id,\n value: labels.missingAttribute,\n valueErrorColor: true,\n };\n};\n\n// Will propagate the attribute status (right accessory + selected?) for all nested attributes\n// Note: This function MUTATES the input attribute\nconst setStatusForNestedObjectOrArrayFields = (\n attribute: CredentialAttribute,\n status?: SelectorStatus,\n disabled?: boolean,\n) => {\n const accessory = status && <Selector status={status} />;\n const isObject = attribute.attributes && attribute.attributes.length > 0;\n const isArray = attribute.values && attribute.values.length > 0;\n\n // If the attribute is not an object or array, we update the attribute and return\n if (!isObject && !isArray) {\n attribute.rightAccessory = accessory;\n attribute.disabled = disabled;\n return attribute;\n }\n\n // The object can be optional (tappable radio-checkmark), or required (checkmark)\n if (status === SelectorStatus.SelectedCheckmark || status === SelectorStatus.Empty) {\n // If it's a selectable object, the accessory is rendered next to the object title,\n // The nested attributes have no accessory, and can not be selected\n attribute.rightAccessory = accessory;\n setStatusForNestedObjectOrArrayFields(attribute, undefined, true);\n } else {\n const nested = attribute.attributes ?? attribute.values;\n // If the object is required / rejected, the accessory is rendered next to each nested attribute (except other object titles)\n // all fields are disabled\n for (const nestedAttribute of nested) {\n setStatusForNestedObjectOrArrayFields(nestedAttribute, status, true);\n }\n }\n};\n\nexport type ShareCredentialCardLabels = CardLabels & {\n selectiveDisclosureNotice: string;\n missingAttribute: string;\n missingCredential: string;\n multipleCredentials: string;\n};\n\nexport const shareCredentialCardFromCredential = (\n credential: CredentialDetail | undefined,\n invalidLVVC: boolean,\n expanded: boolean,\n multipleCredentialsAvailable: boolean,\n request: PresentationDefinitionRequestedCredential,\n selectedFields: string[] | undefined,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const selectiveDisclosureSupported = supportsSelectiveDisclosure(\n credential ? { ...credential, issuerDid: credential.issuerDid?.did } : undefined,\n config,\n );\n const notice: CredentialCardNotice | undefined =\n selectiveDisclosureSupported === false\n ? {\n text: labels.selectiveDisclosureNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n }\n : undefined;\n const cardTestId = concatTestID(testID, 'card');\n const card = credential\n ? validityCheckedCardFromCredential(\n credential,\n invalidLVVC,\n expanded,\n multipleCredentialsAvailable,\n config,\n notice,\n cardTestId,\n labels,\n )\n : missingCredentialCardFromRequest(request, notice, cardTestId, labels);\n const validityState = getValidityState(\n credential ? { ...credential, issuerDid: credential.issuerDid?.did } : undefined,\n );\n const displayedAttributes = getDisplayedAttributes(\n request,\n validityState,\n credential,\n selectiveDisclosureSupported,\n selectedFields,\n );\n\n const attributes: CredentialAttribute[] = displayedAttributes.map(({ claim, field, id, selected, status }, index) => {\n const disabled = !credential || !field || field.required || !claim;\n const attribute: CredentialAttribute = {\n ...shareCredentialCardAttributeFromClaim(\n id,\n config,\n concatTestID(testID, 'attribute', `${index}`),\n labels,\n claim,\n field,\n ),\n selected,\n };\n\n setStatusForNestedObjectOrArrayFields(attribute, status, disabled);\n return attribute;\n });\n return {\n attributes: nestAttributes(attributes),\n card,\n };\n};\n\nexport const selectCredentialCardAttributeFromClaim = (\n id: string,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n claim?: Claim,\n field?: PresentationDefinitionField,\n): CredentialAttribute => {\n const attribute = shareCredentialCardAttributeFromClaim(id, config, testID, labels, claim, field);\n if (!claim) {\n return attribute;\n }\n return {\n ...attribute,\n rightAccessory: RequiredAttributeIcon,\n };\n};\n\nexport const selectCredentialCardFromCredential = (\n credential: CredentialDetail,\n selected: boolean,\n request: PresentationDefinitionRequestedCredential,\n config: Config,\n testID: string,\n labels: ShareCredentialCardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const selectiveDisclosureSupported = supportsSelectiveDisclosure(\n credential ? { ...credential, issuerDid: credential.issuerDid?.did } : undefined,\n config,\n );\n const rightAccessory = <Selector status={selected ? SelectorStatus.SelectedRadio : SelectorStatus.Empty} />;\n const notice: CredentialCardNotice | undefined =\n selectiveDisclosureSupported === false\n ? {\n text: labels.selectiveDisclosureNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n }\n : undefined;\n const { header, ...cardProps } = getCredentialCardPropsFromCredential(\n credential,\n credential.claims,\n config,\n notice,\n testID,\n labels,\n );\n const card = {\n header: {\n ...header,\n accessory: rightAccessory,\n },\n ...cardProps,\n };\n const attributes: CredentialAttribute[] = request.fields.map((field) => {\n const claim = spreadClaims(credential.claims).find(({ key }) => {\n return key === field.keyMap[credential.id];\n });\n\n const attribute = selectCredentialCardAttributeFromClaim(field.id, config, testID, labels, claim, field);\n return {\n ...attribute,\n rightAccessory: (\n <Selector status={field.required && !claim ? SelectorStatus.Rejected : SelectorStatus.Required} />\n ),\n };\n });\n return {\n attributes: nestAttributes(attributes),\n card,\n };\n};\n"],"mappings":"AAOA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAKEC,QAAQ,EACRC,cAAc,QACT,gCAAgC;AAEvC,SAASC,2BAA2B,EAAEC,qBAAqB,EAAEC,qBAAqB,QAAQ,2BAA2B;AACrH,SAASC,YAAY,QAAQ,WAAW;AACxC,SAEEC,6BAA6B,EAC7BC,oCAAoC,EACpCC,gBAAgB,EAChBC,cAAc,EACdC,2BAA2B,EAC3BC,aAAa,QACR,cAAc;AAErB,OAAO,MAAMC,iCAAiC,GAAGA,CAC/CC,UAA4B,EAC5BC,WAAoB,EACpBC,QAAiB,EACjBC,4BAAqC,EACrCC,MAAc,EACdC,MAAwC,EACxCC,MAAc,EACdC,MAAiC,KACmC;EACpE,IAAIC,sBASS;EACb,IAAIP,WAAW,EAAE;IACfO,sBAAsB,GAAG;MACvBC,0BAA0B,EAAE,IAAI;MAChCC,uBAAuB,EAAEH,MAAM,CAACI,OAAO;MACvCC,sBAAsB,EAAEpB,YAAY,CAACc,MAAM,EAAE,g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C,CAAC,CAAC;IAEF,MAAM8C,SAAS,GAAGuB,sCAAsC,CAACnE,KAAK,CAACF,EAAE,EAAEvB,MAAM,EAAEE,MAAM,EAAEC,MAAM,EAAEwB,KAAK,EAAEF,KAAK,CAAC;IACxG,OAAO;MACL,GAAG4C,SAAS;MACZO,cAAc,eACZ9F,KAAA,CAAA0F,aAAA,CAACzF,QAAQ;QAACsE,MAAM,EAAE5B,KAAK,CAACM,QAAQ,IAAI,CAACJ,KAAK,GAAG3C,cAAc,CAAC8C,QAAQ,GAAG9C,cAAc,CAACgD;MAAS;IAEnG,CAAC;EACH,CAAC,CAAC;EACF,OAAO;IACL0C,UAAU,EAAElF,cAAc,CAACkF,UAAU,CAAC;IACtC/D;EACF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { CredentialStateEnum, DataTypeEnum, FormatFeatureEnum } from '@procivis/react-native-one-core';
|
|
2
|
+
import { CredentialErrorIcon, CredentialNoticeWarningIcon, CredentialWarningIcon } from '../../ui-components/icons';
|
|
3
|
+
import { formatDateLocalized, formatDateTimeLocalized } from '../date';
|
|
4
|
+
import { concatTestID } from '../testID';
|
|
5
|
+
import { getCarouselImagesFromClaims } from './credential-images';
|
|
6
|
+
export let ValidityState;
|
|
7
|
+
(function (ValidityState) {
|
|
8
|
+
ValidityState["Revoked"] = "revoked";
|
|
9
|
+
ValidityState["Suspended"] = "suspended";
|
|
10
|
+
ValidityState["Valid"] = "valid";
|
|
11
|
+
})(ValidityState || (ValidityState = {}));
|
|
12
|
+
export const getValidityState = credential => {
|
|
13
|
+
if ((credential === null || credential === void 0 ? void 0 : credential.state) === CredentialStateEnum.REVOKED) {
|
|
14
|
+
return ValidityState.Revoked;
|
|
15
|
+
}
|
|
16
|
+
if ((credential === null || credential === void 0 ? void 0 : credential.state) === CredentialStateEnum.SUSPENDED) {
|
|
17
|
+
return ValidityState.Suspended;
|
|
18
|
+
}
|
|
19
|
+
return ValidityState.Valid;
|
|
20
|
+
};
|
|
21
|
+
export const supportsSelectiveDisclosure = (credential, config) => {
|
|
22
|
+
var _formatConfig$capabil, _formatConfig$capabil2;
|
|
23
|
+
const formatConfig = credential && (config === null || config === void 0 ? void 0 : config.format[credential.schema.format]);
|
|
24
|
+
return formatConfig ? Boolean((_formatConfig$capabil = formatConfig.capabilities) === null || _formatConfig$capabil === void 0 ? void 0 : (_formatConfig$capabil2 = _formatConfig$capabil.features) === null || _formatConfig$capabil2 === void 0 ? void 0 : _formatConfig$capabil2.includes(FormatFeatureEnum.SelectiveDisclosure)) : undefined;
|
|
25
|
+
};
|
|
26
|
+
const findClaimByPathParts = (path, claims) => {
|
|
27
|
+
if (!(claims !== null && claims !== void 0 && claims.length)) {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
const [first, second, ...rest] = path;
|
|
31
|
+
const claim = claims.find(c => c.key === first);
|
|
32
|
+
if (claim === undefined || second === undefined || claim.dataType !== DataTypeEnum.Object) {
|
|
33
|
+
return claim;
|
|
34
|
+
}
|
|
35
|
+
return findClaimByPathParts([`${first}/${second}`, ...rest], claim.value);
|
|
36
|
+
};
|
|
37
|
+
export const findClaimByPath = (path, claims) => path ? findClaimByPathParts(path.split('/'), claims) : undefined;
|
|
38
|
+
const formatCredentialDetail = (claim, config, testID) => {
|
|
39
|
+
var _attributeValue$value;
|
|
40
|
+
const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID);
|
|
41
|
+
return (_attributeValue$value = attributeValue.value) !== null && _attributeValue$value !== void 0 ? _attributeValue$value : '';
|
|
42
|
+
};
|
|
43
|
+
export const hasMsoValidityIssues = credential => {
|
|
44
|
+
const mdocMsoValidity = 'mdocMsoValidity' in credential ? credential.mdocMsoValidity : undefined;
|
|
45
|
+
const mdocMsoValidityIssue = Boolean((mdocMsoValidity === null || mdocMsoValidity === void 0 ? void 0 : mdocMsoValidity.nextUpdate) && new Date(mdocMsoValidity.nextUpdate) < new Date());
|
|
46
|
+
return mdocMsoValidityIssue;
|
|
47
|
+
};
|
|
48
|
+
export const cardHeaderFromCredential = function (credential) {
|
|
49
|
+
var _formatDateTimeLocali, _layoutProperties$log, _layoutProperties$log2, _layoutProperties$log3;
|
|
50
|
+
let claims = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
51
|
+
let config = arguments.length > 2 ? arguments[2] : undefined;
|
|
52
|
+
let testID = arguments.length > 3 ? arguments[3] : undefined;
|
|
53
|
+
let labels = arguments.length > 4 ? arguments[4] : undefined;
|
|
54
|
+
let credentialDetailPrimary = (_formatDateTimeLocali = formatDateTimeLocalized(new Date(credential.issuanceDate))) !== null && _formatDateTimeLocali !== void 0 ? _formatDateTimeLocali : '';
|
|
55
|
+
let credentialDetailSecondary;
|
|
56
|
+
let credentialDetailErrorColor;
|
|
57
|
+
let credentialDetailTestID;
|
|
58
|
+
let statusIcon;
|
|
59
|
+
const {
|
|
60
|
+
layoutProperties
|
|
61
|
+
} = credential.schema;
|
|
62
|
+
switch (credential.state) {
|
|
63
|
+
case CredentialStateEnum.SUSPENDED:
|
|
64
|
+
credentialDetailPrimary = credential.suspendEndDate ? labels.suspendedUntil(formatDateTimeLocalized(new Date(credential.suspendEndDate))) : labels.suspended;
|
|
65
|
+
credentialDetailTestID = concatTestID(testID, 'suspended');
|
|
66
|
+
statusIcon = CredentialWarningIcon;
|
|
67
|
+
break;
|
|
68
|
+
case CredentialStateEnum.REVOKED:
|
|
69
|
+
credentialDetailPrimary = labels.revoked;
|
|
70
|
+
credentialDetailErrorColor = true;
|
|
71
|
+
credentialDetailTestID = concatTestID(testID, 'revoked');
|
|
72
|
+
statusIcon = CredentialErrorIcon;
|
|
73
|
+
break;
|
|
74
|
+
default:
|
|
75
|
+
{
|
|
76
|
+
if (hasMsoValidityIssues(credential)) {
|
|
77
|
+
credentialDetailPrimary = labels.validityIssues;
|
|
78
|
+
credentialDetailTestID = concatTestID(testID, 'validity-issue');
|
|
79
|
+
statusIcon = CredentialWarningIcon;
|
|
80
|
+
} else {
|
|
81
|
+
const primary = findClaimByPath(layoutProperties === null || layoutProperties === void 0 ? void 0 : layoutProperties.primaryAttribute, claims);
|
|
82
|
+
if (primary) {
|
|
83
|
+
credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'));
|
|
84
|
+
}
|
|
85
|
+
const secondary = findClaimByPath(layoutProperties === null || layoutProperties === void 0 ? void 0 : layoutProperties.secondaryAttribute, claims);
|
|
86
|
+
if (secondary) {
|
|
87
|
+
credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'));
|
|
88
|
+
}
|
|
89
|
+
credentialDetailTestID = concatTestID(testID, 'detail');
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
color: layoutProperties === null || layoutProperties === void 0 ? void 0 : (_layoutProperties$log = layoutProperties.logo) === null || _layoutProperties$log === void 0 ? void 0 : _layoutProperties$log.backgroundColor,
|
|
96
|
+
credentialDetailErrorColor,
|
|
97
|
+
credentialDetailPrimary,
|
|
98
|
+
credentialDetailSecondary,
|
|
99
|
+
credentialDetailTestID,
|
|
100
|
+
credentialName: credential.schema.name,
|
|
101
|
+
icon: layoutProperties !== null && layoutProperties !== void 0 && (_layoutProperties$log2 = layoutProperties.logo) !== null && _layoutProperties$log2 !== void 0 && _layoutProperties$log2.image ? {
|
|
102
|
+
imageSource: {
|
|
103
|
+
uri: layoutProperties.logo.image
|
|
104
|
+
}
|
|
105
|
+
} : undefined,
|
|
106
|
+
iconLabelColor: layoutProperties === null || layoutProperties === void 0 ? void 0 : (_layoutProperties$log3 = layoutProperties.logo) === null || _layoutProperties$log3 === void 0 ? void 0 : _layoutProperties$log3.fontColor,
|
|
107
|
+
statusIcon,
|
|
108
|
+
testID
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export const getCredentialCardPropsFromCredential = function (credential) {
|
|
112
|
+
var _layoutProperties$bac, _layoutProperties$bac2;
|
|
113
|
+
let claims = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
114
|
+
let config = arguments.length > 2 ? arguments[2] : undefined;
|
|
115
|
+
let notice = arguments.length > 3 ? arguments[3] : undefined;
|
|
116
|
+
let testID = arguments.length > 4 ? arguments[4] : undefined;
|
|
117
|
+
let labels = arguments.length > 5 ? arguments[5] : undefined;
|
|
118
|
+
const {
|
|
119
|
+
layoutProperties
|
|
120
|
+
} = credential.schema;
|
|
121
|
+
if (hasMsoValidityIssues(credential)) {
|
|
122
|
+
notice = {
|
|
123
|
+
text: labels.validityIssuesNotice,
|
|
124
|
+
noticeIcon: CredentialNoticeWarningIcon
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const result = {
|
|
128
|
+
cardCarouselImages: getCarouselImagesFromClaims(claims, layoutProperties, concatTestID(testID, 'carousel')),
|
|
129
|
+
cardImage: layoutProperties !== null && layoutProperties !== void 0 && (_layoutProperties$bac = layoutProperties.background) !== null && _layoutProperties$bac !== void 0 && _layoutProperties$bac.image ? {
|
|
130
|
+
imageSource: {
|
|
131
|
+
uri: layoutProperties.background.image
|
|
132
|
+
}
|
|
133
|
+
} : undefined,
|
|
134
|
+
color: layoutProperties === null || layoutProperties === void 0 ? void 0 : (_layoutProperties$bac2 = layoutProperties.background) === null || _layoutProperties$bac2 === void 0 ? void 0 : _layoutProperties$bac2.color,
|
|
135
|
+
header: cardHeaderFromCredential(credential, claims, config, concatTestID(testID, 'header'), labels),
|
|
136
|
+
testID,
|
|
137
|
+
notice
|
|
138
|
+
};
|
|
139
|
+
return result;
|
|
140
|
+
};
|
|
141
|
+
export const detailsCardAttributeFromClaim = (claim, config, testID) => {
|
|
142
|
+
const value = detailsCardAttributeValueFromClaim(claim, config, testID);
|
|
143
|
+
return {
|
|
144
|
+
id: claim.id,
|
|
145
|
+
name: claim.key.split('/').pop(),
|
|
146
|
+
path: claim.key,
|
|
147
|
+
...value
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
const detailsCardAttributeValueFromClaim = (claim, config, testID) => {
|
|
151
|
+
const typeConfig = config === null || config === void 0 ? void 0 : config.datatype[claim.dataType];
|
|
152
|
+
if (claim.array) {
|
|
153
|
+
return {
|
|
154
|
+
values: claim.value.map((arrayValue, index) => {
|
|
155
|
+
return detailsCardAttributeFromClaim({
|
|
156
|
+
...arrayValue,
|
|
157
|
+
id: `${arrayValue.id}/${index}`
|
|
158
|
+
}, config, concatTestID(testID, index.toString()));
|
|
159
|
+
})
|
|
160
|
+
};
|
|
161
|
+
} else {
|
|
162
|
+
switch (typeConfig === null || typeConfig === void 0 ? void 0 : typeConfig.type) {
|
|
163
|
+
case DataTypeEnum.Object:
|
|
164
|
+
{
|
|
165
|
+
if (!Array.isArray(claim.value)) {
|
|
166
|
+
return {
|
|
167
|
+
attributes: []
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
attributes: claim.value.map((nestedClaim, index) => detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString())))
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
case DataTypeEnum.Date:
|
|
175
|
+
{
|
|
176
|
+
var _formatDateLocalized;
|
|
177
|
+
const date = claim.value;
|
|
178
|
+
return {
|
|
179
|
+
testID: testID,
|
|
180
|
+
value: (_formatDateLocalized = formatDateLocalized(new Date(date))) !== null && _formatDateLocalized !== void 0 ? _formatDateLocalized : date
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
case DataTypeEnum.File:
|
|
184
|
+
{
|
|
185
|
+
var _typeConfig$params;
|
|
186
|
+
if (((_typeConfig$params = typeConfig.params) === null || _typeConfig$params === void 0 ? void 0 : _typeConfig$params.showAs) === 'IMAGE') {
|
|
187
|
+
return {
|
|
188
|
+
image: {
|
|
189
|
+
uri: claim.value
|
|
190
|
+
},
|
|
191
|
+
testID: testID
|
|
192
|
+
};
|
|
193
|
+
} else {
|
|
194
|
+
return {
|
|
195
|
+
testID: testID,
|
|
196
|
+
value: claim.value
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
default:
|
|
201
|
+
return {
|
|
202
|
+
testID: testID,
|
|
203
|
+
value: String(claim.value)
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
export const detailsCardFromCredential = (credential, config, testID, labels) => {
|
|
209
|
+
return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels);
|
|
210
|
+
};
|
|
211
|
+
export const detailsCardFromCredentialWithClaims = (credential, claims, config, testID, labels) => {
|
|
212
|
+
const attributes = claims.map((claim, index) => detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString())));
|
|
213
|
+
const card = getCredentialCardPropsFromCredential(credential, claims, config, undefined, concatTestID(testID, 'card'), labels);
|
|
214
|
+
return {
|
|
215
|
+
attributes,
|
|
216
|
+
card
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
// Converts a flat list of attributes into a nested structure
|
|
221
|
+
// modifies the names to not include slashes
|
|
222
|
+
export const nestAttributes = attributes => {
|
|
223
|
+
const result = [];
|
|
224
|
+
for (const attribute of attributes) {
|
|
225
|
+
const attributePath = attribute.path.split('/');
|
|
226
|
+
if (attributePath.length === 0) {
|
|
227
|
+
result.push(attribute);
|
|
228
|
+
} else {
|
|
229
|
+
const [first, ...rest] = attributePath;
|
|
230
|
+
const parent = result.find(a => a.name === first);
|
|
231
|
+
if (parent) {
|
|
232
|
+
insertAttributeInObject({
|
|
233
|
+
...attribute,
|
|
234
|
+
path: rest.join('/')
|
|
235
|
+
}, parent);
|
|
236
|
+
} else {
|
|
237
|
+
result.push(nestAttributeInDummyObject(attribute));
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return result;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
// We nest the leaf node in a (one or more) nested object(s)
|
|
245
|
+
// to make sure the tree structure is correctly rendered in proof request screens.
|
|
246
|
+
const nestAttributeInDummyObject = attribute => {
|
|
247
|
+
const pathParts = attribute.path.split('/');
|
|
248
|
+
const [first, ...rest] = pathParts;
|
|
249
|
+
if (!rest.length) {
|
|
250
|
+
return attribute;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// The dummy object is not selectable, and contains a placeholder ID
|
|
254
|
+
// the user can't interact with it.
|
|
255
|
+
return {
|
|
256
|
+
attributes: [nestAttributeInDummyObject({
|
|
257
|
+
...attribute,
|
|
258
|
+
path: rest.join('/')
|
|
259
|
+
})],
|
|
260
|
+
disabled: true,
|
|
261
|
+
id: `${attribute.id}/${first}`,
|
|
262
|
+
name: first,
|
|
263
|
+
path: attribute.path
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
// Recursively insert an attribute into an object
|
|
268
|
+
// Will create nested objects if necessary
|
|
269
|
+
const insertAttributeInObject = (attribute, object) => {
|
|
270
|
+
var _object$attributes;
|
|
271
|
+
const pathParts = attribute.path.split('/');
|
|
272
|
+
const [first, ...rest] = pathParts;
|
|
273
|
+
const nextParent = (_object$attributes = object.attributes) === null || _object$attributes === void 0 ? void 0 : _object$attributes.find(a => a.name === first);
|
|
274
|
+
if (!nextParent) {
|
|
275
|
+
var _object$attributes2;
|
|
276
|
+
(_object$attributes2 = object.attributes) === null || _object$attributes2 === void 0 ? void 0 : _object$attributes2.push(nestAttributeInDummyObject(attribute));
|
|
277
|
+
} else {
|
|
278
|
+
insertAttributeInObject({
|
|
279
|
+
...attribute,
|
|
280
|
+
path: rest.join('/')
|
|
281
|
+
}, nextParent);
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
function parseBase64Image(image) {
|
|
285
|
+
return image ? '__BASE64IMAGE__' : '';
|
|
286
|
+
}
|
|
287
|
+
export function getCredentialSchemaWithoutImages(credentialSchema) {
|
|
288
|
+
var _credentialSchema$lay, _credentialSchema$lay2, _credentialSchema$lay3, _credentialSchema$lay4, _credentialSchema$lay5, _credentialSchema$lay6;
|
|
289
|
+
return {
|
|
290
|
+
...credentialSchema,
|
|
291
|
+
layoutProperties: {
|
|
292
|
+
...credentialSchema.layoutProperties,
|
|
293
|
+
background: {
|
|
294
|
+
...((_credentialSchema$lay = credentialSchema.layoutProperties) === null || _credentialSchema$lay === void 0 ? void 0 : _credentialSchema$lay.background),
|
|
295
|
+
image: parseBase64Image((_credentialSchema$lay2 = credentialSchema.layoutProperties) === null || _credentialSchema$lay2 === void 0 ? void 0 : (_credentialSchema$lay3 = _credentialSchema$lay2.background) === null || _credentialSchema$lay3 === void 0 ? void 0 : _credentialSchema$lay3.image)
|
|
296
|
+
},
|
|
297
|
+
logo: {
|
|
298
|
+
...((_credentialSchema$lay4 = credentialSchema.layoutProperties) === null || _credentialSchema$lay4 === void 0 ? void 0 : _credentialSchema$lay4.logo),
|
|
299
|
+
image: parseBase64Image((_credentialSchema$lay5 = credentialSchema.layoutProperties) === null || _credentialSchema$lay5 === void 0 ? void 0 : (_credentialSchema$lay6 = _credentialSchema$lay5.logo) === null || _credentialSchema$lay6 === void 0 ? void 0 : _credentialSchema$lay6.image)
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
//# sourceMappingURL=credential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CredentialStateEnum","DataTypeEnum","FormatFeatureEnum","CredentialErrorIcon","CredentialNoticeWarningIcon","CredentialWarningIcon","formatDateLocalized","formatDateTimeLocalized","concatTestID","getCarouselImagesFromClaims","ValidityState","getValidityState","credential","state","REVOKED","Revoked","SUSPENDED","Suspended","Valid","supportsSelectiveDisclosure","config","_formatConfig$capabil","_formatConfig$capabil2","formatConfig","format","schema","Boolean","capabilities","features","includes","SelectiveDisclosure","undefined","findClaimByPathParts","path","claims","length","first","second","rest","claim","find","c","key","dataType","Object","value","findClaimByPath","split","formatCredentialDetail","testID","_attributeValue$value","attributeValue","detailsCardAttributeValueFromClaim","hasMsoValidityIssues","mdocMsoValidity","mdocMsoValidityIssue","nextUpdate","Date","cardHeaderFromCredential","_formatDateTimeLocali","_layoutProperties$log","_layoutProperties$log2","_layoutProperties$log3","arguments","labels","credentialDetailPrimary","issuanceDate","credentialDetailSecondary","credentialDetailErrorColor","credentialDetailTestID","statusIcon","layoutProperties","suspendEndDate","suspendedUntil","suspended","revoked","validityIssues","primary","primaryAttribute","secondary","secondaryAttribute","color","logo","backgroundColor","credentialName","name","icon","image","imageSource","uri","iconLabelColor","fontColor","getCredentialCardPropsFromCredential","_layoutProperties$bac","_layoutProperties$bac2","notice","text","validityIssuesNotice","noticeIcon","result","cardCarouselImages","cardImage","background","header","detailsCardAttributeFromClaim","id","pop","typeConfig","datatype","array","values","map","arrayValue","index","toString","type","Array","isArray","attributes","nestedClaim","_formatDateLocalized","date","File","_typeConfig$params","params","showAs","String","detailsCardFromCredential","detailsCardFromCredentialWithClaims","card","nestAttributes","attribute","attributePath","push","parent","a","insertAttributeInObject","join","nestAttributeInDummyObject","pathParts","disabled","object","_object$attributes","nextParent","_object$attributes2","parseBase64Image","getCredentialSchemaWithoutImages","credentialSchema","_credentialSchema$lay","_credentialSchema$lay2","_credentialSchema$lay3","_credentialSchema$lay4","_credentialSchema$lay5","_credentialSchema$lay6"],"sources":["credential.ts"],"sourcesContent":["import {\n Claim,\n Config,\n CredentialDetail,\n CredentialListItem,\n CredentialSchema,\n CredentialStateEnum,\n DataTypeEnum,\n FormatFeatureEnum,\n} from '@procivis/react-native-one-core';\n\nimport {\n CredentialAttribute,\n CredentialAttributeValue,\n CredentialCardProps,\n CredentialDetailsCardProps,\n CredentialHeaderProps,\n} from '../../ui-components/credential';\nimport { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';\nimport { CredentialErrorIcon, CredentialNoticeWarningIcon, CredentialWarningIcon } from '../../ui-components/icons';\nimport { formatDateLocalized, formatDateTimeLocalized } from '../date';\nimport { concatTestID } from '../testID';\nimport { getCarouselImagesFromClaims } from './credential-images';\n\nexport enum ValidityState {\n Revoked = 'revoked',\n Suspended = 'suspended',\n Valid = 'valid',\n}\n\nexport const getValidityState = (credential: CredentialListItem | undefined) => {\n if (credential?.state === CredentialStateEnum.REVOKED) {\n return ValidityState.Revoked;\n }\n if (credential?.state === CredentialStateEnum.SUSPENDED) {\n return ValidityState.Suspended;\n }\n return ValidityState.Valid;\n};\n\nexport const supportsSelectiveDisclosure = (credential: CredentialListItem | undefined, config: Config | undefined) => {\n const formatConfig = credential && config?.format[credential.schema.format];\n return formatConfig\n ? Boolean(formatConfig.capabilities?.features?.includes(FormatFeatureEnum.SelectiveDisclosure))\n : undefined;\n};\n\nconst findClaimByPathParts = (path: string[], claims?: Claim[]): Claim | undefined => {\n if (!claims?.length) {\n return undefined;\n }\n const [first, second, ...rest] = path;\n const claim = claims.find((c) => c.key === first);\n if (claim === undefined || second === undefined || claim.dataType !== DataTypeEnum.Object) {\n return claim;\n }\n\n return findClaimByPathParts([`${first}/${second}`, ...rest], claim.value as Claim[]);\n};\n\nexport const findClaimByPath = (path: string | undefined, claims: Claim[] | undefined) =>\n path ? findClaimByPathParts(path.split('/'), claims) : undefined;\n\nconst formatCredentialDetail = (claim: Claim, config: Config, testID: string): string => {\n const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID);\n return attributeValue.value ?? '';\n};\n\nexport const hasMsoValidityIssues = (credential: CredentialDetail): boolean => {\n const mdocMsoValidity: { nextUpdate: string } | undefined =\n 'mdocMsoValidity' in credential ? (credential.mdocMsoValidity as { nextUpdate: string }) : undefined;\n\n const mdocMsoValidityIssue = Boolean(\n mdocMsoValidity?.nextUpdate && new Date(mdocMsoValidity.nextUpdate) < new Date(),\n );\n\n return mdocMsoValidityIssue;\n};\n\nexport type CardHeaderLabels = {\n validityIssues: string;\n revoked: string;\n suspended: string;\n suspendedUntil: (date: string) => string;\n};\n\nexport const cardHeaderFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n testID: string,\n labels: CardHeaderLabels,\n): Omit<CredentialHeaderProps, 'style'> => {\n let credentialDetailPrimary = formatDateTimeLocalized(new Date(credential.issuanceDate)) ?? '';\n\n let credentialDetailSecondary: string | undefined;\n let credentialDetailErrorColor: boolean | undefined;\n let credentialDetailTestID: string | undefined;\n let statusIcon;\n\n const { layoutProperties } = credential.schema;\n\n switch (credential.state) {\n case CredentialStateEnum.SUSPENDED:\n credentialDetailPrimary = credential.suspendEndDate\n ? labels.suspendedUntil(formatDateTimeLocalized(new Date(credential.suspendEndDate))!)\n : labels.suspended;\n credentialDetailTestID = concatTestID(testID, 'suspended');\n statusIcon = CredentialWarningIcon;\n break;\n case CredentialStateEnum.REVOKED:\n credentialDetailPrimary = labels.revoked;\n credentialDetailErrorColor = true;\n credentialDetailTestID = concatTestID(testID, 'revoked');\n statusIcon = CredentialErrorIcon;\n break;\n default: {\n if (hasMsoValidityIssues(credential)) {\n credentialDetailPrimary = labels.validityIssues;\n credentialDetailTestID = concatTestID(testID, 'validity-issue');\n statusIcon = CredentialWarningIcon;\n } else {\n const primary = findClaimByPath(layoutProperties?.primaryAttribute, claims);\n\n if (primary) {\n credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'));\n }\n\n const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);\n\n if (secondary) {\n credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'));\n }\n\n credentialDetailTestID = concatTestID(testID, 'detail');\n }\n break;\n }\n }\n return {\n color: layoutProperties?.logo?.backgroundColor,\n credentialDetailErrorColor,\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialName: credential.schema.name,\n icon: layoutProperties?.logo?.image\n ? {\n imageSource: {\n uri: layoutProperties.logo.image,\n },\n }\n : undefined,\n iconLabelColor: layoutProperties?.logo?.fontColor,\n statusIcon,\n testID,\n };\n};\n\nexport type CardLabels = CardHeaderLabels & {\n validityIssuesNotice: string;\n};\n\nexport const getCredentialCardPropsFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style'> => {\n const { layoutProperties } = credential.schema;\n\n if (hasMsoValidityIssues(credential)) {\n notice = {\n text: labels.validityIssuesNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n };\n }\n\n const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style'> = {\n cardCarouselImages: getCarouselImagesFromClaims(claims, layoutProperties, concatTestID(testID, 'carousel')),\n cardImage: layoutProperties?.background?.image\n ? { imageSource: { uri: layoutProperties.background.image } }\n : undefined,\n color: layoutProperties?.background?.color,\n header: cardHeaderFromCredential(credential, claims, config, concatTestID(testID, 'header'), labels),\n testID,\n notice,\n };\n\n return result;\n};\n\nexport const detailsCardAttributeFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttribute => {\n const value = detailsCardAttributeValueFromClaim(claim, config, testID);\n return {\n id: claim.id,\n name: claim.key.split('/').pop(),\n path: claim.key,\n ...value,\n };\n};\n\nconst detailsCardAttributeValueFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttributeValue => {\n const typeConfig = config?.datatype[claim.dataType];\n\n if (claim.array) {\n return {\n values: claim.value.map((arrayValue, index) => {\n return detailsCardAttributeFromClaim(\n {\n ...arrayValue,\n id: `${arrayValue.id}/${index}`,\n },\n config,\n concatTestID(testID, index.toString()),\n );\n }),\n };\n } else {\n switch (typeConfig?.type) {\n case DataTypeEnum.Object: {\n if (!Array.isArray(claim.value)) {\n return { attributes: [] };\n }\n return {\n attributes: (claim.value as Claim[]).map((nestedClaim, index) =>\n detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString())),\n ),\n };\n }\n case DataTypeEnum.Date: {\n const date = claim.value as string;\n return {\n testID: testID,\n value: formatDateLocalized(new Date(date)) ?? date,\n };\n }\n case DataTypeEnum.File: {\n if (typeConfig.params?.showAs === 'IMAGE') {\n return { image: { uri: claim.value as string }, testID: testID };\n } else {\n return { testID: testID, value: claim.value as string };\n }\n }\n default:\n return { testID: testID, value: String(claim.value) };\n }\n }\n};\n\nexport const detailsCardFromCredential = (\n credential: CredentialDetail,\n config: Config,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels);\n};\n\nexport const detailsCardFromCredentialWithClaims = (\n credential: CredentialDetail,\n claims: Claim[],\n config: Config,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialDetailsCardProps, 'expanded'> => {\n const attributes: CredentialAttribute[] = claims.map((claim, index) =>\n detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString())),\n );\n\n const card = getCredentialCardPropsFromCredential(\n credential,\n claims,\n config,\n undefined,\n concatTestID(testID, 'card'),\n labels,\n );\n\n return {\n attributes,\n card,\n };\n};\n\n// Converts a flat list of attributes into a nested structure\n// modifies the names to not include slashes\nexport const nestAttributes = (attributes: CredentialAttribute[]): CredentialAttribute[] => {\n const result: CredentialAttribute[] = [];\n\n for (const attribute of attributes) {\n const attributePath = attribute.path.split('/');\n if (attributePath.length === 0) {\n result.push(attribute);\n } else {\n const [first, ...rest] = attributePath;\n const parent = result.find((a) => a.name === first);\n if (parent) {\n insertAttributeInObject({ ...attribute, path: rest.join('/') }, parent);\n } else {\n result.push(nestAttributeInDummyObject(attribute));\n }\n }\n }\n\n return result;\n};\n\n// We nest the leaf node in a (one or more) nested object(s)\n// to make sure the tree structure is correctly rendered in proof request screens.\nconst nestAttributeInDummyObject = (attribute: CredentialAttribute): CredentialAttribute => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n if (!rest.length) {\n return attribute;\n }\n\n // The dummy object is not selectable, and contains a placeholder ID\n // the user can't interact with it.\n return {\n attributes: [nestAttributeInDummyObject({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: attribute.path,\n };\n};\n\n// Recursively insert an attribute into an object\n// Will create nested objects if necessary\nconst insertAttributeInObject = (attribute: CredentialAttribute, object: CredentialAttribute) => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n\n const nextParent = object.attributes?.find((a) => a.name === first);\n\n if (!nextParent) {\n object.attributes?.push(nestAttributeInDummyObject(attribute));\n } else {\n insertAttributeInObject({ ...attribute, path: rest.join('/') }, nextParent);\n }\n};\n\nfunction parseBase64Image(image: string | undefined) {\n return image ? '__BASE64IMAGE__' : '';\n}\n\nexport function getCredentialSchemaWithoutImages(credentialSchema: CredentialSchema) {\n return {\n ...credentialSchema,\n layoutProperties: {\n ...credentialSchema.layoutProperties,\n background: {\n ...credentialSchema.layoutProperties?.background,\n image: parseBase64Image(credentialSchema.layoutProperties?.background?.image),\n },\n logo: {\n ...credentialSchema.layoutProperties?.logo,\n image: parseBase64Image(credentialSchema.layoutProperties?.logo?.image),\n },\n },\n };\n}\n"],"mappings":"AAAA,SAMEA,mBAAmB,EACnBC,YAAY,EACZC,iBAAiB,QACZ,iCAAiC;AAUxC,SAASC,mBAAmB,EAAEC,2BAA2B,EAAEC,qBAAqB,QAAQ,2BAA2B;AACnH,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,SAAS;AACtE,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,2BAA2B,QAAQ,qBAAqB;AAEjE,WAAYC,aAAa;AAIxB,WAJWA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa;AAMzB,OAAO,MAAMC,gBAAgB,GAAIC,UAA0C,IAAK;EAC9E,IAAI,CAAAA,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,KAAK,MAAKb,mBAAmB,CAACc,OAAO,EAAE;IACrD,OAAOJ,aAAa,CAACK,OAAO;EAC9B;EACA,IAAI,CAAAH,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,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AA,GAAjCD,sBAAA,CAAmCtE,IAAI,cAAAuE,sBAAA,uBAAvCA,sBAAA,CAAyClE,KAAK;MACxE;IACF;EACF,CAAC;AACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './credential';\nexport * from './credential-images';\nexport * from './credential-sharing';\nexport * from './query';\n"],"mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,qBAAqB;AACnC,cAAc,sBAAsB;AACpC,cAAc,SAAS"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export const getQueryKeyFromCredentialListQueryParams = queryParams => {
|
|
2
|
+
if (!queryParams) {
|
|
3
|
+
return [];
|
|
4
|
+
}
|
|
5
|
+
const {
|
|
6
|
+
name,
|
|
7
|
+
sort,
|
|
8
|
+
sortDirection,
|
|
9
|
+
exact,
|
|
10
|
+
role,
|
|
11
|
+
ids,
|
|
12
|
+
status,
|
|
13
|
+
include
|
|
14
|
+
} = queryParams;
|
|
15
|
+
return [name, sort, sortDirection, exact, role, ids, status, include];
|
|
16
|
+
};
|
|
17
|
+
export const getQueryKeyFromHistoryListQueryParams = queryParams => {
|
|
18
|
+
if (!queryParams) {
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
const {
|
|
22
|
+
entityId,
|
|
23
|
+
action,
|
|
24
|
+
entityTypes,
|
|
25
|
+
createdDateFrom,
|
|
26
|
+
createdDateTo,
|
|
27
|
+
didId,
|
|
28
|
+
credentialId,
|
|
29
|
+
credentialSchemaId,
|
|
30
|
+
searchText,
|
|
31
|
+
searchType
|
|
32
|
+
} = queryParams;
|
|
33
|
+
return [entityId, action, entityTypes, createdDateFrom, createdDateTo, didId, credentialId, credentialSchemaId, searchText, searchType];
|
|
34
|
+
};
|
|
35
|
+
export const getQueryKeyFromCredentialSchemaListQueryParams = queryParams => {
|
|
36
|
+
if (!queryParams) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
const {
|
|
40
|
+
name,
|
|
41
|
+
sort,
|
|
42
|
+
sortDirection,
|
|
43
|
+
exact,
|
|
44
|
+
ids,
|
|
45
|
+
include
|
|
46
|
+
} = queryParams;
|
|
47
|
+
return [name, sort, sortDirection, exact, ids, include];
|
|
48
|
+
};
|
|
49
|
+
export const getQueryKeyFromProofSchemaListQueryParams = queryParams => {
|
|
50
|
+
if (!queryParams) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
const {
|
|
54
|
+
name,
|
|
55
|
+
sort,
|
|
56
|
+
sortDirection,
|
|
57
|
+
exact,
|
|
58
|
+
ids
|
|
59
|
+
} = queryParams;
|
|
60
|
+
return [name, sort, sortDirection, exact, ids];
|
|
61
|
+
};
|
|
62
|
+
export const getQueryKeyFromProofListQueryParams = queryParams => {
|
|
63
|
+
if (!queryParams) {
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
const {
|
|
67
|
+
name,
|
|
68
|
+
sort,
|
|
69
|
+
sortDirection,
|
|
70
|
+
exact,
|
|
71
|
+
ids,
|
|
72
|
+
proofStates,
|
|
73
|
+
proofSchemaIds
|
|
74
|
+
} = queryParams;
|
|
75
|
+
return [name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds];
|
|
76
|
+
};
|
|
77
|
+
export const getQueryKeyFromDidListQueryParams = queryParams => {
|
|
78
|
+
if (!queryParams) {
|
|
79
|
+
return [];
|
|
80
|
+
}
|
|
81
|
+
const {
|
|
82
|
+
name,
|
|
83
|
+
did,
|
|
84
|
+
type,
|
|
85
|
+
deactivated,
|
|
86
|
+
keyAlgorithms,
|
|
87
|
+
keyRoles
|
|
88
|
+
} = queryParams;
|
|
89
|
+
return [name, did, type, deactivated, keyAlgorithms, keyRoles];
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getQueryKeyFromCredentialListQueryParams","queryParams","name","sort","sortDirection","exact","role","ids","status","include","getQueryKeyFromHistoryListQueryParams","entityId","action","entityTypes","createdDateFrom","createdDateTo","didId","credentialId","credentialSchemaId","searchText","searchType","getQueryKeyFromCredentialSchemaListQueryParams","getQueryKeyFromProofSchemaListQueryParams","getQueryKeyFromProofListQueryParams","proofStates","proofSchemaIds","getQueryKeyFromDidListQueryParams","did","type","deactivated","keyAlgorithms","keyRoles"],"sources":["query.tsx"],"sourcesContent":["import {\n CredentialListQuery,\n CredentialSchemaListQuery,\n DidListQuery,\n HistoryListQuery,\n ProofListQuery,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\n\nexport const getQueryKeyFromCredentialListQueryParams = (queryParams?: Partial<CredentialListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, role, ids, status, include } = queryParams;\n return [name, sort, sortDirection, exact, role, ids, status, include];\n};\n\nexport const getQueryKeyFromHistoryListQueryParams = (queryParams?: Partial<HistoryListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const {\n entityId,\n action,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n didId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n } = queryParams;\n return [\n entityId,\n action,\n entityTypes,\n createdDateFrom,\n createdDateTo,\n didId,\n credentialId,\n credentialSchemaId,\n searchText,\n searchType,\n ];\n};\n\nexport const getQueryKeyFromCredentialSchemaListQueryParams = (queryParams?: Partial<CredentialSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, include } = queryParams;\n return [name, sort, sortDirection, exact, ids, include];\n};\n\nexport const getQueryKeyFromProofSchemaListQueryParams = (queryParams?: Partial<ProofSchemaListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids } = queryParams;\n return [name, sort, sortDirection, exact, ids];\n};\n\nexport const getQueryKeyFromProofListQueryParams = (queryParams?: Partial<ProofListQuery>) => {\n if (!queryParams) {\n return [];\n }\n const { name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds } = queryParams;\n return [name, sort, sortDirection, exact, ids, proofStates, proofSchemaIds];\n};\n\nexport const getQueryKeyFromDidListQueryParams = (queryParams?: Partial<DidListQuery>) => {\n if (!queryParams) {\n return [];\n }\n\n const { name, did, type, deactivated, keyAlgorithms, keyRoles } = queryParams;\n return [name, did, type, deactivated, keyAlgorithms, keyRoles];\n};\n"],"mappings":"AASA,OAAO,MAAMA,wCAAwC,GAAIC,WAA0C,IAAK;EACtG,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,aAAa;IAAEC,KAAK;IAAEC,IAAI;IAAEC,GAAG;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GAAGR,WAAW;EACpF,OAAO,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,KAAK,EAAEC,IAAI,EAAEC,GAAG,EAAEC,MAAM,EAAEC,OAAO,CAAC;AACvE,CAAC;AAED,OAAO,MAAMC,qCAAqC,GAAIT,WAAuC,IAAK;EAChG,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EAEA,MAAM;IACJU,QAAQ;IACRC,MAAM;IACNC,WAAW;IACXC,eAAe;IACfC,aAAa;IACbC,KAAK;IACLC,YAAY;IACZC,kBAAkB;IAClBC,UAAU;IACVC;EACF,CAAC,GAAGnB,WAAW;EACf,OAAO,CACLU,QAAQ,EACRC,MAAM,EACNC,WAAW,EACXC,eAAe,EACfC,aAAa,EACbC,KAAK,EACLC,YAAY,EACZC,kBAAkB,EAClBC,UAAU,EACVC,UAAU,CACX;AACH,CAAC;AAED,OAAO,MAAMC,8CAA8C,GAAIpB,WAAgD,IAAK;EAClH,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,aAAa;IAAEC,KAAK;IAAEE,GAAG;IAAEE;EAAQ,CAAC,GAAGR,WAAW;EACtE,OAAO,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,KAAK,EAAEE,GAAG,EAAEE,OAAO,CAAC;AACzD,CAAC;AAED,OAAO,MAAMa,yCAAyC,GAAIrB,WAA2C,IAAK;EACxG,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,aAAa;IAAEC,KAAK;IAAEE;EAAI,CAAC,GAAGN,WAAW;EAC7D,OAAO,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,KAAK,EAAEE,GAAG,CAAC;AAChD,CAAC;AAED,OAAO,MAAMgB,mCAAmC,GAAItB,WAAqC,IAAK;EAC5F,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EACA,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,aAAa;IAAEC,KAAK;IAAEE,GAAG;IAAEiB,WAAW;IAAEC;EAAe,CAAC,GAAGxB,WAAW;EAC1F,OAAO,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,KAAK,EAAEE,GAAG,EAAEiB,WAAW,EAAEC,cAAc,CAAC;AAC7E,CAAC;AAED,OAAO,MAAMC,iCAAiC,GAAIzB,WAAmC,IAAK;EACxF,IAAI,CAACA,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EAEA,MAAM;IAAEC,IAAI;IAAEyB,GAAG;IAAEC,IAAI;IAAEC,WAAW;IAAEC,aAAa;IAAEC;EAAS,CAAC,GAAG9B,WAAW;EAC7E,OAAO,CAACC,IAAI,EAAEyB,GAAG,EAAEC,IAAI,EAAEC,WAAW,EAAEC,aAAa,EAAEC,QAAQ,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { OneError } from '@procivis/react-native-one-core';
|
|
2
|
+
import * as Sentry from '@sentry/react-native';
|
|
3
|
+
export function reportError(message) {
|
|
4
|
+
if (!__DEV__) {
|
|
5
|
+
try {
|
|
6
|
+
Sentry.captureException(new Error(message));
|
|
7
|
+
} catch (error) {
|
|
8
|
+
// do nothing
|
|
9
|
+
}
|
|
10
|
+
} else {
|
|
11
|
+
console.warn('reportError:', message);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const getDebugExceptionInfo = (error, message) => {
|
|
15
|
+
if (error instanceof OneError) {
|
|
16
|
+
let info = `[${error.code}](${error.message})`;
|
|
17
|
+
if (error.cause) {
|
|
18
|
+
info = `${info}: ${error.cause}`;
|
|
19
|
+
}
|
|
20
|
+
return message ? `(${message}, ${info})` : info;
|
|
21
|
+
}
|
|
22
|
+
return message ? `(${message})` : '';
|
|
23
|
+
};
|
|
24
|
+
export function reportException(e, message) {
|
|
25
|
+
if (!__DEV__) {
|
|
26
|
+
try {
|
|
27
|
+
Sentry.withScope(scope => {
|
|
28
|
+
if (message) {
|
|
29
|
+
scope.setExtra('message', message);
|
|
30
|
+
}
|
|
31
|
+
if (e instanceof OneError) {
|
|
32
|
+
var _e$cause;
|
|
33
|
+
// prevent reporting specific errors
|
|
34
|
+
if ((_e$cause = e.cause) !== null && _e$cause !== void 0 && _e$cause.includes('BLE adapter not enabled')) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
scope.setExtra('operation', e.operation);
|
|
38
|
+
scope.setExtra('code', e.code);
|
|
39
|
+
scope.setExtra('codeMessage', e.message);
|
|
40
|
+
if (e.cause) {
|
|
41
|
+
scope.setExtra('cause', e.cause);
|
|
42
|
+
}
|
|
43
|
+
Sentry.captureException(e.originalError);
|
|
44
|
+
} else {
|
|
45
|
+
Sentry.captureException(e);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
} catch (error) {
|
|
49
|
+
// do nothing
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
const info = getDebugExceptionInfo(e, message);
|
|
53
|
+
console.warn(`reportException${info}`, e, e instanceof Error ? e.stack : undefined);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export function reportTraceInfo(category, message, data) {
|
|
57
|
+
if (!__DEV__) {
|
|
58
|
+
try {
|
|
59
|
+
Sentry.addBreadcrumb({
|
|
60
|
+
category,
|
|
61
|
+
data,
|
|
62
|
+
level: 'log',
|
|
63
|
+
message
|
|
64
|
+
});
|
|
65
|
+
} catch (error) {
|
|
66
|
+
// do nothing
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
const logged = [category, message];
|
|
70
|
+
if (data) {
|
|
71
|
+
logged.push(data);
|
|
72
|
+
}
|
|
73
|
+
console.log(...logged);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=reporting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["OneError","Sentry","reportError","message","__DEV__","captureException","Error","error","console","warn","getDebugExceptionInfo","info","code","cause","reportException","e","withScope","scope","setExtra","_e$cause","includes","operation","originalError","stack","undefined","reportTraceInfo","category","data","addBreadcrumb","level","logged","push","log"],"sources":["reporting.ts"],"sourcesContent":["import { OneError } from '@procivis/react-native-one-core';\nimport * as Sentry from '@sentry/react-native';\n\nexport function reportError(message: string) {\n if (!__DEV__) {\n try {\n Sentry.captureException(new Error(message));\n } catch (error) {\n // do nothing\n }\n } else {\n console.warn('reportError:', message);\n }\n}\n\nconst getDebugExceptionInfo = (error: unknown, message: string | undefined) => {\n if (error instanceof OneError) {\n let info = `[${error.code}](${error.message})`;\n if (error.cause) {\n info = `${info}: ${error.cause}`;\n }\n return message ? `(${message}, ${info})` : info;\n }\n\n return message ? `(${message})` : '';\n};\n\nexport function reportException(e: unknown, message?: string) {\n if (!__DEV__) {\n try {\n Sentry.withScope((scope) => {\n if (message) {\n scope.setExtra('message', message);\n }\n\n if (e instanceof OneError) {\n // prevent reporting specific errors\n if (e.cause?.includes('BLE adapter not enabled')) {\n return;\n }\n\n scope.setExtra('operation', e.operation);\n scope.setExtra('code', e.code);\n scope.setExtra('codeMessage', e.message);\n if (e.cause) {\n scope.setExtra('cause', e.cause);\n }\n\n Sentry.captureException(e.originalError);\n } else {\n Sentry.captureException(e);\n }\n });\n } catch (error) {\n // do nothing\n }\n } else {\n const info = getDebugExceptionInfo(e, message);\n console.warn(`reportException${info}`, e, e instanceof Error ? e.stack : undefined);\n }\n}\n\nexport function reportTraceInfo(category: string, message?: string, data?: Sentry.Breadcrumb['data']) {\n if (!__DEV__) {\n try {\n Sentry.addBreadcrumb({\n category,\n data,\n level: 'log',\n message,\n });\n } catch (error) {\n // do nothing\n }\n } else {\n const logged: unknown[] = [category, message];\n\n if (data) {\n logged.push(data);\n }\n\n console.log(...logged);\n }\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,iCAAiC;AAC1D,OAAO,KAAKC,MAAM,MAAM,sBAAsB;AAE9C,OAAO,SAASC,WAAWA,CAACC,OAAe,EAAE;EAC3C,IAAI,CAACC,OAAO,EAAE;IACZ,IAAI;MACFH,MAAM,CAACI,gBAAgB,CAAC,IAAIC,KAAK,CAACH,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd;IAAA;EAEJ,CAAC,MAAM;IACLC,OAAO,CAACC,IAAI,CAAC,cAAc,EAAEN,OAAO,CAAC;EACvC;AACF;AAEA,MAAMO,qBAAqB,GAAGA,CAACH,KAAc,EAAEJ,OAA2B,KAAK;EAC7E,IAAII,KAAK,YAAYP,QAAQ,EAAE;IAC7B,IAAIW,IAAI,GAAI,IAAGJ,KAAK,CAACK,IAAK,KAAIL,KAAK,CAACJ,OAAQ,GAAE;IAC9C,IAAII,KAAK,CAACM,KAAK,EAAE;MACfF,IAAI,GAAI,GAAEA,IAAK,KAAIJ,KAAK,CAACM,KAAM,EAAC;IAClC;IACA,OAAOV,OAAO,GAAI,IAAGA,OAAQ,KAAIQ,IAAK,GAAE,GAAGA,IAAI;EACjD;EAEA,OAAOR,OAAO,GAAI,IAAGA,OAAQ,GAAE,GAAG,EAAE;AACtC,CAAC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EAAEwB,IAAgC,EAAE;EACpG,IAAI,CAACvB,OAAO,EAAE;IACZ,IAAI;MACFH,MAAM,CAAC2B,aAAa,CAAC;QACnBF,QAAQ;QACRC,IAAI;QACJE,KAAK,EAAE,KAAK;QACZ1B;MACF,CAAC,CAAC;IACJ,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd;IAAA;EAEJ,CAAC,MAAM;IACL,MAAMuB,MAAiB,GAAG,CAACJ,QAAQ,EAAEvB,OAAO,CAAC;IAE7C,IAAIwB,IAAI,EAAE;MACRG,MAAM,CAACC,IAAI,CAACJ,IAAI,CAAC;IACnB;IAEAnB,OAAO,CAACwB,GAAG,CAAC,GAAGF,MAAM,CAAC;EACxB;AACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const capitalizeFirstLetter = string => {
|
|
2
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
3
|
+
};
|
|
4
|
+
export const capitalize = str => str === null || str === void 0 ? void 0 : str.split(' ').filter(x => x).map(x => x.charAt(0).toUpperCase() + x.substring(1).toLowerCase()).join(' ');
|
|
5
|
+
export const replaceBreakingHyphens = str => str.replace(/-/g, '\u2011');
|
|
6
|
+
export const isASCII = str => {
|
|
7
|
+
// eslint-disable-next-line no-control-regex
|
|
8
|
+
return /^[\x00-\xFF]*$/.test(str);
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=string.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["capitalizeFirstLetter","string","charAt","toUpperCase","slice","capitalize","str","split","filter","x","map","substring","toLowerCase","join","replaceBreakingHyphens","replace","isASCII","test"],"sources":["string.ts"],"sourcesContent":["export const capitalizeFirstLetter = (string: string) => {\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nexport const capitalize = (str: string): string =>\n str\n ?.split(' ')\n .filter((x) => x)\n .map((x) => x.charAt(0).toUpperCase() + x.substring(1).toLowerCase())\n .join(' ');\n\nexport const replaceBreakingHyphens = (str: string): string => str.replace(/-/g, '\\u2011');\n\nexport const isASCII = (str: string) => {\n // eslint-disable-next-line no-control-regex\n return /^[\\x00-\\xFF]*$/.test(str);\n};\n"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB,GAAIC,MAAc,IAAK;EACvD,OAAOA,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,GAAGF,MAAM,CAACG,KAAK,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,OAAO,MAAMC,UAAU,GAAIC,GAAW,IACpCA,GAAG,aAAHA,GAAG,uBAAHA,GAAG,CACCC,KAAK,CAAC,GAAG,CAAC,CACXC,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAAC,CAChBC,GAAG,CAAED,CAAC,IAAKA,CAAC,CAACP,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,GAAGM,CAAC,CAACE,SAAS,CAAC,CAAC,CAAC,CAACC,WAAW,EAAE,CAAC,CACpEC,IAAI,CAAC,GAAG,CAAC;AAEd,OAAO,MAAMC,sBAAsB,GAAIR,GAAW,IAAaA,GAAG,CAACS,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;AAE1F,OAAO,MAAMC,OAAO,GAAIV,GAAW,IAAK;EACtC;EACA,OAAO,gBAAgB,CAACW,IAAI,CAACX,GAAG,CAAC;AACnC,CAAC"}
|