@pisell/private-materials 3.4.151 → 3.4.153

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.
Files changed (28) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +9 -9
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +9 -9
  9. package/es/components/scanOrder/components/Content/index.js +14 -2
  10. package/es/components/scanOrder/components/ExitConfirmModal/index.js +84 -0
  11. package/es/components/scanOrder/components/ExitConfirmModal/index.less +182 -0
  12. package/es/components/scanOrder/locales.js +20 -0
  13. package/es/index.js +1 -0
  14. package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
  15. package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
  16. package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
  17. package/es/plus/pisellReservation/index.js +17 -0
  18. package/es/plus/saasDevice/devicePasscodes/model.js +4 -4
  19. package/es/plus/walletPassGallery/components/timelineSection/index.js +4 -4
  20. package/es/pro/Login2.0/AuthModal.d.ts +1 -1
  21. package/es/pro/Login2.0/index.d.ts +2 -1
  22. package/es/pro/Login2.0/shared/types.d.ts +1 -1
  23. package/lib/components/scanOrder/components/Content/index.js +14 -2
  24. package/lib/components/scanOrder/components/ExitConfirmModal/index.js +86 -0
  25. package/lib/components/scanOrder/components/ExitConfirmModal/index.less +182 -0
  26. package/lib/components/scanOrder/locales.js +20 -0
  27. package/package.json +3 -3
  28. package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
@@ -10,6 +10,7 @@ import Menu$1 from "../Menu/index.js";
10
10
  import ErrorState from "../ErrorState/index.js";
11
11
  import ScanOrderInitializing from "../Initializing/index.js";
12
12
  import Check from "../Check/index.js";
13
+ import ExitConfirmModal from "../ExitConfirmModal/index.js";
13
14
  import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
14
15
  import { Modal, message } from "antd";
15
16
  import { isMobile, locales } from "@pisell/utils";
