@pisell/private-materials 6.3.30 → 6.3.32
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 +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- 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 +267 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -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/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/index.js +4 -1
- package/es/components/booking/components/footer/utils.js +62 -46
- package/es/components/booking/forms/model.d.ts +10 -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.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 +3 -0
- package/es/components/booking/locales.js +9 -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/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- 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 +3 -0
- package/es/index.js +4 -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 +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/pro/Login2.0/AuthModal.d.ts +143 -0
- package/es/pro/Login2.0/AuthModal.js +624 -0
- package/es/pro/Login2.0/Login2.d.ts +61 -0
- package/es/pro/Login2.0/Login2.js +2157 -0
- package/es/pro/Login2.0/Register2.d.ts +65 -0
- package/es/pro/Login2.0/Register2.js +1501 -0
- package/es/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
- package/es/pro/Login2.0/components/ForgotPasswordFlow.js +330 -0
- package/es/pro/Login2.0/components/LegalTerms.d.ts +8 -0
- package/es/pro/Login2.0/components/LegalTerms.js +51 -0
- package/es/pro/Login2.0/components/LegalTerms.less +74 -0
- package/es/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
- package/es/pro/Login2.0/components/LoginCodeInput.js +207 -0
- package/es/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
- package/es/pro/Login2.0/components/OAuthButtonGroup.js +55 -0
- package/es/pro/Login2.0/components/PhoneInput.d.ts +53 -0
- package/es/pro/Login2.0/components/PhoneInput.js +414 -0
- package/es/pro/Login2.0/components/PhoneInput.less +148 -0
- package/es/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/es/pro/Login2.0/components/phoneValidation.js +228 -0
- package/es/pro/Login2.0/hooks/index.d.ts +2 -0
- package/es/pro/Login2.0/hooks/index.js +1 -0
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.js +87 -0
- package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
- package/es/pro/Login2.0/hooks/useRegisterFlow.js +158 -0
- package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
- package/es/pro/Login2.0/hooks/useRegistrationMethods.js +31 -0
- package/es/pro/Login2.0/index.js +8 -0
- package/es/pro/Login2.0/index.less +993 -0
- package/es/pro/Login2.0/locales.d.ts +543 -0
- package/es/pro/Login2.0/locales.js +622 -0
- package/es/pro/Login2.0/shared/Header.d.ts +11 -0
- package/es/pro/Login2.0/shared/Header.js +42 -0
- package/es/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
- package/es/pro/Login2.0/shared/OAuthButtons.js +59 -0
- package/es/pro/Login2.0/shared/registerFlow.d.ts +116 -0
- package/es/pro/Login2.0/shared/registerFlow.js +171 -0
- package/es/pro/Login2.0/shared/types.d.ts +232 -0
- package/es/pro/Login2.0/shared/types.js +1 -0
- package/es/pro/Login2.0/steps/CodeInput.d.ts +24 -0
- package/es/pro/Login2.0/steps/CodeInput.js +209 -0
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.js +35 -0
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +25 -0
- package/es/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
- package/es/pro/Login2.0/steps/EmailLinkExpired.js +33 -0
- package/es/pro/Login2.0/steps/SetPassword.d.ts +19 -0
- package/es/pro/Login2.0/steps/SetPassword.js +148 -0
- package/es/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
- package/es/pro/Login2.0/steps/VerificationSuccess.js +35 -0
- package/es/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
- package/es/pro/Login2.0/steps/VerifyingEmailLink.js +17 -0
- package/es/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
- package/es/pro/Login2.0/steps/WaitEmailLink.js +54 -0
- package/es/pro/Login2.0/steps/index.d.ts +19 -0
- package/es/pro/Login2.0/steps/index.js +11 -0
- package/es/pro/Login2.0/steps/steps.less +423 -0
- package/es/pro/Login2.0/types.d.ts +167 -0
- package/es/pro/Login2.0/types.js +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/ConfirmInformation/index.js +151 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -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/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/index.js +4 -1
- package/lib/components/booking/components/footer/utils.js +70 -38
- package/lib/components/booking/forms/model.d.ts +10 -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.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 +3 -0
- package/lib/components/booking/locales.js +9 -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/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- 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 +3 -0
- package/lib/index.js +13 -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 +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/pro/Login2.0/AuthModal.d.ts +143 -0
- package/lib/pro/Login2.0/AuthModal.js +498 -0
- package/lib/pro/Login2.0/Login2.d.ts +61 -0
- package/lib/pro/Login2.0/Login2.js +1468 -0
- package/lib/pro/Login2.0/Register2.d.ts +65 -0
- package/lib/pro/Login2.0/Register2.js +1062 -0
- package/lib/pro/Login2.0/components/ForgotPasswordFlow.d.ts +31 -0
- package/lib/pro/Login2.0/components/ForgotPasswordFlow.js +213 -0
- package/lib/pro/Login2.0/components/LegalTerms.d.ts +8 -0
- package/lib/pro/Login2.0/components/LegalTerms.js +76 -0
- package/lib/pro/Login2.0/components/LegalTerms.less +74 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.d.ts +27 -0
- package/lib/pro/Login2.0/components/LoginCodeInput.js +161 -0
- package/lib/pro/Login2.0/components/OAuthButtonGroup.d.ts +22 -0
- package/lib/pro/Login2.0/components/OAuthButtonGroup.js +87 -0
- package/lib/pro/Login2.0/components/PhoneInput.d.ts +53 -0
- package/lib/pro/Login2.0/components/PhoneInput.js +263 -0
- package/lib/pro/Login2.0/components/PhoneInput.less +148 -0
- package/lib/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/lib/pro/Login2.0/components/phoneValidation.js +153 -0
- package/lib/pro/Login2.0/hooks/index.d.ts +2 -0
- package/lib/pro/Login2.0/hooks/index.js +29 -0
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.js +140 -0
- package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
- package/lib/pro/Login2.0/hooks/useRegisterFlow.js +149 -0
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.js +51 -0
- package/lib/pro/Login2.0/index.js +45 -0
- package/lib/pro/Login2.0/index.less +993 -0
- package/lib/pro/Login2.0/locales.d.ts +543 -0
- package/lib/pro/Login2.0/locales.js +646 -0
- package/lib/pro/Login2.0/shared/Header.d.ts +11 -0
- package/lib/pro/Login2.0/shared/Header.js +81 -0
- package/lib/pro/Login2.0/shared/OAuthButtons.d.ts +11 -0
- package/lib/pro/Login2.0/shared/OAuthButtons.js +78 -0
- package/lib/pro/Login2.0/shared/registerFlow.d.ts +116 -0
- package/lib/pro/Login2.0/shared/registerFlow.js +235 -0
- package/lib/pro/Login2.0/shared/types.d.ts +232 -0
- package/lib/pro/Login2.0/shared/types.js +17 -0
- package/lib/pro/Login2.0/steps/CodeInput.d.ts +24 -0
- package/lib/pro/Login2.0/steps/CodeInput.js +160 -0
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +12 -0
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.js +46 -0
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +7 -0
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.js +51 -0
- package/lib/pro/Login2.0/steps/EmailLinkExpired.d.ts +9 -0
- package/lib/pro/Login2.0/steps/EmailLinkExpired.js +51 -0
- package/lib/pro/Login2.0/steps/SetPassword.d.ts +19 -0
- package/lib/pro/Login2.0/steps/SetPassword.js +131 -0
- package/lib/pro/Login2.0/steps/VerificationSuccess.d.ts +8 -0
- package/lib/pro/Login2.0/steps/VerificationSuccess.js +49 -0
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.d.ts +7 -0
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.js +41 -0
- package/lib/pro/Login2.0/steps/WaitEmailLink.d.ts +18 -0
- package/lib/pro/Login2.0/steps/WaitEmailLink.js +67 -0
- package/lib/pro/Login2.0/steps/index.d.ts +19 -0
- package/lib/pro/Login2.0/steps/index.js +60 -0
- package/lib/pro/Login2.0/steps/steps.less +423 -0
- package/lib/pro/Login2.0/types.d.ts +167 -0
- package/lib/pro/Login2.0/types.js +17 -0
- package/lowcode/authmodal/meta.ts +395 -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/lowcode/login2/CONFIG.md +447 -0
- package/lowcode/login2/TEST_CONFIG.md +324 -0
- package/lowcode/login2/VERIFICATION_METHODS.md +364 -0
- package/lowcode/login2/meta.ts +560 -0
- package/lowcode/login2/snippets.ts +124 -0
- package/lowcode/register2/meta.ts +562 -0
- package/lowcode/register2/snippets.ts +257 -0
- package/package.json +7 -5
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -21,6 +21,11 @@ var _miniRedux = miniRedux({
|
|
|
21
21
|
});
|
|
22
22
|
// return { ...state, client: { ...state.client, ...payload } };
|
|
23
23
|
},
|
|
24
|
+
setContactsInfo: function setContactsInfo(state, payload) {
|
|
25
|
+
state.setGlobalState({
|
|
26
|
+
contacts_info: _objectSpread(_objectSpread({}, state.contacts_info), payload)
|
|
27
|
+
});
|
|
28
|
+
},
|
|
24
29
|
setService: function setService(state, payload) {
|
|
25
30
|
var obj = {};
|
|
26
31
|
// 拦截, 如果服务列表里 有两个相近时间的服务, 删除最后一个
|
|
@@ -34,6 +34,7 @@ import classNames from 'classnames';
|
|
|
34
34
|
import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
|
|
35
35
|
import { getLocale } from "../../../utils/locales";
|
|
36
36
|
import { useDebounceEffect } from 'ahooks';
|
|
37
|
+
import ContactInfoMode from "./service/contactInfoMode";
|
|
37
38
|
var defaultModules = {
|
|
38
39
|
client: 1,
|
|
39
40
|
date: 1,
|
|
@@ -43,7 +44,7 @@ var defaultModules = {
|
|
|
43
44
|
};
|
|
44
45
|
locales.init(localeTexts, getLocale());
|
|
45
46
|
var Info = Provider(function (props) {
|
|
46
|
-
var _modal$state2, _modal$state4, _modal$state6, _context$appHelper4, _modal$state7;
|
|
47
|
+
var _modal$state2, _modal$state4, _modal$state6, _context$appHelper4, _modal$state7, _modal$state8;
|
|
47
48
|
// return <Payments {...props} />;
|
|
48
49
|
var style = props.style,
|
|
49
50
|
globalState = props.globalState,
|
|
@@ -278,7 +279,7 @@ var Info = Provider(function (props) {
|
|
|
278
279
|
height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4 = _context$appHelper4.utils) !== null && _context$appHelper4 !== void 0 && _context$appHelper4.isMobile ? '100%' : '100vh'
|
|
279
280
|
}), "bodyClassName", classNames('booking-info-warp', _defineProperty(_defineProperty({}, 'create-booking-page-info-wrap', isBookingCreatePage), 'create-booking-page-info-wrap-create', isBookingCreatePageCreateMode))), /*#__PURE__*/React.createElement("div", {
|
|
280
281
|
className: "booking-info"
|
|
281
|
-
}, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$
|
|
282
|
+
}, createHeader, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, (modal === null || modal === void 0 || (_modal$state7 = modal.state) === null || _modal$state7 === void 0 || (_modal$state7 = _modal$state7.bookingConfig) === null || _modal$state7 === void 0 || (_modal$state7 = _modal$state7.config) === null || _modal$state7 === void 0 || (_modal$state7 = _modal$state7.cart_settings_tab) === null || _modal$state7 === void 0 || (_modal$state7 = _modal$state7.display_contact_info) === null || _modal$state7 === void 0 ? void 0 : _modal$state7.show_contact_info) === true ? /*#__PURE__*/React.createElement(ContactInfoMode, null) : null, modules.holder && !((_modal$state8 = modal.state) !== null && _modal$state8 !== void 0 && _modal$state8.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === 'form' ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
282
283
|
loading: globalState.loading,
|
|
283
284
|
round: true,
|
|
284
285
|
active: true,
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import React, { useContext, useEffect } from 'react';
|
|
8
|
+
import { locales } from '@pisell/utils';
|
|
9
|
+
import ContactInfo from "../../../../../plus/contactInfo";
|
|
10
|
+
import { Context } from "../../../info/model";
|
|
11
|
+
var ContactInfoMode = function ContactInfoMode() {
|
|
12
|
+
var _state$client$value6, _state$contacts_info3, _state$contacts_info4;
|
|
13
|
+
var _useContext = useContext(Context),
|
|
14
|
+
state = _useContext.state,
|
|
15
|
+
dispatch = _useContext.dispatch;
|
|
16
|
+
console.log('state>>>>>>>>>', state);
|
|
17
|
+
useEffect(function () {
|
|
18
|
+
var _state$contacts_info, _state$client$value, _state$client$value2, _state$contacts_info2;
|
|
19
|
+
// 如果客户id发生变化,则获取客户信息中的ContactInfo,如果不存在,则使用客户信息填充ContactInfo
|
|
20
|
+
console.log('state>>>>>>>>>111', state === null || state === void 0 || (_state$contacts_info = state.contacts_info) === null || _state$contacts_info === void 0 ? void 0 : _state$contacts_info.client_id);
|
|
21
|
+
console.log('state>>>>>>>>>222', (_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id);
|
|
22
|
+
if (((_state$client$value2 = state.client.value) === null || _state$client$value2 === void 0 ? void 0 : _state$client$value2.id) != (state === null || state === void 0 || (_state$contacts_info2 = state.contacts_info) === null || _state$contacts_info2 === void 0 ? void 0 : _state$contacts_info2.client_id)) {
|
|
23
|
+
var _state$client$value3;
|
|
24
|
+
var contactInfo = (_state$client$value3 = state.client.value) === null || _state$client$value3 === void 0 || (_state$client$value3 = _state$client$value3.contacts_info) === null || _state$client$value3 === void 0 ? void 0 : _state$client$value3.value;
|
|
25
|
+
if (!contactInfo) {
|
|
26
|
+
var _state$client, _state$client$value4;
|
|
27
|
+
var _ref = ((_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.value) || {},
|
|
28
|
+
first_name = _ref.first_name,
|
|
29
|
+
last_name = _ref.last_name,
|
|
30
|
+
phone = _ref.phone,
|
|
31
|
+
country_calling_code = _ref.country_calling_code,
|
|
32
|
+
country_code = _ref.country_code,
|
|
33
|
+
email = _ref.email;
|
|
34
|
+
dispatch({
|
|
35
|
+
type: 'setContactsInfo',
|
|
36
|
+
payload: {
|
|
37
|
+
value: {
|
|
38
|
+
first_name: first_name || '',
|
|
39
|
+
last_name: last_name || '',
|
|
40
|
+
phone: {
|
|
41
|
+
phone: phone || '',
|
|
42
|
+
country_calling_code: country_calling_code || '',
|
|
43
|
+
country_code: country_code || ''
|
|
44
|
+
},
|
|
45
|
+
email: email || ''
|
|
46
|
+
},
|
|
47
|
+
client_id: (_state$client$value4 = state.client.value) === null || _state$client$value4 === void 0 ? void 0 : _state$client$value4.id
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
var _state$client$value5;
|
|
52
|
+
dispatch({
|
|
53
|
+
type: 'setContactsInfo',
|
|
54
|
+
payload: {
|
|
55
|
+
value: _objectSpread({}, contactInfo || {}),
|
|
56
|
+
client_id: (_state$client$value5 = state.client.value) === null || _state$client$value5 === void 0 ? void 0 : _state$client$value5.id
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}, [(_state$client$value6 = state.client.value) === null || _state$client$value6 === void 0 ? void 0 : _state$client$value6.id, state === null || state === void 0 || (_state$contacts_info3 = state.contacts_info) === null || _state$contacts_info3 === void 0 ? void 0 : _state$contacts_info3.client_id]);
|
|
62
|
+
var handleSave = function handleSave(value) {
|
|
63
|
+
dispatch({
|
|
64
|
+
type: 'setContactsInfo',
|
|
65
|
+
payload: {
|
|
66
|
+
value: value,
|
|
67
|
+
edit: true
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
style: {
|
|
73
|
+
marginTop: '24px'
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: "pisell-lowcode__booking-contact-info-title",
|
|
77
|
+
style: {
|
|
78
|
+
fontSize: '16px',
|
|
79
|
+
fontWeight: 500,
|
|
80
|
+
marginBottom: '8px'
|
|
81
|
+
}
|
|
82
|
+
}, locales.getText('pisell2.booking.text.contact-info.title')), /*#__PURE__*/React.createElement(ContactInfo, {
|
|
83
|
+
dataSource: ((_state$contacts_info4 = state.contacts_info) === null || _state$contacts_info4 === void 0 ? void 0 : _state$contacts_info4.value) || null,
|
|
84
|
+
isShowDelete: false,
|
|
85
|
+
isShowAvatar: false,
|
|
86
|
+
isShowPhone: true,
|
|
87
|
+
isShowEmail: true,
|
|
88
|
+
style: {
|
|
89
|
+
padding: '14px 0 14px 14px'
|
|
90
|
+
},
|
|
91
|
+
onSave: handleSave
|
|
92
|
+
}));
|
|
93
|
+
};
|
|
94
|
+
export default ContactInfoMode;
|
|
@@ -276,6 +276,7 @@ declare const _default: {
|
|
|
276
276
|
'pisell2.text.quotation.product.change.title': string;
|
|
277
277
|
'pisell2.text.quotation.product.change.describe': string;
|
|
278
278
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
279
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
279
280
|
};
|
|
280
281
|
'zh-CN': {
|
|
281
282
|
'pisell2.text.refunded-amount': string;
|
|
@@ -554,6 +555,7 @@ declare const _default: {
|
|
|
554
555
|
'pisell2.text.quotation.product.change.title': string;
|
|
555
556
|
'pisell2.text.quotation.product.change.describe': string;
|
|
556
557
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
558
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
557
559
|
};
|
|
558
560
|
'zh-HK': {
|
|
559
561
|
'pisell2.text.refunded-amount': string;
|
|
@@ -832,6 +834,7 @@ declare const _default: {
|
|
|
832
834
|
'pisell2.text.quotation.product.change.title': string;
|
|
833
835
|
'pisell2.text.quotation.product.change.describe': string;
|
|
834
836
|
'pisell2.text.form.link.to.another.record.more': string;
|
|
837
|
+
'pisell2.booking.text.contact-info.title': string;
|
|
835
838
|
};
|
|
836
839
|
};
|
|
837
840
|
export default _default;
|
|
@@ -320,7 +320,9 @@ export default {
|
|
|
320
320
|
},
|
|
321
321
|
'pisell2.text.quotation.product.change.title': "Notification",
|
|
322
322
|
'pisell2.text.quotation.product.change.describe': "Product updates available: Please refresh the following items to load the latest data.",
|
|
323
|
-
'pisell2.text.form.link.to.another.record.more': 'View More'
|
|
323
|
+
'pisell2.text.form.link.to.another.record.more': 'View More',
|
|
324
|
+
// 联系信息
|
|
325
|
+
'pisell2.booking.text.contact-info.title': 'Contact info'
|
|
324
326
|
},
|
|
325
327
|
'zh-CN': {
|
|
326
328
|
'pisell2.text.refunded-amount': '已退金额',
|
|
@@ -647,7 +649,9 @@ export default {
|
|
|
647
649
|
},
|
|
648
650
|
'pisell2.text.quotation.product.change.title': "提示",
|
|
649
651
|
'pisell2.text.quotation.product.change.describe': "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
|
|
650
|
-
'pisell2.text.form.link.to.another.record.more': '查看更多'
|
|
652
|
+
'pisell2.text.form.link.to.another.record.more': '查看更多',
|
|
653
|
+
// 联系信息
|
|
654
|
+
'pisell2.booking.text.contact-info.title': '联系信息'
|
|
651
655
|
},
|
|
652
656
|
'zh-HK': {
|
|
653
657
|
'pisell2.text.refunded-amount': '已退金額',
|
|
@@ -974,6 +978,8 @@ export default {
|
|
|
974
978
|
},
|
|
975
979
|
'pisell2.text.quotation.product.change.title': "提示",
|
|
976
980
|
'pisell2.text.quotation.product.change.describe': "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
|
|
977
|
-
'pisell2.text.form.link.to.another.record.more': '查看更多'
|
|
981
|
+
'pisell2.text.form.link.to.another.record.more': '查看更多',
|
|
982
|
+
// 联系信息
|
|
983
|
+
'pisell2.booking.text.contact-info.title': '聯繫信息'
|
|
978
984
|
}
|
|
979
985
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -26,6 +27,10 @@ export interface FormState {
|
|
|
26
27
|
};
|
|
27
28
|
edit: boolean;
|
|
28
29
|
};
|
|
30
|
+
contacts_info: {
|
|
31
|
+
edit: boolean;
|
|
32
|
+
value: any;
|
|
33
|
+
};
|
|
29
34
|
date: {
|
|
30
35
|
value: any;
|
|
31
36
|
end_date: any;
|
|
@@ -105,4 +110,11 @@ export declare const walkInData: {
|
|
|
105
110
|
id: number;
|
|
106
111
|
nickname: string;
|
|
107
112
|
};
|
|
108
|
-
export declare const Provider: any, Context:
|
|
113
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
114
|
+
state: FormState;
|
|
115
|
+
} & {
|
|
116
|
+
dispatch: (params: {
|
|
117
|
+
type: string;
|
|
118
|
+
payload: any;
|
|
119
|
+
}) => void;
|
|
120
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from "../model";
|
|
3
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
4
|
+
state: FormState;
|
|
5
|
+
} & {
|
|
6
|
+
dispatch: (params: {
|
|
7
|
+
type: string;
|
|
8
|
+
payload: any;
|
|
9
|
+
}) => void;
|
|
10
|
+
}>;
|
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
|
8
8
|
*/
|
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
10
10
|
className?: string | undefined;
|
|
11
|
-
onChange?: ((status: "success" | "page" | "
|
|
11
|
+
onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
12
12
|
[keys: string]: unknown;
|
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
|
14
14
|
onClose: () => void;
|
|
@@ -10,7 +10,7 @@ import './device.less';
|
|
|
10
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
11
11
|
api: PayProps['api'];
|
|
12
12
|
className?: string | undefined;
|
|
13
|
-
onChange?: ((status: "success" | "page" | "
|
|
13
|
+
onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
|
14
14
|
[keys: string]: unknown;
|
|
15
15
|
} | undefined, other?: any) => void) | undefined;
|
|
16
16
|
onClose: () => void;
|
|
@@ -295,10 +295,10 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
295
|
name?: string | undefined;
|
|
296
296
|
symbol?: string | undefined;
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "
|
|
298
|
+
mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
300
|
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
|
|
301
|
-
action?: "amount" | "
|
|
301
|
+
action?: "amount" | "deviceList" | "pay" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
3
4
|
order: any;
|
|
@@ -29,4 +30,11 @@ export interface PayGroup {
|
|
|
29
30
|
_order: any;
|
|
30
31
|
front_order_uuid?: string;
|
|
31
32
|
}
|
|
32
|
-
export declare const Provider: any, Context:
|
|
33
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
34
|
+
state: FormState;
|
|
35
|
+
} & {
|
|
36
|
+
dispatch: (params: {
|
|
37
|
+
type: string;
|
|
38
|
+
payload: any;
|
|
39
|
+
}) => void;
|
|
40
|
+
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
2
3
|
import dayjs from "dayjs";
|
|
3
4
|
export interface FormState {
|
|
@@ -68,4 +69,11 @@ export interface FormState {
|
|
|
68
69
|
};
|
|
69
70
|
setGlobalState: Function | null;
|
|
70
71
|
}
|
|
71
|
-
export declare const Provider: any, Context:
|
|
72
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
73
|
+
state: FormState;
|
|
74
|
+
} & {
|
|
75
|
+
dispatch: (params: {
|
|
76
|
+
type: string;
|
|
77
|
+
payload: any;
|
|
78
|
+
}) => void;
|
|
79
|
+
}>;
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
.booking-info-create-new,
|
|
9
9
|
.pisell-lowcode__booking-field-title,
|
|
10
10
|
.pisell-lowcode__shopping-cart-empty,
|
|
11
|
-
.pisell-lowcode__booking-service-clear-btn
|
|
11
|
+
.pisell-lowcode__booking-service-clear-btn,
|
|
12
|
+
.pisell-lowcode__booking-contact-info-title {
|
|
12
13
|
color: #ffffff;
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
addWalletCard: any;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
walletDetailState: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
+
state: RechargeState;
|
|
8
|
+
} & {
|
|
9
|
+
dispatch: (params: {
|
|
10
|
+
type: string;
|
|
11
|
+
payload: any;
|
|
12
|
+
}) => void;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
selectedGiftOptionId: string | null;
|
|
4
|
+
cardList: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
price: number;
|
|
8
|
+
}>;
|
|
9
|
+
selectedItem: {
|
|
10
|
+
id?: string;
|
|
11
|
+
gift_price?: number;
|
|
12
|
+
price?: number;
|
|
13
|
+
name?: string;
|
|
14
|
+
variant_id?: string;
|
|
15
|
+
};
|
|
16
|
+
productId?: string;
|
|
17
|
+
detailId?: string;
|
|
18
|
+
total: string | number;
|
|
19
|
+
rechargeModalOpen: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
22
|
+
state: RechargeState;
|
|
23
|
+
} & {
|
|
24
|
+
dispatch: (params: {
|
|
25
|
+
type: string;
|
|
26
|
+
payload: any;
|
|
27
|
+
}) => void;
|
|
28
|
+
}>;
|
|
29
|
+
export {};
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RechargeState {
|
|
3
|
+
total: 0;
|
|
4
|
+
}
|
|
5
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
+
state: RechargeState;
|
|
7
|
+
} & {
|
|
8
|
+
dispatch: (params: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: any;
|
|
11
|
+
}) => void;
|
|
12
|
+
}>;
|
|
13
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IWalletListItemProps } from './serve';
|
|
2
3
|
export interface WalletCardItemProps {
|
|
3
4
|
id: string;
|
|
@@ -26,4 +27,11 @@ export interface WalletListProps {
|
|
|
26
27
|
currentSearchListItemCode?: string;
|
|
27
28
|
[key: string]: any;
|
|
28
29
|
}
|
|
29
|
-
export declare const Provider: any, Context:
|
|
30
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
31
|
+
global_wallet: WalletListProps;
|
|
32
|
+
} & {
|
|
33
|
+
dispatch: (params: {
|
|
34
|
+
type: string;
|
|
35
|
+
payload: any;
|
|
36
|
+
}) => void;
|
|
37
|
+
}>;
|
package/es/index.d.ts
CHANGED
|
@@ -50,3 +50,6 @@ export { default as SaasRegister } from './plus/saasRegister';
|
|
|
50
50
|
export { default as SaasCreateOrganization } from './plus/saasCreateOrganization';
|
|
51
51
|
export { default as PinModal } from './components/pinModal';
|
|
52
52
|
export { default as PinVerifyModal } from './components/pinVerifyModal';
|
|
53
|
+
export { default as ContactInfo } from './plus/contactInfo';
|
|
54
|
+
export { default as ContactInfoModal } from './plus/contactInfoModal';
|
|
55
|
+
export { Login2, Register2, AuthModal } from './pro/Login2.0';
|
package/es/index.js
CHANGED
|
@@ -53,4 +53,7 @@ export { default as SaasLogin } from "./plus/saasLogin";
|
|
|
53
53
|
export { default as SaasRegister } from "./plus/saasRegister";
|
|
54
54
|
export { default as SaasCreateOrganization } from "./plus/saasCreateOrganization";
|
|
55
55
|
export { default as PinModal } from "./components/pinModal";
|
|
56
|
-
export { default as PinVerifyModal } from "./components/pinVerifyModal";
|
|
56
|
+
export { default as PinVerifyModal } from "./components/pinVerifyModal";
|
|
57
|
+
export { default as ContactInfo } from "./plus/contactInfo";
|
|
58
|
+
export { default as ContactInfoModal } from "./plus/contactInfoModal";
|
|
59
|
+
export { Login2, Register2, AuthModal } from "./pro/Login2.0";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import "./index.less";
|
|
4
|
+
import { getClientName } from "./utils";
|
|
5
|
+
var ClientName = function ClientName(_ref) {
|
|
6
|
+
var className = _ref.className,
|
|
7
|
+
dataSource = _ref.dataSource,
|
|
8
|
+
style = _ref.style;
|
|
9
|
+
var name = useMemo(function () {
|
|
10
|
+
return getClientName(dataSource);
|
|
11
|
+
}, [dataSource]);
|
|
12
|
+
if (!dataSource) return null;
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: classNames('pisell-client-name', className),
|
|
15
|
+
style: style || {}
|
|
16
|
+
}, name);
|
|
17
|
+
};
|
|
18
|
+
export default ClientName;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type ClientData = {
|
|
3
|
+
display_name?: string;
|
|
4
|
+
nickname?: string;
|
|
5
|
+
first_name?: string;
|
|
6
|
+
last_name?: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
export interface IClientNameProps {
|
|
10
|
+
dataSource?: string | ClientData | null;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export var getClientName = function getClientName(dataSource) {
|
|
2
|
+
if (!dataSource || typeof dataSource === 'string') {
|
|
3
|
+
return dataSource;
|
|
4
|
+
}
|
|
5
|
+
var first_name = dataSource.first_name,
|
|
6
|
+
last_name = dataSource.last_name,
|
|
7
|
+
display_name = dataSource.display_name,
|
|
8
|
+
nickname = dataSource.nickname;
|
|
9
|
+
var finalName = '';
|
|
10
|
+
if (display_name) {
|
|
11
|
+
finalName = display_name;
|
|
12
|
+
} else if (nickname) {
|
|
13
|
+
finalName = nickname;
|
|
14
|
+
} else if (first_name || last_name) {
|
|
15
|
+
finalName = "".concat(first_name, " ").concat(last_name).trim();
|
|
16
|
+
}
|
|
17
|
+
return finalName;
|
|
18
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AvatarConfig } from '../../types';
|
|
3
|
+
import '../../index.less';
|
|
4
|
+
interface AvatarProps {
|
|
5
|
+
config?: AvatarConfig;
|
|
6
|
+
name: string;
|
|
7
|
+
cover?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Avatar: React.FC<AvatarProps>;
|
|
10
|
+
export default Avatar;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PisellAvatar } from '@pisell/materials';
|
|
4
|
+
import { getAvatarText } from "../../utils";
|
|
5
|
+
import { PREFIX } from "../../index";
|
|
6
|
+
import "../../index.less";
|
|
7
|
+
var Avatar = function Avatar(props) {
|
|
8
|
+
var config = props.config,
|
|
9
|
+
name = props.name,
|
|
10
|
+
cover = props.cover;
|
|
11
|
+
var _ref = config || {},
|
|
12
|
+
useTextAvatar = _ref.useTextAvatar,
|
|
13
|
+
children = _ref.children;
|
|
14
|
+
if (useTextAvatar) {
|
|
15
|
+
var text = children || getAvatarText(name);
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "".concat(PREFIX, "__avatar-wrapper")
|
|
18
|
+
}, /*#__PURE__*/React.createElement(PisellAvatar, _extends({
|
|
19
|
+
className: "".concat(PREFIX, "__avatar")
|
|
20
|
+
}, config || {}), text));
|
|
21
|
+
}
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "".concat(PREFIX, "__avatar-wrapper")
|
|
24
|
+
}, /*#__PURE__*/React.createElement(PisellAvatar, _extends({
|
|
25
|
+
className: "".concat(PREFIX, "__avatar")
|
|
26
|
+
}, config || {}, {
|
|
27
|
+
src: cover || ''
|
|
28
|
+
})));
|
|
29
|
+
};
|
|
30
|
+
export default Avatar;
|