@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,198 @@
|
|
|
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
|
+
var _excluded = ["deviceNumber"];
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
6
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
7
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
8
|
+
import { request } from "../../utils";
|
|
9
|
+
/**
|
|
10
|
+
* 获取设备列表
|
|
11
|
+
* @param params 查询参数
|
|
12
|
+
* @returns Promise<{list: any[], count: number}> 设备列表和总数
|
|
13
|
+
*/
|
|
14
|
+
export var getDeviceList = /*#__PURE__*/function () {
|
|
15
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(parmas) {
|
|
16
|
+
var _yield$request$getReq, data;
|
|
17
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19
|
+
case 0:
|
|
20
|
+
_context.prev = 0;
|
|
21
|
+
_context.next = 3;
|
|
22
|
+
return request.getRequest().get("/shop/device/select", parmas, {
|
|
23
|
+
cache: {
|
|
24
|
+
mode: 'remote_local',
|
|
25
|
+
type: 'indexDB'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
case 3:
|
|
29
|
+
_yield$request$getReq = _context.sent;
|
|
30
|
+
data = _yield$request$getReq.data;
|
|
31
|
+
return _context.abrupt("return", data || []);
|
|
32
|
+
case 8:
|
|
33
|
+
_context.prev = 8;
|
|
34
|
+
_context.t0 = _context["catch"](0);
|
|
35
|
+
console.error(_context.t0);
|
|
36
|
+
return _context.abrupt("return", []);
|
|
37
|
+
case 12:
|
|
38
|
+
case "end":
|
|
39
|
+
return _context.stop();
|
|
40
|
+
}
|
|
41
|
+
}, _callee, null, [[0, 8]]);
|
|
42
|
+
}));
|
|
43
|
+
return function getDeviceList(_x) {
|
|
44
|
+
return _ref.apply(this, arguments);
|
|
45
|
+
};
|
|
46
|
+
}();
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 选择店铺
|
|
50
|
+
* @param shopId 店铺ID
|
|
51
|
+
* @returns Promise<any> 选择店铺结果
|
|
52
|
+
*/
|
|
53
|
+
export var selectShop = /*#__PURE__*/function () {
|
|
54
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(shopId) {
|
|
55
|
+
var _yield$request$getReq2, data;
|
|
56
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
57
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
58
|
+
case 0:
|
|
59
|
+
_context2.next = 2;
|
|
60
|
+
return request.getRequest().get("/shop/account/choose-shop/".concat(shopId), {}, {
|
|
61
|
+
cache: {
|
|
62
|
+
mode: 'remote_local',
|
|
63
|
+
type: 'indexDB'
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
case 2:
|
|
67
|
+
_yield$request$getReq2 = _context2.sent;
|
|
68
|
+
data = _yield$request$getReq2.data;
|
|
69
|
+
return _context2.abrupt("return", data);
|
|
70
|
+
case 5:
|
|
71
|
+
case "end":
|
|
72
|
+
return _context2.stop();
|
|
73
|
+
}
|
|
74
|
+
}, _callee2);
|
|
75
|
+
}));
|
|
76
|
+
return function selectShop(_x2) {
|
|
77
|
+
return _ref2.apply(this, arguments);
|
|
78
|
+
};
|
|
79
|
+
}();
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 获取租户详情
|
|
83
|
+
* @param deviceId 设备ID
|
|
84
|
+
* @returns Promise<any> 租户详情
|
|
85
|
+
*/
|
|
86
|
+
export var getTenantDetail = /*#__PURE__*/function () {
|
|
87
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
88
|
+
var _yield$request$getReq3, data;
|
|
89
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
90
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
91
|
+
case 0:
|
|
92
|
+
_context3.next = 2;
|
|
93
|
+
return request.getRequest().get("/tenant/core", {}, {
|
|
94
|
+
prefix: false
|
|
95
|
+
});
|
|
96
|
+
case 2:
|
|
97
|
+
_yield$request$getReq3 = _context3.sent;
|
|
98
|
+
data = _yield$request$getReq3.data;
|
|
99
|
+
return _context3.abrupt("return", data);
|
|
100
|
+
case 5:
|
|
101
|
+
case "end":
|
|
102
|
+
return _context3.stop();
|
|
103
|
+
}
|
|
104
|
+
}, _callee3);
|
|
105
|
+
}));
|
|
106
|
+
return function getTenantDetail() {
|
|
107
|
+
return _ref3.apply(this, arguments);
|
|
108
|
+
};
|
|
109
|
+
}();
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* 获取租户列表
|
|
113
|
+
* @returns Promise<any> 租户列表
|
|
114
|
+
*/
|
|
115
|
+
export var getTenant = /*#__PURE__*/function () {
|
|
116
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
117
|
+
var _yield$request$getReq4, data;
|
|
118
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
119
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
120
|
+
case 0:
|
|
121
|
+
_context4.next = 2;
|
|
122
|
+
return request.getRequest().get("/account/auth/tenant", {}, {
|
|
123
|
+
prefix: false
|
|
124
|
+
});
|
|
125
|
+
case 2:
|
|
126
|
+
_yield$request$getReq4 = _context4.sent;
|
|
127
|
+
data = _yield$request$getReq4.data;
|
|
128
|
+
return _context4.abrupt("return", data);
|
|
129
|
+
case 5:
|
|
130
|
+
case "end":
|
|
131
|
+
return _context4.stop();
|
|
132
|
+
}
|
|
133
|
+
}, _callee4);
|
|
134
|
+
}));
|
|
135
|
+
return function getTenant() {
|
|
136
|
+
return _ref4.apply(this, arguments);
|
|
137
|
+
};
|
|
138
|
+
}();
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* 选择设备
|
|
142
|
+
* @param deviceNumber 设备编号
|
|
143
|
+
* @returns Promise<any> 设备详情
|
|
144
|
+
*/
|
|
145
|
+
export var selectDevice = /*#__PURE__*/function () {
|
|
146
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
|
|
147
|
+
var deviceNumber, rest, _yield$request$getReq5, data;
|
|
148
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
149
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
150
|
+
case 0:
|
|
151
|
+
deviceNumber = params.deviceNumber, rest = _objectWithoutProperties(params, _excluded);
|
|
152
|
+
_context5.next = 3;
|
|
153
|
+
return request.getRequest().post("/shop/device/".concat(deviceNumber, "/allocate"), rest);
|
|
154
|
+
case 3:
|
|
155
|
+
_yield$request$getReq5 = _context5.sent;
|
|
156
|
+
data = _yield$request$getReq5.data;
|
|
157
|
+
return _context5.abrupt("return", data);
|
|
158
|
+
case 6:
|
|
159
|
+
case "end":
|
|
160
|
+
return _context5.stop();
|
|
161
|
+
}
|
|
162
|
+
}, _callee5);
|
|
163
|
+
}));
|
|
164
|
+
return function selectDevice(_x3) {
|
|
165
|
+
return _ref5.apply(this, arguments);
|
|
166
|
+
};
|
|
167
|
+
}();
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* 解除设备绑定
|
|
171
|
+
* @param deviceNumber 设备编号
|
|
172
|
+
* @returns Promise<any> 解除设备绑定结果
|
|
173
|
+
*/
|
|
174
|
+
export var dissociateDevice = /*#__PURE__*/function () {
|
|
175
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
|
|
176
|
+
var number, dissociateDeviceNumber, _yield$request$getReq6, data;
|
|
177
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
178
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
179
|
+
case 0:
|
|
180
|
+
number = params.number, dissociateDeviceNumber = params.dissociateDeviceNumber;
|
|
181
|
+
_context6.next = 3;
|
|
182
|
+
return request.getRequest().post("/shop/device/".concat(dissociateDeviceNumber, "/deactivate"), {
|
|
183
|
+
number: number
|
|
184
|
+
});
|
|
185
|
+
case 3:
|
|
186
|
+
_yield$request$getReq6 = _context6.sent;
|
|
187
|
+
data = _yield$request$getReq6.data;
|
|
188
|
+
return _context6.abrupt("return", data);
|
|
189
|
+
case 6:
|
|
190
|
+
case "end":
|
|
191
|
+
return _context6.stop();
|
|
192
|
+
}
|
|
193
|
+
}, _callee6);
|
|
194
|
+
}));
|
|
195
|
+
return function dissociateDevice(_x4) {
|
|
196
|
+
return _ref6.apply(this, arguments);
|
|
197
|
+
};
|
|
198
|
+
}();
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebPosLogin 组件类型定义
|
|
3
|
+
* @description WebPOS 登录流程组件,包含登录、店铺选择、设备选择三个步骤
|
|
4
|
+
*/
|
|
5
|
+
/// <reference types="react" />
|
|
6
|
+
/**
|
|
7
|
+
* 店铺数据结构
|
|
8
|
+
* @description 从租户列表接口返回的店铺信息
|
|
9
|
+
*/
|
|
10
|
+
export interface StoreItem {
|
|
11
|
+
/** 店铺ID */
|
|
12
|
+
id: number;
|
|
13
|
+
/** 租户ID */
|
|
14
|
+
tenant_id: number;
|
|
15
|
+
/** 账户ID */
|
|
16
|
+
account_id: number;
|
|
17
|
+
/** 类型 */
|
|
18
|
+
type: string;
|
|
19
|
+
/** 昵称 */
|
|
20
|
+
nickname: string;
|
|
21
|
+
/** 状态 */
|
|
22
|
+
status: string;
|
|
23
|
+
/** 创建时间 */
|
|
24
|
+
created_at?: string;
|
|
25
|
+
/** 更新时间 */
|
|
26
|
+
updated_at?: string;
|
|
27
|
+
/** 租户详情 */
|
|
28
|
+
tenant: {
|
|
29
|
+
/** 租户ID */
|
|
30
|
+
id: number;
|
|
31
|
+
/** 父租户ID */
|
|
32
|
+
tenant_id?: number;
|
|
33
|
+
/** 账户ID */
|
|
34
|
+
account_id?: number;
|
|
35
|
+
/** 类型 */
|
|
36
|
+
type?: string;
|
|
37
|
+
/** 名称(多语言) */
|
|
38
|
+
name: {
|
|
39
|
+
en?: string | null;
|
|
40
|
+
'zh-CN'?: string | null;
|
|
41
|
+
'zh-HK'?: string | null;
|
|
42
|
+
original: string;
|
|
43
|
+
};
|
|
44
|
+
/** Logo图片 */
|
|
45
|
+
logo?: string;
|
|
46
|
+
/** 图标 */
|
|
47
|
+
icon?: string;
|
|
48
|
+
/** Favicon */
|
|
49
|
+
favicon?: string;
|
|
50
|
+
/** 默认域名 */
|
|
51
|
+
default_domain: string;
|
|
52
|
+
/** 私有域名 */
|
|
53
|
+
private_domain?: string | null;
|
|
54
|
+
/** 货币代码 */
|
|
55
|
+
currency_code?: string | null;
|
|
56
|
+
/** 国家代码 */
|
|
57
|
+
country_code?: string | null;
|
|
58
|
+
/** 语言 */
|
|
59
|
+
locale?: string;
|
|
60
|
+
/** 时区 */
|
|
61
|
+
timezone?: string;
|
|
62
|
+
/** 状态 */
|
|
63
|
+
status?: string;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 设备客户端信息
|
|
68
|
+
* @description 设备绑定的客户端详情
|
|
69
|
+
*/
|
|
70
|
+
export interface DeviceClient {
|
|
71
|
+
/** 客户端ID */
|
|
72
|
+
id: number;
|
|
73
|
+
/** 店铺ID */
|
|
74
|
+
shop_id: number;
|
|
75
|
+
/** 设备ID */
|
|
76
|
+
device_id: number;
|
|
77
|
+
/** 客户端编号 */
|
|
78
|
+
number: string;
|
|
79
|
+
/** 客户端名称 */
|
|
80
|
+
name: string;
|
|
81
|
+
/** 客户端类型 */
|
|
82
|
+
type: string;
|
|
83
|
+
/** 设备型号 */
|
|
84
|
+
model?: string;
|
|
85
|
+
/** 系统版本 */
|
|
86
|
+
version?: string;
|
|
87
|
+
/** 设备详细数据 */
|
|
88
|
+
data?: {
|
|
89
|
+
battery?: {
|
|
90
|
+
is_charging?: boolean;
|
|
91
|
+
visible_percent?: string;
|
|
92
|
+
};
|
|
93
|
+
hardware?: {
|
|
94
|
+
country?: string;
|
|
95
|
+
datetime?: string;
|
|
96
|
+
language?: string;
|
|
97
|
+
timezone?: string;
|
|
98
|
+
};
|
|
99
|
+
application?: {
|
|
100
|
+
name?: string;
|
|
101
|
+
type?: string;
|
|
102
|
+
version?: string;
|
|
103
|
+
language?: string;
|
|
104
|
+
bundle_id?: string;
|
|
105
|
+
};
|
|
106
|
+
connectivity?: {
|
|
107
|
+
ip?: string;
|
|
108
|
+
type?: string;
|
|
109
|
+
wifi_details?: any[];
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
/** 最后刷新时间 */
|
|
113
|
+
refreshed_at?: string;
|
|
114
|
+
/** 创建时间 */
|
|
115
|
+
created_at?: string;
|
|
116
|
+
/** 更新时间 */
|
|
117
|
+
updated_at?: string;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* 设备数据结构
|
|
121
|
+
* @description 从设备列表接口返回的设备信息
|
|
122
|
+
*/
|
|
123
|
+
export interface DeviceItem {
|
|
124
|
+
/** 设备ID */
|
|
125
|
+
id: number;
|
|
126
|
+
/** 店铺ID */
|
|
127
|
+
shop_id: number;
|
|
128
|
+
/** 设备类型 */
|
|
129
|
+
type: string;
|
|
130
|
+
/** 设备编号 */
|
|
131
|
+
number: string;
|
|
132
|
+
/** 设备名称 */
|
|
133
|
+
name: string;
|
|
134
|
+
/** 设备描述 */
|
|
135
|
+
description?: string;
|
|
136
|
+
/** 设备设置 */
|
|
137
|
+
setting?: any[];
|
|
138
|
+
/** 创建时间 */
|
|
139
|
+
created_at?: string;
|
|
140
|
+
/** 更新时间 */
|
|
141
|
+
updated_at?: string;
|
|
142
|
+
/** 绑定的客户端信息(null 表示未被使用) */
|
|
143
|
+
client?: DeviceClient | null;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* 用户信息
|
|
147
|
+
* @description 当前登录用户的基本信息
|
|
148
|
+
*/
|
|
149
|
+
export interface UserInfo {
|
|
150
|
+
/** 用户名称 */
|
|
151
|
+
name: string;
|
|
152
|
+
/** 用户头像 */
|
|
153
|
+
avatar?: string;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* 品牌区轮播项
|
|
157
|
+
* @description 左侧品牌区的轮播内容配置
|
|
158
|
+
*/
|
|
159
|
+
export interface CarouselItem {
|
|
160
|
+
/** 内容类型:图片或视频 */
|
|
161
|
+
type: 'image' | 'video';
|
|
162
|
+
/** 资源URL */
|
|
163
|
+
url: string;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* 品牌区配置
|
|
167
|
+
* @description 左侧品牌展示区域的配置
|
|
168
|
+
*/
|
|
169
|
+
export interface BrandConfig {
|
|
170
|
+
/** 轮播内容列表(图片/视频) */
|
|
171
|
+
carouselItems?: CarouselItem[];
|
|
172
|
+
/** 默认Logo(当无轮播时显示) */
|
|
173
|
+
logo?: string;
|
|
174
|
+
/** 品牌标语 */
|
|
175
|
+
slogan?: string;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* 登录流程步骤
|
|
179
|
+
*/
|
|
180
|
+
export declare type LoginStep = 'login' | 'store' | 'device';
|
|
181
|
+
/**
|
|
182
|
+
* 支持的语言类型
|
|
183
|
+
*/
|
|
184
|
+
export declare type LocaleType = 'en' | 'zh-CN' | 'zh-HK';
|
|
185
|
+
/**
|
|
186
|
+
* WebPosLogin 主组件 Props
|
|
187
|
+
* @description WebPOS 登录组件的所有配置项
|
|
188
|
+
*/
|
|
189
|
+
export interface WebPosLoginCptProps {
|
|
190
|
+
/** 自定义类名 */
|
|
191
|
+
className?: string;
|
|
192
|
+
/** 自定义样式 */
|
|
193
|
+
style?: React.CSSProperties;
|
|
194
|
+
/** 背景图片URL */
|
|
195
|
+
backgroundImage?: string;
|
|
196
|
+
/** 品牌区配置 */
|
|
197
|
+
brandConfig?: BrandConfig;
|
|
198
|
+
/** 当前步骤:login-登录 | store-店铺选择 | device-设备选择 */
|
|
199
|
+
step?: LoginStep;
|
|
200
|
+
/** 是否显示返回按钮(默认 true) */
|
|
201
|
+
showBackButton?: boolean;
|
|
202
|
+
/** 店铺列表数据 */
|
|
203
|
+
storeList?: StoreItem[];
|
|
204
|
+
/** 设备列表数据 */
|
|
205
|
+
deviceList?: DeviceItem[];
|
|
206
|
+
/** 当前用户信息 */
|
|
207
|
+
userInfo?: UserInfo;
|
|
208
|
+
/** 当前选中的店铺 */
|
|
209
|
+
selectedStore?: StoreItem;
|
|
210
|
+
/** 上次使用的店铺ID(用于显示 Last used 标签) */
|
|
211
|
+
lastUsedStoreId?: number;
|
|
212
|
+
/** 上次使用的设备ID(用于显示 Last used 标签) */
|
|
213
|
+
lastUsedDeviceId?: number;
|
|
214
|
+
/** 语言设置 */
|
|
215
|
+
locale?: LocaleType;
|
|
216
|
+
/** 加载状态 */
|
|
217
|
+
loading?: boolean;
|
|
218
|
+
/** 登录配置 */
|
|
219
|
+
loginConfig?: any;
|
|
220
|
+
/** 店铺选择回调 */
|
|
221
|
+
onStoreSelect?: (store: StoreItem) => void;
|
|
222
|
+
/** 设备选择回调 */
|
|
223
|
+
onDeviceSelect?: (device: DeviceItem) => void;
|
|
224
|
+
/** 切换账号回调 */
|
|
225
|
+
onChangeAccount?: () => void;
|
|
226
|
+
/** 切换店铺回调 */
|
|
227
|
+
onChangeStore?: () => void;
|
|
228
|
+
/** 返回上一步回调 */
|
|
229
|
+
onBack?: () => void;
|
|
230
|
+
/** 登录成功回调 */
|
|
231
|
+
onLoginSuccess?: (data: any) => void;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* BrandPanel 品牌区组件 Props
|
|
235
|
+
*/
|
|
236
|
+
export interface BrandPanelProps {
|
|
237
|
+
/** 品牌配置 */
|
|
238
|
+
config?: BrandConfig;
|
|
239
|
+
/** 自定义类名 */
|
|
240
|
+
className?: string;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* SelectStore 店铺选择组件 Props
|
|
244
|
+
*/
|
|
245
|
+
export interface SelectStoreProps {
|
|
246
|
+
/** 店铺列表 */
|
|
247
|
+
storeList?: StoreItem[];
|
|
248
|
+
/** 语言 */
|
|
249
|
+
locale?: LocaleType;
|
|
250
|
+
/** 加载状态 */
|
|
251
|
+
loading?: boolean;
|
|
252
|
+
/** 上次使用的店铺ID */
|
|
253
|
+
lastUsedStoreId?: number;
|
|
254
|
+
/** 选择店铺回调 */
|
|
255
|
+
onSelect?: (store: StoreItem) => void;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* SelectDevice 设备选择组件 Props
|
|
259
|
+
*/
|
|
260
|
+
export interface SelectDeviceProps {
|
|
261
|
+
/** 设备列表 */
|
|
262
|
+
deviceList?: DeviceItem[];
|
|
263
|
+
/** 语言 */
|
|
264
|
+
locale?: LocaleType;
|
|
265
|
+
/** 加载状态 */
|
|
266
|
+
loading?: boolean;
|
|
267
|
+
/** 选择设备回调 */
|
|
268
|
+
onSelect?: (device: DeviceItem) => void;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* UserFooter 底部用户信息组件 Props
|
|
272
|
+
*/
|
|
273
|
+
export interface UserFooterProps {
|
|
274
|
+
/** 用户信息 */
|
|
275
|
+
userInfo?: UserInfo;
|
|
276
|
+
/** 当前选中的店铺 */
|
|
277
|
+
selectedStore?: StoreItem;
|
|
278
|
+
/** 当前步骤 */
|
|
279
|
+
step?: LoginStep;
|
|
280
|
+
/** 语言 */
|
|
281
|
+
locale?: LocaleType;
|
|
282
|
+
/** 切换账号回调 */
|
|
283
|
+
onChangeAccount?: () => void;
|
|
284
|
+
/** 切换店铺回调 */
|
|
285
|
+
onChangeStore?: () => void;
|
|
286
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* 这个文件演示了如何使用 PisellPaymentList 和 PisellPaymentListItem 组件
|
|
5
5
|
* 包括如何通过 Context 访问父组件配置
|
|
6
6
|
*/
|
|
7
|
+
/// <reference types="react" />
|
|
7
8
|
export declare const BasicExample: () => JSX.Element;
|
|
8
9
|
export declare const ChildrenExample: () => JSX.Element;
|
|
9
10
|
export declare const CustomItemExample: () => JSX.Element;
|
|
@@ -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: "
|
|
11
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
12
12
|
[keys: string]: unknown;
|
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
|
14
14
|
onClose: () => void;
|