@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,95 @@
|
|
|
1
|
+
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
|
|
2
|
+
import { getQueryKeyFromCredentialSchemaListQueryParams } from '../../parsers/query';
|
|
3
|
+
import { useHTTPClient } from '../http/client';
|
|
4
|
+
import { useONECore } from './core-context';
|
|
5
|
+
import { HISTORY_LIST_QUERY_KEY } from './history';
|
|
6
|
+
const PAGE_SIZE = 10;
|
|
7
|
+
export const CREDENTIAL_SCHEMA_LIST_QUERY_KEY = 'credential-schema-list';
|
|
8
|
+
export const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';
|
|
9
|
+
export const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';
|
|
10
|
+
export const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';
|
|
11
|
+
export const useCredentialSchemas = queryParams => {
|
|
12
|
+
const {
|
|
13
|
+
core,
|
|
14
|
+
organisationId
|
|
15
|
+
} = useONECore();
|
|
16
|
+
return useInfiniteQuery([CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)], _ref => {
|
|
17
|
+
let {
|
|
18
|
+
pageParam = 0
|
|
19
|
+
} = _ref;
|
|
20
|
+
return core.getCredentialSchemas({
|
|
21
|
+
organisationId,
|
|
22
|
+
page: pageParam,
|
|
23
|
+
pageSize: PAGE_SIZE,
|
|
24
|
+
...queryParams
|
|
25
|
+
}).then(_ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
values
|
|
28
|
+
} = _ref2;
|
|
29
|
+
return values;
|
|
30
|
+
});
|
|
31
|
+
}, {
|
|
32
|
+
getNextPageParam: (lastPage, allPages) => lastPage.length === PAGE_SIZE ? allPages.length : undefined,
|
|
33
|
+
keepPreviousData: true
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export const useCredentialSchemaPreview = url => {
|
|
37
|
+
const httpClient = useHTTPClient();
|
|
38
|
+
return useQuery([CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY, url], () => httpClient.get(url).then(response => {
|
|
39
|
+
if (!response.ok) {
|
|
40
|
+
throw response.originalError;
|
|
41
|
+
}
|
|
42
|
+
return response.data;
|
|
43
|
+
}), {
|
|
44
|
+
keepPreviousData: true
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
export const useCredentialSchemaAccept = () => {
|
|
48
|
+
const queryClient = useQueryClient();
|
|
49
|
+
const {
|
|
50
|
+
core,
|
|
51
|
+
organisationId
|
|
52
|
+
} = useONECore();
|
|
53
|
+
return useMutation(async schema => core.importCredentialSchema({
|
|
54
|
+
organisationId,
|
|
55
|
+
schema
|
|
56
|
+
}), {
|
|
57
|
+
onSuccess: async () => {
|
|
58
|
+
await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);
|
|
59
|
+
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
export const useCredentialSchemaDetail = function (credentialId) {
|
|
64
|
+
let active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
65
|
+
const {
|
|
66
|
+
core
|
|
67
|
+
} = useONECore();
|
|
68
|
+
return useQuery([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId], () => credentialId ? core.getCredentialSchema(credentialId) : undefined, {
|
|
69
|
+
enabled: active && Boolean(credentialId),
|
|
70
|
+
keepPreviousData: true
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
export const useCredentialSchemaDelete = () => {
|
|
74
|
+
const queryClient = useQueryClient();
|
|
75
|
+
const {
|
|
76
|
+
core
|
|
77
|
+
} = useONECore();
|
|
78
|
+
return useMutation(async credentialSchemaId => core.deleteCredentialSchema(credentialSchemaId), {
|
|
79
|
+
onSuccess: async (_, credentialId) => {
|
|
80
|
+
await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);
|
|
81
|
+
await queryClient.invalidateQueries([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId]);
|
|
82
|
+
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
export const useShareCredentialSchema = schemaId => {
|
|
87
|
+
const {
|
|
88
|
+
core
|
|
89
|
+
} = useONECore();
|
|
90
|
+
return useQuery([CREDENTIAL_SCHEMA_SHARE_QUERY_KEY, schemaId], () => schemaId ? core.shareCredentialSchema(schemaId) : Promise.reject(), {
|
|
91
|
+
enabled: Boolean(schemaId),
|
|
92
|
+
keepPreviousData: true
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=credential-schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromCredentialSchemaListQueryParams","useHTTPClient","useONECore","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY","CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY","CREDENTIAL_SCHEMA_SHARE_QUERY_KEY","useCredentialSchemas","queryParams","core","organisationId","_ref","pageParam","getCredentialSchemas","page","pageSize","then","_ref2","values","getNextPageParam","lastPage","allPages","length","undefined","keepPreviousData","useCredentialSchemaPreview","url","httpClient","get","response","ok","originalError","data","useCredentialSchemaAccept","queryClient","schema","importCredentialSchema","onSuccess","invalidateQueries","useCredentialSchemaDetail","credentialId","active","arguments","getCredentialSchema","enabled","Boolean","useCredentialSchemaDelete","credentialSchemaId","deleteCredentialSchema","_","useShareCredentialSchema","schemaId","shareCredentialSchema","Promise","reject"],"sources":["credential-schemas.ts"],"sourcesContent":["import { CredentialSchemaListQuery, ImportCredentialSchemaRequestSchema } from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromCredentialSchemaListQueryParams } from '../../parsers/query';\nimport { useHTTPClient } from '../http/client';\nimport { useONECore } from './core-context';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 10;\nexport const CREDENTIAL_SCHEMA_LIST_QUERY_KEY = 'credential-schema-list';\nexport const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';\nexport const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';\nexport const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';\n\nexport const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)],\n ({ pageParam = 0 }) =>\n core\n .getCredentialSchemas({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n })\n .then(({ values }) => values),\n {\n getNextPageParam: (lastPage, allPages) => (lastPage.length === PAGE_SIZE ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaPreview = (url: string) => {\n const httpClient = useHTTPClient();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY, url],\n () =>\n httpClient.get(url).then((response) => {\n if (!response.ok) {\n throw response.originalError;\n }\n return response.data as ImportCredentialSchemaRequestSchema;\n }),\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaAccept = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async (schema: ImportCredentialSchemaRequestSchema) =>\n core.importCredentialSchema({\n organisationId,\n schema,\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialSchemaDetail = (credentialId: string | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId],\n () => (credentialId ? core.getCredentialSchema(credentialId) : undefined),\n {\n enabled: active && Boolean(credentialId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialSchemaDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialSchemaId: string) => core.deleteCredentialSchema(credentialSchemaId), {\n onSuccess: async (_, credentialId) => {\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries([CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY, credentialId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useShareCredentialSchema = (schemaId?: string) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_SCHEMA_SHARE_QUERY_KEY, schemaId],\n () => (schemaId ? core.shareCredentialSchema(schemaId) : Promise.reject()),\n {\n enabled: Boolean(schemaId),\n keepPreviousData: true,\n },\n );\n};\n"],"mappings":"AACA,SAASA,gBAAgB,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,aAAa;AAErF,SAASC,8CAA8C,QAAQ,qBAAqB;AACpF,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,sBAAsB,QAAQ,WAAW;AAElD,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,gCAAgC,GAAG,wBAAwB;AACxE,OAAO,MAAMC,kCAAkC,GAAG,0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iB,CAACnC,gCAAgC,CAAC;MACrE,MAAM+B,WAAW,CAACI,iBAAiB,CAAC,CAAClC,kCAAkC,EAAEoC,YAAY,CAAC,CAAC;MACvF,MAAMN,WAAW,CAACI,iBAAiB,CAACrC,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAMiD,wBAAwB,GAAIC,QAAiB,IAAK;EAC7D,MAAM;IAAE1C;EAAK,CAAC,GAAGT,UAAU,EAAE;EAE7B,OAAOJ,QAAQ,CACb,CAACU,iCAAiC,EAAE6C,QAAQ,CAAC,EAC7C,MAAOA,QAAQ,GAAG1C,IAAI,CAAC2C,qBAAqB,CAACD,QAAQ,CAAC,GAAGE,OAAO,CAACC,MAAM,EAAG,EAC1E;IACEV,OAAO,EAAEC,OAAO,CAACM,QAAQ,CAAC;IAC1B3B,gBAAgB,EAAE;EACpB,CAAC,CACF;AACH,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { CredentialStateEnum, OneError } from '@procivis/react-native-one-core';
|
|
2
|
+
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
|
|
3
|
+
import { getQueryKeyFromCredentialListQueryParams } from '../../parsers/query';
|
|
4
|
+
import { useONECore } from './core-context';
|
|
5
|
+
import { CREDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';
|
|
6
|
+
import { OneErrorCode } from './error-code';
|
|
7
|
+
import { HISTORY_LIST_QUERY_KEY } from './history';
|
|
8
|
+
const PAGE_SIZE = 20;
|
|
9
|
+
const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';
|
|
10
|
+
const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';
|
|
11
|
+
const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';
|
|
12
|
+
export const useCredentials = queryParams => {
|
|
13
|
+
const {
|
|
14
|
+
core,
|
|
15
|
+
organisationId
|
|
16
|
+
} = useONECore();
|
|
17
|
+
return useQuery([CREDENTIAL_LIST_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)], async () => {
|
|
18
|
+
const {
|
|
19
|
+
values
|
|
20
|
+
} = await core.getCredentials({
|
|
21
|
+
organisationId,
|
|
22
|
+
page: 0,
|
|
23
|
+
// TODO: workaround pagination for now, until it's supported by UI
|
|
24
|
+
pageSize: 10000,
|
|
25
|
+
status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],
|
|
26
|
+
...queryParams
|
|
27
|
+
});
|
|
28
|
+
return values;
|
|
29
|
+
}, {
|
|
30
|
+
keepPreviousData: true
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export const usePagedCredentials = queryParams => {
|
|
34
|
+
const {
|
|
35
|
+
core,
|
|
36
|
+
organisationId
|
|
37
|
+
} = useONECore();
|
|
38
|
+
return useInfiniteQuery([CREDENTIAL_LIST_QUERY_KEY, CREDENTIAL_LIST_PAGED_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)], _ref => {
|
|
39
|
+
let {
|
|
40
|
+
pageParam = 0
|
|
41
|
+
} = _ref;
|
|
42
|
+
return core.getCredentials({
|
|
43
|
+
organisationId,
|
|
44
|
+
page: pageParam,
|
|
45
|
+
pageSize: PAGE_SIZE,
|
|
46
|
+
status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],
|
|
47
|
+
...queryParams
|
|
48
|
+
});
|
|
49
|
+
}, {
|
|
50
|
+
getNextPageParam: (lastPage, allPages) => allPages.length < lastPage.totalPages ? allPages.length : undefined,
|
|
51
|
+
keepPreviousData: true
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
export const useCredentialDetail = function (credentialId) {
|
|
55
|
+
let active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
56
|
+
const {
|
|
57
|
+
core
|
|
58
|
+
} = useONECore();
|
|
59
|
+
return useQuery([CREDENTIAL_DETAIL_QUERY_KEY, credentialId], () => credentialId ? core.getCredential(credentialId) : undefined, {
|
|
60
|
+
enabled: active && Boolean(credentialId),
|
|
61
|
+
keepPreviousData: true
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
export const useInvitationHandler = () => {
|
|
65
|
+
const queryClient = useQueryClient();
|
|
66
|
+
const {
|
|
67
|
+
core,
|
|
68
|
+
organisationId
|
|
69
|
+
} = useONECore();
|
|
70
|
+
return useMutation(async _ref2 => {
|
|
71
|
+
let {
|
|
72
|
+
invitationUrl,
|
|
73
|
+
transport
|
|
74
|
+
} = _ref2;
|
|
75
|
+
return core.handleInvitation(invitationUrl, organisationId, [transport]);
|
|
76
|
+
}, {
|
|
77
|
+
onSuccess: async result => {
|
|
78
|
+
if ('credentialIds' in result) {
|
|
79
|
+
await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
|
|
80
|
+
await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);
|
|
81
|
+
}
|
|
82
|
+
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
export const useCredentialAccept = () => {
|
|
87
|
+
const queryClient = useQueryClient();
|
|
88
|
+
const {
|
|
89
|
+
core
|
|
90
|
+
} = useONECore();
|
|
91
|
+
return useMutation(async _ref3 => {
|
|
92
|
+
let {
|
|
93
|
+
interactionId,
|
|
94
|
+
didId,
|
|
95
|
+
keyId,
|
|
96
|
+
txCode
|
|
97
|
+
} = _ref3;
|
|
98
|
+
return core.holderAcceptCredential(interactionId, didId, keyId, txCode);
|
|
99
|
+
}, {
|
|
100
|
+
onSuccess: async () => {
|
|
101
|
+
await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
|
|
102
|
+
await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);
|
|
103
|
+
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
export const useCredentialReject = () => {
|
|
108
|
+
const queryClient = useQueryClient();
|
|
109
|
+
const {
|
|
110
|
+
core
|
|
111
|
+
} = useONECore();
|
|
112
|
+
return useMutation(async interactionId => core.holderRejectCredential(interactionId).catch(e => {
|
|
113
|
+
if (e instanceof OneError && e.code === OneErrorCode.OperationNotSupported) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
throw e;
|
|
117
|
+
}), {
|
|
118
|
+
onSuccess: async () => {
|
|
119
|
+
await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
|
|
120
|
+
await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);
|
|
121
|
+
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
export const useCredentialRevocationCheck = bypassCache => {
|
|
126
|
+
const queryClient = useQueryClient();
|
|
127
|
+
const {
|
|
128
|
+
core
|
|
129
|
+
} = useONECore();
|
|
130
|
+
return useMutation(async credentialIds => core.checkRevocation(credentialIds, bypassCache), {
|
|
131
|
+
onSuccess: async () => {
|
|
132
|
+
await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
|
|
133
|
+
await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);
|
|
134
|
+
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
export const useCredentialDelete = () => {
|
|
139
|
+
const queryClient = useQueryClient();
|
|
140
|
+
const {
|
|
141
|
+
core
|
|
142
|
+
} = useONECore();
|
|
143
|
+
return useMutation(async credentialId => core.deleteCredential(credentialId), {
|
|
144
|
+
onSuccess: async (_, credentialId) => {
|
|
145
|
+
await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
|
|
146
|
+
await queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);
|
|
147
|
+
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
export const useInvalidateCredentialDetails = () => {
|
|
152
|
+
const queryClient = useQueryClient();
|
|
153
|
+
return credentialId => queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CredentialStateEnum","OneError","useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromCredentialListQueryParams","useONECore","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","OneErrorCode","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","CREDENTIAL_LIST_QUERY_KEY","CREDENTIAL_LIST_PAGED_QUERY_KEY","CREDENTIAL_DETAIL_QUERY_KEY","useCredentials","queryParams","core","organisationId","values","getCredentials","page","pageSize","status","ACCEPTED","SUSPENDED","REVOKED","keepPreviousData","usePagedCredentials","_ref","pageParam","getNextPageParam","lastPage","allPages","length","totalPages","undefined","useCredentialDetail","credentialId","active","arguments","getCredential","enabled","Boolean","useInvitationHandler","queryClient","_ref2","invitationUrl","transport","handleInvitation","onSuccess","result","invalidateQueries","useCredentialAccept","_ref3","interactionId","didId","keyId","txCode","holderAcceptCredential","useCredentialReject","holderRejectCredential","catch","e","code","OperationNotSupported","useCredentialRevocationCheck","bypassCache","credentialIds","checkRevocation","useCredentialDelete","deleteCredential","_","useInvalidateCredentialDetails"],"sources":["credentials.ts"],"sourcesContent":["import {\n BypassCache,\n CredentialListQuery,\n CredentialStateEnum,\n InvitationResult,\n OneError,\n} from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromCredentialListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\nimport { CREDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';\nimport { OneErrorCode } from './error-code';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 20;\nconst CREDENTIAL_LIST_QUERY_KEY = 'credential-list';\nconst CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';\nconst CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';\n\nexport const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useQuery(\n [CREDENTIAL_LIST_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)],\n async () => {\n const { values } = await core.getCredentials({\n organisationId,\n page: 0,\n // TODO: workaround pagination for now, until it's supported by UI\n pageSize: 10000,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],\n ...queryParams,\n });\n return values;\n },\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const usePagedCredentials = (queryParams?: Partial<CredentialListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [\n CREDENTIAL_LIST_QUERY_KEY,\n CREDENTIAL_LIST_PAGED_QUERY_KEY,\n ...getQueryKeyFromCredentialListQueryParams(queryParams),\n ],\n ({ pageParam = 0 }) =>\n core.getCredentials({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n status: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],\n ...queryParams,\n }),\n {\n getNextPageParam: (lastPage, allPages) => (allPages.length < lastPage.totalPages ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useCredentialDetail = (credentialId: string | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [CREDENTIAL_DETAIL_QUERY_KEY, credentialId],\n () => (credentialId ? core.getCredential(credentialId) : undefined),\n {\n enabled: active && Boolean(credentialId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useInvitationHandler = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async ({ invitationUrl, transport }: { invitationUrl: string; transport: 'HTTP' | 'MQTT' | 'BLE' }) =>\n core.handleInvitation(invitationUrl, organisationId, [transport]),\n {\n onSuccess: async (result: InvitationResult) => {\n if ('credentialIds' in result) {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n }\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialAccept = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n type CredentialAcceptHookParams = { didId: string; interactionId: string; keyId?: string; txCode?: string };\n\n return useMutation(\n async ({ interactionId, didId, keyId, txCode }: CredentialAcceptHookParams) =>\n core.holderAcceptCredential(interactionId, didId, keyId, txCode),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialReject = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(\n async (interactionId: string) =>\n core.holderRejectCredential(interactionId).catch((e) => {\n if (e instanceof OneError && e.code === OneErrorCode.OperationNotSupported) {\n return;\n }\n throw e;\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useCredentialRevocationCheck = (bypassCache?: BypassCache[]) => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialIds: string[]) => core.checkRevocation(credentialIds, bypassCache), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_DETAIL_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useCredentialDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (credentialId: string) => core.deleteCredential(credentialId), {\n onSuccess: async (_, credentialId) => {\n await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);\n await queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useInvalidateCredentialDetails = () => {\n const queryClient = useQueryClient();\n\n return (credentialId: string | undefined) =>\n queryClient.invalidateQueries([CREDENTIAL_DETAIL_QUERY_KEY, credentialId]);\n};\n"],"mappings":"AAAA,SAGEA,mBAAmB,EAEnBC,QAAQ,QACH,iCAAiC;AACxC,SAASC,gBAAgB,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,aAAa;AAErF,SAASC,wCAAwC,QAAQ,qBAAqB;AAC9E,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,gCAAgC,QAAQ,sBAAsB;AACvE,SAASC,YAAY,QAAQ,cAAc;AAC3C,SAASC,sBAAsB,QAAQ,WAAW;AAElD,MAAMC,SAAS,GAAG,EAAE;AACpB,MAAMC,yBAAyB,GAAG,iBAAiB;AACnD,MAAMC,+BAA+B,GAAG,uBAAuB;AAC/D,MAAMC,2BAA2B,GAAG,mBAAmB;AAEvD,OAAO,MAAMC,cAAc,GAAIC,WAA0C,IAAK;EAC5E,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGX,UAAU,EAAE;EAE7C,OAAOH,QAAQ,CACb,CAACQ,yBAAyB,EAAE,GAAGN,wCAAwC,CAACU,WAAW,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AAI,CAACoD,eAAe,CAACD,aAAa,EAAED,WAAW,CAAC,EAAE;IACtGjB,SAAS,EAAE,MAAAA,CAAA,KAAY;MACrB,MAAML,WAAW,CAACO,iBAAiB,CAACxC,yBAAyB,CAAC;MAC9D,MAAMiC,WAAW,CAACO,iBAAiB,CAACtC,2BAA2B,CAAC;MAChE,MAAM+B,WAAW,CAACO,iBAAiB,CAAC1C,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAM4D,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAMzB,WAAW,GAAGxC,cAAc,EAAE;EACpC,MAAM;IAAEY;EAAK,CAAC,GAAGV,UAAU,EAAE;EAE7B,OAAOJ,WAAW,CAAC,MAAOmC,YAAoB,IAAKrB,IAAI,CAACsD,gBAAgB,CAACjC,YAAY,CAAC,EAAE;IACtFY,SAAS,EAAE,MAAAA,CAAOsB,CAAC,EAAElC,YAAY,KAAK;MACpC,MAAMO,WAAW,CAACO,iBAAiB,CAACxC,yBAAyB,CAAC;MAC9D,MAAMiC,WAAW,CAACO,iBAAiB,CAAC,CAACtC,2BAA2B,EAAEwB,YAAY,CAAC,CAAC;MAChF,MAAMO,WAAW,CAACO,iBAAiB,CAAC1C,sBAAsB,CAAC;IAC7D;EACF,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,MAAM+D,8BAA8B,GAAGA,CAAA,KAAM;EAClD,MAAM5B,WAAW,GAAGxC,cAAc,EAAE;EAEpC,OAAQiC,YAAgC,IACtCO,WAAW,CAACO,iBAAiB,CAAC,CAACtC,2BAA2B,EAAEwB,YAAY,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DidTypeEnum } from '@procivis/react-native-one-core';
|
|
2
|
+
import { useQuery } from 'react-query';
|
|
3
|
+
import { getQueryKeyFromDidListQueryParams } from '../../parsers/query';
|
|
4
|
+
import { useONECore } from './core-context';
|
|
5
|
+
const PAGE_SIZE = 20;
|
|
6
|
+
export const DID_LIST_QUERY_KEY = 'did-list';
|
|
7
|
+
export const useDids = queryParams => {
|
|
8
|
+
const {
|
|
9
|
+
core,
|
|
10
|
+
organisationId
|
|
11
|
+
} = useONECore();
|
|
12
|
+
return useQuery([DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)], async _ref => {
|
|
13
|
+
let {
|
|
14
|
+
pageParam = 0
|
|
15
|
+
} = _ref;
|
|
16
|
+
const dids = await core.getDids({
|
|
17
|
+
deactivated: false,
|
|
18
|
+
organisationId,
|
|
19
|
+
page: pageParam,
|
|
20
|
+
pageSize: PAGE_SIZE,
|
|
21
|
+
type: DidTypeEnum.LOCAL,
|
|
22
|
+
...queryParams
|
|
23
|
+
});
|
|
24
|
+
return dids;
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=dids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DidTypeEnum","useQuery","getQueryKeyFromDidListQueryParams","useONECore","PAGE_SIZE","DID_LIST_QUERY_KEY","useDids","queryParams","core","organisationId","_ref","pageParam","dids","getDids","deactivated","page","pageSize","type","LOCAL"],"sources":["dids.ts"],"sourcesContent":["import { DidListQuery, DidTypeEnum } from '@procivis/react-native-one-core';\nimport { useQuery } from 'react-query';\n\nimport { getQueryKeyFromDidListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\n\nconst PAGE_SIZE = 20;\nexport const DID_LIST_QUERY_KEY = 'did-list';\n\nexport const useDids = (queryParams?: Partial<DidListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useQuery(\n [DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)],\n async ({ pageParam = 0 }) => {\n const dids = await core.getDids({\n deactivated: false,\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n type: DidTypeEnum.LOCAL,\n ...queryParams,\n });\n\n return dids;\n },\n );\n};\n"],"mappings":"AAAA,SAAuBA,WAAW,QAAQ,iCAAiC;AAC3E,SAASC,QAAQ,QAAQ,aAAa;AAEtC,SAASC,iCAAiC,QAAQ,qBAAqB;AACvE,SAASC,UAAU,QAAQ,gBAAgB;AAE3C,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,kBAAkB,GAAG,UAAU;AAE5C,OAAO,MAAMC,OAAO,GAAIC,WAAmC,IAAK;EAC9D,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,EAAE;EAE7C,OAAOF,QAAQ,CACb,CAACI,kBAAkB,EAAE,GAAGH,iCAAiC,CAACK,WAAW,CAAC,CAAC,EACvE,MAAAG,IAAA,IAA6B;IAAA,IAAtB;MAAEC,SAAS,GAAG;IAAE,CAAC,GAAAD,IAAA;IACtB,MAAME,IAAI,GAAG,MAAMJ,IAAI,CAACK,OAAO,CAAC;MAC9BC,WAAW,EAAE,KAAK;MAClBL,cAAc;MACdM,IAAI,EAAEJ,SAAS;MACfK,QAAQ,EAAEZ,SAAS;MACnBa,IAAI,EAAEjB,WAAW,CAACkB,KAAK;MACvB,GAAGX;IACL,CAAC,CAAC;IAEF,OAAOK,IAAI;EACb,CAAC,CACF;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export let OneErrorCode;
|
|
2
|
+
(function (OneErrorCode) {
|
|
3
|
+
OneErrorCode["OrganisationAlreadyExists"] = "BR_0023";
|
|
4
|
+
OneErrorCode["KeyStorageNotSupported"] = "BR_0039";
|
|
5
|
+
OneErrorCode["OperationNotSupported"] = "BR_0062";
|
|
6
|
+
OneErrorCode["NoTrustEntityFound"] = "BR_0186";
|
|
7
|
+
})(OneErrorCode || (OneErrorCode = {}));
|
|
8
|
+
//# sourceMappingURL=error-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["OneErrorCode"],"sources":["error-code.ts"],"sourcesContent":["export enum OneErrorCode {\n OrganisationAlreadyExists = 'BR_0023',\n KeyStorageNotSupported = 'BR_0039',\n OperationNotSupported = 'BR_0062',\n NoTrustEntityFound = 'BR_0186',\n}\n"],"mappings":"AAAA,WAAYA,YAAY;AAKvB,WALWA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAZA,YAAY"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { HistoryEntityTypeEnum } from '@procivis/react-native-one-core';
|
|
2
|
+
import { useInfiniteQuery } from 'react-query';
|
|
3
|
+
import { getQueryKeyFromHistoryListQueryParams } from '../../parsers/query';
|
|
4
|
+
import { useONECore } from './core-context';
|
|
5
|
+
const PAGE_SIZE = 20;
|
|
6
|
+
export const HISTORY_LIST_QUERY_KEY = 'history-list';
|
|
7
|
+
export const useHistory = queryParams => {
|
|
8
|
+
const {
|
|
9
|
+
core,
|
|
10
|
+
organisationId
|
|
11
|
+
} = useONECore();
|
|
12
|
+
return useInfiniteQuery([HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)], async _ref => {
|
|
13
|
+
let {
|
|
14
|
+
pageParam = 0
|
|
15
|
+
} = _ref;
|
|
16
|
+
const historyPage = await core.getHistory({
|
|
17
|
+
organisationId,
|
|
18
|
+
page: pageParam,
|
|
19
|
+
pageSize: PAGE_SIZE,
|
|
20
|
+
...queryParams
|
|
21
|
+
});
|
|
22
|
+
const credentialIds = Array.from(new Set(historyPage.values.filter(historyItem => historyItem.entityType === HistoryEntityTypeEnum.CREDENTIAL).map(historyItem => historyItem.entityId)));
|
|
23
|
+
const proofIds = Array.from(new Set(historyPage.values.filter(historyItem => historyItem.entityType === HistoryEntityTypeEnum.PROOF).map(historyItem => historyItem.entityId)));
|
|
24
|
+
const credentials = await core.getCredentials({
|
|
25
|
+
ids: credentialIds,
|
|
26
|
+
organisationId,
|
|
27
|
+
page: 0,
|
|
28
|
+
pageSize: credentialIds.length
|
|
29
|
+
});
|
|
30
|
+
const credentialDidsMap = Object.assign({}, ...credentials.values.map(credential => ({
|
|
31
|
+
[credential.id]: credential.issuerDid
|
|
32
|
+
})));
|
|
33
|
+
const proofs = await Promise.all(proofIds.map(id => core.getProof(id)));
|
|
34
|
+
const proofDidsMap = Object.assign({}, ...proofs.map(proof => {
|
|
35
|
+
var _proof$verifierDid;
|
|
36
|
+
return {
|
|
37
|
+
[proof.id]: (_proof$verifierDid = proof.verifierDid) === null || _proof$verifierDid === void 0 ? void 0 : _proof$verifierDid.did
|
|
38
|
+
};
|
|
39
|
+
}));
|
|
40
|
+
const result = {
|
|
41
|
+
totalItems: historyPage.totalItems,
|
|
42
|
+
totalPages: historyPage.totalPages,
|
|
43
|
+
values: historyPage.values.map(item => {
|
|
44
|
+
const did = item.entityType === HistoryEntityTypeEnum.CREDENTIAL ? credentialDidsMap[item.entityId] : proofDidsMap[item.entityId];
|
|
45
|
+
return {
|
|
46
|
+
...item,
|
|
47
|
+
did
|
|
48
|
+
};
|
|
49
|
+
})
|
|
50
|
+
};
|
|
51
|
+
return result;
|
|
52
|
+
}, {
|
|
53
|
+
getNextPageParam: (lastPage, allPages) => allPages.length < lastPage.totalPages ? allPages.length : undefined,
|
|
54
|
+
keepPreviousData: true
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HistoryEntityTypeEnum","useInfiniteQuery","getQueryKeyFromHistoryListQueryParams","useONECore","PAGE_SIZE","HISTORY_LIST_QUERY_KEY","useHistory","queryParams","core","organisationId","_ref","pageParam","historyPage","getHistory","page","pageSize","credentialIds","Array","from","Set","values","filter","historyItem","entityType","CREDENTIAL","map","entityId","proofIds","PROOF","credentials","getCredentials","ids","length","credentialDidsMap","Object","assign","credential","id","issuerDid","proofs","Promise","all","getProof","proofDidsMap","proof","_proof$verifierDid","verifierDid","did","result","totalItems","totalPages","item","getNextPageParam","lastPage","allPages","undefined","keepPreviousData"],"sources":["history.ts"],"sourcesContent":["import { HistoryEntityTypeEnum, HistoryListItem, HistoryListQuery, ItemList } from '@procivis/react-native-one-core';\nimport { useInfiniteQuery } from 'react-query';\n\nimport { getQueryKeyFromHistoryListQueryParams } from '../../parsers/query';\nimport { useONECore } from './core-context';\n\nexport type HistoryListItemWithDid = HistoryListItem & {\n did?: string;\n};\n\nconst PAGE_SIZE = 20;\nexport const HISTORY_LIST_QUERY_KEY = 'history-list';\n\nexport const useHistory = (queryParams?: Partial<HistoryListQuery>) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)],\n async ({ pageParam = 0 }) => {\n const historyPage = await core.getHistory({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n });\n\n const credentialIds = Array.from(\n new Set(\n historyPage.values\n .filter((historyItem) => historyItem.entityType === HistoryEntityTypeEnum.CREDENTIAL)\n .map((historyItem) => historyItem.entityId!),\n ),\n );\n const proofIds = Array.from(\n new Set(\n historyPage.values\n .filter((historyItem) => historyItem.entityType === HistoryEntityTypeEnum.PROOF)\n .map((historyItem) => historyItem.entityId!),\n ),\n );\n\n const credentials = await core.getCredentials({\n ids: credentialIds,\n organisationId,\n page: 0,\n pageSize: credentialIds.length,\n });\n const credentialDidsMap: Record<string, string> = Object.assign(\n {},\n ...credentials.values.map((credential) => ({\n [credential.id]: credential.issuerDid,\n })),\n );\n\n const proofs = await Promise.all(proofIds.map((id) => core.getProof(id)));\n const proofDidsMap: Record<string, string> = Object.assign(\n {},\n ...proofs.map((proof) => ({\n [proof.id]: proof.verifierDid?.did,\n })),\n );\n\n const result: ItemList<HistoryListItemWithDid> = {\n totalItems: historyPage.totalItems,\n totalPages: historyPage.totalPages,\n values: historyPage.values.map((item) => {\n const did =\n item.entityType === HistoryEntityTypeEnum.CREDENTIAL\n ? credentialDidsMap[item.entityId!]\n : proofDidsMap[item.entityId!];\n return {\n ...item,\n did,\n };\n }),\n };\n\n return result;\n },\n {\n getNextPageParam: (lastPage, allPages) => (allPages.length < lastPage.totalPages ? allPages.length : undefined),\n keepPreviousData: true,\n },\n );\n};\n"],"mappings":"AAAA,SAASA,qBAAqB,QAAqD,iCAAiC;AACpH,SAASC,gBAAgB,QAAQ,aAAa;AAE9C,SAASC,qCAAqC,QAAQ,qBAAqB;AAC3E,SAASC,UAAU,QAAQ,gBAAgB;AAM3C,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,sBAAsB,GAAG,cAAc;AAEpD,OAAO,MAAMC,UAAU,GAAIC,WAAuC,IAAK;EACrE,MAAM;IAAEC,IAAI;IAAEC;EAAe,CAAC,GAAGN,UAAU,EAAE;EAE7C,OAAOF,gBAAgB,CACrB,CAACI,sBAAsB,EAAE,GAAGH,qCAAqC,CAACK,WAAW,CAAC,CAAC,EAC/E,MAAAG,IAAA,IAA6B;IAAA,IAAtB;MAAEC,SAAS,GAAG;IAAE,CAAC,GAAAD,IAAA;IACtB,MAAME,WAAW,GAAG,MAAMJ,IAAI,CAACK,UAAU,CAAC;MACxCJ,cAAc;MACdK,IAAI,EAAEH,SAAS;MACfI,QAAQ,EAAEX,SAAS;MACnB,GAAGG;IACL,CAAC,CAAC;IAEF,MAAMS,aAAa,GAAGC,KAAK,CAACC,IAAI,CAC9B,IAAIC,GAAG,CACLP,WAAW,CAACQ,MAAM,CACfC,MAAM,CAAEC,WAAW,IAAKA,WAAW,CAACC,UAAU,KAAKvB,qBAAqB,CAACwB,UAAU,CAAC,CACpFC,GAAG,CAAEH,WAAW,IAAKA,WAAW,CAACI,QAAS,CAAC,CAC/C,CACF;IACD,MAAMC,QAAQ,GAAGV,KAAK,CAACC,IAAI,CACzB,IAAIC,GAAG,CACLP,WAAW,CAACQ,MAAM,CACfC,MAAM,CAAEC,WAAW,IAAKA,WAAW,CAACC,UAAU,KAAKvB,qBAAqB,CAAC4B,KAAK,CAAC,CAC/EH,GAAG,CAAEH,WA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L,GAAGyB,IAAI;UACPJ;QACF,CAAC;MACH,CAAC;IACH,CAAC;IAED,OAAOC,MAAM;EACf,CAAC,EACD;IACEI,gBAAgB,EAAEA,CAACC,QAAQ,EAAEC,QAAQ,KAAMA,QAAQ,CAACtB,MAAM,GAAGqB,QAAQ,CAACH,UAAU,GAAGI,QAAQ,CAACtB,MAAM,GAAGuB,SAAU;IAC/GC,gBAAgB,EAAE;EACpB,CAAC,CACF;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './backup';
|
|
2
|
+
export * from './core-config';
|
|
3
|
+
export * from './core-context';
|
|
4
|
+
export * from './core-init';
|
|
5
|
+
export * from './credential-schemas';
|
|
6
|
+
export * from './credentials';
|
|
7
|
+
export * from './dids';
|
|
8
|
+
export * from './history';
|
|
9
|
+
export * from './proof-schemas';
|
|
10
|
+
export * from './proofs';
|
|
11
|
+
export * from './query';
|
|
12
|
+
export * from './trust-entity';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './backup';\nexport * from './core-config';\nexport * from './core-context';\nexport * from './core-init';\nexport * from './credential-schemas';\nexport * from './credentials';\nexport * from './dids';\nexport * from './history';\nexport * from './proof-schemas';\nexport * from './proofs';\nexport * from './query';\nexport * from './trust-entity';\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,sBAAsB;AACpC,cAAc,eAAe;AAC7B,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,gBAAgB"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
|
|
2
|
+
import { getQueryKeyFromProofSchemaListQueryParams } from '../../parsers/query';
|
|
3
|
+
import { useHTTPClient } from '../http/client';
|
|
4
|
+
import { useONECore } from './core-context';
|
|
5
|
+
import { CREDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';
|
|
6
|
+
import { HISTORY_LIST_QUERY_KEY } from './history';
|
|
7
|
+
const PAGE_SIZE = 10;
|
|
8
|
+
export const PROOF_SCHEMA_LIST_QUERY_KEY = 'proof-schema-list';
|
|
9
|
+
export const PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY = 'proof-schema-import';
|
|
10
|
+
export const PROOF_SCHEMA_DETAIL_QUERY_KEY = 'proof-schema-detail';
|
|
11
|
+
export const PROOF_SCHEMA_SHARE_QUERY_KEY = 'proof-schema-share';
|
|
12
|
+
export const useProofSchemas = function (queryParams) {
|
|
13
|
+
let keepPreviousData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
14
|
+
const {
|
|
15
|
+
core,
|
|
16
|
+
organisationId
|
|
17
|
+
} = useONECore();
|
|
18
|
+
return useInfiniteQuery([PROOF_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromProofSchemaListQueryParams(queryParams)], _ref => {
|
|
19
|
+
let {
|
|
20
|
+
pageParam = 0
|
|
21
|
+
} = _ref;
|
|
22
|
+
return core.getProofSchemas({
|
|
23
|
+
organisationId,
|
|
24
|
+
page: pageParam,
|
|
25
|
+
pageSize: PAGE_SIZE,
|
|
26
|
+
...queryParams
|
|
27
|
+
}).then(_ref2 => {
|
|
28
|
+
let {
|
|
29
|
+
values
|
|
30
|
+
} = _ref2;
|
|
31
|
+
return values;
|
|
32
|
+
});
|
|
33
|
+
}, {
|
|
34
|
+
getNextPageParam: (lastPage, allPages) => lastPage.length === PAGE_SIZE ? allPages.length : undefined,
|
|
35
|
+
keepPreviousData
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
export const useProofSchemaDetail = function (proofSchemaId) {
|
|
39
|
+
let active = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
40
|
+
const {
|
|
41
|
+
core
|
|
42
|
+
} = useONECore();
|
|
43
|
+
return useQuery([PROOF_SCHEMA_DETAIL_QUERY_KEY, proofSchemaId], () => proofSchemaId ? core.getProofSchema(proofSchemaId) : undefined, {
|
|
44
|
+
enabled: active && Boolean(proofSchemaId),
|
|
45
|
+
keepPreviousData: true
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
export const useProofSchemaImportDetail = url => {
|
|
49
|
+
const httpClient = useHTTPClient();
|
|
50
|
+
return useQuery([PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY, url], () => httpClient.get(url).then(response => {
|
|
51
|
+
if (!response.ok) {
|
|
52
|
+
throw response.originalError;
|
|
53
|
+
}
|
|
54
|
+
return response.data;
|
|
55
|
+
}), {
|
|
56
|
+
keepPreviousData: true
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
export const useProofSchemaAccept = () => {
|
|
60
|
+
const queryClient = useQueryClient();
|
|
61
|
+
const {
|
|
62
|
+
core,
|
|
63
|
+
organisationId
|
|
64
|
+
} = useONECore();
|
|
65
|
+
return useMutation(async _ref3 => {
|
|
66
|
+
let {
|
|
67
|
+
schema
|
|
68
|
+
} = _ref3;
|
|
69
|
+
return core.importProofSchema({
|
|
70
|
+
organisationId,
|
|
71
|
+
schema
|
|
72
|
+
});
|
|
73
|
+
}, {
|
|
74
|
+
onSuccess: async () => {
|
|
75
|
+
await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);
|
|
76
|
+
await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);
|
|
77
|
+
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
export const useProofSchemaCreate = () => {
|
|
82
|
+
const queryClient = useQueryClient();
|
|
83
|
+
const {
|
|
84
|
+
core
|
|
85
|
+
} = useONECore();
|
|
86
|
+
return useMutation(async proofSchema => core.createProofSchema(proofSchema), {
|
|
87
|
+
onSuccess: async () => {
|
|
88
|
+
await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);
|
|
89
|
+
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
export const useProofSchemaDelete = () => {
|
|
94
|
+
const queryClient = useQueryClient();
|
|
95
|
+
const {
|
|
96
|
+
core
|
|
97
|
+
} = useONECore();
|
|
98
|
+
return useMutation(async proofSchemaId => core.deleteProofSchema(proofSchemaId), {
|
|
99
|
+
onSuccess: async (_, proofSchemaId) => {
|
|
100
|
+
await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);
|
|
101
|
+
await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);
|
|
102
|
+
await queryClient.invalidateQueries([PROOF_SCHEMA_DETAIL_QUERY_KEY, proofSchemaId]);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
export const useShareProofSchema = schemaId => {
|
|
107
|
+
const {
|
|
108
|
+
core
|
|
109
|
+
} = useONECore();
|
|
110
|
+
return useQuery([PROOF_SCHEMA_SHARE_QUERY_KEY, schemaId], () => schemaId ? core.shareProofSchema(schemaId) : Promise.reject(), {
|
|
111
|
+
enabled: Boolean(schemaId),
|
|
112
|
+
keepPreviousData: true
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=proof-schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useInfiniteQuery","useMutation","useQuery","useQueryClient","getQueryKeyFromProofSchemaListQueryParams","useHTTPClient","useONECore","CREDENTIAL_SCHEMA_LIST_QUERY_KEY","HISTORY_LIST_QUERY_KEY","PAGE_SIZE","PROOF_SCHEMA_LIST_QUERY_KEY","PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY","PROOF_SCHEMA_DETAIL_QUERY_KEY","PROOF_SCHEMA_SHARE_QUERY_KEY","useProofSchemas","queryParams","keepPreviousData","arguments","length","undefined","core","organisationId","_ref","pageParam","getProofSchemas","page","pageSize","then","_ref2","values","getNextPageParam","lastPage","allPages","useProofSchemaDetail","proofSchemaId","active","getProofSchema","enabled","Boolean","useProofSchemaImportDetail","url","httpClient","get","response","ok","originalError","data","useProofSchemaAccept","queryClient","_ref3","schema","importProofSchema","onSuccess","invalidateQueries","useProofSchemaCreate","proofSchema","createProofSchema","useProofSchemaDelete","deleteProofSchema","_","useShareProofSchema","schemaId","shareProofSchema","Promise","reject"],"sources":["proof-schemas.ts"],"sourcesContent":["import {\n CreateProofSchemaRequest,\n ImportProofSchema,\n ProofSchema,\n ProofSchemaListItem,\n ProofSchemaListQuery,\n} from '@procivis/react-native-one-core';\nimport { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';\n\nimport { getQueryKeyFromProofSchemaListQueryParams } from '../../parsers/query';\nimport { useHTTPClient } from '../http/client';\nimport { useONECore } from './core-context';\nimport { CREDENTIAL_SCHEMA_LIST_QUERY_KEY } from './credential-schemas';\nimport { HISTORY_LIST_QUERY_KEY } from './history';\n\nconst PAGE_SIZE = 10;\nexport const PROOF_SCHEMA_LIST_QUERY_KEY = 'proof-schema-list';\nexport const PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY = 'proof-schema-import';\nexport const PROOF_SCHEMA_DETAIL_QUERY_KEY = 'proof-schema-detail';\nexport const PROOF_SCHEMA_SHARE_QUERY_KEY = 'proof-schema-share';\n\nexport const useProofSchemas = (queryParams?: Partial<ProofSchemaListQuery>, keepPreviousData = true) => {\n const { core, organisationId } = useONECore();\n\n return useInfiniteQuery(\n [PROOF_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromProofSchemaListQueryParams(queryParams)],\n ({ pageParam = 0 }) =>\n core\n .getProofSchemas({\n organisationId,\n page: pageParam,\n pageSize: PAGE_SIZE,\n ...queryParams,\n })\n .then(({ values }) => values),\n {\n getNextPageParam: (lastPage, allPages) => (lastPage.length === PAGE_SIZE ? allPages.length : undefined),\n keepPreviousData,\n },\n );\n};\n\nexport const useProofSchemaDetail = (proofSchemaId: ProofSchemaListItem['id'] | undefined, active = true) => {\n const { core } = useONECore();\n\n return useQuery(\n [PROOF_SCHEMA_DETAIL_QUERY_KEY, proofSchemaId],\n () => (proofSchemaId ? core.getProofSchema(proofSchemaId) : undefined),\n {\n enabled: active && Boolean(proofSchemaId),\n keepPreviousData: true,\n },\n );\n};\n\nexport const useProofSchemaImportDetail = (url: string) => {\n const httpClient = useHTTPClient();\n\n return useQuery(\n [PROOF_SCHEMA_IMPORT_DETAIL_QUERY_KEY, url],\n () =>\n httpClient.get(url).then((response) => {\n if (!response.ok) {\n throw response.originalError;\n }\n return response.data as ImportProofSchema;\n }),\n {\n keepPreviousData: true,\n },\n );\n};\n\nexport const useProofSchemaAccept = () => {\n const queryClient = useQueryClient();\n const { core, organisationId } = useONECore();\n\n return useMutation(\n async ({ schema }: { schema: ImportProofSchema }) =>\n core.importProofSchema({\n organisationId,\n schema,\n }),\n {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(CREDENTIAL_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n },\n );\n};\n\nexport const useProofSchemaCreate = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (proofSchema: CreateProofSchemaRequest) => core.createProofSchema(proofSchema), {\n onSuccess: async () => {\n await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n },\n });\n};\n\nexport const useProofSchemaDelete = () => {\n const queryClient = useQueryClient();\n const { core } = useONECore();\n\n return useMutation(async (proofSchemaId: ProofSchema['id']) => core.deleteProofSchema(proofSchemaId), {\n onSuccess: async (_, proofSchemaId) => {\n await queryClient.invalidateQueries(PROOF_SCHEMA_LIST_QUERY_KEY);\n await queryClient.invalidateQueries(HISTORY_LIST_QUERY_KEY);\n await queryClient.invalidateQueries([PROOF_SCHEMA_DETAIL_QUERY_KEY, proofSchemaId]);\n },\n });\n};\n\nexport const useShareProofSchema = (schemaId?: string) => {\n const { core } = useONECore();\n\n return useQuery(\n [PROOF_SCHEMA_SHARE_QUERY_KEY, schemaId],\n () => (schemaId ? core.shareProofSchema(schemaId) : Promise.reject()),\n {\n enabled: Boolean(schemaId),\n keepPreviousData: true,\n },\n );\n};\n"],"mappings":"AAOA,SAASA,gBAAgB,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,cAAc,QAAQ,aAAa;AAErF,SAASC,yCAAyC,QAAQ,qBAAqB;AAC/E,SAASC,aAAa,QAAQ,gBAAgB;AAC9C,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,gCAAgC,QAAQ,sBAAsB;AACvE,SAASC,sBAAsB,QAAQ,WAAW;AAElD,MAAMC,SAAS,GAAG,EAAE;AACpB,OAAO,MAAMC,2BAA2B,GAAG,mBAAmB;AAC9D,OAAO,MAAMC,oCAAoC,GAAG,qBAAqB;AACzE,OAAO,MAAMC,6BAA6B,GAAG,qBAAqB;AAClE,OAAO,MAAMC,4BAA4B,GAAG,oBAAoB;AAEhE,OAAO,MAAMC,eAAe,GAAG,SAAAA,CAACC,WAA2C,EAA8B;EAAA,IAA5BC,gBAAgB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EAClG,MAAM;IAAEG,IAAI;IAAEC;EAAe,CAAC,GAAGf,UAAU,EAAE;EAE7C,OAAON,gBAAgB,CACrB,CAACU,2BAA2B,EAAE,GAAGN,yCAAyC,CAACW,WAAW,CAAC,CAAC,EACxFO,IAAA;IAAA,IAAC;MAAEC,SAAS,GAAG;IAAE,CAAC,GAAAD,IAAA;IAAA,OAChBF,IAAI,CAC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