@procivis/one-react-native-components 0.3.99 → 0.3.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/history/history-list-item-icon.js +1 -3
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
- package/lib/commonjs/components/history/history-list-screen.js +1 -0
- package/lib/commonjs/components/history/history-list-screen.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js +1 -0
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +1 -0
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/connectivity-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/filter-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/ghost-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/hold-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/hold-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/scan-button.js +3 -0
- package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/share-button.js +1 -0
- package/lib/commonjs/ui-components/buttons/share-button.js.map +1 -1
- package/lib/commonjs/ui-components/control/checkbox.js +1 -0
- package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-card.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +3 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-header.js +1 -0
- package/lib/commonjs/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js +2 -0
- package/lib/commonjs/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js +1 -0
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js +2 -1
- package/lib/commonjs/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/commonjs/ui-components/credential/selector.js +1 -0
- package/lib/commonjs/ui-components/credential/selector.js.map +1 -1
- package/lib/commonjs/ui-components/entity/avatar.js +1 -0
- package/lib/commonjs/ui-components/entity/avatar.js.map +1 -1
- package/lib/commonjs/ui-components/header/navigation-header.js +1 -0
- package/lib/commonjs/ui-components/header/navigation-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-details.js +3 -1
- package/lib/commonjs/ui-components/history/history-details.js.map +1 -1
- package/lib/commonjs/ui-components/icons/history.js +1 -0
- package/lib/commonjs/ui-components/icons/history.js.map +1 -1
- package/lib/commonjs/ui-components/pin/keypad.js +1 -0
- package/lib/commonjs/ui-components/pin/keypad.js.map +1 -1
- package/lib/commonjs/ui-components/pin/pins.js +1 -0
- package/lib/commonjs/ui-components/pin/pins.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item.js +1 -0
- package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
- package/lib/commonjs/ui-components/settings/settings-button.js +1 -0
- package/lib/commonjs/ui-components/settings/settings-button.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/module/components/history/history-list-item-icon.js +1 -3
- package/lib/module/components/history/history-list-item-icon.js.map +1 -1
- package/lib/module/components/history/history-list-screen.js +1 -0
- package/lib/module/components/history/history-list-screen.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js +1 -0
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2.js +1 -0
- package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/module/ui-components/buttons/connectivity-button.js +1 -0
- package/lib/module/ui-components/buttons/connectivity-button.js.map +1 -1
- package/lib/module/ui-components/buttons/filter-button.js +1 -0
- package/lib/module/ui-components/buttons/filter-button.js.map +1 -1
- package/lib/module/ui-components/buttons/ghost-button.js +1 -0
- package/lib/module/ui-components/buttons/ghost-button.js.map +1 -1
- package/lib/module/ui-components/buttons/hold-button.js +1 -0
- package/lib/module/ui-components/buttons/hold-button.js.map +1 -1
- package/lib/module/ui-components/buttons/scan-button.js +3 -0
- package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/module/ui-components/buttons/share-button.js +1 -0
- package/lib/module/ui-components/buttons/share-button.js.map +1 -1
- package/lib/module/ui-components/control/checkbox.js +1 -0
- package/lib/module/ui-components/control/checkbox.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-card.js +1 -0
- package/lib/module/ui-components/credential/card/credential-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js +3 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-list-item.js +1 -0
- package/lib/module/ui-components/credential/card/credential-details-list-item.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-header.js +1 -0
- package/lib/module/ui-components/credential/card/credential-header.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-image-carousel.js +2 -0
- package/lib/module/ui-components/credential/card/credential-image-carousel.js.map +1 -1
- package/lib/module/ui-components/credential/credential-attribute-item.js +1 -0
- package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js +2 -1
- package/lib/module/ui-components/credential/credential-carousel-images.js.map +1 -1
- package/lib/module/ui-components/credential/selector.js +1 -0
- package/lib/module/ui-components/credential/selector.js.map +1 -1
- package/lib/module/ui-components/entity/avatar.js +1 -0
- package/lib/module/ui-components/entity/avatar.js.map +1 -1
- package/lib/module/ui-components/header/navigation-header.js +1 -0
- package/lib/module/ui-components/header/navigation-header.js.map +1 -1
- package/lib/module/ui-components/history/history-details.js +3 -1
- package/lib/module/ui-components/history/history-details.js.map +1 -1
- package/lib/module/ui-components/icons/history.js +1 -0
- package/lib/module/ui-components/icons/history.js.map +1 -1
- package/lib/module/ui-components/pin/keypad.js +1 -0
- package/lib/module/ui-components/pin/keypad.js.map +1 -1
- package/lib/module/ui-components/pin/pins.js +1 -0
- package/lib/module/ui-components/pin/pins.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item.js +1 -0
- package/lib/module/ui-components/settings/setting-item.js.map +1 -1
- package/lib/module/ui-components/settings/settings-button.js +1 -0
- package/lib/module/ui-components/settings/settings-button.js.map +1 -1
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/typescript/utils/parsers/credential.d.ts +2 -29
- package/package.json +3 -3
- package/src/components/history/history-list-item-icon.tsx +0 -2
- package/src/components/history/history-list-screen.tsx +1 -0
- package/src/components/proof-request/v2/share-credential-v2-group.tsx +1 -0
- package/src/components/proof-request/v2/share-credential-v2.tsx +1 -0
- package/src/ui-components/buttons/connectivity-button.tsx +1 -0
- package/src/ui-components/buttons/filter-button.tsx +1 -0
- package/src/ui-components/buttons/ghost-button.tsx +1 -0
- package/src/ui-components/buttons/hold-button.tsx +1 -0
- package/src/ui-components/buttons/scan-button.tsx +3 -0
- package/src/ui-components/buttons/share-button.tsx +1 -0
- package/src/ui-components/control/checkbox.tsx +1 -0
- package/src/ui-components/credential/card/credential-card.tsx +1 -0
- package/src/ui-components/credential/card/credential-details-card.tsx +2 -0
- package/src/ui-components/credential/card/credential-details-list-item.tsx +1 -0
- package/src/ui-components/credential/card/credential-header.tsx +1 -0
- package/src/ui-components/credential/card/credential-image-carousel.tsx +2 -2
- package/src/ui-components/credential/credential-attribute-item.tsx +1 -0
- package/src/ui-components/credential/credential-carousel-images.tsx +1 -0
- package/src/ui-components/credential/selector.tsx +1 -0
- package/src/ui-components/entity/avatar.tsx +1 -0
- package/src/ui-components/header/navigation-header.tsx +1 -0
- package/src/ui-components/history/history-details.tsx +2 -0
- package/src/ui-components/icons/history.tsx +1 -0
- package/src/ui-components/pin/keypad.tsx +1 -0
- package/src/ui-components/pin/pins.tsx +1 -0
- package/src/ui-components/settings/setting-item.tsx +1 -0
- package/src/ui-components/settings/settings-button.tsx +1 -0
- package/src/utils/parsers/credential.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useMemo","Image","StyleSheet","View","colorWithAlphaComponent","concatTestID","TouchableHighlight","TouchableOpacity","Typography","useAppColorScheme","CredentialAttributeItemButton","children","disabled","id","onPress","selected","colorScheme","pressHandler","createElement","style","styles","touchableAttribute","activeOpacity","backgroundColor","background","underlayColor","IMAGE_SIZE","CredentialAttributeItem","attributes","image","last","name","onImagePreview","rightAccessory","nested","listValue","testID","value","values","valueErrorColor","imagePreviewHandler","rightAccessoryView","undefined","isValidElement","RightAccessoryComponent","isObject","length","isArray","attributeItemContainer","attributeItemRow","dataItemButtonChildren","decorator","decoratorCircle","listDecoratorCircle","listImageDecoratorCircle","text","decoratorCircleInner","borderColor","decoratorLine","listDecoratorLine","listStringValueDecoratorLine","listImageDecoratorLine","objectAttributeItem","attributeItem","nestedAttributeItem","color","preset","nestedObjectLabel","dataItemLabel","dataItemImageWrapper","resizeMode","source","dataItemImage","error","numberOfLines","map","attribute","index","_extends","key","arrayValue","objectAccessory","separator","create","flex","paddingLeft","marginTop","flexDirection","alignItems","height","width","borderRadius","borderWidth","overflow","marginBottom","opacity","justifyContent","left","position","top","bottom","marginLeft","paddingVertical","alignSelf","paddingHorizontal","right","marginHorizontal"],"sources":["credential-attribute-item.tsx"],"sourcesContent":["import React, { ComponentType, FC, PropsWithChildren, ReactElement, useCallback, useMemo } from 'react';\nimport { Image, ImageSourcePropType, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { colorWithAlphaComponent } from '../../utils/color';\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableHighlight, TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\ntype CredentialAttributeItemButtonProps = {\n disabled?: boolean;\n id: string;\n onPress?: (id: string, selected: boolean) => void;\n selected?: boolean;\n};\n\nconst CredentialAttributeItemButton: FC<PropsWithChildren<CredentialAttributeItemButtonProps>> = ({\n children,\n disabled,\n id,\n onPress,\n selected,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const pressHandler = useCallback(() => {\n if (!onPress) {\n return;\n }\n onPress(id, !selected);\n }, [onPress, id, selected]);\n\n if (!onPress) {\n return <View style={styles.touchableAttribute}>{children}</View>;\n }\n\n if (selected) {\n return (\n <TouchableOpacity\n activeOpacity={0.8}\n disabled={disabled}\n onPress={pressHandler}\n style={[styles.touchableAttribute, { backgroundColor: colorScheme.background }]}>\n {children}\n </TouchableOpacity>\n );\n }\n\n return (\n <TouchableHighlight\n disabled={disabled}\n onPress={pressHandler}\n underlayColor={colorWithAlphaComponent(colorScheme.background, 0.5)}\n style={styles.touchableAttribute}>\n {children}\n </TouchableHighlight>\n );\n};\n\nconst IMAGE_SIZE = 64;\n\nexport type CredentialAttributeValue =\n | {\n attributes: CredentialAttribute[];\n image?: never;\n value?: never;\n values?: never;\n valueErrorColor?: never;\n testID?: string;\n }\n | {\n attributes?: never;\n image: ImageSourcePropType;\n value?: never;\n values?: never;\n valueErrorColor?: never;\n testID?: string;\n }\n | {\n attributes?: never;\n image?: never;\n value: string;\n values?: never;\n valueErrorColor?: boolean;\n testID?: string;\n }\n | {\n attributes?: never;\n image?: never;\n value?: never;\n values: CredentialAttribute[];\n valueErrorColor?: boolean;\n testID?: string;\n };\n\nexport type CredentialAttribute = CredentialAttributeValue & {\n disabled?: boolean;\n selected?: boolean;\n nested?: boolean;\n listValue?: boolean;\n id: string;\n name?: string;\n path: string;\n rightAccessory?: ComponentType<any> | ReactElement;\n};\n\nexport type CredentialAttributeItemProps = CredentialAttribute & {\n last: boolean | undefined;\n onImagePreview?: (name: string, image: ImageSourcePropType) => void;\n onPress?: (id: string, selected: boolean) => void;\n style?: StyleProp<ViewStyle>;\n};\n\nconst CredentialAttributeItem: FC<CredentialAttributeItemProps> = ({\n attributes,\n disabled,\n id,\n image,\n last,\n name,\n onImagePreview,\n onPress,\n rightAccessory,\n nested = false,\n listValue = false,\n selected,\n style,\n testID,\n value,\n values,\n valueErrorColor,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const imagePreviewHandler = useCallback(() => {\n if (!onImagePreview || !image) {\n return;\n }\n onImagePreview(name ?? '', image);\n }, [image, name, onImagePreview]);\n\n const rightAccessoryView: React.ReactElement | undefined = useMemo(() => {\n if (!rightAccessory) {\n return undefined;\n }\n if (React.isValidElement(rightAccessory)) {\n return rightAccessory;\n } else {\n const RightAccessoryComponent = rightAccessory as React.ComponentType<any>;\n return <RightAccessoryComponent />;\n }\n }, [rightAccessory]);\n\n const isObject = attributes && attributes.length > 0;\n const isArray = values && values.length > 0;\n\n return (\n <View style={[!nested && styles.attributeItemContainer, style]} testID={testID}>\n <View style={styles.attributeItemRow}>\n <CredentialAttributeItemButton disabled={disabled} id={id} onPress={onPress} selected={selected}>\n <View style={[styles.dataItemButtonChildren]}>\n {(isObject || isArray || listValue) && (\n <View style={styles.decorator}>\n <View\n style={[\n styles.decoratorCircle,\n listValue ? styles.listDecoratorCircle : undefined,\n listValue && image ? styles.listImageDecoratorCircle : undefined,\n { backgroundColor: colorScheme.text },\n ]}>\n <View\n style={[\n styles.decoratorCircleInner,\n { backgroundColor: colorScheme.text, borderColor: colorScheme.background },\n ]}\n />\n </View>\n <View\n style={[\n styles.decoratorLine,\n listValue ? styles.listDecoratorLine : undefined,\n listValue && value ? styles.listStringValueDecoratorLine : undefined,\n listValue && image ? styles.listImageDecoratorLine : undefined,\n { backgroundColor: colorScheme.text },\n ]}\n />\n </View>\n )}\n <View\n style={[\n isObject || isArray || listValue ? styles.objectAttributeItem : styles.attributeItem,\n nested && styles.nestedAttributeItem,\n ]}>\n {name && (\n <Typography\n color={colorScheme.text}\n preset={image ? 'xs' : 'xs/line-height-small'}\n style={isObject || isArray ? styles.nestedObjectLabel : styles.dataItemLabel}\n testID={concatTestID(testID, 'title')}>\n {name}\n </Typography>\n )}\n {image && (\n <TouchableOpacity\n disabled={!onImagePreview}\n onPress={imagePreviewHandler}\n style={[styles.dataItemImageWrapper, listValue ? styles.listValue : undefined]}>\n <Image\n resizeMode=\"cover\"\n testID={concatTestID(testID, 'image')}\n source={image}\n style={styles.dataItemImage}\n />\n </TouchableOpacity>\n )}\n {value && (\n <Typography\n color={valueErrorColor ? colorScheme.error : colorScheme.text}\n numberOfLines={10}\n preset=\"s\"\n style={listValue ? styles.listValue : undefined}\n testID={concatTestID(testID, 'value')}>\n {value}\n </Typography>\n )}\n {isObject &&\n attributes.map((attribute, index, { length }) => (\n <CredentialAttributeItem\n nested={true}\n key={attribute.id}\n onPress={onPress}\n last={index === length - 1}\n onImagePreview={onImagePreview}\n {...attribute}\n />\n ))}\n {isArray &&\n values.map((arrayValue, index, { length }) => (\n <CredentialAttributeItem\n key={arrayValue.id}\n onPress={onPress}\n last={index === length - 1}\n onImagePreview={onImagePreview}\n listValue={true}\n {...arrayValue}\n name={undefined}\n />\n ))}\n <View />\n </View>\n {rightAccessoryView && (\n <View style={[styles.rightAccessory, isObject && styles.objectAccessory]}>{rightAccessoryView}</View>\n )}\n </View>\n </CredentialAttributeItemButton>\n </View>\n {!last && !nested && <View style={[styles.separator, { backgroundColor: colorScheme.background }]} />}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n attributeItem: {\n flex: 1,\n paddingLeft: 8,\n },\n attributeItemContainer: {\n marginTop: 2,\n },\n attributeItemRow: {\n flexDirection: 'row',\n },\n dataItemButtonChildren: {\n alignItems: 'center',\n flexDirection: 'row',\n },\n dataItemImage: {\n height: IMAGE_SIZE,\n width: IMAGE_SIZE,\n },\n dataItemImageWrapper: {\n borderColor: '#0004',\n borderRadius: 4,\n borderWidth: 0.5,\n height: IMAGE_SIZE,\n marginTop: 4,\n overflow: 'hidden',\n width: IMAGE_SIZE,\n },\n dataItemLabel: {\n marginBottom: 4,\n opacity: 0.7,\n },\n decorator: {\n height: '100%',\n justifyContent: 'center',\n left: 8,\n position: 'absolute',\n },\n decoratorCircle: {\n alignItems: 'center',\n borderRadius: 3.5,\n borderWidth: 1,\n height: 7,\n justifyContent: 'center',\n position: 'absolute',\n top: 6,\n width: 7,\n },\n decoratorCircleInner: {\n borderRadius: 2,\n borderWidth: 1,\n height: 4,\n width: 4,\n },\n decoratorLine: {\n bottom: 12,\n left: 3,\n position: 'absolute',\n top: 13,\n width: 1,\n },\n listDecoratorCircle: {\n top: 18,\n },\n listDecoratorLine: {\n top: 25,\n },\n listImageDecoratorCircle: {\n top: 32,\n },\n listImageDecoratorLine: {\n bottom: 40,\n top: 39,\n },\n listStringValueDecoratorLine: {\n bottom: 24,\n },\n listValue: {\n marginLeft: 13,\n paddingVertical: 10,\n },\n nestedAttributeItem: {\n paddingLeft: 12,\n },\n nestedObjectLabel: {\n opacity: 0.7,\n paddingLeft: 13,\n },\n objectAccessory: {\n alignSelf: 'flex-start',\n },\n objectAttributeItem: {\n alignItems: 'stretch',\n flex: 1,\n paddingLeft: 12,\n },\n rightAccessory: {\n paddingHorizontal: 8,\n position: 'absolute',\n right: 0,\n },\n separator: {\n height: 1,\n marginHorizontal: 8,\n marginTop: -1,\n },\n touchableAttribute: {\n borderRadius: 8,\n flex: 1,\n paddingVertical: 11,\n },\n});\n\nexport default CredentialAttributeItem;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAwDC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACvG,SAASC,KAAK,EAAkCC,UAAU,EAAEC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,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAEF,eAAe3E,uBAAuB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","Image","StyleSheet","View","colorWithAlphaComponent","concatTestID","TouchableHighlight","TouchableOpacity","Typography","useAppColorScheme","CredentialAttributeItemButton","children","disabled","id","onPress","selected","colorScheme","pressHandler","createElement","style","styles","touchableAttribute","activeOpacity","backgroundColor","background","underlayColor","IMAGE_SIZE","CredentialAttributeItem","attributes","image","last","name","onImagePreview","rightAccessory","nested","listValue","testID","value","values","valueErrorColor","imagePreviewHandler","rightAccessoryView","undefined","isValidElement","RightAccessoryComponent","isObject","length","isArray","attributeItemContainer","attributeItemRow","dataItemButtonChildren","decorator","decoratorCircle","listDecoratorCircle","listImageDecoratorCircle","text","decoratorCircleInner","borderColor","decoratorLine","listDecoratorLine","listStringValueDecoratorLine","listImageDecoratorLine","objectAttributeItem","attributeItem","nestedAttributeItem","color","preset","nestedObjectLabel","dataItemLabel","dataItemImageWrapper","resizeMode","source","dataItemImage","error","numberOfLines","map","attribute","index","_extends","key","arrayValue","objectAccessory","separator","create","flex","paddingLeft","marginTop","flexDirection","alignItems","height","width","borderRadius","borderWidth","overflow","marginBottom","opacity","justifyContent","left","position","top","bottom","marginLeft","paddingVertical","alignSelf","paddingHorizontal","right","marginHorizontal"],"sources":["credential-attribute-item.tsx"],"sourcesContent":["import React, { ComponentType, FC, PropsWithChildren, ReactElement, useCallback, useMemo } from 'react';\nimport { Image, ImageSourcePropType, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { colorWithAlphaComponent } from '../../utils/color';\nimport { concatTestID } from '../../utils/testID';\nimport { TouchableHighlight, TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\ntype CredentialAttributeItemButtonProps = {\n disabled?: boolean;\n id: string;\n onPress?: (id: string, selected: boolean) => void;\n selected?: boolean;\n};\n\nconst CredentialAttributeItemButton: FC<PropsWithChildren<CredentialAttributeItemButtonProps>> = ({\n children,\n disabled,\n id,\n onPress,\n selected,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const pressHandler = useCallback(() => {\n if (!onPress) {\n return;\n }\n onPress(id, !selected);\n }, [onPress, id, selected]);\n\n if (!onPress) {\n return <View style={styles.touchableAttribute}>{children}</View>;\n }\n\n if (selected) {\n return (\n <TouchableOpacity\n activeOpacity={0.8}\n disabled={disabled}\n onPress={pressHandler}\n style={[styles.touchableAttribute, { backgroundColor: colorScheme.background }]}>\n {children}\n </TouchableOpacity>\n );\n }\n\n return (\n <TouchableHighlight\n disabled={disabled}\n onPress={pressHandler}\n underlayColor={colorWithAlphaComponent(colorScheme.background, 0.5)}\n style={styles.touchableAttribute}>\n {children}\n </TouchableHighlight>\n );\n};\n\nconst IMAGE_SIZE = 64;\n\nexport type CredentialAttributeValue =\n | {\n attributes: CredentialAttribute[];\n image?: never;\n value?: never;\n values?: never;\n valueErrorColor?: never;\n testID?: string;\n }\n | {\n attributes?: never;\n image: ImageSourcePropType;\n value?: never;\n values?: never;\n valueErrorColor?: never;\n testID?: string;\n }\n | {\n attributes?: never;\n image?: never;\n value: string;\n values?: never;\n valueErrorColor?: boolean;\n testID?: string;\n }\n | {\n attributes?: never;\n image?: never;\n value?: never;\n values: CredentialAttribute[];\n valueErrorColor?: boolean;\n testID?: string;\n };\n\nexport type CredentialAttribute = CredentialAttributeValue & {\n disabled?: boolean;\n selected?: boolean;\n nested?: boolean;\n listValue?: boolean;\n id: string;\n name?: string;\n path: string;\n rightAccessory?: ComponentType<any> | ReactElement;\n};\n\nexport type CredentialAttributeItemProps = CredentialAttribute & {\n last: boolean | undefined;\n onImagePreview?: (name: string, image: ImageSourcePropType) => void;\n onPress?: (id: string, selected: boolean) => void;\n style?: StyleProp<ViewStyle>;\n};\n\nconst CredentialAttributeItem: FC<CredentialAttributeItemProps> = ({\n attributes,\n disabled,\n id,\n image,\n last,\n name,\n onImagePreview,\n onPress,\n rightAccessory,\n nested = false,\n listValue = false,\n selected,\n style,\n testID,\n value,\n values,\n valueErrorColor,\n}) => {\n const colorScheme = useAppColorScheme();\n\n const imagePreviewHandler = useCallback(() => {\n if (!onImagePreview || !image) {\n return;\n }\n onImagePreview(name ?? '', image);\n }, [image, name, onImagePreview]);\n\n const rightAccessoryView: React.ReactElement | undefined = useMemo(() => {\n if (!rightAccessory) {\n return undefined;\n }\n if (React.isValidElement(rightAccessory)) {\n return rightAccessory;\n } else {\n const RightAccessoryComponent = rightAccessory as React.ComponentType<any>;\n return <RightAccessoryComponent />;\n }\n }, [rightAccessory]);\n\n const isObject = attributes && attributes.length > 0;\n const isArray = values && values.length > 0;\n\n return (\n <View style={[!nested && styles.attributeItemContainer, style]} testID={testID}>\n <View style={styles.attributeItemRow}>\n <CredentialAttributeItemButton disabled={disabled} id={id} onPress={onPress} selected={selected}>\n <View style={[styles.dataItemButtonChildren]}>\n {(isObject || isArray || listValue) && (\n <View style={styles.decorator}>\n <View\n style={[\n styles.decoratorCircle,\n listValue ? styles.listDecoratorCircle : undefined,\n listValue && image ? styles.listImageDecoratorCircle : undefined,\n { backgroundColor: colorScheme.text },\n ]}>\n <View\n style={[\n styles.decoratorCircleInner,\n { backgroundColor: colorScheme.text, borderColor: colorScheme.background },\n ]}\n />\n </View>\n <View\n style={[\n styles.decoratorLine,\n listValue ? styles.listDecoratorLine : undefined,\n listValue && value ? styles.listStringValueDecoratorLine : undefined,\n listValue && image ? styles.listImageDecoratorLine : undefined,\n { backgroundColor: colorScheme.text },\n ]}\n />\n </View>\n )}\n <View\n style={[\n isObject || isArray || listValue ? styles.objectAttributeItem : styles.attributeItem,\n nested && styles.nestedAttributeItem,\n ]}>\n {name && (\n <Typography\n color={colorScheme.text}\n preset={image ? 'xs' : 'xs/line-height-small'}\n style={isObject || isArray ? styles.nestedObjectLabel : styles.dataItemLabel}\n testID={concatTestID(testID, 'title')}>\n {name}\n </Typography>\n )}\n {image && (\n <TouchableOpacity\n disabled={!onImagePreview}\n onPress={imagePreviewHandler}\n style={[styles.dataItemImageWrapper, listValue ? styles.listValue : undefined]}>\n <Image\n resizeMode=\"cover\"\n testID={concatTestID(testID, 'image')}\n source={image}\n style={styles.dataItemImage}\n />\n </TouchableOpacity>\n )}\n {value && (\n <Typography\n color={valueErrorColor ? colorScheme.error : colorScheme.text}\n numberOfLines={10}\n preset=\"s\"\n style={listValue ? styles.listValue : undefined}\n testID={concatTestID(testID, 'value')}>\n {value}\n </Typography>\n )}\n {isObject &&\n attributes.map((attribute, index, { length }) => (\n <CredentialAttributeItem\n nested={true}\n key={attribute.id}\n onPress={onPress}\n last={index === length - 1}\n onImagePreview={onImagePreview}\n {...attribute}\n />\n ))}\n {isArray &&\n values.map((arrayValue, index, { length }) => (\n <CredentialAttributeItem\n key={arrayValue.id}\n onPress={onPress}\n last={index === length - 1}\n onImagePreview={onImagePreview}\n listValue={true}\n {...arrayValue}\n name={undefined}\n />\n ))}\n <View />\n </View>\n {rightAccessoryView && (\n <View style={[styles.rightAccessory, isObject && styles.objectAccessory]}>{rightAccessoryView}</View>\n )}\n </View>\n </CredentialAttributeItemButton>\n </View>\n {!last && !nested && <View style={[styles.separator, { backgroundColor: colorScheme.background }]} />}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n attributeItem: {\n flex: 1,\n paddingLeft: 8,\n },\n attributeItemContainer: {\n marginTop: 2,\n },\n attributeItemRow: {\n flexDirection: 'row',\n },\n dataItemButtonChildren: {\n alignItems: 'center',\n flexDirection: 'row',\n },\n dataItemImage: {\n height: IMAGE_SIZE,\n width: IMAGE_SIZE,\n },\n dataItemImageWrapper: {\n borderColor: '#0004',\n borderRadius: 4,\n borderWidth: 0.5,\n height: IMAGE_SIZE,\n marginTop: 4,\n overflow: 'hidden',\n width: IMAGE_SIZE,\n },\n dataItemLabel: {\n marginBottom: 4,\n opacity: 0.7,\n },\n decorator: {\n height: '100%',\n justifyContent: 'center',\n left: 8,\n position: 'absolute',\n },\n decoratorCircle: {\n alignItems: 'center',\n borderRadius: 3.5,\n borderWidth: 1,\n height: 7,\n justifyContent: 'center',\n position: 'absolute',\n top: 6,\n width: 7,\n },\n decoratorCircleInner: {\n borderRadius: 2,\n borderWidth: 1,\n height: 4,\n width: 4,\n },\n decoratorLine: {\n bottom: 12,\n left: 3,\n position: 'absolute',\n top: 13,\n width: 1,\n },\n listDecoratorCircle: {\n top: 18,\n },\n listDecoratorLine: {\n top: 25,\n },\n listImageDecoratorCircle: {\n top: 32,\n },\n listImageDecoratorLine: {\n bottom: 40,\n top: 39,\n },\n listStringValueDecoratorLine: {\n bottom: 24,\n },\n listValue: {\n marginLeft: 13,\n paddingVertical: 10,\n },\n nestedAttributeItem: {\n paddingLeft: 12,\n },\n nestedObjectLabel: {\n opacity: 0.7,\n paddingLeft: 13,\n },\n objectAccessory: {\n alignSelf: 'flex-start',\n },\n objectAttributeItem: {\n alignItems: 'stretch',\n flex: 1,\n paddingLeft: 12,\n },\n rightAccessory: {\n paddingHorizontal: 8,\n position: 'absolute',\n right: 0,\n },\n separator: {\n height: 1,\n marginHorizontal: 8,\n marginTop: -1,\n },\n touchableAttribute: {\n borderRadius: 8,\n borderWidth: 0,\n flex: 1,\n paddingVertical: 11,\n },\n});\n\nexport default CredentialAttributeItem;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAwDC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACvG,SAASC,KAAK,EAAkCC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAEjG,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,kBAAkB,EAAEC,gBAAgB,QAAQ,+CAA+C;AACpG,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AASjE,MAAMC,6BAAwF,GAAGA,CAAC;EAChGC,QAAQ;EACRC,QAAQ;EACRC,EAAE;EACFC,OAAO;EACPC;AACF,C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AE;IACnB8C,GAAG,EAAE;EACP,CAAC;EACDxC,iBAAiB,EAAE;IACjBwC,GAAG,EAAE;EACP,CAAC;EACD7C,wBAAwB,EAAE;IACxB6C,GAAG,EAAE;EACP,CAAC;EACDtC,sBAAsB,EAAE;IACtBuC,MAAM,EAAE,EAAE;IACVD,GAAG,EAAE;EACP,CAAC;EACDvC,4BAA4B,EAAE;IAC5BwC,MAAM,EAAE;EACV,CAAC;EACDjE,SAAS,EAAE;IACTkE,UAAU,EAAE,EAAE;IACdC,eAAe,EAAE;EACnB,CAAC;EACDtC,mBAAmB,EAAE;IACnBqB,WAAW,EAAE;EACf,CAAC;EACDlB,iBAAiB,EAAE;IACjB4B,OAAO,EAAE,GAAG;IACZV,WAAW,EAAE;EACf,CAAC;EACDJ,eAAe,EAAE;IACfsB,SAAS,EAAE;EACb,CAAC;EACDzC,mBAAmB,EAAE;IACnB0B,UAAU,EAAE,SAAS;IACrBJ,IAAI,EAAE,CAAC;IACPC,WAAW,EAAE;EACf,CAAC;EACDpD,cAAc,EAAE;IACduE,iBAAiB,EAAE,CAAC;IACpBN,QAAQ,EAAE,UAAU;IACpBO,KAAK,EAAE;EACT,CAAC;EACDvB,SAAS,EAAE;IACTO,MAAM,EAAE,CAAC;IACTiB,gBAAgB,EAAE,CAAC;IACnBpB,SAAS,EAAE,CAAC;EACd,CAAC;EACDjE,kBAAkB,EAAE;IAClBsE,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdR,IAAI,EAAE,CAAC;IACPkB,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAEF,eAAe3E,uBAAuB","ignoreList":[]}
|
|
@@ -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","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;
|
|
1
|
+
{"version":3,"names":["barcode","QRCode","React","useMemo","StyleSheet","View","SvgXml","Typography","useAppColorScheme","styles","create","barcodeBackground","alignSelf","backgroundColor","borderRadius","borderWidth","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 borderWidth: 0,\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,UA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
|
|
1
|
-
{"version":3,"names":["React","useMemo","StyleSheet","View","concatTestID","SelectorIcon","useAppColorScheme","SelectorStatus","Selector","status","style","testID","colorScheme","statusStyle","Empty","styles","bordered","backgroundColor","white","borderColor","grayDark","SelectedRadio","selectedRadio","accent","SelectedCheckmark","Disabled","background","undefined","checked","Required","rejected","Rejected","createElement","wrapper","create","borderWidth","alignItems","borderRadius","height","justifyContent","width"],"sources":["selector.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../utils/testID';\nimport { SelectorIcon } from '../icons/selector';\nimport { useAppColorScheme } from '../theme';\nimport { SelectorStatus } from './selector-status';\n\ninterface SelectorProps {\n status: SelectorStatus;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n/**\n * Generic selector display\n *\n * Following the design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=433-28352&mode=design&t=91K8am4RSNRB8qgZ-0\n */\nconst Selector: FC<SelectorProps> = ({ status, style, testID }) => {\n const colorScheme = useAppColorScheme();\n\n const statusStyle = useMemo<StyleProp<ViewStyle>>(() => {\n switch (status) {\n case SelectorStatus.Empty:\n return [styles.bordered, { backgroundColor: colorScheme.white, borderColor: colorScheme.grayDark }];\n case SelectorStatus.SelectedRadio:\n return [styles.selectedRadio, { backgroundColor: colorScheme.white, borderColor: colorScheme.accent }];\n case SelectorStatus.SelectedCheckmark:\n return { backgroundColor: colorScheme.accent };\n case SelectorStatus.Disabled:\n return [styles.bordered, { backgroundColor: colorScheme.background, borderColor: colorScheme.grayDark }];\n default:\n return undefined;\n }\n }, [colorScheme, status]);\n\n const checked = status === SelectorStatus.SelectedCheckmark || status === SelectorStatus.Required;\n const rejected = status === SelectorStatus.Rejected;\n\n return (\n <View testID={testID} style={[styles.wrapper, statusStyle, style]}>\n {(checked || rejected) && <SelectorIcon testID={concatTestID(testID, 'status', status)} status={status} />}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n bordered: {\n borderWidth: 1,\n },\n selectedRadio: {\n borderWidth: 8,\n },\n wrapper: {\n alignItems: 'center',\n borderRadius: 12,\n height: 24,\n justifyContent: 'center',\n width: 24,\n },\n});\n\nexport default Selector;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAQC,OAAO,QAAQ,OAAO;AAC1C,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAErE,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,iBAAiB,QAAQ,UAAU;AAC5C,SAASC,cAAc,QAAQ,mBAAmB;AAQlD;AACA;AACA;AACA;AACA;AACA,MAAMC,QAA2B,GAAGA,CAAC;EAAEC,MAAM;EAAEC,KAAK;EAAEC;AAAO,CAAC,KAAK;EACjE,MAAMC,WAAW,GAAGN,iBAAiB,CAAC,CAAC;EAEvC,MAAMO,WAAW,GAAGZ,OAAO,CAAuB,MAAM;IACtD,QAAQQ,MAAM;MACZ,KAAKF,cAAc,CAACO,KAAK;QACvB,OAAO,CAACC,MAAM,CAACC,QAAQ,EAAE;UAAEC,eAAe,EAAEL,WAAW,CAACM,KAAK;UAAEC,WAAW,EAAEP,WAAW,CAACQ;QAAS,CAAC,CAAC;MACrG,KAAKb,cAAc,CAACc,aAAa;QAC/B,OAAO,CAACN,MAAM,CAACO,aAAa,EAAE;UAAEL,eAAe,EAAEL,WAAW,CAACM,KAAK;UAAEC,WAAW,EAAEP,WAAW,CAACW;QAAO,CAAC,CAAC;MACxG,KAAKhB,cAAc,CAACiB,iBAAiB;QACnC,OAAO;UAAEP,eAAe,EAAEL,WAAW,CAACW;QAAO,CAAC;MAChD,KAAKhB,cAAc,CAACkB,QAAQ;QAC1B,OAAO,CAACV,MAAM,CAACC,QAAQ,EAAE;UAAEC,eAAe,EAAEL,WAAW,CAACc,UAAU;UAAEP,WAAW,EAAEP,WAAW,CAACQ;QAAS,CAAC,CAAC;MAC1G;QACE,OAAOO,SAAS;IACpB;EACF,CAAC,EAAE,CAACf,WAAW,EAAEH,MAAM,CAAC,CAAC;EAEzB,MAAMmB,OAAO,GAAGnB,MAAM,KAAKF,cAAc,CAACiB,iBAAiB,IAAIf,MAAM,KAAKF,cAAc,CAACsB,QAAQ;EACjG,MAAMC,QAAQ,GAAGrB,MAAM,KAAKF,cAAc,CAACwB,QAAQ;EAEnD,oBACE/B,KAAA,CAAAgC,aAAA,CAAC7B,IAAI;IAACQ,MAAM,EAAEA,MAAO;IAACD,KAAK,EAAE,CAACK,MAAM,CAACkB,OAAO,EAAEpB,WAAW,EAAEH,KAAK;EAAE,GAC/D,CAACkB,OAAO,IAAIE,QAAQ,kBAAK9B,KAAA,CAAAgC,aAAA,CAAC3B,YAAY;IAACM,MAAM,EAAEP,YAAY,CAACO,MAAM,EAAE,QAAQ,EAAEF,MAAM,CAAE;IAACA,MAAM,EAAEA;EAAO,CAAE,CACrG,CAAC;AAEX,CAAC;AAED,MAAMM,MAAM,GAAGb,UAAU,CAACgC,MAAM,CAAC;EAC/BlB,QAAQ,EAAE;IACRmB,WAAW,EAAE;EACf,CAAC;EACDb,aAAa,EAAE;IACba,WAAW,EAAE;EACf,CAAC;EACDF,OAAO,EAAE;IACPG,UAAU,EAAE,QAAQ;IACpBC,YAAY,EAAE,EAAE;
|
|
1
|
+
{"version":3,"names":["React","useMemo","StyleSheet","View","concatTestID","SelectorIcon","useAppColorScheme","SelectorStatus","Selector","status","style","testID","colorScheme","statusStyle","Empty","styles","bordered","backgroundColor","white","borderColor","grayDark","SelectedRadio","selectedRadio","accent","SelectedCheckmark","Disabled","background","undefined","checked","Required","rejected","Rejected","createElement","wrapper","create","borderWidth","alignItems","borderRadius","height","justifyContent","width"],"sources":["selector.tsx"],"sourcesContent":["import React, { FC, useMemo } from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../utils/testID';\nimport { SelectorIcon } from '../icons/selector';\nimport { useAppColorScheme } from '../theme';\nimport { SelectorStatus } from './selector-status';\n\ninterface SelectorProps {\n status: SelectorStatus;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n}\n\n/**\n * Generic selector display\n *\n * Following the design: https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=433-28352&mode=design&t=91K8am4RSNRB8qgZ-0\n */\nconst Selector: FC<SelectorProps> = ({ status, style, testID }) => {\n const colorScheme = useAppColorScheme();\n\n const statusStyle = useMemo<StyleProp<ViewStyle>>(() => {\n switch (status) {\n case SelectorStatus.Empty:\n return [styles.bordered, { backgroundColor: colorScheme.white, borderColor: colorScheme.grayDark }];\n case SelectorStatus.SelectedRadio:\n return [styles.selectedRadio, { backgroundColor: colorScheme.white, borderColor: colorScheme.accent }];\n case SelectorStatus.SelectedCheckmark:\n return { backgroundColor: colorScheme.accent };\n case SelectorStatus.Disabled:\n return [styles.bordered, { backgroundColor: colorScheme.background, borderColor: colorScheme.grayDark }];\n default:\n return undefined;\n }\n }, [colorScheme, status]);\n\n const checked = status === SelectorStatus.SelectedCheckmark || status === SelectorStatus.Required;\n const rejected = status === SelectorStatus.Rejected;\n\n return (\n <View testID={testID} style={[styles.wrapper, statusStyle, style]}>\n {(checked || rejected) && <SelectorIcon testID={concatTestID(testID, 'status', status)} status={status} />}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n bordered: {\n borderWidth: 1,\n },\n selectedRadio: {\n borderWidth: 8,\n },\n wrapper: {\n alignItems: 'center',\n borderRadius: 12,\n borderWidth: 0,\n height: 24,\n justifyContent: 'center',\n width: 24,\n },\n});\n\nexport default Selector;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAQC,OAAO,QAAQ,OAAO;AAC1C,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAErE,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,iBAAiB,QAAQ,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EAAEpB,WAAW,EAAEH,KAAK;EAAE,GAC/D,CAACkB,OAAO,IAAIE,QAAQ,kBAAK9B,KAAA,CAAAgC,aAAA,CAAC3B,YAAY;IAACM,MAAM,EAAEP,YAAY,CAACO,MAAM,EAAE,QAAQ,EAAEF,MAAM,CAAE;IAACA,MAAM,EAAEA;EAAO,CAAE,CACrG,CAAC;AAEX,CAAC;AAED,MAAMM,MAAM,GAAGb,UAAU,CAACgC,MAAM,CAAC;EAC/BlB,QAAQ,EAAE;IACRmB,WAAW,EAAE;EACf,CAAC;EACDb,aAAa,EAAE;IACba,WAAW,EAAE;EACf,CAAC;EACDF,OAAO,EAAE;IACPG,UAAU,EAAE,QAAQ;IACpBC,YAAY,EAAE,EAAE;IAChBF,WAAW,EAAE,CAAC;IACdG,MAAM,EAAE,EAAE;IACVC,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAehC,QAAQ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","StyleSheet","View","concatTestID","ImageOrComponent","Typography","useAppColorScheme","Avatar","avatar","placeholderText","statusIcon","style","testID","viewProps","colorScheme","statusIconView","undefined","isValidElement","StatusIconComponent","createElement","imageSource","component","styles","avatarPlaceholder","backgroundColor","accent","color","accentText","avatarPlaceholderText","borderRadius","avatarStyle","flatten","_extends","accessibilityElementsHidden","imageWrapper","source","image","create","height","width","alignItems","flex","justifyContent","textTransform","overflow","bottom","position","right"],"sources":["avatar.tsx"],"sourcesContent":["import React, { ComponentType, FunctionComponent, ReactElement, useMemo } from 'react';\nimport { StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../utils';\nimport ImageOrComponent, { ImageOrComponentSource } from '../image/image-or-component';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type AvatarProps = ViewProps & {\n avatar?: ImageOrComponentSource;\n placeholderText?: string;\n statusIcon?: ComponentType<any> | ReactElement;\n testID?: string;\n};\n\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25581&mode=design&t=YI1oD2BfBie5HcvJ-0\nconst Avatar: FunctionComponent<AvatarProps> = ({\n avatar,\n placeholderText,\n statusIcon,\n style,\n testID,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n\n const statusIconView: React.ReactElement | undefined = useMemo(() => {\n if (!statusIcon) {\n return undefined;\n }\n if (React.isValidElement(statusIcon)) {\n return statusIcon;\n } else {\n const StatusIconComponent = statusIcon as React.ComponentType<any>;\n return <StatusIconComponent />;\n }\n }, [statusIcon]);\n\n const imageSource = useMemo<ImageOrComponentSource>(() => {\n if (avatar) {\n return avatar;\n }\n\n return {\n component: (\n <View style={[styles.avatarPlaceholder, { backgroundColor: colorScheme.accent }]}>\n <Typography color={colorScheme.accentText} style={styles.avatarPlaceholderText}>\n {placeholderText}\n </Typography>\n </View>\n ),\n };\n }, [colorScheme, avatar, placeholderText]);\n\n const { borderRadius, ...avatarStyle } = StyleSheet.flatten([styles.avatar, style]) as ViewStyle;\n return (\n <View accessibilityElementsHidden={true} style={avatarStyle} testID={testID} {...viewProps}>\n <View style={[styles.imageWrapper, borderRadius ? { borderRadius } : undefined]}>\n <ImageOrComponent source={imageSource} style={styles.image} testID={concatTestID(testID, 'logo')} />\n </View>\n {statusIconView && (\n <View style={styles.statusIcon} testID={concatTestID(testID, 'statusIcon')}>\n {statusIconView}\n </View>\n )}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n avatar: {\n height: 72,\n width: 72,\n },\n avatarPlaceholder: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n },\n avatarPlaceholderText: {\n textTransform: 'uppercase',\n },\n image: {\n height: '100%',\n width: '100%',\n },\n imageWrapper: {\n borderRadius: 36,\n height: '100%',\n overflow: 'hidden',\n width: '100%',\n },\n statusIcon: {\n bottom: 4,\n position: 'absolute',\n right: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AE,EAAE;
|
|
1
|
+
{"version":3,"names":["React","useMemo","StyleSheet","View","concatTestID","ImageOrComponent","Typography","useAppColorScheme","Avatar","avatar","placeholderText","statusIcon","style","testID","viewProps","colorScheme","statusIconView","undefined","isValidElement","StatusIconComponent","createElement","imageSource","component","styles","avatarPlaceholder","backgroundColor","accent","color","accentText","avatarPlaceholderText","borderRadius","avatarStyle","flatten","_extends","accessibilityElementsHidden","imageWrapper","source","image","create","height","width","alignItems","flex","justifyContent","textTransform","borderWidth","overflow","bottom","position","right"],"sources":["avatar.tsx"],"sourcesContent":["import React, { ComponentType, FunctionComponent, ReactElement, useMemo } from 'react';\nimport { StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../utils';\nimport ImageOrComponent, { ImageOrComponentSource } from '../image/image-or-component';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type AvatarProps = ViewProps & {\n avatar?: ImageOrComponentSource;\n placeholderText?: string;\n statusIcon?: ComponentType<any> | ReactElement;\n testID?: string;\n};\n\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=426-25581&mode=design&t=YI1oD2BfBie5HcvJ-0\nconst Avatar: FunctionComponent<AvatarProps> = ({\n avatar,\n placeholderText,\n statusIcon,\n style,\n testID,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n\n const statusIconView: React.ReactElement | undefined = useMemo(() => {\n if (!statusIcon) {\n return undefined;\n }\n if (React.isValidElement(statusIcon)) {\n return statusIcon;\n } else {\n const StatusIconComponent = statusIcon as React.ComponentType<any>;\n return <StatusIconComponent />;\n }\n }, [statusIcon]);\n\n const imageSource = useMemo<ImageOrComponentSource>(() => {\n if (avatar) {\n return avatar;\n }\n\n return {\n component: (\n <View style={[styles.avatarPlaceholder, { backgroundColor: colorScheme.accent }]}>\n <Typography color={colorScheme.accentText} style={styles.avatarPlaceholderText}>\n {placeholderText}\n </Typography>\n </View>\n ),\n };\n }, [colorScheme, avatar, placeholderText]);\n\n const { borderRadius, ...avatarStyle } = StyleSheet.flatten([styles.avatar, style]) as ViewStyle;\n return (\n <View accessibilityElementsHidden={true} style={avatarStyle} testID={testID} {...viewProps}>\n <View style={[styles.imageWrapper, borderRadius ? { borderRadius } : undefined]}>\n <ImageOrComponent source={imageSource} style={styles.image} testID={concatTestID(testID, 'logo')} />\n </View>\n {statusIconView && (\n <View style={styles.statusIcon} testID={concatTestID(testID, 'statusIcon')}>\n {statusIconView}\n </View>\n )}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n avatar: {\n height: 72,\n width: 72,\n },\n avatarPlaceholder: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n },\n avatarPlaceholderText: {\n textTransform: 'uppercase',\n },\n image: {\n height: '100%',\n width: '100%',\n },\n imageWrapper: {\n borderRadius: 36,\n borderWidth: 0,\n height: '100%',\n overflow: 'hidden',\n width: '100%',\n },\n statusIcon: {\n bottom: 4,\n position: 'absolute',\n right: 4,\n },\n});\n\nexport default Avatar;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAoDC,OAAO,QAAQ,OAAO;AACtF,SAASC,UAAU,EAAEC,IAAI,QAA8B,cAAc;AAErE,SAASC,YAAY,QAAQ,aAAa;AAC1C,OAAOC,gBAAgB,MAAkC,6BAA6B;AACtF,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AASjE;AACA,MAAMC,MAAsC,GAAGA,CAAC;EAC9CC,MAAM;EACNC,eAAe;EACfC,UAAU;EACVC,KAAK;EACLC,MAAM;EACN,GAAGC;AACL,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGR,iBAAiB,CAAC,CAAC;EAEvC,MAAMS,cAA8C,GAAGf,OAAO,CAAC,MAAM;IACnE,IAAI,CAACU,UAAU,EAAE;MACf,OAAOM,SAAS;IAClB;IACA,iBAAIjB,KAAK,CAACkB,cAAc,CAACP,UAAU,C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AAM,EAAET,YAAY,CAACS,MAAM,EAAE,MAAM;EAAE,CAAE,CAC/F,CAAC,EACNG,cAAc,iBACbhB,KAAA,CAAAoB,aAAA,CAACjB,IAAI;IAACS,KAAK,EAAEW,MAAM,CAACZ,UAAW;IAACE,MAAM,EAAET,YAAY,CAACS,MAAM,EAAE,YAAY;EAAE,GACxEG,cACG,CAEJ,CAAC;AAEX,CAAC;AAED,MAAMO,MAAM,GAAGrB,UAAU,CAACoC,MAAM,CAAC;EAC/B7B,MAAM,EAAE;IACN8B,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE;EACT,CAAC;EACDhB,iBAAiB,EAAE;IACjBiB,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE;EAClB,CAAC;EACDd,qBAAqB,EAAE;IACrBe,aAAa,EAAE;EACjB,CAAC;EACDP,KAAK,EAAE;IACLE,MAAM,EAAE,MAAM;IACdC,KAAK,EAAE;EACT,CAAC;EACDL,YAAY,EAAE;IACZL,YAAY,EAAE,EAAE;IAChBe,WAAW,EAAE,CAAC;IACdN,MAAM,EAAE,MAAM;IACdO,QAAQ,EAAE,QAAQ;IAClBN,KAAK,EAAE;EACT,CAAC;EACD7B,UAAU,EAAE;IACVoC,MAAM,EAAE,CAAC;IACTC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAezC,MAAM","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useMemo","useState","Animated","Easing","StyleSheet","View","concatTestID","BlurView","Typography","useAppColorScheme","NavigationHeader","animate","backgroundColor","blurred","leftItem","modalHandleVisible","rightItem","style","testID","title","titleVisible","titleColor","props","colorScheme","titleOpacity","Value","sideItemWidth","setSideItemWidth","onSideItemLayout","nativeEvent","layout","prev","Math","max","width","background","leftItemView","undefined","isValidElement","LeftItemComponent","createElement","timing","duration","easing","ease","toValue","useNativeDriver","start","setValue","rightItemView","RightItemComponent","titleAnimatedStyle","opacity","_extends","styles","headerContainer","blurAmount","blurStyle","color","absoluteFill","modalHandle","grayDark","header","onLayout","sideItem","minWidth","text","preset","align","numberOfLines","rightSideItem","create","alignItems","flexDirection","height","paddingHorizontal","borderRadius","marginVertical","padding","flex"],"sources":["navigation-header.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Animated, ColorValue, Easing, LayoutChangeEvent, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../utils';\nimport BlurView from '../blur/blur-view';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type NavigationHeaderProps = ViewProps & {\n animate?: boolean;\n backgroundColor?: ColorValue;\n blurred?: boolean;\n leftItem?: React.ComponentType<any> | React.ReactElement;\n modalHandleVisible?: boolean;\n rightItem?: React.ComponentType<any> | React.ReactElement;\n title?: string;\n titleColor?: string;\n titleVisible?: boolean;\n};\n\nconst NavigationHeader: FC<NavigationHeaderProps> = ({\n animate = false,\n backgroundColor,\n blurred = false,\n leftItem,\n modalHandleVisible,\n rightItem,\n style,\n testID,\n title,\n titleVisible = true,\n titleColor,\n ...props\n}) => {\n const colorScheme = useAppColorScheme();\n const [titleOpacity] = useState(() => new Animated.Value(titleVisible ? 1 : 0));\n\n const [sideItemWidth, setSideItemWidth] = useState<number>();\n const onSideItemLayout = useCallback(\n ({ nativeEvent: { layout } }: LayoutChangeEvent) => setSideItemWidth((prev) => Math.max(layout.width, prev ?? 0)),\n [],\n );\n\n backgroundColor = backgroundColor ?? colorScheme.background;\n\n const leftItemView: React.ReactElement | undefined = useMemo(() => {\n if (!leftItem) {\n return undefined;\n }\n if (React.isValidElement(leftItem)) {\n return leftItem;\n } else {\n const LeftItemComponent = leftItem as React.ComponentType<any>;\n return <LeftItemComponent />;\n }\n }, [leftItem]);\n\n useEffect(() => {\n if (animate) {\n Animated.timing(titleOpacity, {\n duration: 150,\n easing: Easing.ease,\n toValue: titleVisible ? 1 : 0,\n useNativeDriver: true,\n }).start();\n } else {\n titleOpacity.setValue(titleVisible ? 1 : 0);\n }\n }, [animate, titleOpacity, titleVisible]);\n\n const rightItemView: React.ReactElement | undefined = useMemo(() => {\n if (!rightItem) {\n return undefined;\n }\n if (React.isValidElement(rightItem)) {\n return rightItem;\n } else {\n const RightItemComponent = rightItem as React.ComponentType<any>;\n return <RightItemComponent />;\n }\n }, [rightItem]);\n\n const titleAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> = {\n opacity: titleOpacity,\n };\n\n return (\n <View\n {...props}\n style={[styles.headerContainer, !blurred ? { backgroundColor } : undefined, style]}\n testID={testID}>\n {blurred && (\n <BlurView blurAmount={10} blurStyle=\"header\" color={backgroundColor} style={StyleSheet.absoluteFill} />\n )}\n {modalHandleVisible && <View style={[styles.modalHandle, { backgroundColor: colorScheme.grayDark }]} />}\n <View style={styles.header}>\n <View onLayout={onSideItemLayout} style={[styles.sideItem, { minWidth: sideItemWidth }]}>\n {leftItemView}\n </View>\n <Animated.View style={[styles.title, titleAnimatedStyle]}>\n <Typography\n color={titleColor ?? colorScheme.text}\n preset=\"m/heading\"\n align=\"center\"\n numberOfLines={1}\n testID={concatTestID(testID, 'title')}>\n {title}\n </Typography>\n </Animated.View>\n <View onLayout={onSideItemLayout} style={[styles.sideItem, styles.rightSideItem, { minWidth: sideItemWidth }]}>\n {rightItemView}\n </View>\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n header: {\n alignItems: 'center',\n flexDirection: 'row',\n height: 48,\n width: '100%',\n },\n headerContainer: {\n alignItems: 'center',\n flexDirection: 'column',\n paddingHorizontal: 8,\n },\n modalHandle: {\n borderRadius: 2.5,\n height: 5,\n marginVertical: 5,\n width: 36,\n },\n rightSideItem: {\n alignItems: 'flex-end',\n },\n sideItem: {\n padding: 12,\n },\n title: {\n flex: 1,\n },\n});\n\nexport default NavigationHeader;\n"],"mappings":";AAAA,OAAO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,QAAQ,EAAEV,MAAM,CAACgB,aAAa,EAAE;MAAEL,QAAQ,EAAEvC;IAAc,CAAC;EAAE,GAC3GuB,aACG,CACF,CACF,CAAC;AAEX,CAAC;AAED,MAAMK,MAAM,GAAGlD,UAAU,CAACmE,MAAM,CAAC;EAC/BT,MAAM,EAAE;IACNU,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBC,MAAM,EAAE,EAAE;IACVxC,KAAK,EAAE;EACT,CAAC;EACDqB,eAAe,EAAE;IACfiB,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,QAAQ;IACvBE,iBAAiB,EAAE;EACrB,CAAC;EACDf,WAAW,EAAE;IACXgB,YAAY,EAAE,GAAG;
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useMemo","useState","Animated","Easing","StyleSheet","View","concatTestID","BlurView","Typography","useAppColorScheme","NavigationHeader","animate","backgroundColor","blurred","leftItem","modalHandleVisible","rightItem","style","testID","title","titleVisible","titleColor","props","colorScheme","titleOpacity","Value","sideItemWidth","setSideItemWidth","onSideItemLayout","nativeEvent","layout","prev","Math","max","width","background","leftItemView","undefined","isValidElement","LeftItemComponent","createElement","timing","duration","easing","ease","toValue","useNativeDriver","start","setValue","rightItemView","RightItemComponent","titleAnimatedStyle","opacity","_extends","styles","headerContainer","blurAmount","blurStyle","color","absoluteFill","modalHandle","grayDark","header","onLayout","sideItem","minWidth","text","preset","align","numberOfLines","rightSideItem","create","alignItems","flexDirection","height","paddingHorizontal","borderRadius","borderWidth","marginVertical","padding","flex"],"sources":["navigation-header.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Animated, ColorValue, Easing, LayoutChangeEvent, StyleSheet, View, ViewProps, ViewStyle } from 'react-native';\n\nimport { concatTestID } from '../../utils';\nimport BlurView from '../blur/blur-view';\nimport Typography from '../text/typography';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\nexport type NavigationHeaderProps = ViewProps & {\n animate?: boolean;\n backgroundColor?: ColorValue;\n blurred?: boolean;\n leftItem?: React.ComponentType<any> | React.ReactElement;\n modalHandleVisible?: boolean;\n rightItem?: React.ComponentType<any> | React.ReactElement;\n title?: string;\n titleColor?: string;\n titleVisible?: boolean;\n};\n\nconst NavigationHeader: FC<NavigationHeaderProps> = ({\n animate = false,\n backgroundColor,\n blurred = false,\n leftItem,\n modalHandleVisible,\n rightItem,\n style,\n testID,\n title,\n titleVisible = true,\n titleColor,\n ...props\n}) => {\n const colorScheme = useAppColorScheme();\n const [titleOpacity] = useState(() => new Animated.Value(titleVisible ? 1 : 0));\n\n const [sideItemWidth, setSideItemWidth] = useState<number>();\n const onSideItemLayout = useCallback(\n ({ nativeEvent: { layout } }: LayoutChangeEvent) => setSideItemWidth((prev) => Math.max(layout.width, prev ?? 0)),\n [],\n );\n\n backgroundColor = backgroundColor ?? colorScheme.background;\n\n const leftItemView: React.ReactElement | undefined = useMemo(() => {\n if (!leftItem) {\n return undefined;\n }\n if (React.isValidElement(leftItem)) {\n return leftItem;\n } else {\n const LeftItemComponent = leftItem as React.ComponentType<any>;\n return <LeftItemComponent />;\n }\n }, [leftItem]);\n\n useEffect(() => {\n if (animate) {\n Animated.timing(titleOpacity, {\n duration: 150,\n easing: Easing.ease,\n toValue: titleVisible ? 1 : 0,\n useNativeDriver: true,\n }).start();\n } else {\n titleOpacity.setValue(titleVisible ? 1 : 0);\n }\n }, [animate, titleOpacity, titleVisible]);\n\n const rightItemView: React.ReactElement | undefined = useMemo(() => {\n if (!rightItem) {\n return undefined;\n }\n if (React.isValidElement(rightItem)) {\n return rightItem;\n } else {\n const RightItemComponent = rightItem as React.ComponentType<any>;\n return <RightItemComponent />;\n }\n }, [rightItem]);\n\n const titleAnimatedStyle: Animated.WithAnimatedObject<ViewStyle> = {\n opacity: titleOpacity,\n };\n\n return (\n <View\n {...props}\n style={[styles.headerContainer, !blurred ? { backgroundColor } : undefined, style]}\n testID={testID}>\n {blurred && (\n <BlurView blurAmount={10} blurStyle=\"header\" color={backgroundColor} style={StyleSheet.absoluteFill} />\n )}\n {modalHandleVisible && <View style={[styles.modalHandle, { backgroundColor: colorScheme.grayDark }]} />}\n <View style={styles.header}>\n <View onLayout={onSideItemLayout} style={[styles.sideItem, { minWidth: sideItemWidth }]}>\n {leftItemView}\n </View>\n <Animated.View style={[styles.title, titleAnimatedStyle]}>\n <Typography\n color={titleColor ?? colorScheme.text}\n preset=\"m/heading\"\n align=\"center\"\n numberOfLines={1}\n testID={concatTestID(testID, 'title')}>\n {title}\n </Typography>\n </Animated.View>\n <View onLayout={onSideItemLayout} style={[styles.sideItem, styles.rightSideItem, { minWidth: sideItemWidth }]}>\n {rightItemView}\n </View>\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n header: {\n alignItems: 'center',\n flexDirection: 'row',\n height: 48,\n width: '100%',\n },\n headerContainer: {\n alignItems: 'center',\n flexDirection: 'column',\n paddingHorizontal: 8,\n },\n modalHandle: {\n borderRadius: 2.5,\n borderWidth: 0,\n height: 5,\n marginVertical: 5,\n width: 36,\n },\n rightSideItem: {\n alignItems: 'flex-end',\n },\n sideItem: {\n padding: 12,\n },\n title: {\n flex: 1,\n },\n});\n\nexport default NavigationHeader;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAQC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC5E,SAASC,QAAQ,EAAcC,MAAM,EAAqBC,UAAU,EAAEC,IAAI,QAA8B,cAAc;AAEtH,SAASC,YAAY,QAAQ,aAAa;AAC1C,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,OAAOC,UAAU,MAAM,oBAAoB;AAC3C,SAASC,iBAAiB,QAAQ,+BAA+B;AAcjE,MAAMC,gBAA2C,GAAGA,CAAC;EACnDC,OAAO,GAAG,KAAK;EACfC,eAAe;EACfC,OAAO,GAAG,KAAK;EACfC,QAAQ;EACRC,kBAAkB;EAClBC,SAAS;EACTC,KAAK;EACL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,GAAG;IACjBC,WAAW,EAAE,CAAC;IACdH,MAAM,EAAE,CAAC;IACTI,cAAc,EAAE,CAAC;IACjB5C,KAAK,EAAE;EACT,CAAC;EACDoC,aAAa,EAAE;IACbE,UAAU,EAAE;EACd,CAAC;EACDR,QAAQ,EAAE;IACRe,OAAO,EAAE;EACX,CAAC;EACD5D,KAAK,EAAE;IACL6D,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAEF,eAAetE,gBAAgB","ignoreList":[]}
|
|
@@ -141,7 +141,8 @@ export const HistoryDetailsView = ({
|
|
|
141
141
|
};
|
|
142
142
|
const styles = StyleSheet.create({
|
|
143
143
|
assetsHeader: {
|
|
144
|
-
borderRadius: 8
|
|
144
|
+
borderRadius: 8,
|
|
145
|
+
borderWidth: 0
|
|
145
146
|
},
|
|
146
147
|
content: {
|
|
147
148
|
paddingHorizontal: 16,
|
|
@@ -162,6 +163,7 @@ const styles = StyleSheet.create({
|
|
|
162
163
|
},
|
|
163
164
|
section: {
|
|
164
165
|
borderRadius: 8,
|
|
166
|
+
borderWidth: 0,
|
|
165
167
|
marginBottom: 12,
|
|
166
168
|
padding: 12
|
|
167
169
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useMemo","Dimensions","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","cardWidth","get","width","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, Dimensions, 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 const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);\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 width: cardWidth,\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,SAAqBC,UAAU,EAAuBC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE5F,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;AAgElC,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;EACnG,MAAMyB,SAAS,GAAGjC,OAAO,CAAC,MAAMC,UAAU,CAACiC,GAAG,CAAC,QAAQ,CAAC,CAACC,KAAK,GAAG,EAAE,EAAE,EAAE,CAAC;;EAExE;EACApC,SAAS,CAAC,MAAM;IACd,IAAIoB,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEiB,KAAK,IAAI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E9D,kBAAkB,KAAK0D,KAAK,CAAC/C,cAAc,CAACC,IAAI,CAACF,YAAa;QACxEqD,QAAQ,EAAEJ,KAAK,KAAKpD,MAAM,GAAG,CAAE;QAC/BZ,cAAc,EAAEA;MAAe,EAChC,CACG,CAAC;IAEX;EACF,CAAC,CACe,CAAC;AAEvB,CAAC;AAED,MAAMiC,MAAM,GAAGxD,UAAU,CAAC+F,MAAM,CAAC;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
|
+
{"version":3,"names":["React","useEffect","useMemo","Dimensions","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","cardWidth","get","width","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","borderWidth","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, Dimensions, 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 const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);\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 width: cardWidth,\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 borderWidth: 0,\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 borderWidth: 0,\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,SAAqBC,UAAU,EAAuBC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE5F,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;AAgElC,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;EACnG,MAAMyB,SAAS,GAAGjC,OAAO,CAAC,MAAMC,UAAU,CAACiC,GAAG,CAAC,QAAQ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