@@ -50,6 +51,7 @@ function ReadyState() {
50
51
  const utils = contextUtils();
51
52
  const [FormCard] = useComponents({ components: ["FormCard"] });
52
53
  const formModalRef = useRef(null);
54
+ const [exitConfirmOpen, setExitConfirmOpen] = useState(false);
53
55
  const [formSubmitting, setFormSubmitting] = useState(false);
54
56
  const [policyModal, setPolicyModal] = useState({
55
57
  open: false,
@@ -160,6 +162,9 @@ function ReadyState() {
160
162
  else if (app === null || app === void 0 || (_app$history2 = app.history) === null || _app$history2 === void 0 ? void 0 : _app$history2.push) app.history.push("/");
161
163
  else location.replace("/");
162
164
  };
165
+ const confirmExitToHome = () => {
166
+ setExitConfirmOpen(true);
167
+ };
163
168
  /** 弹出入口人数弹窗,返回有效人数或取消/关闭时为 null */
164
169
  const requestEntryPaxModal = () => new Promise((resolve) => {
165
170
  var _tableFormRecordRef$c;
@@ -199,7 +204,7 @@ function ReadyState() {
199
204
  _asyncToGenerator(function* () {
200
205
  const pax = yield requestEntryPaxModal();
201
206
  if (pax == null) {
202
- navigateToHome();
207
+ confirmExitToHome();
203
208
  return;
204
209
  }
205
210
  try {
@@ -211,7 +216,7 @@ function ReadyState() {
211
216
  })();
212
217
  return;
213
218
  }
214
- navigateToHome();
219
+ confirmExitToHome();
215
220
  };
216
221
  const enterProductStep = function() {
217
222
  var _ref3 = _asyncToGenerator(function* () {
@@ -585,6 +590,13 @@ function ReadyState() {
585
590
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Header, {
586
591
  currentStep,
587
592
  onBack: handleBack
593
+ }), /* @__PURE__ */ React.createElement(ExitConfirmModal, {
594
+ open: exitConfirmOpen,
595
+ onContinue: () => setExitConfirmOpen(false),
596
+ onExit: () => {
597
+ setExitConfirmOpen(false);
598
+ navigateToHome();
599
+ }
588
600
  }), /* @__PURE__ */ React.createElement("div", {
589
601
  className: `pisell-scan-order-content-wrap ${isMobileView ? "pisell-scan-order-content-mobile-wrap" : ""} ${!isShowFooter && isMobileView ? "pisell-scan-order-content-wrap-with-footer" : ""}`,
590
602
  "data-cart-validation-passed": String(cartValidation === null || cartValidation === void 0 ? void 0 : cartValidation.passed)
@@ -0,0 +1,84 @@
1
+ import React, { useRef } from "react";
2
+ import { Modal } from "antd";
3
+ import { locales } from "@pisell/utils";
4
+ import "./index.less";
5
+ //#region src/components/scanOrder/components/ExitConfirmModal/index.tsx
6
+ function ExitConfirmModal({ open, onContinue, onExit }) {
7
+ const continueButtonRef = useRef(null);
8
+ return /* @__PURE__ */ React.createElement(Modal, {
9
+ open,
10
+ centered: true,
11
+ width: 400,
12
+ prefixCls: "pisell-scan-order-exit",
13
+ wrapClassName: "pisell-scan-order-exit-wrap",
14
+ maskClosable: false,
15
+ onCancel: onContinue,
16
+ footer: null,
17
+ afterOpenChange: (visible) => {
18
+ var _continueButtonRef$cu;
19
+ if (visible) (_continueButtonRef$cu = continueButtonRef.current) === null || _continueButtonRef$cu === void 0 || _continueButtonRef$cu.focus();
20
+ },
21
+ title: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
22
+ className: "pisell-scan-order-exit-visual",
23
+ "aria-hidden": "true"
24
+ }, /* @__PURE__ */ React.createElement("svg", {
25
+ viewBox: "0 0 240 140",
26
+ fill: "none",
27
+ focusable: "false"
28
+ }, /* @__PURE__ */ React.createElement("rect", {
29
+ x: "30",
30
+ y: "12",
31
+ width: "66",
32
+ height: "116",
33
+ rx: "12",
34
+ fill: "var(--exit-illustration-surface)",
35
+ stroke: "currentColor",
36
+ strokeWidth: "4"
37
+ }), /* @__PURE__ */ React.createElement("path", {
38
+ d: "M51 13v5h24v-5M55 118h16",
39
+ stroke: "currentColor",
40
+ strokeWidth: "4",
41
+ strokeLinecap: "round"
42
+ }), /* @__PURE__ */ React.createElement("path", {
43
+ d: "M44 55v-9h9m29 9v-9h-9M44 79v9h9m29-9v9h-9",
44
+ stroke: "var(--exit-accent)",
45
+ strokeWidth: "4",
46
+ strokeLinecap: "round"
47
+ }), /* @__PURE__ */ React.createElement("path", {
48
+ d: "m108 57 17-7m-17 20h21m-21 13 17 7",
49
+ stroke: "var(--exit-accent)",
50
+ strokeWidth: "4",
51
+ strokeLinecap: "round"
52
+ }), /* @__PURE__ */ React.createElement("path", {
53
+ d: "m160 36 37 1 19 85h-24",
54
+ fill: "currentColor"
55
+ }), /* @__PURE__ */ React.createElement("path", {
56
+ 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",
57
+ fill: "var(--exit-illustration-surface)",
58
+ stroke: "currentColor",
59
+ strokeWidth: "4"
60
+ }), /* @__PURE__ */ React.createElement("g", { transform: "matrix(1 0 -0.12 1 147 49)" }, /* @__PURE__ */ React.createElement("path", {
61
+ d: "M0 0h12v12H0zM22 0h12v12H22zM0 22h12v12H0z",
62
+ stroke: "currentColor",
63
+ strokeWidth: "2.5"
64
+ }), /* @__PURE__ */ React.createElement("path", {
65
+ d: "M4 4h4v4H4zM26 4h4v4H26zM4 26h4v4H4z",
66
+ fill: "currentColor"
67
+ }), /* @__PURE__ */ React.createElement("path", {
68
+ d: "M22 22h5v6h7M22 34h5",
69
+ stroke: "currentColor",
70
+ strokeWidth: "4"
71
+ })))), /* @__PURE__ */ React.createElement("h2", { className: "pisell-scan-order-exit-heading" }, String(locales.getText("pisell2.scan.order.exit.title"))))
72
+ }, /* @__PURE__ */ React.createElement("p", { className: "pisell-scan-order-exit-description" }, String(locales.getText("pisell2.scan.order.exit.description"))), /* @__PURE__ */ React.createElement("div", { className: "pisell-scan-order-exit-actions" }, /* @__PURE__ */ React.createElement("button", {
73
+ ref: continueButtonRef,
74
+ type: "button",
75
+ className: "pisell-scan-order-exit-continue",
76
+ onClick: onContinue
77
+ }, String(locales.getText("pisell2.scan.order.exit.continue"))), /* @__PURE__ */ React.createElement("button", {
78
+ type: "button",
79
+ className: "pisell-scan-order-exit-leave",
80
+ onClick: onExit
81
+ }, String(locales.getText("pisell2.scan.order.exit.confirm")))));
82
+ }
83
+ //#endregion
84
+ export { ExitConfirmModal as default };
@@ -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.event.cart": "Cart",
@@ -65,6 +69,10 @@ var locales_default = {
65
69
  "pisell2.appointment.fill-form": "Enter your details"
66
70
  },
67
71
  "zh-CN": {
72
+ "pisell2.scan.order.exit.title": "确认退出点单?",
73
+ "pisell2.scan.order.exit.description": "退出后将返回商家首页。如需继续扫码点单,请重新扫描桌台二维码。",
74
+ "pisell2.scan.order.exit.confirm": "确认退出",
75
+ "pisell2.scan.order.exit.continue": "继续点单",
68
76
  "pisell2.scan.order.action.confirm.order": "确认下单",
69
77
  "pisell2.event.confirm": "确定",
70
78
  "pisell2.event.cart": "购物车",
@@ -129,6 +137,10 @@ var locales_default = {
129
137
  "pisell2.appointment.fill-form": "填写信息"
130
138
  },
131
139
  "zh-HK": {
140
+ "pisell2.scan.order.exit.title": "確認退出點單?",
141
+ "pisell2.scan.order.exit.description": "退出後將返回商家首頁。如需繼續掃碼點單,請重新掃描桌台二維碼。",
142
+ "pisell2.scan.order.exit.confirm": "確認退出",
143
+ "pisell2.scan.order.exit.continue": "繼續點單",
132
144
  "pisell2.scan.order.action.confirm.order": "確認下單",
133
145
  "pisell2.event.confirm": "確認",
134
146
  "pisell2.event.cart": "購物車",
@@ -193,6 +205,10 @@ var locales_default = {
193
205
  "pisell2.appointment.fill-form": "填寫資訊"
194
206
  },
195
207
  ja: {
208
+ "pisell2.scan.order.exit.title": "注文画面を終了しますか?",
209
+ "pisell2.scan.order.exit.description": "店舗のホームページに戻ります。QRコードでの注文を続けるには、テーブルのQRコードをもう一度読み取ってください。",
210
+ "pisell2.scan.order.exit.confirm": "終了する",
211
+ "pisell2.scan.order.exit.continue": "注文を続ける",
196
212
  "pisell2.scan.order.action.confirm.order": "注文を確定",
197
213
  "pisell2.event.confirm": "確認",
198
214
  "pisell2.event.cart": "カート",
@@ -257,6 +273,10 @@ var locales_default = {
257
273
  "pisell2.appointment.fill-form": "詳細を入力"
258
274
  },
259
275
  pt: {
276
+ "pisell2.scan.order.exit.title": "Sair do pedido?",
277
+ "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.",
278
+ "pisell2.scan.order.exit.confirm": "Confirmar saída",
279
+ "pisell2.scan.order.exit.continue": "Continuar pedido",
260
280
  "pisell2.scan.order.action.confirm.order": "Confirmar pedido",
261
281
  "pisell2.event.confirm": "Confirmar",
262
282
  "pisell2.event.cart": "Carrinho",
package/es/index.js CHANGED
@@ -105,6 +105,7 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
105
105
  import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
106
106
  import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
107
107
  import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
108
+ import "./plus/pisellReservation/index.js";
108
109
  import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
109
110
  import pisellAdyenDashboard_default from "./plus/pisellAdyenDashboard/index.js";
110
111
  import weekday from "dayjs/plugin/weekday";
@@ -259,4 +259,4 @@ function bookingListToReservationTableRows(bookings) {
259
259
  return rows;
260
260
  }
261
261
  //#endregion
262
- export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingUiPatchFromRecord, isMonitorScheduleBookingSkipped, mergeBookingsForResourceRecord };
262
+ export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingStatusToCardStatus, hostBookingUiPatchFromRecord, isMonitorScheduleBookingSkipped, mergeBookingsForResourceRecord };
@@ -79,4 +79,4 @@ function toastFloorPlanLoadError(err) {
79
79
  PisellToast({ content: err instanceof Error ? err.message : String(err) });
80
80
  }
81
81
  //#endregion
82
- export { PISELL_RESERVATION_FLOOR_PLAN_CODE, ensureShopFloorPlanByCode, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
82
+ export { PISELL_RESERVATION_FLOOR_PLAN_CODE, buildDefaultReservationFloorPlanPostBody, ensureShopFloorPlanByCode, putShopFloorPlan, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
@@ -927,4 +927,4 @@ function getReservationDataSourceFormColumns() {
927
927
  ];
928
928
  }
929
929
  //#endregion
930
- export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
930
+ export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationSceneElements, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
@@ -0,0 +1,17 @@
1
+ import "./floorRoomCard/mapRowToFloorRoomCardData.js";
2
+ import "./floorRoomCard/ReservationFloorRoomCard.js";
3
+ import "./floorMap/reservationMock.js";
4
+ import "./floorMap/floorPlanApi.js";
5
+ import "./reservationConstants.js";
6
+ import "./serve/formResourcePage.js";
7
+ import "./data/bookingToReservationTables.js";
8
+ import "./data/formResourceToReservationTables.js";
9
+ import "./data/salesEmbeddedResourceToTableRows.js";
10
+ import "./floorMap/reservationCards.js";
11
+ import "./PisellReservation.js";
12
+ import "./PisellReservationBookingPage.js";
13
+ import "./PisellVenueControlPage.js";
14
+ import "./PisellVenueWallPage.js";
15
+ import "./PisellReservationTablePage.js";
16
+ import "./components/SelectFloorMapResourceDialog.js";
17
+ export {};
@@ -1,10 +1,10 @@
1
1
  import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
2
2
  import dayjs from "dayjs";
3
- import timezonePlugin from "dayjs/plugin/timezone";
4
- import utcPlugin from "dayjs/plugin/utc";
3
+ import timezone from "dayjs/plugin/timezone";
4
+ import utc from "dayjs/plugin/utc";
5
5
  //#region src/plus/saasDevice/devicePasscodes/model.ts
6
- dayjs.extend(utcPlugin);
7
- dayjs.extend(timezonePlugin);
6
+ dayjs.extend(utc);
7
+ dayjs.extend(timezone);
8
8
  const INITIAL_DEVICE_PASSCODE_STATE = {
9
9
  deviceIds: [],
10
10
  devicesById: {}
@@ -5,12 +5,12 @@ import React, { useCallback, useMemo } from "react";
5
5
  import { locales } from "@pisell/utils";
6
6
  import { Button, PisellEmpty, PisellModal, PisellStatisticList, Skeleton, Timeline, usePisellConfig } from "@pisell/materials";
7
7
  import { useRequest } from "ahooks";
8
- import timezonePlugin from "dayjs/plugin/timezone";
9
- import utcPlugin from "dayjs/plugin/utc";
8
+ import timezone from "dayjs/plugin/timezone";
9
+ import utc from "dayjs/plugin/utc";
10
10
  import "./index.less";
11
11
  //#region src/plus/walletPassGallery/components/timelineSection/index.tsx
12
- dayjs.extend(timezonePlugin);
13
- dayjs.extend(utcPlugin);
12
+ dayjs.extend(timezone);
13
+ dayjs.extend(utc);
14
14
  const stateTimeUnix = 1723255863;
15
15
  const TimelineSection = (props) => {
16
16
  const { code, tag, timezone, apiPrefix, isTerminalEnv, interaction } = props;
@@ -9,4 +9,4 @@ interface AuthModalProps {}
9
9
  */
10
10
  declare const AuthModal: React.FC<AuthModalProps>;
11
11
  //#endregion
12
- export { AuthModal, AuthModalProps };
12
+ export { AuthModal };
@@ -1,3 +1,4 @@
1
+ import { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LoginFormData, OAuthConfig, PhoneAuthConfig, RegisterFormData, UIConfig, VerificationMethod } from "./shared/types.js";
1
2
  import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
2
3
  import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
3
- import { AuthModal, AuthModalProps } from "./AuthModal.js";
4
+ import { AuthModal } from "./AuthModal.js";
@@ -226,4 +226,4 @@ interface RegisterFormData {
226
226
  verification_token?: string;
227
227
  }
228
228
  //#endregion
229
- export { AuthMethodType, EmailAuthConfig, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig };
229
+ export { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
@@ -11,6 +11,7 @@ const require_index$4 = require("../Menu/index.js");
11
11
  const require_index$5 = require("../ErrorState/index.js");
12
12
  const require_index$6 = require("../Initializing/index.js");
13
13
  const require_index$7 = require("../Check/index.js");
14
+ const require_index$8 = require("../ExitConfirmModal/index.js");
14
15
  let react = require("react");
15
16
  react = require_runtime.__toESM(react);
16
17
  let antd = require("antd");
@@ -52,6 +53,7 @@ function ReadyState() {
52
53
  const utils = require_hooks.contextUtils();
53
54
  const [FormCard] = require_useComponents.default({ components: ["FormCard"] });
54
55
  const formModalRef = (0, react.useRef)(null);
56
+ const [exitConfirmOpen, setExitConfirmOpen] = (0, react.useState)(false);
55
57
  const [formSubmitting, setFormSubmitting] = (0, react.useState)(false);
56
58
  const [policyModal, setPolicyModal] = (0, react.useState)({
57
59
  open: false,
@@ -162,6 +164,9 @@ function ReadyState() {
162
164
  else if (app === null || app === void 0 || (_app$history2 = app.history) === null || _app$history2 === void 0 ? void 0 : _app$history2.push) app.history.push("/");
163
165
  else location.replace("/");
164
166
  };
167
+ const confirmExitToHome = () => {
168
+ setExitConfirmOpen(true);
169
+ };
165
170
  /** 弹出入口人数弹窗,返回有效人数或取消/关闭时为 null */
166
171
  const requestEntryPaxModal = () => new Promise((resolve) => {
167
172
  var _tableFormRecordRef$c;
@@ -201,7 +206,7 @@ function ReadyState() {
201
206
  require_asyncToGenerator._asyncToGenerator(function* () {
202
207
  const pax = yield requestEntryPaxModal();
203
208
  if (pax == null) {
204
- navigateToHome();
209
+ confirmExitToHome();
205
210
  return;
206
211
  }
207
212
  try {
@@ -213,7 +218,7 @@ function ReadyState() {
213
218
  })();
214
219
  return;
215
220
  }
216
- navigateToHome();
221
+ confirmExitToHome();
217
222
  };
218
223
  const enterProductStep = function() {
219
224
  var _ref3 = require_asyncToGenerator._asyncToGenerator(function* () {
@@ -587,6 +592,13 @@ function ReadyState() {
587
592
  return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement(require_index$1.default, {
588
593
  currentStep,
589
594
  onBack: handleBack
595
+ }), /* @__PURE__ */ react.default.createElement(require_index$8.default, {
596
+ open: exitConfirmOpen,
597
+ onContinue: () => setExitConfirmOpen(false),
598
+ onExit: () => {
599
+ setExitConfirmOpen(false);
600
+ navigateToHome();
601
+ }
590
602
  }), /* @__PURE__ */ react.default.createElement("div", {
591
603
  className: `pisell-scan-order-content-wrap ${isMobileView ? "pisell-scan-order-content-mobile-wrap" : ""} ${!isShowFooter && isMobileView ? "pisell-scan-order-content-wrap-with-footer" : ""}`,
592
604
  "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;