@procivis/one-react-native-components 0.3.27 → 0.3.47

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.
Files changed (196) hide show
  1. package/lib/commonjs/components/entity/entity-attributes.js +14 -1
  2. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  3. package/lib/commonjs/components/entity/entity-details-with-buttons.js +9 -42
  4. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  5. package/lib/commonjs/components/entity/entity-details.js +60 -32
  6. package/lib/commonjs/components/entity/entity-details.js.map +1 -1
  7. package/lib/commonjs/components/entity/index.js +2 -15
  8. package/lib/commonjs/components/entity/index.js.map +1 -1
  9. package/lib/commonjs/components/history/history-list-item.js +14 -12
  10. package/lib/commonjs/components/history/history-list-item.js.map +1 -1
  11. package/lib/commonjs/components/proof-request/share-credential.js +1 -2
  12. package/lib/commonjs/components/proof-request/share-credential.js.map +1 -1
  13. package/lib/commonjs/ui-components/blur/index.js +2 -9
  14. package/lib/commonjs/ui-components/blur/index.js.map +1 -1
  15. package/lib/commonjs/ui-components/buttons/hold-button.js +3 -2
  16. package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -1
  17. package/lib/commonjs/ui-components/camera/index.js +2 -9
  18. package/lib/commonjs/ui-components/camera/index.js.map +1 -1
  19. package/lib/commonjs/ui-components/control/index.js +0 -12
  20. package/lib/commonjs/ui-components/control/index.js.map +1 -1
  21. package/lib/commonjs/ui-components/credential/card/credential-details-card.js +1 -1
  22. package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
  23. package/lib/commonjs/ui-components/credential/credential-carousel-images.js +15 -8
  24. package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
  25. package/lib/commonjs/ui-components/entity/entity-cluster.js +50 -2
  26. package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
  27. package/lib/commonjs/ui-components/entity/index.js +3 -16
  28. package/lib/commonjs/ui-components/entity/index.js.map +1 -1
  29. package/lib/commonjs/ui-components/history/history-details.js +1 -1
  30. package/lib/commonjs/ui-components/history/history-details.js.map +1 -1
  31. package/lib/commonjs/ui-components/history/index.js +4 -27
  32. package/lib/commonjs/ui-components/history/index.js.map +1 -1
  33. package/lib/commonjs/ui-components/icons/entity.js +10 -13
  34. package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
  35. package/lib/commonjs/ui-components/input/index.js +3 -32
  36. package/lib/commonjs/ui-components/input/index.js.map +1 -1
  37. package/lib/commonjs/ui-components/list/index.js +4 -19
  38. package/lib/commonjs/ui-components/list/index.js.map +1 -1
  39. package/lib/commonjs/ui-components/loader/index.js +2 -13
  40. package/lib/commonjs/ui-components/loader/index.js.map +1 -1
  41. package/lib/commonjs/ui-components/pin/index.js +2 -21
  42. package/lib/commonjs/ui-components/pin/index.js.map +1 -1
  43. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  44. package/lib/commonjs/ui-components/searchbar/index.js +3 -16
  45. package/lib/commonjs/ui-components/searchbar/index.js.map +1 -1
  46. package/lib/commonjs/ui-components/settings/index.js +6 -37
  47. package/lib/commonjs/ui-components/settings/index.js.map +1 -1
  48. package/lib/commonjs/ui-components/state/index.js +2 -15
  49. package/lib/commonjs/ui-components/state/index.js.map +1 -1
  50. package/lib/commonjs/utils/date.js +1 -1
  51. package/lib/commonjs/utils/date.js.map +1 -1
  52. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js +4 -0
  53. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  54. package/lib/commonjs/utils/hooks/core/backup.js +22 -66
  55. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  56. package/lib/commonjs/utils/hooks/core/core-init.js +6 -2
  57. package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
  58. package/lib/commonjs/utils/hooks/core/identifiers.js +23 -1
  59. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
  60. package/lib/commonjs/utils/hooks/core/proofs.js +24 -14
  61. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  62. package/lib/commonjs/utils/hooks/core/trust-entity.js +55 -14
  63. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  64. package/lib/commonjs/utils/parsers/credential-sharing.js +6 -15
  65. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  66. package/lib/commonjs/utils/parsers/query.js +21 -3
  67. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  68. package/lib/module/components/entity/entity-attributes.js +15 -2
  69. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  70. package/lib/module/components/entity/entity-details-with-buttons.js +11 -44
  71. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  72. package/lib/module/components/entity/entity-details.js +60 -32
  73. package/lib/module/components/entity/entity-details.js.map +1 -1
  74. package/lib/module/components/entity/index.js +2 -2
  75. package/lib/module/components/entity/index.js.map +1 -1
  76. package/lib/module/components/history/history-list-item.js +15 -13
  77. package/lib/module/components/history/history-list-item.js.map +1 -1
  78. package/lib/module/components/proof-request/share-credential.js +1 -2
  79. package/lib/module/components/proof-request/share-credential.js.map +1 -1
  80. package/lib/module/ui-components/blur/index.js +2 -2
  81. package/lib/module/ui-components/blur/index.js.map +1 -1
  82. package/lib/module/ui-components/buttons/hold-button.js +4 -3
  83. package/lib/module/ui-components/buttons/hold-button.js.map +1 -1
  84. package/lib/module/ui-components/camera/index.js +2 -2
  85. package/lib/module/ui-components/camera/index.js.map +1 -1
  86. package/lib/module/ui-components/control/index.js +3 -3
  87. package/lib/module/ui-components/control/index.js.map +1 -1
  88. package/lib/module/ui-components/credential/card/credential-details-card.js +1 -1
  89. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  90. package/lib/module/ui-components/credential/credential-carousel-images.js +15 -8
  91. package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
  92. package/lib/module/ui-components/entity/entity-cluster.js +51 -3
  93. package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
  94. package/lib/module/ui-components/entity/index.js +4 -4
  95. package/lib/module/ui-components/entity/index.js.map +1 -1
  96. package/lib/module/ui-components/history/history-details.js +1 -1
  97. package/lib/module/ui-components/history/history-details.js.map +1 -1
  98. package/lib/module/ui-components/history/index.js +6 -6
  99. package/lib/module/ui-components/history/index.js.map +1 -1
  100. package/lib/module/ui-components/icons/entity.js +10 -13
  101. package/lib/module/ui-components/icons/entity.js.map +1 -1
  102. package/lib/module/ui-components/input/index.js +6 -6
  103. package/lib/module/ui-components/input/index.js.map +1 -1
  104. package/lib/module/ui-components/list/index.js +4 -4
  105. package/lib/module/ui-components/list/index.js.map +1 -1
  106. package/lib/module/ui-components/loader/index.js +4 -4
  107. package/lib/module/ui-components/loader/index.js.map +1 -1
  108. package/lib/module/ui-components/pin/index.js +3 -3
  109. package/lib/module/ui-components/pin/index.js.map +1 -1
  110. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  111. package/lib/module/ui-components/searchbar/index.js +4 -4
  112. package/lib/module/ui-components/searchbar/index.js.map +1 -1
  113. package/lib/module/ui-components/settings/index.js +10 -10
  114. package/lib/module/ui-components/settings/index.js.map +1 -1
  115. package/lib/module/ui-components/state/index.js +2 -2
  116. package/lib/module/ui-components/state/index.js.map +1 -1
  117. package/lib/module/utils/date.js +1 -1
  118. package/lib/module/utils/date.js.map +1 -1
  119. package/lib/module/utils/hooks/connectivity/connectivity.test.js +4 -0
  120. package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  121. package/lib/module/utils/hooks/core/backup.js +24 -68
  122. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  123. package/lib/module/utils/hooks/core/core-init.js +5 -3
  124. package/lib/module/utils/hooks/core/core-init.js.map +1 -1
  125. package/lib/module/utils/hooks/core/identifiers.js +21 -0
  126. package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
  127. package/lib/module/utils/hooks/core/proofs.js +24 -14
  128. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  129. package/lib/module/utils/hooks/core/trust-entity.js +55 -14
  130. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  131. package/lib/module/utils/parsers/credential-sharing.js +6 -15
  132. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  133. package/lib/module/utils/parsers/query.js +19 -2
  134. package/lib/module/utils/parsers/query.js.map +1 -1
  135. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  136. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +1 -2
  137. package/lib/typescript/components/entity/entity-details.d.ts +3 -2
  138. package/lib/typescript/components/entity/index.d.ts +2 -1
  139. package/lib/typescript/ui-components/blur/index.d.ts +2 -1
  140. package/lib/typescript/ui-components/buttons/hold-button.d.ts +2 -2
  141. package/lib/typescript/ui-components/camera/index.d.ts +2 -1
  142. package/lib/typescript/ui-components/control/index.d.ts +4 -2
  143. package/lib/typescript/ui-components/credential/credential-carousel-images.d.ts +1 -0
  144. package/lib/typescript/ui-components/entity/entity-cluster.d.ts +1 -0
  145. package/lib/typescript/ui-components/entity/index.d.ts +4 -2
  146. package/lib/typescript/ui-components/history/history-details.d.ts +4 -1
  147. package/lib/typescript/ui-components/history/index.d.ts +6 -3
  148. package/lib/typescript/ui-components/input/index.d.ts +6 -3
  149. package/lib/typescript/ui-components/list/index.d.ts +4 -2
  150. package/lib/typescript/ui-components/loader/index.d.ts +4 -2
  151. package/lib/typescript/ui-components/pin/index.d.ts +4 -2
  152. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +1 -1
  153. package/lib/typescript/ui-components/searchbar/index.d.ts +4 -2
  154. package/lib/typescript/ui-components/settings/index.d.ts +10 -5
  155. package/lib/typescript/ui-components/state/index.d.ts +2 -1
  156. package/lib/typescript/utils/hooks/core/backup.d.ts +5 -0
  157. package/lib/typescript/utils/hooks/core/core-init.d.ts +4 -1
  158. package/lib/typescript/utils/hooks/core/identifiers.d.ts +4 -1
  159. package/lib/typescript/utils/hooks/core/proofs.d.ts +1 -0
  160. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +9 -3
  161. package/lib/typescript/utils/parsers/query.d.ts +3 -2
  162. package/package.json +10 -5
  163. package/src/components/entity/entity-attributes.tsx +16 -2
  164. package/src/components/entity/entity-details-with-buttons.tsx +11 -42
  165. package/src/components/entity/entity-details.tsx +60 -30
  166. package/src/components/entity/index.ts +2 -1
  167. package/src/components/history/history-list-item.tsx +17 -13
  168. package/src/components/proof-request/share-credential.tsx +0 -1
  169. package/src/ui-components/blur/index.ts +2 -1
  170. package/src/ui-components/buttons/hold-button.tsx +6 -5
  171. package/src/ui-components/camera/index.tsx +2 -1
  172. package/src/ui-components/control/index.ts +4 -2
  173. package/src/ui-components/credential/card/credential-details-card.tsx +1 -1
  174. package/src/ui-components/credential/credential-carousel-images.tsx +15 -8
  175. package/src/ui-components/entity/entity-cluster.tsx +63 -10
  176. package/src/ui-components/entity/index.ts +4 -2
  177. package/src/ui-components/history/history-details.tsx +5 -2
  178. package/src/ui-components/history/index.ts +6 -3
  179. package/src/ui-components/icons/entity.tsx +8 -12
  180. package/src/ui-components/input/index.ts +6 -3
  181. package/src/ui-components/list/index.ts +4 -2
  182. package/src/ui-components/loader/index.ts +4 -2
  183. package/src/ui-components/pin/index.ts +4 -2
  184. package/src/ui-components/screens/nerd-mode-screen.tsx +1 -1
  185. package/src/ui-components/searchbar/index.ts +4 -2
  186. package/src/ui-components/settings/index.ts +10 -5
  187. package/src/ui-components/state/index.ts +2 -1
  188. package/src/utils/date.ts +1 -1
  189. package/src/utils/hooks/connectivity/connectivity.test.ts +7 -2
  190. package/src/utils/hooks/core/backup.ts +30 -72
  191. package/src/utils/hooks/core/core-init.ts +5 -3
  192. package/src/utils/hooks/core/identifiers.ts +22 -1
  193. package/src/utils/hooks/core/proofs.ts +27 -16
  194. package/src/utils/hooks/core/trust-entity.ts +45 -11
  195. package/src/utils/parsers/credential-sharing.tsx +8 -14
  196. package/src/utils/parsers/query.tsx +12 -2
@@ -40,30 +40,27 @@ export const EntityTrustedIcon = ({
40
40
  }));
41
41
  };
42
42
 
