@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,63 @@
|
|
|
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/webPosLogin/components/BrandPanel/index.tsx
|
|
30
|
+
var BrandPanel_exports = {};
|
|
31
|
+
__export(BrandPanel_exports, {
|
|
32
|
+
default: () => BrandPanel_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(BrandPanel_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_materials = require("@pisell/materials");
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var BrandPanel = (0, import_react.memo)((props) => {
|
|
39
|
+
const { config, className = "" } = props;
|
|
40
|
+
const displayImage = (0, import_react.useMemo)(() => {
|
|
41
|
+
var _a;
|
|
42
|
+
if ((_a = config == null ? void 0 : config.carouselItems) == null ? void 0 : _a.length) {
|
|
43
|
+
const firstImage = config.carouselItems.find((item) => item.type === "image");
|
|
44
|
+
if (firstImage == null ? void 0 : firstImage.url) {
|
|
45
|
+
return firstImage.url;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return config == null ? void 0 : config.logo;
|
|
49
|
+
}, [config == null ? void 0 : config.carouselItems, config == null ? void 0 : config.logo]);
|
|
50
|
+
const slogan = config == null ? void 0 : config.slogan;
|
|
51
|
+
console.log("displayImage", displayImage);
|
|
52
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `webpos-login-brand-panel ${className}`.trim() }, /* @__PURE__ */ import_react.default.createElement("div", { className: "webpos-login-brand-panel__content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "webpos-login-brand-panel__logo-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
|
|
53
|
+
import_materials.Image,
|
|
54
|
+
{
|
|
55
|
+
src: displayImage,
|
|
56
|
+
preview: false,
|
|
57
|
+
alt: "Brand Logo",
|
|
58
|
+
className: "webpos-login-brand-panel__logo"
|
|
59
|
+
}
|
|
60
|
+
)), slogan && /* @__PURE__ */ import_react.default.createElement("p", { className: "webpos-login-brand-panel__slogan" }, slogan)));
|
|
61
|
+
});
|
|
62
|
+
BrandPanel.displayName = "BrandPanel";
|
|
63
|
+
var BrandPanel_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,98 @@
|
|
|
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/webPosLogin/components/LoginPanel/index.tsx
|
|
30
|
+
var LoginPanel_exports = {};
|
|
31
|
+
__export(LoginPanel_exports, {
|
|
32
|
+
default: () => LoginPanel_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(LoginPanel_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_Login2 = require("../../../../pro/Login2.0");
|
|
37
|
+
var import_index = require("./index.less");
|
|
38
|
+
var LoginPanel = (0, import_react.memo)((props) => {
|
|
39
|
+
const { className = "", onLoginSuccess, config } = props;
|
|
40
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `login-panel ${className}`.trim() }, /* @__PURE__ */ import_react.default.createElement(
|
|
41
|
+
import_Login2.Login2,
|
|
42
|
+
{
|
|
43
|
+
config: config || {
|
|
44
|
+
loginMethods: [
|
|
45
|
+
{
|
|
46
|
+
type: "email",
|
|
47
|
+
verificationMethods: ["password"]
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
ui: {
|
|
51
|
+
title: {
|
|
52
|
+
show: false,
|
|
53
|
+
text: "Welcome back",
|
|
54
|
+
align: "center"
|
|
55
|
+
},
|
|
56
|
+
subtitle: {
|
|
57
|
+
show: false,
|
|
58
|
+
text: "Log in to your account",
|
|
59
|
+
align: "center"
|
|
60
|
+
},
|
|
61
|
+
desc: {
|
|
62
|
+
show: false,
|
|
63
|
+
text: "Welcome back! Please enter your details.",
|
|
64
|
+
align: "center"
|
|
65
|
+
},
|
|
66
|
+
themeColor: "#7F56D9",
|
|
67
|
+
logo: {
|
|
68
|
+
show: false
|
|
69
|
+
},
|
|
70
|
+
formLabels: {
|
|
71
|
+
email: {
|
|
72
|
+
show: true
|
|
73
|
+
},
|
|
74
|
+
phone: {
|
|
75
|
+
show: true
|
|
76
|
+
},
|
|
77
|
+
password: {
|
|
78
|
+
show: true
|
|
79
|
+
},
|
|
80
|
+
verificationCode: {
|
|
81
|
+
show: true
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
legalTerms: {
|
|
86
|
+
enabled: false
|
|
87
|
+
},
|
|
88
|
+
emailLinkVerification: {
|
|
89
|
+
enabled: false,
|
|
90
|
+
code: ""
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
onLogin: onLoginSuccess
|
|
94
|
+
}
|
|
95
|
+
));
|
|
96
|
+
});
|
|
97
|
+
LoginPanel.displayName = "LoginPanel";
|
|
98
|
+
var LoginPanel_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;
|
|
@@ -0,0 +1,158 @@
|
|
|
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/webPosLogin/components/SelectDevice/index.tsx
|
|
30
|
+
var SelectDevice_exports = {};
|
|
31
|
+
__export(SelectDevice_exports, {
|
|
32
|
+
default: () => SelectDevice_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(SelectDevice_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_icons = require("@ant-design/icons");
|
|
38
|
+
var import_materials = require("@pisell/materials");
|
|
39
|
+
var import_utils = require("@pisell/utils");
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var DeviceIcon = () => /* @__PURE__ */ import_react.default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react.default.createElement("rect", { x: "4", y: "3", width: "16", height: "18", rx: "2", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react.default.createElement("line", { x1: "4", y1: "7", x2: "20", y2: "7", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react.default.createElement("line", { x1: "4", y1: "17", x2: "20", y2: "17", stroke: "currentColor", strokeWidth: "2" }), /* @__PURE__ */ import_react.default.createElement("circle", { cx: "12", cy: "19.5", r: "0.5", fill: "currentColor" }));
|
|
42
|
+
var matchDevice = (device, keyword) => {
|
|
43
|
+
if (!keyword.trim()) return true;
|
|
44
|
+
const lowerKeyword = keyword.toLowerCase();
|
|
45
|
+
const searchFields = [
|
|
46
|
+
device == null ? void 0 : device.name,
|
|
47
|
+
device == null ? void 0 : device.description,
|
|
48
|
+
device == null ? void 0 : device.number
|
|
49
|
+
].filter(Boolean);
|
|
50
|
+
return searchFields.some(
|
|
51
|
+
(field) => field == null ? void 0 : field.toLowerCase().includes(lowerKeyword)
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
var getConfirmText = (device, locale) => {
|
|
55
|
+
var _a;
|
|
56
|
+
const deviceName = (device == null ? void 0 : device.name) || "";
|
|
57
|
+
const clientName = ((_a = device == null ? void 0 : device.client) == null ? void 0 : _a.name) || "";
|
|
58
|
+
const langText = {
|
|
59
|
+
en: `The device "${deviceName}" is currently in use by "${clientName}". Are you sure you want to take it over?`,
|
|
60
|
+
"zh-CN": `设备"${deviceName}"正在被"${clientName}"使用,您确定要接管此设备吗?`,
|
|
61
|
+
"zh-HK": `設備"${deviceName}"正在被"${clientName}"使用,您確定要接管此設備嗎?`
|
|
62
|
+
};
|
|
63
|
+
return langText[locale];
|
|
64
|
+
};
|
|
65
|
+
var SelectDevice = (0, import_react.memo)((props) => {
|
|
66
|
+
const {
|
|
67
|
+
deviceList = [],
|
|
68
|
+
locale = "en",
|
|
69
|
+
loading = false,
|
|
70
|
+
lastUsedDeviceId,
|
|
71
|
+
onSelect,
|
|
72
|
+
confirmOkText,
|
|
73
|
+
confirmCancelText
|
|
74
|
+
} = props;
|
|
75
|
+
const [searchKeyword, setSearchKeyword] = (0, import_react.useState)("");
|
|
76
|
+
const [selectingId, setSelectingId] = (0, import_react.useState)(null);
|
|
77
|
+
const [confirmVisible, setConfirmVisible] = (0, import_react.useState)(false);
|
|
78
|
+
const [pendingDevice, setPendingDevice] = (0, import_react.useState)(null);
|
|
79
|
+
const filteredDeviceList = (0, import_react.useMemo)(() => {
|
|
80
|
+
if (!searchKeyword.trim()) return deviceList;
|
|
81
|
+
return deviceList.filter((device) => matchDevice(device, searchKeyword));
|
|
82
|
+
}, [deviceList, searchKeyword]);
|
|
83
|
+
const handleSearchChange = (0, import_react.useCallback)((e) => {
|
|
84
|
+
setSearchKeyword(e.target.value);
|
|
85
|
+
}, []);
|
|
86
|
+
const handleSelectDevice = (0, import_react.useCallback)((device) => {
|
|
87
|
+
if (selectingId) return;
|
|
88
|
+
if (device.client) {
|
|
89
|
+
setPendingDevice(device);
|
|
90
|
+
setConfirmVisible(true);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
setSelectingId(device.id);
|
|
94
|
+
onSelect == null ? void 0 : onSelect(device);
|
|
95
|
+
}, [selectingId, onSelect]);
|
|
96
|
+
const handleConfirmSelect = (0, import_react.useCallback)(() => {
|
|
97
|
+
if (!pendingDevice) return;
|
|
98
|
+
setConfirmVisible(false);
|
|
99
|
+
setSelectingId(pendingDevice.id);
|
|
100
|
+
onSelect == null ? void 0 : onSelect(pendingDevice);
|
|
101
|
+
setPendingDevice(null);
|
|
102
|
+
}, [pendingDevice, onSelect]);
|
|
103
|
+
const handleCancelConfirm = (0, import_react.useCallback)(() => {
|
|
104
|
+
setConfirmVisible(false);
|
|
105
|
+
setPendingDevice(null);
|
|
106
|
+
}, []);
|
|
107
|
+
const okText = confirmOkText || (locale === "zh-CN" ? "确认" : locale === "zh-HK" ? "確認" : "Confirm");
|
|
108
|
+
const cancelText = confirmCancelText || (locale === "zh-CN" ? "取消" : locale === "zh-HK" ? "取消" : "Cancel");
|
|
109
|
+
const renderDeviceItem = (device) => {
|
|
110
|
+
const isLastUsed = lastUsedDeviceId === device.id;
|
|
111
|
+
const isSelecting = selectingId === device.id;
|
|
112
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
key: device.id,
|
|
116
|
+
className: `select-device__item ${isSelecting ? "select-device__item--selecting" : ""}`,
|
|
117
|
+
onClick: () => handleSelectDevice(device)
|
|
118
|
+
},
|
|
119
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "select-device__item-icon" }, /* @__PURE__ */ import_react.default.createElement(DeviceIcon, null)),
|
|
120
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "select-device__item-content" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "select-device__item-name" }, device.name), device.description && /* @__PURE__ */ import_react.default.createElement("span", { className: "select-device__item-desc" }, device.description)),
|
|
121
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "select-device__item-extra" }, isSelecting ? /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { size: "small" }) : isLastUsed ? /* @__PURE__ */ import_react.default.createElement("span", { className: "select-device__item-tag" }, import_utils.locales.getText("webpos-login-last-used")) : null)
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "select-device" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "select-device__search" }, /* @__PURE__ */ import_react.default.createElement(
|
|
125
|
+
import_materials.PisellInput,
|
|
126
|
+
{
|
|
127
|
+
placeholder: import_utils.locales.getText("webpos-login-search"),
|
|
128
|
+
prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SearchOutlined, { style: { color: "#999" } }),
|
|
129
|
+
value: searchKeyword,
|
|
130
|
+
onChange: handleSearchChange,
|
|
131
|
+
allowClear: true,
|
|
132
|
+
size: "large"
|
|
133
|
+
}
|
|
134
|
+
)), /* @__PURE__ */ import_react.default.createElement("div", { className: "select-device__list" }, loading ? /* @__PURE__ */ import_react.default.createElement("div", { className: "select-device__loading" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { size: "large" })) : filteredDeviceList.length === 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "select-device__empty" }, /* @__PURE__ */ import_react.default.createElement(
|
|
135
|
+
import_materials.PisellEmpty,
|
|
136
|
+
{
|
|
137
|
+
description: import_utils.locales.getText("webpos-login-select-device-empty")
|
|
138
|
+
}
|
|
139
|
+
)) : filteredDeviceList.map(renderDeviceItem)), /* @__PURE__ */ import_react.default.createElement(
|
|
140
|
+
import_materials.PisellModal.Information,
|
|
141
|
+
{
|
|
142
|
+
title: "",
|
|
143
|
+
describe: pendingDevice ? getConfirmText(pendingDevice, locale) : "",
|
|
144
|
+
open: confirmVisible,
|
|
145
|
+
okText,
|
|
146
|
+
cancelText,
|
|
147
|
+
okVisible: true,
|
|
148
|
+
cancelVisible: true,
|
|
149
|
+
closable: true,
|
|
150
|
+
footerDivider: true,
|
|
151
|
+
destroyOnClose: true,
|
|
152
|
+
onOk: handleConfirmSelect,
|
|
153
|
+
onCancel: handleCancelConfirm
|
|
154
|
+
}
|
|
155
|
+
));
|
|
156
|
+
});
|
|
157
|
+
SelectDevice.displayName = "SelectDevice";
|
|
158
|
+
var SelectDevice_default = SelectDevice;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SelectDevice 设备选择组件样式
|
|
3
|
+
*/
|
|
4
|
+
.select-device {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
height: 100%;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
/* 搜索框区域 */
|
|
11
|
+
&__search {
|
|
12
|
+
flex-shrink: 0;
|
|
13
|
+
padding: 0 0 16px 0;
|
|
14
|
+
|
|
15
|
+
.ant-input-affix-wrapper {
|
|
16
|
+
border-radius: 8px;
|
|
17
|
+
border: 1px solid #e5e5e5;
|
|
18
|
+
background: #fff;
|
|
19
|
+
height: 48px;
|
|
20
|
+
|
|
21
|
+
&:hover,
|
|
22
|
+
&:focus,
|
|
23
|
+
&.ant-input-affix-wrapper-focused {
|
|
24
|
+
border-color: #F04A28;
|
|
25
|
+
box-shadow: 0 0 0 2px rgba(240, 74, 40, 0.1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ant-input {
|
|
29
|
+
font-size: 15px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* 设备列表区域 */
|
|
35
|
+
&__list {
|
|
36
|
+
flex: 1;
|
|
37
|
+
overflow-y: auto;
|
|
38
|
+
overflow-x: hidden;
|
|
39
|
+
padding-right: 4px;
|
|
40
|
+
|
|
41
|
+
/* 自定义滚动条 */
|
|
42
|
+
&::-webkit-scrollbar {
|
|
43
|
+
width: 6px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&::-webkit-scrollbar-track {
|
|
47
|
+
background: transparent;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&::-webkit-scrollbar-thumb {
|
|
51
|
+
background: #ddd;
|
|
52
|
+
border-radius: 3px;
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
background: #ccc;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* 加载状态 */
|
|
61
|
+
&__loading {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
height: 200px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* 空状态 */
|
|
69
|
+
&__empty {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
height: 200px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* 设备列表项 */
|
|
77
|
+
&__item {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
gap: 16px;
|
|
81
|
+
padding: 16px;
|
|
82
|
+
margin-bottom: 8px;
|
|
83
|
+
background: #fff;
|
|
84
|
+
border: 1px solid #eee;
|
|
85
|
+
border-radius: 12px;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
transition: all 0.2s ease;
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
border-color: #F04A28;
|
|
91
|
+
box-shadow: 0 2px 8px rgba(240, 74, 40, 0.1);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:active {
|
|
95
|
+
transform: scale(0.99);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* 选中状态 */
|
|
99
|
+
&--selecting {
|
|
100
|
+
opacity: 0.7;
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* 设备图标 */
|
|
105
|
+
&-icon {
|
|
106
|
+
flex-shrink: 0;
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
width: 48px;
|
|
111
|
+
height: 48px;
|
|
112
|
+
border-radius: 8px;
|
|
113
|
+
background: #f5f5f5;
|
|
114
|
+
color: #666;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* 设备内容 */
|
|
118
|
+
&-content {
|
|
119
|
+
flex: 1;
|
|
120
|
+
min-width: 0;
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
gap: 4px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* 设备名称 */
|
|
127
|
+
&-name {
|
|
128
|
+
display: block;
|
|
129
|
+
font-size: 15px;
|
|
130
|
+
font-weight: 500;
|
|
131
|
+
color: #1a1a1a;
|
|
132
|
+
white-space: nowrap;
|
|
133
|
+
overflow: hidden;
|
|
134
|
+
text-overflow: ellipsis;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* 设备描述 */
|
|
138
|
+
&-desc {
|
|
139
|
+
display: block;
|
|
140
|
+
font-size: 13px;
|
|
141
|
+
color: #999;
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
text-overflow: ellipsis;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* 额外信息区域 */
|
|
148
|
+
&-extra {
|
|
149
|
+
flex-shrink: 0;
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Last used 标签 */
|
|
155
|
+
&-tag {
|
|
156
|
+
display: inline-flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
padding: 4px 12px;
|
|
159
|
+
font-size: 12px;
|
|
160
|
+
font-weight: 500;
|
|
161
|
+
color: #fff;
|
|
162
|
+
background: #F04A28;
|
|
163
|
+
border-radius: 4px;
|
|
164
|
+
white-space: nowrap;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoreItem, LocaleType } from '../../types';
|
|
3
|
+
import './index.less';
|
|
4
|
+
/**
|
|
5
|
+
* SelectStore 组件 Props
|
|
6
|
+
*/
|
|
7
|
+
export interface SelectStoreProps {
|
|
8
|
+
/** 店铺列表 */
|
|
9
|
+
storeList?: StoreItem[];
|
|
10
|
+
/** 语言 */
|
|
11
|
+
locale?: LocaleType;
|
|
12
|
+
/** 加载状态(列表加载) */
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
/** 上次使用的店铺ID */
|
|
15
|
+
lastUsedStoreId?: number;
|
|
16
|
+
/** 选择店铺回调 */
|
|
17
|
+
onSelect?: (store: StoreItem) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* SelectStore 店铺选择组件
|
|
21
|
+
* @description 展示店铺列表,支持搜索过滤和选择
|
|
22
|
+
*/
|
|
23
|
+
declare const SelectStore: React.FC<SelectStoreProps>;
|
|
24
|
+
export default SelectStore;
|