@pisell/private-materials 6.12.483 → 6.12.485
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.js +10 -10
- package/build/lowcode/view.js +10 -10
- package/es/components/bigSale/hooks/useBigSaleProductListConfig.js +1 -0
- package/es/components/shoppingCart/components/Cart/index.js +2 -2
- package/es/components/smartLocker/components/PendingOperationsNotice.js +1 -1
- package/es/components/smartLocker/index.js +1 -1
- package/es/components/smartLocker/locales.js +35 -6
- package/es/components/smartLocker/pages/StaffLockersPage.js +1 -1
- package/es/components/smartLocker/runtime/controller.js +2 -11
- package/es/components/smartLocker/runtime/runtime.js +2 -4
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +3 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
- package/es/components/venueBookingSales/catalogPresentation.js +1 -0
- package/es/plus/pisellReservation/floorRoomCard/endingSoonHighlight.js +4 -4
- package/es/plus/pisellReservation/utils/calendarBookingSelection.js +4 -4
- package/es/plus/saasDevice/devicePasscodes/model.js +4 -4
- package/es/plus/walletPassGallery/components/timelineSection/index.js +4 -4
- package/es/pro/Login2.0/components/ForgotPasswordFlow.js +2 -2
- package/es/pro/Login2.0/components/LoginCodeInput.js +2 -2
- package/es/pro/Login2.0/steps/CodeInput.js +2 -2
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.js +2 -2
- package/es/pro/Login2.0/steps/WaitEmailLink.js +3 -3
- package/es/pro/skuDetailModal/flow/calendarEntry.js +2 -2
- package/lib/components/smartLocker/components/PendingOperationsNotice.js +1 -1
- package/lib/components/smartLocker/index.js +1 -1
- package/lib/components/smartLocker/locales.js +35 -6
- package/lib/components/smartLocker/pages/StaffLockersPage.js +1 -1
- package/lib/components/smartLocker/runtime/controller.js +2 -11
- package/lib/components/smartLocker/runtime/runtime.js +2 -4
- package/package.json +3 -3
|
@@ -2,6 +2,7 @@ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/
|
|
|
2
2
|
import { _objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
3
3
|
import { generateProductTabs, sortProductsByTabOrder } from "../../ticketBooking/components/ProductDisplayAdapter/utils.js";
|
|
4
4
|
import { ProductDisplayPresets } from "../../ticketBooking/components/ProductDisplayAdapter/types.js";
|
|
5
|
+
import "../../ticketBooking/components/ProductDisplayAdapter/index.js";
|
|
5
6
|
import { mergeBigSaleProductListPreferences } from "../utils/productListPreferences.js";
|
|
6
7
|
import { useMemo, useRef } from "react";
|
|
7
8
|
import isEqual from "lodash/isEqual";
|
|
@@ -13,7 +13,7 @@ import { locales } from "@pisell/utils";
|
|
|
13
13
|
import { Button, Collapse, PisellAlert } from "@pisell/materials";
|
|
14
14
|
import classNames from "classnames";
|
|
15
15
|
import { useMemoizedFn } from "ahooks";
|
|
16
|
-
import
|
|
16
|
+
import IconFont from "@pisell/materials/src/components/iconfont";
|
|
17
17
|
import "./index.less";
|
|
18
18
|
//#region src/components/shoppingCart/components/Cart/index.tsx
|
|
19
19
|
const prefixCls = "pisell-lowcode__shopping-cart";
|
|
@@ -146,7 +146,7 @@ const Cart = () => {
|
|
|
146
146
|
return /* @__PURE__ */ React.createElement("div", { className: `${prefixCls}-promotion-alert` }, /* @__PURE__ */ React.createElement("div", null, promotions === null || promotions === void 0 ? void 0 : promotions.map((item) => /* @__PURE__ */ React.createElement(PisellAlert, {
|
|
147
147
|
description: locales.getText("pisell2.text.shopping-cart.marketing.alert")(item === null || item === void 0 ? void 0 : item.needQuantity, translationOriginal === null || translationOriginal === void 0 ? void 0 : translationOriginal(item === null || item === void 0 ? void 0 : item.strategyName)),
|
|
148
148
|
type: "error",
|
|
149
|
-
action: /* @__PURE__ */ React.createElement(Button, { onClick: () => handleOpenPromotionModal(item, "promotion") }, /* @__PURE__ */ React.createElement("span", null, locales.getText("pisell2.text.shopping-cart.marketing.browse.items")), /* @__PURE__ */ React.createElement(
|
|
149
|
+
action: /* @__PURE__ */ React.createElement(Button, { onClick: () => handleOpenPromotionModal(item, "promotion") }, /* @__PURE__ */ React.createElement("span", null, locales.getText("pisell2.text.shopping-cart.marketing.browse.items")), /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-arrow-right" }))
|
|
150
150
|
}))));
|
|
151
151
|
}, [JSON.stringify(cartInfo), _isShowPromotionAlert]);
|
|
152
152
|
return useMemo(() => {
|
|
@@ -7,7 +7,7 @@ import React from "react";
|
|
|
7
7
|
function PendingOperationsNotice() {
|
|
8
8
|
const runtime = useLockerRuntime();
|
|
9
9
|
const state = runtime.useSnapshot((value) => value);
|
|
10
|
-
const { text } = useSmartLockerLocale();
|
|
10
|
+
const { text } = useSmartLockerLocale(runtime.presentation.employee);
|
|
11
11
|
const navigate = runtime.useNavigate();
|
|
12
12
|
const memberId = runtime.getMemberId(state);
|
|
13
13
|
const issues = (state.pendingOperations || []).filter(({ operation }) => {
|
|
@@ -78,8 +78,8 @@ function CustomerRoute({ runtime }) {
|
|
|
78
78
|
}
|
|
79
79
|
function MountedLocker(props) {
|
|
80
80
|
var _location$state, _location$state2;
|
|
81
|
-
const { text, locale } = useSmartLockerLocale();
|
|
82
81
|
const { employee } = props;
|
|
82
|
+
const { text, locale } = useSmartLockerLocale(employee);
|
|
83
83
|
const callbacks = useRef(props);
|
|
84
84
|
callbacks.current = _objectSpread2(_objectSpread2({}, props), {}, { context: _objectSpread2(_objectSpread2({}, props.context), {}, { locale: props.context.locale || locale }) });
|
|
85
85
|
const runtime = useMemo(() => createLockerRuntime(props, () => callbacks.current), [props.service]);
|
|
@@ -35,19 +35,48 @@ const translations = {
|
|
|
35
35
|
pt: messages$3,
|
|
36
36
|
ja: messages$4
|
|
37
37
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
const staffSupportKeys = new Set([
|
|
39
|
+
"lockerPreparationPending",
|
|
40
|
+
"lockerBusinessSyncPending",
|
|
41
|
+
"lockerCancellationPending",
|
|
42
|
+
"lockerSaleConfigurationPending",
|
|
43
|
+
"lockerMenuConfigurationPending",
|
|
44
|
+
"lockerInventoryUnavailable",
|
|
45
|
+
"lockerStorageUnavailable",
|
|
46
|
+
"lockerDoorUnavailable",
|
|
47
|
+
"lockerOrderUnresolved",
|
|
48
|
+
"doorStatusIsUnknownAskStaffToCheckIt",
|
|
49
|
+
"aDoorHasAnUnknownStatusAskStaffTo",
|
|
50
|
+
"lockersUnavailablePleaseAskAStaffMemberForHelp",
|
|
51
|
+
"operationFailed"
|
|
52
|
+
]);
|
|
53
|
+
const technicianTerms = {
|
|
54
|
+
en: [["a staff member", "a technician"], ["staff", "a technician"]],
|
|
55
|
+
"zh-CN": [["工作人员", "技术人员"], ["员工", "技术人员"]],
|
|
56
|
+
"zh-HK": [
|
|
57
|
+
["工作人員", "技術人員"],
|
|
58
|
+
["職員", "技術人員"],
|
|
59
|
+
["員工", "技術人員"]
|
|
60
|
+
],
|
|
61
|
+
pt: [["funcionário", "técnico"], ["equipe", "equipe técnica"]],
|
|
62
|
+
ja: [["スタッフ", "技術スタッフ"]]
|
|
63
|
+
};
|
|
64
|
+
function getSmartLockerText(key, values = {}, locale = "en", employee = false) {
|
|
65
|
+
var _dictionary$key, _technicianTerms;
|
|
66
|
+
const dictionary = translations[locale] || messages;
|
|
67
|
+
const message = (_dictionary$key = dictionary[key]) !== null && _dictionary$key !== void 0 ? _dictionary$key : messages[key];
|
|
68
|
+
const terms = dictionary[key] == null ? technicianTerms.en : (_technicianTerms = technicianTerms[locale]) !== null && _technicianTerms !== void 0 ? _technicianTerms : technicianTerms.en;
|
|
69
|
+
return (employee && staffSupportKeys.has(key) ? terms.reduce((copy, [staff, technician]) => copy.replace(staff, technician), message) : message).replace(/\{(\w+)\}/g, (match, name) => {
|
|
41
70
|
var _values$name;
|
|
42
71
|
return String((_values$name = values[name]) !== null && _values$name !== void 0 ? _values$name : match);
|
|
43
72
|
});
|
|
44
73
|
}
|
|
45
|
-
function useSmartLockerLocale() {
|
|
74
|
+
function useSmartLockerLocale(employee = false) {
|
|
46
75
|
const locale = useLocale();
|
|
47
76
|
return useMemo(() => ({
|
|
48
77
|
locale,
|
|
49
|
-
text: (key, values) => getSmartLockerText(key, values, locale)
|
|
50
|
-
}), [locale]);
|
|
78
|
+
text: (key, values) => getSmartLockerText(key, values, locale, employee)
|
|
79
|
+
}), [locale, employee]);
|
|
51
80
|
}
|
|
52
81
|
//#endregion
|
|
53
82
|
export { SMART_LOCKER_LOCALES, getSmartLockerText, useSmartLockerLocale };
|
|
@@ -14,7 +14,7 @@ import React from "react";
|
|
|
14
14
|
//#region src/components/smartLocker/pages/StaffLockersPage.tsx
|
|
15
15
|
const StaffLockersPage = () => {
|
|
16
16
|
var _lockerFilters$find$i, _lockerFilters$find, _searchParams$get$toU, _searchParams$get, _lockerFilters$find2, _items$find, _ref;
|
|
17
|
-
const { text } = useSmartLockerLocale();
|
|
17
|
+
const { text } = useSmartLockerLocale(true);
|
|
18
18
|
const runtime = useLockerRuntime();
|
|
19
19
|
const state = runtime.useSnapshot((currentState) => currentState);
|
|
20
20
|
const [searchParams, setSearchParams] = runtime.useSearchParams();
|
|
@@ -55,7 +55,6 @@ function createLockerController({ context, service, operator, employee }, router
|
|
|
55
55
|
let unsubscribe;
|
|
56
56
|
let sessionVersion = 0;
|
|
57
57
|
const jobs = /* @__PURE__ */ new Map();
|
|
58
|
-
const staffOperations = /* @__PURE__ */ new Map();
|
|
59
58
|
const busy = () => [...jobs.keys()].some((key) => key.startsWith("auth:") || key.startsWith("retry:") || key.startsWith("cancel:") || key === "prepare" || key.startsWith("staff:") && key !== "staff:batch-doors");
|
|
60
59
|
const report = (error) => {
|
|
61
60
|
if (alive && !isAbortError(error)) store.setState({ error: getLockerError(error) });
|
|
@@ -113,7 +112,6 @@ function createLockerController({ context, service, operator, employee }, router
|
|
|
113
112
|
yield service.finishOperation(context, operation, signal);
|
|
114
113
|
(_operationAborts$get = operationAborts.get(operation.id)) === null || _operationAborts$get === void 0 || _operationAborts$get.abort();
|
|
115
114
|
operationAborts.delete(operation.id);
|
|
116
|
-
for (const [id, value] of staffOperations) if (value.id === operation.id) staffOperations.delete(id);
|
|
117
115
|
});
|
|
118
116
|
return function finishOperation(_x6, _x7) {
|
|
119
117
|
return _ref3.apply(this, arguments);
|
|
@@ -369,7 +367,6 @@ function createLockerController({ context, service, operator, employee }, router
|
|
|
369
367
|
store.setState({ openingCollectionOperationId: void 0 });
|
|
370
368
|
operationAborts.forEach((abort) => abort.abort());
|
|
371
369
|
operationAborts.clear();
|
|
372
|
-
staffOperations.clear();
|
|
373
370
|
customerOperation = void 0;
|
|
374
371
|
identificationInput = void 0;
|
|
375
372
|
service.releaseCustomerSession(context, customerSessionId);
|
|
@@ -599,12 +596,10 @@ function createLockerController({ context, service, operator, employee }, router
|
|
|
599
596
|
if (!((_state$staffAccess = state.staffAccess) === null || _state$staffAccess === void 0 ? void 0 : _state$staffAccess.canOperateSmartLockers) || state.openAllRequest || state.staffOpens[id] === "unknown") return;
|
|
600
597
|
store.setState({ staffPending: [...state.staffPending, id] });
|
|
601
598
|
try {
|
|
602
|
-
|
|
603
|
-
if (!operation || state.staffOpens[id] !== "failed") operation = yield prepareOperation((lifetime) => service.prepareStaffOpen(context, [id], operator, lifetime, true), signal);
|
|
604
|
-
staffOperations.set(id, operation);
|
|
599
|
+
const operation = yield prepareOperation((lifetime) => service.prepareStaffOpen(context, [id], operator, lifetime, true), signal);
|
|
605
600
|
const result = yield readDoor(operation, id, signal);
|
|
606
601
|
if (alive && !signal.aborted) store.setState((current) => ({ staffOpens: _objectSpread2(_objectSpread2({}, current.staffOpens), {}, { [id]: result }) }));
|
|
607
|
-
|
|
602
|
+
yield finishOperation(operation, signal);
|
|
608
603
|
} finally {
|
|
609
604
|
if (alive && !signal.aborted) store.setState((current) => ({ staffPending: current.staffPending.filter((item) => item !== id) }));
|
|
610
605
|
}
|
|
@@ -626,10 +621,6 @@ function createLockerController({ context, service, operator, employee }, router
|
|
|
626
621
|
var _model$getLocker;
|
|
627
622
|
return state.staffOpens[id] === "unknown" || ((_model$getLocker = model.getLocker(state, id)) === null || _model$getLocker === void 0 ? void 0 : _model$getLocker.door) === "unknown";
|
|
628
623
|
})) throw new LockerServiceError("aDoorHasAnUnknownStatusAskStaffTo");
|
|
629
|
-
for (const id of ids) {
|
|
630
|
-
const previous = staffOperations.get(id);
|
|
631
|
-
if (previous && state.staffOpens[id] === "failed") yield finishOperation(previous, signal);
|
|
632
|
-
}
|
|
633
624
|
const operation = yield prepareOperation((lifetime) => service.prepareStaffOpen(context, ids, operator, lifetime, true), signal);
|
|
634
625
|
if (!alive || signal.aborted) return false;
|
|
635
626
|
store.setState({ openAllRequest: {
|
|
@@ -10,7 +10,7 @@ const _excluded = ["openingInstructions"];
|
|
|
10
10
|
/** State and async operations live for one entrance, independently of presentation changes. */
|
|
11
11
|
function createLockerRuntime(options, readProps) {
|
|
12
12
|
const router = createLockerRouter(options.employee ? "/staff/lockers" : "/");
|
|
13
|
-
const text = (key, values) => getSmartLockerText(key, values, readProps().context.locale);
|
|
13
|
+
const text = (key, values) => getSmartLockerText(key, values, readProps().context.locale, options.employee);
|
|
14
14
|
const controller = createLockerController(options, router, text);
|
|
15
15
|
const { store, model } = controller;
|
|
16
16
|
const help = createStore({ reason: null });
|
|
@@ -44,9 +44,7 @@ function createLockerRuntime(options, readProps) {
|
|
|
44
44
|
deviceLabel: location && !/[@@]/.test(deviceName) ? `${deviceName} @ ${location}` : deviceName
|
|
45
45
|
};
|
|
46
46
|
},
|
|
47
|
-
text
|
|
48
|
-
return getSmartLockerText(key, values, readProps().context.locale);
|
|
49
|
-
},
|
|
47
|
+
text,
|
|
50
48
|
getElementById(id) {
|
|
51
49
|
var _root$current;
|
|
52
50
|
return (_root$current = root.current) === null || _root$current === void 0 ? void 0 : _root$current.querySelector(`[id="${id.replace(/["\\]/g, "")}"]`);
|
|
@@ -20,6 +20,7 @@ import { useProducts } from "../../hooks/pisellos/useProducts.js";
|
|
|
20
20
|
import { useService } from "../../../booking/info/service/serviceManager/index.js";
|
|
21
21
|
import ProductDisplayAdapter_default from "../ProductDisplayAdapter/ProductDisplayAdapter.js";
|
|
22
22
|
import { resolveProductDisplayConfig } from "../ProductDisplayAdapter/types.js";
|
|
23
|
+
import "../ProductDisplayAdapter/index.js";
|
|
23
24
|
import notAvailable_default from "../notAvailable/index.js";
|
|
24
25
|
import MultiDayTimeSelectModal from "./MultiDayTimeSelectModal.js";
|
|
25
26
|
import dayjs from "dayjs";
|
|
@@ -3,6 +3,7 @@ import index from "../../plus/productSelect/components/pisellPriceText/index.js"
|
|
|
3
3
|
import { resolveProductPricePresentation } from "../../plus/productSelect/pricing/pricePresentation.js";
|
|
4
4
|
import SettlementPriceList from "../../plus/multiCurrencySettlement/SettlementPriceList.js";
|
|
5
5
|
import { ProductDisplayPresets } from "../ticketBooking/components/ProductDisplayAdapter/types.js";
|
|
6
|
+
import "../ticketBooking/components/ProductDisplayAdapter/index.js";
|
|
6
7
|
import { DEFAULT_BIG_SALE_PRODUCT_LIST_PREFERENCES } from "../bigSale/utils/productListPreferences.js";
|
|
7
8
|
import { translate } from "../../plus/venueBookingDesign/i18n.js";
|
|
8
9
|
import { ProductCard as ProductCard$1 } from "../../plus/venueBookingDesign/shared/ProductCard.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import utc from "dayjs/plugin/utc";
|
|
3
|
+
import timezone from "dayjs/plugin/timezone";
|
|
4
4
|
//#region src/plus/pisellReservation/floorRoomCard/endingSoonHighlight.ts
|
|
5
|
-
dayjs.extend(
|
|
6
|
-
dayjs.extend(
|
|
5
|
+
dayjs.extend(utc);
|
|
6
|
+
dayjs.extend(timezone);
|
|
7
7
|
function endingSoonBookingBusiness(booking) {
|
|
8
8
|
var _ref, _booking$business_cod;
|
|
9
9
|
const order = booking.order;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import utc from "dayjs/plugin/utc";
|
|
3
|
+
import timezone from "dayjs/plugin/timezone";
|
|
4
4
|
//#region src/plus/pisellReservation/utils/calendarBookingSelection.ts
|
|
5
|
-
dayjs.extend(
|
|
6
|
-
dayjs.extend(
|
|
5
|
+
dayjs.extend(utc);
|
|
6
|
+
dayjs.extend(timezone);
|
|
7
7
|
/** Resolve the same shop clock used by the POS host; previews use the device clock. */
|
|
8
8
|
function resolveReservationTimeZone(utils) {
|
|
9
9
|
var _utils$getStore$getSt, _utils$getStore, _utils$getStore$getSt2, _utils$store, _utils$store$getState, _utils$getApp, _utils$getApp$getStor, _utils$getApp$getStor2, _core$tenant, _core$core, _core$core2, _state$core, _state$core2, _utils$getData, _state$global, _state$global2, _state$global3;
|
|
@@ -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
|
|
4
|
-
import
|
|
3
|
+
import utc from "dayjs/plugin/utc";
|
|
4
|
+
import timezone from "dayjs/plugin/timezone";
|
|
5
5
|
//#region src/plus/saasDevice/devicePasscodes/model.ts
|
|
6
|
-
dayjs.extend(
|
|
7
|
-
dayjs.extend(
|
|
6
|
+
dayjs.extend(utc);
|
|
7
|
+
dayjs.extend(timezone);
|
|
8
8
|
const INITIAL_DEVICE_PASSCODE_STATE = {
|
|
9
9
|
deviceIds: [],
|
|
10
10
|
devicesById: {}
|
|
@@ -7,12 +7,12 @@ import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
|
|
7
7
|
import { locales } from "@pisell/utils";
|
|
8
8
|
import { Button, PisellEmpty, PisellModal, PisellStatisticList, Skeleton, Timeline, usePisellConfig } from "@pisell/materials";
|
|
9
9
|
import { useRequest } from "ahooks";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import utc from "dayjs/plugin/utc";
|
|
11
|
+
import timezone from "dayjs/plugin/timezone";
|
|
12
12
|
import "./index.less";
|
|
13
13
|
//#region src/plus/walletPassGallery/components/timelineSection/index.tsx
|
|
14
|
-
dayjs.extend(
|
|
15
|
-
dayjs.extend(
|
|
14
|
+
dayjs.extend(timezone);
|
|
15
|
+
dayjs.extend(utc);
|
|
16
16
|
const stateTimeUnix = 1723255863;
|
|
17
17
|
const POLL_INTERVAL = 2e3;
|
|
18
18
|
const POLL_MAX_TIMES = 5;
|
|
@@ -8,7 +8,7 @@ import React, { useEffect, useRef, useState } from "react";
|
|
|
8
8
|
import { Form, message } from "antd";
|
|
9
9
|
import { locales } from "@pisell/utils";
|
|
10
10
|
import { Button as Button$1, Input as Input$1 } from "@pisell/materials";
|
|
11
|
-
import
|
|
11
|
+
import IconFont from "@pisell/materials/src/components/iconfont";
|
|
12
12
|
//#region src/pro/Login2.0/components/ForgotPasswordFlow.tsx
|
|
13
13
|
/** 统一的忘记密码流程:确认账号 → 验证码 → 设置密码。 */
|
|
14
14
|
function ForgotPasswordFlow({ initialEmail = "", accountType, onSendCode, onVerifyCode, onResetPassword, onSendResetLink, onLoadPasswordRules, onResetSuccess, onLoadingChange, passwordOptions, emailMaxLength, onBack, loading = false, countdown = 0, countries = [], defaultPhoneCountry }) {
|
|
@@ -208,7 +208,7 @@ function ForgotPasswordFlow({ initialEmail = "", accountType, onSendCode, onVeri
|
|
|
208
208
|
className: "back-button-top",
|
|
209
209
|
onClick: handleExit,
|
|
210
210
|
"aria-label": "Go back"
|
|
211
|
-
}, /* @__PURE__ */ React.createElement(
|
|
211
|
+
}, /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-arrow-left" })), /* @__PURE__ */ React.createElement("div", { className: "register-step-content" }, /* @__PURE__ */ React.createElement("h2", { className: "register-step-title" }, locales.getText("pisell-forgot-password-title")), /* @__PURE__ */ React.createElement("p", { className: "register-step-desc" }, locales.getText(isEmail ? "pisell-forgot-password-desc" : "pisell-forgot-password-desc-phone")), /* @__PURE__ */ React.createElement(Form, {
|
|
212
212
|
form,
|
|
213
213
|
layout: "vertical",
|
|
214
214
|
size: "large",
|
|
@@ -2,7 +2,7 @@ import { formatVerificationAccount } from "../shared/formatVerificationAccount.j
|
|
|
2
2
|
import React, { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { locales } from "@pisell/utils";
|
|
4
4
|
import { Button } from "@pisell/materials";
|
|
5
|
-
import
|
|
5
|
+
import IconFont from "@pisell/materials/src/components/iconfont";
|
|
6
6
|
import "../steps/steps.less";
|
|
7
7
|
//#region src/pro/Login2.0/components/LoginCodeInput.tsx
|
|
8
8
|
/**
|
|
@@ -99,7 +99,7 @@ function LoginCodeInput({ account, accountType, codeLength = 4, onSubmit, onRese
|
|
|
99
99
|
className: "back-button-top",
|
|
100
100
|
onClick: onBack,
|
|
101
101
|
"aria-label": "Go back"
|
|
102
|
-
}, /* @__PURE__ */ React.createElement(
|
|
102
|
+
}, /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-arrow-left" })), /* @__PURE__ */ React.createElement("div", { className: "register-step-content" }, /* @__PURE__ */ React.createElement("h2", { className: "register-step-title" }, title), /* @__PURE__ */ React.createElement("p", { className: "register-step-desc" }, description, /* @__PURE__ */ React.createElement("br", null), displayAccount), /* @__PURE__ */ React.createElement("div", {
|
|
103
103
|
className: "code-input-group",
|
|
104
104
|
onPaste: handlePaste
|
|
105
105
|
}, code.map((digit, index) => /* @__PURE__ */ React.createElement("input", {
|
|
@@ -2,7 +2,7 @@ import { formatVerificationAccount } from "../shared/formatVerificationAccount.j
|
|
|
2
2
|
import React, { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { locales } from "@pisell/utils";
|
|
4
4
|
import { Button } from "@pisell/materials";
|
|
5
|
-
import
|
|
5
|
+
import IconFont from "@pisell/materials/src/components/iconfont";
|
|
6
6
|
//#region src/pro/Login2.0/steps/CodeInput.tsx
|
|
7
7
|
/**
|
|
8
8
|
* 验证码输入页面(对应图3)
|
|
@@ -98,7 +98,7 @@ function CodeInput({ flowData, codeLength = 4, onSubmit, onResend, onBack, count
|
|
|
98
98
|
className: "back-button-top",
|
|
99
99
|
onClick: onBack,
|
|
100
100
|
"aria-label": "Go back"
|
|
101
|
-
}, /* @__PURE__ */ React.createElement(
|
|
101
|
+
}, /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-arrow-left" })), /* @__PURE__ */ React.createElement("div", { className: "register-step-content" }, /* @__PURE__ */ React.createElement("h2", { className: "register-step-title" }, title), /* @__PURE__ */ React.createElement("p", { className: "register-step-desc" }, description, /* @__PURE__ */ React.createElement("br", null), displayAccount), /* @__PURE__ */ React.createElement("div", {
|
|
102
102
|
className: "code-input-group",
|
|
103
103
|
onPaste: handlePaste
|
|
104
104
|
}, code.map((digit, index) => /* @__PURE__ */ React.createElement("input", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { locales } from "@pisell/utils";
|
|
3
|
-
import
|
|
3
|
+
import IconFont from "@pisell/materials/src/components/iconfont";
|
|
4
4
|
//#region src/pro/Login2.0/steps/EmailAlreadyRegistered.tsx
|
|
5
5
|
/**
|
|
6
6
|
* 账号已注册错误页面(对应图2)
|
|
@@ -12,7 +12,7 @@ function EmailAlreadyRegistered({ flowData, onGoToLogin, onBack }) {
|
|
|
12
12
|
className: "back-button-top",
|
|
13
13
|
onClick: onBack,
|
|
14
14
|
"aria-label": "Go back"
|
|
15
|
-
}, /* @__PURE__ */ React.createElement(
|
|
15
|
+
}, /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-arrow-left" })), /* @__PURE__ */ React.createElement("div", { className: "register-step-content" }, /* @__PURE__ */ React.createElement("p", { className: "email-already-registered-message" }, message), /* @__PURE__ */ React.createElement("div", { className: "register-login-prompt" }, /* @__PURE__ */ React.createElement("span", { className: "prompt-text" }, locales.getText("pisell-register2-have-account"), " "), /* @__PURE__ */ React.createElement("button", {
|
|
16
16
|
className: "login-link",
|
|
17
17
|
onClick: onGoToLogin
|
|
18
18
|
}, locales.getText("pisell-register2-login-link")))));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { locales } from "@pisell/utils";
|
|
3
|
-
import
|
|
3
|
+
import IconFont from "@pisell/materials/src/components/iconfont";
|
|
4
4
|
//#region src/pro/Login2.0/steps/WaitEmailLink.tsx
|
|
5
5
|
/**
|
|
6
6
|
* 等待邮件链接验证页面(对应图1)
|
|
@@ -12,11 +12,11 @@ function WaitEmailLink({ flowData, onResend, onBack, onEditEmail, countdown = 0,
|
|
|
12
12
|
className: "back-button-top",
|
|
13
13
|
onClick: onBack,
|
|
14
14
|
"aria-label": "Go back"
|
|
15
|
-
}, /* @__PURE__ */ React.createElement(
|
|
15
|
+
}, /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-arrow-left" })), /* @__PURE__ */ React.createElement("div", { className: "register-step-content" }, /* @__PURE__ */ React.createElement("div", { className: "register-step-title-verify-email" }, locales.getText("pisell-register2-verify-email-title")), /* @__PURE__ */ React.createElement("div", { className: "register-step-desc-verify-email" }, locales.getText("pisell-register2-verify-email-desc")), /* @__PURE__ */ React.createElement("div", { className: "register-email-display" }, /* @__PURE__ */ React.createElement("span", { className: "email-text" }, displayEmail), onEditEmail && /* @__PURE__ */ React.createElement("button", {
|
|
16
16
|
className: "edit-email-btn",
|
|
17
17
|
onClick: onEditEmail,
|
|
18
18
|
"aria-label": "Edit email"
|
|
19
|
-
}, /* @__PURE__ */ React.createElement(
|
|
19
|
+
}, /* @__PURE__ */ React.createElement(IconFont, {
|
|
20
20
|
type: "pisell2-edit-05",
|
|
21
21
|
style: {
|
|
22
22
|
fontSize: "20px",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import { isMultiDayProduct } from "../../../components/booking/info2/service/addService/utils.js";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
|
-
import
|
|
4
|
+
import utc from "dayjs/plugin/utc";
|
|
5
5
|
//#region src/pro/skuDetailModal/flow/calendarEntry.ts
|
|
6
|
-
dayjs.extend(
|
|
6
|
+
dayjs.extend(utc);
|
|
7
7
|
/** Calendar timestamps belong to the shop clock, rather than the browser clock. */
|
|
8
8
|
function calendarDateTime(value) {
|
|
9
9
|
const matched = value.match(/(Z|([+-])(\d{2}):(\d{2}))$/i);
|
|
@@ -9,7 +9,7 @@ react = require_runtime.__toESM(react);
|
|
|
9
9
|
function PendingOperationsNotice() {
|
|
10
10
|
const runtime = require_context.useLockerRuntime();
|
|
11
11
|
const state = runtime.useSnapshot((value) => value);
|
|
12
|
-
const { text } = require_locales.useSmartLockerLocale();
|
|
12
|
+
const { text } = require_locales.useSmartLockerLocale(runtime.presentation.employee);
|
|
13
13
|
const navigate = runtime.useNavigate();
|
|
14
14
|
const memberId = runtime.getMemberId(state);
|
|
15
15
|
const issues = (state.pendingOperations || []).filter(({ operation }) => {
|
|
@@ -80,8 +80,8 @@ function CustomerRoute({ runtime }) {
|
|
|
80
80
|
}
|
|
81
81
|
function MountedLocker(props) {
|
|
82
82
|
var _location$state, _location$state2;
|
|
83
|
-
const { text, locale } = require_locales.useSmartLockerLocale();
|
|
84
83
|
const { employee } = props;
|
|
84
|
+
const { text, locale } = require_locales.useSmartLockerLocale(employee);
|
|
85
85
|
const callbacks = (0, react.useRef)(props);
|
|
86
86
|
callbacks.current = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, props), {}, { context: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, props.context), {}, { locale: props.context.locale || locale }) });
|
|
87
87
|
const runtime = (0, react.useMemo)(() => require_runtime$1.createLockerRuntime(props, () => callbacks.current), [props.service]);
|
|
@@ -36,19 +36,48 @@ const translations = {
|
|
|
36
36
|
pt: require_pt.default,
|
|
37
37
|
ja: require_ja.default
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const staffSupportKeys = new Set([
|
|
40
|
+
"lockerPreparationPending",
|
|
41
|
+
"lockerBusinessSyncPending",
|
|
42
|
+
"lockerCancellationPending",
|
|
43
|
+
"lockerSaleConfigurationPending",
|
|
44
|
+
"lockerMenuConfigurationPending",
|
|
45
|
+
"lockerInventoryUnavailable",
|
|
46
|
+
"lockerStorageUnavailable",
|
|
47
|
+
"lockerDoorUnavailable",
|
|
48
|
+
"lockerOrderUnresolved",
|
|
49
|
+
"doorStatusIsUnknownAskStaffToCheckIt",
|
|
50
|
+
"aDoorHasAnUnknownStatusAskStaffTo",
|
|
51
|
+
"lockersUnavailablePleaseAskAStaffMemberForHelp",
|
|
52
|
+
"operationFailed"
|
|
53
|
+
]);
|
|
54
|
+
const technicianTerms = {
|
|
55
|
+
en: [["a staff member", "a technician"], ["staff", "a technician"]],
|
|
56
|
+
"zh-CN": [["工作人员", "技术人员"], ["员工", "技术人员"]],
|
|
57
|
+
"zh-HK": [
|
|
58
|
+
["工作人員", "技術人員"],
|
|
59
|
+
["職員", "技術人員"],
|
|
60
|
+
["員工", "技術人員"]
|
|
61
|
+
],
|
|
62
|
+
pt: [["funcionário", "técnico"], ["equipe", "equipe técnica"]],
|
|
63
|
+
ja: [["スタッフ", "技術スタッフ"]]
|
|
64
|
+
};
|
|
65
|
+
function getSmartLockerText(key, values = {}, locale = "en", employee = false) {
|
|
66
|
+
var _dictionary$key, _technicianTerms;
|
|
67
|
+
const dictionary = translations[locale] || require_en.default;
|
|
68
|
+
const message = (_dictionary$key = dictionary[key]) !== null && _dictionary$key !== void 0 ? _dictionary$key : require_en.default[key];
|
|
69
|
+
const terms = dictionary[key] == null ? technicianTerms.en : (_technicianTerms = technicianTerms[locale]) !== null && _technicianTerms !== void 0 ? _technicianTerms : technicianTerms.en;
|
|
70
|
+
return (employee && staffSupportKeys.has(key) ? terms.reduce((copy, [staff, technician]) => copy.replace(staff, technician), message) : message).replace(/\{(\w+)\}/g, (match, name) => {
|
|
42
71
|
var _values$name;
|
|
43
72
|
return String((_values$name = values[name]) !== null && _values$name !== void 0 ? _values$name : match);
|
|
44
73
|
});
|
|
45
74
|
}
|
|
46
|
-
function useSmartLockerLocale() {
|
|
75
|
+
function useSmartLockerLocale(employee = false) {
|
|
47
76
|
const locale = require_useLocale.default();
|
|
48
77
|
return (0, react.useMemo)(() => ({
|
|
49
78
|
locale,
|
|
50
|
-
text: (key, values) => getSmartLockerText(key, values, locale)
|
|
51
|
-
}), [locale]);
|
|
79
|
+
text: (key, values) => getSmartLockerText(key, values, locale, employee)
|
|
80
|
+
}), [locale, employee]);
|
|
52
81
|
}
|
|
53
82
|
//#endregion
|
|
54
83
|
exports.SMART_LOCKER_LOCALES = SMART_LOCKER_LOCALES;
|
|
@@ -16,7 +16,7 @@ react = require_runtime.__toESM(react);
|
|
|
16
16
|
//#region src/components/smartLocker/pages/StaffLockersPage.tsx
|
|
17
17
|
const StaffLockersPage = () => {
|
|
18
18
|
var _lockerFilters$find$i, _lockerFilters$find, _searchParams$get$toU, _searchParams$get, _lockerFilters$find2, _items$find, _ref;
|
|
19
|
-
const { text } = require_locales.useSmartLockerLocale();
|
|
19
|
+
const { text } = require_locales.useSmartLockerLocale(true);
|
|
20
20
|
const runtime = require_context.useLockerRuntime();
|
|
21
21
|
const state = runtime.useSnapshot((currentState) => currentState);
|
|
22
22
|
const [searchParams, setSearchParams] = runtime.useSearchParams();
|
|
@@ -55,7 +55,6 @@ function createLockerController({ context, service, operator, employee }, router
|
|
|
55
55
|
let unsubscribe;
|
|
56
56
|
let sessionVersion = 0;
|
|
57
57
|
const jobs = /* @__PURE__ */ new Map();
|
|
58
|
-
const staffOperations = /* @__PURE__ */ new Map();
|
|
59
58
|
const busy = () => [...jobs.keys()].some((key) => key.startsWith("auth:") || key.startsWith("retry:") || key.startsWith("cancel:") || key === "prepare" || key.startsWith("staff:") && key !== "staff:batch-doors");
|
|
60
59
|
const report = (error) => {
|
|
61
60
|
if (alive && !require_errors.isAbortError(error)) store.setState({ error: require_errors.getLockerError(error) });
|
|
@@ -113,7 +112,6 @@ function createLockerController({ context, service, operator, employee }, router
|
|
|
113
112
|
yield service.finishOperation(context, operation, signal);
|
|
114
113
|
(_operationAborts$get = operationAborts.get(operation.id)) === null || _operationAborts$get === void 0 || _operationAborts$get.abort();
|
|
115
114
|
operationAborts.delete(operation.id);
|
|
116
|
-
for (const [id, value] of staffOperations) if (value.id === operation.id) staffOperations.delete(id);
|
|
117
115
|
});
|
|
118
116
|
return function finishOperation(_x6, _x7) {
|
|
119
117
|
return _ref3.apply(this, arguments);
|
|
@@ -369,7 +367,6 @@ function createLockerController({ context, service, operator, employee }, router
|
|
|
369
367
|
store.setState({ openingCollectionOperationId: void 0 });
|
|
370
368
|
operationAborts.forEach((abort) => abort.abort());
|
|
371
369
|
operationAborts.clear();
|
|
372
|
-
staffOperations.clear();
|
|
373
370
|
customerOperation = void 0;
|
|
374
371
|
identificationInput = void 0;
|
|
375
372
|
service.releaseCustomerSession(context, customerSessionId);
|
|
@@ -599,12 +596,10 @@ function createLockerController({ context, service, operator, employee }, router
|
|
|
599
596
|
if (!((_state$staffAccess = state.staffAccess) === null || _state$staffAccess === void 0 ? void 0 : _state$staffAccess.canOperateSmartLockers) || state.openAllRequest || state.staffOpens[id] === "unknown") return;
|
|
600
597
|
store.setState({ staffPending: [...state.staffPending, id] });
|
|
601
598
|
try {
|
|
602
|
-
|
|
603
|
-
if (!operation || state.staffOpens[id] !== "failed") operation = yield prepareOperation((lifetime) => service.prepareStaffOpen(context, [id], operator, lifetime, true), signal);
|
|
604
|
-
staffOperations.set(id, operation);
|
|
599
|
+
const operation = yield prepareOperation((lifetime) => service.prepareStaffOpen(context, [id], operator, lifetime, true), signal);
|
|
605
600
|
const result = yield readDoor(operation, id, signal);
|
|
606
601
|
if (alive && !signal.aborted) store.setState((current) => ({ staffOpens: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, current.staffOpens), {}, { [id]: result }) }));
|
|
607
|
-
|
|
602
|
+
yield finishOperation(operation, signal);
|
|
608
603
|
} finally {
|
|
609
604
|
if (alive && !signal.aborted) store.setState((current) => ({ staffPending: current.staffPending.filter((item) => item !== id) }));
|
|
610
605
|
}
|
|
@@ -626,10 +621,6 @@ function createLockerController({ context, service, operator, employee }, router
|
|
|
626
621
|
var _model$getLocker;
|
|
627
622
|
return state.staffOpens[id] === "unknown" || ((_model$getLocker = model.getLocker(state, id)) === null || _model$getLocker === void 0 ? void 0 : _model$getLocker.door) === "unknown";
|
|
628
623
|
})) throw new require_errors.LockerServiceError("aDoorHasAnUnknownStatusAskStaffTo");
|
|
629
|
-
for (const id of ids) {
|
|
630
|
-
const previous = staffOperations.get(id);
|
|
631
|
-
if (previous && state.staffOpens[id] === "failed") yield finishOperation(previous, signal);
|
|
632
|
-
}
|
|
633
624
|
const operation = yield prepareOperation((lifetime) => service.prepareStaffOpen(context, ids, operator, lifetime, true), signal);
|
|
634
625
|
if (!alive || signal.aborted) return false;
|
|
635
626
|
store.setState({ openAllRequest: {
|
|
@@ -11,7 +11,7 @@ const _excluded = ["openingInstructions"];
|
|
|
11
11
|
/** State and async operations live for one entrance, independently of presentation changes. */
|
|
12
12
|
function createLockerRuntime(options, readProps) {
|
|
13
13
|
const router = require_router.createLockerRouter(options.employee ? "/staff/lockers" : "/");
|
|
14
|
-
const text = (key, values) => require_locales.getSmartLockerText(key, values, readProps().context.locale);
|
|
14
|
+
const text = (key, values) => require_locales.getSmartLockerText(key, values, readProps().context.locale, options.employee);
|
|
15
15
|
const controller = require_controller.createLockerController(options, router, text);
|
|
16
16
|
const { store, model } = controller;
|
|
17
17
|
const help = require_store.createStore({ reason: null });
|
|
@@ -45,9 +45,7 @@ function createLockerRuntime(options, readProps) {
|
|
|
45
45
|
deviceLabel: location && !/[@@]/.test(deviceName) ? `${deviceName} @ ${location}` : deviceName
|
|
46
46
|
};
|
|
47
47
|
},
|
|
48
|
-
text
|
|
49
|
-
return require_locales.getSmartLockerText(key, values, readProps().context.locale);
|
|
50
|
-
},
|
|
48
|
+
text,
|
|
51
49
|
getElementById(id) {
|
|
52
50
|
var _root$current;
|
|
53
51
|
return (_root$current = root.current) === null || _root$current === void 0 ? void 0 : _root$current.querySelector(`[id="${id.replace(/["\\]/g, "")}"]`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.485",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"@pisell/pi-payment-sdk": "0.0.5",
|
|
78
78
|
"@pisell/utils": "3.0.7",
|
|
79
79
|
"@pisell/materials": "6.12.107",
|
|
80
|
-
"@pisell/
|
|
81
|
-
"@pisell/
|
|
80
|
+
"@pisell/date-picker": "3.0.12",
|
|
81
|
+
"@pisell/icon": "0.0.11"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"react": "^18.0.0",
|