43
- // https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=415-5402&t=prmu1s6PuABrPg0l-0
43
+ // https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=415-5402&t=8jP7yF4eYj70Gm9A-0
44
44
  export const EntityNotTrustedIcon = ({
45
45
  ...props
46
46
  }) => {
47
47
  const colorScheme = useAppColorScheme();
48
48
  return /*#__PURE__*/React.createElement(Svg, _extends({
49
49
  width: 22,
50
- height: 20,
51
- viewBox: "0 0 22 20",
50
+ height: 22,
51
+ viewBox: "0 0 22 22",
52
52
  fill: "none"
53
53
  }, props), /*#__PURE__*/React.createElement(Path, {
54
- d: "M4.35742 17.9673C3.87598 17.9673 3.45817 17.8621 3.104 17.6519C2.74984 17.4416 2.47591 17.1593 2.28223 16.8052C2.09408 16.451 2 16.0581 2 15.6265C2 15.2059 2.11068 14.8047 2.33203 14.4229L8.75684 3.2251C8.97266 2.83219 9.26318 2.53613 9.62842 2.33691C9.99365 2.1377 10.3755 2.03809 10.7739 2.03809C11.1724 2.03809 11.5514 2.1377 11.9111 2.33691C12.2708 2.5306 12.5641 2.82666 12.791 3.2251L19.2158 14.4229C19.3265 14.611 19.4095 14.8075 19.4648 15.0122C19.5202 15.217 19.5479 15.4217 19.5479 15.6265C19.5479 16.0581 19.451 16.451 19.2573 16.8052C19.0636 17.1593 18.7897 17.4416 18.4355 17.6519C18.0869 17.8621 17.6719 17.9673 17.1904 17.9673H4.35742Z",
55
- fill: colorScheme.warning
54
+ d: "M10.575 20a8.241 8.241 0 01-3.312-.672 8.649 8.649 0 01-2.74-1.851 8.837 8.837 0 01-1.85-2.74A8.242 8.242 0 012 11.425c0-1.173.224-2.277.672-3.312a8.793 8.793 0 014.582-4.59 8.243 8.243 0 013.312-.672c1.18 0 2.286.224 3.32.672a8.766 8.766 0 012.74 1.86 8.667 8.667 0 011.86 2.73 8.243 8.243 0 01.672 3.312 8.243 8.243 0 01-.673 3.312 8.768 8.768 0 01-4.598 4.59 8.241 8.241 0 01-3.312.673z",
55
+ fill: colorScheme.error
56
56
  }), /*#__PURE__*/React.createElement(Path, {
57
- d: "M10.7744 1.03809C11.3435 1.03817 11.884 1.18254 12.3838 1.45703L12.3848 1.45605C12.386 1.45672 12.3874 1.45831 12.3887 1.45898C12.3908 1.46017 12.3933 1.46072 12.3955 1.46191L12.3945 1.46289C12.9333 1.75557 13.3522 2.19115 13.6582 2.72754L20.0781 13.916L20.1865 14.1162C20.2888 14.3193 20.3712 14.5309 20.4307 14.751C20.5082 15.0377 20.5479 15.331 20.5479 15.627C20.5478 16.2141 20.4144 16.7738 20.1348 17.2852C19.8533 17.7998 19.4512 18.2119 18.9463 18.5117L18.9453 18.5107C18.4159 18.8284 17.818 18.9678 17.1904 18.9678H4.35742C3.72707 18.9678 3.12678 18.8281 2.59375 18.5117C2.08885 18.2119 1.68678 17.7998 1.40527 17.2852L1.39941 17.2744C1.1288 16.765 1.00007 16.2092 1 15.627C1 15.0214 1.16165 14.4473 1.4668 13.9209L7.88965 2.72754C8.1894 2.18833 8.60891 1.75383 9.14941 1.45898C9.65481 1.18331 10.2012 1.03809 10.7744 1.03809Z",
57
+ d: "M10.566 1.85c1.31 0 2.552.25 3.718.755a9.765 9.765 0 013.047 2.068l.321.335a9.671 9.671 0 011.751 2.708 9.244 9.244 0 01.755 3.71c0 1.304-.25 2.544-.755 3.709a9.766 9.766 0 01-5.123 5.112h0a9.242 9.242 0 01-3.705.753 9.244 9.244 0 01-3.706-.754 9.648 9.648 0 01-3.053-2.062l-.003-.002a9.836 9.836 0 01-2.058-3.047A9.242 9.242 0 011 11.425c0-1.304.25-2.544.755-3.71a9.793 9.793 0 015.1-5.11h.001a9.244 9.244 0 013.71-.754z",
58
58
  stroke: colorScheme.white,
59
- strokeWidth: 2,
60
- strokeOpacity: 0.2
59
+ strokeOpacity: 0.2,
60
+ strokeWidth: 2
61
61
  }), /*#__PURE__*/React.createElement(Path, {
62
- d: "M11.5376 11.5093C11.5265 12.0239 11.2747 12.2812 10.7822 12.2812C10.2786 12.2812 10.0186 12.0267 10.002 11.5176L9.88574 7.33398C9.87467 7.08496 9.95215 6.88021 10.1182 6.71973C10.2842 6.55371 10.5028 6.4707 10.7739 6.4707C11.0396 6.4707 11.2581 6.55371 11.4297 6.71973C11.6012 6.88021 11.6815 7.08773 11.6704 7.34229L11.5376 11.5093Z",
63
- fill: colorScheme.black
64
- }), /*#__PURE__*/React.createElement(Path, {
65
- d: "M11.4961 14.8711C11.2969 15.0482 11.0589 15.1367 10.7822 15.1367C10.5055 15.1367 10.2648 15.0482 10.0601 14.8711C9.86084 14.694 9.76123 14.4671 9.76123 14.1904C9.76123 13.9193 9.86084 13.6924 10.0601 13.5098C10.2593 13.3271 10.5 13.2358 10.7822 13.2358C11.0589 13.2358 11.2969 13.3271 11.4961 13.5098C11.6953 13.6924 11.7949 13.9193 11.7949 14.1904C11.7949 14.4671 11.6953 14.694 11.4961 14.8711Z",
66
- fill: colorScheme.black
62
+ d: "M8.433 14.712a.822.822 0 01-.58.225.773.773 0 01-.557-.225.773.773 0 01-.224-.556c0-.216.077-.398.232-.548l2.167-2.174-2.167-2.159a.768.768 0 01-.232-.547c0-.227.074-.413.224-.557a.773.773 0 01.556-.224c.216 0 .401.072.556.216l2.175 2.167 2.183-2.167a.759.759 0 01.556-.232c.216 0 .399.077.548.232.155.15.232.332.232.548 0 .21-.077.396-.232.556l-2.175 2.167 2.167 2.166c.155.144.232.33.232.556a.759.759 0 01-.232.556.755.755 0 01-.556.225.765.765 0 01-.565-.225l-2.158-2.166-2.15 2.166z",
63
+ fill: colorScheme.white
67
64
  }));
68
65
  };
