syber-lowcode-business-materials
Version:
syber-lowcode-business-materials
177 lines (174 loc) • 5.52 kB
text/typescript
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';
const RobotItemMeta: IPublicTypeComponentMetadata = {
priority: 13,
componentName: 'RobotItem',
title: '数字人卡片',
group: "业务定制",
category: '信息卡片',
docUrl: '',
screenshot: '',
devMode: 'proCode',
npm: {
package: 'syber-lowcode-business-materials',
version: '0.1.0',
exportName: 'RobotItem',
main: 'src/index.tsx',
destructuring: true,
subName: '',
},
configure: {
props: [
{
title: '数据源',
display: 'block',
type: 'group',
items: [
{
name: 'robotData',
title: { label: '数字人数据', tip: 'robotData | 数字人数据' },
propType: 'object',
setter: 'JsonSetter',
supportVariable: true,
},
],
},
{
name: 'isCheckbox',
title: { label: '是否可选择卡片', tip: 'isCheckbox | 是否可选择卡片' },
propType: 'bool',
setter: 'BoolSetter',
supportVariable: true,
defaultValue: false,
},
{
name: 'checkedList',
title: { label: '是否选中', tip: 'checkedList:[] | 是否选中' },
propType: 'object',
setter: 'JsonSetter',
supportVariable: true,
},
],
supports: {
style: false,
events: [
{
name: 'onMediaClick',
template:
"onMediaClick(event,${extParams}){\n// 点击数字人分身的回调\nconsole.log('onMediaClick', event);}",
},
{
name: 'onLongRange',
template:
"onLongRange(event,${extParams}){\n// 点击数字人远程\nconsole.log('onLongRange', event);}",
},
{
name: 'onCheckboxChange',
template:
"onCheckboxChange(event,${extParams}){\n// 选择框点击事件\nconsole.log('onCheckboxChange', event);}",
},
],
},
component: {},
},
};
const snippets: IPublicTypeSnippet[] = [
{
title: '数字人卡片',
screenshot: require('./__screenshots__/robot-item-1.png'),
schema: {
componentName: 'RobotItem',
props: {
robotData: {
_id: '678514fced3da51068667477',
companyId: 'jsbzy',
name: 'Siti Nurhayati',
deviceId: 'OSWIN_ce390ee776908e8a_1',
deviceType: 3,
gender: 'Female',
birthday: '1964-8-10',
qualification:
"Bachelor's degree in Business Administration, Masters in Strategic Management",
mobile: '+62 7149902345',
email: 'nurhayati.stuff@xyzcorporation.id',
positionId: null,
skillId: null,
skillLevelId: null,
spaceId: ['678514fbed3da5106866746e', '678514fbed3da5106866746e'],
positions: null,
skills: null,
personality: 'Egocentric,Honest,Uncreative',
hobby: 'Cricket',
emotion: 'Single',
religion:
'Not specified, but her honesty and integrity could be universal traits present in various beliefs',
family:
'Raised by a single mother who instilled the values of hard work and honesty. She has no siblings.',
education:
'Graduated from Universitas Islam Negeri Kota Pekanbaru in 1982 with a Bachelors of Commerce. Later obtained her masters from Institut Teknologi Sepuluh Nopember (ITS) Surabaya.',
ip: '115.205.147.19',
location: {
countryId: 'CN',
countryName: 'China',
provinceId: '1784764',
provinceName: 'Zhejiang',
cityId: '1808926',
cityName: 'Hangzhou',
timezone: 7,
geo: {
type: 'Point',
coordinates: [119.954, 30.0464],
},
},
workLocation: null,
execUnits: null,
execUnitVOList: null,
execUnitPositionId: [
'67cf94ea4c58520eecc83193',
'67d15c47c2bacd5fc14b7f89',
'67d15ceaf4af933ca44872cf',
],
originSpaceId: null,
spaceAdmin: true,
creatorSpaceName: null,
adminSpaceName: '213',
spaceList: null,
execJob: null,
status: 2,
addTime: 1736774908077,
shards: null,
skillLevelPOList: null,
execUnitPositionPOList: null,
spaceStatus: null,
role: 2,
spaces: null,
position: 'VP of Miscellaneous Stuff',
skill: ['Strategic planning', ' Problem-solving', ' Team leadership'],
updater: {
addTime: null,
createrId: null,
creater: null,
editorId: '66aaf8ab53ab5e00015250bb',
editor: 'q',
updateTime: 1736856767608,
},
avatar: 'https://fw-aigc.fwgcloud.com/dp/4c4693c4986311ef946fa036bccb3e9f.png',
image: 'https://fw-aigc.fwgcloud.com/dp/4c4693c4986311ef946fa036bccb3e9f.png',
voice: 'https://fw-aigc.fwgcloud.com/tts/46cc9df8986311ef92c9a036bccb3e9f.wav',
creationWay: 5,
characterSettings: null,
share: 1,
lock: 2,
authorized: null,
remoteAuth: null,
sum: null,
robot: null,
type: 4,
},
},
},
},
];
export default {
...RobotItemMeta,
snippets,
};