@pisell/private-materials 3.4.42 → 3.4.44
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 +9 -1
- package/build/lowcode/preview.js +150 -155
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +3 -2
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/components/Services/index.js +22 -8
- package/es/components/appointmentBooking/hooks.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/customSelect/index.js +1 -1
- package/es/components/booking/components/footer/index.js +4 -1
- package/es/components/booking/components/footer/utils.js +75 -73
- package/es/components/booking/forms/footer.js +24 -10
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/info/client/index.js +28 -13
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
- package/es/components/booking/info/main.js +3 -2
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
- package/es/components/booking/locales.d.ts +6 -0
- package/es/components/booking/locales.js +12 -3
- package/es/components/booking/model.d.ts +13 -1
- package/es/components/booking/model.js +3 -0
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/eftposPay/app.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/clientName/index.d.ts +4 -0
- package/es/plus/clientName/index.js +18 -0
- package/es/plus/clientName/index.less +10 -0
- package/es/plus/clientName/type.d.ts +13 -0
- package/es/plus/clientName/type.js +1 -0
- package/es/plus/clientName/utils.d.ts +2 -0
- package/es/plus/clientName/utils.js +18 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
- package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/es/plus/contactInfo/index.d.ts +6 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.d.ts +41 -0
- package/es/plus/contactInfoModal/index.js +155 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/contactInfoModal/locales.js +65 -0
- package/es/plus/productSelect/ProductCard/index.d.ts +3 -1
- package/es/plus/productSelect/ProductCard/index.js +14 -5
- package/es/plus/productSelect/index.d.ts +3 -2
- package/es/plus/productSelect/index.js +33 -8
- package/es/plus/productSelect/index.less +4 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +5 -3
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/components/Services/index.js +8 -3
- package/lib/components/appointmentBooking/hooks.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/customSelect/index.js +1 -1
- package/lib/components/booking/components/footer/index.js +4 -1
- package/lib/components/booking/components/footer/utils.js +93 -68
- package/lib/components/booking/forms/footer.js +29 -11
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/info/client/index.js +14 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
- package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
- package/lib/components/booking/info/main.js +5 -4
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/index.js +5 -4
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
- package/lib/components/booking/locales.d.ts +6 -0
- package/lib/components/booking/locales.js +12 -3
- package/lib/components/booking/model.d.ts +13 -1
- package/lib/components/booking/model.js +3 -0
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/eftposPay/app.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/ApplePay/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/GooglePay/index.js +1 -1
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/clientName/index.d.ts +4 -0
- package/lib/plus/clientName/index.js +53 -0
- package/lib/plus/clientName/index.less +10 -0
- package/lib/plus/clientName/type.d.ts +13 -0
- package/lib/plus/clientName/type.js +17 -0
- package/lib/plus/clientName/utils.d.ts +2 -0
- package/lib/plus/clientName/utils.js +43 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/lib/plus/contactInfo/index.d.ts +6 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.d.ts +41 -0
- package/lib/plus/contactInfoModal/index.js +139 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/contactInfoModal/locales.js +89 -0
- package/lib/plus/productSelect/ProductCard/index.d.ts +3 -1
- package/lib/plus/productSelect/ProductCard/index.js +18 -4
- package/lib/plus/productSelect/index.d.ts +3 -2
- package/lib/plus/productSelect/index.js +20 -6
- package/lib/plus/productSelect/index.less +4 -0
- package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
- package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
- package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
- package/lowcode/contact-info/fragments/textStyle.ts +33 -0
- package/lowcode/contact-info/meta.ts +199 -0
- package/lowcode/contact-info-modal/meta.ts +98 -0
- package/package.json +6 -4
|
@@ -29,10 +29,12 @@ export interface ProductCardProps {
|
|
|
29
29
|
onSelectProduct?: (item: any) => void;
|
|
30
30
|
currentProductId?: number;
|
|
31
31
|
onSelect?: (item: any) => void;
|
|
32
|
+
onSelectCover?: (item: any) => void;
|
|
33
|
+
onSelectInfo?: (item: any) => void;
|
|
32
34
|
isSelected?: boolean;
|
|
33
35
|
decorateConfig?: ProductCardConfig;
|
|
34
36
|
}
|
|
35
|
-
export declare const ProductCard: React.MemoExoticComponent<({ item, index, context, onSelect, isSelected, className, decorateConfig, }: ProductCardProps) => JSX.Element>;
|
|
37
|
+
export declare const ProductCard: React.MemoExoticComponent<({ item, index, context, onSelect, onSelectCover, onSelectInfo, isSelected, className, decorateConfig, }: ProductCardProps) => JSX.Element>;
|
|
36
38
|
export declare const DefaultItemContent: React.MemoExoticComponent<(props: {
|
|
37
39
|
item: any;
|
|
38
40
|
index: number;
|
|
@@ -66,6 +66,8 @@ var ProductCard = (0, import_react.memo)(
|
|
|
66
66
|
index,
|
|
67
67
|
context,
|
|
68
68
|
onSelect,
|
|
69
|
+
onSelectCover,
|
|
70
|
+
onSelectInfo,
|
|
69
71
|
isSelected,
|
|
70
72
|
className,
|
|
71
73
|
decorateConfig = {}
|
|
@@ -129,9 +131,6 @@ var ProductCard = (0, import_react.memo)(
|
|
|
129
131
|
className: (0, import_classnames.default)(`${import__.PREFIX}__product-card`, className, {
|
|
130
132
|
selected: isSelected
|
|
131
133
|
}),
|
|
132
|
-
onClick: () => {
|
|
133
|
-
onSelect == null ? void 0 : onSelect(item);
|
|
134
|
-
},
|
|
135
134
|
"data-index": index,
|
|
136
135
|
"data-item-index": index
|
|
137
136
|
},
|
|
@@ -142,6 +141,9 @@ var ProductCard = (0, import_react.memo)(
|
|
|
142
141
|
style: {
|
|
143
142
|
width: imgWidth || "auto",
|
|
144
143
|
height: imgHeight || "auto"
|
|
144
|
+
},
|
|
145
|
+
onClick: () => {
|
|
146
|
+
onSelectCover == null ? void 0 : onSelectCover(item);
|
|
145
147
|
}
|
|
146
148
|
},
|
|
147
149
|
item.cover ? /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -154,7 +156,19 @@ var ProductCard = (0, import_react.memo)(
|
|
|
154
156
|
}
|
|
155
157
|
) : /* @__PURE__ */ import_react.default.createElement("div", { className: "text-cover", style: { borderRadius: radius } }, getTextCover(item.title))
|
|
156
158
|
) : null,
|
|
157
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
159
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
className: "card-right",
|
|
163
|
+
onClick: () => {
|
|
164
|
+
onSelectInfo == null ? void 0 : onSelectInfo(item);
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
!!isTitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "title" }, item.title) : null,
|
|
168
|
+
!!isSubtitle && item.subtitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "subtitle" }, item.subtitle) : null,
|
|
169
|
+
!!isStock && !!item.is_track ? /* @__PURE__ */ import_react.default.createElement("div", { className: "stock" }, getStockText(item)) : null,
|
|
170
|
+
renderPrice(item)
|
|
171
|
+
)
|
|
158
172
|
);
|
|
159
173
|
if (context) {
|
|
160
174
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -8,7 +8,7 @@ interface ProductSelectProps {
|
|
|
8
8
|
grid: boolean;
|
|
9
9
|
config: string;
|
|
10
10
|
};
|
|
11
|
-
onChange: (value: any) => void;
|
|
11
|
+
onChange: (value: any, type?: string) => void;
|
|
12
12
|
value?: number;
|
|
13
13
|
loading?: boolean;
|
|
14
14
|
style?: React.CSSProperties;
|
|
@@ -25,7 +25,8 @@ interface ProductSelectProps {
|
|
|
25
25
|
productListSetting?: Partial<any>;
|
|
26
26
|
/** 兼容scrollDom */
|
|
27
27
|
customScrollParent?: HTMLElement | string;
|
|
28
|
+
hideCategoryWhenOne?: boolean;
|
|
28
29
|
}
|
|
29
30
|
export declare const PREFIX = "pisell-product-select";
|
|
30
|
-
declare const index: ({ dataSource, emptyDescription, showSearch, scrollDom, offsetDom, style, token: customToken, onChange, value, selectedItems, productListSetting, customScrollParent, loading, layout, ...rest }: ProductSelectProps) => JSX.Element;
|
|
31
|
+
declare const index: ({ dataSource, emptyDescription, showSearch, scrollDom, offsetDom, style, token: customToken, onChange, value, selectedItems, productListSetting, customScrollParent, loading, layout, hideCategoryWhenOne, ...rest }: ProductSelectProps) => JSX.Element;
|
|
31
32
|
export default index;
|
|
@@ -79,6 +79,7 @@ var index = ({
|
|
|
79
79
|
customScrollParent,
|
|
80
80
|
loading = false,
|
|
81
81
|
layout,
|
|
82
|
+
hideCategoryWhenOne = false,
|
|
82
83
|
...rest
|
|
83
84
|
}) => {
|
|
84
85
|
const searchRef = (0, import_react.useRef)(null);
|
|
@@ -119,6 +120,12 @@ var index = ({
|
|
|
119
120
|
};
|
|
120
121
|
});
|
|
121
122
|
}, [_groupedList]);
|
|
123
|
+
const isHideCategory = (0, import_react.useMemo)(() => {
|
|
124
|
+
if (hideCategoryWhenOne) {
|
|
125
|
+
return (_categories == null ? void 0 : _categories.length) === 1 || !(_categories == null ? void 0 : _categories.length);
|
|
126
|
+
}
|
|
127
|
+
return false;
|
|
128
|
+
}, [_categories, hideCategoryWhenOne]);
|
|
122
129
|
(0, import_react.useEffect)(() => {
|
|
123
130
|
if (!(_categories == null ? void 0 : _categories.length)) {
|
|
124
131
|
setActiveKey("");
|
|
@@ -158,9 +165,9 @@ var index = ({
|
|
|
158
165
|
return !!(productListSetting == null ? void 0 : productListSetting.list_max_length) && Array.isArray(selectedItems) && (selectedItems == null ? void 0 : selectedItems.length) > 0;
|
|
159
166
|
}, [productListSetting, selectedItems]);
|
|
160
167
|
const _onChange = (0, import_react.useCallback)(
|
|
161
|
-
(value2) => {
|
|
168
|
+
(value2, type) => {
|
|
162
169
|
if (disabled) return;
|
|
163
|
-
onChange == null ? void 0 : onChange(value2);
|
|
170
|
+
onChange == null ? void 0 : onChange(value2, type);
|
|
164
171
|
},
|
|
165
172
|
[disabled, onChange]
|
|
166
173
|
);
|
|
@@ -237,7 +244,7 @@ var index = ({
|
|
|
237
244
|
}
|
|
238
245
|
}
|
|
239
246
|
)) : null,
|
|
240
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
247
|
+
!isHideCategory ? /* @__PURE__ */ import_react.default.createElement(
|
|
241
248
|
import_CategoryTabs.default,
|
|
242
249
|
{
|
|
243
250
|
activeKey,
|
|
@@ -246,7 +253,7 @@ var index = ({
|
|
|
246
253
|
loading,
|
|
247
254
|
skeleton: /* @__PURE__ */ import_react.default.createElement(import_CategoryTabs.CategorySkeleton, null)
|
|
248
255
|
}
|
|
249
|
-
),
|
|
256
|
+
) : null,
|
|
250
257
|
!loading && !(_groupedList == null ? void 0 : _groupedList.length) ? /* @__PURE__ */ import_react.default.createElement(
|
|
251
258
|
import_materials2.PisellEmpty,
|
|
252
259
|
{
|
|
@@ -261,7 +268,9 @@ var index = ({
|
|
|
261
268
|
/* @__PURE__ */ import_react.default.createElement(
|
|
262
269
|
import_ProductList.default,
|
|
263
270
|
{
|
|
264
|
-
className: `${PREFIX}__product-list`,
|
|
271
|
+
className: (0, import_classnames.default)(`${PREFIX}__product-list`, {
|
|
272
|
+
[`${PREFIX}__product-list_hide_category`]: isHideCategory
|
|
273
|
+
}),
|
|
265
274
|
loading,
|
|
266
275
|
data: loading ? MOCK_DATA : _groupedList,
|
|
267
276
|
context: {
|
|
@@ -281,7 +290,12 @@ var index = ({
|
|
|
281
290
|
index: index2,
|
|
282
291
|
item,
|
|
283
292
|
context: context2,
|
|
284
|
-
|
|
293
|
+
onSelectCover: (e) => {
|
|
294
|
+
_onChange(e, "cover");
|
|
295
|
+
},
|
|
296
|
+
onSelectInfo: (e) => {
|
|
297
|
+
_onChange(e, "info");
|
|
298
|
+
},
|
|
285
299
|
isSelected: item.id === value,
|
|
286
300
|
decorateConfig: productListSetting
|
|
287
301
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '宽度',
|
|
4
|
+
name: 'style.width',
|
|
5
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
title: '高度',
|
|
9
|
+
name: 'style.height',
|
|
10
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
title: '显示边框',
|
|
14
|
+
name: 'style.borderStyle',
|
|
15
|
+
setter: {
|
|
16
|
+
componentName: 'RadioGroupSetter',
|
|
17
|
+
props: {
|
|
18
|
+
options: [
|
|
19
|
+
{
|
|
20
|
+
label: '显示边框',
|
|
21
|
+
value: 'solid',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: '无边框',
|
|
25
|
+
value: 'none',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
initialValue: 'solid',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: '边框粗细',
|
|
34
|
+
name: 'style.borderWidth',
|
|
35
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
36
|
+
defaultValue: 1,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: '边框颜色',
|
|
40
|
+
name: 'style.borderColor',
|
|
41
|
+
setter: ['ColorSetter'],
|
|
42
|
+
defaultValue: '#D0D5DD',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
title: '圆角',
|
|
46
|
+
name: 'style.borderRadius',
|
|
47
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
48
|
+
defaultValue: 8,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: '内边距',
|
|
52
|
+
name: 'style.padding',
|
|
53
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
54
|
+
defaultValue: 8,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
title: { label: '左右间距', tip: '头像与内容之间间距' },
|
|
58
|
+
name: 'horizontalGap',
|
|
59
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
60
|
+
defaultValue: 8,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: { label: '字段', tip: '字段上下间距' },
|
|
64
|
+
name: 'verticalGap',
|
|
65
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
66
|
+
defaultValue: 4,
|
|
67
|
+
},
|
|
68
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
type: 'group',
|
|
4
|
+
display: 'plain',
|
|
5
|
+
title: '姓名样式',
|
|
6
|
+
items: [
|
|
7
|
+
{
|
|
8
|
+
title: '文本大小',
|
|
9
|
+
name: 'nameStyle.fontSize',
|
|
10
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
11
|
+
defaultValue: 14,
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: '文本粗细',
|
|
15
|
+
name: 'nameStyle.fontWeight',
|
|
16
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
17
|
+
defaultValue: 600,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: '文本颜色',
|
|
21
|
+
name: 'nameStyle.color',
|
|
22
|
+
setter: ['ColorSetter'],
|
|
23
|
+
defaultValue: '#101828',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: '文本下划线',
|
|
27
|
+
name: 'nameStyle.textDecoration',
|
|
28
|
+
setter: ['StringSetter'],
|
|
29
|
+
defaultvalu: 'unset',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
];
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { AntdIconSetter } from '@pisell/materials/lowcode/_setters';
|
|
2
|
+
export default [
|
|
3
|
+
// {
|
|
4
|
+
// name: 'avatar.icon',
|
|
5
|
+
// title: { label: '头像图标', tip: 'icon | 设置头像的自定义图标' },
|
|
6
|
+
// setter: AntdIconSetter,
|
|
7
|
+
// },
|
|
8
|
+
{
|
|
9
|
+
name: 'avatar.shape',
|
|
10
|
+
title: { label: '头像形状', tip: 'shape | 指定头像的形状' },
|
|
11
|
+
setter: {
|
|
12
|
+
componentName: 'RadioGroupSetter',
|
|
13
|
+
props: {
|
|
14
|
+
options: ['circle', 'square'],
|
|
15
|
+
},
|
|
16
|
+
initialValue: 'circle',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'avatar.borderRadius',
|
|
21
|
+
title: { label: '圆角度数', tip: 'borderRadius | 方形头像的圆角大小' },
|
|
22
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
23
|
+
defaultValue: 4,
|
|
24
|
+
condition: (target: any) => {
|
|
25
|
+
const shape = target.getProps().getPropValue('avatar.shape');
|
|
26
|
+
return shape === 'square';
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'avatar.size',
|
|
31
|
+
title: { label: '尺寸', tip: 'size | 设置头像的大小' },
|
|
32
|
+
setter: [
|
|
33
|
+
{
|
|
34
|
+
componentName: 'SelectSetter',
|
|
35
|
+
props: {
|
|
36
|
+
options: [
|
|
37
|
+
{
|
|
38
|
+
label: 'xs',
|
|
39
|
+
value: 'xs',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: 'sm',
|
|
43
|
+
value: 'sm',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: 'md',
|
|
47
|
+
value: 'md',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: 'lg',
|
|
51
|
+
value: 'lg',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: 'xl',
|
|
55
|
+
value: 'xl',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: 'xxl',
|
|
59
|
+
value: 'xxl',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
'NumberSetter',
|
|
65
|
+
'StringSetter',
|
|
66
|
+
],
|
|
67
|
+
defaultValue: 'md',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'avatar.useTextAvatar',
|
|
71
|
+
title: {
|
|
72
|
+
label: '使用文本头像',
|
|
73
|
+
tip: 'useTextAvatar | 是否使用文本作为头像',
|
|
74
|
+
},
|
|
75
|
+
setter: 'BoolSetter',
|
|
76
|
+
defaultValue: false,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'avatar.children',
|
|
80
|
+
title: { label: '文本内容', tip: 'children | 文本头像的内容' },
|
|
81
|
+
setter: 'StringSetter',
|
|
82
|
+
condition: {
|
|
83
|
+
type: 'JSFunction',
|
|
84
|
+
value: "target => target.getProps().getPropValue('avatar.useTextAvatar')",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
// {
|
|
88
|
+
// title: '头像状态',
|
|
89
|
+
// name: 'avatar.isShowStatus',
|
|
90
|
+
// condition: (target: any) => target.getProps().getPropValue('isShowAvatar'),
|
|
91
|
+
// setter: 'BoolSetter',
|
|
92
|
+
// defaultValue: false,
|
|
93
|
+
// },
|
|
94
|
+
// {
|
|
95
|
+
// title: '状态颜色',
|
|
96
|
+
// name: 'avatar.statusColor',
|
|
97
|
+
// condition: (target: any) =>
|
|
98
|
+
// target.getProps().getPropValue('isShowAvatar') &&
|
|
99
|
+
// target.getProps().getPropValue('avatar.isShowStatus'),
|
|
100
|
+
// setter: 'ColorSetter',
|
|
101
|
+
// defaultValue: '#17B26A',
|
|
102
|
+
// },
|
|
103
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
type: 'group',
|
|
4
|
+
display: 'plain',
|
|
5
|
+
title: '文本样式',
|
|
6
|
+
items: [
|
|
7
|
+
{
|
|
8
|
+
title: '文本大小',
|
|
9
|
+
name: 'textStyle.fontSize',
|
|
10
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
11
|
+
defaultValue: 14,
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
title: '文本粗细',
|
|
15
|
+
name: 'textStyle.fontWeight',
|
|
16
|
+
setter: ['NumberSetter', 'StringSetter'],
|
|
17
|
+
defaultValue: 400,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: '文本颜色',
|
|
21
|
+
name: 'textStyle.color',
|
|
22
|
+
setter: ['ColorSetter'],
|
|
23
|
+
defaultValue: '#667085',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: '文本下划线',
|
|
27
|
+
name: 'textStyle.textDecoration',
|
|
28
|
+
setter: ['StringSetter'],
|
|
29
|
+
defaultvalu: 'unset',
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
];
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import pisellAvatarProps from './fragments/pisellAvatar';
|
|
2
|
+
import cardStyleProps from './fragments/cardStyle';
|
|
3
|
+
import nameStyleProps from './fragments/nameStyle';
|
|
4
|
+
import textStyleProps from './fragments/textStyle';
|
|
5
|
+
import { AntdIconSetter } from '@pisell/materials/lowcode/_setters';
|
|
6
|
+
|
|
7
|
+
const ContactInfoMeta = {
|
|
8
|
+
componentName: 'ContactInfo',
|
|
9
|
+
title: '联系信息',
|
|
10
|
+
docUrl: '',
|
|
11
|
+
screenshot: '',
|
|
12
|
+
devMode: 'proCode',
|
|
13
|
+
npm: {
|
|
14
|
+
package: '@pisell/private-materials',
|
|
15
|
+
version: '1.0.0',
|
|
16
|
+
exportName: 'ContactInfo',
|
|
17
|
+
main: 'src/index.ts',
|
|
18
|
+
destructuring: true,
|
|
19
|
+
subName: '',
|
|
20
|
+
},
|
|
21
|
+
configure: {
|
|
22
|
+
props: [
|
|
23
|
+
{
|
|
24
|
+
title: {
|
|
25
|
+
label: {
|
|
26
|
+
type: 'i18n',
|
|
27
|
+
'en-US': 'dataSource',
|
|
28
|
+
'zh-CN': '数据源',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
name: 'dataSource',
|
|
32
|
+
setter: {
|
|
33
|
+
componentName: 'JsonSetter',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: {
|
|
38
|
+
label: {
|
|
39
|
+
type: 'i18n',
|
|
40
|
+
'en-US': 'placeholder',
|
|
41
|
+
'zh-CN': '占位提示',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
name: 'placeholder',
|
|
45
|
+
setter: 'PisellI18nSetter',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: '是否开启删除',
|
|
49
|
+
name: 'isShowDelete',
|
|
50
|
+
setter: 'BoolSetter',
|
|
51
|
+
defaultValue: false,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: '展示方向',
|
|
55
|
+
name: 'direction',
|
|
56
|
+
setter: {
|
|
57
|
+
componentName: 'RadioGroupSetter',
|
|
58
|
+
props: {
|
|
59
|
+
options: [
|
|
60
|
+
{
|
|
61
|
+
label: '水平',
|
|
62
|
+
value: 'horizontal',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: '垂直',
|
|
66
|
+
value: 'vertical',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
initialValue: 'horizontal',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: '卡片样式',
|
|
75
|
+
type: 'group',
|
|
76
|
+
extraProps: {
|
|
77
|
+
display: 'accordion',
|
|
78
|
+
defaultCollapsed: true,
|
|
79
|
+
},
|
|
80
|
+
items: cardStyleProps,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
title: '头像',
|
|
84
|
+
type: 'group',
|
|
85
|
+
display: 'block',
|
|
86
|
+
items: [
|
|
87
|
+
{
|
|
88
|
+
title: '显示头像',
|
|
89
|
+
name: 'isShowAvatar',
|
|
90
|
+
setter: 'BoolSetter',
|
|
91
|
+
defaultValue: true,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: 'group',
|
|
95
|
+
condition: (target: any) =>
|
|
96
|
+
target.getProps().getPropValue('isShowAvatar'),
|
|
97
|
+
items: [...pisellAvatarProps],
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
title: '姓名',
|
|
103
|
+
type: 'group',
|
|
104
|
+
display: 'block',
|
|
105
|
+
items: [
|
|
106
|
+
{
|
|
107
|
+
title: '姓名默认文案',
|
|
108
|
+
name: 'defaultName',
|
|
109
|
+
setter: 'StringSetter',
|
|
110
|
+
},
|
|
111
|
+
...nameStyleProps,
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
title: '文本样式',
|
|
116
|
+
type: 'group',
|
|
117
|
+
display: 'block',
|
|
118
|
+
items: [...textStyleProps],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
title: '操作按钮',
|
|
122
|
+
type: 'group',
|
|
123
|
+
display: 'block',
|
|
124
|
+
items: [
|
|
125
|
+
{
|
|
126
|
+
name: 'button.addButtonIcon',
|
|
127
|
+
title: {
|
|
128
|
+
label: '添加按钮的图标',
|
|
129
|
+
tip: 'icon | 设置添加的自定义图标',
|
|
130
|
+
},
|
|
131
|
+
setter: AntdIconSetter,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'button.editButtonIcon',
|
|
135
|
+
title: {
|
|
136
|
+
label: '修改按钮的图标',
|
|
137
|
+
tip: 'icon | 设置修改的自定义图标',
|
|
138
|
+
},
|
|
139
|
+
setter: AntdIconSetter,
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
type: 'group',
|
|
145
|
+
display: 'block',
|
|
146
|
+
title: '字段展示',
|
|
147
|
+
items: [
|
|
148
|
+
{
|
|
149
|
+
title: '显示电话号',
|
|
150
|
+
name: 'isShowPhone',
|
|
151
|
+
setter: 'BoolSetter',
|
|
152
|
+
defaultValue: true,
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
title: '显示邮箱',
|
|
156
|
+
name: 'isShowEmail',
|
|
157
|
+
setter: 'BoolSetter',
|
|
158
|
+
defaultValue: true,
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
supports: {
|
|
164
|
+
events: [
|
|
165
|
+
{
|
|
166
|
+
name: 'onSave',
|
|
167
|
+
description: '保存联系信息点击事件',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'onDelete',
|
|
171
|
+
description: '删除联系信息点击事件',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: 'onCancel',
|
|
175
|
+
description: '取消点击事件',
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
style: true,
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const snippets = [
|
|
184
|
+
{
|
|
185
|
+
title: '联系信息',
|
|
186
|
+
screenshot: '',
|
|
187
|
+
schema: {
|
|
188
|
+
componentName: 'ContactInfo',
|
|
189
|
+
props: {
|
|
190
|
+
direction: 'horizontal',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
];
|
|
195
|
+
|
|
196
|
+
export default {
|
|
197
|
+
...ContactInfoMeta,
|
|
198
|
+
snippets,
|
|
199
|
+
};
|