69
66
  //# sourceMappingURL=entity.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","Svg","Mask","Path","useAppColorScheme","EntityTrustedIcon","props","colorScheme","createElement","_extends","width","height","viewBox","fill","id","maskUnits","x","y","black","white","d","success","fillOpacity","mask","EntityNotTrustedIcon","warning","stroke","strokeWidth","strokeOpacity"],"sources":["entity.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport Svg, { Mask, Path, SvgProps } from 'react-native-svg';\n\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=415-5402&mode=design&t=YI1oD2BfBie5HcvJ-0\nexport const EntityTrustedIcon: FC<SvgProps> = ({ ...props }) => {\n const colorScheme = useAppColorScheme();\n return (\n <Svg width={16} height={19} viewBox=\"0 0 16 19\" fill=\"none\" {...props}>\n <Mask id=\"a\" maskUnits=\"userSpaceOnUse\" x={0} y={0.0496979} width={18} height={21} fill={colorScheme.black}>\n <Path fill={colorScheme.white} d=\"M0 0.0496979H18V21.0496979H0z\" />\n <Path d=\"M10.265 2.255a4 4 0 00-2.53 0l-3 1A4 4 0 002 7.05v4.117a7 7 0 007 7 7 7 0 007-7V7.05a4 4 0 00-2.735-3.795l-3-1z\" />\n </Mask>\n <Path\n d=\"M10.265 2.255a4 4 0 00-2.53 0l-3 1A4 4 0 002 7.05v4.117a7 7 0 007 7 7 7 0 007-7V7.05a4 4 0 00-2.735-3.795l-3-1z\"\n fill={colorScheme.success}\n />\n <Path\n d=\"M4.735 3.255l-.632-1.897.632 1.897zm8.53 0l.632-1.897-.632 1.897zm-5.53-1l.633 1.897-.633-1.897zm2.53 0l-.633 1.897.633-1.897zM7.103.358l-3 1 1.265 3.794 3-1L7.103.358zM0 7.05v4.117h4V7.05H0zm0 4.117a9 9 0 009 9v-4a5 5 0 01-5-5H0zm9 9a9 9 0 009-9h-4a5 5 0 01-5 5v4zm9-9V7.05h-4v4.117h4zm-4.103-9.81l-3-1-1.265 3.795 3 1 1.265-3.794zm-9.794 0A6 6 0 000 7.05h4a2 2 0 011.368-1.898L4.103 1.358zM18 7.05a6 6 0 00-4.103-5.692l-1.264 3.794A2 2 0 0114 7.05h4zM8.368 4.152a2 2 0 011.264 0L10.897.358a6 6 0 00-3.794 0l1.265 3.794z\"\n fill={colorScheme.white}\n fillOpacity={0.2}\n mask=\"url(#a)\"\n />\n <Path\n d=\"M7.914 13.383c.156 0 .3-.037.43-.11a1.06 1.06 0 00.344-.32l3.648-5.64c.057-.089.104-.183.14-.282a.761.761 0 00.063-.297.652.652 0 00-.25-.53.839.839 0 00-.555-.204c-.276 0-.507.148-.695.445l-3.148 5.032-1.446-1.813a.98.98 0 00-.312-.273.717.717 0 00-.352-.086.742.742 0 00-.554.234.754.754 0 00-.227.555c0 .104.018.206.055.304.041.094.099.19.172.29l1.882 2.265c.115.146.237.255.368.328.13.068.276.102.437.102z\"\n fill={colorScheme.white}\n />\n </Svg>\n );\n};\n\n// https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=415-5402&t=prmu1s6PuABrPg0l-0\nexport const EntityNotTrustedIcon: FC<SvgProps> = ({ ...props }) => {\n const colorScheme = useAppColorScheme();\n return (\n <Svg width={22} height={20} viewBox=\"0 0 22 20\" fill=\"none\" {...props}>\n <Path\n d=\"M4.35742 17.9673C3.87598 17.9673 3.45817 17.8621 3.104 17.6519C2.74984 17.4416 2.47591 17.1593 2.28223 16.8052C2.09408 16.451 2 16.0581 2 15.6265C2 15.2059 2.11068 14.8047 2.33203 14.4229L8.75684 3.2251C8.97266 2.83219 9.26318 2.53613 9.62842 2.33691C9.99365 2.1377 10.3755 2.03809 10.7739 2.03809C11.1724 2.03809 11.5514 2.1377 11.9111 2.33691C12.2708 2.5306 12.5641 2.82666 12.791 3.2251L19.2158 14.4229C19.3265 14.611 19.4095 14.8075 19.4648 15.0122C19.5202 15.217 19.5479 15.4217 19.5479 15.6265C19.5479 16.0581 19.451 16.451 19.2573 16.8052C19.0636 17.1593 18.7897 17.4416 18.4355 17.6519C18.0869 17.8621 17.6719 17.9673 17.1904 17.9673H4.35742Z\"\n fill={colorScheme.warning}\n />\n <Path\n d=\"M10.7744 1.03809C11.3435 1.03817 11.884 1.18254 12.3838 1.45703L12.3848 1.45605C12.386 1.45672 12.3874 1.45831 12.3887 1.45898C12.3908 1.46017 12.3933 1.46072 12.3955 1.46191L12.3945 1.46289C12.9333 1.75557 13.3522 2.19115 13.6582 2.72754L20.0781 13.916L20.1865 14.1162C20.2888 14.3193 20.3712 14.5309 20.4307 14.751C20.5082 15.0377 20.5479 15.331 20.5479 15.627C20.5478 16.2141 20.4144 16.7738 20.1348 17.2852C19.8533 17.7998 19.4512 18.2119 18.9463 18.5117L18.9453 18.5107C18.4159 18.8284 17.818 18.9678 17.1904 18.9678H4.35742C3.72707 18.9678 3.12678 18.8281 2.59375 18.5117C2.08885 18.2119 1.68678 17.7998 1.40527 17.2852L1.39941 17.2744C1.1288 16.765 1.00007 16.2092 1 15.627C1 15.0214 1.16165 14.4473 1.4668 13.9209L7.88965 2.72754C8.1894 2.18833 8.60891 1.75383 9.14941 1.45898C9.65481 1.18331 10.2012 1.03809 10.7744 1.03809Z\"\n stroke={colorScheme.white}\n strokeWidth={2}\n strokeOpacity={0.2}\n />\n <Path\n d=\"M11.5376 11.5093C11.5265 12.0239 11.2747 12.2812 10.7822 12.2812C10.2786 12.2812 10.0186 12.0267 10.002 11.5176L9.88574 7.33398C9.87467 7.08496 9.95215 6.88021 10.1182 6.71973C10.2842 6.55371 10.5028 6.4707 10.7739 6.4707C11.0396 6.4707 11.2581 6.55371 11.4297 6.71973C11.6012 6.88021 11.6815 7.08773 11.6704 7.34229L11.5376 11.5093Z\"\n fill={colorScheme.black}\n />\n <Path\n d=\"M11.4961 14.8711C11.2969 15.0482 11.0589 15.1367 10.7822 15.1367C10.5055 15.1367 10.2648 15.0482 10.0601 14.8711C9.86084 14.694 9.76123 14.4671 9.76123 14.1904C9.76123 13.9193 9.86084 13.6924 10.0601 13.5098C10.2593 13.3271 10.5 13.2358 10.7822 13.2358C11.0589 13.2358 11.2969 13.3271 11.4961 13.5098C11.6953 13.6924 11.7949 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C;EAAS,CACf,CAAC,eACFvB,KAAA,CAAAQ,aAAA,CAACL,IAAI;IACHiB,CAAC,EAAC,2ZAA2Z;IAC7ZP,IAAI,EAAEN,WAAW,CAACY;EAAM,CACzB,CACE,CAAC;AAEV,CAAC;;AAED;AACA,OAAO,MAAMK,oBAAkC,GAAGA,CAAC;EAAE,GAAGlB;AAAM,CAAC,KAAK;EAClE,MAAMC,WAAW,GAAGH,iBAAiB,CAAC,CAAC;EACvC,oBACEJ,KAAA,CAAAQ,aAAA,CAACP,GAAG,EAAAQ,QAAA;IAACC,KAAK,EAAE,EAAG;IAACC,MAAM,EAAE,EAAG;IAACC,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC;EAAM,GAAKP,KAAK,gBACnEN,KAAA,CAAAQ,aAAA,CAACL,IAAI;IACHiB,CAAC,EAAC,4oBAA4oB;IAC9oBP,IAAI,EAAEN,WAAW,CAACkB;EAAQ,CAC3B,CAAC,eACFzB,KAAA,CAAAQ,aAAA,CAACL,IAAI;IACHiB,CAAC,EAAC,m0BAAm0B;IACr0BM,MAAM,EAAEnB,WAAW,CAACY,KAAM;IAC1BQ,WAAW,EAAE,CAAE;IACfC,aAAa,EAAE;EAAI,CACpB,CAAC,eACF5B,KAAA,CAAAQ,aAAA,CAACL,IAAI;IACHiB,CAAC,EAAC,+UAA+U;IACjVP,IAAI,EAAEN,WAAW,CAACW;EAAM,CACzB,CAAC,eACFlB,KAAA,CAAAQ,aAAA,CAACL,IAAI;IACHiB,CAAC,EAAC,8YAA8Y;IAChZP,IAAI,EAAEN,WAAW,CAACW;EAAM,CACzB,CACE,CAAC;AAEV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Svg","Mask","Path","useAppColorScheme","EntityTrustedIcon","props","colorScheme","createElement","_extends","width","height","viewBox","fill","id","maskUnits","x","y","black","white","d","success","fillOpacity","mask","EntityNotTrustedIcon","error","stroke","strokeOpacity","strokeWidth"],"sources":["entity.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport Svg, { Mask, Path, SvgProps } from 'react-native-svg';\n\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=415-5402&mode=design&t=YI1oD2BfBie5HcvJ-0\nexport const EntityTrustedIcon: FC<SvgProps> = ({ ...props }) => {\n const colorScheme = useAppColorScheme();\n return (\n <Svg width={16} height={19} viewBox=\"0 0 16 19\" fill=\"none\" {...props}>\n <Mask id=\"a\" maskUnits=\"userSpaceOnUse\" x={0} y={0.0496979} width={18} height={21} fill={colorScheme.black}>\n <Path fill={colorScheme.white} d=\"M0 0.0496979H18V21.0496979H0z\" />\n <Path d=\"M10.265 2.255a4 4 0 00-2.53 0l-3 1A4 4 0 002 7.05v4.117a7 7 0 007 7 7 7 0 007-7V7.05a4 4 0 00-2.735-3.795l-3-1z\" />\n </Mask>\n <Path\n d=\"M10.265 2.255a4 4 0 00-2.53 0l-3 1A4 4 0 002 7.05v4.117a7 7 0 007 7 7 7 0 007-7V7.05a4 4 0 00-2.735-3.795l-3-1z\"\n fill={colorScheme.success}\n />\n <Path\n d=\"M4.735 3.255l-.632-1.897.632 1.897zm8.53 0l.632-1.897-.632 1.897zm-5.53-1l.633 1.897-.633-1.897zm2.53 0l-.633 1.897.633-1.897zM7.103.358l-3 1 1.265 3.794 3-1L7.103.358zM0 7.05v4.117h4V7.05H0zm0 4.117a9 9 0 009 9v-4a5 5 0 01-5-5H0zm9 9a9 9 0 009-9h-4a5 5 0 01-5 5v4zm9-9V7.05h-4v4.117h4zm-4.103-9.81l-3-1-1.265 3.795 3 1 1.265-3.794zm-9.794 0A6 6 0 000 7.05h4a2 2 0 011.368-1.898L4.103 1.358zM18 7.05a6 6 0 00-4.103-5.692l-1.264 3.794A2 2 0 0114 7.05h4zM8.368 4.152a2 2 0 011.264 0L10.897.358a6 6 0 00-3.794 0l1.265 3.794z\"\n fill={colorScheme.white}\n fillOpacity={0.2}\n mask=\"url(#a)\"\n />\n <Path\n d=\"M7.914 13.383c.156 0 .3-.037.43-.11a1.06 1.06 0 00.344-.32l3.648-5.64c.057-.089.104-.183.14-.282a.761.761 0 00.063-.297.652.652 0 00-.25-.53.839.839 0 00-.555-.204c-.276 0-.507.148-.695.445l-3.148 5.032-1.446-1.813a.98.98 0 00-.312-.273.717.717 0 00-.352-.086.742.742 0 00-.554.234.754.754 0 00-.227.555c0 .104.018.206.055.304.041.094.099.19.172.29l1.882 2.265c.115.146.237.255.368.328.13.068.276.102.437.102z\"\n fill={colorScheme.white}\n />\n </Svg>\n );\n};\n\n// https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=415-5402&t=8jP7yF4eYj70Gm9A-0\nexport const EntityNotTrustedIcon: FC<SvgProps> = ({ ...props }) => {\n const colorScheme = useAppColorScheme();\n return (\n <Svg width={22} height={22} viewBox=\"0 0 22 22\" fill=\"none\" {...props}>\n <Path\n d=\"M10.575 20a8.241 8.241 0 01-3.312-.672 8.649 8.649 0 01-2.74-1.851 8.837 8.837 0 01-1.85-2.74A8.242 8.242 0 012 11.425c0-1.173.224-2.277.672-3.312a8.793 8.793 0 014.582-4.59 8.243 8.243 0 013.312-.672c1.18 0 2.286.224 3.32.672a8.766 8.766 0 012.74 1.86 8.667 8.667 0 011.86 2.73 8.243 8.243 0 01.672 3.312 8.243 8.243 0 01-.673 3.312 8.768 8.768 0 01-4.598 4.59 8.241 8.241 0 01-3.312.673z\"\n fill={colorScheme.error}\n />\n <Path\n d=\"M10.566 1.85c1.31 0 2.552.25 3.718.755a9.765 9.765 0 013.047 2.068l.321.335a9.671 9.671 0 011.751 2.708 9.244 9.244 0 01.755 3.71c0 1.304-.25 2.544-.755 3.709a9.766 9.766 0 01-5.123 5.112h0a9.242 9.242 0 01-3.705.753 9.244 9.244 0 01-3.706-.754 9.648 9.648 0 01-3.053-2.062l-.003-.002a9.836 9.836 0 01-2.058-3.047A9.242 9.242 0 011 11.425c0-1.304.25-2.544.755-3.71a9.793 9.793 0 015.1-5.11h.001a9.244 9.244 0 013.71-.754z\"\n stroke={colorScheme.white}\n strokeOpacity={0.2}\n strokeWidth={2}\n />\n <Path\n d=\"M8.433 14.712a.822.822 0 01-.58.225.773.773 0 01-.557-.225.773.773 0 01-.224-.556c0-.216.077-.398.232-.548l2.167-2.174-2.167-2.159a.768.768 0 01-.232-.547c0-.227.074-.413.224-.557a.773.773 0 01.556-.224c.216 0 .401.072.556.216l2.175 2.167 2.183-2.167a.759.759 0 01.556-.232c.216 0 .399.077.548.232.155.15.232.332.232.548 0 .21-.077.396-.232.556l-2.175 2.167 2.167 2.166c.155.144.232.33.232.556a.759.759 0 01-.232.556.755.755 0 01-.556.225.765.765 0 01-.565-.225l-2.158-2.166-2.15 2.166z\"\n fill={colorScheme.white}\n />\n </Svg>\n )\n}\n"],"mappings":";AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,OAAOC,GAAG,IAAIC,IAAI,EAAEC,IAAI,QAAkB,kBAAkB;AAE5D,SAASC,iBAAiB,QAAQ,+BAA+B;;AAEjE;AACA,OAAO,MAAMC,iBAA+B,GAAGA,CAAC;EAAE,GAAGC;AAAM,CAAC,KAAK;EAC/D,MAAMC,WAAW,GAAGH,iBAAiB,CAAC,CAAC;EACvC,oBACEJ,KAAA,CAAAQ,aAAA,CAACP,GAAG,EAAAQ,QAAA;IAACC,KAAK,EAAE,EAAG;IAACC,MAAM,EAAE,EAAG;IAACC,OAAO,EAAC,WAAW;IAACC,IAAI,EAAC;EAAM,GAAKP,KAAK,gBACnEN,KAAA,CAAAQ,aAAA,CAACN,IAAI;IAACY,EAAE,EAAC,GAAG;IAACC,SAAS,EAAC,gBAAgB;IAACC,CAAC,EAAE,CAAE;IAACC,CAAC,EAAE,SAAU;IAACP,KAAK,EAAE,EAAG;IAACC,MAAM,EAAE,EAAG;IAACE,IAAI,EAAEN,WAAW,CAACW;EAAM,gBACzGlB,KAAA,CAAAQ,aAAA,CAACL,IAAI;I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AAC,weAAwe;IAC1eP,IAAI,EAAEN,WAAW,CAACY;EAAM,CACzB,CACE,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -1,7 +1,7 @@
1
- import RadioGroup, { RadioGroupItem, RadioGroupProps } from './radio-group';
2
- import SelectionInput, { SelectionInputChoice, SelectionInputProps } from './selection-input';
3
- import TextInput, { TextInputAccessory, TextInputProps } from './text-input';
4
- export { RadioGroup, RadioGroupItem, RadioGroupProps };
5
- export { SelectionInput, SelectionInputChoice, SelectionInputProps };
6
- export { TextInput, TextInputAccessory, TextInputProps };
1
+ import RadioGroup from './radio-group';
2
+ import SelectionInput from './selection-input';
3
+ import TextInput, { TextInputAccessory } from './text-input';
4
+ export { RadioGroup };
5
+ export { SelectionInput };
6
+ export { TextInput, TextInputAccessory };
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["RadioGroup","RadioGroupItem","RadioGroupProps","SelectionInput","SelectionInputChoice","SelectionInputProps","TextInput","TextInputAccessory","TextInputProps"],"sources":["index.ts"],"sourcesContent":["import RadioGroup, { RadioGroupItem, RadioGroupProps } from './radio-group';\nimport SelectionInput, { SelectionInputChoice, SelectionInputProps } from './selection-input';\nimport TextInput, { TextInputAccessory, TextInputProps } from './text-input';\n\nexport { RadioGroup, RadioGroupItem, RadioGroupProps };\nexport { SelectionInput, SelectionInputChoice, SelectionInputProps };\nexport { TextInput, TextInputAccessory, TextInputProps };\n"],"mappings":"AAAA,OAAOA,UAAU,IAAIC,cAAc,EAAEC,eAAe,QAAQ,eAAe;AAC3E,OAAOC,cAAc,IAAIC,oBAAoB,EAAEC,mBAAmB,QAAQ,mBAAmB;AAC7F,OAAOC,SAAS,IAAIC,kBAAkB,EAAEC,cAAc,QAAQ,cAAc;AAE5E,SAASR,UAAU,EAAEC,cAAc,EAAEC,eAAe;AACpD,SAASC,cAAc,EAAEC,oBAAoB,EAAEC,mBAAmB;AAClE,SAASC,SAAS,EAAEC,kBAAkB,EAAEC,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["RadioGroup","SelectionInput","TextInput","TextInputAccessory"],"sources":["index.ts"],"sourcesContent":["import type { RadioGroupItem, RadioGroupProps } from './radio-group';\nimport RadioGroup from './radio-group';\nimport type { SelectionInputChoice, SelectionInputProps } from './selection-input';\nimport SelectionInput from './selection-input';\nimport type { TextInputProps } from './text-input';\nimport TextInput, { TextInputAccessory } from './text-input';\n\nexport { RadioGroup, RadioGroupItem, RadioGroupProps };\nexport { SelectionInput, SelectionInputChoice, SelectionInputProps };\nexport { TextInput, TextInputAccessory, TextInputProps };\n"],"mappings":"AACA,OAAOA,UAAU,MAAM,eAAe;AAEtC,OAAOC,cAAc,MAAM,mBAAmB;AAE9C,OAAOC,SAAS,IAAIC,kBAAkB,QAAQ,cAAc;AAE5D,SAASH,UAAU;AACnB,SAASC,cAAc;AACvB,SAASC,SAAS,EAAEC,kBAAkB","ignoreList":[]}
@@ -1,6 +1,6 @@
1
- import ListSectionHeader, { ListSectionHeaderProps } from './list-section-header';
2
- import ListTitleHeader, { ListTitleHeaderProps } from './list-title-header';
3
- export { ListSectionHeader, ListSectionHeaderProps };
4
- export { ListTitleHeader, ListTitleHeaderProps };
1
+ import ListSectionHeader from './list-section-header';
2
+ import ListTitleHeader from './list-title-header';
3
+ export { ListSectionHeader };
4
+ export { ListTitleHeader };
5
5
  export * from './wallet';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ListSectionHeader","ListSectionHeaderProps","ListTitleHeader","ListTitleHeaderProps"],"sources":["index.ts"],"sourcesContent":["import ListSectionHeader, { ListSectionHeaderProps } from './list-section-header';\nimport ListTitleHeader, { ListTitleHeaderProps } from './list-title-header';\n\nexport { ListSectionHeader, ListSectionHeaderProps };\nexport { ListTitleHeader, ListTitleHeaderProps };\nexport * from './wallet';\n"],"mappings":"AAAA,OAAOA,iBAAiB,IAAIC,sBAAsB,QAAQ,uBAAuB;AACjF,OAAOC,eAAe,IAAIC,oBAAoB,QAAQ,qBAAqB;AAE3E,SAASH,iBAAiB,EAAEC,sBAAsB;AAClD,SAASC,eAAe,EAAEC,oBAAoB;AAC9C,cAAc,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["ListSectionHeader","ListTitleHeader"],"sources":["index.ts"],"sourcesContent":["import type { ListSectionHeaderProps } from './list-section-header';\nimport ListSectionHeader from './list-section-header';\nimport type { ListTitleHeaderProps } from './list-title-header';\nimport ListTitleHeader from './list-title-header';\n\nexport { ListSectionHeader, ListSectionHeaderProps };\nexport { ListTitleHeader, ListTitleHeaderProps };\nexport * from './wallet';\n"],"mappings":"AACA,OAAOA,iBAAiB,MAAM,uBAAuB;AAErD,OAAOC,eAAe,MAAM,qBAAqB;AAEjD,SAASD,iBAAiB;AAC1B,SAASC,eAAe;AACxB,cAAc,UAAU","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import LoaderView, { LoaderViewProps, LoaderViewState } from './loader';
