@pisell/private-materials 6.4.62 → 6.4.64
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 +2 -2
- package/build/lowcode/preview.js +145 -145
- 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/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- 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/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +267 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- 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/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +4 -1
- package/es/components/booking/components/footer/utils.js +80 -77
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +2 -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.js +5 -0
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info2/cartClientCard/index.js +30 -1
- package/es/components/booking/info2/index.js +3 -2
- 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 +3 -0
- package/es/components/booking/locales.js +9 -3
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/model.d.ts +4 -0
- package/es/components/booking/model.js +3 -0
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/list/styles/header.less +1 -0
- package/es/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.js +63 -5
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +1 -0
- package/es/components/ticketBooking/index.js +1 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +28 -30
- package/es/plus/clinetSearch/locales.d.ts +3 -0
- package/es/plus/clinetSearch/locales.js +7 -4
- package/es/plus/clinetSearch/types.d.ts +12 -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 +40 -0
- package/es/plus/contactInfoModal/index.js +154 -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/SkuCard/components/CardWrapper/index.d.ts +0 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- 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/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +151 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- 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/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +4 -1
- package/lib/components/booking/components/footer/utils.js +93 -67
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +1 -1
- 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.js +5 -0
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info2/cartClientCard/index.js +25 -0
- package/lib/components/booking/info2/index.js +11 -5
- 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 +3 -0
- package/lib/components/booking/locales.js +9 -3
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/model.d.ts +4 -0
- package/lib/components/booking/model.js +3 -0
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/list/styles/header.less +1 -0
- package/lib/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +21 -2
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +1 -0
- package/lib/components/ticketBooking/index.js +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +17 -8
- package/lib/plus/clinetSearch/locales.d.ts +3 -0
- package/lib/plus/clinetSearch/locales.js +7 -4
- package/lib/plus/clinetSearch/types.d.ts +12 -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 +40 -0
- package/lib/plus/contactInfoModal/index.js +138 -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/SkuCard/components/CardWrapper/index.d.ts +0 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- 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 +5 -3
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.pisell-custom-swipe-action {
|
|
2
|
+
cursor: grab;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
touch-action: pan-y;
|
|
5
|
+
&-track {
|
|
6
|
+
position: relative;
|
|
7
|
+
overflow: visible;
|
|
8
|
+
}
|
|
9
|
+
&-content {
|
|
10
|
+
}
|
|
11
|
+
&-actions {
|
|
12
|
+
position: absolute;
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: stretch;
|
|
16
|
+
width: auto;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
&-right {
|
|
19
|
+
left: 100%;
|
|
20
|
+
top: 0;
|
|
21
|
+
height: 100%;
|
|
22
|
+
}
|
|
23
|
+
&-left {
|
|
24
|
+
right: 100%;
|
|
25
|
+
top: 0;
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
&-action-button {
|
|
30
|
+
--border-radius: 0;
|
|
31
|
+
--border-width: 0;
|
|
32
|
+
padding-left: 4px;
|
|
33
|
+
padding-right: 4px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.pisell-custom-swipe-action-action-button {
|
|
38
|
+
min-width: 80px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* 容器样式 */
|
|
42
|
+
.pisell-custom-swipe-action-height-large {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
background-color: rgba(67, 93, 147, 0.3);
|
|
46
|
+
justify-content: flex-start;
|
|
47
|
+
|
|
48
|
+
.pisell-number-selector-btn {
|
|
49
|
+
width: 40px !important;
|
|
50
|
+
height: 40px !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.pisell-custom-swipe-action-height-medium {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
background-color: rgba(67, 93, 147, 0.3);
|
|
58
|
+
|
|
59
|
+
.pisell-number-selector-btn {
|
|
60
|
+
width: 40px !important;
|
|
61
|
+
height: 40px !important;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* 按钮样式 */
|
|
66
|
+
.pisell-custom-swipe-action-action-height-large {
|
|
67
|
+
height: 60px;
|
|
68
|
+
width: 200px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.pisell-custom-swipe-action-action-height-medium {
|
|
72
|
+
flex: 1;
|
|
73
|
+
width: 200px;
|
|
74
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/plus/contactInfo/index.tsx
|
|
30
|
+
var contactInfo_exports = {};
|
|
31
|
+
__export(contactInfo_exports, {
|
|
32
|
+
PREFIX: () => PREFIX,
|
|
33
|
+
default: () => contactInfo_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(contactInfo_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_materials = require("@pisell/materials");
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
40
|
+
var import_Avatar = __toESM(require("./components/Avatar"));
|
|
41
|
+
var import_SwipeAction = require("./components/SwipeAction");
|
|
42
|
+
var import_contactInfoModal = __toESM(require("../contactInfoModal"));
|
|
43
|
+
var import_locales = __toESM(require("./locales"));
|
|
44
|
+
var import_index = require("./index.less");
|
|
45
|
+
var PREFIX = "pisell-plus-contact-info";
|
|
46
|
+
var ContactInfo = (props) => {
|
|
47
|
+
var _a, _b, _c;
|
|
48
|
+
console.log("props>>>>>>>>>", props);
|
|
49
|
+
const {
|
|
50
|
+
dataSource,
|
|
51
|
+
defaultName,
|
|
52
|
+
placeholder,
|
|
53
|
+
direction = "horizontal",
|
|
54
|
+
isShowDelete,
|
|
55
|
+
isShowAvatar,
|
|
56
|
+
isShowPhone,
|
|
57
|
+
isShowEmail,
|
|
58
|
+
horizontalGap,
|
|
59
|
+
verticalGap,
|
|
60
|
+
onSave,
|
|
61
|
+
onDelete,
|
|
62
|
+
onCancel
|
|
63
|
+
} = props;
|
|
64
|
+
const context = (0, import_useEngineContext.default)();
|
|
65
|
+
import_utils.locales.init(
|
|
66
|
+
import_locales.default,
|
|
67
|
+
((_b = (_a = context.appHelper.utils) == null ? void 0 : _a.storage) == null ? void 0 : _b.get("umi_locale")) || "en"
|
|
68
|
+
);
|
|
69
|
+
const [modalVisible, setModalVisible] = (0, import_react.useState)(false);
|
|
70
|
+
const isHorizontal = (0, import_react.useMemo)(() => {
|
|
71
|
+
return direction === "horizontal";
|
|
72
|
+
}, [direction]);
|
|
73
|
+
const displayName = (0, import_react.useMemo)(() => {
|
|
74
|
+
const { first_name, last_name } = dataSource || {};
|
|
75
|
+
if (!first_name && !last_name) {
|
|
76
|
+
return defaultName || "";
|
|
77
|
+
}
|
|
78
|
+
return `${first_name || ""} ${last_name || ""}`;
|
|
79
|
+
}, [dataSource, defaultName]);
|
|
80
|
+
const displayPhone = (0, import_react.useMemo)(() => {
|
|
81
|
+
const { country_calling_code, phone } = (dataSource == null ? void 0 : dataSource.phone) || {};
|
|
82
|
+
if (!country_calling_code || !phone) {
|
|
83
|
+
return "";
|
|
84
|
+
}
|
|
85
|
+
const countryCallingCode = (country_calling_code == null ? void 0 : country_calling_code.startsWith("+")) ? country_calling_code : `+${country_calling_code}`;
|
|
86
|
+
return `${countryCallingCode || ""} ${phone || ""}`;
|
|
87
|
+
}, [dataSource == null ? void 0 : dataSource.phone]);
|
|
88
|
+
const isEmpty = (0, import_react.useMemo)(() => {
|
|
89
|
+
var _a2;
|
|
90
|
+
return !(dataSource == null ? void 0 : dataSource.first_name) && !(dataSource == null ? void 0 : dataSource.last_name) && !((_a2 = dataSource == null ? void 0 : dataSource.phone) == null ? void 0 : _a2.phone) && !(dataSource == null ? void 0 : dataSource.email);
|
|
91
|
+
}, [dataSource]);
|
|
92
|
+
const handleClick = () => {
|
|
93
|
+
console.log("handleClick");
|
|
94
|
+
setModalVisible(true);
|
|
95
|
+
};
|
|
96
|
+
const _rightActions = (0, import_react.useMemo)(() => {
|
|
97
|
+
const deleteAction = {
|
|
98
|
+
key: "delete",
|
|
99
|
+
text: /* @__PURE__ */ import_react.default.createElement(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
style: {
|
|
103
|
+
display: "flex",
|
|
104
|
+
justifyContent: "center",
|
|
105
|
+
alignItems: "center",
|
|
106
|
+
color: "white",
|
|
107
|
+
cursor: "pointer",
|
|
108
|
+
padding: "10px 0px",
|
|
109
|
+
borderRadius: "8px"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
113
|
+
import_materials.Iconfont,
|
|
114
|
+
{
|
|
115
|
+
type: "pisell2-trash-01",
|
|
116
|
+
style: { fontSize: 20, marginRight: 4 }
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ import_react.default.createElement("span", { style: { fontSize: 12, fontWeight: 500 } }, import_utils.locales.getText("pisell2.text.contact-info.actions.delete"))
|
|
120
|
+
),
|
|
121
|
+
color: "danger",
|
|
122
|
+
onClick: (e) => {
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
e.stopPropagation();
|
|
125
|
+
onDelete == null ? void 0 : onDelete();
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
return [deleteAction];
|
|
129
|
+
}, [dataSource, onDelete]);
|
|
130
|
+
const renderContent = () => {
|
|
131
|
+
var _a2;
|
|
132
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
className: `${PREFIX}__${direction}`,
|
|
136
|
+
style: { gap: verticalGap, padding: ((_a2 = props == null ? void 0 : props.style) == null ? void 0 : _a2.padding) || "8px" }
|
|
137
|
+
},
|
|
138
|
+
isHorizontal ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
className: `${PREFIX}__horizontal-left`,
|
|
142
|
+
style: { gap: horizontalGap }
|
|
143
|
+
},
|
|
144
|
+
isShowAvatar && /* @__PURE__ */ import_react.default.createElement(import_Avatar.default, { config: props.avatar, name: displayName, cover: "" }),
|
|
145
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
146
|
+
"div",
|
|
147
|
+
{
|
|
148
|
+
className: `${PREFIX}__horizontal-left-content`,
|
|
149
|
+
style: { gap: verticalGap }
|
|
150
|
+
},
|
|
151
|
+
isEmpty ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__empty-description` }, placeholder || import_utils.locales.getText("pisell2.text.contact-info.placeholder")) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__name-horizontal-container` }, /* @__PURE__ */ import_react.default.createElement(
|
|
152
|
+
"span",
|
|
153
|
+
{
|
|
154
|
+
className: `${PREFIX}__name-horizontal`,
|
|
155
|
+
style: props.nameStyle
|
|
156
|
+
},
|
|
157
|
+
displayName
|
|
158
|
+
), isShowPhone && displayPhone && /* @__PURE__ */ import_react.default.createElement(
|
|
159
|
+
"span",
|
|
160
|
+
{
|
|
161
|
+
className: `${PREFIX}__phone-horizontal`,
|
|
162
|
+
style: props.textStyle
|
|
163
|
+
},
|
|
164
|
+
"(",
|
|
165
|
+
displayPhone,
|
|
166
|
+
")"
|
|
167
|
+
)), isShowEmail && (dataSource == null ? void 0 : dataSource.email) && /* @__PURE__ */ import_react.default.createElement(
|
|
168
|
+
"div",
|
|
169
|
+
{
|
|
170
|
+
className: `${PREFIX}__text`,
|
|
171
|
+
style: props.textStyle
|
|
172
|
+
},
|
|
173
|
+
dataSource == null ? void 0 : dataSource.email
|
|
174
|
+
))
|
|
175
|
+
)
|
|
176
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__horizontal-right` }, /* @__PURE__ */ import_react.default.createElement(
|
|
177
|
+
import_materials.Iconfont,
|
|
178
|
+
{
|
|
179
|
+
type: isEmpty ? "pisell2-plus-circle" : "pisell2-edit-05",
|
|
180
|
+
className: `${PREFIX}__horizontal-right-icon`
|
|
181
|
+
}
|
|
182
|
+
))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, isShowAvatar && /* @__PURE__ */ import_react.default.createElement(import_Avatar.default, { config: props.avatar, name: "hhhhh", cover: "" }), isEmpty ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__empty-description` }, placeholder || import_utils.locales.getText("pisell2.text.contact-info.placeholder")) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__name`, style: props.nameStyle }, displayName), isShowPhone && displayPhone && /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__text`, style: props.textStyle }, displayPhone), isShowEmail && (dataSource == null ? void 0 : dataSource.email) && /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__text`, style: props.textStyle }, dataSource == null ? void 0 : dataSource.email)))
|
|
183
|
+
);
|
|
184
|
+
};
|
|
185
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
className: `${PREFIX}`,
|
|
189
|
+
style: { ...props.style || {}, padding: 0 },
|
|
190
|
+
onClick: handleClick
|
|
191
|
+
},
|
|
192
|
+
isShowDelete && !isEmpty ? /* @__PURE__ */ import_react.default.createElement(
|
|
193
|
+
import_SwipeAction.SwipeAction,
|
|
194
|
+
{
|
|
195
|
+
closeOnAction: false,
|
|
196
|
+
rightActions: _rightActions,
|
|
197
|
+
style: { borderRadius: ((_c = props == null ? void 0 : props.style) == null ? void 0 : _c.borderRadius) || 0 }
|
|
198
|
+
},
|
|
199
|
+
renderContent()
|
|
200
|
+
) : renderContent()
|
|
201
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
202
|
+
import_contactInfoModal.default,
|
|
203
|
+
{
|
|
204
|
+
open: modalVisible,
|
|
205
|
+
dataSource,
|
|
206
|
+
isShowDelete,
|
|
207
|
+
onCancel: () => {
|
|
208
|
+
setModalVisible(false);
|
|
209
|
+
onCancel == null ? void 0 : onCancel();
|
|
210
|
+
},
|
|
211
|
+
onSave: (value) => {
|
|
212
|
+
setModalVisible(false);
|
|
213
|
+
onSave == null ? void 0 : onSave(value);
|
|
214
|
+
},
|
|
215
|
+
onDelete: () => {
|
|
216
|
+
setModalVisible(false);
|
|
217
|
+
onDelete == null ? void 0 : onDelete();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
));
|
|
221
|
+
};
|
|
222
|
+
var contactInfo_default = ContactInfo;
|
|
223
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
224
|
+
0 && (module.exports = {
|
|
225
|
+
PREFIX
|
|
226
|
+
});
|