{"version":3,"file":"index.js","sources":["../src/components/Common/test.tsx"],"sourcesContent":["import React, { PureComponent } from \"react\";\nimport classnames from 'classnames';\n\nimport styles from './test.less';\n\nexport const ImgRowList = (\n imglist: Array,\n outterKey: string,\n type: string | null = 'normal',\n) => {\n if (!imglist || !Array.isArray(imglist)) return null;\n return (\n \n {imglist.map((image_url: string, index: number) => {\n return (\n \n {`comment\n \n );\n })}\n \n );\n};\n\ninterface MyNormalListProps {\n style?: any;\n renderItem: Function | any;\n renderData: Array;\n}\nexport class MyNormalList extends PureComponent {\n render() {\n const {\n style: innerStyle = {},\n renderItem = () => {},\n renderData = [],\n } = this.props;\n\n if (!renderData || !Array.isArray(renderData)) {\n console.error('MyNormalList Components renderData Props must be Array');\n return null;\n }\n\n return (\n
\n {renderData.map((value, index, arr) => renderItem(value, index))}\n
\n );\n }\n}\n\ninterface NormalCardProps {\n key: any;\n userinfo: {\n nickname: string | any;\n avatar: string | any;\n created: string | number;\n };\n main_content: any;\n append_content?: any;\n content_img_assets?: Array;\n options?: {\n header_size?: 'small' | 'normal' | 'middle';\n bottom_divider?: boolean;\n };\n}\nexport class NormalCard extends PureComponent {\n render() {\n const {\n userinfo: { nickname, avatar, created } = {\n nickname: '',\n avatar: '',\n created: '',\n },\n main_content = null,\n append_content = null,\n content_img_assets = [],\n options = {\n header_size: 'normal',\n bottom_divider: false,\n },\n } = this.props;\n //\n\n const RENDEROPTIONS_showImgList =\n content_img_assets && content_img_assets.length > 0;\n\n return (\n \n \n
\n {typeof avatar === 'string' ? (\n
\n \"user_avatar\"\n
\n ) : (\n avatar\n )}\n
{nickname}
\n
\n
\n {main_content}\n {RENDEROPTIONS_showImgList\n ? ImgRowList(content_img_assets, this.props.key)\n : null}\n
\n
{append_content}
\n \n );\n }\n}\n\ninterface ShareCardProps {\n isMobile: boolean | any;\n mode: 'line' | 'block';\n render_mode: 'text' | 'object';\n share_data: any;\n}\nexport class ShareCard extends PureComponent {\n render() {\n const {\n isMobile = false,\n render_mode = 'text',\n mode = 'line',\n share_data = '',\n } = this.props;\n\n return (\n \n {render_mode === 'text' ? share_data : null}\n \n );\n }\n}\n\n// type TransmitType = 'imgTxt' | 'shortVideo' | 'microVideo';\n// type TransmitImgTxtData = {\n// user_id?: string|number;\n// anonymity?: boolean;\n// avatar?: string;\n// nickname?: string;\n// is_long?: boolean;\n// }\n\n// interface TransmitCardProps {\n// type: TransmitType;\n// data: TransmitImgTxtData;\n// }\n\n// export class TransmitCard extends React.PureComponent {\n// renderVideo() {\n// return
Video
;\n// }\n\n// renderImgTxt() {\n// const { data } = this.props;\n// const {\n// user_id,\n// anonymity,\n// avatar,\n// nickname,\n// is_long,\n// } = data;\n\n// return (\n//
\n//
\n// \n// \n// \n//
\n// \n// {nickname}\n// \n//
\n//
\n// {is_long\n// ? intl.get('bilingually.imgtxt.article')\n// : intl.get('bilingually.imgtxt')}\n//
\n//
\n//
\n// );\n// }\n\n// render() {\n// const { type } = this.props;\n// if (type === 'imgTxt') {\n// this.renderImgTxt();\n// }\n// if (type === 'shortVideo' || type === 'microVideo') {\n// this.renderVideo();\n// }\n// return null;\n// }\n// }\n\nexport const Test = \"TestComponent\";\nexport const TestRedTxt = () => (\n
\n RedTxt\n
\n)\n\nexport default {\n MyNormalList,\n NormalCard,\n ShareCard,\n Test,\n // TransmitCard\n};"],"names":["Test"],"mappings":";;;;;;;;;;;;;AAuJA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEA,IAAaA,IAAI,GAAG,eAAb;;;;;;;;"}