2
- import LoadingResultScreen, { LoadingResultScreenProps } from './loading-result';
3
- export { LoaderView, LoaderViewProps, LoaderViewState };
4
- export { LoadingResultScreen, LoadingResultScreenProps };
1
+ import LoaderView, { LoaderViewState } from './loader';
2
+ import LoadingResultScreen from './loading-result';
3
+ export { LoaderView, LoaderViewState };
4
+ export { LoadingResultScreen };
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["LoaderView","LoaderViewProps","LoaderViewState","LoadingResultScreen","LoadingResultScreenProps"],"sources":["index.ts"],"sourcesContent":["import LoaderView, { LoaderViewProps, LoaderViewState } from './loader';\nimport LoadingResultScreen, { LoadingResultScreenProps } from './loading-result';\n\nexport { LoaderView, LoaderViewProps, LoaderViewState };\nexport { LoadingResultScreen, LoadingResultScreenProps };\n"],"mappings":"AAAA,OAAOA,UAAU,IAAIC,eAAe,EAAEC,eAAe,QAAQ,UAAU;AACvE,OAAOC,mBAAmB,IAAIC,wBAAwB,QAAQ,kBAAkB;AAEhF,SAASJ,UAAU,EAAEC,eAAe,EAAEC,eAAe;AACrD,SAASC,mBAAmB,EAAEC,wBAAwB","ignoreList":[]}
1
+ {"version":3,"names":["LoaderView","LoaderViewState","LoadingResultScreen"],"sources":["index.ts"],"sourcesContent":["import type { LoaderViewProps } from './loader';\nimport LoaderView, { LoaderViewState } from './loader';\nimport type { LoadingResultScreenProps } from './loading-result';\nimport LoadingResultScreen from './loading-result';\n\nexport { LoaderView, LoaderViewProps, LoaderViewState };\nexport { LoadingResultScreen, LoadingResultScreenProps };\n"],"mappings":"AACA,OAAOA,UAAU,IAAIC,eAAe,QAAQ,UAAU;AAEtD,OAAOC,mBAAmB,MAAM,kBAAkB;AAElD,SAASF,UAAU,EAAmBC,eAAe;AACrD,SAASC,mBAAmB","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import { Biometry } from './keypad';
2
- import { PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps } from './pin-code-screen';
3
- import PinLockModal, { PinLockModalLabels } from './pin-lock';
4
- export { Biometry, PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps, PinLockModal, PinLockModalLabels };
2
+ import { PinCodeScreen } from './pin-code-screen';
3
+ import PinLockModal from './pin-lock';
4
+ export { Biometry, PinCodeScreen, PinLockModal };
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Biometry","PinCodeScreen","PinCodeScreenActions","PinCodeScreenProps","PinLockModal","PinLockModalLabels"],"sources":["index.ts"],"sourcesContent":["import { Biometry } from './keypad';\nimport { PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps } from './pin-code-screen';\nimport PinLockModal, { PinLockModalLabels } from './pin-lock';\n\nexport { Biometry, PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps, PinLockModal, PinLockModalLabels };\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,UAAU;AACnC,SAASC,aAAa,EAAEC,oBAAoB,EAAEC,kBAAkB,QAAQ,mBAAmB;AAC3F,OAAOC,YAAY,IAAIC,kBAAkB,QAAQ,YAAY;AAE7D,SAASL,QAAQ,EAAEC,aAAa,EAAEC,oBAAoB,EAAEC,kBAAkB,EAAEC,YAAY,EAAEC,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["Biometry","PinCodeScreen","PinLockModal"],"sources":["index.ts"],"sourcesContent":["import { Biometry } from './keypad';\nimport type { PinCodeScreenActions, PinCodeScreenProps } from './pin-code-screen';\nimport { PinCodeScreen } from './pin-code-screen';\nimport type { PinLockModalLabels } from './pin-lock';\nimport PinLockModal from './pin-lock';\n\nexport { Biometry, PinCodeScreen, PinCodeScreenActions, PinCodeScreenProps, PinLockModal, PinLockModalLabels };\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,UAAU;AAEnC,SAASC,aAAa,QAAQ,mBAAmB;AAEjD,OAAOC,YAAY,MAAM,YAAY;AAErC,SAASF,QAAQ,EAAEC,aAAa,EAA4CC,YAAY","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","SectionList","StyleSheet","View","Animated","useAnimatedScrollHandler","useSharedValue","useSafeAreaInsets","EntityDetailsWithButtons","ContrastingStatusBar","concatTestID","TouchableOpacity","SectionEntityCluster","NavigationHeader","CloseIcon","NerdModeItem","Typography","useAppColorScheme","EntityType","isSectionEntityCluster","item","identifier","undefined","AnimatedSectionList","createAnimatedComponent","NerdModeScreen","sections","labels","onClose","onCopyToClipboard","entityCluster","testID","title","_entityCluster$testID","insets","colorScheme","scrollOffset","expandedAttributes","setExpandedAttributes","onExpand","expanded","prev","onScroll","contentOffset","value","y","lastElementsForSection","reduce","acc","sectionTitle","data","lastElement","length","attributeKey","createElement","Fragment","backgroundColor","nerdView","background","leftItem","onPress","color","white","style","paddingTop","top","titleColor","ListHeaderComponent","_extends","entityType","ProofEntity","entityLabels","attributesLabels","styles","textColor","renderItem","section","index","_item$testID","CredentialEntity","toString","last","renderSectionHeader","sectionHeaderContainer","sectionHeaderText","scrollEventThrottle","stickySectionHeadersEnabled","create","paddingHorizontal","paddingVertical","justifyContent","marginTop","opacity"],"sources":["nerd-mode-screen.tsx"],"sourcesContent":["import { IdentifierListItem } from '@procivis/react-native-one-core/dist/src/identifier';\nimport React, { FunctionComponent, useState } from 'react';\nimport { SectionList, StyleSheet, View } from 'react-native';\nimport Animated, { useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport EntityDetailsWithButtons, { ContextRole } from '../../components/entity/entity-details-with-buttons';\nimport ContrastingStatusBar from '../../utils/contrasting-status-bar';\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport SectionEntityCluster from '../entity/entity-cluster';\nimport NavigationHeader from '../header/navigation-header';\nimport { CloseIcon } from '../icons/icons';\nimport NerdModeItem, { NerdModeItemProps } from '../nerd-view/nerd-mode-item';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport interface EntityLabels {\n trusted: string;\n unknownIssuer: string;\n unknownVerifier: string;\n visitWebsite: string;\n termsAndServices: string;\n privacyPolicy: string;\n}\n\nexport interface AttributesLabels {\n trustRegistry: string;\n issuerIdentifier: string;\n entityIdentifier: string;\n role: string;\n expand: string;\n collapse: string;\n}\n\ninterface SectionEntityCluster {\n identifier?: IdentifierListItem;\n subline?: string;\n entityLabels: EntityLabels;\n role: ContextRole;\n testID?: string;\n}\n\ntype SectionAttribute = Omit<NerdModeItemProps, 'labels' | 'onCopyToClipboard'>;\n\ntype NerdModeSectionItem = SectionAttribute | SectionEntityCluster;\n\nexport type NerdModeSection = {\n data: NerdModeSectionItem[];\n title?: string;\n};\n\nexport type NerdModeScreenProps = {\n entityCluster?: SectionEntityCluster;\n labels: AttributesLabels;\n onClose: () => void;\n onCopyToClipboard: (value: string) => void;\n sections: NerdModeSection[];\n testID: string;\n title: string;\n};\n\nexport enum EntityType {\n CredentialEntity,\n ProofEntity,\n}\n\nfunction isSectionEntityCluster(item: NerdModeSectionItem): item is SectionEntityCluster {\n return (item as SectionEntityCluster).identifier !== undefined;\n}\n\nconst AnimatedSectionList = Animated.createAnimatedComponent(SectionList<NerdModeSectionItem>);\n\nconst NerdModeScreen: FunctionComponent<NerdModeScreenProps> = ({\n sections,\n labels,\n onClose,\n onCopyToClipboard,\n entityCluster,\n testID,\n title,\n}) => {\n const insets = useSafeAreaInsets();\n const colorScheme = useAppColorScheme();\n const scrollOffset = useSharedValue(0);\n const [expandedAttributes, setExpandedAttributes] = useState(0);\n\n // This is a bit of a hack. It's used to notify attributes that another attribute has been expanded\n // which will allow them to update their scroll offset accordingly.\n const onExpand = (expanded: boolean) => {\n setExpandedAttributes((prev) => (expanded ? prev + 1 : prev - 1));\n };\n\n const onScroll = useAnimatedScrollHandler({\n onScroll: ({ contentOffset }) => {\n scrollOffset.value = contentOffset.y;\n },\n });\n\n const lastElementsForSection = sections.reduce((acc, { title: sectionTitle = '', data }) => {\n const lastElement = data[data.length - 1];\n return {\n ...acc,\n [sectionTitle]: lastElement && !isSectionEntityCluster(lastElement) ? lastElement.attributeKey : '',\n };\n }, {} as Record<string, string>);\n\n return (\n <>\n <ContrastingStatusBar backgroundColor={colorScheme.nerdView.background} />\n <NavigationHeader\n leftItem={\n <TouchableOpacity onPress={onClose} testID={concatTestID(testID, 'closeIcon')}>\n <CloseIcon color={colorScheme.white} />\n </TouchableOpacity>\n }\n style={{\n backgroundColor: colorScheme.nerdView.background,\n paddingTop: insets.top,\n }}\n title={title}\n titleColor={colorScheme.white}\n />\n <AnimatedSectionList\n ListHeaderComponent={\n entityCluster ? (\n <EntityDetailsWithButtons\n {...entityCluster}\n entityType={EntityType.ProofEntity}\n entityLabels={entityCluster.entityLabels}\n attributesLabels={labels}\n style={[\n styles.entityCluster,\n {\n backgroundColor: colorScheme.nerdView.background,\n },\n ]}\n onCopyToClipboard={onCopyToClipboard}\n testID={entityCluster.testID ?? concatTestID(testID, 'entityCluster')}\n textColor={colorScheme.white}\n />\n ) : null\n }\n onScroll={onScroll}\n renderItem={({ item, section, index }) => {\n if (isSectionEntityCluster(item)) {\n return (\n <EntityDetailsWithButtons\n {...item}\n entityType={EntityType.CredentialEntity}\n entityLabels={item!.entityLabels}\n attributesLabels={labels}\n style={[\n styles.entityCluster,\n {\n backgroundColor: colorScheme.nerdView.background,\n },\n ]}\n onCopyToClipboard={onCopyToClipboard}\n testID={item.testID ?? concatTestID(testID, 'sectionEntityCluster', index.toString())}\n textColor={colorScheme.white}\n />\n );\n } else {\n return (\n <NerdModeItem\n {...item}\n expandedAttributes={expandedAttributes}\n labels={labels}\n last={lastElementsForSection[section.title] === item.attributeKey}\n onCopyToClipboard={onCopyToClipboard}\n onExpand={onExpand}\n scrollOffset={scrollOffset}\n testID={concatTestID(testID, item.testID)}\n />\n );\n }\n }}\n renderSectionHeader={({ section }) => {\n return section.title ? (\n <View style={styles.sectionHeaderContainer} testID={concatTestID(testID, section.title)}>\n <Typography color={colorScheme.white} style={styles.sectionHeaderText}>\n {section.title}\n </Typography>\n </View>\n ) : null;\n }}\n scrollEventThrottle={16}\n sections={sections}\n stickySectionHeadersEnabled={false}\n style={{ backgroundColor: colorScheme.nerdView.background }}\n testID={testID}\n />\n </>\n );\n};\n\nconst styles = StyleSheet.create({\n entityCluster: {\n paddingHorizontal: 24,\n paddingVertical: 20,\n },\n sectionHeaderContainer: {\n justifyContent: 'center',\n marginTop: 20,\n paddingVertical: 16,\n },\n sectionHeaderText: {\n opacity: 0.7,\n paddingHorizontal: 20,\n },\n});\n\nexport default NerdModeScreen;\n"],"mappings":";AACA,OAAOA,KAAK,IAAuBC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,WAAW,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC5D,OAAOC,QAAQ,IAAIC,wBAAwB,EAAEC,cAAc,QAAQ,yBAAyB;AAC5F,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,OAAOC,wBAAwB,MAAuB,qDAAqD;AAC3G,OAAOC,oBAAo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IACrBC,eAAe,EAAE;EACnB,CAAC;EACDN,sBAAsB,EAAE;IACtBO,cAAc,EAAE,QAAQ;IACxBC,SAAS,EAAE,EAAE;IACbF,eAAe,EAAE;EACnB,CAAC;EACDL,iBAAiB,EAAE;IACjBQ,OAAO,EAAE,GAAG;IACZJ,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAEF,eAAe/D,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["React","useState","SectionList","StyleSheet","View","Animated","useAnimatedScrollHandler","useSharedValue","useSafeAreaInsets","EntityDetailsWithButtons","ContrastingStatusBar","concatTestID","TouchableOpacity","SectionEntityCluster","NavigationHeader","CloseIcon","NerdModeItem","Typography","useAppColorScheme","EntityType","isSectionEntityCluster","item","identifier","undefined","AnimatedSectionList","createAnimatedComponent","NerdModeScreen","sections","labels","onClose","onCopyToClipboard","entityCluster","testID","title","_entityCluster$testID","insets","colorScheme","scrollOffset","expandedAttributes","setExpandedAttributes","onExpand","expanded","prev","onScroll","contentOffset","value","y","lastElementsForSection","reduce","acc","sectionTitle","data","lastElement","length","attributeKey","createElement","Fragment","backgroundColor","nerdView","background","leftItem","onPress","color","white","style","paddingTop","top","titleColor","ListHeaderComponent","_extends","entityType","ProofEntity","entityLabels","attributesLabels","styles","textColor","renderItem","section","index","_item$testID","CredentialEntity","toString","last","renderSectionHeader","sectionHeaderContainer","sectionHeaderText","scrollEventThrottle","stickySectionHeadersEnabled","create","paddingHorizontal","paddingVertical","justifyContent","marginTop","opacity"],"sources":["nerd-mode-screen.tsx"],"sourcesContent":["import { IdentifierListItem } from '@procivis/react-native-one-core';\nimport React, { FunctionComponent, useState } from 'react';\nimport { SectionList, StyleSheet, View } from 'react-native';\nimport Animated, { useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport EntityDetailsWithButtons, { ContextRole } from '../../components/entity/entity-details-with-buttons';\nimport ContrastingStatusBar from '../../utils/contrasting-status-bar';\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport SectionEntityCluster from '../entity/entity-cluster';\nimport NavigationHeader from '../header/navigation-header';\nimport { CloseIcon } from '../icons/icons';\nimport NerdModeItem, { NerdModeItemProps } from '../nerd-view/nerd-mode-item';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport interface EntityLabels {\n trusted: string;\n unknownIssuer: string;\n unknownVerifier: string;\n visitWebsite: string;\n termsAndServices: string;\n privacyPolicy: string;\n}\n\nexport interface AttributesLabels {\n trustRegistry: string;\n issuerIdentifier: string;\n entityIdentifier: string;\n role: string;\n expand: string;\n collapse: string;\n}\n\ninterface SectionEntityCluster {\n identifier?: IdentifierListItem;\n subline?: string;\n entityLabels: EntityLabels;\n role: ContextRole;\n testID?: string;\n}\n\ntype SectionAttribute = Omit<NerdModeItemProps, 'labels' | 'onCopyToClipboard'>;\n\ntype NerdModeSectionItem = SectionAttribute | SectionEntityCluster;\n\nexport type NerdModeSection = {\n data: NerdModeSectionItem[];\n title?: string;\n};\n\nexport type NerdModeScreenProps = {\n entityCluster?: SectionEntityCluster;\n labels: AttributesLabels;\n onClose: () => void;\n onCopyToClipboard: (value: string) => void;\n sections: NerdModeSection[];\n testID: string;\n title: string;\n};\n\nexport enum EntityType {\n CredentialEntity,\n ProofEntity,\n}\n\nfunction isSectionEntityCluster(item: NerdModeSectionItem): item is SectionEntityCluster {\n return (item as SectionEntityCluster).identifier !== undefined;\n}\n\nconst AnimatedSectionList = Animated.createAnimatedComponent(SectionList<NerdModeSectionItem>);\n\nconst NerdModeScreen: FunctionComponent<NerdModeScreenProps> = ({\n sections,\n labels,\n onClose,\n onCopyToClipboard,\n entityCluster,\n testID,\n title,\n}) => {\n const insets = useSafeAreaInsets();\n const colorScheme = useAppColorScheme();\n const scrollOffset = useSharedValue(0);\n const [expandedAttributes, setExpandedAttributes] = useState(0);\n\n // This is a bit of a hack. It's used to notify attributes that another attribute has been expanded\n // which will allow them to update their scroll offset accordingly.\n const onExpand = (expanded: boolean) => {\n setExpandedAttributes((prev) => (expanded ? prev + 1 : prev - 1));\n };\n\n const onScroll = useAnimatedScrollHandler({\n onScroll: ({ contentOffset }) => {\n scrollOffset.value = contentOffset.y;\n },\n });\n\n const lastElementsForSection = sections.reduce((acc, { title: sectionTitle = '', data }) => {\n const lastElement = data[data.length - 1];\n return {\n ...acc,\n [sectionTitle]: lastElement && !isSectionEntityCluster(lastElement) ? lastElement.attributeKey : '',\n };\n }, {} as Record<string, string>);\n\n return (\n <>\n <ContrastingStatusBar backgroundColor={colorScheme.nerdView.background} />\n <NavigationHeader\n leftItem={\n <TouchableOpacity onPress={onClose} testID={concatTestID(testID, 'closeIcon')}>\n <CloseIcon color={colorScheme.white} />\n </TouchableOpacity>\n }\n style={{\n backgroundColor: colorScheme.nerdView.background,\n paddingTop: insets.top,\n }}\n title={title}\n titleColor={colorScheme.white}\n />\n <AnimatedSectionList\n ListHeaderComponent={\n entityCluster ? (\n <EntityDetailsWithButtons\n {...entityCluster}\n entityType={EntityType.ProofEntity}\n entityLabels={entityCluster.entityLabels}\n attributesLabels={labels}\n style={[\n styles.entityCluster,\n {\n backgroundColor: colorScheme.nerdView.background,\n },\n ]}\n onCopyToClipboard={onCopyToClipboard}\n testID={entityCluster.testID ?? concatTestID(testID, 'entityCluster')}\n textColor={colorScheme.white}\n />\n ) : null\n }\n onScroll={onScroll}\n renderItem={({ item, section, index }) => {\n if (isSectionEntityCluster(item)) {\n return (\n <EntityDetailsWithButtons\n {...item}\n entityType={EntityType.CredentialEntity}\n entityLabels={item!.entityLabels}\n attributesLabels={labels}\n style={[\n styles.entityCluster,\n {\n backgroundColor: colorScheme.nerdView.background,\n },\n ]}\n onCopyToClipboard={onCopyToClipboard}\n testID={item.testID ?? concatTestID(testID, 'sectionEntityCluster', index.toString())}\n textColor={colorScheme.white}\n />\n );\n } else {\n return (\n <NerdModeItem\n {...item}\n expandedAttributes={expandedAttributes}\n labels={labels}\n last={lastElementsForSection[section.title] === item.attributeKey}\n onCopyToClipboard={onCopyToClipboard}\n onExpand={onExpand}\n scrollOffset={scrollOffset}\n testID={concatTestID(testID, item.testID)}\n />\n );\n }\n }}\n renderSectionHeader={({ section }) => {\n return section.title ? (\n <View style={styles.sectionHeaderContainer} testID={concatTestID(testID, section.title)}>\n <Typography color={colorScheme.white} style={styles.sectionHeaderText}>\n {section.title}\n </Typography>\n </View>\n ) : null;\n }}\n scrollEventThrottle={16}\n sections={sections}\n stickySectionHeadersEnabled={false}\n style={{ backgroundColor: colorScheme.nerdView.background }}\n testID={testID}\n />\n </>\n );\n};\n\nconst styles = StyleSheet.create({\n entityCluster: {\n paddingHorizontal: 24,\n paddingVertical: 20,\n },\n sectionHeaderContainer: {\n justifyContent: 'center',\n marginTop: 20,\n paddingVertical: 16,\n },\n sectionHeaderText: {\n opacity: 0.7,\n paddingHorizontal: 20,\n },\n});\n\nexport default NerdModeScreen;\n"],"mappings":";AACA,OAAOA,KAAK,IAAuBC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,WAAW,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC5D,OAAOC,QAAQ,IAAIC,wBAAwB,EAAEC,cAAc,QAAQ,yBAAyB;AAC5F,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,OAAOC,wBAAwB,MAAuB,qDAAqD;AAC3G,OAAOC,oBAAoB,MAAM,oCAAoC;AACrE,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,gBAAgB,QAAQ,+CAA+C;AAChF,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,gBAAgB,MAAM,6BAA6B;AAC1D,SAASC,SAAS,QAAQ,gBAAgB;AAC1C,OAAOC,YAAY,MAA6B,6BAA6B;AAC7E,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AA+CjE,WAAYC,UAAU,0BAAVA,UAAU;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,QAAS;UACnBH,YAAY,EAAEA,YAAa;UAC3BL,MAAM,EAAErB,YAAY,CAACqB,MAAM,EAAEX,IAAI,CAACW,MAAM;QAAE,EAC3C,CAAC;MAEN;IACF,CAAE;IACFmD,mBAAmB,EAAEA,CAAC;MAAEN;IAAQ,CAAC,KAAK;MACpC,OAAOA,OAAO,CAAC5C,KAAK,gBAClBjC,KAAA,CAAAuD,aAAA,CAACnD,IAAI;QAAC4D,KAAK,EAAEU,MAAM,CAACU,sBAAuB;QAACpD,MAAM,EAAErB,YAAY,CAACqB,MAAM,EAAE6C,OAAO,CAAC5C,KAAK;MAAE,gBACtFjC,KAAA,CAAAuD,aAAA,CAACtC,UAAU;QAAC6C,KAAK,EAAE1B,WAAW,CAAC2B,KAAM;QAACC,KAAK,EAAEU,MAAM,CAACW;MAAkB,GACnER,OAAO,CAAC5C,KACC,CACR,CAAC,GACL,IAAI;IACV,CAAE;IACFqD,mBAAmB,EAAE,EAAG;IACxB3D,QAAQ,EAAEA,QAAS;IACnB4D,2BAA2B,EAAE,KAAM;IACnCvB,KAAK,EAAE;MAAEP,eAAe,EAAErB,WAAW,CAACsB,QAAQ,CAACC;IAAW,CAAE;IAC5D3B,MAAM,EAAEA;EAAO,CAChB,CACD,CAAC;AAEP,CAAC;AAED,MAAM0C,MAAM,GAAGvE,UAAU,CAACqF,MAAM,CAAC;EAC/BzD,aAAa,EAAE;IACb0D,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDN,sBAAsB,EAAE;IACtBO,cAAc,EAAE,QAAQ;IACxBC,SAAS,EAAE,EAAE;IACbF,eAAe,EAAE;EACnB,CAAC;EACDL,iBAAiB,EAAE;IACjBQ,OAAO,EAAE,GAAG;IACZJ,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAEF,eAAe/D,cAAc","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import AnimatedSearchBar, { AnimatedSearchBarProps } from './animated-search-bar';
2
- import SearchBar, { SearchBarProps } from './search-bar';
3
- export { AnimatedSearchBar, AnimatedSearchBarProps };
4
- export { SearchBar, SearchBarProps };
1
+ import AnimatedSearchBar from './animated-search-bar';
2
+ import SearchBar from './search-bar';
3
+ export { AnimatedSearchBar };
4
+ export { SearchBar };
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AnimatedSearchBar","AnimatedSearchBarProps","SearchBar","SearchBarProps"],"sources":["index.ts"],"sourcesContent":["import AnimatedSearchBar, { AnimatedSearchBarProps } from './animated-search-bar';\nimport SearchBar, { SearchBarProps } from './search-bar';\n\nexport { AnimatedSearchBar, AnimatedSearchBarProps };\nexport { SearchBar, SearchBarProps };\n"],"mappings":"AAAA,OAAOA,iBAAiB,IAAIC,sBAAsB,QAAQ,uBAAuB;AACjF,OAAOC,SAAS,IAAIC,cAAc,QAAQ,cAAc;AAExD,SAASH,iBAAiB,EAAEC,sBAAsB;AAClD,SAASC,SAAS,EAAEC,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["AnimatedSearchBar","SearchBar"],"sources":["index.ts"],"sourcesContent":["import type { AnimatedSearchBarProps } from './animated-search-bar';\nimport AnimatedSearchBar from './animated-search-bar';\nimport type { SearchBarProps } from './search-bar';\nimport SearchBar from './search-bar';\n\nexport { AnimatedSearchBar, AnimatedSearchBarProps };\nexport { SearchBar, SearchBarProps };\n"],"mappings":"AACA,OAAOA,iBAAiB,MAAM,uBAAuB;AAErD,OAAOC,SAAS,MAAM,cAAc;AAEpC,SAASD,iBAAiB;AAC1B,SAASC,SAAS","ignoreList":[]}
@@ -1,11 +1,11 @@
1
- import ButtonSetting, { ButtonSettingProps } from './button-setting';
2
- import SettingItem, { SettingItemProps } from './setting-item';
3
- import SettingItemSeparator, { SettingItemSeparatorProps } from './setting-item-separator';
4
- import SettingsButton, { SettingsButtonProps } from './settings-button';
5
- import SwitchSetting, { SwitchSettingProps } from './switch-setting';
6
- export { ButtonSetting, ButtonSettingProps };
7
- export { SettingItem, SettingItemProps };
8
- export { SettingItemSeparator, SettingItemSeparatorProps };
9
- export { SettingsButton, SettingsButtonProps };
10
- export { SwitchSetting, SwitchSettingProps };
1
+ import ButtonSetting from './button-setting';
2
+ import SettingItem from './setting-item';
3
+ import SettingItemSeparator from './setting-item-separator';
4
+ import SettingsButton from './settings-button';
5
+ import SwitchSetting from './switch-setting';
6
+ export { ButtonSetting };
7
+ export { SettingItem };
8
+ export { SettingItemSeparator };
9
+ export { SettingsButton };
10
+ export { SwitchSetting };
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ButtonSetting","ButtonSettingProps","SettingItem","SettingItemProps","SettingItemSeparator","SettingItemSeparatorProps","SettingsButton","SettingsButtonProps","SwitchSetting","SwitchSettingProps"],"sources":["index.ts"],"sourcesContent":["import ButtonSetting, { ButtonSettingProps } from './button-setting';\nimport SettingItem, { SettingItemProps } from './setting-item';\nimport SettingItemSeparator, { SettingItemSeparatorProps } from './setting-item-separator';\nimport SettingsButton, { SettingsButtonProps } from './settings-button';\nimport SwitchSetting, { SwitchSettingProps } from './switch-setting';\n\nexport { ButtonSetting, ButtonSettingProps };\nexport { SettingItem, SettingItemProps };\nexport { SettingItemSeparator, SettingItemSeparatorProps };\nexport { SettingsButton, SettingsButtonProps };\nexport { SwitchSetting, SwitchSettingProps };\n"],"mappings":"AAAA,OAAOA,aAAa,IAAIC,kBAAkB,QAAQ,kBAAkB;AACpE,OAAOC,WAAW,IAAIC,gBAAgB,QAAQ,gBAAgB;AAC9D,OAAOC,oBAAoB,IAAIC,yBAAyB,QAAQ,0BAA0B;AAC1F,OAAOC,cAAc,IAAIC,mBAAmB,QAAQ,mBAAmB;AACvE,OAAOC,aAAa,IAAIC,kBAAkB,QAAQ,kBAAkB;AAEpE,SAAST,aAAa,EAAEC,kBAAkB;AAC1C,SAASC,WAAW,EAAEC,gBAAgB;AACtC,SAASC,oBAAoB,EAAEC,yBAAyB;AACxD,SAASC,cAAc,EAAEC,mBAAmB;AAC5C,SAASC,aAAa,EAAEC,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["ButtonSetting","SettingItem","SettingItemSeparator","SettingsButton","SwitchSetting"],"sources":["index.ts"],"sourcesContent":["import type { ButtonSettingProps } from './button-setting';\nimport ButtonSetting from './button-setting';\nimport type { SettingItemProps } from './setting-item';\nimport SettingItem from './setting-item';\nimport type { SettingItemSeparatorProps } from './setting-item-separator';\nimport SettingItemSeparator from './setting-item-separator';\nimport type { SettingsButtonProps } from './settings-button';\nimport SettingsButton from './settings-button';\nimport type { SwitchSettingProps } from './switch-setting';\nimport SwitchSetting from './switch-setting';\n\nexport { ButtonSetting, ButtonSettingProps };\nexport { SettingItem, SettingItemProps };\nexport { SettingItemSeparator, SettingItemSeparatorProps };\nexport { SettingsButton, SettingsButtonProps };\nexport { SwitchSetting, SwitchSettingProps };\n"],"mappings":"AACA,OAAOA,aAAa,MAAM,kBAAkB;AAE5C,OAAOC,WAAW,MAAM,gBAAgB;AAExC,OAAOC,oBAAoB,MAAM,0BAA0B;AAE3D,OAAOC,cAAc,MAAM,mBAAmB;AAE9C,OAAOC,aAAa,MAAM,kBAAkB;AAE5C,SAASJ,aAAa;AACtB,SAASC,WAAW;AACpB,SAASC,oBAAoB;AAC7B,SAASC,cAAc;AACvB,SAASC,aAAa","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- import ErrorScreen, { ErrorScreenButton, ErrorScreenProps } from './error-screen';
2
- export { ErrorScreen, ErrorScreenButton, ErrorScreenProps };
1
+ import ErrorScreen from './error-screen';
2
+ export { ErrorScreen };
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ErrorScreen","ErrorScreenButton","ErrorScreenProps"],"sources":["index.ts"],"sourcesContent":["import ErrorScreen, { ErrorScreenButton, ErrorScreenProps } from './error-screen';\n\nexport { ErrorScreen, ErrorScreenButton, ErrorScreenProps };\n"],"mappings":"AAAA,OAAOA,WAAW,IAAIC,iBAAiB,EAAEC,gBAAgB,QAAQ,gBAAgB;AAEjF,SAASF,WAAW,EAAEC,iBAAiB,EAAEC,gBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["ErrorScreen"],"sources":["index.ts"],"sourcesContent":["import type { ErrorScreenButton, ErrorScreenProps } from './error-screen';\nimport ErrorScreen from './error-screen';\n\nexport { ErrorScreen, ErrorScreenButton, ErrorScreenProps };\n"],"mappings":"AACA,OAAOA,WAAW,MAAM,gBAAgB;AAExC,SAASA,WAAW","ignoreList":[]}
@@ -7,7 +7,7 @@ const MINUTE = 60 * 1000;
7
7
  const DAY = 24 * 60 * MINUTE;
8
8
 
9
9
  // OS locale
10
- const systemLocale = (_I18nManager$getConst = I18nManager.getConstants().localeIdentifier) === null || _I18nManager$getConst === void 0 ? void 0 : _I18nManager$getConst.replace(/_/g, '-').split('#')[0].replace(/-$/, '');
10
+ const systemLocale = (_I18nManager$getConst = I18nManager.getConstants().localeIdentifier) === null || _I18nManager$getConst === void 0 ? void 0 : _I18nManager$getConst.replace(/_/g, '-').split(/[#@]/)[0].replace(/-$/, '');
11
11
 
12
12
  /**
13
13
  * Date only format
@@ -1 +1 @@
1
- {"version":3,"names":["I18nManager","Platform","Settings","format","MINUTE","DAY","systemLocale","_I18nManager$getConst","getConstants","localeIdentifier","replace","split","formatDate","date","locale","options","toLocaleDateString","undefined","formatTime","toLocaleTimeString","hour","minute","formatDateTime","toLocaleString","year","month","day","hour12","formatMonth","getFullYear","formatTimeAgo","formatTimestamp","nowLabel","_formatDateTime2","now","Date","timestamp","getTime","_formatDateTime","pad","x","String","convertDateToUTCTimestamp","parse","getMonth","getDate","convertDateStrToLocalDate","select","android","timezoneOffset","getTimezoneOffset","default","formatDateOnlyFromUTCTimestamp","utcTimestamp","_formatDate","utcDate","getUTCFullYear","getUTCMonth","getUTCDate","_ref","OS","get","formatDateTimeLocalized","formatDateLocalized"],"sources":["date.ts"],"sourcesContent":["// Date & Time formatted as specified in SW-610\n\nimport { I18nManager, Platform, Settings } from 'react-native';\nimport { format } from 'timeago.js';\n\nconst MINUTE = 60 * 1000;\nconst DAY = 24 * 60 * MINUTE;\n\n// OS locale\nconst systemLocale: string | undefined = I18nManager.getConstants().localeIdentifier\n ?.replace(/_/g, '-')\n .split('#')[0]\n .replace(/-$/, '');\n\n/**\n * Date only format\n */\nexport const formatDate = (date: Date, locale?: string, options?: Intl.DateTimeFormatOptions) => {\n try {\n return date.toLocaleDateString(locale || systemLocale, options);\n } catch {\n return undefined;\n }\n};\n\n/**\n * Time only format\n */\nexport const formatTime = (date: Date, locale?: string) => {\n try {\n return date.toLocaleTimeString(locale || systemLocale, { hour: '2-digit', minute: '2-digit' });\n } catch {\n return undefined;\n }\n};\n\n/**\n * Date and time format\n */\nexport const formatDateTime = (date: Date, locale?: string) => {\n try {\n return date.toLocaleString(locale || systemLocale, {\n hour: '2-digit',\n minute: '2-digit',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour12: locale === 'en-US',\n });\n } catch {\n return undefined;\n }\n};\n\n/**\n * Month format\n */\nexport const formatMonth = (date: Date, locale: string): string => {\n return `${date.toLocaleString(locale, {\n month: 'long',\n })} ${date.getFullYear()}`;\n};\n\n/**\n * Time-ago format\n */\nexport const formatTimeAgo = (date: Date, locale: string): string => {\n return format(date, locale);\n};\n\n/**\n * Timestamp formatted for general use\n */\nexport const formatTimestamp = (date: Date, locale: string, nowLabel: string): string => {\n const now = Date.now();\n const timestamp = date.getTime();\n if (now < timestamp) {\n // in the future\n return formatDateTime(date, locale) ?? '';\n }\n\n // in the past\n if (now - timestamp < MINUTE) {\n // less than a minute ago\n return nowLabel;\n }\n\n // less than a day ago\n if (now - timestamp < DAY) {\n return formatTimeAgo(date, locale);\n }\n\n // longer ago\n return formatDateTime(date, locale) ?? '';\n};\n\nconst pad = (x: number) => (x >= 0 && x < 10 ? `0${x}` : String(x));\n\n/**\n * Utility function to deal with `date`-type attributes\n * @param {Date} date local timezone representation\n * @returns {number} the same day, but UTC timezone with midnight time\n */\nexport const convertDateToUTCTimestamp = (date: Date): number =>\n Date.parse(`${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`);\n\n/**\n * Utility function to deal with `date`-type attributes\n * @param {string} date in YYYY-MM-DD representation\n * @returns {Date} the same day, but local timezone with midnight time\n */\nexport const convertDateStrToLocalDate = (date: string): Date =>\n Platform.select({\n // android conversion using the standard date parsing doesn't work, computing the timestamp manually\n android: (() => {\n const timestamp = Date.parse(date);\n const timezoneOffset = new Date(date).getTimezoneOffset();\n return new Date(timestamp + timezoneOffset * MINUTE);\n })(),\n default: new Date(`${date}T00:00:00`),\n });\n\n/**\n * Inverted function to {@link convertDateToUTCTimestamp}\n * @param {number} utcTimestamp date timestamp represented as midnight UTC time\n * @returns {string} formatted date (based on locale settings, e.g. `21/02/2021`)\n */\nexport const formatDateOnlyFromUTCTimestamp = (utcTimestamp: number): string => {\n const utcDate = new Date(utcTimestamp);\n return (\n formatDate(\n convertDateStrToLocalDate(\n `${utcDate.getUTCFullYear()}-${pad(utcDate.getUTCMonth() + 1)}-${pad(utcDate.getUTCDate())}`,\n ),\n ) ?? ''\n );\n};\n\nconst locale = (\n Platform.OS === 'ios'\n ? Settings.get('AppleLocale')\n : I18nManager.getConstants().localeIdentifier\n)\n ?.split('@')[0]\n .replace('_', '-');\n\nexport const formatDateTimeLocalized = (date: Date) => {\n return formatDateTime(date, locale);\n};\n\nexport const formatDateLocalized = (date: Date) => {\n return formatDate(date, locale);\n};\n"],"mappings":";AAAA;;AAEA,SAASA,WAAW,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAC9D,SAASC,MAAM,QAAQ,YAAY;AAEnC,MAAMC,MAAM,GAAG,EAAE,GAAG,IAAI;AACxB,MAAMC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAGD,MAAM;;AAE5B;AACA,MAAME,YAAgC,IAAAC,qBAAA,GAAGP,WAAW,CAACQ,YAAY,CAAC,CAAC,CAACC,gBAAgB,cAAAF,qBAAA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,uBAHlCA,IAAA,CAKXhD,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACdD,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;AAEpB,OAAO,MAAMoD,uBAAuB,GAAIjD,IAAU,IAAK;EACrD,OAAOS,cAAc,CAACT,IAAI,EAAEC,MAAM,CAAC;AACrC,CAAC;AAED,OAAO,MAAMiD,mBAAmB,GAAIlD,IAAU,IAAK;EACjD,OAAOD,UAAU,CAACC,IAAI,EAAEC,MAAM,CAAC;AACjC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["I18nManager","Platform","Settings","format","MINUTE","DAY","systemLocale","_I18nManager$getConst","getConstants","localeIdentifier","replace","split","formatDate","date","locale","options","toLocaleDateString","undefined","formatTime","toLocaleTimeString","hour","minute","formatDateTime","toLocaleString","year","month","day","hour12","formatMonth","getFullYear","formatTimeAgo","formatTimestamp","nowLabel","_formatDateTime2","now","Date","timestamp","getTime","_formatDateTime","pad","x","String","convertDateToUTCTimestamp","parse","getMonth","getDate","convertDateStrToLocalDate","select","android","timezoneOffset","getTimezoneOffset","default","formatDateOnlyFromUTCTimestamp","utcTimestamp","_formatDate","utcDate","getUTCFullYear","getUTCMonth","getUTCDate","_ref","OS","get","formatDateTimeLocalized","formatDateLocalized"],"sources":["date.ts"],"sourcesContent":["// Date & Time formatted as specified in SW-610\n\nimport { I18nManager, Platform, Settings } from 'react-native';\nimport { format } from 'timeago.js';\n\nconst MINUTE = 60 * 1000;\nconst DAY = 24 * 60 * MINUTE;\n\n// OS locale\nconst systemLocale: string | undefined = I18nManager.getConstants().localeIdentifier\n ?.replace(/_/g, '-')\n .split(/[#@]/)[0]\n .replace(/-$/, '');\n\n/**\n * Date only format\n */\nexport const formatDate = (date: Date, locale?: string, options?: Intl.DateTimeFormatOptions) => {\n try {\n return date.toLocaleDateString(locale || systemLocale, options);\n } catch {\n return undefined;\n }\n};\n\n/**\n * Time only format\n */\nexport const formatTime = (date: Date, locale?: string) => {\n try {\n return date.toLocaleTimeString(locale || systemLocale, { hour: '2-digit', minute: '2-digit' });\n } catch {\n return undefined;\n }\n};\n\n/**\n * Date and time format\n */\nexport const formatDateTime = (date: Date, locale?: string) => {\n try {\n return date.toLocaleString(locale || systemLocale, {\n hour: '2-digit',\n minute: '2-digit',\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n hour12: locale === 'en-US',\n });\n } catch {\n return undefined;\n }\n};\n\n/**\n * Month format\n */\nexport const formatMonth = (date: Date, locale: string): string => {\n return `${date.toLocaleString(locale, {\n month: 'long',\n })} ${date.getFullYear()}`;\n};\n\n/**\n * Time-ago format\n */\nexport const formatTimeAgo = (date: Date, locale: string): string => {\n return format(date, locale);\n};\n\n/**\n * Timestamp formatted for general use\n */\nexport const formatTimestamp = (date: Date, locale: string, nowLabel: string): string => {\n const now = Date.now();\n const timestamp = date.getTime();\n if (now < timestamp) {\n // in the future\n return formatDateTime(date, locale) ?? '';\n }\n\n // in the past\n if (now - timestamp < MINUTE) {\n // less than a minute ago\n return nowLabel;\n }\n\n // less than a day ago\n if (now - timestamp < DAY) {\n return formatTimeAgo(date, locale);\n }\n\n // longer ago\n return formatDateTime(date, locale) ?? '';\n};\n\nconst pad = (x: number) => (x >= 0 && x < 10 ? `0${x}` : String(x));\n\n/**\n * Utility function to deal with `date`-type attributes\n * @param {Date} date local timezone representation\n * @returns {number} the same day, but UTC timezone with midnight time\n */\nexport const convertDateToUTCTimestamp = (date: Date): number =>\n Date.parse(`${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`);\n\n/**\n * Utility function to deal with `date`-type attributes\n * @param {string} date in YYYY-MM-DD representation\n * @returns {Date} the same day, but local timezone with midnight time\n */\nexport const convertDateStrToLocalDate = (date: string): Date =>\n Platform.select({\n // android conversion using the standard date parsing doesn't work, computing the timestamp manually\n android: (() => {\n const timestamp = Date.parse(date);\n const timezoneOffset = new Date(date).getTimezoneOffset();\n return new Date(timestamp + timezoneOffset * MINUTE);\n })(),\n default: new Date(`${date}T00:00:00`),\n });\n\n/**\n * Inverted function to {@link convertDateToUTCTimestamp}\n * @param {number} utcTimestamp date timestamp represented as midnight UTC time\n * @returns {string} formatted date (based on locale settings, e.g. `21/02/2021`)\n */\nexport const formatDateOnlyFromUTCTimestamp = (utcTimestamp: number): string => {\n const utcDate = new Date(utcTimestamp);\n return (\n formatDate(\n convertDateStrToLocalDate(\n `${utcDate.getUTCFullYear()}-${pad(utcDate.getUTCMonth() + 1)}-${pad(utcDate.getUTCDate())}`,\n ),\n ) ?? ''\n );\n};\n\nconst locale = (\n Platform.OS === 'ios'\n ? Settings.get('AppleLocale')\n : I18nManager.getConstants().localeIdentifier\n)\n ?.split('@')[0]\n .replace('_', '-');\n\nexport const formatDateTimeLocalized = (date: Date) => {\n return formatDateTime(date, locale);\n};\n\nexport const formatDateLocalized = (date: Date) => {\n return formatDate(date, locale);\n};\n"],"mappings":";AAAA;;AAEA,SAASA,WAAW,EAAEC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAC9D,SAASC,MAAM,QAAQ,YAAY;AAEnC,MAAMC,MAAM,GAAG,EAAE,GAAG,IAAI;AACxB,MAAMC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAGD,MAAM;;AAE5B;AACA,MAAME,YAAgC,IAAAC,qBAAA,GAAGP,WAAW,CAACQ,YAAY,CAAC,CAAC,CAACC,gBAAgB,cAAAF,qBAAA,uBAA3CA,qBAAA,CACrCG,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CACnBC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAChBD,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;;AAEpB;AACA;AACA;AACA,OAAO,MAAME,UAAU,GAAGA,CAACC,IAAU,EAAEC,MAAe,EAAEC,OAAoC,KAAK;EAC/F,IAAI;IACF,OAAOF,IAAI,CAACG,kBAAkB,CAACF,MAAM,IAAIR,YAAY,EAAES,OAAO,CAAC;EACjE,CAAC,CAAC,MAAM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10 @@ jest.mock('@procivis/react-native-one-core', () => ({
5
5
  jest.mock('@sentry/react-native', () => ({
6
6
  captureException: () => {}
7
7
  }));
8
+ jest.mock('../core/core-config', () => ({
9
+ getEnabledTransports: () => [],
10
+ useCoreConfig: () => ({})
11
+ }));
8
12
  jest.mock('@react-native-community/netinfo', () => ({
9
13
  addEventListener: () => {}
10
14
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["getInvitationUrlTransports","Transport","jest","mock","initializeCore","Promise","resolve","captureException","addEventListener","onStateChange","describe","test","transports","expect","toStrictEqual","Bluetooth","MQTT","HTTP"],"sources":["connectivity.test.ts"],"sourcesContent":["import { getInvitationUrlTransports, Transport } from './connectivity';\n\njest.mock('@procivis/react-native-one-core', () => ({\n initializeCore: () => Promise.resolve({} as any),\n}));\n\njest.mock('@sentry/react-native', () => ({\n captureException: () => {},\n}));\n\njest.mock('@react-native-community/netinfo', () => ({\n addEventListener: () => {},\n}));\n\njest.mock('react-native-bluetooth-state-manager', () => ({\n onStateChange: () => {},\n}));\n\ndescribe('getInvitationUrlTransports', () => {\n test('BLE OpenID4VP url', () => {\n const transports = getInvitationUrlTransports(\n 'OPENID4VP://connect?name=XFwsduA5&key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.Bluetooth]);\n });\n test('MQTT OpenID4VP url', () => {\n const transports = getInvitationUrlTransports(\n 'OPENID4VP://connect?key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b&brokerUrl=mqtt://dev.procivis-one.com&topicId=540684a4-430c-441c-b188-786653f5ab35',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.MQTT]);\n });\n test('Mixed BLE/MQTT OpenID4VP url', () => {\n const transports = getInvitationUrlTransports(\n 'OPENID4VP://connect?name=XFwsduA5&key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b&brokerUrl=mqtt://dev.procivis-one.com&topicId=540684a4-430c-441c-b188-786653f5ab35',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.Bluetooth, Transport.MQTT]);\n });\n test('BLE OpenID4VP url with custom scheme', () => {\n const transports = getInvitationUrlTransports(\n 'MDOC-OPENID4VP://connect?name=XFwsduA5&key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.Bluetooth]);\n });\n test('MQTT OpenID4VP url with custom scheme', () => {\n const transports = getInvitationUrlTransports(\n 'MDOC-OPENID4VP://connect?key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b&brokerUrl=mqtt://dev.procivis-one.com&topicId=540684a4-430c-441c-b188-786653f5ab35',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.MQTT]);\n });\n test('Mixed BLE/MQTT OpenID4VP url with custom scheme', () => {\n const transports = getInvitationUrlTransports(\n 'MDOC-OPENID4VP://connect?name=XFwsduA5&key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b&brokerUrl=mqtt://dev.procivis-one.com&topicId=540684a4-430c-441c-b188-786653f5ab35',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.Bluetooth, Transport.MQTT]);\n });\n test('HTTP OpenID4VP url', () => {\n const transports = getInvitationUrlTransports(\n 'openid4vp://?response_type=vp_token&state=25fdb134-487d-4bcd-9fdf-777e7f74f128&nonce=DZE2qP6FaDksHxkfOdYJC1LWgVyf5Ibc&client_id_scheme=redirect_uri&client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&response_mode=direct_post&response_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&client_metadata_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F89973de1-75ba-4367-89ef-4d928de88933%2Fclient-metadata&presentation_definition_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F89973de1-75ba-4367-89ef-4d928de88933%2Fpresentation-definition',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.HTTP]);\n });\n test('HTTP OpenID4VP url with custom scheme', () => {\n const transports = getInvitationUrlTransports(\n 'mdoc-openid4vp://?response_type=vp_token&state=25fdb134-487d-4bcd-9fdf-777e7f74f128&nonce=DZE2qP6FaDksHxkfOdYJC1LWgVyf5Ibc&client_id_scheme=redirect_uri&client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&response_mode=direct_post&response_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&client_metadata_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F89973de1-75ba-4367-89ef-4d928de88933%2Fclient-metadata&presentation_definition_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F89973de1-75ba-4367-89ef-4d928de88933%2Fpresentation-definition',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.HTTP]);\n });\n test('HTTP OpenID4VP url with requestUri', () => {\n const transports = getInvitationUrlTransports(\n 'openid4vp://?client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&request_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F6e442f9d-bc14-4362-8786-504d7b79c402%2Fclient-request',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.HTTP]);\n });\n test('HTTP OpenID credential offer url', () => {\n const transports = getInvitationUrlTransports(\n 'openid-credential-offer://?credential_offer_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-issuer%2Fv1%2F0c2cd9a6-1eff-4536-9505-98d7bd87aad1%2Foffer%2F275c09b2-4f4f-4738-85fc-35399acad176',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.HTTP]);\n });\n\n test('Invalid link', () => {\n const transports = getInvitationUrlTransports('invalid');\n expect(transports).toStrictEqual([]);\n });\n});\n"],"mappings":"AAAA,SAASA,0BAA0B,EAAEC,SAAS,QAAQ,gBAAgB;AAEtEC,IAAI,CAACC,IAAI,CAAC,iCAAiC,EAAE,OAAO;EAClDC,cAAc,EAAEA,CAAA,KAAMC,OAAO,CAACC,OAAO,CAAC,CAAC,CAAQ;AACjD,CAAC,CAAC,CAAC;AAEHJ,IAAI,CAACC,IAAI,CAAC,sBAAsB,EAAE,OAAO;EACvCI,gBAAgB,EAAEA,CAAA,KAAM,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEHL,IAAI,CAACC,IAAI,CAAC,iCAAiC,EAAE,OAAO;EAClDK,gBAAgB,EAAEA,CAAA,KAAM,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEHN,IAAI,CAACC,IAAI,CAAC,sCAAsC,EAAE,OAAO;EACvDM,aAAa,EAAEA,CAAA,KAAM,CAAC;AACxB,CAAC,CAAC,CAAC;AAEHC,QAAQ,CAAC,4BAA4B,EAAE,MAAM;EAC3CC,IAAI,CAAC,mBAAmB,EAAE,MAAM;IAC9B,MAAMC,UAAU,GAAGZ,0BAA0B,CAC3C,wGAAwG,EACxG,gBACF,CAAC;IACDa,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAAC,CAACb,SAAS,CAACc,SAAS,CAAC,CAAC;EACzD,CAAC,CAAC;EACFJ,IAAI,CAAC,oBAAoB,EAAE,MAAM;IAC/B,MAAMC,UAAU,GAAGZ,0BAA0B,CAC3C,6KAA6K,EAC7K,gBACF,CAAC;IACDa,MAAM,CAACD,UAAU,CAAC,CAACE,a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AAU,GAAGZ,0BAA0B,CAC3C,upBAAupB,EACvpB,gBACF,CAAC;IACDa,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAAC,CAACb,SAAS,CAACgB,IAAI,CAAC,CAAC;EACpD,CAAC,CAAC;EACFN,IAAI,CAAC,oCAAoC,EAAE,MAAM;IAC/C,MAAMC,UAAU,GAAGZ,0BAA0B,CAC3C,6OAA6O,EAC7O,gBACF,CAAC;IACDa,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAAC,CAACb,SAAS,CAACgB,IAAI,CAAC,CAAC;EACpD,CAAC,CAAC;EACFN,IAAI,CAAC,kCAAkC,EAAE,MAAM;IAC7C,MAAMC,UAAU,GAAGZ,0BAA0B,CAC3C,wMAAwM,EACxM,gBACF,CAAC;IACDa,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAAC,CAACb,SAAS,CAACgB,IAAI,CAAC,CAAC;EACpD,CAAC,CAAC;EAEFN,IAAI,CAAC,cAAc,EAAE,MAAM;IACzB,MAAMC,UAAU,GAAGZ,0BAA0B,CAAC,SAAS,CAAC;IACxDa,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAAC,EAAE,CAAC;EACtC,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["getInvitationUrlTransports","Transport","jest","mock","initializeCore","Promise","resolve","captureException","getEnabledTransports","useCoreConfig","addEventListener","onStateChange","describe","test","transports","expect","toStrictEqual","Bluetooth","MQTT","HTTP"],"sources":["connectivity.test.ts"],"sourcesContent":["import { getInvitationUrlTransports, Transport } from './connectivity';\n\njest.mock('@procivis/react-native-one-core', () => ({\n initializeCore: () => Promise.resolve({} as any),\n}));\n\njest.mock('@sentry/react-native', () => ({\n captureException: () => {},\n}));\n\njest.mock('../core/core-config', () => ({\n getEnabledTransports: () => [],\n useCoreConfig: () => ({}),\n}));\n\njest.mock('@react-native-community/netinfo', () => ({\n addEventListener: () => { },\n}));\n\njest.mock('react-native-bluetooth-state-manager', () => ({\n onStateChange: () => { },\n}));\n\ndescribe('getInvitationUrlTransports', () => {\n test('BLE OpenID4VP url', () => {\n const transports = getInvitationUrlTransports(\n 'OPENID4VP://connect?name=XFwsduA5&key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.Bluetooth]);\n });\n test('MQTT OpenID4VP url', () => {\n const transports = getInvitationUrlTransports(\n 'OPENID4VP://connect?key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b&brokerUrl=mqtt://dev.procivis-one.com&topicId=540684a4-430c-441c-b188-786653f5ab35',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.MQTT]);\n });\n test('Mixed BLE/MQTT OpenID4VP url', () => {\n const transports = getInvitationUrlTransports(\n 'OPENID4VP://connect?name=XFwsduA5&key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b&brokerUrl=mqtt://dev.procivis-one.com&topicId=540684a4-430c-441c-b188-786653f5ab35',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.Bluetooth, Transport.MQTT]);\n });\n test('BLE OpenID4VP url with custom scheme', () => {\n const transports = getInvitationUrlTransports(\n 'MDOC-OPENID4VP://connect?name=XFwsduA5&key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.Bluetooth]);\n });\n test('MQTT OpenID4VP url with custom scheme', () => {\n const transports = getInvitationUrlTransports(\n 'MDOC-OPENID4VP://connect?key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b&brokerUrl=mqtt://dev.procivis-one.com&topicId=540684a4-430c-441c-b188-786653f5ab35',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.MQTT]);\n });\n test('Mixed BLE/MQTT OpenID4VP url with custom scheme', () => {\n const transports = getInvitationUrlTransports(\n 'MDOC-OPENID4VP://connect?name=XFwsduA5&key=24c810cb01a8b12200bdb66dc5a7ac9b49a4cfdd5c4b89f51e03206be3abac5b&brokerUrl=mqtt://dev.procivis-one.com&topicId=540684a4-430c-441c-b188-786653f5ab35',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.Bluetooth, Transport.MQTT]);\n });\n test('HTTP OpenID4VP url', () => {\n const transports = getInvitationUrlTransports(\n 'openid4vp://?response_type=vp_token&state=25fdb134-487d-4bcd-9fdf-777e7f74f128&nonce=DZE2qP6FaDksHxkfOdYJC1LWgVyf5Ibc&client_id_scheme=redirect_uri&client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&response_mode=direct_post&response_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&client_metadata_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F89973de1-75ba-4367-89ef-4d928de88933%2Fclient-metadata&presentation_definition_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F89973de1-75ba-4367-89ef-4d928de88933%2Fpresentation-definition',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.HTTP]);\n });\n test('HTTP OpenID4VP url with custom scheme', () => {\n const transports = getInvitationUrlTransports(\n 'mdoc-openid4vp://?response_type=vp_token&state=25fdb134-487d-4bcd-9fdf-777e7f74f128&nonce=DZE2qP6FaDksHxkfOdYJC1LWgVyf5Ibc&client_id_scheme=redirect_uri&client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&response_mode=direct_post&response_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&client_metadata_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F89973de1-75ba-4367-89ef-4d928de88933%2Fclient-metadata&presentation_definition_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F89973de1-75ba-4367-89ef-4d928de88933%2Fpresentation-definition',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.HTTP]);\n });\n test('HTTP OpenID4VP url with requestUri', () => {\n const transports = getInvitationUrlTransports(\n 'openid4vp://?client_id=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2Fresponse&request_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-verifier%2Fv1%2F6e442f9d-bc14-4362-8786-504d7b79c402%2Fclient-request',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.HTTP]);\n });\n test('HTTP OpenID credential offer url', () => {\n const transports = getInvitationUrlTransports(\n 'openid-credential-offer://?credential_offer_uri=https%3A%2F%2Fcore.dev.procivis-one.com%2Fssi%2Foidc-issuer%2Fv1%2F0c2cd9a6-1eff-4536-9505-98d7bd87aad1%2Foffer%2F275c09b2-4f4f-4738-85fc-35399acad176',\n 'mdoc-openid4vp',\n );\n expect(transports).toStrictEqual([Transport.HTTP]);\n });\n\n test('Invalid link', () => {\n const transports = getInvitationUrlTransports('invalid');\n expect(transports).toStrictEqual([]);\n });\n});\n"],"mappings":"AAAA,SAASA,0BAA0B,EAAEC,SAAS,QAAQ,gBAAgB;AAEtEC,IAAI,CAACC,IAAI,CAAC,iCAAiC,EAAE,OAAO;EAClDC,cAAc,EAAEA,CAAA,KAAMC,OAAO,CAACC,OAAO,CAAC,CAAC,CAAQ;AACjD,CAAC,CAAC,CAAC;AAEHJ,IAAI,CAACC,IAAI,CAAC,sBAAsB,EAAE,OAAO;EACvCI,gBAAgB,EAAEA,CAAA,KAAM,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEHL,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Gd,0BAA0B,CAC3C,wMAAwM,EACxM,gBACF,CAAC;IACDe,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAAC,CAACf,SAAS,CAACkB,IAAI,CAAC,CAAC;EACpD,CAAC,CAAC;EAEFN,IAAI,CAAC,cAAc,EAAE,MAAM;IACzB,MAAMC,UAAU,GAAGd,0BAA0B,CAAC,SAAS,CAAC;IACxDe,MAAM,CAACD,UAAU,CAAC,CAACE,aAAa,CAAC,EAAE,CAAC;EACtC,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,10 +1,9 @@
1
- import { DidTypeEnum, OneError } from '@procivis/react-native-one-core';
1
+ import { IdentifierStateEnum, IdentifierTypeEnum } from '@procivis/react-native-one-core';
2
2
  import { useCallback } from 'react';
3
3
  import { useMutation, useQuery, useQueryClient } from 'react-query';
4
- import { generateUUID } from '../../uuid';
4
+ import { reportException } from '../../reporting';
5
5
  import { useONECore } from './core-context';
6
- import { HW_DID_NAME_PREFIX, SW_DID_NAME_PREFIX } from './core-init';
7
- import { OneErrorCode } from './error-code';
6
+ import { generateHwIdentifier, generateSwIdentifier, SW_DID_NAME_PREFIX } from './core-init';
8
7
  import { HISTORY_LIST_QUERY_KEY } from './history';
9
8
  const BACKUP_INFO_QUERY_KEY = 'backup-info';
10
9
  export const useBackupInfo = () => {
@@ -57,6 +56,12 @@ export const useRollbackImport = () => {
57
56
  onSuccess: () => queryClient.resetQueries()
58
57
  });
59
58
  };
59
+
60
+ /**
61
+ * Finalize backup import and extract/prepare identifiers
62
+ * @param {IdentifiersInitializationConfig} config Select desired keys/dids to be restored/created
63
+ * @returns [hwIdentifierId, swIdentifierId]
64
+ */
60
65
  export const useBackupFinalizeImportProcedure = ({
61
66
  generateHwKey,
62
67
  generateSwKey
@@ -69,75 +74,26 @@ export const useBackupFinalizeImportProcedure = ({
69
74
  organisationId
70
75
  } = useONECore();
71
76
  return useCallback(async () => {
72
- var _dids$values$find;
73
77
  await finalizeImport();
74
78
 
75
- // update wallet did references
76
- const dids = await core.getDids({
77
- deactivated: false,
78
- organisationId,
79
- page: 0,
80
- pageSize: 1,
81
- type: DidTypeEnum.LOCAL
82
- });
83
- let swDidId = (_dids$values$find = dids.values.find(did => did.name.startsWith(SW_DID_NAME_PREFIX))) === null || _dids$values$find === void 0 ? void 0 : _dids$values$find.id;
84
- if (!swDidId && generateSwKey) {
85
- const swKeyId = await core.generateKey({
86
- keyParams: {},
87
- keyType: 'EDDSA',
88
- name: `holder-key-sw-${generateUUID()}`,
89
- organisationId,
90
- storageParams: {},
91
- storageType: 'INTERNAL'
92
- });
93
- swDidId = await core.createDid({
94
- didMethod: 'KEY',
95
- keys: {
96
- assertionMethod: [swKeyId],
97
- authentication: [swKeyId],
98
- capabilityDelegation: [swKeyId],
99
- capabilityInvocation: [swKeyId],
100
- keyAgreement: [swKeyId]
101
- },
102
- name: `${SW_DID_NAME_PREFIX}-${generateUUID()}`,
79
+ // update wallet identifier references
80
+ let swIdentifierId;
81
+ if (generateSwKey) {
82
+ var _identifiers$values$f;
83
+ const identifiers = await core.getIdentifiers({
84
+ state: IdentifierStateEnum.ACTIVE,
103
85
  organisationId,
104
- params: {}
86
+ page: 0,
87
+ pageSize: 1,
88
+ types: [IdentifierTypeEnum.DID],
89
+ isRemote: false
105
90
  });
91
+ swIdentifierId = (_identifiers$values$f = identifiers.values.find(identifier => identifier.name.startsWith(SW_DID_NAME_PREFIX))) === null || _identifiers$values$f === void 0 ? void 0 : _identifiers$values$f.id;
106
92
  }
107
- let hwKeyId = null;
108
- if (generateHwKey) {
109
- hwKeyId = await core.generateKey({
110
- keyParams: {},
111
- keyType: 'ECDSA',
112
- name: `holder-key-hw-${generateUUID()}`,
113
- organisationId,
114
- storageParams: {},
115
- storageType: 'SECURE_ELEMENT'
116
- }).catch(e => {
117
- // ignore if HW keys not supported by device
118
- if (e instanceof OneError && e.code === OneErrorCode.KeyStorageNotSupported) {
119
- return null;
120
- }
121
- throw e;
122
- });
123
- }
124
- let hwDidId = null;
125
- if (hwKeyId) {
126
- hwDidId = await core.createDid({
127
- didMethod: 'KEY',
128
- keys: {
129
- assertionMethod: [hwKeyId],
130
- authentication: [hwKeyId],
131
- capabilityDelegation: [hwKeyId],
132
- capabilityInvocation: [hwKeyId],
133
- keyAgreement: [hwKeyId]
134
- },
135
- name: `${HW_DID_NAME_PREFIX}-${generateUUID()}`,
136
- organisationId,
137
- params: {}
138
- });
139
- }
140
- return [hwDidId, swDidId];
93
+ return Promise.all([generateHwKey ? generateHwIdentifier(core, organisationId) : null, !swIdentifierId && generateSwKey ? generateSwIdentifier(core, organisationId) : swIdentifierId]).catch(err => {
94
+ reportException(err, 'Failed to create base identifiers');
95
+ throw err;
96
+ });
141
97
  }, [core, organisationId, finalizeImport, generateHwKey, generateSwKey]);
142
98
  };
143
99
  //# sourceMappingURL=backup.js.map