@pisell/private-materials 6.7.1 → 6.7.2
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/es/components/pay/toB/components/CardGroup/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/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/es/plus/webPosLogin/WebPosLogin.d.ts +11 -0
- package/es/plus/webPosLogin/WebPosLogin.js +552 -0
- package/es/plus/webPosLogin/WebPosLoginCpt.d.ts +9 -0
- package/es/plus/webPosLogin/WebPosLoginCpt.js +170 -0
- package/es/plus/webPosLogin/WebPosLoginCpt.less +171 -0
- package/es/plus/webPosLogin/components/BrandPanel/index.d.ts +9 -0
- package/es/plus/webPosLogin/components/BrandPanel/index.js +52 -0
- package/es/plus/webPosLogin/components/BrandPanel/index.less +58 -0
- package/es/plus/webPosLogin/components/LoginPanel/index.d.ts +21 -0
- package/es/plus/webPosLogin/components/LoginPanel/index.js +73 -0
- package/es/plus/webPosLogin/components/LoginPanel/index.less +43 -0
- package/es/plus/webPosLogin/components/SelectDevice/index.d.ts +28 -0
- package/es/plus/webPosLogin/components/SelectDevice/index.js +258 -0
- package/es/plus/webPosLogin/components/SelectDevice/index.less +167 -0
- package/es/plus/webPosLogin/components/SelectStore/index.d.ts +24 -0
- package/es/plus/webPosLogin/components/SelectStore/index.js +198 -0
- package/es/plus/webPosLogin/components/SelectStore/index.less +157 -0
- package/es/plus/webPosLogin/components/UserFooter/index.d.ts +28 -0
- package/es/plus/webPosLogin/components/UserFooter/index.js +110 -0
- package/es/plus/webPosLogin/components/UserFooter/index.less +70 -0
- package/es/plus/webPosLogin/index.d.ts +12 -0
- package/es/plus/webPosLogin/index.js +15 -0
- package/es/plus/webPosLogin/locales.d.ts +49 -0
- package/es/plus/webPosLogin/locales.js +57 -0
- package/es/plus/webPosLogin/service.d.ts +44 -0
- package/es/plus/webPosLogin/service.js +198 -0
- package/es/plus/webPosLogin/types.d.ts +286 -0
- package/es/plus/webPosLogin/types.js +1 -0
- package/es/pro/pisellPaymentList/example.d.ts +1 -0
- package/es/pro/priceKeyboard/hooks/rightItems.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/lib/components/pay/toB/components/CardGroup/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/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +1 -1
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/lib/plus/webPosLogin/WebPosLogin.d.ts +11 -0
- package/lib/plus/webPosLogin/WebPosLogin.js +334 -0
- package/lib/plus/webPosLogin/WebPosLoginCpt.d.ts +9 -0
- package/lib/plus/webPosLogin/WebPosLoginCpt.js +170 -0
- package/lib/plus/webPosLogin/WebPosLoginCpt.less +171 -0
- package/lib/plus/webPosLogin/components/BrandPanel/index.d.ts +9 -0
- package/lib/plus/webPosLogin/components/BrandPanel/index.js +63 -0
- package/lib/plus/webPosLogin/components/BrandPanel/index.less +58 -0
- package/lib/plus/webPosLogin/components/LoginPanel/index.d.ts +21 -0
- package/lib/plus/webPosLogin/components/LoginPanel/index.js +98 -0
- package/lib/plus/webPosLogin/components/LoginPanel/index.less +43 -0
- package/lib/plus/webPosLogin/components/SelectDevice/index.d.ts +28 -0
- package/lib/plus/webPosLogin/components/SelectDevice/index.js +158 -0
- package/lib/plus/webPosLogin/components/SelectDevice/index.less +167 -0
- package/lib/plus/webPosLogin/components/SelectStore/index.d.ts +24 -0
- package/lib/plus/webPosLogin/components/SelectStore/index.js +123 -0
- package/lib/plus/webPosLogin/components/SelectStore/index.less +157 -0
- package/lib/plus/webPosLogin/components/UserFooter/index.d.ts +28 -0
- package/lib/plus/webPosLogin/components/UserFooter/index.js +91 -0
- package/lib/plus/webPosLogin/components/UserFooter/index.less +70 -0
- package/lib/plus/webPosLogin/index.d.ts +12 -0
- package/lib/plus/webPosLogin/index.js +56 -0
- package/lib/plus/webPosLogin/locales.d.ts +49 -0
- package/lib/plus/webPosLogin/locales.js +77 -0
- package/lib/plus/webPosLogin/service.d.ts +44 -0
- package/lib/plus/webPosLogin/service.js +94 -0
- package/lib/plus/webPosLogin/types.d.ts +286 -0
- package/lib/plus/webPosLogin/types.js +17 -0
- package/lib/pro/pisellPaymentList/example.d.ts +1 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +1 -0
- package/lowcode/web-pos-login/meta.ts +71 -0
- package/package.json +4 -4
|
@@ -0,0 +1,170 @@
|
|
|
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, { memo, useMemo } from 'react';
|
|
8
|
+
import { locales } from '@pisell/utils';
|
|
9
|
+
import localeTexts from "./locales";
|
|
10
|
+
import BrandPanel from "./components/BrandPanel";
|
|
11
|
+
import LoginPanel from "./components/LoginPanel";
|
|
12
|
+
import SelectStore from "./components/SelectStore";
|
|
13
|
+
import SelectDevice from "./components/SelectDevice";
|
|
14
|
+
import UserFooter from "./components/UserFooter";
|
|
15
|
+
import "./WebPosLoginCpt.less";
|
|
16
|
+
|
|
17
|
+
/** 默认背景图片 */
|
|
18
|
+
var DEFAULT_BACKGROUND = 'http://static.pisellcdn.com/defaultBg.png';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* WebPosLoginCpt 主组件
|
|
22
|
+
* @description WebPOS 登录流程组件,包含登录、店铺选择、设备选择三个步骤
|
|
23
|
+
*/
|
|
24
|
+
var WebPosLoginCpt = /*#__PURE__*/memo(function (props) {
|
|
25
|
+
var _props$className = props.className,
|
|
26
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
27
|
+
style = props.style,
|
|
28
|
+
loginConfig = props.loginConfig,
|
|
29
|
+
backgroundImage = props.backgroundImage,
|
|
30
|
+
brandConfig = props.brandConfig,
|
|
31
|
+
_props$step = props.step,
|
|
32
|
+
step = _props$step === void 0 ? 'login' : _props$step,
|
|
33
|
+
_props$showBackButton = props.showBackButton,
|
|
34
|
+
showBackButton = _props$showBackButton === void 0 ? true : _props$showBackButton,
|
|
35
|
+
_props$storeList = props.storeList,
|
|
36
|
+
storeList = _props$storeList === void 0 ? [] : _props$storeList,
|
|
37
|
+
_props$deviceList = props.deviceList,
|
|
38
|
+
deviceList = _props$deviceList === void 0 ? [] : _props$deviceList,
|
|
39
|
+
userInfo = props.userInfo,
|
|
40
|
+
selectedStore = props.selectedStore,
|
|
41
|
+
lastUsedStoreId = props.lastUsedStoreId,
|
|
42
|
+
lastUsedDeviceId = props.lastUsedDeviceId,
|
|
43
|
+
_props$locale = props.locale,
|
|
44
|
+
locale = _props$locale === void 0 ? 'en' : _props$locale,
|
|
45
|
+
_props$loading = props.loading,
|
|
46
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
47
|
+
onStoreSelect = props.onStoreSelect,
|
|
48
|
+
onDeviceSelect = props.onDeviceSelect,
|
|
49
|
+
onChangeAccount = props.onChangeAccount,
|
|
50
|
+
onChangeStore = props.onChangeStore,
|
|
51
|
+
onBack = props.onBack,
|
|
52
|
+
onLoginSuccess = props.onLoginSuccess;
|
|
53
|
+
console.log(props, onLoginSuccess, 'onLoginSuccess');
|
|
54
|
+
|
|
55
|
+
// 初始化国际化
|
|
56
|
+
locales.init(localeTexts, locale);
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 获取当前步骤的标题
|
|
60
|
+
*/
|
|
61
|
+
var stepTitle = useMemo(function () {
|
|
62
|
+
var titles = {
|
|
63
|
+
login: '',
|
|
64
|
+
store: locales.getText('webpos-login-select-store-title'),
|
|
65
|
+
device: locales.getText('webpos-login-select-device-title')
|
|
66
|
+
};
|
|
67
|
+
return titles[step];
|
|
68
|
+
}, [step, locale]);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 是否显示返回按钮
|
|
72
|
+
* login 步骤默认不显示,其他步骤根据 showBackButton 配置
|
|
73
|
+
*/
|
|
74
|
+
var shouldShowBackButton = useMemo(function () {
|
|
75
|
+
if (step === 'login') return false;
|
|
76
|
+
return showBackButton;
|
|
77
|
+
}, [step, showBackButton]);
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* 渲染右侧交互区内容
|
|
81
|
+
*/
|
|
82
|
+
var renderRightContent = function renderRightContent() {
|
|
83
|
+
switch (step) {
|
|
84
|
+
case 'login':
|
|
85
|
+
// 登录组件
|
|
86
|
+
return /*#__PURE__*/React.createElement(LoginPanel, {
|
|
87
|
+
onLoginSuccess: onLoginSuccess,
|
|
88
|
+
config: loginConfig
|
|
89
|
+
});
|
|
90
|
+
case 'store':
|
|
91
|
+
// 店铺选择组件
|
|
92
|
+
return /*#__PURE__*/React.createElement(SelectStore, {
|
|
93
|
+
storeList: storeList,
|
|
94
|
+
locale: locale,
|
|
95
|
+
loading: loading,
|
|
96
|
+
lastUsedStoreId: lastUsedStoreId,
|
|
97
|
+
onSelect: onStoreSelect
|
|
98
|
+
});
|
|
99
|
+
case 'device':
|
|
100
|
+
// 设备选择组件
|
|
101
|
+
return /*#__PURE__*/React.createElement(SelectDevice, {
|
|
102
|
+
deviceList: deviceList,
|
|
103
|
+
locale: locale,
|
|
104
|
+
loading: loading,
|
|
105
|
+
lastUsedDeviceId: lastUsedDeviceId,
|
|
106
|
+
onSelect: onDeviceSelect
|
|
107
|
+
});
|
|
108
|
+
default:
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* 渲染底部用户信息
|
|
115
|
+
*/
|
|
116
|
+
var renderFooter = function renderFooter() {
|
|
117
|
+
// 登录步骤不显示底部信息
|
|
118
|
+
if (step === 'login') return null;
|
|
119
|
+
return /*#__PURE__*/React.createElement(UserFooter, {
|
|
120
|
+
isShowChangeStore: storeList.length > 1,
|
|
121
|
+
userInfo: userInfo,
|
|
122
|
+
selectedStore: selectedStore,
|
|
123
|
+
step: step,
|
|
124
|
+
locale: locale,
|
|
125
|
+
onChangeAccount: onChangeAccount,
|
|
126
|
+
onChangeStore: onChangeStore
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
130
|
+
className: "webpos-login ".concat(className).trim(),
|
|
131
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
132
|
+
backgroundImage: "url(".concat(backgroundImage || DEFAULT_BACKGROUND, ")")
|
|
133
|
+
})
|
|
134
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
className: "webpos-login__backdrop"
|
|
136
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: "webpos-login__card"
|
|
138
|
+
}, /*#__PURE__*/React.createElement(BrandPanel, {
|
|
139
|
+
config: brandConfig
|
|
140
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: "webpos-login__right-panel"
|
|
142
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
143
|
+
className: "webpos-login__header"
|
|
144
|
+
}, shouldShowBackButton && /*#__PURE__*/React.createElement("button", {
|
|
145
|
+
className: "webpos-login__back-btn",
|
|
146
|
+
onClick: onBack,
|
|
147
|
+
type: "button",
|
|
148
|
+
"aria-label": locales.getText('webpos-login-back')
|
|
149
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
150
|
+
width: "24",
|
|
151
|
+
height: "24",
|
|
152
|
+
viewBox: "0 0 24 24",
|
|
153
|
+
fill: "none",
|
|
154
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
155
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
156
|
+
d: "M15 18L9 12L15 6",
|
|
157
|
+
stroke: "currentColor",
|
|
158
|
+
strokeWidth: "2",
|
|
159
|
+
strokeLinecap: "round",
|
|
160
|
+
strokeLinejoin: "round"
|
|
161
|
+
}))), stepTitle && /*#__PURE__*/React.createElement("h1", {
|
|
162
|
+
className: "webpos-login__title"
|
|
163
|
+
}, stepTitle)), /*#__PURE__*/React.createElement("div", {
|
|
164
|
+
className: "webpos-login__content"
|
|
165
|
+
}, renderRightContent()), /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
className: "webpos-login__footer"
|
|
167
|
+
}, renderFooter()))));
|
|
168
|
+
});
|
|
169
|
+
WebPosLoginCpt.displayName = 'WebPosLoginCpt';
|
|
170
|
+
export default WebPosLoginCpt;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebPosLogin 主组件样式
|
|
3
|
+
*/
|
|
4
|
+
.webpos-login {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
background-size: cover;
|
|
12
|
+
background-position: center;
|
|
13
|
+
background-repeat: no-repeat;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
|
|
16
|
+
/* 背景模糊遮罩层 */
|
|
17
|
+
&__backdrop {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
right: 0;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
background: inherit;
|
|
24
|
+
background-size: inherit;
|
|
25
|
+
background-position: inherit;
|
|
26
|
+
filter: blur(20px);
|
|
27
|
+
transform: scale(1.1); /* 放大以避免边缘模糊不完整 */
|
|
28
|
+
z-index: 0;
|
|
29
|
+
|
|
30
|
+
/* 添加暗色遮罩增强对比 */
|
|
31
|
+
&::after {
|
|
32
|
+
content: '';
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
left: 0;
|
|
36
|
+
right: 0;
|
|
37
|
+
bottom: 0;
|
|
38
|
+
background: rgba(0, 0, 0, 0.3);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* 主内容卡片 */
|
|
43
|
+
&__card {
|
|
44
|
+
position: relative;
|
|
45
|
+
display: flex;
|
|
46
|
+
width: 83%;
|
|
47
|
+
max-width: 1600px;
|
|
48
|
+
min-height: 620px;
|
|
49
|
+
max-height: 700px;
|
|
50
|
+
background: #fff;
|
|
51
|
+
border-radius: 24px;
|
|
52
|
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
z-index: 1;
|
|
55
|
+
height: 81%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* 右侧交互区 */
|
|
59
|
+
&__right-panel {
|
|
60
|
+
flex: 1;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
min-width: 400px;
|
|
64
|
+
padding: 32px 40px;
|
|
65
|
+
background: #fafafa;
|
|
66
|
+
border-radius: 0 24px 24px 0;
|
|
67
|
+
height: 100%;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* 头部区域 */
|
|
71
|
+
&__header {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: 16px;
|
|
75
|
+
min-height: 40px;
|
|
76
|
+
margin-bottom: 24px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* 返回按钮 */
|
|
80
|
+
&__back-btn {
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
justify-content: center;
|
|
84
|
+
width: 40px;
|
|
85
|
+
height: 40px;
|
|
86
|
+
padding: 0;
|
|
87
|
+
background: transparent;
|
|
88
|
+
border: none;
|
|
89
|
+
border-radius: 8px;
|
|
90
|
+
color: #333;
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
transition: all 0.2s ease;
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
background: rgba(0, 0, 0, 0.05);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:active {
|
|
99
|
+
background: rgba(0, 0, 0, 0.1);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* 步骤标题 */
|
|
104
|
+
&__title {
|
|
105
|
+
flex: 1;
|
|
106
|
+
margin: 0;
|
|
107
|
+
font-size: 20px;
|
|
108
|
+
font-weight: 600;
|
|
109
|
+
color: #1a1a1a;
|
|
110
|
+
text-align: center;
|
|
111
|
+
padding-right: 56px; /* 平衡返回按钮的宽度,使标题居中 */
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* 内容区 */
|
|
115
|
+
&__content {
|
|
116
|
+
flex: 1;
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* 底部用户信息区域 */
|
|
123
|
+
&__footer {
|
|
124
|
+
margin-top: auto;
|
|
125
|
+
padding-top: 16px;
|
|
126
|
+
border-top: 1px solid #eee;
|
|
127
|
+
|
|
128
|
+
&:empty {
|
|
129
|
+
display: none;
|
|
130
|
+
padding: 0;
|
|
131
|
+
border: none;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* 响应式适配 */
|
|
137
|
+
@media screen and (max-width: 1024px) {
|
|
138
|
+
.webpos-login {
|
|
139
|
+
&__card {
|
|
140
|
+
width: 83%;
|
|
141
|
+
min-height: 550px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&__right-panel {
|
|
145
|
+
min-width: 600px;
|
|
146
|
+
padding: 24px 28px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&__title {
|
|
150
|
+
font-size: 18px;
|
|
151
|
+
padding-right: 48px;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* 小屏幕适配 */
|
|
157
|
+
@media screen and (max-width: 768px) {
|
|
158
|
+
.webpos-login {
|
|
159
|
+
&__card {
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
width: 95%;
|
|
162
|
+
min-height: auto;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&__right-panel {
|
|
166
|
+
min-width: auto;
|
|
167
|
+
border-radius: 0 0 24px 24px;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BrandPanelProps } from '../../types';
|
|
3
|
+
import './index.less';
|
|
4
|
+
/**
|
|
5
|
+
* BrandPanel 品牌区组件
|
|
6
|
+
* @description 登录页面左侧品牌展示区域,支持轮播图片/视频(预留),当前仅展示 Logo
|
|
7
|
+
*/
|
|
8
|
+
declare const BrandPanel: React.FC<BrandPanelProps>;
|
|
9
|
+
export default BrandPanel;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React, { memo, useMemo } from 'react';
|
|
2
|
+
import { Image } from '@pisell/materials';
|
|
3
|
+
import "./index.less";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* BrandPanel 品牌区组件
|
|
7
|
+
* @description 登录页面左侧品牌展示区域,支持轮播图片/视频(预留),当前仅展示 Logo
|
|
8
|
+
*/
|
|
9
|
+
var BrandPanel = /*#__PURE__*/memo(function (props) {
|
|
10
|
+
var config = props.config,
|
|
11
|
+
_props$className = props.className,
|
|
12
|
+
className = _props$className === void 0 ? '' : _props$className;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 获取展示的图片
|
|
16
|
+
* 优先使用轮播的第一张图片,否则使用 logo,最后使用默认 Logo
|
|
17
|
+
*/
|
|
18
|
+
var displayImage = useMemo(function () {
|
|
19
|
+
var _config$carouselItems;
|
|
20
|
+
// 如果有轮播配置,取第一个图片类型的内容
|
|
21
|
+
if (config !== null && config !== void 0 && (_config$carouselItems = config.carouselItems) !== null && _config$carouselItems !== void 0 && _config$carouselItems.length) {
|
|
22
|
+
var firstImage = config.carouselItems.find(function (item) {
|
|
23
|
+
return item.type === 'image';
|
|
24
|
+
});
|
|
25
|
+
if (firstImage !== null && firstImage !== void 0 && firstImage.url) {
|
|
26
|
+
return firstImage.url;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// 否则使用配置的 logo 或默认 logo
|
|
30
|
+
return config === null || config === void 0 ? void 0 : config.logo;
|
|
31
|
+
}, [config === null || config === void 0 ? void 0 : config.carouselItems, config === null || config === void 0 ? void 0 : config.logo]);
|
|
32
|
+
|
|
33
|
+
/** 品牌标语 */
|
|
34
|
+
var slogan = config === null || config === void 0 ? void 0 : config.slogan;
|
|
35
|
+
console.log('displayImage', displayImage);
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: "webpos-login-brand-panel ".concat(className).trim()
|
|
38
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
className: "webpos-login-brand-panel__content"
|
|
40
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: "webpos-login-brand-panel__logo-wrapper"
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
43
|
+
src: displayImage,
|
|
44
|
+
preview: false,
|
|
45
|
+
alt: "Brand Logo",
|
|
46
|
+
className: "webpos-login-brand-panel__logo"
|
|
47
|
+
})), slogan && /*#__PURE__*/React.createElement("p", {
|
|
48
|
+
className: "webpos-login-brand-panel__slogan"
|
|
49
|
+
}, slogan)));
|
|
50
|
+
});
|
|
51
|
+
BrandPanel.displayName = 'BrandPanel';
|
|
52
|
+
export default BrandPanel;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BrandPanel 品牌区组件样式
|
|
3
|
+
*/
|
|
4
|
+
.webpos-login-brand-panel {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
width: 50%;
|
|
10
|
+
min-width: 400px;
|
|
11
|
+
min-height: 600px;
|
|
12
|
+
background: linear-gradient(135deg, #F04A28 0%, #E8421F 100%);
|
|
13
|
+
border-radius: 24px 0 0 24px;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
flex-shrink: 0;
|
|
16
|
+
|
|
17
|
+
/* 品牌内容区 */
|
|
18
|
+
&__content {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
padding: 40px;
|
|
24
|
+
text-align: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Logo 容器 */
|
|
28
|
+
&__logo-wrapper {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
max-width: 320px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Logo 图片 */
|
|
36
|
+
&__logo {
|
|
37
|
+
max-width: 100%;
|
|
38
|
+
max-height: 120px;
|
|
39
|
+
object-fit: contain;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* 品牌标语 */
|
|
43
|
+
&__slogan {
|
|
44
|
+
margin-top: 16px;
|
|
45
|
+
font-size: 18px;
|
|
46
|
+
font-weight: 400;
|
|
47
|
+
color: rgba(255, 255, 255, 0.9);
|
|
48
|
+
letter-spacing: 0.5px;
|
|
49
|
+
line-height: 1.5;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* 响应式适配 */
|
|
54
|
+
@media screen and (max-width: 768px) {
|
|
55
|
+
.webpos-login-brand-panel {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
/**
|
|
4
|
+
* LoginPanel 组件 Props
|
|
5
|
+
*/
|
|
6
|
+
export interface LoginPanelProps {
|
|
7
|
+
/** 自定义类名 */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** 子元素 */
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/** 登录成功回调 */
|
|
12
|
+
onLoginSuccess?: (data: any) => void;
|
|
13
|
+
/** 登录配置 */
|
|
14
|
+
config?: any;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* LoginPanel 登录面板组件
|
|
18
|
+
* @description 登录表单容器,由用户自行实现具体登录逻辑
|
|
19
|
+
*/
|
|
20
|
+
declare const LoginPanel: React.FC<LoginPanelProps>;
|
|
21
|
+
export default LoginPanel;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import { Login2 } from "../../../../pro/Login2.0";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* LoginPanel 组件 Props
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* LoginPanel 登录面板组件
|
|
11
|
+
* @description 登录表单容器,由用户自行实现具体登录逻辑
|
|
12
|
+
*/
|
|
13
|
+
var LoginPanel = /*#__PURE__*/memo(function (props) {
|
|
14
|
+
var _props$className = props.className,
|
|
15
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
16
|
+
onLoginSuccess = props.onLoginSuccess,
|
|
17
|
+
config = props.config;
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "login-panel ".concat(className).trim()
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Login2, {
|
|
21
|
+
config: config || {
|
|
22
|
+
loginMethods: [{
|
|
23
|
+
type: 'email',
|
|
24
|
+
verificationMethods: ['password']
|
|
25
|
+
}],
|
|
26
|
+
ui: {
|
|
27
|
+
title: {
|
|
28
|
+
show: false,
|
|
29
|
+
text: 'Welcome back',
|
|
30
|
+
align: 'center'
|
|
31
|
+
},
|
|
32
|
+
subtitle: {
|
|
33
|
+
show: false,
|
|
34
|
+
text: 'Log in to your account',
|
|
35
|
+
align: 'center'
|
|
36
|
+
},
|
|
37
|
+
desc: {
|
|
38
|
+
show: false,
|
|
39
|
+
text: 'Welcome back! Please enter your details.',
|
|
40
|
+
align: 'center'
|
|
41
|
+
},
|
|
42
|
+
themeColor: '#7F56D9',
|
|
43
|
+
logo: {
|
|
44
|
+
show: false
|
|
45
|
+
},
|
|
46
|
+
formLabels: {
|
|
47
|
+
email: {
|
|
48
|
+
show: true
|
|
49
|
+
},
|
|
50
|
+
phone: {
|
|
51
|
+
show: true
|
|
52
|
+
},
|
|
53
|
+
password: {
|
|
54
|
+
show: true
|
|
55
|
+
},
|
|
56
|
+
verificationCode: {
|
|
57
|
+
show: true
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
legalTerms: {
|
|
62
|
+
enabled: false
|
|
63
|
+
},
|
|
64
|
+
emailLinkVerification: {
|
|
65
|
+
enabled: false,
|
|
66
|
+
code: ''
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
onLogin: onLoginSuccess
|
|
70
|
+
}));
|
|
71
|
+
});
|
|
72
|
+
LoginPanel.displayName = 'LoginPanel';
|
|
73
|
+
export default LoginPanel;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LoginPanel 登录面板组件样式
|
|
3
|
+
*/
|
|
4
|
+
.login-panel {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
height: 100%;
|
|
10
|
+
width: 100%;
|
|
11
|
+
padding: 24px;
|
|
12
|
+
|
|
13
|
+
/* 占位区域 */
|
|
14
|
+
&__placeholder {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
text-align: center;
|
|
20
|
+
padding: 40px;
|
|
21
|
+
border: 2px dashed #e5e5e5;
|
|
22
|
+
border-radius: 12px;
|
|
23
|
+
background: #fafafa;
|
|
24
|
+
width: 100%;
|
|
25
|
+
max-width: 360px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* 占位文本 */
|
|
29
|
+
&__placeholder-text {
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
color: #999;
|
|
33
|
+
margin: 0 0 8px 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* 占位提示 */
|
|
37
|
+
&__placeholder-hint {
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
color: #bbb;
|
|
40
|
+
margin: 0;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DeviceItem, LocaleType } from '../../types';
|
|
3
|
+
import './index.less';
|
|
4
|
+
/**
|
|
5
|
+
* SelectDevice 组件 Props
|
|
6
|
+
*/
|
|
7
|
+
export interface SelectDeviceProps {
|
|
8
|
+
/** 设备列表 */
|
|
9
|
+
deviceList?: DeviceItem[];
|
|
10
|
+
/** 语言 */
|
|
11
|
+
locale?: LocaleType;
|
|
12
|
+
/** 加载状态(列表加载) */
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
/** 上次使用的设备ID */
|
|
15
|
+
lastUsedDeviceId?: number;
|
|
16
|
+
/** 选择设备回调 */
|
|
17
|
+
onSelect?: (device: DeviceItem) => void;
|
|
18
|
+
/** 确认按钮文本 */
|
|
19
|
+
confirmOkText?: string;
|
|
20
|
+
/** 取消按钮文本 */
|
|
21
|
+
confirmCancelText?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* SelectDevice 设备选择组件
|
|
25
|
+
* @description 展示设备列表,支持搜索过滤和选择,已被使用的设备需确认后选择
|
|
26
|
+
*/
|
|
27
|
+
declare const SelectDevice: React.FC<SelectDeviceProps>;
|
|
28
|
+
export default SelectDevice;
|