@pisell/materials 1.0.1057 → 1.0.1059
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +3 -3
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +20 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -23
- package/es/components/PisellCards/index.d.ts +3 -0
- package/es/components/PisellCards/index.js +3 -1
- package/es/components/PisellContactBrief/PisellContactBrief.d.ts +13 -0
- package/es/components/PisellContactBrief/PisellContactBrief.js +223 -0
- package/es/components/PisellContactBrief/PisellContactBrief.less +192 -0
- package/es/components/PisellContactBrief/PisellContactBrief.stories.d.ts +31 -0
- package/es/components/PisellContactBrief/PisellContactBrief.stories.js +196 -0
- package/es/components/PisellContactBrief/components/ContactFormModal.d.ts +23 -0
- package/es/components/PisellContactBrief/components/ContactFormModal.js +177 -0
- package/es/components/PisellContactBrief/components/index.d.ts +5 -0
- package/es/components/PisellContactBrief/components/index.js +4 -0
- package/es/components/PisellContactBrief/index.d.ts +6 -0
- package/es/components/PisellContactBrief/index.js +5 -0
- package/es/components/PisellContactBrief/locales.d.ts +55 -0
- package/es/components/PisellContactBrief/locales.js +54 -0
- package/es/components/PisellContactBrief/types.d.ts +82 -0
- package/es/components/PisellContactBrief/types.js +1 -0
- package/es/components/dataSourceComponents/fields/Tabs/Tabs.less +8 -0
- package/es/components/pisellActionPanel/PisellActionPanel.d.ts +13 -0
- package/es/components/pisellActionPanel/PisellActionPanel.js +98 -0
- package/es/components/pisellActionPanel/PisellActionPanel.less +69 -0
- package/es/components/pisellActionPanel/PisellActionPanel.stories.d.ts +19 -0
- package/es/components/pisellActionPanel/PisellActionPanel.stories.js +208 -0
- package/es/components/pisellActionPanel/index.d.ts +6 -0
- package/es/components/pisellActionPanel/index.js +5 -0
- package/es/components/pisellActionPanel/types.d.ts +83 -0
- package/es/components/pisellActionPanel/types.js +1 -0
- package/es/components/pisellBaseCard/PisellBaseCard.d.ts +8 -0
- package/es/components/pisellBaseCard/PisellBaseCard.js +96 -0
- package/es/components/pisellBaseCard/PisellBaseCard.less +25 -0
- package/es/components/pisellBaseCard/PisellBaseCard.stories.d.ts +19 -0
- package/es/components/pisellBaseCard/PisellBaseCard.stories.js +99 -0
- package/es/components/pisellBaseCard/index.d.ts +5 -0
- package/es/components/pisellBaseCard/index.js +4 -0
- package/es/components/pisellBaseCard/types.d.ts +45 -0
- package/es/components/pisellBaseCard/types.js +1 -0
- package/es/components/pisellCurrency/PisellCurrency.js +18 -12
- package/es/components/pisellCurrency/PisellCurrency.less +0 -123
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +15 -0
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.js +145 -0
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.less +8 -0
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.stories.d.ts +23 -0
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.stories.js +193 -0
- package/es/components/pisellCustomerBrief/index.d.ts +6 -0
- package/es/components/pisellCustomerBrief/index.js +5 -0
- package/es/components/pisellCustomerBrief/types.d.ts +82 -0
- package/es/components/pisellCustomerBrief/types.js +1 -0
- package/es/components/pisellEmail/PisellEmail.js +48 -42
- package/es/components/pisellEmail/PisellEmail.less +0 -92
- package/es/components/pisellEntityCard/PisellEntityCard.d.ts +8 -0
- package/es/components/pisellEntityCard/PisellEntityCard.js +474 -0
- package/es/components/pisellEntityCard/PisellEntityCard.less +362 -0
- package/es/components/pisellEntityCard/PisellEntityCard.stories.d.ts +47 -0
- package/es/components/pisellEntityCard/PisellEntityCard.stories.js +450 -0
- package/es/components/pisellEntityCard/index.d.ts +5 -0
- package/es/components/pisellEntityCard/index.js +4 -0
- package/es/components/pisellEntityCard/types.d.ts +144 -0
- package/es/components/pisellEntityCard/types.js +1 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +32 -4
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +4 -2
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +12 -2
- package/es/components/pisellFloorMapLayout/types.d.ts +2 -0
- package/es/components/pisellLongText/PisellLongText.js +18 -12
- package/es/components/pisellLongText/PisellLongText.less +0 -67
- package/es/components/pisellLookup/PisellLookup.js +8 -1
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.js +14 -6
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +18 -139
- package/es/components/pisellMultipleSelect/components/EditView.js +1 -0
- package/es/components/pisellNumber/PisellNumber.js +18 -12
- package/es/components/pisellNumber/PisellNumber.less +0 -103
- package/es/components/pisellPhone/PisellPhone.js +18 -12
- package/es/components/pisellPhone/PisellPhone.less +0 -119
- package/es/components/pisellPhone/components/EditView.js +44 -33
- package/es/components/pisellPhone/constants/countryCodes.d.ts +1 -0
- package/es/components/pisellPhone/constants/countryCodes.js +26 -25
- package/es/components/pisellPhone/types.d.ts +2 -2
- package/es/components/pisellPhone/utils/countryCodeHelper.d.ts +4 -4
- package/es/components/pisellPhone/utils/countryCodeHelper.js +5 -5
- package/es/components/pisellRating/PisellRating.js +7 -3
- package/es/components/pisellSingleLineText/PisellSingleLineText.js +27 -20
- package/es/components/pisellSingleLineText/PisellSingleLineText.less +58 -201
- package/es/components/pisellSingleSelect/PisellSingleSelect.js +14 -5
- package/es/components/pisellSingleSelect/PisellSingleSelect.less +5 -106
- package/es/components/pisellUrl/PisellUrl.js +48 -42
- package/es/components/pisellWalletPassCard/index.js +2 -1
- package/es/index.d.ts +15 -4
- package/es/index.js +8 -4
- package/es/theme/pisell-components.d.ts +14 -0
- package/es/theme/pisell-components.js +74 -0
- package/lib/components/PisellCards/index.d.ts +3 -0
- package/lib/components/PisellCards/index.js +3 -1
- package/lib/components/PisellContactBrief/PisellContactBrief.d.ts +13 -0
- package/lib/components/PisellContactBrief/PisellContactBrief.js +231 -0
- package/lib/components/PisellContactBrief/PisellContactBrief.less +192 -0
- package/lib/components/PisellContactBrief/PisellContactBrief.stories.d.ts +31 -0
- package/lib/components/PisellContactBrief/PisellContactBrief.stories.js +188 -0
- package/lib/components/PisellContactBrief/components/ContactFormModal.d.ts +23 -0
- package/lib/components/PisellContactBrief/components/ContactFormModal.js +154 -0
- package/lib/components/PisellContactBrief/components/index.d.ts +5 -0
- package/lib/components/PisellContactBrief/components/index.js +29 -0
- package/lib/components/PisellContactBrief/index.d.ts +6 -0
- package/lib/components/PisellContactBrief/index.js +29 -0
- package/lib/components/PisellContactBrief/locales.d.ts +55 -0
- package/lib/components/PisellContactBrief/locales.js +74 -0
- package/lib/components/PisellContactBrief/types.d.ts +82 -0
- package/lib/components/PisellContactBrief/types.js +17 -0
- package/lib/components/dataSourceComponents/fields/Tabs/Tabs.less +8 -0
- package/lib/components/pisellActionPanel/PisellActionPanel.d.ts +13 -0
- package/lib/components/pisellActionPanel/PisellActionPanel.js +124 -0
- package/lib/components/pisellActionPanel/PisellActionPanel.less +69 -0
- package/lib/components/pisellActionPanel/PisellActionPanel.stories.d.ts +19 -0
- package/lib/components/pisellActionPanel/PisellActionPanel.stories.js +186 -0
- package/lib/components/pisellActionPanel/index.d.ts +6 -0
- package/lib/components/pisellActionPanel/index.js +29 -0
- package/lib/components/pisellActionPanel/types.d.ts +83 -0
- package/lib/components/pisellActionPanel/types.js +17 -0
- package/lib/components/pisellBaseCard/PisellBaseCard.d.ts +8 -0
- package/lib/components/pisellBaseCard/PisellBaseCard.js +124 -0
- package/lib/components/pisellBaseCard/PisellBaseCard.less +25 -0
- package/lib/components/pisellBaseCard/PisellBaseCard.stories.d.ts +19 -0
- package/lib/components/pisellBaseCard/PisellBaseCard.stories.js +107 -0
- package/lib/components/pisellBaseCard/index.d.ts +5 -0
- package/lib/components/pisellBaseCard/index.js +29 -0
- package/lib/components/pisellBaseCard/types.d.ts +45 -0
- package/lib/components/pisellBaseCard/types.js +17 -0
- package/lib/components/pisellCurrency/PisellCurrency.js +16 -10
- package/lib/components/pisellCurrency/PisellCurrency.less +0 -123
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +15 -0
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.js +143 -0
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.less +8 -0
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.stories.d.ts +23 -0
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.stories.js +171 -0
- package/lib/components/pisellCustomerBrief/index.d.ts +6 -0
- package/lib/components/pisellCustomerBrief/index.js +29 -0
- package/lib/components/pisellCustomerBrief/types.d.ts +82 -0
- package/lib/components/pisellCustomerBrief/types.js +17 -0
- package/lib/components/pisellEmail/PisellEmail.js +16 -10
- package/lib/components/pisellEmail/PisellEmail.less +0 -92
- package/lib/components/pisellEntityCard/PisellEntityCard.d.ts +8 -0
- package/lib/components/pisellEntityCard/PisellEntityCard.js +426 -0
- package/lib/components/pisellEntityCard/PisellEntityCard.less +362 -0
- package/lib/components/pisellEntityCard/PisellEntityCard.stories.d.ts +47 -0
- package/lib/components/pisellEntityCard/PisellEntityCard.stories.js +349 -0
- package/lib/components/pisellEntityCard/index.d.ts +5 -0
- package/lib/components/pisellEntityCard/index.js +29 -0
- package/lib/components/pisellEntityCard/types.d.ts +144 -0
- package/lib/components/pisellEntityCard/types.js +17 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +22 -3
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.stories.js +2 -2
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +4 -0
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +11 -1
- package/lib/components/pisellFloorMapLayout/types.d.ts +2 -0
- package/lib/components/pisellLongText/PisellLongText.js +16 -10
- package/lib/components/pisellLongText/PisellLongText.less +0 -67
- package/lib/components/pisellLookup/PisellLookup.js +5 -1
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.js +62 -53
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +18 -139
- package/lib/components/pisellMultipleSelect/components/EditView.js +42 -30
- package/lib/components/pisellNumber/PisellNumber.js +16 -10
- package/lib/components/pisellNumber/PisellNumber.less +0 -103
- package/lib/components/pisellPhone/PisellPhone.js +16 -10
- package/lib/components/pisellPhone/PisellPhone.less +0 -119
- package/lib/components/pisellPhone/components/EditView.js +40 -24
- package/lib/components/pisellPhone/constants/countryCodes.d.ts +1 -0
- package/lib/components/pisellPhone/constants/countryCodes.js +24 -24
- package/lib/components/pisellPhone/types.d.ts +2 -2
- package/lib/components/pisellPhone/utils/countryCodeHelper.d.ts +4 -4
- package/lib/components/pisellPhone/utils/countryCodeHelper.js +1 -1
- package/lib/components/pisellRating/PisellRating.js +4 -2
- package/lib/components/pisellSingleLineText/PisellSingleLineText.js +16 -10
- package/lib/components/pisellSingleLineText/PisellSingleLineText.less +58 -201
- package/lib/components/pisellSingleSelect/PisellSingleSelect.js +34 -35
- package/lib/components/pisellSingleSelect/PisellSingleSelect.less +5 -106
- package/lib/components/pisellUrl/PisellUrl.js +16 -10
- package/lib/components/pisellWalletPassCard/index.js +1 -1
- package/lib/index.d.ts +15 -4
- package/lib/index.js +18 -3
- package/lib/theme/pisell-components.d.ts +14 -0
- package/lib/theme/pisell-components.js +89 -0
- package/lowcode/pisell-action-panel/meta.ts +146 -0
- package/lowcode/pisell-action-panel/snippets.ts +42 -0
- package/lowcode/pisell-base-card/meta.ts +98 -0
- package/lowcode/pisell-base-card/snippets.ts +13 -0
- package/lowcode/pisell-contact-brief/meta.ts +178 -0
- package/lowcode/pisell-contact-brief/snippets.ts +40 -0
- package/lowcode/pisell-customer-brief/meta.ts +262 -0
- package/lowcode/pisell-customer-brief/snippets.ts +46 -0
- package/lowcode/pisell-entity-card/meta.ts +296 -0
- package/lowcode/pisell-entity-card/snippets.ts +41 -0
- package/lowcode/pisell-floor-map-layout/meta.ts +37 -1
- package/package.json +4 -4
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'PisellContactBrief',
|
|
6
|
+
title: '联系人简要卡片',
|
|
7
|
+
category: '数据展示',
|
|
8
|
+
docUrl: '',
|
|
9
|
+
screenshot: '',
|
|
10
|
+
devMode: 'proCode',
|
|
11
|
+
npm: {
|
|
12
|
+
package: '@pisell/materials',
|
|
13
|
+
version: '1.0.1',
|
|
14
|
+
exportName: 'PisellContactBrief',
|
|
15
|
+
main: 'src/index.tsx',
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: '',
|
|
18
|
+
},
|
|
19
|
+
experimental: { hideSelectTools: true },
|
|
20
|
+
configure: {
|
|
21
|
+
component: { isContainer: false },
|
|
22
|
+
supports: {
|
|
23
|
+
style: true,
|
|
24
|
+
events: [
|
|
25
|
+
{
|
|
26
|
+
name: 'onClick',
|
|
27
|
+
template:
|
|
28
|
+
"onClick(event,${extParams}){\n// 点击卡片时的回调\nconsole.log('onClick', event);}",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'onSubmit',
|
|
32
|
+
template:
|
|
33
|
+
"onSubmit(values,${extParams}){\n// 编辑弹窗提交后的回调,values 含 name/phone/email 及扩展字段\nconsole.log('onSubmit', values);}",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'onDelete',
|
|
37
|
+
template:
|
|
38
|
+
"onDelete(${extParams}){\n// 左滑删除确认后的回调\nconsole.log('onDelete');}",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
props: [
|
|
43
|
+
{
|
|
44
|
+
title: { label: { type: 'i18n', 'en-US': 'Data', 'zh-CN': '数据' } },
|
|
45
|
+
display: 'block',
|
|
46
|
+
type: 'group',
|
|
47
|
+
items: [
|
|
48
|
+
{
|
|
49
|
+
name: 'name',
|
|
50
|
+
title: {
|
|
51
|
+
label: { type: 'i18n', 'en-US': 'Name', 'zh-CN': '姓名' },
|
|
52
|
+
tip: 'name | 联系人姓名(主文案)',
|
|
53
|
+
},
|
|
54
|
+
propType: 'string',
|
|
55
|
+
setter: ['PisellI18nSetter', 'StringSetter', 'VariableSetter'],
|
|
56
|
+
isRequired: true,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'phone',
|
|
60
|
+
title: {
|
|
61
|
+
label: { type: 'i18n', 'en-US': 'Phone', 'zh-CN': '电话' },
|
|
62
|
+
tip: 'phone | 电话(与姓名同行的副标题)',
|
|
63
|
+
},
|
|
64
|
+
propType: 'string',
|
|
65
|
+
setter: ['PisellI18nSetter', 'StringSetter', 'VariableSetter'],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'email',
|
|
69
|
+
title: {
|
|
70
|
+
label: { type: 'i18n', 'en-US': 'Email', 'zh-CN': '邮箱' },
|
|
71
|
+
tip: 'email | 邮箱(次级文案)',
|
|
72
|
+
},
|
|
73
|
+
propType: 'string',
|
|
74
|
+
setter: ['PisellI18nSetter', 'StringSetter', 'VariableSetter'],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'avatar',
|
|
78
|
+
title: {
|
|
79
|
+
label: { type: 'i18n', 'en-US': 'Avatar', 'zh-CN': '头像' },
|
|
80
|
+
tip: 'avatar | 头像图片地址,不传则显示默认占位',
|
|
81
|
+
},
|
|
82
|
+
propType: 'string',
|
|
83
|
+
setter: ['StringSetter', 'VariableSetter'],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'extraData',
|
|
87
|
+
title: {
|
|
88
|
+
label: { type: 'i18n', 'en-US': 'Extra Data', 'zh-CN': '扩展字段值' },
|
|
89
|
+
tip: 'extraData | 扩展字段 key-value,与 extraFields 配置对应',
|
|
90
|
+
},
|
|
91
|
+
propType: 'object',
|
|
92
|
+
setter: ['JsonSetter', 'VariableSetter'],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'extraFields',
|
|
96
|
+
title: {
|
|
97
|
+
label: { type: 'i18n', 'en-US': 'Extra Fields', 'zh-CN': '可增加字段配置' },
|
|
98
|
+
tip: 'extraFields | 扩展字段配置 [{ key, label }],顺序即展示与表单顺序',
|
|
99
|
+
},
|
|
100
|
+
propType: { type: 'arrayOf', value: 'object' },
|
|
101
|
+
setter: {
|
|
102
|
+
componentName: 'ArraySetter',
|
|
103
|
+
props: {
|
|
104
|
+
itemSetter: {
|
|
105
|
+
componentName: 'ObjectSetter',
|
|
106
|
+
props: {
|
|
107
|
+
config: {
|
|
108
|
+
items: [
|
|
109
|
+
{ name: 'key', title: { label: '字段 key' }, propType: 'string', setter: ['StringSetter', 'VariableSetter'] },
|
|
110
|
+
{ name: 'label', title: { label: '展示/表单项 label' }, propType: 'string', setter: ['PisellI18nSetter', 'StringSetter'] },
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
title: { label: { type: 'i18n', 'en-US': 'Visibility', 'zh-CN': '显隐' } },
|
|
122
|
+
display: 'block',
|
|
123
|
+
type: 'group',
|
|
124
|
+
items: [
|
|
125
|
+
{ name: 'showAvatar', title: { label: '显示头像' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter' },
|
|
126
|
+
{ name: 'showPhone', title: { label: '显示电话' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter' },
|
|
127
|
+
{ name: 'showEmail', title: { label: '显示邮箱' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter' },
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
title: { label: { type: 'i18n', 'en-US': 'Layout', 'zh-CN': '布局' } },
|
|
132
|
+
display: 'block',
|
|
133
|
+
type: 'group',
|
|
134
|
+
items: [
|
|
135
|
+
{
|
|
136
|
+
name: 'layout',
|
|
137
|
+
title: { label: '布局方向' },
|
|
138
|
+
propType: { type: 'oneOf', value: ['horizontal', 'vertical'] },
|
|
139
|
+
defaultValue: 'horizontal',
|
|
140
|
+
setter: [
|
|
141
|
+
{
|
|
142
|
+
componentName: 'RadioGroupSetter',
|
|
143
|
+
props: {
|
|
144
|
+
options: [
|
|
145
|
+
{ title: '水平', value: 'horizontal' },
|
|
146
|
+
{ title: '竖向', value: 'vertical' },
|
|
147
|
+
],
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
'VariableSetter',
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
{ name: 'primaryLineClamp', title: { label: '主文案行数限制' }, propType: 'number', setter: ['NumberSetter', 'VariableSetter'] },
|
|
154
|
+
{ name: 'secondaryLineClamp', title: { label: '次级文案行数限制' }, propType: 'number', setter: ['NumberSetter', 'VariableSetter'] },
|
|
155
|
+
],
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
title: { label: { type: 'i18n', 'en-US': 'Swipe Delete', 'zh-CN': '左滑删除' } },
|
|
159
|
+
display: 'block',
|
|
160
|
+
type: 'group',
|
|
161
|
+
items: [
|
|
162
|
+
{ name: 'swipeToDelete', title: { label: '开启左滑删除' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter' },
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
title: { label: { type: 'i18n', 'en-US': 'Base', 'zh-CN': '基础' } },
|
|
167
|
+
display: 'block',
|
|
168
|
+
type: 'group',
|
|
169
|
+
items: [
|
|
170
|
+
{ name: 'className', title: { label: '样式类名' }, propType: 'string', setter: 'StringSetter' },
|
|
171
|
+
{ name: 'style', title: { label: '样式' }, propType: 'object', setter: 'StyleSetter' },
|
|
172
|
+
{ name: 'clickable', title: { label: '可点击' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter' },
|
|
173
|
+
{ name: 'disabled', title: { label: '禁用' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter' },
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
},
|
|
178
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '联系人简要卡片',
|
|
4
|
+
screenshot: '',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'PisellContactBrief',
|
|
7
|
+
props: {
|
|
8
|
+
name: '联系人姓名',
|
|
9
|
+
phone: '+86 138 0000 0000',
|
|
10
|
+
email: 'contact@example.com',
|
|
11
|
+
avatar: '',
|
|
12
|
+
extraData: {},
|
|
13
|
+
extraFields: [],
|
|
14
|
+
showAvatar: true,
|
|
15
|
+
showPhone: true,
|
|
16
|
+
showEmail: true,
|
|
17
|
+
layout: 'horizontal',
|
|
18
|
+
swipeToDelete: false,
|
|
19
|
+
clickable: true,
|
|
20
|
+
disabled: false,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: '联系人简要卡片-竖向',
|
|
26
|
+
screenshot: '',
|
|
27
|
+
schema: {
|
|
28
|
+
componentName: 'PisellContactBrief',
|
|
29
|
+
props: {
|
|
30
|
+
name: '联系人姓名',
|
|
31
|
+
phone: '+86 138 0000 0000',
|
|
32
|
+
email: 'contact@example.com',
|
|
33
|
+
layout: 'vertical',
|
|
34
|
+
showAvatar: true,
|
|
35
|
+
showPhone: true,
|
|
36
|
+
showEmail: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
];
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'PisellCustomerBrief',
|
|
6
|
+
title: '客户简要卡片',
|
|
7
|
+
category: '数据展示',
|
|
8
|
+
docUrl: '',
|
|
9
|
+
screenshot: '',
|
|
10
|
+
devMode: 'proCode',
|
|
11
|
+
npm: {
|
|
12
|
+
package: '@pisell/materials',
|
|
13
|
+
version: '1.0.1',
|
|
14
|
+
exportName: 'PisellCustomerBrief',
|
|
15
|
+
main: 'src/index.tsx',
|
|
16
|
+
destructuring: true,
|
|
17
|
+
subName: '',
|
|
18
|
+
},
|
|
19
|
+
experimental: { hideSelectTools: true },
|
|
20
|
+
configure: {
|
|
21
|
+
component: { isContainer: false },
|
|
22
|
+
supports: {
|
|
23
|
+
style: true,
|
|
24
|
+
events: [
|
|
25
|
+
{
|
|
26
|
+
name: 'onClick',
|
|
27
|
+
template:
|
|
28
|
+
"onClick(event,${extParams}){\n// 点击卡片时的回调\nconsole.log('onClick', event);}",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'onDelete',
|
|
32
|
+
template:
|
|
33
|
+
"onDelete(${extParams}){\n// 左滑删除确认后的回调\nconsole.log('onDelete');}",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
props: [
|
|
38
|
+
{
|
|
39
|
+
title: { label: { type: 'i18n', 'en-US': 'Data', 'zh-CN': '数据' } },
|
|
40
|
+
display: 'block',
|
|
41
|
+
type: 'group',
|
|
42
|
+
items: [
|
|
43
|
+
{
|
|
44
|
+
name: 'name',
|
|
45
|
+
title: {
|
|
46
|
+
label: { type: 'i18n', 'en-US': 'Name', 'zh-CN': '客户名称' },
|
|
47
|
+
tip: 'name | 主文案',
|
|
48
|
+
},
|
|
49
|
+
propType: 'string',
|
|
50
|
+
setter: ['PisellI18nSetter', 'StringSetter', 'VariableSetter'],
|
|
51
|
+
isRequired: true,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'subtitle',
|
|
55
|
+
title: {
|
|
56
|
+
label: { type: 'i18n', 'en-US': 'Subtitle', 'zh-CN': '副标题' },
|
|
57
|
+
tip: 'subtitle | 与主标题同行(如电话、客户编号)',
|
|
58
|
+
},
|
|
59
|
+
propType: 'string',
|
|
60
|
+
setter: ['PisellI18nSetter', 'StringSetter', 'VariableSetter'],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'avatar',
|
|
64
|
+
title: {
|
|
65
|
+
label: { type: 'i18n', 'en-US': 'Avatar', 'zh-CN': '头像' },
|
|
66
|
+
tip: 'avatar | 不传则显示默认占位',
|
|
67
|
+
},
|
|
68
|
+
propType: 'string',
|
|
69
|
+
setter: ['StringSetter', 'VariableSetter'],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'email',
|
|
73
|
+
title: { label: { type: 'i18n', 'en-US': 'Email', 'zh-CN': '邮箱' }, tip: '扩展信息' },
|
|
74
|
+
propType: 'string',
|
|
75
|
+
setter: ['PisellI18nSetter', 'StringSetter', 'VariableSetter'],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: 'address',
|
|
79
|
+
title: { label: { type: 'i18n', 'en-US': 'Address', 'zh-CN': '地址' }, tip: '扩展信息' },
|
|
80
|
+
propType: 'string',
|
|
81
|
+
setter: ['PisellI18nSetter', 'StringSetter', 'VariableSetter'],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'company',
|
|
85
|
+
title: { label: { type: 'i18n', 'en-US': 'Company', 'zh-CN': '公司' }, tip: '扩展信息' },
|
|
86
|
+
propType: 'string',
|
|
87
|
+
setter: ['PisellI18nSetter', 'StringSetter', 'VariableSetter'],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'date',
|
|
91
|
+
title: { label: { type: 'i18n', 'en-US': 'Date', 'zh-CN': '日期' }, tip: '扩展信息(如创建日期)' },
|
|
92
|
+
propType: 'string',
|
|
93
|
+
setter: ['PisellI18nSetter', 'StringSetter', 'VariableSetter'],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'extendedFields',
|
|
97
|
+
title: {
|
|
98
|
+
label: { type: 'i18n', 'en-US': 'Extended Fields', 'zh-CN': '自定义扩展字段' },
|
|
99
|
+
tip: 'extendedFields | [{ text, showTooltip? }],顺序即展示顺序',
|
|
100
|
+
},
|
|
101
|
+
propType: { type: 'arrayOf', value: 'object' },
|
|
102
|
+
setter: {
|
|
103
|
+
componentName: 'ArraySetter',
|
|
104
|
+
props: {
|
|
105
|
+
itemSetter: {
|
|
106
|
+
componentName: 'ObjectSetter',
|
|
107
|
+
props: {
|
|
108
|
+
config: {
|
|
109
|
+
items: [
|
|
110
|
+
{ name: 'text', title: { label: '文本' }, propType: 'string', setter: ['PisellI18nSetter', 'StringSetter'] },
|
|
111
|
+
{ name: 'showTooltip', title: { label: '显示提示图标' }, propType: 'bool', setter: 'BoolSetter' },
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'tags',
|
|
121
|
+
title: {
|
|
122
|
+
label: { type: 'i18n', 'en-US': 'Tags', 'zh-CN': '标签' },
|
|
123
|
+
tip: 'tags | 如等级、状态,顺序即展示顺序',
|
|
124
|
+
},
|
|
125
|
+
propType: { type: 'arrayOf', value: 'object' },
|
|
126
|
+
setter: {
|
|
127
|
+
componentName: 'ArraySetter',
|
|
128
|
+
props: {
|
|
129
|
+
itemSetter: {
|
|
130
|
+
componentName: 'ObjectSetter',
|
|
131
|
+
props: {
|
|
132
|
+
config: {
|
|
133
|
+
items: [
|
|
134
|
+
{ name: 'text', title: { label: '文本' }, propType: 'string', setter: ['PisellI18nSetter', 'StringSetter'] },
|
|
135
|
+
{ name: 'style', title: { label: '样式' }, propType: 'object', setter: 'StyleSetter' },
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'actions',
|
|
145
|
+
title: {
|
|
146
|
+
label: { type: 'i18n', 'en-US': 'Actions', 'zh-CN': '操作项' },
|
|
147
|
+
tip: 'actions | 需开启 showActions;支持 text/button/icon',
|
|
148
|
+
},
|
|
149
|
+
propType: { type: 'arrayOf', value: 'object' },
|
|
150
|
+
setter: {
|
|
151
|
+
componentName: 'ArraySetter',
|
|
152
|
+
props: {
|
|
153
|
+
itemSetter: {
|
|
154
|
+
componentName: 'ObjectSetter',
|
|
155
|
+
props: {
|
|
156
|
+
config: {
|
|
157
|
+
items: [
|
|
158
|
+
{
|
|
159
|
+
name: 'type',
|
|
160
|
+
title: { label: '形式' },
|
|
161
|
+
propType: { type: 'oneOf', value: ['text', 'button', 'icon'] },
|
|
162
|
+
setter: 'RadioGroupSetter',
|
|
163
|
+
},
|
|
164
|
+
{ name: 'label', title: { label: '文案' }, propType: 'string', setter: ['PisellI18nSetter', 'StringSetter'] },
|
|
165
|
+
{ name: 'icon', title: { label: '图标' }, propType: 'node', setter: 'SlotSetter' },
|
|
166
|
+
{ name: 'style', title: { label: '样式' }, propType: 'object', setter: 'StyleSetter' },
|
|
167
|
+
{ name: 'className', title: { label: '类名' }, propType: 'string', setter: 'StringSetter' },
|
|
168
|
+
],
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
title: { label: { type: 'i18n', 'en-US': 'Visibility', 'zh-CN': '显隐' } },
|
|
179
|
+
display: 'block',
|
|
180
|
+
type: 'group',
|
|
181
|
+
items: [
|
|
182
|
+
{ name: 'showAvatar', title: { label: '显示头像' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter' },
|
|
183
|
+
{ name: 'showPrimaryText', title: { label: '显示主文案' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter' },
|
|
184
|
+
{ name: 'showSubtitle', title: { label: '显示副标题' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter' },
|
|
185
|
+
{ name: 'showExtended', title: { label: '显示扩展信息' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter' },
|
|
186
|
+
{ name: 'showTags', title: { label: '显示标签' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter' },
|
|
187
|
+
{ name: 'showActions', title: { label: '显示操作区' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter' },
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
title: { label: { type: 'i18n', 'en-US': 'Layout', 'zh-CN': '密度与布局' } },
|
|
192
|
+
display: 'block',
|
|
193
|
+
type: 'group',
|
|
194
|
+
items: [
|
|
195
|
+
{
|
|
196
|
+
name: 'density',
|
|
197
|
+
title: { label: '信息密度', tip: 'B1/B2/B5/B9' },
|
|
198
|
+
propType: { type: 'oneOf', value: ['B1', 'B2', 'B5', 'B9'] },
|
|
199
|
+
defaultValue: 'B2',
|
|
200
|
+
setter: [
|
|
201
|
+
{
|
|
202
|
+
componentName: 'RadioGroupSetter',
|
|
203
|
+
props: {
|
|
204
|
+
options: [
|
|
205
|
+
{ title: 'B1-一行', value: 'B1' },
|
|
206
|
+
{ title: 'B2-两行', value: 'B2' },
|
|
207
|
+
{ title: 'B5-五行', value: 'B5' },
|
|
208
|
+
{ title: 'B9-全部', value: 'B9' },
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
'VariableSetter',
|
|
213
|
+
],
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'layout',
|
|
217
|
+
title: { label: '布局方向' },
|
|
218
|
+
propType: { type: 'oneOf', value: ['horizontal', 'vertical'] },
|
|
219
|
+
defaultValue: 'horizontal',
|
|
220
|
+
setter: ['RadioGroupSetter', 'VariableSetter'],
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
name: 'width',
|
|
224
|
+
title: { label: '卡片宽度', tip: 'content | full | 数字(px)' },
|
|
225
|
+
propType: { type: 'oneOfType', value: ['string', 'number'] },
|
|
226
|
+
defaultValue: 'content',
|
|
227
|
+
setter: ['StringSetter', 'NumberSetter', 'VariableSetter'],
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'tagPosition',
|
|
231
|
+
title: { label: '标签位置' },
|
|
232
|
+
propType: { type: 'oneOf', value: ['inline', 'below'] },
|
|
233
|
+
defaultValue: 'below',
|
|
234
|
+
setter: 'RadioGroupSetter',
|
|
235
|
+
},
|
|
236
|
+
{ name: 'contentGap', title: { label: '内容间距' }, propType: { type: 'oneOfType', value: ['number', 'string'] }, setter: ['NumberSetter', 'StringSetter'] },
|
|
237
|
+
{ name: 'primaryLineClamp', title: { label: '主文案行数' }, propType: 'number', setter: ['NumberSetter', 'VariableSetter'] },
|
|
238
|
+
{ name: 'secondaryLineClamp', title: { label: '扩展信息行数' }, propType: 'number', setter: ['NumberSetter', 'VariableSetter'] },
|
|
239
|
+
],
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
title: { label: { type: 'i18n', 'en-US': 'Swipe Delete', 'zh-CN': '左滑删除' } },
|
|
243
|
+
display: 'block',
|
|
244
|
+
type: 'group',
|
|
245
|
+
items: [
|
|
246
|
+
{ name: 'swipeToDelete', title: { label: '开启左滑删除' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter' },
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
title: { label: { type: 'i18n', 'en-US': 'Base', 'zh-CN': '基础' } },
|
|
251
|
+
display: 'block',
|
|
252
|
+
type: 'group',
|
|
253
|
+
items: [
|
|
254
|
+
{ name: 'className', title: { label: '样式类名' }, propType: 'string', setter: 'StringSetter' },
|
|
255
|
+
{ name: 'style', title: { label: '样式' }, propType: 'object', setter: 'StyleSetter' },
|
|
256
|
+
{ name: 'clickable', title: { label: '可点击' }, propType: 'bool', defaultValue: true, setter: 'BoolSetter' },
|
|
257
|
+
{ name: 'disabled', title: { label: '禁用' }, propType: 'bool', defaultValue: false, setter: 'BoolSetter' },
|
|
258
|
+
],
|
|
259
|
+
},
|
|
260
|
+
],
|
|
261
|
+
},
|
|
262
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '客户简要卡片',
|
|
4
|
+
screenshot: '',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'PisellCustomerBrief',
|
|
7
|
+
props: {
|
|
8
|
+
name: '某某科技有限公司',
|
|
9
|
+
subtitle: '+86 138 0000 0000',
|
|
10
|
+
email: 'contact@company.com',
|
|
11
|
+
company: '某某科技有限公司',
|
|
12
|
+
tags: [{ text: 'VIP' }, { text: '已签约' }],
|
|
13
|
+
density: 'B2',
|
|
14
|
+
layout: 'horizontal',
|
|
15
|
+
showAvatar: true,
|
|
16
|
+
showPrimaryText: true,
|
|
17
|
+
showSubtitle: true,
|
|
18
|
+
showExtended: true,
|
|
19
|
+
showTags: true,
|
|
20
|
+
showActions: false,
|
|
21
|
+
swipeToDelete: false,
|
|
22
|
+
clickable: true,
|
|
23
|
+
disabled: false,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: '客户简要卡片-竖向',
|
|
29
|
+
screenshot: '',
|
|
30
|
+
schema: {
|
|
31
|
+
componentName: 'PisellCustomerBrief',
|
|
32
|
+
props: {
|
|
33
|
+
name: '某某科技有限公司',
|
|
34
|
+
subtitle: '客户编号 C001',
|
|
35
|
+
email: 'contact@company.com',
|
|
36
|
+
company: '某某科技有限公司',
|
|
37
|
+
tags: [{ text: 'VIP' }],
|
|
38
|
+
density: 'B2',
|
|
39
|
+
layout: 'vertical',
|
|
40
|
+
showAvatar: true,
|
|
41
|
+
showExtended: true,
|
|
42
|
+
showTags: true,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
];
|