@procivis/one-react-native-components 0.3.130 → 0.3.142
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 +3 -0
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
- package/lib/commonjs/components/history/history-list-item.js +3 -4
- package/lib/commonjs/components/history/history-list-item.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +3 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/commonjs/ui-components/buttons/scan-button.js +122 -27
- package/lib/commonjs/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js +37 -18
- package/lib/commonjs/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js +13 -4
- package/lib/commonjs/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js +2 -2
- package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/history/index.js +0 -8
- package/lib/commonjs/ui-components/history/index.js.map +1 -1
- package/lib/commonjs/ui-components/icons/icons.js +36 -2
- package/lib/commonjs/ui-components/icons/icons.js.map +1 -1
- package/lib/commonjs/ui-components/list/index.js +8 -0
- package/lib/commonjs/ui-components/list/index.js.map +1 -1
- package/lib/commonjs/ui-components/{history/history-item.js → list/list-item.js} +32 -22
- package/lib/commonjs/ui-components/list/list-item.js.map +1 -0
- package/lib/commonjs/ui-components/list/wallet/empty-list.js +2 -1
- package/lib/commonjs/ui-components/list/wallet/empty-list.js.map +1 -1
- package/lib/commonjs/ui-components/notice/wallet-notice.js +4 -2
- package/lib/commonjs/ui-components/notice/wallet-notice.js.map +1 -1
- package/lib/commonjs/ui-components/text/expandableTypography.js +64 -0
- package/lib/commonjs/ui-components/text/expandableTypography.js.map +1 -0
- package/lib/commonjs/ui-components/text/index.js +15 -0
- package/lib/commonjs/ui-components/text/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credential-schemas.js +24 -1
- package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/wallet-unit.js +20 -1
- package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js +8 -7
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing.js +17 -11
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js +12 -4
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/commonjs/utils/parsers/query.js +1 -1
- package/lib/commonjs/utils/parsers/query.js.map +1 -1
- package/lib/module/components/history/history-list-item-icon.js +3 -0
- package/lib/module/components/history/history-list-item-icon.js.map +1 -1
- package/lib/module/components/history/history-list-item.js +4 -5
- package/lib/module/components/history/history-list-item.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2.js +3 -1
- package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/module/ui-components/buttons/scan-button.js +124 -29
- package/lib/module/ui-components/buttons/scan-button.js.map +1 -1
- package/lib/module/ui-components/credential/card/credential-details-card.js +37 -18
- package/lib/module/ui-components/credential/card/credential-details-card.js.map +1 -1
- package/lib/module/ui-components/credential/credential-attribute-item.js +13 -4
- package/lib/module/ui-components/credential/credential-attribute-item.js.map +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js +2 -2
- package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/module/ui-components/history/index.js +0 -2
- package/lib/module/ui-components/history/index.js.map +1 -1
- package/lib/module/ui-components/icons/icons.js +32 -0
- package/lib/module/ui-components/icons/icons.js.map +1 -1
- package/lib/module/ui-components/list/index.js +2 -0
- package/lib/module/ui-components/list/index.js.map +1 -1
- package/lib/module/ui-components/{history/history-item.js → list/list-item.js} +32 -22
- package/lib/module/ui-components/list/list-item.js.map +1 -0
- package/lib/module/ui-components/list/wallet/empty-list.js +2 -1
- package/lib/module/ui-components/list/wallet/empty-list.js.map +1 -1
- package/lib/module/ui-components/notice/wallet-notice.js +4 -2
- package/lib/module/ui-components/notice/wallet-notice.js.map +1 -1
- package/lib/module/ui-components/text/expandableTypography.js +55 -0
- package/lib/module/ui-components/text/expandableTypography.js.map +1 -0
- package/lib/module/ui-components/text/index.js +2 -1
- package/lib/module/ui-components/text/index.js.map +1 -1
- package/lib/module/utils/hooks/core/credential-schemas.js +24 -1
- package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/wallet-unit.js +18 -0
- package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing-v2.js +8 -7
- package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing.js +18 -12
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js +10 -4
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/module/utils/parsers/query.js +1 -1
- package/lib/module/utils/parsers/query.js.map +1 -1
- package/lib/typescript/ui-components/buttons/scan-button.d.ts +9 -3
- package/lib/typescript/ui-components/credential/card/credential-details-card.d.ts +3 -0
- package/lib/typescript/ui-components/credential/credential-attribute-item.d.ts +3 -0
- package/lib/typescript/ui-components/history/history-section-list-item.d.ts +2 -2
- package/lib/typescript/ui-components/history/index.d.ts +0 -3
- package/lib/typescript/ui-components/icons/icons.d.ts +2 -0
- package/lib/typescript/ui-components/list/index.d.ts +3 -0
- package/lib/typescript/ui-components/{history/history-item.d.ts → list/list-item.d.ts} +4 -4
- package/lib/typescript/ui-components/list/wallet/empty-list.d.ts +2 -2
- package/lib/typescript/ui-components/text/expandableTypography.d.ts +10 -0
- package/lib/typescript/ui-components/text/index.d.ts +2 -1
- package/lib/typescript/ui-components/text/typography.d.ts +14 -14
- package/lib/typescript/utils/hooks/app-state.d.ts +1 -1
- package/lib/typescript/utils/hooks/core/credentials.d.ts +1 -1
- package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +5 -1
- package/lib/typescript/utils/parsers/credential-sharing.d.ts +4 -3
- package/lib/typescript/utils/parsers/credential.d.ts +2 -1
- package/lib/typescript/utils/parsers/query.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/history/history-list-item-icon.tsx +3 -0
- package/src/components/history/history-list-item.tsx +3 -3
- package/src/components/proof-request/v2/share-credential-v2.tsx +2 -0
- package/src/ui-components/buttons/scan-button.tsx +130 -38
- package/src/ui-components/credential/card/credential-details-card.tsx +46 -19
- package/src/ui-components/credential/credential-attribute-item.tsx +15 -3
- package/src/ui-components/history/history-section-list-item.tsx +3 -3
- package/src/ui-components/history/index.ts +0 -3
- package/src/ui-components/icons/icons.tsx +24 -0
- package/src/ui-components/list/index.ts +3 -0
- package/src/ui-components/{history/history-item.tsx → list/list-item.tsx} +36 -33
- package/src/ui-components/list/wallet/empty-list.tsx +11 -8
- package/src/ui-components/notice/wallet-notice.tsx +4 -2
- package/src/ui-components/text/expandableTypography.tsx +71 -0
- package/src/ui-components/text/index.ts +2 -1
- package/src/utils/hooks/core/credential-schemas.ts +23 -1
- package/src/utils/hooks/core/wallet-unit.ts +21 -0
- package/src/utils/parsers/credential-sharing-v2.tsx +5 -6
- package/src/utils/parsers/credential-sharing.tsx +20 -9
- package/src/utils/parsers/credential.ts +14 -3
- package/src/utils/parsers/query.ts +2 -0
- package/lib/commonjs/ui-components/history/history-item.js.map +0 -1
- package/lib/module/ui-components/history/history-item.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_testID","_buttons","_credential","_colorSchemeContext","_credentialAttributeItem","_interopRequireDefault","_credentialCard","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","PREVIEW_ATTRIBUTES_COUNT","SEE_ALL_BUTTON_HEIGHT","CredentialDetailsCard","animate","attributes","card","expanded","footer","onImagePreview","onAttributeSelected","style","showAllButtonLabel","testID","viewProps","_header$accessory","colorScheme","useAppColorScheme","previewAttributesHeight","setPreviewAttributesHeight","useState","fullAttributesHeight","setFullAttributesHeight","allAttributesRendered","setAllAttributesRendered","CaretIcon","UpIcon","DownIcon","cardHeight","Math","ceil","width","CredentialCardRatio","currentHeight","useSharedValue","undefined","animatedHeightSet","setAnimatedHeightSet","previewAttributes","slice","extraAttributes","useMemo","useEffect","viewStyle","StyleSheet","flatten","styles","allAttributesWrapper","allAttributesWrapperWithFooter","padding","paddingBottom","buttonViewHeight","additionalAttributesHeight","additionalHeight","fullHeight","value","newHeight","duration","withTiming","animatedStyle","useAnimatedStyle","height","onPreviewAttrContentLayout","useCallback","event","nativeEvent","layout","onFullAttrContentLayout","footerView","React","isValidElement","FooterComponent","createElement","header","cardProps","renderExtraAttributes","ContainerComponent","Animated","View","detailsCard","backgroundColor","white","concatTestID","accessory","onHeaderPress","attributesWrapper","onLayout","previewAttributesWrapper","map","attribute","idx","key","id","last","toString","onPress","buttonWrapper","Button","type","ButtonType","Secondary","title","index","create","paddingHorizontal","paddingTop","borderRadius","borderWidth","overflow","marginTop","_default","exports"],"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, CredentialCardRatio } 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;\nconst SEE_ALL_BUTTON_HEIGHT = 78;\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\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 cardHeight = Math.ceil(card.width / CredentialCardRatio);\n const currentHeight = useSharedValue<number | undefined>(undefined);\n const [animatedHeightSet, setAnimatedHeightSet] = useState(false);\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.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) {\n return;\n }\n if (allAttributesRendered && fullAttributesHeight === undefined) {\n return;\n }\n\n const buttonViewHeight = !extraAttributes || allAttributesRendered ? 0 : SEE_ALL_BUTTON_HEIGHT;\n const additionalAttributesHeight = fullAttributesHeight ?? 0;\n const additionalHeight = allAttributesRendered ? additionalAttributesHeight : buttonViewHeight;\n const fullHeight = previewAttributesHeight + additionalHeight;\n\n setAnimatedHeightSet(true);\n if (!animate) {\n currentHeight.value = fullHeight;\n return;\n }\n\n const newHeight = expanded ? fullHeight : 0;\n\n if (currentHeight.value === undefined || !animate) {\n currentHeight.value = newHeight;\n return;\n }\n\n const duration = fullHeight / 5;\n currentHeight.value = withTiming(newHeight, {\n duration,\n });\n }, [\n allAttributesRendered,\n currentHeight,\n animate,\n expanded,\n extraAttributes,\n fullAttributesHeight,\n previewAttributes.length,\n previewAttributesHeight,\n ]);\n\n const animatedStyle = useAnimatedStyle(() => {\n if (currentHeight.value === undefined) {\n if (expanded) {\n return {};\n }\n return {\n height: cardHeight,\n };\n }\n return {\n height: cardHeight + 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 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 = allAttributesRendered || (previewAttributesHeight !== undefined && animatedHeightSet);\n\n const ContainerComponent = animate ? Animated.View : View;\n return (\n <ContainerComponent\n style={[styles.detailsCard, { backgroundColor: colorScheme.white }, animate ? animatedStyle : undefined, 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 <View>\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.buttonWrapper}>\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 </View>\n )}\n {footerView ? <View style={styles.footer}>{footerView}</View> : null}\n </ContainerComponent>\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 attributesWrapper: {\n paddingTop: 7,\n width: '100%',\n },\n buttonWrapper: {\n height: SEE_ALL_BUTTON_HEIGHT,\n paddingBottom: 12,\n paddingHorizontal: 4,\n width: '100%',\n },\n card: {\n borderRadius: 0,\n borderWidth: 0,\n },\n detailsCard: {\n borderRadius: 10,\n borderWidth: 0,\n overflow: 'hidden',\n },\n footer: {\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EyF,KAAK,CAACR,QAAQ,CAAC,CAAC,CAAE;IAC5DrF,cAAc,EAAEA,cAAe;IAC/BsF,OAAO,EAAErF;EAAoB,GACzB+E,SAAS,CACd,CACF,CACG,CAEJ,CACF,CACP,EACArB,UAAU,gBAAGzG,MAAA,CAAAc,OAAA,CAAA+F,aAAA,CAAC1G,YAAA,CAAAgH,IAAI;IAACnE,KAAK,EAAEmC,MAAM,CAACtC;EAAO,GAAE4D,UAAiB,CAAC,GAAG,IAC9C,CAAC;AAEzB,CAAC;AAED,MAAMtB,MAAM,GAAGF,uBAAU,CAAC2D,MAAM,CAAC;EAC/BxD,oBAAoB,EAAE;IACpBG,aAAa,EAAE,EAAE;IACjBsD,iBAAiB,EAAE,CAAC;IACpBzE,KAAK,EAAE;EACT,CAAC;EACDiB,8BAA8B,EAAE;IAC9BE,aAAa,EAAE;EACjB,CAAC;EACDmC,iBAAiB,EAAE;IACjBoB,UAAU,EAAE,CAAC;IACb1E,KAAK,EAAE;EACT,CAAC;EACDiE,aAAa,EAAE;IACbnC,MAAM,EAAE3D,qBAAqB;IAC7BgD,aAAa,EAAE,EAAE;IACjBsD,iBAAiB,EAAE,CAAC;IACpBzE,KAAK,EAAE;EACT,CAAC;EACDzB,IAAI,EAAE;IACJoG,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE;EACf,CAAC;EACD5B,WAAW,EAAE;IACX2B,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE,CAAC;IACdC,QAAQ,EAAE;EACZ,CAAC;EACDpG,MAAM,EAAE;IACNqG,SAAS,EAAE;EACb,CAAC;EACDtB,wBAAwB,EAAE;IACxBiB,iBAAiB,EAAE,CAAC;IACpBzE,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAAC,IAAA+E,QAAA,GAAAC,OAAA,CAAAtI,OAAA,GAEY0B,qBAAqB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_testID","_buttons","_credential","_colorSchemeContext","_credentialAttributeItem","_interopRequireDefault","_credentialCard","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","PREVIEW_ATTRIBUTES_COUNT","SEE_ALL_BUTTON_HEIGHT","CredentialDetailsCard","animate","attributes","card","expanded","footer","onImagePreview","onAttributeSelected","style","showAllButtonLabel","showLessButtonLabel","moreLabel","lessLabel","testID","viewProps","_header$accessory","colorScheme","useAppColorScheme","previewAttributesHeight","setPreviewAttributesHeight","useState","fullAttributesHeight","setFullAttributesHeight","allAttributesRendered","setAllAttributesRendered","CaretIcon","UpIcon","DownIcon","cardHeight","Math","ceil","width","CredentialCardRatio","currentHeight","useSharedValue","undefined","animatedHeightSet","setAnimatedHeightSet","previewAttributes","slice","extraAttributes","useMemo","showSeeAllButton","isExpanded","useEffect","viewStyle","StyleSheet","flatten","styles","allAttributesWrapper","allAttributesWrapperWithFooter","padding","paddingBottom","buttonViewHeight","additionalAttributesHeight","additionalHeight","fullHeight","value","newHeight","duration","withTiming","animatedStyle","useAnimatedStyle","height","onPreviewAttrContentLayout","useCallback","event","nativeEvent","layout","onFullAttrContentLayout","footerView","React","isValidElement","FooterComponent","createElement","header","cardProps","renderExtraAttributes","ContainerComponent","Animated","View","detailsCard","backgroundColor","white","concatTestID","accessory","onHeaderPress","attributesWrapper","onLayout","previewAttributesWrapper","map","attribute","idx","key","id","last","toString","onPress","allAttributesWrapperWithButton","hidden","index","buttonWrapper","Button","prev","type","ButtonType","Secondary","title","create","paddingHorizontal","paddingTop","justifyContent","borderRadius","borderWidth","overflow","marginTop","display","_default","exports"],"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, CredentialCardRatio } 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 showLessButtonLabel?: string;\n moreLabel?: string;\n lessLabel?: string;\n};\n\nconst PREVIEW_ATTRIBUTES_COUNT = 3;\nconst SEE_ALL_BUTTON_HEIGHT = 78;\n\nconst CredentialDetailsCard: FC<CredentialDetailsCardProps> = ({\n animate = true,\n attributes,\n card,\n expanded,\n footer,\n onImagePreview,\n onAttributeSelected,\n style,\n showAllButtonLabel = 'Show all',\n showLessButtonLabel = 'Show less',\n moreLabel = 'More',\n lessLabel = 'Less',\n testID,\n ...viewProps\n}) => {\n const colorScheme = useAppColorScheme();\n const [previewAttributesHeight, setPreviewAttributesHeight] = useState<number>();\n const [fullAttributesHeight, setFullAttributesHeight] = useState<number>();\n\n const [allAttributesRendered, setAllAttributesRendered] = useState<boolean>(\n (attributes && attributes.length <= PREVIEW_ATTRIBUTES_COUNT) || !showAllButtonLabel,\n );\n const CaretIcon = expanded ? UpIcon : DownIcon;\n const cardHeight = Math.ceil(card.width / CredentialCardRatio);\n const currentHeight = useSharedValue<number | undefined>(undefined);\n const [animatedHeightSet, setAnimatedHeightSet] = useState(false);\n const previewAttributes = attributes ? attributes.slice(0, PREVIEW_ATTRIBUTES_COUNT) : [];\n const extraAttributes = useMemo(() => (attributes ? attributes.slice(PREVIEW_ATTRIBUTES_COUNT) : []), [attributes]);\n const showSeeAllButton = extraAttributes.length > 0;\n const isExpanded = 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) {\n return;\n }\n if (allAttributesRendered && fullAttributesHeight === undefined) {\n return;\n }\n\n const buttonViewHeight = showSeeAllButton ? SEE_ALL_BUTTON_HEIGHT : 0;\n const additionalAttributesHeight = fullAttributesHeight ?? 0;\n const additionalHeight = allAttributesRendered ? additionalAttributesHeight + buttonViewHeight : buttonViewHeight;\n const fullHeight = previewAttributesHeight + additionalHeight;\n\n setAnimatedHeightSet(true);\n if (!animate) {\n currentHeight.value = fullHeight;\n return;\n }\n\n const newHeight = expanded ? fullHeight : 0;\n\n if (currentHeight.value === undefined || !animate) {\n currentHeight.value = newHeight;\n return;\n }\n\n const duration = fullHeight / 5;\n currentHeight.value = withTiming(newHeight, {\n duration,\n });\n }, [\n allAttributesRendered,\n currentHeight,\n animate,\n expanded,\n extraAttributes,\n fullAttributesHeight,\n previewAttributes.length,\n previewAttributesHeight,\n showSeeAllButton,\n ]);\n\n const animatedStyle = useAnimatedStyle(() => {\n if (currentHeight.value === undefined) {\n if (expanded) {\n return {};\n }\n return {\n height: cardHeight,\n };\n }\n return {\n height: cardHeight + 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 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 = allAttributesRendered || (previewAttributesHeight !== undefined && animatedHeightSet);\n\n const ContainerComponent = animate ? Animated.View : View;\n return (\n <ContainerComponent\n style={[styles.detailsCard, { backgroundColor: colorScheme.white }, animate ? animatedStyle : undefined, 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 <View>\n <View style={styles.attributesWrapper}>\n <View onLayout={onPreviewAttrContentLayout} style={styles.previewAttributesWrapper}>\n {previewAttributes.map((attribute, idx) => (\n <CredentialAttributeItem\n moreLabel={moreLabel}\n lessLabel={lessLabel}\n key={attribute.id}\n last={!footerView && !showSeeAllButton && idx === previewAttributes.length - 1}\n testID={concatTestID(testID, 'attribute', idx.toString())}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n isExpanded={isExpanded}\n {...attribute}\n />\n ))}\n </View>\n\n {renderExtraAttributes && (\n <View\n style={[\n styles.allAttributesWrapper,\n footerView && styles.allAttributesWrapperWithFooter,\n showSeeAllButton && styles.allAttributesWrapperWithButton,\n !allAttributesRendered && styles.hidden,\n ]}\n onLayout={onFullAttrContentLayout}>\n {extraAttributes.map((attribute, index, { length }) => (\n <CredentialAttributeItem\n moreLabel={moreLabel}\n lessLabel={lessLabel}\n key={attribute.id}\n last={!footerView && !showSeeAllButton && index === length - 1}\n testID={concatTestID(testID, 'attribute', index.toString())}\n onImagePreview={onImagePreview}\n onPress={onAttributeSelected}\n isExpanded={isExpanded}\n {...attribute}\n />\n ))}\n </View>\n )}\n\n {showSeeAllButton && (\n <View style={styles.buttonWrapper}>\n <Button\n onPress={() => setAllAttributesRendered((prev) => !prev)}\n type={ButtonType.Secondary}\n testID={concatTestID(testID, 'showAllAttributesButton')}\n title={isExpanded ? showLessButtonLabel : showAllButtonLabel}\n />\n </View>\n )}\n </View>\n </View>\n )}\n {footerView ? <View style={styles.footer}>{footerView}</View> : null}\n </ContainerComponent>\n );\n};\n\nconst styles = StyleSheet.create({\n allAttributesWrapper: {\n paddingBottom: 12,\n paddingHorizontal: 4,\n width: '100%',\n },\n allAttributesWrapperWithButton: {\n paddingBottom: 0,\n },\n allAttributesWrapperWithFooter: {\n paddingBottom: 0,\n },\n attributesWrapper: {\n paddingTop: 7,\n width: '100%',\n },\n buttonWrapper: {\n height: SEE_ALL_BUTTON_HEIGHT,\n justifyContent: 'flex-end',\n paddingBottom: 12,\n paddingHorizontal: 4,\n paddingTop: 0,\n width: '100%',\n },\n card: {\n borderRadius: 0,\n borderWidth: 0,\n },\n detailsCard: {\n borderRadius: 10,\n borderWidth: 0,\n overflow: 'hidden',\n },\n footer: {\n marginTop: 12,\n },\n hidden: {\n display: 'none',\n },\n previewAttributesWrapper: {\n paddingHorizontal: 4,\n width: '100%',\n },\n});\n\nexport default CredentialDetailsCard;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,wBAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,eAAA,GAAAV,uBAAA,CAAAC,OAAA;AAA6F,SAAAQ,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAA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,UAAU,gBAAG9G,MAAA,CAAAc,OAAA,CAAAoG,aAAA,CAAC/G,YAAA,CAAAqH,IAAI;IAACxE,KAAK,EAAEwC,MAAM,CAAC3C;EAAO,GAAEiE,UAAiB,CAAC,GAAG,IAC9C,CAAC;AAEzB,CAAC;AAED,MAAMtB,MAAM,GAAGF,uBAAU,CAAC8D,MAAM,CAAC;EAC/B3D,oBAAoB,EAAE;IACpBG,aAAa,EAAE,EAAE;IACjByD,iBAAiB,EAAE,CAAC;IACpB9E,KAAK,EAAE;EACT,CAAC;EACDmE,8BAA8B,EAAE;IAC9B9C,aAAa,EAAE;EACjB,CAAC;EACDF,8BAA8B,EAAE;IAC9BE,aAAa,EAAE;EACjB,CAAC;EACDmC,iBAAiB,EAAE;IACjBuB,UAAU,EAAE,CAAC;IACb/E,KAAK,EAAE;EACT,CAAC;EACDsE,aAAa,EAAE;IACbtC,MAAM,EAAEhE,qBAAqB;IAC7BgH,cAAc,EAAE,UAAU;IAC1B3D,aAAa,EAAE,EAAE;IACjByD,iBAAiB,EAAE,CAAC;IACpBC,UAAU,EAAE,CAAC;IACb/E,KAAK,EAAE;EACT,CAAC;EACD5B,IAAI,EAAE;IACJ6G,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE;EACf,CAAC;EACDhC,WAAW,EAAE;IACX+B,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE,CAAC;IACdC,QAAQ,EAAE;EACZ,CAAC;EACD7G,MAAM,EAAE;IACN8G,SAAS,EAAE;EACb,CAAC;EACDhB,MAAM,EAAE;IACNiB,OAAO,EAAE;EACX,CAAC;EACD3B,wBAAwB,EAAE;IACxBoB,iBAAiB,EAAE,CAAC;IACpB9E,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAAC,IAAAsF,QAAA,GAAAC,OAAA,CAAAhJ,OAAA,GAEY0B,qBAAqB","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _color = require("../../utils/color");
|
|
10
10
|
var _testID = require("../../utils/testID");
|
|
11
11
|
var _accessibilityHistoryWrappers = require("../accessibility/accessibilityHistoryWrappers");
|
|
12
|
+
var _expandableTypography = _interopRequireDefault(require("../text/expandableTypography"));
|
|
12
13
|
var _typography = _interopRequireDefault(require("../text/typography"));
|
|
13
14
|
var _colorSchemeContext = require("../theme/color-scheme-context");
|
|
14
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -69,7 +70,10 @@ const CredentialAttributeItem = ({
|
|
|
69
70
|
testID,
|
|
70
71
|
value,
|
|
71
72
|
values,
|
|
72
|
-
valueErrorColor
|
|
73
|
+
valueErrorColor,
|
|
74
|
+
isExpanded,
|
|
75
|
+
moreLabel,
|
|
76
|
+
lessLabel
|
|
73
77
|
}) => {
|
|
74
78
|
const colorScheme = (0, _colorSchemeContext.useAppColorScheme)();
|
|
75
79
|
const imagePreviewHandler = (0, _react.useCallback)(() => {
|
|
@@ -134,11 +138,15 @@ const CredentialAttributeItem = ({
|
|
|
134
138
|
testID: (0, _testID.concatTestID)(testID, 'image'),
|
|
135
139
|
source: image,
|
|
136
140
|
style: styles.dataItemImage
|
|
137
|
-
})), value && /*#__PURE__*/_react.default.createElement(
|
|
141
|
+
})), value && /*#__PURE__*/_react.default.createElement(_expandableTypography.default, {
|
|
138
142
|
color: valueErrorColor ? colorScheme.error : colorScheme.text,
|
|
139
|
-
numberOfLines:
|
|
143
|
+
numberOfLines: 3,
|
|
144
|
+
ellipsizeMode: "tail",
|
|
140
145
|
preset: "s",
|
|
146
|
+
hideExpandButton: !isExpanded && !listValue && !nested,
|
|
141
147
|
style: listValue ? styles.listValue : undefined,
|
|
148
|
+
moreLabel: moreLabel,
|
|
149
|
+
lessLabel: lessLabel,
|
|
142
150
|
testID: (0, _testID.concatTestID)(testID, 'value')
|
|
143
151
|
}, value), isObject && attributes.map((attribute, index, {
|
|
144
152
|
length
|
|
@@ -169,7 +177,8 @@ const CredentialAttributeItem = ({
|
|
|
169
177
|
const styles = _reactNative.StyleSheet.create({
|
|
170
178
|
attributeItem: {
|
|
171
179
|
flex: 1,
|
|
172
|
-
paddingLeft: 8
|
|
180
|
+
paddingLeft: 8,
|
|
181
|
+
paddingRight: 8
|
|
173
182
|
},
|
|
174
183
|
attributeItemContainer: {
|
|
175
184
|
marginTop: 2
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_color","_testID","_accessibilityHistoryWrappers","_typography","_interopRequireDefault","_colorSchemeContext","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","CredentialAttributeItemButton","children","disabled","id","onPress","selected","colorScheme","useAppColorScheme","pressHandler","useCallback","createElement","View","style","styles","touchableAttribute","TouchableOpacity","activeOpacity","backgroundColor","background","TouchableHighlight","underlayColor","colorWithAlphaComponent","IMAGE_SIZE","CredentialAttributeItem","attributes","image","last","name","onImagePreview","rightAccessory","nested","listValue","testID","value","values","valueErrorColor","imagePreviewHandler","rightAccessoryView","useMemo","undefined","React","isValidElement","RightAccessoryComponent","isObject","isArray","attributeItemContainer","attributeItemRow","dataItemButtonChildren","decorator","decoratorCircle","listDecoratorCircle","listImageDecoratorCircle","text","decoratorCircleInner","borderColor","decoratorLine","listDecoratorLine","listStringValueDecoratorLine","listImageDecoratorLine","objectAttributeItem","attributeItem","nestedAttributeItem","color","preset","nestedObjectLabel","dataItemLabel","concatTestID","dataItemImageWrapper","Image","resizeMode","source","dataItemImage","error","numberOfLines","map","attribute","index","key","arrayValue","objectAccessory","separator","StyleSheet","create","flex","paddingLeft","marginTop","flexDirection","alignItems","height","width","borderRadius","borderWidth","overflow","marginBottom","opacity","justifyContent","left","position","top","bottom","marginLeft","paddingVertical","alignSelf","paddingHorizontal","right","marginHorizontal","_default","exports"],"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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA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GAAG,EAAE,EAAE;IACPT,KAAK,EAAE;EACT,CAAC;EACDvC,mBAAmB,EAAE;IACnBgD,GAAG,EAAE;EACP,CAAC;EACD1C,iBAAiB,EAAE;IACjB0C,GAAG,EAAE;EACP,CAAC;EACD/C,wBAAwB,EAAE;IACxB+C,GAAG,EAAE;EACP,CAAC;EACDxC,sBAAsB,EAAE;IACtByC,MAAM,EAAE,EAAE;IACVD,GAAG,EAAE;EACP,CAAC;EACDzC,4BAA4B,EAAE;IAC5B0C,MAAM,EAAE;EACV,CAAC;EACDpE,SAAS,EAAE;IACTqE,UAAU,EAAE,EAAE;IACdC,eAAe,EAAE;EACnB,CAAC;EACDxC,mBAAmB,EAAE;IACnBuB,WAAW,EAAE;EACf,CAAC;EACDpB,iBAAiB,EAAE;IACjB8B,OAAO,EAAE,GAAG;IACZV,WAAW,EAAE;EACf,CAAC;EACDL,eAAe,EAAE;IACfuB,SAAS,EAAE;EACb,CAAC;EACD3C,mBAAmB,EAAE;IACnB4B,UAAU,EAAE,SAAS;IACrBJ,IAAI,EAAE,CAAC;IACPC,WAAW,EAAE;EACf,CAAC;EACDvD,cAAc,EAAE;IACd0E,iBAAiB,EAAE,CAAC;IACpBN,QAAQ,EAAE,UAAU;IACpBO,KAAK,EAAE;EACT,CAAC;EACDxB,SAAS,EAAE;IACTQ,MAAM,EAAE,CAAC;IACTiB,gBAAgB,EAAE,CAAC;IACnBpB,SAAS,EAAE,CAAC;EACd,CAAC;EACDvE,kBAAkB,EAAE;IAClB4E,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdR,IAAI,EAAE,CAAC;IACPkB,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAnI,OAAA,GAEY+C,uBAAuB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_color","_testID","_accessibilityHistoryWrappers","_expandableTypography","_interopRequireDefault","_typography","_colorSchemeContext","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","CredentialAttributeItemButton","children","disabled","id","onPress","selected","colorScheme","useAppColorScheme","pressHandler","useCallback","createElement","View","style","styles","touchableAttribute","TouchableOpacity","activeOpacity","backgroundColor","background","TouchableHighlight","underlayColor","colorWithAlphaComponent","IMAGE_SIZE","CredentialAttributeItem","attributes","image","last","name","onImagePreview","rightAccessory","nested","listValue","testID","value","values","valueErrorColor","isExpanded","moreLabel","lessLabel","imagePreviewHandler","rightAccessoryView","useMemo","undefined","React","isValidElement","RightAccessoryComponent","isObject","isArray","attributeItemContainer","attributeItemRow","dataItemButtonChildren","decorator","decoratorCircle","listDecoratorCircle","listImageDecoratorCircle","text","decoratorCircleInner","borderColor","decoratorLine","listDecoratorLine","listStringValueDecoratorLine","listImageDecoratorLine","objectAttributeItem","attributeItem","nestedAttributeItem","color","preset","nestedObjectLabel","dataItemLabel","concatTestID","dataItemImageWrapper","Image","resizeMode","source","dataItemImage","error","numberOfLines","ellipsizeMode","hideExpandButton","map","attribute","index","key","arrayValue","objectAccessory","separator","StyleSheet","create","flex","paddingLeft","paddingRight","marginTop","flexDirection","alignItems","height","width","borderRadius","borderWidth","overflow","marginBottom","opacity","justifyContent","left","position","top","bottom","marginLeft","paddingVertical","alignSelf","paddingHorizontal","right","marginHorizontal","_default","exports"],"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 ExpandableTypography from '../text/expandableTypography';\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 isExpanded?: boolean;\n moreLabel?: string;\n lessLabel?: string;\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 isExpanded,\n moreLabel,\n lessLabel,\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 <ExpandableTypography\n color={valueErrorColor ? colorScheme.error : colorScheme.text}\n numberOfLines={3}\n ellipsizeMode=\"tail\"\n preset=\"s\"\n hideExpandButton={!isExpanded && !listValue && !nested}\n style={listValue ? styles.listValue : undefined}\n moreLabel={moreLabel}\n lessLabel={lessLabel}\n testID={concatTestID(testID, 'value')}>\n {value}\n </ExpandableTypography>\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 paddingRight: 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,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAA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AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAzI,OAAA,GAEY+C,uBAAuB","ignoreList":[]}
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _listItem = _interopRequireDefault(require("../list/list-item"));
|
|
9
10
|
var _colorSchemeContext = require("../theme/color-scheme-context");
|
|
10
|
-
var _historyItem = _interopRequireDefault(require("./history-item"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
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); }
|
|
13
13
|
// component used on the history section lists (Settings->History, CredentialDetail->History)
|
|
@@ -23,7 +23,7 @@ const HistorySectionListItem = ({
|
|
|
23
23
|
style: [styles.item, first && styles.first, last && styles.last, {
|
|
24
24
|
backgroundColor: colorScheme.white
|
|
25
25
|
}]
|
|
26
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement(_listItem.default, _extends({
|
|
27
27
|
last: last
|
|
28
28
|
}, props)));
|
|
29
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_listItem","_colorSchemeContext","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","HistorySectionListItem","first","last","props","colorScheme","useAppColorScheme","createElement","View","style","styles","item","backgroundColor","white","StyleSheet","create","borderTopLeftRadius","borderTopRightRadius","marginTop","paddingTop","paddingHorizontal","borderBottomLeftRadius","borderBottomRightRadius","marginBottom","paddingBottom","_default","exports"],"sources":["history-section-list-item.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport ListItemView, { ListItemViewProps } from '../list/list-item';\nimport { useAppColorScheme } from '../theme/color-scheme-context';\n\n// component used on the history section lists (Settings->History, CredentialDetail->History)\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev\n\nexport interface HistorySectionListItemProps extends ListItemViewProps {\n first?: boolean;\n}\n\nconst HistorySectionListItem: FC<HistorySectionListItemProps> = ({ first, last, ...props }) => {\n const colorScheme = useAppColorScheme();\n return (\n <View style={[styles.item, first && styles.first, last && styles.last, { backgroundColor: colorScheme.white }]}>\n <ListItemView last={last} {...props} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n first: {\n borderTopLeftRadius: 20,\n borderTopRightRadius: 20,\n marginTop: 8,\n paddingTop: 12,\n },\n item: {\n paddingHorizontal: 12,\n },\n last: {\n borderBottomLeftRadius: 20,\n borderBottomRightRadius: 20,\n marginBottom: 12,\n paddingBottom: 12,\n },\n});\n\nexport default HistorySectionListItem;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAAkE,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,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esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
7
|
DataItem: true,
|
|
8
|
-
HistoryItemView: true,
|
|
9
8
|
HistorySectionHeaderView: true,
|
|
10
9
|
HistorySectionListItem: true
|
|
11
10
|
};
|
|
@@ -15,12 +14,6 @@ Object.defineProperty(exports, "DataItem", {
|
|
|
15
14
|
return _dataItem.default;
|
|
16
15
|
}
|
|
17
16
|
});
|
|
18
|
-
Object.defineProperty(exports, "HistoryItemView", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _historyItem.default;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
17
|
Object.defineProperty(exports, "HistorySectionHeaderView", {
|
|
25
18
|
enumerable: true,
|
|
26
19
|
get: function () {
|
|
@@ -34,7 +27,6 @@ Object.defineProperty(exports, "HistorySectionListItem", {
|
|
|
34
27
|
}
|
|
35
28
|
});
|
|
36
29
|
var _dataItem = _interopRequireDefault(require("./data-item"));
|
|
37
|
-
var _historyItem = _interopRequireDefault(require("./history-item"));
|
|
38
30
|
var _historySectionHeader = _interopRequireDefault(require("./history-section-header"));
|
|
39
31
|
var _historySectionListItem = _interopRequireDefault(require("./history-section-list-item"));
|
|
40
32
|
var _historyDetails = require("./history-details");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_dataItem","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_dataItem","_interopRequireDefault","require","_historySectionHeader","_historySectionListItem","_historyDetails","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["import type { DataItemProps } from './data-item';\nimport DataItem from './data-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 { HistorySectionHeaderView };\nexport { HistorySectionListItem, HistorySectionListItemProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,uBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AAAAI,MAAA,CAAAC,IAAA,CAAAF,eAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,eAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,eAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAAkC,SAAAR,uBAAAiB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.WalletUnitAttestationIcon = exports.StatusWarningIcon = exports.StatusSuccessIcon = exports.StatusErrorIcon = exports.SearchIcon = exports.ScanIcon = exports.PurposeInfoIcon = exports.PlusIcon = exports.OptionsIcon = exports.NFCIcon = exports.LinkIcon = exports.InfoIcon = exports.ImportIcon = exports.HistoryIcon = exports.FilterIcon = exports.CodeIcon = exports.CloseIcon = exports.BackIcon = void 0;
|
|
6
|
+
exports.WalletUnitAttestationIcon = exports.StatusWarningIcon = exports.StatusSuccessIcon = exports.StatusErrorIcon = exports.SignIcon = exports.SearchIcon = exports.ScanIcon = exports.PurposeInfoIcon = exports.PlusIcon = exports.OptionsIcon = exports.NFCIcon = exports.LinkIcon = exports.IssueIcon = exports.InfoIcon = exports.ImportIcon = exports.HistoryIcon = exports.FilterIcon = exports.CodeIcon = exports.CloseIcon = exports.BackIcon = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNativeSvg = _interopRequireWildcard(require("react-native-svg"));
|
|
9
9
|
var _colorSchemeContext = require("../theme/color-scheme-context");
|
|
@@ -42,8 +42,42 @@ const ScanIcon = ({
|
|
|
42
42
|
}));
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
// https://www.figma.com/
|
|
45
|
+
// https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=621-19281&t=mV98iCutPWAC5Nb4-0
|
|
46
46
|
exports.ScanIcon = ScanIcon;
|
|
47
|
+
const IssueIcon = ({
|
|
48
|
+
color,
|
|
49
|
+
...props
|
|
50
|
+
}) => {
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_reactNativeSvg.default, _extends({
|
|
52
|
+
width: 24,
|
|
53
|
+
height: 24,
|
|
54
|
+
viewBox: "0 0 24 24",
|
|
55
|
+
fill: "none"
|
|
56
|
+
}, props), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
|
|
57
|
+
d: "M4.188 13.34V5.27c0-.965.239-1.692.715-2.18.482-.49 1.203-.734 2.161-.734h4.407c.347 0 .65.025.91.075.265.043.51.13.732.26.223.123.452.306.687.547l5.112 5.204c.247.254.433.495.556.724.13.223.217.47.26.742.043.272.065.61.065 1.011v8.424c0 .965-.241 1.689-.724 2.171-.476.489-1.193.733-2.152.733h-6.8c.136-.229.253-.47.352-.724.1-.247.18-.504.241-.77h6.133c.482 0 .844-.123 1.085-.37.248-.248.371-.604.371-1.068v-8.33h-5.288c-.581 0-1.017-.146-1.308-.437-.29-.29-.436-.726-.436-1.308V3.85H7.14c-.483 0-.848.127-1.095.38-.241.254-.362.61-.362 1.067v8.044a8.606 8.606 0 00-.38-.028 3.812 3.812 0 00-.752 0 7.826 7.826 0 00-.362.028zm8.48-4.276c0 .186.037.318.111.399.08.08.214.12.4.12h4.833l-5.344-5.445v4.926zM4.94 24a4.51 4.51 0 01-1.818-.37 4.698 4.698 0 01-1.503-1.012 4.828 4.828 0 01-1.02-1.503 4.533 4.533 0 01-.372-1.827c0-.65.124-1.256.371-1.819a4.828 4.828 0 011.02-1.503c.434-.439.935-.779 1.504-1.02a4.51 4.51 0 011.818-.371c.65 0 1.259.123 1.828.37.569.242 1.07.58 1.503 1.012.432.433.77.934 1.01 1.503.248.569.372 1.178.372 1.828 0 .643-.124 1.249-.371 1.818a4.751 4.751 0 01-1.03 1.503 4.828 4.828 0 01-1.503 1.02 4.488 4.488 0 01-1.81.371zm0-1.762c.173 0 .31-.053.408-.158a.552.552 0 00.158-.408v-1.819h1.818a.552.552 0 00.408-.157.533.533 0 00.158-.408.533.533 0 00-.158-.409.552.552 0 00-.408-.157H5.506v-1.819a.552.552 0 00-.158-.408.534.534 0 00-.408-.158.564.564 0 00-.418.158.572.572 0 00-.148.408v1.819H2.556a.552.552 0 00-.409.157.533.533 0 00-.157.409c0 .173.052.309.157.408a.552.552 0 00.409.157h1.818v1.819c0 .167.05.303.148.408a.564.564 0 00.418.158z",
|
|
58
|
+
fill: color
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// https://www.figma.com/design/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?node-id=621-19281&t=RS4pnpOH4RNYzd8j-0
|
|
63
|
+
exports.IssueIcon = IssueIcon;
|
|
64
|
+
const SignIcon = ({
|
|
65
|
+
color,
|
|
66
|
+
...props
|
|
67
|
+
}) => {
|
|
68
|
+
return /*#__PURE__*/_react.default.createElement(_reactNativeSvg.default, _extends({
|
|
69
|
+
width: 27,
|
|
70
|
+
height: 24,
|
|
71
|
+
viewBox: "0 0 27 24",
|
|
72
|
+
fill: "none"
|
|
73
|
+
}, props), /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Path, {
|
|
74
|
+
d: "M8.807 22.913c-.827 0-1.442-.228-1.846-.686-.404-.45-.607-1.03-.607-1.74 0-.662.167-1.388.501-2.18.34-.79.818-1.576 1.433-2.355a12.083 12.083 0 012.197-2.136 11.226 11.226 0 012.84-1.564 9.352 9.352 0 013.322-.589c.568 0 1.019.132 1.353.396.34.257.51.606.51 1.046 0 .234-.033.465-.097.694a13.12 13.12 0 01-.193.615 1.384 1.384 0 00-.097.43c0 .1.044.15.132.15.123 0 .308-.1.554-.299.252-.199.539-.445.86-.738.329-.299.675-.595 1.038-.888a7.33 7.33 0 011.081-.747c.363-.199.697-.299 1.002-.299.352 0 .61.1.774.3.163.193.275.436.334.729.064.287.11.577.14.87.03.287.08.53.15.73.07.193.202.29.395.29a.815.815 0 00.43-.124.774.774 0 01.431-.131c.17 0 .305.058.405.175a.62.62 0 01.158.431.635.635 0 01-.106.36.841.841 0 01-.255.264c-.181.117-.38.202-.597.255-.217.053-.416.079-.598.079-.44 0-.773-.09-1.002-.273a1.52 1.52 0 01-.483-.685 4.234 4.234 0 01-.194-.817 7.551 7.551 0 00-.114-.686c-.04-.188-.126-.281-.255-.281-.146 0-.342.102-.588.307-.247.205-.528.46-.844.765-.317.299-.657.6-1.02.905-.363.305-.732.56-1.107.765-.37.205-.733.308-1.09.308-.322 0-.592-.094-.809-.282-.216-.193-.325-.457-.325-.79 0-.253.032-.493.097-.721l.21-.677c.071-.229.106-.472.106-.73 0-.24-.16-.36-.483-.36-1.02 0-1.978.17-2.874.51a9.486 9.486 0 00-2.435 1.327 10.996 10.996 0 00-1.88 1.793 8.956 8.956 0 00-1.214 1.916c-.28.633-.421 1.195-.421 1.687 0 .399.1.721.298.967.205.252.519.378.94.378.645 0 1.243-.237 1.794-.712.55-.468 1.031-1.122 1.441-1.96.41-.832.727-1.796.95-2.891.228-1.096.342-2.268.342-3.516 0-1.043-.102-2.021-.307-2.935-.205-.92-.501-1.729-.888-2.426-.387-.698-.853-1.245-1.398-1.644a3.023 3.023 0 00-1.828-.597c-.504 0-.958.134-1.362.404-.398.27-.715.633-.95 1.09a3.34 3.34 0 00-.35 1.547c0 .884.178 1.702.535 2.452A8.048 8.048 0 008.314 12.4a11.734 11.734 0 001.758 1.53c.61.421 1.166.756 1.67 1.002a.652.652 0 01.281.246.555.555 0 01.088.298c0 .153-.058.29-.176.414a.596.596 0 01-.439.175.738.738 0 01-.334-.079 13.678 13.678 0 01-1.828-1.046 12.83 12.83 0 01-1.661-1.37c-.516-.51-.97-1.061-1.362-1.653a8.333 8.333 0 01-.915-1.898 6.543 6.543 0 01-.333-2.083c0-.82.175-1.56.527-2.215A4.198 4.198 0 017.03 4.148a3.658 3.658 0 012.04-.588c.878 0 1.67.231 2.372.694.71.463 1.316 1.104 1.82 1.925.504.814.89 1.763 1.16 2.847.27 1.079.404 2.236.404 3.472 0 1.459-.143 2.818-.43 4.078-.282 1.26-.689 2.364-1.222 3.314-.527.949-1.16 1.69-1.899 2.223a4.12 4.12 0 01-2.47.8zM.703 19.696a.684.684 0 01-.5-.21.7.7 0 01-.203-.502.7.7 0 01.202-.5.7.7 0 01.501-.203H25.7a.7.7 0 01.501.202c.14.141.211.308.211.501 0 .194-.07.36-.21.501a.684.684 0 01-.502.211H.703zM.457 16.27a.556.556 0 01-.176-.405c0-.152.059-.287.176-.404l3.006-2.988a.54.54 0 01.395-.167.51.51 0 01.405.167.537.537 0 01.175.404.528.528 0 01-.175.396l-3.006 2.997a.583.583 0 01-.404.175.528.528 0 01-.396-.175zm3.006 0L.457 13.272a.528.528 0 01-.176-.396c0-.158.059-.293.176-.404a.528.528 0 01.396-.176c.158 0 .293.059.404.176l3.006 2.988a.556.556 0 010 .809.537.537 0 01-.405.175.528.528 0 01-.395-.175z",
|
|
75
|
+
fill: color
|
|
76
|
+
}));
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=415-10316&mode=design&t=5mm9J3ttJ4bbt2N3-4
|
|
80
|
+
exports.SignIcon = SignIcon;
|
|
47
81
|
const HistoryIcon = ({
|
|
48
82
|
color,
|
|
49
83
|
...props
|