@pisell/private-materials 6.3.220 → 6.3.222
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 +13 -13
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +13 -13
- package/es/components/kioskSkuDetail/index.js +7 -7
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +53 -26
- package/es/components/scanOrder/components/Content/index.js +14 -2
- package/es/components/scanOrder/components/ExitConfirmModal/index.js +84 -0
- package/es/components/scanOrder/components/ExitConfirmModal/index.less +182 -0
- package/es/components/scanOrder/locales.js +20 -0
- package/es/index.d.ts +9 -1
- package/es/index.js +6 -2
- package/es/plus/inventory/BindingModal.js +94 -0
- package/es/plus/inventory/InventoryItemManagement.d.ts +7 -0
- package/es/plus/inventory/InventoryItemManagement.js +204 -0
- package/es/plus/inventory/InventoryLocationManagement.d.ts +7 -0
- package/es/plus/inventory/InventoryLocationManagement.js +296 -0
- package/es/plus/inventory/InventoryUnitManagement.d.ts +7 -0
- package/es/plus/inventory/InventoryUnitManagement.js +144 -0
- package/es/plus/inventory/ItemDrawer.js +266 -0
- package/es/plus/inventory/RecordDialog.js +141 -0
- package/es/plus/inventory/StockList.js +132 -0
- package/es/plus/inventory/api.js +66 -0
- package/es/plus/inventory/components.js +172 -0
- package/es/plus/inventory/context.js +118 -0
- package/es/plus/inventory/forms.js +46 -0
- package/es/plus/inventory/hooks.js +235 -0
- package/es/plus/inventory/index.less +559 -0
- package/es/plus/inventory/locales.js +277 -0
- package/es/plus/inventory/types.d.ts +10 -0
- package/es/plus/inventory/utils.js +24 -0
- package/es/plus/panpacificTask/JobCard.js +22 -0
- package/es/plus/panpacificTask/JobDrawer.js +366 -0
- package/es/plus/panpacificTask/JobForm.js +312 -0
- package/es/plus/panpacificTask/JobStatus.js +29 -0
- package/es/plus/panpacificTask/PanpacificTask.d.ts +7 -0
- package/es/plus/panpacificTask/PanpacificTask.js +552 -0
- package/es/plus/panpacificTask/PhotoPreview.js +37 -0
- package/es/plus/panpacificTask/README.md +114 -0
- package/es/plus/panpacificTask/attachments.js +64 -0
- package/es/plus/panpacificTask/index.d.ts +2 -0
- package/es/plus/panpacificTask/index.less +539 -0
- package/es/plus/panpacificTask/locales.js +586 -0
- package/es/plus/panpacificTask/model.js +260 -0
- package/es/plus/panpacificTask/saveJob.js +68 -0
- package/es/plus/panpacificTask/serve.js +243 -0
- package/es/plus/panpacificTask/tenant.js +16 -0
- package/es/plus/panpacificTask/types.d.ts +19 -0
- package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
- package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
- package/es/plus/pisellSupersetDashboard/README.md +291 -0
- package/es/plus/pisellSupersetDashboard/index.d.ts +15 -0
- package/es/plus/pisellSupersetDashboard/index.js +187 -0
- package/es/plus/pisellSupersetDashboard/index.less +83 -0
- package/es/plus/pisellSupersetDashboard/locales.js +36 -0
- package/es/plus/pisellSupersetDashboard/serve.js +51 -0
- package/es/plus/pisellSupersetDashboard/types.d.ts +17 -0
- package/es/plus/skuOptionsSelection/store/createStore.js +2 -2
- package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
- package/es/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/index.d.ts +1 -2
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/lib/components/kioskSkuDetail/index.js +7 -7
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +53 -26
- package/lib/components/scanOrder/components/Content/index.js +14 -2
- package/lib/components/scanOrder/components/ExitConfirmModal/index.js +86 -0
- package/lib/components/scanOrder/components/ExitConfirmModal/index.less +182 -0
- package/lib/components/scanOrder/locales.js +20 -0
- package/lib/index.d.ts +9 -1
- package/lib/index.js +136 -126
- package/lib/plus/inventory/BindingModal.js +96 -0
- package/lib/plus/inventory/InventoryItemManagement.d.ts +7 -0
- package/lib/plus/inventory/InventoryItemManagement.js +206 -0
- package/lib/plus/inventory/InventoryLocationManagement.d.ts +7 -0
- package/lib/plus/inventory/InventoryLocationManagement.js +298 -0
- package/lib/plus/inventory/InventoryUnitManagement.d.ts +7 -0
- package/lib/plus/inventory/InventoryUnitManagement.js +146 -0
- package/lib/plus/inventory/ItemDrawer.js +268 -0
- package/lib/plus/inventory/RecordDialog.js +143 -0
- package/lib/plus/inventory/StockList.js +134 -0
- package/lib/plus/inventory/api.js +66 -0
- package/lib/plus/inventory/components.js +181 -0
- package/lib/plus/inventory/context.js +121 -0
- package/lib/plus/inventory/forms.js +50 -0
- package/lib/plus/inventory/hooks.js +240 -0
- package/lib/plus/inventory/index.less +559 -0
- package/lib/plus/inventory/locales.js +277 -0
- package/lib/plus/inventory/types.d.ts +10 -0
- package/lib/plus/inventory/utils.js +30 -0
- package/lib/plus/panpacificTask/JobCard.js +24 -0
- package/lib/plus/panpacificTask/JobDrawer.js +368 -0
- package/lib/plus/panpacificTask/JobForm.js +314 -0
- package/lib/plus/panpacificTask/JobStatus.js +33 -0
- package/lib/plus/panpacificTask/PanpacificTask.d.ts +7 -0
- package/lib/plus/panpacificTask/PanpacificTask.js +555 -0
- package/lib/plus/panpacificTask/PhotoPreview.js +39 -0
- package/lib/plus/panpacificTask/README.md +114 -0
- package/lib/plus/panpacificTask/attachments.js +66 -0
- package/lib/plus/panpacificTask/index.d.ts +2 -0
- package/lib/plus/panpacificTask/index.less +539 -0
- package/lib/plus/panpacificTask/locales.js +586 -0
- package/lib/plus/panpacificTask/model.js +289 -0
- package/lib/plus/panpacificTask/saveJob.js +68 -0
- package/lib/plus/panpacificTask/serve.js +260 -0
- package/lib/plus/panpacificTask/tenant.js +17 -0
- package/lib/plus/panpacificTask/types.d.ts +19 -0
- package/lib/plus/pisellSupersetDashboard/README.md +291 -0
- package/lib/plus/pisellSupersetDashboard/index.d.ts +15 -0
- package/lib/plus/pisellSupersetDashboard/index.js +189 -0
- package/lib/plus/pisellSupersetDashboard/index.less +83 -0
- package/lib/plus/pisellSupersetDashboard/locales.js +36 -0
- package/lib/plus/pisellSupersetDashboard/serve.js +52 -0
- package/lib/plus/pisellSupersetDashboard/types.d.ts +17 -0
- package/lowcode/inventory-item-management/meta.ts +20 -0
- package/lowcode/inventory-location-management/meta.ts +20 -0
- package/lowcode/inventory-unit-management/meta.ts +20 -0
- package/lowcode/panpacific-task/meta.ts +51 -0
- package/lowcode/pisell-superset-dashboard/meta.ts +75 -0
- package/package.json +4 -2
- package/es/plus/pisellReservation/index.js +0 -17
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/plus/pisellSupersetDashboard/types.d.ts
|
|
4
|
+
/** Superset 报表组件的公开属性,与宿主 proCode 页面传参结构保持一致。 */
|
|
5
|
+
interface PisellSupersetDashboardProps {
|
|
6
|
+
/** 页面配置;未提供时展示配置缺失提示,不发起业务请求。 */
|
|
7
|
+
proCodeProps?: {
|
|
8
|
+
/** Superset 嵌入配置生成的 UUID,不是普通数字报表 ID 或页面 URL。 */dashboardId: string; /** 原样传给 SDK 的 UI 配置,允许扩展字段;缺省时采用 SDK 默认行为。 */
|
|
9
|
+
dashboardUiConfig?: Record<string, any>;
|
|
10
|
+
};
|
|
11
|
+
/** 附加到组件根容器的样式类名。 */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** 根容器样式,可覆盖默认宽高和最小高度。 */
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { PisellSupersetDashboardProps };
|
|
@@ -22,7 +22,7 @@ const useSyncExternalStoreShim = (subscribe, getSnapshot) => {
|
|
|
22
22
|
}, [subscribe, getSnapshot]);
|
|
23
23
|
return snapshot;
|
|
24
24
|
};
|
|
25
|
-
const useSyncExternalStore = React$1.useSyncExternalStore || useSyncExternalStoreShim;
|
|
25
|
+
const useSyncExternalStore$1 = React$1.useSyncExternalStore || useSyncExternalStoreShim;
|
|
26
26
|
/**
|
|
27
27
|
* 创建一个跨 React 版本兼容的 Store
|
|
28
28
|
* 支持自动浅合并 (Auto Shallow Merge)
|
|
@@ -58,7 +58,7 @@ function createStore(initialState) {
|
|
|
58
58
|
* @param selector 选择器函数,默认返回整个 state
|
|
59
59
|
*/
|
|
60
60
|
const useStore = (selector = (s) => s) => {
|
|
61
|
-
return useSyncExternalStore(subscribe, () => selector(state));
|
|
61
|
+
return useSyncExternalStore$1(subscribe, () => selector(state));
|
|
62
62
|
};
|
|
63
63
|
Object.assign(useStore, {
|
|
64
64
|
getState,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LoginFormData, OAuthConfig, PhoneAuthConfig, RegisterFormData, UIConfig, VerificationMethod } from "./shared/types.js";
|
|
2
1
|
import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
|
|
3
2
|
import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
|
|
4
|
-
import { AuthModal } from "./AuthModal.js";
|
|
3
|
+
import { AuthModal, AuthModalProps } from "./AuthModal.js";
|
|
@@ -226,4 +226,4 @@ interface RegisterFormData {
|
|
|
226
226
|
verification_token?: string;
|
|
227
227
|
}
|
|
228
228
|
//#endregion
|
|
229
|
-
export { AuthMethodType, EmailAuthConfig,
|
|
229
|
+
export { AuthMethodType, EmailAuthConfig, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig };
|
|
@@ -26,7 +26,7 @@ const DEFAULT_COIN_OR_CARD = 0;
|
|
|
26
26
|
* - 底部用 PisellNumberSelector 做数量编辑
|
|
27
27
|
*/
|
|
28
28
|
function KioskSkuDetail(props) {
|
|
29
|
-
var _ref, _context$appHelper, _context$engine, _context$appHelper2, _store$getState, _store$getState2, _store$getState3, _interaction$utils
|
|
29
|
+
var _ref, _context$appHelper, _context$engine, _context$appHelper2, _store$getState, _store$getState2, _store$getState3, _interaction$utils;
|
|
30
30
|
const { className, style, onAddToCart } = props;
|
|
31
31
|
/**
|
|
32
32
|
* @description 从 URL 中读取 productId(兼容 search / hash query)
|
|
@@ -170,14 +170,14 @@ function KioskSkuDetail(props) {
|
|
|
170
170
|
}(), [getData, scheduleDate]);
|
|
171
171
|
const loadRef = (0, react.useRef)(loadByProductId);
|
|
172
172
|
loadRef.current = loadByProductId;
|
|
173
|
-
const shop_id = interaction === null || interaction === void 0 || (_interaction$utils
|
|
173
|
+
const shop_id = interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils = _interaction$utils.getStore().getState()) === null || _interaction$utils === void 0 || (_interaction$utils = _interaction$utils.global) === null || _interaction$utils === void 0 || (_interaction$utils = _interaction$utils.shop) === null || _interaction$utils === void 0 ? void 0 : _interaction$utils.id;
|
|
174
174
|
(0, react.useEffect)(() => {
|
|
175
|
-
var _interaction$
|
|
176
|
-
interaction === null || interaction === void 0 || (_interaction$
|
|
175
|
+
var _interaction$utils2, _interaction$utils2$p, _interaction$utils3, _interaction$utils3$m, _interaction$utils4, _interaction$utils4$m, _interaction$utils5, _interaction$utils5$m;
|
|
176
|
+
interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 || _interaction$utils2$p.call(_interaction$utils2, {
|
|
177
177
|
module: "wallet_pass",
|
|
178
178
|
key: "page_load"
|
|
179
179
|
});
|
|
180
|
-
interaction === null || interaction === void 0 || (_interaction$
|
|
180
|
+
interaction === null || interaction === void 0 || (_interaction$utils3 = interaction.utils) === null || _interaction$utils3 === void 0 || (_interaction$utils3$m = _interaction$utils3.mountFunction) === null || _interaction$utils3$m === void 0 || _interaction$utils3$m.call(_interaction$utils3, "wallet_pass", "restore_buy_wallet_pass", (id) => {
|
|
181
181
|
console.log("重置状态", id);
|
|
182
182
|
console.log("宽", window.innerWidth);
|
|
183
183
|
console.log("高", window.innerHeight);
|
|
@@ -191,7 +191,7 @@ function KioskSkuDetail(props) {
|
|
|
191
191
|
"9230"
|
|
192
192
|
].includes(String(shop_id)));
|
|
193
193
|
});
|
|
194
|
-
interaction === null || interaction === void 0 || (_interaction$
|
|
194
|
+
interaction === null || interaction === void 0 || (_interaction$utils4 = interaction.utils) === null || _interaction$utils4 === void 0 || (_interaction$utils4$m = _interaction$utils4.mountFunction) === null || _interaction$utils4$m === void 0 || _interaction$utils4$m.call(_interaction$utils4, "wallet_pass", "restore_recharge_wallet_pass", (_data) => {
|
|
195
195
|
const data = JSON.parse(_data || "{}");
|
|
196
196
|
console.log("重置状态", data === null || data === void 0 ? void 0 : data.productId);
|
|
197
197
|
console.log("宽", window.innerWidth);
|
|
@@ -203,7 +203,7 @@ function KioskSkuDetail(props) {
|
|
|
203
203
|
setShouldSelectCoinOrCard(false);
|
|
204
204
|
setNativeInitData(data);
|
|
205
205
|
});
|
|
206
|
-
interaction === null || interaction === void 0 || (_interaction$
|
|
206
|
+
interaction === null || interaction === void 0 || (_interaction$utils5 = interaction.utils) === null || _interaction$utils5 === void 0 || (_interaction$utils5$m = _interaction$utils5.mountFunction) === null || _interaction$utils5$m === void 0 || _interaction$utils5$m.call(_interaction$utils5, "wallet_pass", "edit_buy_wallet_pass", (data) => {
|
|
207
207
|
console.log("编辑状态", data);
|
|
208
208
|
const productData = JSON.parse(data);
|
|
209
209
|
/**
|
|
@@ -67,6 +67,19 @@ const setHistoryLog = (log) => {
|
|
|
67
67
|
const getCurrentTime = () => {
|
|
68
68
|
return (0, dayjs.default)().format("YYYY-MM-DD HH:mm:ss");
|
|
69
69
|
};
|
|
70
|
+
const getErrorDetails = (error) => {
|
|
71
|
+
var _error$message, _error$response$statu, _error$response, _error$response$statu2, _error$response2;
|
|
72
|
+
if (error == null || typeof error !== "object") return error;
|
|
73
|
+
return {
|
|
74
|
+
name: error.name,
|
|
75
|
+
message: (_error$message = error.message) !== null && _error$message !== void 0 ? _error$message : error.msg,
|
|
76
|
+
stack: error.stack,
|
|
77
|
+
code: error.code,
|
|
78
|
+
type: error.type,
|
|
79
|
+
status: (_error$response$statu = (_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) !== null && _error$response$statu !== void 0 ? _error$response$statu : error.status,
|
|
80
|
+
statusText: (_error$response$statu2 = (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.statusText) !== null && _error$response$statu2 !== void 0 ? _error$response$statu2 : error.statusText
|
|
81
|
+
};
|
|
82
|
+
};
|
|
70
83
|
/**
|
|
71
84
|
* @title: 点击支付
|
|
72
85
|
* @description:
|
|
@@ -165,19 +178,11 @@ const startPayment = function() {
|
|
|
165
178
|
msg: "步骤5完成: challenge iframe结束",
|
|
166
179
|
time: getCurrentTime()
|
|
167
180
|
});
|
|
168
|
-
setHistoryLog({
|
|
169
|
-
msg: "步骤6开始: 调用check_pares接口",
|
|
170
|
-
time: getCurrentTime()
|
|
171
|
-
});
|
|
172
181
|
yield checkPARes(step2, step4, step5);
|
|
173
182
|
if (isCancelled === null || isCancelled === void 0 ? void 0 : isCancelled()) {
|
|
174
183
|
closeIframe();
|
|
175
184
|
return;
|
|
176
185
|
}
|
|
177
|
-
setHistoryLog({
|
|
178
|
-
msg: "步骤6完成: check_pares接口返回",
|
|
179
|
-
time: getCurrentTime()
|
|
180
|
-
});
|
|
181
186
|
}
|
|
182
187
|
if (isCancelled === null || isCancelled === void 0 ? void 0 : isCancelled()) {
|
|
183
188
|
closeIframe();
|
|
@@ -192,10 +197,11 @@ const startPayment = function() {
|
|
|
192
197
|
return true;
|
|
193
198
|
} catch (err) {
|
|
194
199
|
console.log("error", err);
|
|
200
|
+
const errorDetails = getErrorDetails(err);
|
|
195
201
|
setHistoryLog({
|
|
196
202
|
msg: "支付异常",
|
|
197
203
|
time: getCurrentTime(),
|
|
198
|
-
error:
|
|
204
|
+
error: errorDetails,
|
|
199
205
|
errorCode: err === null || err === void 0 ? void 0 : err.code
|
|
200
206
|
});
|
|
201
207
|
closeIframe();
|
|
@@ -206,7 +212,7 @@ const startPayment = function() {
|
|
|
206
212
|
callback === null || callback === void 0 || callback({ key: "bankVerifyFailed" });
|
|
207
213
|
return false;
|
|
208
214
|
}
|
|
209
|
-
paymentData.error =
|
|
215
|
+
paymentData.error = errorDetails;
|
|
210
216
|
paymentEnd(require_objectSpread2._objectSpread2({ status: "fail" }, paymentInfo), callback);
|
|
211
217
|
return false;
|
|
212
218
|
}
|
|
@@ -528,22 +534,43 @@ const checkPARes = function() {
|
|
|
528
534
|
const { tdsPayKey, tdsPayToken } = step4;
|
|
529
535
|
const cres = step5;
|
|
530
536
|
const request_unique_idempotency_token = require_utils.getUniqueIdempotencyToken();
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
});
|
|
546
|
-
|
|
537
|
+
const startedAt = Date.now();
|
|
538
|
+
const getRequestLogContext = () => {
|
|
539
|
+
const timestamp = Date.now();
|
|
540
|
+
return {
|
|
541
|
+
time: getCurrentTime(),
|
|
542
|
+
timestamp,
|
|
543
|
+
durationMs: timestamp - startedAt,
|
|
544
|
+
order_id,
|
|
545
|
+
pay_number,
|
|
546
|
+
request_unique_idempotency_token,
|
|
547
|
+
online: typeof navigator !== "undefined" ? navigator.onLine : void 0,
|
|
548
|
+
visibilityState: typeof document !== "undefined" ? document.visibilityState : void 0
|
|
549
|
+
};
|
|
550
|
+
};
|
|
551
|
+
setHistoryLog(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({ msg: "步骤6开始: 调用check_pares接口" }, getRequestLogContext()), {}, { userAgent: typeof navigator !== "undefined" ? navigator.userAgent : void 0 }));
|
|
552
|
+
try {
|
|
553
|
+
const { data } = yield require_index.request.getRequest().post("/h5/pay/order/mw-3ds-pay/v2/check_pares", {
|
|
554
|
+
order_id,
|
|
555
|
+
pay_number,
|
|
556
|
+
request_unique_idempotency_token,
|
|
557
|
+
mw_data: {
|
|
558
|
+
transactionProduct: pay_info.check_tds_auth.product_name,
|
|
559
|
+
cres,
|
|
560
|
+
accessToken: pay_info.check_tds_auth.access_token,
|
|
561
|
+
tdsPayKey,
|
|
562
|
+
tdsPayToken,
|
|
563
|
+
paymentCardName: pay_info.check_tds_auth.card_name,
|
|
564
|
+
transactionAmount: amount,
|
|
565
|
+
card_id: pay_info.check_tds_auth.card_id
|
|
566
|
+
}
|
|
567
|
+
}, { manualErrorHandling: true });
|
|
568
|
+
setHistoryLog(require_objectSpread2._objectSpread2({ msg: "步骤6完成: check_pares接口返回" }, getRequestLogContext()));
|
|
569
|
+
return data;
|
|
570
|
+
} catch (error) {
|
|
571
|
+
setHistoryLog(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({ msg: "步骤6异常: check_pares接口失败" }, getRequestLogContext()), {}, { error: getErrorDetails(error) }));
|
|
572
|
+
throw error;
|
|
573
|
+
}
|
|
547
574
|
});
|
|
548
575
|
return function checkPARes(_x14, _x15, _x16) {
|
|
549
576
|
return _ref6.apply(this, arguments);
|
|
@@ -12,6 +12,7 @@ const require_index$4 = require("../Menu/index.js");
|
|
|
12
12
|
const require_index$5 = require("../ErrorState/index.js");
|
|
13
13
|
const require_index$6 = require("../Initializing/index.js");
|
|
14
14
|
const require_index$7 = require("../Check/index.js");
|
|
15
|
+
const require_index$8 = require("../ExitConfirmModal/index.js");
|
|
15
16
|
let react = require("react");
|
|
16
17
|
react = require_runtime.__toESM(react);
|
|
17
18
|
let antd = require("antd");
|
|
@@ -53,6 +54,7 @@ function ReadyState() {
|
|
|
53
54
|
const utils = require_hooks.contextUtils();
|
|
54
55
|
const [FormCard] = require_useComponents.default({ components: ["FormCard"] });
|
|
55
56
|
const formModalRef = (0, react.useRef)(null);
|
|
57
|
+
const [exitConfirmOpen, setExitConfirmOpen] = (0, react.useState)(false);
|
|
56
58
|
const [formSubmitting, setFormSubmitting] = (0, react.useState)(false);
|
|
57
59
|
const [policyModal, setPolicyModal] = (0, react.useState)({
|
|
58
60
|
open: false,
|
|
@@ -163,6 +165,9 @@ function ReadyState() {
|
|
|
163
165
|
else if (app === null || app === void 0 || (_app$history2 = app.history) === null || _app$history2 === void 0 ? void 0 : _app$history2.push) app.history.push("/");
|
|
164
166
|
else location.replace("/");
|
|
165
167
|
};
|
|
168
|
+
const confirmExitToHome = () => {
|
|
169
|
+
setExitConfirmOpen(true);
|
|
170
|
+
};
|
|
166
171
|
/** 弹出入口人数弹窗,返回有效人数或取消/关闭时为 null */
|
|
167
172
|
const requestEntryPaxModal = () => new Promise((resolve) => {
|
|
168
173
|
var _tableFormRecordRef$c;
|
|
@@ -202,7 +207,7 @@ function ReadyState() {
|
|
|
202
207
|
require_asyncToGenerator._asyncToGenerator(function* () {
|
|
203
208
|
const pax = yield requestEntryPaxModal();
|
|
204
209
|
if (pax == null) {
|
|
205
|
-
|
|
210
|
+
confirmExitToHome();
|
|
206
211
|
return;
|
|
207
212
|
}
|
|
208
213
|
try {
|
|
@@ -214,7 +219,7 @@ function ReadyState() {
|
|
|
214
219
|
})();
|
|
215
220
|
return;
|
|
216
221
|
}
|
|
217
|
-
|
|
222
|
+
confirmExitToHome();
|
|
218
223
|
};
|
|
219
224
|
const enterProductStep = function() {
|
|
220
225
|
var _ref3 = require_asyncToGenerator._asyncToGenerator(function* () {
|
|
@@ -600,6 +605,13 @@ function ReadyState() {
|
|
|
600
605
|
return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement(require_index$1.default, {
|
|
601
606
|
currentStep,
|
|
602
607
|
onBack: handleBack
|
|
608
|
+
}), /* @__PURE__ */ react.default.createElement(require_index$8.default, {
|
|
609
|
+
open: exitConfirmOpen,
|
|
610
|
+
onContinue: () => setExitConfirmOpen(false),
|
|
611
|
+
onExit: () => {
|
|
612
|
+
setExitConfirmOpen(false);
|
|
613
|
+
navigateToHome();
|
|
614
|
+
}
|
|
603
615
|
}), /* @__PURE__ */ react.default.createElement("div", {
|
|
604
616
|
className: `pisell-scan-order-content-wrap ${isMobileView ? "pisell-scan-order-content-mobile-wrap" : ""} ${!isShowFooter && isMobileView ? "pisell-scan-order-content-wrap-with-footer" : ""}`,
|
|
605
617
|
"data-cart-validation-passed": String(cartValidation === null || cartValidation === void 0 ? void 0 : cartValidation.passed)
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
2
|
+
let react = require("react");
|
|
3
|
+
react = require_runtime.__toESM(react);
|
|
4
|
+
let antd = require("antd");
|
|
5
|
+
let _pisell_utils = require("@pisell/utils");
|
|
6
|
+
require("./index.less");
|
|
7
|
+
//#region src/components/scanOrder/components/ExitConfirmModal/index.tsx
|
|
8
|
+
function ExitConfirmModal({ open, onContinue, onExit }) {
|
|
9
|
+
const continueButtonRef = (0, react.useRef)(null);
|
|
10
|
+
return /* @__PURE__ */ react.default.createElement(antd.Modal, {
|
|
11
|
+
open,
|
|
12
|
+
centered: true,
|
|
13
|
+
width: 400,
|
|
14
|
+
prefixCls: "pisell-scan-order-exit",
|
|
15
|
+
wrapClassName: "pisell-scan-order-exit-wrap",
|
|
16
|
+
maskClosable: false,
|
|
17
|
+
onCancel: onContinue,
|
|
18
|
+
footer: null,
|
|
19
|
+
afterOpenChange: (visible) => {
|
|
20
|
+
var _continueButtonRef$cu;
|
|
21
|
+
if (visible) (_continueButtonRef$cu = continueButtonRef.current) === null || _continueButtonRef$cu === void 0 || _continueButtonRef$cu.focus();
|
|
22
|
+
},
|
|
23
|
+
title: /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement("div", {
|
|
24
|
+
className: "pisell-scan-order-exit-visual",
|
|
25
|
+
"aria-hidden": "true"
|
|
26
|
+
}, /* @__PURE__ */ react.default.createElement("svg", {
|
|
27
|
+
viewBox: "0 0 240 140",
|
|
28
|
+
fill: "none",
|
|
29
|
+
focusable: "false"
|
|
30
|
+
}, /* @__PURE__ */ react.default.createElement("rect", {
|
|
31
|
+
x: "30",
|
|
32
|
+
y: "12",
|
|
33
|
+
width: "66",
|
|
34
|
+
height: "116",
|
|
35
|
+
rx: "12",
|
|
36
|
+
fill: "var(--exit-illustration-surface)",
|
|
37
|
+
stroke: "currentColor",
|
|
38
|
+
strokeWidth: "4"
|
|
39
|
+
}), /* @__PURE__ */ react.default.createElement("path", {
|
|
40
|
+
d: "M51 13v5h24v-5M55 118h16",
|
|
41
|
+
stroke: "currentColor",
|
|
42
|
+
strokeWidth: "4",
|
|
43
|
+
strokeLinecap: "round"
|
|
44
|
+
}), /* @__PURE__ */ react.default.createElement("path", {
|
|
45
|
+
d: "M44 55v-9h9m29 9v-9h-9M44 79v9h9m29-9v9h-9",
|
|
46
|
+
stroke: "var(--exit-accent)",
|
|
47
|
+
strokeWidth: "4",
|
|
48
|
+
strokeLinecap: "round"
|
|
49
|
+
}), /* @__PURE__ */ react.default.createElement("path", {
|
|
50
|
+
d: "m108 57 17-7m-17 20h21m-21 13 17 7",
|
|
51
|
+
stroke: "var(--exit-accent)",
|
|
52
|
+
strokeWidth: "4",
|
|
53
|
+
strokeLinecap: "round"
|
|
54
|
+
}), /* @__PURE__ */ react.default.createElement("path", {
|
|
55
|
+
d: "m160 36 37 1 19 85h-24",
|
|
56
|
+
fill: "currentColor"
|
|
57
|
+
}), /* @__PURE__ */ react.default.createElement("path", {
|
|
58
|
+
d: "M147 35h42a4 4 0 0 1 4 4l-8 79a4 4 0 0 1-4 4h-45a4 4 0 0 1-4-4l10-79a5 5 0 0 1 5-4Z",
|
|
59
|
+
fill: "var(--exit-illustration-surface)",
|
|
60
|
+
stroke: "currentColor",
|
|
61
|
+
strokeWidth: "4"
|
|
62
|
+
}), /* @__PURE__ */ react.default.createElement("g", { transform: "matrix(1 0 -0.12 1 147 49)" }, /* @__PURE__ */ react.default.createElement("path", {
|
|
63
|
+
d: "M0 0h12v12H0zM22 0h12v12H22zM0 22h12v12H0z",
|
|
64
|
+
stroke: "currentColor",
|
|
65
|
+
strokeWidth: "2.5"
|
|
66
|
+
}), /* @__PURE__ */ react.default.createElement("path", {
|
|
67
|
+
d: "M4 4h4v4H4zM26 4h4v4H26zM4 26h4v4H4z",
|
|
68
|
+
fill: "currentColor"
|
|
69
|
+
}), /* @__PURE__ */ react.default.createElement("path", {
|
|
70
|
+
d: "M22 22h5v6h7M22 34h5",
|
|
71
|
+
stroke: "currentColor",
|
|
72
|
+
strokeWidth: "4"
|
|
73
|
+
})))), /* @__PURE__ */ react.default.createElement("h2", { className: "pisell-scan-order-exit-heading" }, String(_pisell_utils.locales.getText("pisell2.scan.order.exit.title"))))
|
|
74
|
+
}, /* @__PURE__ */ react.default.createElement("p", { className: "pisell-scan-order-exit-description" }, String(_pisell_utils.locales.getText("pisell2.scan.order.exit.description"))), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-scan-order-exit-actions" }, /* @__PURE__ */ react.default.createElement("button", {
|
|
75
|
+
ref: continueButtonRef,
|
|
76
|
+
type: "button",
|
|
77
|
+
className: "pisell-scan-order-exit-continue",
|
|
78
|
+
onClick: onContinue
|
|
79
|
+
}, String(_pisell_utils.locales.getText("pisell2.scan.order.exit.continue"))), /* @__PURE__ */ react.default.createElement("button", {
|
|
80
|
+
type: "button",
|
|
81
|
+
className: "pisell-scan-order-exit-leave",
|
|
82
|
+
onClick: onExit
|
|
83
|
+
}, String(_pisell_utils.locales.getText("pisell2.scan.order.exit.confirm")))));
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
exports.default = ExitConfirmModal;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
.pisell-scan-order-exit-root {
|
|
2
|
+
--exit-accent: var(--theme-color);
|
|
3
|
+
--exit-surface: #fff;
|
|
4
|
+
--exit-visual-surface: #f5f5f5;
|
|
5
|
+
--exit-illustration-surface: #fff;
|
|
6
|
+
--exit-heading: #101828;
|
|
7
|
+
--exit-description: #475467;
|
|
8
|
+
--exit-border: rgba(0, 0, 0, 0.12);
|
|
9
|
+
--exit-action-border: var(--exit-accent);
|
|
10
|
+
--exit-mask: rgba(0, 0, 0, 0.45);
|
|
11
|
+
--exit-shadow: rgba(0, 0, 0, 0.2);
|
|
12
|
+
|
|
13
|
+
.pisell-scan-order-exit-mask {
|
|
14
|
+
background: var(--exit-mask);
|
|
15
|
+
backdrop-filter: blur(4px);
|
|
16
|
+
-webkit-backdrop-filter: blur(4px);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.pisell-scan-order-exit-wrap {
|
|
20
|
+
padding: max(16px, env(safe-area-inset-top)) 0 max(16px, env(safe-area-inset-bottom));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.pisell-scan-order-exit {
|
|
24
|
+
max-width: calc(100vw - 32px);
|
|
25
|
+
padding-bottom: 0;
|
|
26
|
+
color: var(--exit-heading);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.pisell-scan-order-exit-content {
|
|
30
|
+
max-height: calc(100vh - 32px);
|
|
31
|
+
max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
|
|
32
|
+
overflow-y: auto;
|
|
33
|
+
overscroll-behavior: contain;
|
|
34
|
+
padding: 20px;
|
|
35
|
+
border: 1px solid var(--exit-border);
|
|
36
|
+
border-radius: 24px;
|
|
37
|
+
background: var(--exit-surface);
|
|
38
|
+
box-shadow: 0 24px 64px var(--exit-shadow);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pisell-scan-order-exit-header {
|
|
42
|
+
margin: 0;
|
|
43
|
+
background: transparent;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.pisell-scan-order-exit-close {
|
|
47
|
+
top: 12px;
|
|
48
|
+
inset-inline-end: 12px;
|
|
49
|
+
width: 40px;
|
|
50
|
+
height: 40px;
|
|
51
|
+
color: var(--exit-heading);
|
|
52
|
+
border: 1px solid var(--exit-border);
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
background: var(--exit-illustration-surface);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.pisell-scan-order-exit-visual {
|
|
58
|
+
display: grid;
|
|
59
|
+
place-items: center;
|
|
60
|
+
min-height: 128px;
|
|
61
|
+
padding: 8px 32px;
|
|
62
|
+
border-radius: 16px;
|
|
63
|
+
background: var(--exit-visual-surface);
|
|
64
|
+
color: var(--exit-accent);
|
|
65
|
+
|
|
66
|
+
svg {
|
|
67
|
+
display: block;
|
|
68
|
+
width: 200px;
|
|
69
|
+
max-width: 100%;
|
|
70
|
+
height: 120px;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.pisell-scan-order-exit-heading {
|
|
75
|
+
margin: 24px 0 12px;
|
|
76
|
+
color: var(--exit-heading);
|
|
77
|
+
font-size: 26px;
|
|
78
|
+
font-weight: 700;
|
|
79
|
+
line-height: 1.25;
|
|
80
|
+
text-align: center;
|
|
81
|
+
overflow-wrap: anywhere;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.pisell-scan-order-exit-description {
|
|
85
|
+
margin: 0 0 24px;
|
|
86
|
+
color: var(--exit-description);
|
|
87
|
+
font-size: 15px;
|
|
88
|
+
line-height: 1.7;
|
|
89
|
+
text-align: center;
|
|
90
|
+
overflow-wrap: anywhere;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.pisell-scan-order-exit-actions {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
gap: 10px;
|
|
97
|
+
|
|
98
|
+
button {
|
|
99
|
+
width: 100%;
|
|
100
|
+
min-height: 48px;
|
|
101
|
+
padding: 12px 20px;
|
|
102
|
+
border: 1px solid transparent;
|
|
103
|
+
border-radius: 999px;
|
|
104
|
+
font: inherit;
|
|
105
|
+
font-size: 16px;
|
|
106
|
+
font-weight: 600;
|
|
107
|
+
line-height: 1.5;
|
|
108
|
+
white-space: normal;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
touch-action: manipulation;
|
|
111
|
+
-webkit-tap-highlight-color: transparent;
|
|
112
|
+
|
|
113
|
+
&:focus-visible {
|
|
114
|
+
outline: 3px solid var(--exit-accent);
|
|
115
|
+
outline-offset: 3px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:active {
|
|
119
|
+
opacity: 0.8;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.pisell-scan-order-exit-continue {
|
|
124
|
+
color: #fff;
|
|
125
|
+
background: var(--exit-accent);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.pisell-scan-order-exit-leave {
|
|
129
|
+
color: var(--exit-heading);
|
|
130
|
+
border-color: var(--exit-action-border);
|
|
131
|
+
background: transparent;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (max-width: 360px), (max-height: 700px) {
|
|
137
|
+
.pisell-scan-order-exit-root {
|
|
138
|
+
.pisell-scan-order-exit-content {
|
|
139
|
+
padding: 16px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.pisell-scan-order-exit-visual {
|
|
143
|
+
min-height: 96px;
|
|
144
|
+
|
|
145
|
+
svg {
|
|
146
|
+
height: 96px;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.pisell-scan-order-exit-heading {
|
|
151
|
+
margin-top: 18px;
|
|
152
|
+
font-size: 24px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.pisell-scan-order-exit-description {
|
|
156
|
+
margin-bottom: 20px;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@media (prefers-reduced-motion: reduce) {
|
|
162
|
+
.pisell-scan-order-exit-root {
|
|
163
|
+
.pisell-scan-order-exit,
|
|
164
|
+
.pisell-scan-order-exit-mask {
|
|
165
|
+
animation: none !important;
|
|
166
|
+
transition: none !important;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@supports (color: color-mix(in srgb, black, white)) {
|
|
172
|
+
.pisell-scan-order-exit-root {
|
|
173
|
+
--exit-surface: color-mix(in srgb, var(--exit-accent) 10%, white);
|
|
174
|
+
--exit-visual-surface: color-mix(in srgb, var(--exit-accent) 7%, white);
|
|
175
|
+
--exit-illustration-surface: color-mix(in srgb, var(--exit-accent) 2%, white);
|
|
176
|
+
--exit-heading: color-mix(in srgb, var(--exit-accent) 35%, #101828);
|
|
177
|
+
--exit-description: color-mix(in srgb, var(--exit-accent) 15%, #475467);
|
|
178
|
+
--exit-border: color-mix(in srgb, var(--exit-accent) 16%, transparent);
|
|
179
|
+
--exit-action-border: color-mix(in srgb, var(--exit-accent) 40%, transparent);
|
|
180
|
+
--exit-shadow: color-mix(in srgb, var(--exit-accent) 24%, transparent);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
//#region src/components/scanOrder/locales.ts
|
|
2
2
|
var locales_default = {
|
|
3
3
|
en: {
|
|
4
|
+
"pisell2.scan.order.exit.title": "Leave ordering?",
|
|
5
|
+
"pisell2.scan.order.exit.description": "You will return to the store homepage. To continue ordering by QR code, scan the table QR code again.",
|
|
6
|
+
"pisell2.scan.order.exit.confirm": "Leave ordering",
|
|
7
|
+
"pisell2.scan.order.exit.continue": "Continue ordering",
|
|
4
8
|
"pisell2.scan.order.action.confirm.order": "Confirm order",
|
|
5
9
|
"pisell2.event.confirm": "Confirm",
|
|
6
10
|
"pisell2.scan.order.resource.unavailable.confirm": "OK",
|
|
@@ -71,6 +75,10 @@ var locales_default = {
|
|
|
71
75
|
"pisell2.appointment.fill-form": "Enter your details"
|
|
72
76
|
},
|
|
73
77
|
"zh-CN": {
|
|
78
|
+
"pisell2.scan.order.exit.title": "确认退出点单?",
|
|
79
|
+
"pisell2.scan.order.exit.description": "退出后将返回商家首页。如需继续扫码点单,请重新扫描桌台二维码。",
|
|
80
|
+
"pisell2.scan.order.exit.confirm": "确认退出",
|
|
81
|
+
"pisell2.scan.order.exit.continue": "继续点单",
|
|
74
82
|
"pisell2.scan.order.action.confirm.order": "确认下单",
|
|
75
83
|
"pisell2.event.confirm": "确定",
|
|
76
84
|
"pisell2.scan.order.resource.unavailable.confirm": "好的",
|
|
@@ -141,6 +149,10 @@ var locales_default = {
|
|
|
141
149
|
"pisell2.appointment.fill-form": "填写信息"
|
|
142
150
|
},
|
|
143
151
|
"zh-HK": {
|
|
152
|
+
"pisell2.scan.order.exit.title": "確認退出點單?",
|
|
153
|
+
"pisell2.scan.order.exit.description": "退出後將返回商家首頁。如需繼續掃碼點單,請重新掃描桌台二維碼。",
|
|
154
|
+
"pisell2.scan.order.exit.confirm": "確認退出",
|
|
155
|
+
"pisell2.scan.order.exit.continue": "繼續點單",
|
|
144
156
|
"pisell2.scan.order.action.confirm.order": "確認下單",
|
|
145
157
|
"pisell2.event.confirm": "確認",
|
|
146
158
|
"pisell2.scan.order.resource.unavailable.confirm": "好的",
|
|
@@ -211,6 +223,10 @@ var locales_default = {
|
|
|
211
223
|
"pisell2.appointment.fill-form": "填寫資訊"
|
|
212
224
|
},
|
|
213
225
|
ja: {
|
|
226
|
+
"pisell2.scan.order.exit.title": "注文画面を終了しますか?",
|
|
227
|
+
"pisell2.scan.order.exit.description": "店舗のホームページに戻ります。QRコードでの注文を続けるには、テーブルのQRコードをもう一度読み取ってください。",
|
|
228
|
+
"pisell2.scan.order.exit.confirm": "終了する",
|
|
229
|
+
"pisell2.scan.order.exit.continue": "注文を続ける",
|
|
214
230
|
"pisell2.scan.order.action.confirm.order": "注文を確定",
|
|
215
231
|
"pisell2.event.confirm": "確認",
|
|
216
232
|
"pisell2.scan.order.resource.unavailable.confirm": "OK",
|
|
@@ -281,6 +297,10 @@ var locales_default = {
|
|
|
281
297
|
"pisell2.appointment.fill-form": "詳細を入力"
|
|
282
298
|
},
|
|
283
299
|
pt: {
|
|
300
|
+
"pisell2.scan.order.exit.title": "Sair do pedido?",
|
|
301
|
+
"pisell2.scan.order.exit.description": "Você voltará à página inicial da loja. Para continuar pedindo por QR code, escaneie novamente o QR code da mesa.",
|
|
302
|
+
"pisell2.scan.order.exit.confirm": "Confirmar saída",
|
|
303
|
+
"pisell2.scan.order.exit.continue": "Continuar pedido",
|
|
284
304
|
"pisell2.scan.order.action.confirm.order": "Confirmar pedido",
|
|
285
305
|
"pisell2.event.confirm": "Confirmar",
|
|
286
306
|
"pisell2.scan.order.resource.unavailable.confirm": "OK",
|