@pisell/private-materials 6.3.153 → 6.3.154
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +0 -1
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +0 -1
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -0
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/linkly/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/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/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/venueBooking/index.js +10 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/orderList/components/HandleActions.d.ts +0 -1
- package/es/plus/orderList/components/QuickFilter.d.ts +0 -1
- package/es/plus/orderList/components/Reset.d.ts +0 -1
- package/es/plus/orderList/components/Toolbar.d.ts +0 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.d.ts +2 -2
- package/es/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +0 -1
- package/es/plus/saasDevice/devicePlanning/components/DeviceTable/index.js +4 -0
- package/es/plus/saasDevice/devicePlanning/components/DeviceTable/index.less +1 -1
- package/es/plus/saasDevice/deviceProfile/components/TwoColumnPageLayout/index.less +5 -1
- package/es/plus/saasDevice/deviceProfile/index.js +4 -0
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passList/index.js +1 -2
- package/es/pro/Login2.0/Login2.js +60 -60
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +0 -1
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +0 -1
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -0
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/linkly/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/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/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/venueBooking/index.js +9 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/orderList/components/HandleActions.d.ts +0 -1
- package/lib/plus/orderList/components/QuickFilter.d.ts +0 -1
- package/lib/plus/orderList/components/Reset.d.ts +0 -1
- package/lib/plus/orderList/components/Toolbar.d.ts +0 -1
- package/lib/plus/pisellReservation/floorMap/floorPlanApi.d.ts +2 -2
- package/lib/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +0 -1
- package/lib/plus/saasDevice/devicePlanning/components/DeviceTable/index.js +4 -0
- package/lib/plus/saasDevice/devicePlanning/components/DeviceTable/index.less +1 -1
- package/lib/plus/saasDevice/deviceProfile/components/TwoColumnPageLayout/index.less +5 -1
- package/lib/plus/saasDevice/deviceProfile/index.js +4 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passList/index.js +0 -1
- package/lib/pro/Login2.0/Login2.js +50 -50
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/package.json +1 -1
|
@@ -53,6 +53,10 @@ function getViewportHeightFallback() {
|
|
|
53
53
|
if (typeof CSS !== "undefined" && ((_b = CSS.supports) == null ? void 0 : _b.call(CSS, "height", "100svh"))) return "100svh";
|
|
54
54
|
return "100%";
|
|
55
55
|
}
|
|
56
|
+
function getIsMobileFooterVisible() {
|
|
57
|
+
if (typeof window === "undefined") return false;
|
|
58
|
+
return window.matchMedia("(max-width: 1023.98px)").matches;
|
|
59
|
+
}
|
|
56
60
|
function getViewportStyle(viewportHeight) {
|
|
57
61
|
if (viewportHeight === void 0) {
|
|
58
62
|
const fallbackHeight = getViewportHeightFallback();
|
|
@@ -75,6 +79,9 @@ function VenueBooking(props) {
|
|
|
75
79
|
const [viewportHeight, setViewportHeight] = (0, import_react.useState)(
|
|
76
80
|
getViewportHeight
|
|
77
81
|
);
|
|
82
|
+
const [isMobileFooterVisible, setIsMobileFooterVisible] = (0, import_react.useState)(
|
|
83
|
+
getIsMobileFooterVisible
|
|
84
|
+
);
|
|
78
85
|
(0, import_react.useEffect)(() => {
|
|
79
86
|
var _a2, _b2;
|
|
80
87
|
let frameId;
|
|
@@ -83,6 +90,7 @@ function VenueBooking(props) {
|
|
|
83
90
|
frameId = window.requestAnimationFrame(() => {
|
|
84
91
|
frameId = void 0;
|
|
85
92
|
setViewportHeight(getViewportHeight());
|
|
93
|
+
setIsMobileFooterVisible(getIsMobileFooterVisible());
|
|
86
94
|
});
|
|
87
95
|
}
|
|
88
96
|
updateViewportHeight();
|
|
@@ -102,7 +110,7 @@ function VenueBooking(props) {
|
|
|
102
110
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
103
111
|
"div",
|
|
104
112
|
{
|
|
105
|
-
className:
|
|
113
|
+
className: `venue-booking-scope ${isMobileFooterVisible ? "fixed" : ""} overflow-x-hidden overscroll-none bg-[#f5f5f3] text-zinc-900`,
|
|
106
114
|
style: getViewportStyle(viewportHeight)
|
|
107
115
|
},
|
|
108
116
|
/* @__PURE__ */ import_react.default.createElement(import_context.VenueBookingProvider, { entryContext }, /* @__PURE__ */ import_react.default.createElement(import_Content.default, null))
|
|
@@ -6,8 +6,8 @@ export declare const RESERVATION_DEFAULT_FLOOR_PLAN_ID = 1;
|
|
|
6
6
|
export type { PostShopFloorPlanBody, PutShopFloorPlanBody, ShopFloorPlanByCodeRequestOptions, ShopFloorPlanDetail, ShopFloorPlanLayoutItem, };
|
|
7
7
|
export { buildFloorPlanPutBody, floorMapSavedConfigToRemotePatch, inferCanvasSizeFromScene, mergeFloorPlanViewRemote, parseLayoutFieldToViewConfigPatch, pickFloorPlanDetail, sceneElementsToShopLayout, viewConfigToLayoutPayload, isShopFloorPlanNotFoundResponse, isHttpNotFoundError, } from '@pisell/materials';
|
|
8
8
|
export declare function isFloorPlanDuplicateCodeError(err: unknown): boolean;
|
|
9
|
-
export declare const getShopFloorPlanByCode: (code: string, subscribe?:
|
|
10
|
-
export declare const postShopFloorPlan: (body: PostShopFloorPlanBody) => Promise<
|
|
9
|
+
export declare const getShopFloorPlanByCode: (code: string, subscribe?: ShopFloorPlanByCodeRequestOptions | undefined) => Promise<ShopFloorPlanDetail | null>;
|
|
10
|
+
export declare const postShopFloorPlan: (body: PostShopFloorPlanBody) => Promise<ShopFloorPlanDetail | null>;
|
|
11
11
|
export declare const putShopFloorPlan: (id: number, body: PutShopFloorPlanBody) => Promise<unknown>;
|
|
12
12
|
export declare const unsubscribeShopFloorPlanCodeQuery: (subscriberId: string) => Promise<void>;
|
|
13
13
|
/**
|
|
@@ -30,11 +30,15 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
&-content {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
33
35
|
background: #fff;
|
|
34
36
|
border-radius: 12px;
|
|
35
37
|
padding: 16px;
|
|
36
38
|
box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
|
|
37
39
|
height: 100%;
|
|
38
|
-
|
|
40
|
+
min-width: 0;
|
|
41
|
+
min-height: 0;
|
|
42
|
+
overflow: hidden;
|
|
39
43
|
}
|
|
40
44
|
}
|
|
@@ -448,6 +448,10 @@ var SaasDeviceProfile = ({
|
|
|
448
448
|
loading: detailRequest.loading || profileRequest.loading,
|
|
449
449
|
filter: filterConfig,
|
|
450
450
|
onValuesChange: handleValuesChange,
|
|
451
|
+
scroll: {
|
|
452
|
+
autoCalc: true,
|
|
453
|
+
scrollToFirstRowOnChange: true
|
|
454
|
+
},
|
|
451
455
|
pagination: {
|
|
452
456
|
localPagination: false,
|
|
453
457
|
current: page,
|
|
@@ -694,56 +694,6 @@ var Login2 = ({
|
|
|
694
694
|
leading: true,
|
|
695
695
|
trailing: false
|
|
696
696
|
});
|
|
697
|
-
const oauthProviders = (0, import_react.useMemo)(() => {
|
|
698
|
-
return loginMethods.filter(
|
|
699
|
-
(method) => ["google", "facebook", "apple", "guest"].includes(method.type)
|
|
700
|
-
).map((method) => {
|
|
701
|
-
const isLast = isLastLoginMethod(method.type);
|
|
702
|
-
const commonConfig = {
|
|
703
|
-
className: (0, import_classnames.default)("login2-oauth-button", method.type, {
|
|
704
|
-
"has-last-login-badge": isLast
|
|
705
|
-
}),
|
|
706
|
-
badge: isLast ? import_utils.locales.getText("pisell-login2-last-login-badge") : void 0,
|
|
707
|
-
badgeClassName: "last-login-badge"
|
|
708
|
-
};
|
|
709
|
-
switch (method.type) {
|
|
710
|
-
case "google":
|
|
711
|
-
return {
|
|
712
|
-
key: "google",
|
|
713
|
-
label: /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell-login2-continue-with"), " Google"),
|
|
714
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-google" }),
|
|
715
|
-
onClick: () => handleOAuthClick("google"),
|
|
716
|
-
...commonConfig
|
|
717
|
-
};
|
|
718
|
-
case "facebook":
|
|
719
|
-
return {
|
|
720
|
-
key: "facebook",
|
|
721
|
-
label: /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell-login2-continue-with"), " Facebook"),
|
|
722
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-facebook" }),
|
|
723
|
-
onClick: () => handleOAuthClick("facebook"),
|
|
724
|
-
...commonConfig
|
|
725
|
-
};
|
|
726
|
-
case "apple":
|
|
727
|
-
return {
|
|
728
|
-
key: "apple",
|
|
729
|
-
label: /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell-login2-continue-with"), " Apple"),
|
|
730
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-apple" }),
|
|
731
|
-
onClick: () => handleOAuthClick("apple"),
|
|
732
|
-
...commonConfig
|
|
733
|
-
};
|
|
734
|
-
case "guest":
|
|
735
|
-
return {
|
|
736
|
-
key: "guest",
|
|
737
|
-
label: import_utils.locales.getText("pisell-login2-login-as-guest"),
|
|
738
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-user-01" }),
|
|
739
|
-
onClick: handleGuestLogin,
|
|
740
|
-
...commonConfig
|
|
741
|
-
};
|
|
742
|
-
default:
|
|
743
|
-
return null;
|
|
744
|
-
}
|
|
745
|
-
}).filter(Boolean);
|
|
746
|
-
}, [handleGuestLogin, handleOAuthClick, isLastLoginMethod, loginMethods]);
|
|
747
697
|
const handleLoginInternal = async () => {
|
|
748
698
|
var _a2;
|
|
749
699
|
try {
|
|
@@ -881,6 +831,56 @@ var Login2 = ({
|
|
|
881
831
|
leading: true,
|
|
882
832
|
trailing: false
|
|
883
833
|
});
|
|
834
|
+
const oauthProviders = (0, import_react.useMemo)(() => {
|
|
835
|
+
return loginMethods.filter(
|
|
836
|
+
(method) => ["google", "facebook", "apple", "guest"].includes(method.type)
|
|
837
|
+
).map((method) => {
|
|
838
|
+
const isLast = isLastLoginMethod(method.type);
|
|
839
|
+
const commonConfig = {
|
|
840
|
+
className: (0, import_classnames.default)("login2-oauth-button", method.type, {
|
|
841
|
+
"has-last-login-badge": isLast
|
|
842
|
+
}),
|
|
843
|
+
badge: isLast ? import_utils.locales.getText("pisell-login2-last-login-badge") : void 0,
|
|
844
|
+
badgeClassName: "last-login-badge"
|
|
845
|
+
};
|
|
846
|
+
switch (method.type) {
|
|
847
|
+
case "google":
|
|
848
|
+
return {
|
|
849
|
+
key: "google",
|
|
850
|
+
label: /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell-login2-continue-with"), " Google"),
|
|
851
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-google" }),
|
|
852
|
+
onClick: () => handleOAuthClick("google"),
|
|
853
|
+
...commonConfig
|
|
854
|
+
};
|
|
855
|
+
case "facebook":
|
|
856
|
+
return {
|
|
857
|
+
key: "facebook",
|
|
858
|
+
label: /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell-login2-continue-with"), " Facebook"),
|
|
859
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-facebook" }),
|
|
860
|
+
onClick: () => handleOAuthClick("facebook"),
|
|
861
|
+
...commonConfig
|
|
862
|
+
};
|
|
863
|
+
case "apple":
|
|
864
|
+
return {
|
|
865
|
+
key: "apple",
|
|
866
|
+
label: /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell-login2-continue-with"), " Apple"),
|
|
867
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-apple" }),
|
|
868
|
+
onClick: () => handleOAuthClick("apple"),
|
|
869
|
+
...commonConfig
|
|
870
|
+
};
|
|
871
|
+
case "guest":
|
|
872
|
+
return {
|
|
873
|
+
key: "guest",
|
|
874
|
+
label: import_utils.locales.getText("pisell-login2-login-as-guest"),
|
|
875
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-user-01" }),
|
|
876
|
+
onClick: handleGuestLogin,
|
|
877
|
+
...commonConfig
|
|
878
|
+
};
|
|
879
|
+
default:
|
|
880
|
+
return null;
|
|
881
|
+
}
|
|
882
|
+
}).filter(Boolean);
|
|
883
|
+
}, [handleGuestLogin, handleOAuthClick, isLastLoginMethod, loginMethods]);
|
|
884
884
|
const renderMainLoginForm = () => {
|
|
885
885
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
886
886
|
if (!currentLoginMethod) return null;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* 这个文件演示了如何使用 PisellPaymentList 和 PisellPaymentListItem 组件
|
|
5
5
|
* 包括如何通过 Context 访问父组件配置
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
export declare const BasicExample: () => JSX.Element;
|
|
9
8
|
export declare const ChildrenExample: () => JSX.Element;
|
|
10
9
|
export declare const CustomItemExample: () => JSX.Element;
|