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

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 (202) 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 +56 -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/credential.js +2 -2
  67. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  68. package/lib/commonjs/utils/parsers/query.js +23 -86
  69. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  70. package/lib/module/components/entity/entity-attributes.js +15 -2
  71. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  72. package/lib/module/components/entity/entity-details-with-buttons.js +11 -44
  73. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  74. package/lib/module/components/entity/entity-details.js +61 -33
  75. package/lib/module/components/entity/entity-details.js.map +1 -1
  76. package/lib/module/components/entity/index.js +2 -2
  77. package/lib/module/components/entity/index.js.map +1 -1
  78. package/lib/module/components/history/history-list-item.js +15 -13
  79. package/lib/module/components/history/history-list-item.js.map +1 -1
  80. package/lib/module/components/proof-request/share-credential.js +1 -2
  81. package/lib/module/components/proof-request/share-credential.js.map +1 -1
  82. package/lib/module/ui-components/blur/index.js +2 -2
  83. package/lib/module/ui-components/blur/index.js.map +1 -1
  84. package/lib/module/ui-components/buttons/hold-button.js +4 -3
  85. package/lib/module/ui-components/buttons/hold-button.js.map +1 -1
  86. package/lib/module/ui-components/camera/index.js +2 -2
  87. package/lib/module/ui-components/camera/index.js.map +1 -1
  88. package/lib/module/ui-components/control/index.js +3 -3
  89. package/lib/module/ui-components/control/index.js.map +1 -1
  90. package/lib/module/ui-components/credential/card/credential-details-card.js +1 -1
  91. package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
  92. package/lib/module/ui-components/credential/credential-carousel-images.js +15 -8
  93. package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
  94. package/lib/module/ui-components/entity/entity-cluster.js +51 -3
  95. package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
  96. package/lib/module/ui-components/entity/index.js +4 -4
  97. package/lib/module/ui-components/entity/index.js.map +1 -1
  98. package/lib/module/ui-components/history/history-details.js +1 -1
  99. package/lib/module/ui-components/history/history-details.js.map +1 -1
  100. package/lib/module/ui-components/history/index.js +6 -6
  101. package/lib/module/ui-components/history/index.js.map +1 -1
  102. package/lib/module/ui-components/icons/entity.js +10 -13
  103. package/lib/module/ui-components/icons/entity.js.map +1 -1
  104. package/lib/module/ui-components/input/index.js +6 -6
  105. package/lib/module/ui-components/input/index.js.map +1 -1
  106. package/lib/module/ui-components/list/index.js +4 -4
  107. package/lib/module/ui-components/list/index.js.map +1 -1
  108. package/lib/module/ui-components/loader/index.js +4 -4
  109. package/lib/module/ui-components/loader/index.js.map +1 -1
  110. package/lib/module/ui-components/pin/index.js +3 -3
  111. package/lib/module/ui-components/pin/index.js.map +1 -1
  112. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  113. package/lib/module/ui-components/searchbar/index.js +4 -4
  114. package/lib/module/ui-components/searchbar/index.js.map +1 -1
  115. package/lib/module/ui-components/settings/index.js +10 -10
  116. package/lib/module/ui-components/settings/index.js.map +1 -1
  117. package/lib/module/ui-components/state/index.js +2 -2
  118. package/lib/module/ui-components/state/index.js.map +1 -1
  119. package/lib/module/utils/date.js +1 -1
  120. package/lib/module/utils/date.js.map +1 -1
  121. package/lib/module/utils/hooks/connectivity/connectivity.test.js +4 -0
  122. package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  123. package/lib/module/utils/hooks/core/backup.js +24 -68
  124. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  125. package/lib/module/utils/hooks/core/core-init.js +5 -3
  126. package/lib/module/utils/hooks/core/core-init.js.map +1 -1
  127. package/lib/module/utils/hooks/core/identifiers.js +21 -0
  128. package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
  129. package/lib/module/utils/hooks/core/proofs.js +24 -14
  130. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  131. package/lib/module/utils/hooks/core/trust-entity.js +57 -15
  132. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  133. package/lib/module/utils/parsers/credential-sharing.js +6 -15
  134. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  135. package/lib/module/utils/parsers/credential.js +2 -2
  136. package/lib/module/utils/parsers/credential.js.map +1 -1
  137. package/lib/module/utils/parsers/query.js +21 -85
  138. package/lib/module/utils/parsers/query.js.map +1 -1
  139. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  140. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +1 -2
  141. package/lib/typescript/components/entity/entity-details.d.ts +3 -2
  142. package/lib/typescript/components/entity/index.d.ts +2 -1
  143. package/lib/typescript/ui-components/blur/index.d.ts +2 -1
  144. package/lib/typescript/ui-components/buttons/hold-button.d.ts +2 -2
  145. package/lib/typescript/ui-components/camera/index.d.ts +2 -1
  146. package/lib/typescript/ui-components/control/index.d.ts +4 -2
  147. package/lib/typescript/ui-components/credential/credential-carousel-images.d.ts +1 -0
  148. package/lib/typescript/ui-components/entity/entity-cluster.d.ts +1 -0
  149. package/lib/typescript/ui-components/entity/index.d.ts +4 -2
  150. package/lib/typescript/ui-components/history/history-details.d.ts +4 -1
  151. package/lib/typescript/ui-components/history/index.d.ts +6 -3
  152. package/lib/typescript/ui-components/input/index.d.ts +6 -3
  153. package/lib/typescript/ui-components/list/index.d.ts +4 -2
  154. package/lib/typescript/ui-components/loader/index.d.ts +4 -2
  155. package/lib/typescript/ui-components/pin/index.d.ts +4 -2
  156. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +1 -1
  157. package/lib/typescript/ui-components/searchbar/index.d.ts +4 -2
  158. package/lib/typescript/ui-components/settings/index.d.ts +10 -5
  159. package/lib/typescript/ui-components/state/index.d.ts +2 -1
  160. package/lib/typescript/utils/hooks/core/backup.d.ts +5 -0
  161. package/lib/typescript/utils/hooks/core/core-init.d.ts +4 -1
  162. package/lib/typescript/utils/hooks/core/identifiers.d.ts +4 -1
  163. package/lib/typescript/utils/hooks/core/proofs.d.ts +1 -0
  164. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +9 -3
  165. package/lib/typescript/utils/parsers/query.d.ts +8 -7
  166. package/package.json +10 -5
  167. package/src/components/entity/entity-attributes.tsx +16 -2
  168. package/src/components/entity/entity-details-with-buttons.tsx +11 -42
  169. package/src/components/entity/entity-details.tsx +96 -33
  170. package/src/components/entity/index.ts +2 -1
  171. package/src/components/history/history-list-item.tsx +17 -13
  172. package/src/components/proof-request/share-credential.tsx +0 -1
  173. package/src/ui-components/blur/index.ts +2 -1
  174. package/src/ui-components/buttons/hold-button.tsx +6 -5
  175. package/src/ui-components/camera/index.tsx +2 -1
  176. package/src/ui-components/control/index.ts +4 -2
  177. package/src/ui-components/credential/card/credential-details-card.tsx +1 -1
  178. package/src/ui-components/credential/credential-carousel-images.tsx +15 -8
  179. package/src/ui-components/entity/entity-cluster.tsx +63 -10
  180. package/src/ui-components/entity/index.ts +4 -2
  181. package/src/ui-components/history/history-details.tsx +5 -2
  182. package/src/ui-components/history/index.ts +6 -3
  183. package/src/ui-components/icons/entity.tsx +8 -12
  184. package/src/ui-components/input/index.ts +6 -3
  185. package/src/ui-components/list/index.ts +4 -2
  186. package/src/ui-components/loader/index.ts +4 -2
  187. package/src/ui-components/pin/index.ts +4 -2
  188. package/src/ui-components/screens/nerd-mode-screen.tsx +1 -1
  189. package/src/ui-components/searchbar/index.ts +4 -2
  190. package/src/ui-components/settings/index.ts +10 -5
  191. package/src/ui-components/state/index.ts +2 -1
  192. package/src/utils/date.ts +1 -1
  193. package/src/utils/hooks/connectivity/connectivity.test.ts +7 -2
  194. package/src/utils/hooks/core/backup.ts +30 -72
  195. package/src/utils/hooks/core/core-init.ts +5 -3
  196. package/src/utils/hooks/core/identifiers.ts +22 -1
  197. package/src/utils/hooks/core/proofs.ts +27 -16
  198. package/src/utils/hooks/core/trust-entity.ts +73 -23
  199. package/src/utils/parsers/credential-sharing.tsx +8 -14
  200. package/src/utils/parsers/credential.ts +2 -1
  201. package/src/utils/parsers/query.ts +149 -0
  202. package/src/utils/parsers/query.tsx +0 -82
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useEffect","useMemo","useState","StyleSheet","View","Animated","useAnimatedStyle","useSharedValue","withTiming","concatTestID","Button","ButtonType","DownIcon","UpIcon","useAppColorScheme","CredentialAttributeItem","CredentialCard","PREVIEW_ATTRIBUTES_COUNT","CredentialDetailsCard","animate","attributes","card","expanded","footer","onImagePreview","onAttributeSelected","style","showAllButtonLabel","testID","viewProps","_header$accessory","colorScheme","previewAttributesHeight","setPreviewAttributesHeight","fullAttributesHeight","setFullAttributesHeight","buttonViewHeight","setButtonViewHeight","allAttributesRendered","setAllAttributesRendered","length","CaretIcon","currentHeight","undefined","previewAttributes","slice","extraAttributes","viewStyle","flatten","styles","allAttributesWrapper","allAttributesWrapperWithFooter","padding","paddingBottom","additionalAttributesHeight","additionalHeight","newHeight","value","duration","credentialAttributesStyle","height","onPreviewAttrContentLayout","event","nativeEvent","layout","onFullAttrContentLayout","onButtonViewLayout","footerView","isValidElement","FooterComponent","createElement","header","cardProps","renderExtraAttributes","_extends","detailsCard","backgroundColor","white","accessory","attributesAnimatedWrapper","attributesWrapper","onLayout","previewAttributesWrapper","map","attribute","idx","key","id","last","toString","onPress","type","Secondary","title","index","create","paddingHorizontal","width","overflow","paddingTop","position","borderRadius","marginTop"],"sources":["credential-details-card.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactElement, useCallback, useEffect, useMemo, useState } from 'react';\nimport { ImageSourcePropType, LayoutChangeEvent, StyleSheet, View, ViewProps } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport { concatTestID } from '../../../utils/testID';\nimport { Button, ButtonType } from '../../buttons';\nimport { DownIcon, UpIcon } from '../../icons/credential';\nimport { useAppColorScheme } from '../../theme/color-scheme-context';\nimport CredentialAttributeItem, { CredentialAttribute } from '../credential-attribute-item';\nimport CredentialCard, { CredentialCardProps } from './credential-card';\n\nexport type CredentialDetailsCardProps = ViewProps & {\n animate?: boolean;\n attributes: CredentialAttribute[] | false;\n card: CredentialCardProps;\n expanded?: boolean;\n footer?: ComponentType<any> | ReactElement;\n onImagePreview?: (name: string, image: ImageSourcePropType) => void;\n onAttributeSelected?: (id: string, selected: boolean) => void;\n showAllButtonLabel?: string;\n};\n\nconst PREVIEW_ATTRIBUTES_COUNT = 3;\n\nconst CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({\n animate = true,\n attributes,\n card,\n expanded,\n footer,\n onImagePreview,\n onAttributeSelected,\n style,\n showAllButtonLabel,\n testID,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n const [previewAttributesHeight, setPreviewAttributesHeight] = useState<number>();\n const [fullAttributesHeight, setFullAttributesHeight] = useState<number>();\n const [buttonViewHeight, setButtonViewHeight] = useState<number>();\n\n const [allAttributesRendered, setAllAttributesRendered] = useState<boolean>(\n (attributes && attributes.length <= PREVIEW_ATTRIBUTES_COUNT) || !showAllButtonLabel,\n );\n\n const CaretIcon = expanded ? UpIcon : DownIcon;\n\n const currentHeight = useSharedValue<number | undefined>(undefined);\n\n const previewAttributes = attributes ? attributes.slice(0, PREVIEW_ATTRIBUTES_COUNT) : [];\n const extraAttributes = useMemo(() => (attributes ? attributes.slice(PREVIEW_ATTRIBUTES_COUNT) : []), [attributes]);\n\n useEffect(() => {\n if (!extraAttributes || allAttributesRendered) {\n setButtonViewHeight(0);\n }\n }, [extraAttributes, allAttributesRendered]);\n\n useEffect(() => {\n if (extraAttributes.length === 0) {\n const viewStyle = StyleSheet.flatten([\n styles.allAttributesWrapper,\n footer && styles.allAttributesWrapperWithFooter,\n ]);\n const padding = viewStyle.paddingBottom;\n setFullAttributesHeight(padding);\n }\n }, [extraAttributes, footer]);\n\n useEffect(() => {\n if (previewAttributesHeight === undefined || buttonViewHeight === undefined) {\n return;\n }\n if (allAttributesRendered && fullAttributesHeight === undefined) {\n return;\n }\n\n const additionalAttributesHeight = fullAttributesHeight ?? 0;\n const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;\n const newHeight = expanded || !animate ? previewAttributesHeight + additionalHeight : 0;\n\n if (currentHeight.value === undefined || !animate) {\n currentHeight.value = newHeight;\n return;\n }\n\n const duration = !expanded\n ? 250\n : allAttributesRendered\n ? previewAttributes.length * 50\n : extraAttributes.length * 50;\n currentHeight.value = withTiming(newHeight, {\n duration,\n });\n }, [\n allAttributesRendered,\n buttonViewHeight,\n currentHeight,\n animate,\n expanded,\n extraAttributes.length,\n fullAttributesHeight,\n previewAttributes.length,\n previewAttributesHeight,\n ]);\n\n const credentialAttributesStyle = useAnimatedStyle(() => {\n if (currentHeight.value === undefined) {\n if (expanded) {\n return {};\n }\n return {\n height: 0,\n };\n }\n return {\n height: currentHeight.value,\n };\n }, [expanded, currentHeight]);\n\n const onPreviewAttrContentLayout = useCallback((event: LayoutChangeEvent) => {\n setPreviewAttributesHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onFullAttrContentLayout = useCallback((event: LayoutChangeEvent) => {\n setFullAttributesHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onButtonViewLayout = useCallback((event: LayoutChangeEvent) => {\n setButtonViewHeight(event.nativeEvent.layout.height);\n }, []);\n\n const footerView: ReactElement | undefined = useMemo(() => {\n if (!footer) {\n return undefined;\n }\n if (React.isValidElement(footer)) {\n return footer;\n } else {\n const FooterComponent = footer as React.ComponentType<any>;\n return <FooterComponent />;\n }\n }, [footer]);\n\n const { header, ...cardProps } = card;\n\n const renderExtraAttributes =\n allAttributesRendered || (previewAttributesHeight !== undefined && currentHeight.value !== undefined);\n return (\n <View\n style={[styles.detailsCard, { backgroundColor: colorScheme.white }, style]}\n {...viewProps}\n testID={concatTestID(card.testID, expanded ? 'expanded' : 'collapsed')}>\n <CredentialCard\n {...cardProps}\n header={{ ...header, accessory: header.accessory ?? CaretIcon }}\n style={[styles.card, cardProps.style]}\n />\n {previewAttributes.length > 0 && (\n <Animated.View style={[styles.attributesAnimatedWrapper, credentialAttributesStyle]}>\n <View style={styles.attributesWrapper}>\n <View onLayout={onPreviewAttrContentLayout} style={styles.previewAttributesWrapper}>\n {previewAttributes.map((attribute, idx) => (\n <CredentialAttributeItem\n key={attribute.id}\n last={!footerView && !extraAttributes.length && idx === previewAttributes.length - 1}\n testID={concatTestID(testID, 'attribute', idx.toString())}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n {...attribute}\n />\n ))}\n </View>\n {!allAttributesRendered && extraAttributes.length > 0 && (\n <View style={styles.allAttributesWrapper} onLayout={onButtonViewLayout}>\n <Button\n onPress={() => setAllAttributesRendered(true)}\n type={ButtonType.Secondary}\n testID={concatTestID(testID, 'showAllAttributesButton')}\n title={showAllButtonLabel!}\n />\n </View>\n )}\n {renderExtraAttributes && (\n <View\n style={[styles.allAttributesWrapper, footerView && styles.allAttributesWrapperWithFooter]}\n onLayout={onFullAttrContentLayout}>\n {extraAttributes.map((attribute, index, { length }) => (\n <CredentialAttributeItem\n key={attribute.id}\n last={!footerView && index === length - 1}\n testID={concatTestID(testID, 'attribute', index.toString())}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n {...attribute}\n />\n ))}\n </View>\n )}\n </View>\n </Animated.View>\n )}\n {footerView ? <View style={styles.footer}>{footerView}</View> : null}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n allAttributesWrapper: {\n paddingBottom: 12,\n paddingHorizontal: 4,\n width: '100%',\n },\n allAttributesWrapperWithFooter: {\n paddingBottom: 0,\n },\n attributesAnimatedWrapper: {\n overflow: 'hidden',\n },\n attributesWrapper: {\n paddingTop: 7,\n position: 'absolute',\n width: '100%',\n },\n card: {\n borderRadius: 0,\n },\n detailsCard: {\n borderRadius: 10,\n overflow: 'hidden',\n },\n footer: {\n marginTop: 12,\n },\n previewAttributesWrapper: {\n paddingHorizontal: 4,\n width: '100%',\n },\n});\n\nexport default CredentialDetailsCard;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAqCC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACzG,SAAiDC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAClG,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,QAAQ,yBAAyB;AAEhG,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,MAAM,EAAEC,UAAU,QAAQ,eAAe;AAClD,SAASC,QAAQ,EAAEC,MAAM,QAAQ,wBAAwB;AACzD,SAASC,iBAAiB,QAAQ,kCAAkC;AACpE,OAAOC,uBAAuB,MAA+B,8BAA8B;AAC3F,OAAOC,cAAc,MAA+B,mBAAmB;AAavE,MAAMC,wBAAwB,GAAG,CAAC;AAElC,MAAMC,qBAAqD,GAAGA,CAAC;EAC7DC,OAAO,GAAG,IAAI;EACdC,UAAU;EACVC,IAAI;EACJC,QAAQ;EACRC,MAAM;EACNC,cAAc;EACdC,mBAAmB;EACnBC,KAAK;EACLC,kBAAkB;EAClBC,MAAM;EACN,GAAGC;AACL,CAAC,KAAK;EAAA,IAAAC,iBAAA;EACJ,MAAMC,WAAW,GAAGjB,iBAAiB,CAAC,CAAC;EACvC,MAAM,CAACkB,uBAAuB,EAAEC,0BAA0B,CAAC,GAAG/B,QAAQ,CAAS,CAAC;EAChF,MAAM,CAACgC,oBAAoB,EAAEC,uBAAuB,CAAC,GAAGjC,QAAQ,CAAS,CAAC;EAC1E,MAAM,CAACkC,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGnC,QAAQ,CAAS,CAAC;EAElE,MAAM,CAACoC,qBAAqB,EAAEC,wBAAwB,CAAC,GAAGrC,QAAQ,CAC/DkB,UAAU,IAAIA,UAAU,CAACoB,MAAM,IAAIvB,wBAAwB,IAA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,QAAQ,EAAE;EACZ,CAAC;EACDlB,iBAAiB,EAAE;IACjBmB,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE,UAAU;IACpBH,KAAK,EAAE;EACT,CAAC;EACD5E,IAAI,EAAE;IACJgF,YAAY,EAAE;EAChB,CAAC;EACD1B,WAAW,EAAE;IACX0B,YAAY,EAAE,EAAE;IAChBH,QAAQ,EAAE;EACZ,CAAC;EACD3E,MAAM,EAAE;IACN+E,SAAS,EAAE;EACb,CAAC;EACDpB,wBAAwB,EAAE;IACxBc,iBAAiB,EAAE,CAAC;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAe/E,qBAAqB","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useEffect","useMemo","useState","StyleSheet","View","Animated","useAnimatedStyle","useSharedValue","withTiming","concatTestID","Button","ButtonType","DownIcon","UpIcon","useAppColorScheme","CredentialAttributeItem","CredentialCard","PREVIEW_ATTRIBUTES_COUNT","CredentialDetailsCard","animate","attributes","card","expanded","footer","onImagePreview","onAttributeSelected","style","showAllButtonLabel","testID","viewProps","_header$accessory","colorScheme","previewAttributesHeight","setPreviewAttributesHeight","fullAttributesHeight","setFullAttributesHeight","buttonViewHeight","setButtonViewHeight","allAttributesRendered","setAllAttributesRendered","length","CaretIcon","currentHeight","undefined","previewAttributes","slice","extraAttributes","viewStyle","flatten","styles","allAttributesWrapper","allAttributesWrapperWithFooter","padding","paddingBottom","additionalAttributesHeight","additionalHeight","newHeight","value","duration","credentialAttributesStyle","height","onPreviewAttrContentLayout","event","nativeEvent","layout","onFullAttrContentLayout","onButtonViewLayout","footerView","isValidElement","FooterComponent","createElement","header","cardProps","renderExtraAttributes","_extends","detailsCard","backgroundColor","white","accessory","onHeaderPress","attributesAnimatedWrapper","attributesWrapper","onLayout","previewAttributesWrapper","map","attribute","idx","key","id","last","toString","onPress","type","Secondary","title","index","create","paddingHorizontal","width","overflow","paddingTop","position","borderRadius","marginTop"],"sources":["credential-details-card.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactElement, useCallback, useEffect, useMemo, useState } from 'react';\nimport { ImageSourcePropType, LayoutChangeEvent, StyleSheet, View, ViewProps } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\n\nimport { concatTestID } from '../../../utils/testID';\nimport { Button, ButtonType } from '../../buttons';\nimport { DownIcon, UpIcon } from '../../icons/credential';\nimport { useAppColorScheme } from '../../theme/color-scheme-context';\nimport CredentialAttributeItem, { CredentialAttribute } from '../credential-attribute-item';\nimport CredentialCard, { CredentialCardProps } from './credential-card';\n\nexport type CredentialDetailsCardProps = ViewProps & {\n animate?: boolean;\n attributes: CredentialAttribute[] | false;\n card: CredentialCardProps;\n expanded?: boolean;\n footer?: ComponentType<any> | ReactElement;\n onImagePreview?: (name: string, image: ImageSourcePropType) => void;\n onAttributeSelected?: (id: string, selected: boolean) => void;\n showAllButtonLabel?: string;\n};\n\nconst PREVIEW_ATTRIBUTES_COUNT = 3;\n\nconst CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({\n animate = true,\n attributes,\n card,\n expanded,\n footer,\n onImagePreview,\n onAttributeSelected,\n style,\n showAllButtonLabel,\n testID,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n const [previewAttributesHeight, setPreviewAttributesHeight] = useState<number>();\n const [fullAttributesHeight, setFullAttributesHeight] = useState<number>();\n const [buttonViewHeight, setButtonViewHeight] = useState<number>();\n\n const [allAttributesRendered, setAllAttributesRendered] = useState<boolean>(\n (attributes && attributes.length <= PREVIEW_ATTRIBUTES_COUNT) || !showAllButtonLabel,\n );\n\n const CaretIcon = expanded ? UpIcon : DownIcon;\n\n const currentHeight = useSharedValue<number | undefined>(undefined);\n\n const previewAttributes = attributes ? attributes.slice(0, PREVIEW_ATTRIBUTES_COUNT) : [];\n const extraAttributes = useMemo(() => (attributes ? attributes.slice(PREVIEW_ATTRIBUTES_COUNT) : []), [attributes]);\n\n useEffect(() => {\n if (!extraAttributes || allAttributesRendered) {\n setButtonViewHeight(0);\n }\n }, [extraAttributes, allAttributesRendered]);\n\n useEffect(() => {\n if (extraAttributes.length === 0) {\n const viewStyle = StyleSheet.flatten([\n styles.allAttributesWrapper,\n footer && styles.allAttributesWrapperWithFooter,\n ]);\n const padding = viewStyle.paddingBottom;\n setFullAttributesHeight(padding);\n }\n }, [extraAttributes, footer]);\n\n useEffect(() => {\n if (previewAttributesHeight === undefined || buttonViewHeight === undefined) {\n return;\n }\n if (allAttributesRendered && fullAttributesHeight === undefined) {\n return;\n }\n\n const additionalAttributesHeight = fullAttributesHeight ?? 0;\n const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;\n const newHeight = expanded || !animate ? previewAttributesHeight + additionalHeight : 0;\n\n if (currentHeight.value === undefined || !animate) {\n currentHeight.value = newHeight;\n return;\n }\n\n const duration = !expanded\n ? 250\n : allAttributesRendered\n ? previewAttributes.length * 50\n : extraAttributes.length * 50;\n currentHeight.value = withTiming(newHeight, {\n duration,\n });\n }, [\n allAttributesRendered,\n buttonViewHeight,\n currentHeight,\n animate,\n expanded,\n extraAttributes.length,\n fullAttributesHeight,\n previewAttributes.length,\n previewAttributesHeight,\n ]);\n\n const credentialAttributesStyle = useAnimatedStyle(() => {\n if (currentHeight.value === undefined) {\n if (expanded) {\n return {};\n }\n return {\n height: 0,\n };\n }\n return {\n height: currentHeight.value,\n };\n }, [expanded, currentHeight]);\n\n const onPreviewAttrContentLayout = useCallback((event: LayoutChangeEvent) => {\n setPreviewAttributesHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onFullAttrContentLayout = useCallback((event: LayoutChangeEvent) => {\n setFullAttributesHeight(event.nativeEvent.layout.height);\n }, []);\n\n const onButtonViewLayout = useCallback((event: LayoutChangeEvent) => {\n setButtonViewHeight(event.nativeEvent.layout.height);\n }, []);\n\n const footerView: ReactElement | undefined = useMemo(() => {\n if (!footer) {\n return undefined;\n }\n if (React.isValidElement(footer)) {\n return footer;\n } else {\n const FooterComponent = footer as React.ComponentType<any>;\n return <FooterComponent />;\n }\n }, [footer]);\n\n const { header, ...cardProps } = card;\n\n const renderExtraAttributes =\n allAttributesRendered || (previewAttributesHeight !== undefined && currentHeight.value !== undefined);\n return (\n <View\n style={[styles.detailsCard, { backgroundColor: colorScheme.white }, style]}\n {...viewProps}\n testID={concatTestID(card.testID, expanded ? 'expanded' : 'collapsed')}>\n <CredentialCard\n {...cardProps}\n header={{ ...header, accessory: header.accessory ?? (cardProps.onHeaderPress ? CaretIcon : undefined) }}\n style={[styles.card, cardProps.style]}\n />\n {previewAttributes.length > 0 && (\n <Animated.View style={[styles.attributesAnimatedWrapper, credentialAttributesStyle]}>\n <View style={styles.attributesWrapper}>\n <View onLayout={onPreviewAttrContentLayout} style={styles.previewAttributesWrapper}>\n {previewAttributes.map((attribute, idx) => (\n <CredentialAttributeItem\n key={attribute.id}\n last={!footerView && !extraAttributes.length && idx === previewAttributes.length - 1}\n testID={concatTestID(testID, 'attribute', idx.toString())}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n {...attribute}\n />\n ))}\n </View>\n {!allAttributesRendered && extraAttributes.length > 0 && (\n <View style={styles.allAttributesWrapper} onLayout={onButtonViewLayout}>\n <Button\n onPress={() => setAllAttributesRendered(true)}\n type={ButtonType.Secondary}\n testID={concatTestID(testID, 'showAllAttributesButton')}\n title={showAllButtonLabel!}\n />\n </View>\n )}\n {renderExtraAttributes && (\n <View\n style={[styles.allAttributesWrapper, footerView && styles.allAttributesWrapperWithFooter]}\n onLayout={onFullAttrContentLayout}>\n {extraAttributes.map((attribute, index, { length }) => (\n <CredentialAttributeItem\n key={attribute.id}\n last={!footerView && index === length - 1}\n testID={concatTestID(testID, 'attribute', index.toString())}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n {...attribute}\n />\n ))}\n </View>\n )}\n </View>\n </Animated.View>\n )}\n {footerView ? <View style={styles.footer}>{footerView}</View> : null}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n allAttributesWrapper: {\n paddingBottom: 12,\n paddingHorizontal: 4,\n width: '100%',\n },\n allAttributesWrapperWithFooter: {\n paddingBottom: 0,\n },\n attributesAnimatedWrapper: {\n overflow: 'hidden',\n },\n attributesWrapper: {\n paddingTop: 7,\n position: 'absolute',\n width: '100%',\n },\n card: {\n borderRadius: 0,\n },\n detailsCard: {\n borderRadius: 10,\n overflow: 'hidden',\n },\n footer: {\n marginTop: 12,\n },\n previewAttributesWrapper: {\n paddingHorizontal: 4,\n width: '100%',\n },\n});\n\nexport default CredentialDetailsCard;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAqCC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AACzG,SAAiDC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAClG,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,QAAQ,yBAAyB;AAEhG,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,MAAM,EAAEC,UAAU,QAAQ,eAAe;AAClD,SAASC,QAAQ,EAAEC,MAAM,QAAQ,wBAAwB;AACzD,SAASC,iBAAiB,QAAQ,kCAAkC;AACpE,OAAOC,uBAAuB,MAA+B,8BAA8B;AAC3F,OAAOC,cAAc,MAA+B,mBAAmB;AAavE,MAAMC,wBAAwB,GAAG,CAAC;AAElC,MAAMC,qBAAqD,GAAGA,CAAC;EAC7DC,OAAO,GAAG,IAAI;EACdC,UAAU;EACVC,IAAI;EACJC,QAAQ;EACRC,MAAM;EACNC,cAAc;EACdC,mBAAmB;EACnBC,KAAK;EACLC,kBAAkB;EAClBC,MAAM;EACN,GAAGC;AACL,CAAC,KAAK;EAAA,IAAAC,iBAAA;EACJ,MAAMC,WAAW,GAAGjB,iBAAiB,CAAC,CAAC;EACvC,MAAM,CAACkB,uBAAuB,EAAEC,0BAA0B,CAAC,GAAG/B,QAAQ,CAAS,CAAC;EAChF,MAAM,CAACgC,oBA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GAAE4C,UAAiB,CAAC,GAAG,IAC5D,CAAC;AAEX,CAAC;AAED,MAAMlB,MAAM,GAAG9C,UAAU,CAAC6F,MAAM,CAAC;EAC/B9C,oBAAoB,EAAE;IACpBG,aAAa,EAAE,EAAE;IACjB4C,iBAAiB,EAAE,CAAC;IACpBC,KAAK,EAAE;EACT,CAAC;EACD/C,8BAA8B,EAAE;IAC9BE,aAAa,EAAE;EACjB,CAAC;EACD2B,yBAAyB,EAAE;IACzBmB,QAAQ,EAAE;EACZ,CAAC;EACDlB,iBAAiB,EAAE;IACjBmB,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAE,UAAU;IACpBH,KAAK,EAAE;EACT,CAAC;EACD7E,IAAI,EAAE;IACJiF,YAAY,EAAE;EAChB,CAAC;EACD3B,WAAW,EAAE;IACX2B,YAAY,EAAE,EAAE;IAChBH,QAAQ,EAAE;EACZ,CAAC;EACD5E,MAAM,EAAE;IACNgF,SAAS,EAAE;EACb,CAAC;EACDpB,wBAAwB,EAAE;IACxBc,iBAAiB,EAAE,CAAC;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAehF,qBAAqB","ignoreList":[]}
@@ -50,16 +50,23 @@ export const Barcode = ({
50
50
  export const QrCode = ({
51
51
  content,
52
52
  padding,
53
- testID
53
+ testID,
54
+ onError
54
55
  }) => {
55
56
  const qrCodeXml = useMemo(() => {
56
- return new QRCode({
57
- container: 'svg-viewbox',
58
- content,
59
- join: true,
60
- padding: padding !== null && padding !== void 0 ? padding : 1
61
- }).svg();
62
- }, [content, padding]);
57
+ try {
58
+ return new QRCode({
59
+ container: 'svg-viewbox',
60
+ content,
61
+ ecl: 'L',
62
+ join: true,
63
+ padding: padding !== null && padding !== void 0 ? padding : 1
64
+ }).svg();
65
+ } catch (err) {
66
+ onError && onError(err instanceof Error ? err.message : 'Unknown error occurred.');
67
+ return null;
68
+ }
69
+ }, [content, onError, padding]);
63
70
  return /*#__PURE__*/React.createElement(SvgXml, {
64
71
  height: '100%',
65
72
  testID: testID,
@@ -1 +1 @@
1
- {"version":3,"names":["barcode","QRCode","React","useMemo","StyleSheet","View","SvgXml","Typography","useAppColorScheme","styles","create","barcodeBackground","alignSelf","backgroundColor","borderRadius","barcodeContent","margin","container","flex","justifyContent","mrzBackground","paddingHorizontal","Barcode","content","width","height","testID","colorScheme","barcodeXml","barHeight","bgColor","white","createElement","style","xml","QrCode","padding","qrCodeXml","join","svg","Mrz","color","text","preset"],"sources":["credential-carousel-images.tsx"],"sourcesContent":["import { barcode } from 'pure-svg-code';\nimport QRCode from 'qrcode-svg';\nimport React, { FC, useMemo } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { SvgXml } from 'react-native-svg';\n\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nconst styles = StyleSheet.create({\n barcodeBackground: {\n alignSelf: 'center',\n backgroundColor: 'white',\n borderRadius: 5,\n },\n barcodeContent: {\n margin: 12,\n },\n container: {\n flex: 1,\n justifyContent: 'center',\n },\n mrzBackground: {\n backgroundColor: 'white',\n paddingHorizontal: 12,\n },\n});\n\ntype BarcodeProps = {\n content: string;\n height?: number;\n testID?: string;\n width?: number;\n};\n\nexport const Barcode: FC<BarcodeProps> = ({ content, width = 220, height = 80, testID }) => {\n const colorScheme = useAppColorScheme();\n const barcodeXml = useMemo(\n () =>\n barcode(content, 'code128', {\n barHeight: height,\n bgColor: colorScheme.white,\n width: width,\n }),\n [content, colorScheme, height, width],\n );\n\n return (\n <View style={styles.container}>\n <View style={styles.barcodeBackground}>\n <SvgXml\n height={height}\n style={[styles.barcodeBackground, styles.barcodeContent]}\n testID={testID}\n width={width}\n xml={barcodeXml}\n />\n </View>\n </View>\n );\n};\n\ntype QrCodeProps = {\n content: string;\n padding?: number;\n testID?: string;\n};\n\nexport const QrCode: FC<QrCodeProps> = ({ content, padding, testID }) => {\n const qrCodeXml = useMemo(() => {\n return new QRCode({\n container: 'svg-viewbox',\n content,\n join: true,\n padding: padding ?? 1,\n }).svg();\n }, [content, padding]);\n return <SvgXml height={'100%'} testID={testID} width={'100%'} xml={qrCodeXml} />;\n};\n\nexport const Mrz: FC<{ content: string; testID?: string }> = ({ content, testID }) => {\n const colorScheme = useAppColorScheme();\n return (\n <View style={[styles.container, styles.mrzBackground]}>\n <Typography color={colorScheme.text} preset={'s/code'} testID={testID}>\n {content}\n </Typography>\n </View>\n );\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAe;AACvC,OAAOC,MAAM,MAAM,YAAY;AAC/B,OAAOC,KAAK,IAAQC,OAAO,QAAQ,OAAO;AAC1C,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,MAAM,QAAQ,kBAAkB;AAEzC,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AAEjE,MAAMC,MAAM,GAAGL,UAAU,CAACM,MAAM,CAAC;EAC/BC,iBAAiB,EAAE;IACjBC,SAAS,EAAE,QAAQ;IACnBC,eAAe,EAAE,OAAO;IACxBC,YAAY,EAAE;EAChB,CAAC;EACDC,cAAc,EAAE;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACTC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE;EAClB,CAAC;EACDC,aAAa,EAAE;IACbP,eAAe,EAAE,OAAO;IACxBQ,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AASF,OAAO,MAAMC,OAAyB,GAAGA,CAAC;EAAEC,OAAO;EAAEC,KAAK,GAAG,GAAG;EAAEC,MAAM,GAAG,EAAE;EAAEC;AAAO,CAAC,KAAK;EAC1F,MAAMC,WAAW,GAAGnB,iBAAiB,CAAC,CAAC;EACvC,MAAMoB,UAAU,GAAGzB,OAAO,CACxB,MACEH,OAAO,CAACuB,OAAO,EAAE,SAAS,EAAE;IAC1BM,SAAS,EAAEJ,MAAM;IACjBK,OAAO,EAAEH,WAAW,CAACI,KAAK;IAC1BP,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ACEN,KAAA,CAAA8B,aAAA,CAAC3B,IAAI;IAAC4B,KAAK,EAAE,CAACxB,MAAM,CAACQ,SAAS,EAAER,MAAM,CAACW,aAAa;EAAE,gBACpDlB,KAAA,CAAA8B,aAAA,CAACzB,UAAU;IAACkC,KAAK,EAAEd,WAAW,CAACe,IAAK;IAACC,MAAM,EAAE,QAAS;IAACjB,MAAM,EAAEA;EAAO,GACnEH,OACS,CACR,CAAC;AAEX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["barcode","QRCode","React","useMemo","StyleSheet","View","SvgXml","Typography","useAppColorScheme","styles","create","barcodeBackground","alignSelf","backgroundColor","borderRadius","barcodeContent","margin","container","flex","justifyContent","mrzBackground","paddingHorizontal","Barcode","content","width","height","testID","colorScheme","barcodeXml","barHeight","bgColor","white","createElement","style","xml","QrCode","padding","onError","qrCodeXml","ecl","join","svg","err","Error","message","Mrz","color","text","preset"],"sources":["credential-carousel-images.tsx"],"sourcesContent":["import { barcode } from 'pure-svg-code';\nimport QRCode from 'qrcode-svg';\nimport React, { FC, useMemo } from 'react';\nimport { StyleSheet, View } from 'react-native';\nimport { SvgXml } from 'react-native-svg';\n\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nconst styles = StyleSheet.create({\n barcodeBackground: {\n alignSelf: 'center',\n backgroundColor: 'white',\n borderRadius: 5,\n },\n barcodeContent: {\n margin: 12,\n },\n container: {\n flex: 1,\n justifyContent: 'center',\n },\n mrzBackground: {\n backgroundColor: 'white',\n paddingHorizontal: 12,\n },\n});\n\ntype BarcodeProps = {\n content: string;\n height?: number;\n testID?: string;\n width?: number;\n};\n\nexport const Barcode: FC<BarcodeProps> = ({ content, width = 220, height = 80, testID }) => {\n const colorScheme = useAppColorScheme();\n const barcodeXml = useMemo(\n () =>\n barcode(content, 'code128', {\n barHeight: height,\n bgColor: colorScheme.white,\n width: width,\n }),\n [content, colorScheme, height, width],\n );\n\n return (\n <View style={styles.container}>\n <View style={styles.barcodeBackground}>\n <SvgXml\n height={height}\n style={[styles.barcodeBackground, styles.barcodeContent]}\n testID={testID}\n width={width}\n xml={barcodeXml}\n />\n </View>\n </View>\n );\n};\n\ntype QrCodeProps = {\n content: string;\n padding?: number;\n testID?: string;\n onError?: (err: string) => void;\n};\n\nexport const QrCode: FC<QrCodeProps> = ({ content, padding, testID, onError }) => {\n const qrCodeXml = useMemo(() => {\n try {\n return new QRCode({\n container: 'svg-viewbox',\n content,\n ecl: 'L',\n join: true,\n padding: padding ?? 1,\n }).svg();\n } catch (err) {\n onError && onError(err instanceof Error ? err.message : 'Unknown error occurred.');\n return null;\n }\n }, [content, onError, padding]);\n return <SvgXml height={'100%'} testID={testID} width={'100%'} xml={qrCodeXml} />;\n};\n\nexport const Mrz: FC<{ content: string; testID?: string }> = ({ content, testID }) => {\n const colorScheme = useAppColorScheme();\n return (\n <View style={[styles.container, styles.mrzBackground]}>\n <Typography color={colorScheme.text} preset={'s/code'} testID={testID}>\n {content}\n </Typography>\n </View>\n );\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAe;AACvC,OAAOC,MAAM,MAAM,YAAY;AAC/B,OAAOC,KAAK,IAAQC,OAAO,QAAQ,OAAO;AAC1C,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,MAAM,QAAQ,kBAAkB;AAEzC,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AAEjE,MAAMC,MAAM,GAAGL,UAAU,CAACM,MAAM,CAAC;EAC/BC,iBAAiB,EAAE;IACjBC,SAAS,EAAE,QAAQ;IACnBC,eAAe,EAAE,OAAO;IACxBC,YAAY,EAAE;EAChB,CAAC;EACDC,cAAc,EAAE;IACdC,MAAM,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACTC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE;EAClB,CAAC;EACDC,aAAa,EAAE;IACbP,eAAe,EAAE,OAAO;IACxBQ,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AAPA,OAAO,GAAI;MACtB,CAAC,CAAC,CAACK,GAAG,CAAC,CAAC;IACV,CAAC,CAAC,OAAOC,GAAG,EAAE;MACZL,OAAO,IAAIA,OAAO,CAACK,GAAG,YAAYC,KAAK,GAAGD,GAAG,CAACE,OAAO,GAAG,yBAAyB,CAAC;MAClF,OAAO,IAAI;IACb;EACF,CAAC,EAAE,CAACrB,OAAO,EAAEc,OAAO,EAAED,OAAO,CAAC,CAAC;EAC/B,oBAAOlC,KAAA,CAAA8B,aAAA,CAAC1B,MAAM;IAACmB,MAAM,EAAE,MAAO;IAACC,MAAM,EAAEA,MAAO;IAACF,KAAK,EAAE,MAAO;IAACU,GAAG,EAAEI;EAAU,CAAE,CAAC;AAClF,CAAC;AAED,OAAO,MAAMO,GAA6C,GAAGA,CAAC;EAAEtB,OAAO;EAAEG;AAAO,CAAC,KAAK;EACpF,MAAMC,WAAW,GAAGnB,iBAAiB,CAAC,CAAC;EACvC,oBACEN,KAAA,CAAA8B,aAAA,CAAC3B,IAAI;IAAC4B,KAAK,EAAE,CAACxB,MAAM,CAACQ,SAAS,EAAER,MAAM,CAACW,aAAa;EAAE,gBACpDlB,KAAA,CAAA8B,aAAA,CAACzB,UAAU;IAACuC,KAAK,EAAEnB,WAAW,CAACoB,IAAK;IAACC,MAAM,EAAE,QAAS;IAACtB,MAAM,EAAEA;EAAO,GACnEH,OACS,CACR,CAAC;AAEX,CAAC","ignoreList":[]}
@@ -1,6 +1,8 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { useMemo } from 'react';
2
+ import React, { useEffect, useMemo } from 'react';
3
3
  import { Platform, StyleSheet, View } from 'react-native';
4
+ import Animated, { useAnimatedStyle, useSharedValue, withRepeat, withTiming } from 'react-native-reanimated';
5
+ import { LoaderView, LoaderViewState } from '../../ui-components/loader';
4
6
  import { concatTestID } from '../../utils';
5
7
  import Typography from '../text/typography';
6
8
  import { useAppColorScheme } from '../theme/color-scheme-context';
@@ -14,18 +16,47 @@ const EntityCluster = ({
14
16
  style,
15
17
  sublineColor,
16
18
  testID,
19
+ isLoading,
17
20
  ...viewProps
18
21
  }) => {
19
22
  const colorScheme = useAppColorScheme();
23
+ const opacity = useSharedValue(1);
24
+ const animatedStyle = useAnimatedStyle(() => ({
25
+ opacity: opacity.value
26
+ }));
27
+ useEffect(() => {
28
+ if (!isLoading) {
29
+ return;
30
+ }
31
+ opacity.value = withRepeat(withTiming(0.3, {
32
+ duration: 1000
33
+ }), 0, true);
34
+ }, [opacity, isLoading]);
20
35
  const avatarProps = useMemo(() => {
21
36
  var _avatar$placeholderTe;
37
+ if (isLoading) {
38
+ return {
39
+ avatar: {
40
+ component: /*#__PURE__*/React.createElement(View, {
41
+ style: [styles.loaderWrapper, {
42
+ backgroundColor: colorScheme.grayDark
43
+ }]
44
+ }, /*#__PURE__*/React.createElement(View, {
45
+ style: styles.loader
46
+ }, /*#__PURE__*/React.createElement(LoaderView, {
47
+ animate: true,
48
+ state: LoaderViewState.InProgress
49
+ })))
50
+ }
51
+ };
52
+ }
22
53
  const initials = entityName.split(' ', 3).map(word => word[0]);
23
54
  const placeholderText = initials.length > 0 ? initials.join('') : '';
24
55
  return {
25
56
  ...avatar,
26
57
  placeholderText: (_avatar$placeholderTe = avatar === null || avatar === void 0 ? void 0 : avatar.placeholderText) !== null && _avatar$placeholderTe !== void 0 ? _avatar$placeholderTe : placeholderText
27
58
  };
28
- }, [avatar, entityName]);
59
+ }, [avatar, entityName, colorScheme.grayDark, isLoading]);
29
60
  return /*#__PURE__*/React.createElement(View, _extends({
30
61
  style: [styles.entity, style],
31
62
  testID: testID
@@ -33,13 +64,19 @@ const EntityCluster = ({
33
64
  testID: concatTestID(testID, 'avatar')
34
65
  }, avatarProps)), /*#__PURE__*/React.createElement(View, {
35
66
  style: styles.labels
67
+ }, isLoading ? /*#__PURE__*/React.createElement(Animated.View, {
68
+ style: [{
69
+ backgroundColor: colorScheme.grayDark
70
+ }, animatedStyle]
36
71
  }, /*#__PURE__*/React.createElement(Typography, {
72
+ color: colorScheme.grayDark
73
+ })) : /*#__PURE__*/React.createElement(Typography, {
37
74
  testID: concatTestID(testID, 'entityName'),
38
75
  color: textColor !== null && textColor !== void 0 ? textColor : colorScheme.text,
39
76
  numberOfLines: 1,
40
77
  preset: "m",
41
78
  style: styles.entityName
42
- }, entityName), subline && /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Typography, {
79
+ }, !isLoading ? entityName : undefined), subline && /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Typography, {
43
80
  testID: concatTestID(testID, 'subline'),
44
81
  color: sublineColor !== null && sublineColor !== void 0 ? sublineColor : colorScheme.text,
45
82
  numberOfLines: 1,
@@ -57,6 +94,17 @@ const styles = StyleSheet.create({
57
94
  labels: {
58
95
  flex: 1,
59
96
  marginLeft: 12
97
+ },
98
+ loader: {
99
+ transform: [{
100
+ scale: 0.5
101
+ }]
102
+ },
103
+ loaderWrapper: {
104
+ height: 72,
105
+ paddingLeft: 3,
106
+ paddingTop: 4,
107
+ width: 72
60
108
  }
61
109
  });
62
110
  export default EntityCluster;
@@ -1 +1 @@
1
- {"version":3,"names":["React","useMemo","Platform","StyleSheet","View","concatTestID","Typography","useAppColorScheme","Avatar","EntityCluster","avatar","entityName","subline","textColor","style","sublineColor","testID","viewProps","colorScheme","avatarProps","_avatar$placeholderTe","initials","split","map","word","placeholderText","length","join","createElement","_extends","styles","entity","labels","color","text","numberOfLines","preset","create","alignItems","flexDirection","letterSpacing","OS","flex","marginLeft"],"sources":["entity-cluster.tsx"],"sourcesContent":["import React, { FunctionComponent, useMemo } from 'react';\nimport { Platform, StyleSheet, View, ViewProps } from 'react-native';\n\nimport { concatTestID } from '../../utils';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\nimport Avatar, { AvatarProps } from './avatar';\n\nexport type EntityClusterProps = ViewProps & {\n avatar?: AvatarProps;\n entityName: string;\n subline?: string;\n textColor?: string;\n sublineColor?: string;\n testID?: string;\n};\n\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25595&mode=design&t=YI1oD2BfBie5HcvJ-0\nconst EntityCluster: FunctionComponent<EntityClusterProps> = ({\n avatar,\n entityName,\n subline,\n textColor,\n style,\n sublineColor,\n testID,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n\n const avatarProps = useMemo<AvatarProps>(() => {\n const initials = entityName.split(' ', 3).map((word: string) => word[0]);\n const placeholderText = initials.length > 0 ? initials.join('') : '';\n return {\n ...avatar,\n placeholderText: avatar?.placeholderText ?? placeholderText,\n };\n }, [avatar, entityName]);\n\n return (\n <View style={[styles.entity, style]} testID={testID} {...viewProps}>\n <Avatar testID={concatTestID(testID, 'avatar')} {...avatarProps} />\n <View style={styles.labels}>\n <Typography\n testID={concatTestID(testID, 'entityName')}\n color={textColor ?? colorScheme.text}\n numberOfLines={1}\n preset=\"m\"\n style={styles.entityName}>\n {entityName}\n </Typography>\n {subline && (\n <View>\n <Typography\n testID={concatTestID(testID, 'subline')}\n color={sublineColor ?? colorScheme.text}\n numberOfLines={1}\n preset=\"xs\">\n {subline}\n </Typography>\n </View>\n )}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n entity: {\n alignItems: 'center',\n flexDirection: 'row',\n },\n entityName: {\n letterSpacing: Platform.OS === 'ios' ? -0.2 : -0.3, // -0.2 breaks layout on Android\n },\n labels: {\n flex: 1,\n marginLeft: 12,\n },\n});\n\nexport default EntityCluster;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAuBC,OAAO,QAAQ,OAAO;AACzD,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAEpE,SAASC,YAAY,QAAQ,aAAa;AAC1C,OA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,CAAA4B,aAAA,CAACtB,UAAU;IACTU,MAAM,EAAEX,YAAY,CAACW,MAAM,EAAE,YAAY,CAAE;IAC3CiB,KAAK,EAAEpB,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIK,WAAW,CAACgB,IAAK;IACrCC,aAAa,EAAE,CAAE;IACjBC,MAAM,EAAC,GAAG;IACVtB,KAAK,EAAEgB,MAAM,CAACnB;EAAW,GACxBA,UACS,CAAC,EACZC,OAAO,iBACNZ,KAAA,CAAA4B,aAAA,CAACxB,IAAI,qBACHJ,KAAA,CAAA4B,aAAA,CAACtB,UAAU;IACTU,MAAM,EAAEX,YAAY,CAACW,MAAM,EAAE,SAAS,CAAE;IACxCiB,KAAK,EAAElB,YAAY,aAAZA,YAAY,cAAZA,YAAY,GAAIG,WAAW,CAACgB,IAAK;IACxCC,aAAa,EAAE,CAAE;IACjBC,MAAM,EAAC;EAAI,GACVxB,OACS,CACR,CAEJ,CACF,CAAC;AAEX,CAAC;AAED,MAAMkB,MAAM,GAAG3B,UAAU,CAACkC,MAAM,CAAC;EAC/BN,MAAM,EAAE;IACNO,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE;EACjB,CAAC;EACD5B,UAAU,EAAE;IACV6B,aAAa,EAAEtC,QAAQ,CAACuC,EAAE,KAAK,KAAK,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAE;EACtD,CAAC;EACDT,MAAM,EAAE;IACNU,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAelC,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useMemo","Platform","StyleSheet","View","Animated","useAnimatedStyle","useSharedValue","withRepeat","withTiming","LoaderView","LoaderViewState","concatTestID","Typography","useAppColorScheme","Avatar","EntityCluster","avatar","entityName","subline","textColor","style","sublineColor","testID","isLoading","viewProps","colorScheme","opacity","animatedStyle","value","duration","avatarProps","_avatar$placeholderTe","component","createElement","styles","loaderWrapper","backgroundColor","grayDark","loader","animate","state","InProgress","initials","split","map","word","placeholderText","length","join","_extends","entity","labels","color","text","numberOfLines","preset","undefined","create","alignItems","flexDirection","letterSpacing","OS","flex","marginLeft","transform","scale","height","paddingLeft","paddingTop","width"],"sources":["entity-cluster.tsx"],"sourcesContent":["import React, { FunctionComponent, useEffect, useMemo } from 'react';\nimport { Platform, StyleSheet, View, ViewProps } from 'react-native';\nimport Animated, {\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withTiming,\n} from 'react-native-reanimated';\n\nimport { LoaderView, LoaderViewState } from '../../ui-components/loader';\nimport { concatTestID } from '../../utils';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\nimport Avatar, { AvatarProps } from './avatar';\n\nexport type EntityClusterProps = ViewProps & {\n avatar?: AvatarProps;\n entityName: string;\n subline?: string;\n textColor?: string;\n sublineColor?: string;\n testID?: string;\n isLoading?: boolean;\n};\n\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25595&mode=design&t=YI1oD2BfBie5HcvJ-0\nconst EntityCluster: FunctionComponent<EntityClusterProps> = ({\n avatar,\n entityName,\n subline,\n textColor,\n style,\n sublineColor,\n testID,\n isLoading,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n \n const opacity = useSharedValue<number>(1);\n\n const animatedStyle = useAnimatedStyle(() => ({\n opacity: opacity.value,\n }));\n\n useEffect(() => {\n if (!isLoading) {\n return;\n }\n opacity.value = withRepeat(\n withTiming(0.3, { duration: 1000 }),\n 0,\n true\n );\n }, [opacity, isLoading]);\n\n const avatarProps = useMemo<AvatarProps>(() => {\n if (isLoading) {\n return {\n avatar: {\n component: \n <View style={[styles.loaderWrapper, { backgroundColor: colorScheme.grayDark }]}>\n <View style={styles.loader}>\n <LoaderView animate={true} state={LoaderViewState.InProgress} />\n </View>\n </View>\n }\n }\n }\n const initials = entityName.split(' ', 3).map((word: string) => word[0]);\n const placeholderText = initials.length > 0 ? initials.join('') : '';\n return {\n ...avatar,\n placeholderText: avatar?.placeholderText ?? placeholderText,\n };\n }, [avatar, entityName, colorScheme.grayDark, isLoading]);\n\n return (\n <View style={[styles.entity, style]} testID={testID} {...viewProps}>\n <Avatar testID={concatTestID(testID, 'avatar')} {...avatarProps} />\n <View style={styles.labels}>\n {isLoading ? (\n <Animated.View style={[{ backgroundColor: colorScheme.grayDark }, animatedStyle]}>\n <Typography color={colorScheme.grayDark} />\n </Animated.View>\n ) : (\n <Typography\n testID={concatTestID(testID, 'entityName')}\n color={textColor ?? colorScheme.text}\n numberOfLines={1}\n preset=\"m\"\n style={styles.entityName}>\n {!isLoading ? entityName : undefined}\n </Typography>\n )}\n {subline && (\n <View>\n <Typography\n testID={concatTestID(testID, 'subline')}\n color={sublineColor ?? colorScheme.text}\n numberOfLines={1}\n preset=\"xs\">\n {subline}\n </Typography>\n </View>\n )}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n entity: {\n alignItems: 'center',\n flexDirection: 'row',\n },\n entityName: {\n letterSpacing: Platform.OS === 'ios' ? -0.2 : -0.3, // -0.2 breaks layout on Android\n },\n labels: {\n flex: 1,\n marginLeft: 12,\n },\n loader: {\n transform: [{scale: 0.5}],\n },\n loaderWrapper: {\n height: 72,\n paddingLeft: 3,\n paddingTop: 4,\n width: 72,\n }\n});\n\nexport default EntityCluster;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAuBC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AACpE,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACpE,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,EACVC,UAAU,QACL,yBAAyB;AAEhC,SAASC,UAAU,EAAEC,eAAe,QAAQ,4BAA4B;AACxE,SAASC,YAAY,QAAQ,aAAa;AAC1C,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE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,EAAEjC,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIM,WAAW,CAAC4B,IAAK;IACrCC,aAAa,EAAE,CAAE;IACjBC,MAAM,EAAC,GAAG;IACVnC,KAAK,EAAEc,MAAM,CAACjB;EAAW,GACxB,CAACM,SAAS,GAAGN,UAAU,GAAGuC,SACjB,CACb,EACAtC,OAAO,iBACNpB,KAAA,CAAAmC,aAAA,CAAC9B,IAAI,qBACHL,KAAA,CAAAmC,aAAA,CAACrB,UAAU;IACTU,MAAM,EAAEX,YAAY,CAACW,MAAM,EAAE,SAAS,CAAE;IACxC8B,KAAK,EAAE/B,YAAY,aAAZA,YAAY,cAAZA,YAAY,GAAII,WAAW,CAAC4B,IAAK;IACxCC,aAAa,EAAE,CAAE;IACjBC,MAAM,EAAC;EAAI,GACVrC,OACS,CACR,CAEJ,CACF,CAAC;AAEX,CAAC;AAED,MAAMgB,MAAM,GAAGhC,UAAU,CAACuD,MAAM,CAAC;EAC/BP,MAAM,EAAE;IACNQ,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE;EACjB,CAAC;EACD1C,UAAU,EAAE;IACV2C,aAAa,EAAE3D,QAAQ,CAAC4D,EAAE,KAAK,KAAK,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAE;EACtD,CAAC;EACDV,MAAM,EAAE;IACNW,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE;EACd,CAAC;EACDzB,MAAM,EAAE;IACN0B,SAAS,EAAE,CAAC;MAACC,KAAK,EAAE;IAAG,CAAC;EAC1B,CAAC;EACD9B,aAAa,EAAE;IACb+B,MAAM,EAAE,EAAE;IACVC,WAAW,EAAE,CAAC;IACdC,UAAU,EAAE,CAAC;IACbC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAetD,aAAa","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import Avatar, { AvatarProps } from './avatar';
2
- import EntityCluster, { EntityClusterProps } from './entity-cluster';
3
- export { Avatar, AvatarProps };
4
- export { EntityCluster, EntityClusterProps };
1
+ import Avatar from './avatar';
2
+ import EntityCluster from './entity-cluster';
3
+ export { Avatar };
4
+ export { EntityCluster };
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Avatar","AvatarProps","EntityCluster","EntityClusterProps"],"sources":["index.ts"],"sourcesContent":["import Avatar, { AvatarProps } from './avatar';\nimport EntityCluster, { EntityClusterProps } from './entity-cluster';\n\nexport { Avatar, AvatarProps };\nexport { EntityCluster, EntityClusterProps };\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,WAAW,QAAQ,UAAU;AAC9C,OAAOC,aAAa,IAAIC,kBAAkB,QAAQ,kBAAkB;AAEpE,SAASH,MAAM,EAAEC,WAAW;AAC5B,SAASC,aAAa,EAAEC,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["Avatar","EntityCluster"],"sources":["index.ts"],"sourcesContent":["import type { AvatarProps } from './avatar';\nimport Avatar from './avatar';\nimport type { EntityClusterProps } from './entity-cluster';\nimport EntityCluster from './entity-cluster';\n\nexport { Avatar, AvatarProps };\nexport { EntityCluster, EntityClusterProps };\n"],"mappings":"AACA,OAAOA,MAAM,MAAM,UAAU;AAE7B,OAAOC,aAAa,MAAM,kBAAkB;AAE5C,SAASD,MAAM;AACf,SAASC,aAAa","ignoreList":[]}
@@ -123,7 +123,7 @@ export const HistoryDetailsView = ({
123
123
  ...props.credentialCard,
124
124
  card: {
125
125
  ...props.credentialCard.card,
126
- onHeaderPress
126
+ onHeaderPress: props.credentialCard.headerPressable === false ? undefined : onHeaderPress
127
127
  }
128
128
  };
129
129
  return /*#__PURE__*/React.createElement(View, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useMemo","StyleSheet","View","CredentialDetails","EntityDetails","HeaderInfoButton","concatTestID","useCredentialListExpandedCard","TouchableOpacity","BackButton","CredentialDetailsCardListItem","CredentialHeader","NextIcon","ScrollViewScreen","Typography","useAppColorScheme","DataItem","HistoryDetailsView","assets","data","headerButton","labels","onBackPressed","onInfoPressed","onImagePreview","testID","_assets$cards","_assets$cards2","colorScheme","expandedCredential","onHeaderPress","setInitialCredential","cards","length","id","credentialDetails","credentialId","credentialCard","card","moreInfoHeaderButton","_labels$infoButtonAcc","undefined","createElement","onPress","accessibilityLabel","infoButtonAccessibility","hasAssets","header","leftItem","rightItem","static","title","scrollView","style","styles","content","section","backgroundColor","white","_extends","entity","borderColor","background","credentialHeader","blur","attribute","date","value","action","last","label","valueColor","color","valueIcon","icon","text","preset","sectionHeader","relatedAssets","disabled","onPressed","accessory","assetsHeader","map","props","index","key","credential","expanded","lastItem","itemProps","toString","create","borderRadius","paddingHorizontal","paddingTop","marginBottom","borderBottomWidth","paddingBottom","marginTop","padding","marginHorizontal","marginVertical"],"sources":["history-details.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactElement, useEffect, useMemo } from 'react';\nimport { ColorValue, ImageSourcePropType, StyleSheet, View } from 'react-native';\n\nimport { CredentialDetails, CredentialDetailsProps, EntityDetails, EntityDetailsProps } from '../../components';\nimport { HeaderInfoButton } from '../../components/navigation/header-buttons';\nimport { CardLabels, concatTestID, useCredentialListExpandedCard } from '../../utils';\nimport { TouchableOpacity } from '../accessibility';\nimport { BackButton } from '../buttons';\nimport {\n CredentialDetailsCardListItem,\n CredentialDetailsCardListItemProps,\n CredentialHeader,\n CredentialHeaderProps,\n} from '../credential';\nimport { NextIcon } from '../icons';\nimport { ScrollViewScreen } from '../screens';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\nimport DataItem from './data-item';\n\nexport type HistoryDetailsLabels = {\n credentialCard: CardLabels;\n data: {\n date: string;\n action: string;\n };\n infoButtonAccessibility?: string;\n relatedAssets: string;\n title: string;\n};\n\ntype CredentialDetails = Omit<\n CredentialDetailsProps,\n 'expanded' | 'labels' | 'lastItem' | 'onHeaderPress' | 'onImagePreview'\n>;\n\ntype CredentialCard = Omit<\n CredentialDetailsCardListItemProps,\n 'expanded' | 'labels' | 'lastItem' | 'onHeaderPress' | 'onImagePreview'\n>;\n\nexport type HistoryDetailsViewProps = {\n assets?: {\n header?: CredentialHeaderProps & {\n onPressed?: () => void;\n };\n cards?: (\n | {\n credentialDetails: CredentialDetails;\n }\n | {\n credentialCard: CredentialCard;\n }\n )[];\n };\n data: {\n header?:\n | {\n entity: EntityDetailsProps;\n }\n | {\n credentialHeader: CredentialHeaderProps;\n };\n date: string;\n action: {\n icon: ComponentType<any> | ReactElement;\n label: string;\n color: ColorValue;\n testID?: string;\n };\n };\n headerButton?: ReactElement;\n labels: HistoryDetailsLabels;\n onBackPressed: () => void;\n onInfoPressed?: () => void;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n testID: string;\n};\n\nexport const HistoryDetailsView: FC<HistoryDetailsViewProps> = ({\n assets,\n data,\n headerButton,\n labels,\n onBackPressed,\n onInfoPressed,\n onImagePreview,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n const { expandedCredential, onHeaderPress, setInitialCredential } = useCredentialListExpandedCard();\n\n // Expand the first credential\n useEffect(() => {\n if (assets?.cards && assets.cards.length > 0) {\n let id =\n 'credentialDetails' in assets.cards[0]\n ? assets.cards[0].credentialDetails.credentialId\n : assets.cards[0].credentialCard.card.credentialId;\n if (id) {\n setInitialCredential(id);\n }\n }\n }, [assets?.cards, setInitialCredential]);\n\n const moreInfoHeaderButton = useMemo(() => {\n if (headerButton) {\n return headerButton;\n }\n\n if (!onInfoPressed) {\n return undefined;\n }\n\n return (\n <HeaderInfoButton\n onPress={onInfoPressed}\n testID={concatTestID(testID, 'header', 'info')}\n accessibilityLabel={labels.infoButtonAccessibility ?? ''}\n />\n );\n }, [headerButton, labels.infoButtonAccessibility, onInfoPressed, testID]);\n\n const hasAssets = assets && (assets.header || assets.cards?.length);\n\n return (\n <ScrollViewScreen\n header={{\n leftItem: <BackButton onPress={onBackPressed} testID={concatTestID(testID, 'header', 'back')} />,\n rightItem: moreInfoHeaderButton,\n static: true,\n title: labels.title,\n }}\n scrollView={{\n style: styles.content,\n }}\n testID={testID}>\n <View style={[styles.section, { backgroundColor: colorScheme.white }]}>\n {data.header && 'entity' in data.header && (\n <EntityDetails\n {...data.header.entity}\n style={[styles.entity, { borderColor: colorScheme.background }, data.header.entity.style]}\n />\n )}\n {data.header && 'credentialHeader' in data.header && (\n <CredentialHeader\n {...data.header.credentialHeader}\n blur={false}\n style={[styles.header, { borderColor: colorScheme.background }, data.header.credentialHeader.style]}\n />\n )}\n <DataItem attribute={labels.data.date} value={data.date} />\n <DataItem\n attribute={labels.data.action}\n last\n testID={data.action.testID}\n value={data.action.label}\n valueColor={data.action.color}\n valueIcon={data.action.icon}\n />\n </View>\n\n {hasAssets && (\n <Typography color={colorScheme.text} preset=\"m\" style={styles.sectionHeader}>\n {labels.relatedAssets}\n </Typography>\n )}\n\n {assets?.header && (\n <TouchableOpacity disabled={!assets.header.onPressed} onPress={assets.header.onPressed}>\n <CredentialHeader\n {...assets.header}\n accessory={assets.header.onPressed ? <NextIcon color={colorScheme.text} /> : undefined}\n blur={false}\n style={[styles.assetsHeader, assets.header.style]}\n />\n </TouchableOpacity>\n )}\n {assets?.cards?.map((props, index, { length }) => {\n if ('credentialDetails' in props) {\n return (\n <View key={props.credentialDetails.credentialId} style={styles.credential}>\n <CredentialDetails\n {...props.credentialDetails}\n expanded={expandedCredential === props.credentialDetails.credentialId}\n labels={labels.credentialCard}\n lastItem={index === length - 1}\n onHeaderPress={onHeaderPress}\n onImagePreview={onImagePreview}\n />\n </View>\n );\n } else {\n const itemProps = {\n ...props.credentialCard,\n card: {\n ...props.credentialCard.card,\n onHeaderPress,\n },\n };\n return (\n <View key={index.toString()} style={styles.credential}>\n <CredentialDetailsCardListItem\n {...itemProps}\n expanded={expandedCredential === props.credentialCard.card.credentialId}\n lastItem={index === length - 1}\n onImagePreview={onImagePreview}\n />\n </View>\n );\n }\n })}\n </ScrollViewScreen>\n );\n};\n\nconst styles = StyleSheet.create({\n assetsHeader: {\n borderRadius: 8,\n },\n content: {\n paddingHorizontal: 16,\n paddingTop: 12,\n },\n credential: {\n marginBottom: 4,\n },\n entity: {\n borderBottomWidth: 1,\n paddingBottom: 8,\n },\n header: {\n borderBottomWidth: 1,\n marginTop: -8,\n paddingBottom: 12,\n paddingHorizontal: 0,\n },\n section: {\n borderRadius: 8,\n marginBottom: 12,\n padding: 12,\n },\n sectionHeader: {\n marginHorizontal: 4,\n marginVertical: 16,\n },\n});\n"],"mappings":";AAAA,OAAOA,KAAK,IAAqCC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAClF,SAA0CC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAEhF,SAASC,iBAAiB,EAA0BC,aAAa,QAA4B,kBAAkB;AAC/G,SAASC,gBAAgB,QAAQ,4CAA4C;AAC7E,SAAqBC,YAAY,EAAEC,6BAA6B,QAAQ,aAAa;AACrF,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SAASC,UAAU,QAAQ,YAAY;AACvC,SACEC,6BAA6B,EAE7BC,gBAAgB,QAEX,eAAe;AACtB,SAASC,QAAQ,QAAQ,UAAU;AACnC,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,SAASC,UAAU,QAAQ,SAAS;AACpC,SAASC,iBAAiB,QAAQ,UAAU;AAC5C,OAAOC,QAAQ,MAAM,aAAa;AA6DlC,OAAO,MAAMC,kBAA+C,GAAGA,CAAC;EAC9DC,MAAM;EACNC,IAAI;EACJC,YAAY;EACZC,MAAM;EACNC,aAAa;EACbC,aAAa;EACbC,cAAc;EACdC;AACF,CAAC,KAAK;EAAA,IAAAC,aAAA,EAAAC,cAAA;EACJ,MAAMC,WAAW,GAAGb,iBAAiB,CAAC,CAAC;EACvC,MAAM;IAAEc,kBAAkB;IAAEC,aAAa;IAAEC;EAAqB,CAAC,GAAGxB,6BAA6B,CAAC,CAAC;;EAEnG;EACAR,SAAS,CAAC,MAAM;IACd,IAAImB,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEc,KAAK,IAAId,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AG,CAAE;QAC/BT,cAAc,EAAEA;MAAe,EAChC,CACG,CAAC;IAEX;EACF,CAAC,CACe,CAAC;AAEvB,CAAC;AAED,MAAM8B,MAAM,GAAGrD,UAAU,CAAC2F,MAAM,CAAC;EAC/BV,YAAY,EAAE;IACZW,YAAY,EAAE;EAChB,CAAC;EACDtC,OAAO,EAAE;IACPuC,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE;EACd,CAAC;EACDR,UAAU,EAAE;IACVS,YAAY,EAAE;EAChB,CAAC;EACDpC,MAAM,EAAE;IACNqC,iBAAiB,EAAE,CAAC;IACpBC,aAAa,EAAE;EACjB,CAAC;EACDnD,MAAM,EAAE;IACNkD,iBAAiB,EAAE,CAAC;IACpBE,SAAS,EAAE,CAAC,CAAC;IACbD,aAAa,EAAE,EAAE;IACjBJ,iBAAiB,EAAE;EACrB,CAAC;EACDtC,OAAO,EAAE;IACPqC,YAAY,EAAE,CAAC;IACfG,YAAY,EAAE,EAAE;IAChBI,OAAO,EAAE;EACX,CAAC;EACDvB,aAAa,EAAE;IACbwB,gBAAgB,EAAE,CAAC;IACnBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useMemo","StyleSheet","View","CredentialDetails","EntityDetails","HeaderInfoButton","concatTestID","useCredentialListExpandedCard","TouchableOpacity","BackButton","CredentialDetailsCardListItem","CredentialHeader","NextIcon","ScrollViewScreen","Typography","useAppColorScheme","DataItem","HistoryDetailsView","assets","data","headerButton","labels","onBackPressed","onInfoPressed","onImagePreview","testID","_assets$cards","_assets$cards2","colorScheme","expandedCredential","onHeaderPress","setInitialCredential","cards","length","id","credentialDetails","credentialId","credentialCard","card","moreInfoHeaderButton","_labels$infoButtonAcc","undefined","createElement","onPress","accessibilityLabel","infoButtonAccessibility","hasAssets","header","leftItem","rightItem","static","title","scrollView","style","styles","content","section","backgroundColor","white","_extends","entity","borderColor","background","credentialHeader","blur","attribute","date","value","action","last","label","valueColor","color","valueIcon","icon","text","preset","sectionHeader","relatedAssets","disabled","onPressed","accessory","assetsHeader","map","props","index","key","credential","expanded","lastItem","itemProps","headerPressable","toString","create","borderRadius","paddingHorizontal","paddingTop","marginBottom","borderBottomWidth","paddingBottom","marginTop","padding","marginHorizontal","marginVertical"],"sources":["history-details.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactElement, useEffect, useMemo } from 'react';\nimport { ColorValue, ImageSourcePropType, StyleSheet, View } from 'react-native';\n\nimport { CredentialDetails, CredentialDetailsProps, EntityDetails, EntityDetailsProps } from '../../components';\nimport { HeaderInfoButton } from '../../components/navigation/header-buttons';\nimport { CardLabels, concatTestID, useCredentialListExpandedCard } from '../../utils';\nimport { TouchableOpacity } from '../accessibility';\nimport { BackButton } from '../buttons';\nimport {\n CredentialDetailsCardListItem,\n CredentialDetailsCardListItemProps,\n CredentialHeader,\n CredentialHeaderProps,\n} from '../credential';\nimport { NextIcon } from '../icons';\nimport { ScrollViewScreen } from '../screens';\nimport { Typography } from '../text';\nimport { useAppColorScheme } from '../theme';\nimport DataItem from './data-item';\n\nexport type HistoryDetailsLabels = {\n credentialCard: CardLabels;\n data: {\n date: string;\n action: string;\n };\n infoButtonAccessibility?: string;\n relatedAssets: string;\n title: string;\n};\n\ntype CredentialDetails = Omit<\n CredentialDetailsProps,\n 'expanded' | 'labels' | 'lastItem' | 'onHeaderPress' | 'onImagePreview'\n>;\n\ntype CredentialCard = Omit<\n CredentialDetailsCardListItemProps,\n 'expanded' | 'labels' | 'lastItem' | 'onHeaderPress' | 'onImagePreview'\n> & {\n /** default: true */\n headerPressable?: boolean;\n};\n\nexport type HistoryDetailsViewProps = {\n assets?: {\n header?: CredentialHeaderProps & {\n onPressed?: () => void;\n };\n cards?: (\n | {\n credentialDetails: CredentialDetails;\n }\n | {\n credentialCard: CredentialCard;\n }\n )[];\n };\n data: {\n header?:\n | {\n entity: EntityDetailsProps;\n }\n | {\n credentialHeader: CredentialHeaderProps;\n };\n date: string;\n action: {\n icon: ComponentType<any> | ReactElement;\n label: string;\n color: ColorValue;\n testID?: string;\n };\n };\n headerButton?: ReactElement;\n labels: HistoryDetailsLabels;\n onBackPressed: () => void;\n onInfoPressed?: () => void;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n testID: string;\n};\n\nexport const HistoryDetailsView: FC<HistoryDetailsViewProps> = ({\n assets,\n data,\n headerButton,\n labels,\n onBackPressed,\n onInfoPressed,\n onImagePreview,\n testID,\n}) => {\n const colorScheme = useAppColorScheme();\n const { expandedCredential, onHeaderPress, setInitialCredential } = useCredentialListExpandedCard();\n\n // Expand the first credential\n useEffect(() => {\n if (assets?.cards && assets.cards.length > 0) {\n let id =\n 'credentialDetails' in assets.cards[0]\n ? assets.cards[0].credentialDetails.credentialId\n : assets.cards[0].credentialCard.card.credentialId;\n if (id) {\n setInitialCredential(id);\n }\n }\n }, [assets?.cards, setInitialCredential]);\n\n const moreInfoHeaderButton = useMemo(() => {\n if (headerButton) {\n return headerButton;\n }\n\n if (!onInfoPressed) {\n return undefined;\n }\n\n return (\n <HeaderInfoButton\n onPress={onInfoPressed}\n testID={concatTestID(testID, 'header', 'info')}\n accessibilityLabel={labels.infoButtonAccessibility ?? ''}\n />\n );\n }, [headerButton, labels.infoButtonAccessibility, onInfoPressed, testID]);\n\n const hasAssets = assets && (assets.header || assets.cards?.length);\n\n return (\n <ScrollViewScreen\n header={{\n leftItem: <BackButton onPress={onBackPressed} testID={concatTestID(testID, 'header', 'back')} />,\n rightItem: moreInfoHeaderButton,\n static: true,\n title: labels.title,\n }}\n scrollView={{\n style: styles.content,\n }}\n testID={testID}>\n <View style={[styles.section, { backgroundColor: colorScheme.white }]}>\n {data.header && 'entity' in data.header && (\n <EntityDetails\n {...data.header.entity}\n style={[styles.entity, { borderColor: colorScheme.background }, data.header.entity.style]}\n />\n )}\n {data.header && 'credentialHeader' in data.header && (\n <CredentialHeader\n {...data.header.credentialHeader}\n blur={false}\n style={[styles.header, { borderColor: colorScheme.background }, data.header.credentialHeader.style]}\n />\n )}\n <DataItem attribute={labels.data.date} value={data.date} />\n <DataItem\n attribute={labels.data.action}\n last\n testID={data.action.testID}\n value={data.action.label}\n valueColor={data.action.color}\n valueIcon={data.action.icon}\n />\n </View>\n\n {hasAssets && (\n <Typography color={colorScheme.text} preset=\"m\" style={styles.sectionHeader}>\n {labels.relatedAssets}\n </Typography>\n )}\n\n {assets?.header && (\n <TouchableOpacity disabled={!assets.header.onPressed} onPress={assets.header.onPressed}>\n <CredentialHeader\n {...assets.header}\n accessory={assets.header.onPressed ? <NextIcon color={colorScheme.text} /> : undefined}\n blur={false}\n style={[styles.assetsHeader, assets.header.style]}\n />\n </TouchableOpacity>\n )}\n {assets?.cards?.map((props, index, { length }) => {\n if ('credentialDetails' in props) {\n return (\n <View key={props.credentialDetails.credentialId} style={styles.credential}>\n <CredentialDetails\n {...props.credentialDetails}\n expanded={expandedCredential === props.credentialDetails.credentialId}\n labels={labels.credentialCard}\n lastItem={index === length - 1}\n onHeaderPress={onHeaderPress}\n onImagePreview={onImagePreview}\n />\n </View>\n );\n } else {\n const itemProps = {\n ...props.credentialCard,\n card: {\n ...props.credentialCard.card,\n onHeaderPress: props.credentialCard.headerPressable === false ? undefined : onHeaderPress,\n },\n };\n return (\n <View key={index.toString()} style={styles.credential}>\n <CredentialDetailsCardListItem\n {...itemProps}\n expanded={expandedCredential === props.credentialCard.card.credentialId}\n lastItem={index === length - 1}\n onImagePreview={onImagePreview}\n />\n </View>\n );\n }\n })}\n </ScrollViewScreen>\n );\n};\n\nconst styles = StyleSheet.create({\n assetsHeader: {\n borderRadius: 8,\n },\n content: {\n paddingHorizontal: 16,\n paddingTop: 12,\n },\n credential: {\n marginBottom: 4,\n },\n entity: {\n borderBottomWidth: 1,\n paddingBottom: 8,\n },\n header: {\n borderBottomWidth: 1,\n marginTop: -8,\n paddingBottom: 12,\n paddingHorizontal: 0,\n },\n section: {\n borderRadius: 8,\n marginBottom: 12,\n padding: 12,\n },\n sect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;EAC/BX,YAAY,EAAE;IACZY,YAAY,EAAE;EAChB,CAAC;EACDvC,OAAO,EAAE;IACPwC,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE;EACd,CAAC;EACDT,UAAU,EAAE;IACVU,YAAY,EAAE;EAChB,CAAC;EACDrC,MAAM,EAAE;IACNsC,iBAAiB,EAAE,CAAC;IACpBC,aAAa,EAAE;EACjB,CAAC;EACDpD,MAAM,EAAE;IACNmD,iBAAiB,EAAE,CAAC;IACpBE,SAAS,EAAE,CAAC,CAAC;IACbD,aAAa,EAAE,EAAE;IACjBJ,iBAAiB,EAAE;EACrB,CAAC;EACDvC,OAAO,EAAE;IACPsC,YAAY,EAAE,CAAC;IACfG,YAAY,EAAE,EAAE;IAChBI,OAAO,EAAE;EACX,CAAC;EACDxB,aAAa,EAAE;IACbyB,gBAAgB,EAAE,CAAC;IACnBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,10 +1,10 @@
1
- import DataItem, { DataItemProps } from './data-item';
2
- import HistoryItemView, { HistoryItemViewProps } from './history-item';
1
+ import DataItem from './data-item';
2
+ import HistoryItemView from './history-item';
3
3
  import HistorySectionHeaderView from './history-section-header';
4
- import HistorySectionListItem, { HistorySectionListItemProps } from './history-section-list-item';
4
+ import HistorySectionListItem from './history-section-list-item';
5
5
  export * from './history-details';
6
- export { DataItem, DataItemProps };
7
- export { HistoryItemView, HistoryItemViewProps };
6
+ export { DataItem };
7
+ export { HistoryItemView };
8
8
  export { HistorySectionHeaderView };
9
- export { HistorySectionListItem, HistorySectionListItemProps };
9
+ export { HistorySectionListItem };
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DataItem","DataItemProps","HistoryItemView","HistoryItemViewProps","HistorySectionHeaderView","HistorySectionListItem","HistorySectionListItemProps"],"sources":["index.ts"],"sourcesContent":["import DataItem, { DataItemProps } from './data-item';\nimport HistoryItemView, { HistoryItemViewProps } from './history-item';\nimport HistorySectionHeaderView from './history-section-header';\nimport HistorySectionListItem, { HistorySectionListItemProps } from './history-section-list-item';\n\nexport * from './history-details';\nexport { DataItem, DataItemProps };\nexport { HistoryItemView, HistoryItemViewProps };\nexport { HistorySectionHeaderView };\nexport { HistorySectionListItem, HistorySectionListItemProps };\n"],"mappings":"AAAA,OAAOA,QAAQ,IAAIC,aAAa,QAAQ,aAAa;AACrD,OAAOC,eAAe,IAAIC,oBAAoB,QAAQ,gBAAgB;AACtE,OAAOC,wBAAwB,MAAM,0BAA0B;AAC/D,OAAOC,sBAAsB,IAAIC,2BAA2B,QAAQ,6BAA6B;AAEjG,cAAc,mBAAmB;AACjC,SAASN,QAAQ,EAAEC,aAAa;AAChC,SAASC,eAAe,EAAEC,oBAAoB;AAC9C,SAASC,wBAAwB;AACjC,SAASC,sBAAsB,EAAEC,2BAA2B","ignoreList":[]}
1
+ {"version":3,"names":["DataItem","HistoryItemView","HistorySectionHeaderView","HistorySectionListItem"],"sources":["index.ts"],"sourcesContent":["import type { DataItemProps } from './data-item';\nimport DataItem from './data-item';\nimport type { HistoryItemViewProps } from './history-item';\nimport HistoryItemView from './history-item';\nimport HistorySectionHeaderView from './history-section-header';\nimport type { HistorySectionListItemProps } from './history-section-list-item';\nimport HistorySectionListItem from './history-section-list-item';\n\nexport * from './history-details';\nexport { DataItem, DataItemProps };\nexport { HistoryItemView, HistoryItemViewProps };\nexport { HistorySectionHeaderView };\nexport { HistorySectionListItem, HistorySectionListItemProps };\n"],"mappings":"AACA,OAAOA,QAAQ,MAAM,aAAa;AAElC,OAAOC,eAAe,MAAM,gBAAgB;AAC5C,OAAOC,wBAAwB,MAAM,0BAA0B;AAE/D,OAAOC,sBAAsB,MAAM,6BAA6B;AAEhE,cAAc,mBAAmB;AACjC,SAASH,QAAQ;AACjB,SAASC,eAAe;AACxB,SAASC,wBAAwB;AACjC,SAASC,sBAAsB","ignoreList":[]}
@@ -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 13.9193 11.7949 14.1904C11.7949 14.4671 11.6953 14.694 11.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AA,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;IAACU,IAAI,EAAEN,WAAW,CAACY,KAAM;IAACC,C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Y;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