@pisell/private-materials 6.11.68 → 6.11.70
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 +2 -2
- package/build/lowcode/view.js +2 -2
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/hooks/usePromotion.js +2 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +7 -7
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/plus/pisellReservation/PisellReservation.js +31 -41
- package/es/plus/pisellReservation/floorPlanApi.js +3 -1
- package/es/plus/pisellReservation/hooks/usePisellReservationBookingData.d.ts +2 -0
- package/es/plus/pisellReservation/hooks/usePisellReservationBookingData.js +4 -1
- package/es/plus/pisellReservation/hooks/usePisellReservationResourceTableData.d.ts +1 -1
- package/es/plus/pisellReservation/hooks/usePisellReservationResourceTableData.js +2 -1
- package/es/plus/pisellReservation/index.d.ts +1 -1
- package/es/plus/pisellReservation/index.js +1 -1
- package/es/plus/pisellReservation/locales-ja.d.ts +69 -0
- package/es/plus/pisellReservation/locales-ja.js +68 -0
- package/es/plus/pisellReservation/locales-pt.d.ts +69 -0
- package/es/plus/pisellReservation/locales-pt.js +68 -0
- package/es/plus/pisellReservation/locales.d.ts +161 -0
- package/es/plus/pisellReservation/locales.js +35 -4
- package/es/plus/pisellReservation/reservationCards.js +7 -4
- package/es/plus/pisellReservation/reservationConstants.d.ts +33 -0
- package/es/plus/pisellReservation/reservationConstants.js +4 -1
- package/es/plus/pisellReservation/reservationMock.d.ts +10 -4
- package/es/plus/pisellReservation/reservationMock.js +94 -39
- package/es/plus/pisellReservation/useReservationFloorMapMerged.d.ts +2 -0
- package/es/plus/pisellReservation/useReservationFloorMapMerged.js +8 -5
- package/es/plus/pisellReservation/useReservationFloorPlan.d.ts +3 -0
- package/es/plus/pisellReservation/useReservationFloorPlan.js +5 -4
- package/es/plus/pisellSalesGrid/serve.js +2 -2
- package/es/plus/pisellSalesManagement/config/booking.d.ts +7 -6
- package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/utils.d.ts +1 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/hooks/usePromotion.js +1 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +7 -7
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/plus/pisellReservation/PisellReservation.js +28 -64
- package/lib/plus/pisellReservation/floorPlanApi.js +7 -5
- package/lib/plus/pisellReservation/hooks/usePisellReservationBookingData.d.ts +2 -0
- package/lib/plus/pisellReservation/hooks/usePisellReservationBookingData.js +4 -1
- package/lib/plus/pisellReservation/hooks/usePisellReservationResourceTableData.d.ts +1 -1
- package/lib/plus/pisellReservation/hooks/usePisellReservationResourceTableData.js +2 -1
- package/lib/plus/pisellReservation/index.d.ts +1 -1
- package/lib/plus/pisellReservation/index.js +2 -2
- package/lib/plus/pisellReservation/locales-ja.d.ts +69 -0
- package/lib/plus/pisellReservation/locales-ja.js +91 -0
- package/lib/plus/pisellReservation/locales-pt.d.ts +69 -0
- package/lib/plus/pisellReservation/locales-pt.js +91 -0
- package/lib/plus/pisellReservation/locales.d.ts +161 -0
- package/lib/plus/pisellReservation/locales.js +45 -4
- package/lib/plus/pisellReservation/reservationCards.js +7 -8
- package/lib/plus/pisellReservation/reservationConstants.d.ts +33 -0
- package/lib/plus/pisellReservation/reservationConstants.js +10 -0
- package/lib/plus/pisellReservation/reservationMock.d.ts +10 -4
- package/lib/plus/pisellReservation/reservationMock.js +106 -19
- package/lib/plus/pisellReservation/useReservationFloorMapMerged.d.ts +2 -0
- package/lib/plus/pisellReservation/useReservationFloorMapMerged.js +10 -4
- package/lib/plus/pisellReservation/useReservationFloorPlan.d.ts +3 -0
- package/lib/plus/pisellReservation/useReservationFloorPlan.js +4 -3
- package/lib/plus/pisellSalesGrid/serve.js +2 -2
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +7 -6
- package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/utils.d.ts +1 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lowcode/pisell-reservation/meta.ts +1 -1
- package/package.json +2 -2
|
@@ -12,6 +12,16 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
|
12
12
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
13
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
14
|
import { FLOOR_MAP_IMAGE_ELEMENT_KIND } from '@pisell/materials';
|
|
15
|
+
import { locales } from '@pisell/utils';
|
|
16
|
+
import reservationLocales from "./locales";
|
|
17
|
+
var PALETTE_IMAGE_BG_I18N_KEY = 'pisell-reservation.floor-map.palette-image-bg';
|
|
18
|
+
|
|
19
|
+
/** 合并远程图元种类时识别「旧版图片底图」展示名(各语言 + 历史简体中文) */
|
|
20
|
+
var LEGACY_PALETTE_IMAGE_BG_LABELS = new Set([reservationLocales.en[PALETTE_IMAGE_BG_I18N_KEY], reservationLocales['zh-CN'][PALETTE_IMAGE_BG_I18N_KEY], reservationLocales['zh-HK'][PALETTE_IMAGE_BG_I18N_KEY], '图片(底图)']);
|
|
21
|
+
var I18N_FLOOR_CATEGORY_BG = 'pisell-reservation.floor-map.category-background';
|
|
22
|
+
var I18N_FLOOR_DS_LABEL = 'pisell-reservation.floor-map.data-source-label';
|
|
23
|
+
var I18N_PALETTE_IMAGE_BG = PALETTE_IMAGE_BG_I18N_KEY;
|
|
24
|
+
var I18N_ROOM_KIND_BOUND = 'pisell-reservation.room-kind-bound';
|
|
15
25
|
|
|
16
26
|
/**
|
|
17
27
|
* 与 Story 款 `floorMapImage` 重复的旧版/接口图片图元(合并时整项丢弃,只保留默认里那份)
|
|
@@ -20,7 +30,7 @@ var LEGACY_IMAGE_ELEMENT_KIND_VALUES = new Set(['image', 'floorMapBg', 'floor_ma
|
|
|
20
30
|
function stripConflictingImageElementKinds(kinds) {
|
|
21
31
|
return kinds.filter(function (k) {
|
|
22
32
|
if (LEGACY_IMAGE_ELEMENT_KIND_VALUES.has(k.value)) return false;
|
|
23
|
-
if (k.
|
|
33
|
+
if (k.value !== FLOOR_MAP_IMAGE_ELEMENT_KIND && LEGACY_PALETTE_IMAGE_BG_LABELS.has(k.label)) {
|
|
24
34
|
return false;
|
|
25
35
|
}
|
|
26
36
|
return true;
|
|
@@ -99,6 +109,44 @@ export function mergeFloorMapElementKindCategoriesWithDefaults(defaults, remote)
|
|
|
99
109
|
});
|
|
100
110
|
}
|
|
101
111
|
|
|
112
|
+
/**
|
|
113
|
+
* 按当前 {@link locales} 刷新调色板分组、图元展示名(底图 / 资源绑定等)。
|
|
114
|
+
* 持久化里若仍使用约定 `categoryId`:`background`、`dining` 与约定 kind value,会覆盖旧快照文案以便随引擎语言切换。
|
|
115
|
+
*/
|
|
116
|
+
export function applyReservationFloorMapLiveLabels(config) {
|
|
117
|
+
var _config$elementKindCa, _config$elementKinds;
|
|
118
|
+
var nextCats = (_config$elementKindCa = config.elementKindCategories) === null || _config$elementKindCa === void 0 ? void 0 : _config$elementKindCa.map(function (c) {
|
|
119
|
+
if (c.id === 'background') {
|
|
120
|
+
return _objectSpread(_objectSpread({}, c), {}, {
|
|
121
|
+
label: locales.getText(I18N_FLOOR_CATEGORY_BG)
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (c.id === 'dining') {
|
|
125
|
+
return _objectSpread(_objectSpread({}, c), {}, {
|
|
126
|
+
label: locales.getText(I18N_FLOOR_DS_LABEL)
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return c;
|
|
130
|
+
});
|
|
131
|
+
var nextKinds = (_config$elementKinds = config.elementKinds) === null || _config$elementKinds === void 0 ? void 0 : _config$elementKinds.map(function (k) {
|
|
132
|
+
if (k.value === FLOOR_MAP_IMAGE_ELEMENT_KIND) {
|
|
133
|
+
return _objectSpread(_objectSpread({}, k), {}, {
|
|
134
|
+
label: locales.getText(I18N_PALETTE_IMAGE_BG)
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (k.value === RESERVATION_BOUND_TABLE_ELEMENT_KIND) {
|
|
138
|
+
return _objectSpread(_objectSpread({}, k), {}, {
|
|
139
|
+
label: locales.getText(I18N_ROOM_KIND_BOUND)
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
return k;
|
|
143
|
+
});
|
|
144
|
+
return _objectSpread(_objectSpread({}, config), {}, {
|
|
145
|
+
elementKindCategories: nextCats !== null && nextCats !== void 0 ? nextCats : config.elementKindCategories,
|
|
146
|
+
elementKinds: nextKinds !== null && nextKinds !== void 0 ? nextKinds : config.elementKinds
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
102
150
|
/** 默认画布展示名(与 reservation locales 中 canvas.* 文案对齐) */
|
|
103
151
|
var RESERVATION_CANVAS_NAME_MAIN = {
|
|
104
152
|
en: 'Main Area',
|
|
@@ -121,6 +169,7 @@ var RESERVATION_CANVAS_NAME_VIP = {
|
|
|
121
169
|
ja: 'VIP Area',
|
|
122
170
|
pt: 'VIP Area'
|
|
123
171
|
};
|
|
172
|
+
|
|
124
173
|
/**
|
|
125
174
|
* 预约平面图「绑定桌位」唯一图元 value(与底图 `floorMapImage` 并存)。
|
|
126
175
|
* 旧版方桌 / 长条 / 吧台图元仍可从接口 scene 回显,渲染走同一套房间卡片。
|
|
@@ -294,25 +343,27 @@ export var defaultReservationTableRows = [{
|
|
|
294
343
|
}];
|
|
295
344
|
var DS = 'tables';
|
|
296
345
|
var CANVAS_MAIN = 'main';
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
346
|
+
function getReservationElementKindCategories() {
|
|
347
|
+
return [{
|
|
348
|
+
id: 'background',
|
|
349
|
+
label: locales.getText(I18N_FLOOR_CATEGORY_BG),
|
|
350
|
+
order: 0
|
|
351
|
+
}, {
|
|
352
|
+
id: 'dining',
|
|
353
|
+
label: locales.getText(I18N_FLOOR_DS_LABEL),
|
|
354
|
+
order: 1
|
|
355
|
+
}];
|
|
356
|
+
}
|
|
306
357
|
function getReservationPaletteElementKinds() {
|
|
307
358
|
return [{
|
|
308
359
|
value: FLOOR_MAP_IMAGE_ELEMENT_KIND,
|
|
309
|
-
label:
|
|
360
|
+
label: locales.getText(I18N_PALETTE_IMAGE_BG),
|
|
310
361
|
categoryId: 'background',
|
|
311
362
|
dataBindingPolicy: 'none',
|
|
312
363
|
showInPalette: true
|
|
313
364
|
}, {
|
|
314
365
|
value: RESERVATION_BOUND_TABLE_ELEMENT_KIND,
|
|
315
|
-
label:
|
|
366
|
+
label: locales.getText(I18N_ROOM_KIND_BOUND),
|
|
316
367
|
categoryId: 'dining',
|
|
317
368
|
dataBindingPolicy: 'optional',
|
|
318
369
|
allowedDataSourceKeys: [DS],
|
|
@@ -642,7 +693,7 @@ export function getReservationFloorMapShellConfig() {
|
|
|
642
693
|
canCreate: true,
|
|
643
694
|
canEdit: true
|
|
644
695
|
},
|
|
645
|
-
elementKindCategories:
|
|
696
|
+
elementKindCategories: getReservationElementKindCategories(),
|
|
646
697
|
elementKinds: getReservationPaletteElementKinds(),
|
|
647
698
|
sceneElements: []
|
|
648
699
|
};
|
|
@@ -671,33 +722,37 @@ export function getDefaultReservationFloorMapConfig() {
|
|
|
671
722
|
canCreate: true,
|
|
672
723
|
canEdit: true
|
|
673
724
|
},
|
|
674
|
-
elementKindCategories:
|
|
725
|
+
elementKindCategories: getReservationElementKindCategories(),
|
|
675
726
|
elementKinds: getReservationPaletteElementKinds(),
|
|
676
727
|
sceneElements: cloneSceneElements(defaultReservationSceneElements)
|
|
677
728
|
};
|
|
678
729
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
730
|
+
|
|
731
|
+
/** 平面图侧栏数据源记录表单列(随当前语言刷新) */
|
|
732
|
+
export function getReservationDataSourceFormColumns() {
|
|
733
|
+
return [{
|
|
734
|
+
key: 'code',
|
|
735
|
+
label: locales.getText('pisell-reservation.grid.code'),
|
|
736
|
+
type: 'string'
|
|
737
|
+
}, {
|
|
738
|
+
key: 'guestName',
|
|
739
|
+
label: locales.getText('pisell-reservation.grid.guest'),
|
|
740
|
+
type: 'string'
|
|
741
|
+
}, {
|
|
742
|
+
key: 'time',
|
|
743
|
+
label: locales.getText('pisell-reservation.grid.time'),
|
|
744
|
+
type: 'string'
|
|
745
|
+
}, {
|
|
746
|
+
key: 'partySize',
|
|
747
|
+
label: locales.getText('pisell-reservation.grid.party'),
|
|
748
|
+
type: 'number'
|
|
749
|
+
}, {
|
|
750
|
+
key: 'cardStatus',
|
|
751
|
+
label: locales.getText('pisell-reservation.resource-grid.card-status'),
|
|
752
|
+
type: 'string'
|
|
753
|
+
}, {
|
|
754
|
+
key: 'area',
|
|
755
|
+
label: locales.getText('pisell-reservation.grid.area'),
|
|
756
|
+
type: 'string'
|
|
757
|
+
}];
|
|
758
|
+
}
|
|
@@ -38,5 +38,7 @@ export interface UseReservationFloorMapMergedParams {
|
|
|
38
38
|
mode: 'read' | 'edit';
|
|
39
39
|
dataSources: FloorMapDataSources;
|
|
40
40
|
}) => void;
|
|
41
|
+
/** 与引擎语言同步,避免 dataSourceLabels 等停留在首次渲染语言 */
|
|
42
|
+
engineLocale: string;
|
|
41
43
|
}
|
|
42
44
|
export declare function useReservationFloorMapMerged(params: UseReservationFloorMapMergedParams): Partial<import("@pisell/materials").PisellFloorMapLayoutProps<import("@pisell/materials").FloorMapItemBase>>;
|
|
@@ -11,9 +11,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
11
11
|
* 合并 RecordBoard.floorMap 与预约默认:持久化 onSave、画布 Tab 尾区、缩放/平移等
|
|
12
12
|
*/
|
|
13
13
|
import React, { useMemo } from 'react';
|
|
14
|
+
import { locales } from '@pisell/utils';
|
|
14
15
|
import { floorMapSavedConfigToRemotePatch, saveViewConfigToShopFloorPlan, toastFloorPlanSaveError } from "./floorPlanApi";
|
|
15
|
-
import {
|
|
16
|
+
import { getReservationDataSourceFormColumns } from "./reservationMock";
|
|
16
17
|
import { ReservationFloorMapCanvasTabsTrailing } from "./PisellReservationSubcomponents";
|
|
18
|
+
var I18N_FLOOR_MAP_DATA_SOURCE_LABEL = 'pisell-reservation.floor-map.data-source-label';
|
|
17
19
|
export function useReservationFloorMapMerged(params) {
|
|
18
20
|
var floorMapProp = params.floorMapProp,
|
|
19
21
|
baseFloorConfig = params.baseFloorConfig,
|
|
@@ -37,11 +39,12 @@ export function useReservationFloorMapMerged(params) {
|
|
|
37
39
|
floorMapLayoutRef = params.floorMapLayoutRef,
|
|
38
40
|
reservationFloorMapViewportOverlay = params.reservationFloorMapViewportOverlay,
|
|
39
41
|
setRemoteFloorPlanView = params.setRemoteFloorPlanView,
|
|
40
|
-
floorMapItemClickBefore = params.floorMapItemClickBefore
|
|
42
|
+
floorMapItemClickBefore = params.floorMapItemClickBefore,
|
|
43
|
+
engineLocale = params.engineLocale;
|
|
41
44
|
return useMemo(function () {
|
|
42
45
|
var _floorMapProp$dataSou, _floorRest$cellSize, _floorRest$itemUnit, _floorRest$floorMapCo, _floorMapProp$renderI, _floorRest$toolbarSho, _floorRest$showDataSo, _floorRest$zoom, _floorRest$floorMapVi, _floorRest$canvasTabs;
|
|
43
|
-
var labels = _defineProperty({}, gridDataSourceKey,
|
|
44
|
-
var forms = _defineProperty({}, gridDataSourceKey,
|
|
46
|
+
var labels = _defineProperty({}, gridDataSourceKey, locales.getText(I18N_FLOOR_MAP_DATA_SOURCE_LABEL));
|
|
47
|
+
var forms = _defineProperty({}, gridDataSourceKey, getReservationDataSourceFormColumns());
|
|
45
48
|
var _ref = floorMapProp !== null && floorMapProp !== void 0 ? floorMapProp : {},
|
|
46
49
|
getMergedItemWrapperStyle = _ref.getMergedItemWrapperStyle,
|
|
47
50
|
floorRest = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -124,5 +127,5 @@ export function useReservationFloorMapMerged(params) {
|
|
|
124
127
|
floorMapLayoutRef: floorMapLayoutRef
|
|
125
128
|
})
|
|
126
129
|
});
|
|
127
|
-
}, [baseFloorConfig, dataSources, floorMapProp, reservationFloorMapViewportOverlay, renderItemByKind, gridDataSourceKey, effectiveMapMode, resolvedFloorPlanId, floorPlanRemoteId, effectiveFloorPlanCode, floorPlanCanvasWidth, floorPlanCanvasHeight, floorPlanName, floorPlanSort, floorPlanStatus, onFloorPlanPersisted, putFloorPlan, isFloorModeControlled, mapEditInternal, floorMapLayoutRef, setRemoteFloorPlanView, floorMapItemClickBefore]);
|
|
130
|
+
}, [baseFloorConfig, dataSources, floorMapProp, reservationFloorMapViewportOverlay, renderItemByKind, gridDataSourceKey, effectiveMapMode, resolvedFloorPlanId, floorPlanRemoteId, effectiveFloorPlanCode, floorPlanCanvasWidth, floorPlanCanvasHeight, floorPlanName, floorPlanSort, floorPlanStatus, onFloorPlanPersisted, putFloorPlan, isFloorModeControlled, mapEditInternal, floorMapLayoutRef, setRemoteFloorPlanView, floorMapItemClickBefore, engineLocale]);
|
|
128
131
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { FloorMapViewConfig } from '@pisell/materials';
|
|
2
3
|
export declare function useReservationFloorPlan(options: {
|
|
3
4
|
resolvedFloorPlanId: number | null;
|
|
4
5
|
effectiveFloorPlanCode: string;
|
|
5
6
|
gridDataSourceKey: string;
|
|
6
7
|
floorMapConfigFromProp?: FloorMapViewConfig;
|
|
8
|
+
/** 随引擎语言变化,刷新平面图调色板分组/图元/底图等展示文案(避免首次 memo 快照死为某一种语言) */
|
|
9
|
+
engineLocale: string;
|
|
7
10
|
}): {
|
|
8
11
|
baseFloorConfig: FloorMapViewConfig;
|
|
9
12
|
floorPlanRemoteId: number | null;
|
|
@@ -15,13 +15,14 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
*/
|
|
16
16
|
import { useEffect, useMemo, useState } from 'react';
|
|
17
17
|
import { getShopFloorPlanByCode, mergeFloorPlanViewRemote, parseLayoutFieldToViewConfigPatch, shopLayoutToSceneElements, toastFloorPlanLoadError } from "./floorPlanApi";
|
|
18
|
-
import { getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults } from "./reservationMock";
|
|
18
|
+
import { applyReservationFloorMapLiveLabels, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults } from "./reservationMock";
|
|
19
19
|
import { RESERVATION_MAIN_CANVAS_ID } from "./reservationConstants";
|
|
20
20
|
export function useReservationFloorPlan(options) {
|
|
21
21
|
var resolvedFloorPlanId = options.resolvedFloorPlanId,
|
|
22
22
|
effectiveFloorPlanCode = options.effectiveFloorPlanCode,
|
|
23
23
|
gridDataSourceKey = options.gridDataSourceKey,
|
|
24
|
-
floorMapConfigFromProp = options.floorMapConfigFromProp
|
|
24
|
+
floorMapConfigFromProp = options.floorMapConfigFromProp,
|
|
25
|
+
engineLocale = options.engineLocale;
|
|
25
26
|
var _useState = useState(null),
|
|
26
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
28
|
remoteFloorPlanView = _useState2[0],
|
|
@@ -86,8 +87,8 @@ export function useReservationFloorPlan(options) {
|
|
|
86
87
|
elementKinds: mergeFloorMapElementKindsWithDefaults((_defaults$elementKind3 = defaults.elementKinds) !== null && _defaults$elementKind3 !== void 0 ? _defaults$elementKind3 : [], merged.elementKinds),
|
|
87
88
|
elementKindCategories: mergeFloorMapElementKindCategoriesWithDefaults((_defaults$elementKind4 = defaults.elementKindCategories) !== null && _defaults$elementKind4 !== void 0 ? _defaults$elementKind4 : [], merged.elementKindCategories)
|
|
88
89
|
});
|
|
89
|
-
return merged;
|
|
90
|
-
}, [floorMapConfigFromProp, remoteFloorPlanView]);
|
|
90
|
+
return applyReservationFloorMapLiveLabels(merged);
|
|
91
|
+
}, [floorMapConfigFromProp, remoteFloorPlanView, engineLocale]);
|
|
91
92
|
return {
|
|
92
93
|
baseFloorConfig: baseFloorConfig,
|
|
93
94
|
floorPlanRemoteId: floorPlanRemoteId,
|
|
@@ -137,9 +137,9 @@ var formatBookingData = function formatBookingData(data) {
|
|
|
137
137
|
var orderBase = (item === null || item === void 0 ? void 0 : item.order) != null && _typeof(item.order) === 'object' ? item.order : {};
|
|
138
138
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
139
139
|
order_detail: (_item$order_detail = item === null || item === void 0 ? void 0 : item.order_detail) !== null && _item$order_detail !== void 0 ? _item$order_detail : currentProduct != null ? JSON.stringify(currentProduct) : undefined,
|
|
140
|
-
id: item.schedule_event_id,
|
|
140
|
+
id: item.schedule_event_id || item.id,
|
|
141
141
|
order: _objectSpread(_objectSpread({}, orderBase), {}, {
|
|
142
|
-
id: item.order_id
|
|
142
|
+
id: item.order_id || item.order.id
|
|
143
143
|
})
|
|
144
144
|
});
|
|
145
145
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const getBookingStatusMap: () => Record<string, string>;
|
|
2
3
|
export declare const BOOKING_STATUS_COLOR_MAP: Record<string, string>;
|
|
3
4
|
export declare const getBookingPlatformMap: () => Record<string, string>;
|
|
@@ -19,7 +20,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
19
20
|
}[];
|
|
20
21
|
minInputNumberProps?: undefined;
|
|
21
22
|
maxInputNumberProps?: undefined;
|
|
22
|
-
component?: undefined;
|
|
23
|
+
readonly component?: undefined;
|
|
23
24
|
isSearchServer?: undefined;
|
|
24
25
|
showSearch?: undefined;
|
|
25
26
|
showTime?: undefined;
|
|
@@ -45,7 +46,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
45
46
|
mode?: undefined;
|
|
46
47
|
maxTagCount?: undefined;
|
|
47
48
|
options?: undefined;
|
|
48
|
-
component?: undefined;
|
|
49
|
+
readonly component?: undefined;
|
|
49
50
|
isSearchServer?: undefined;
|
|
50
51
|
showSearch?: undefined;
|
|
51
52
|
showTime?: undefined;
|
|
@@ -90,7 +91,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
90
91
|
options: () => Promise<any>;
|
|
91
92
|
minInputNumberProps?: undefined;
|
|
92
93
|
maxInputNumberProps?: undefined;
|
|
93
|
-
component?: undefined;
|
|
94
|
+
readonly component?: undefined;
|
|
94
95
|
isSearchServer?: undefined;
|
|
95
96
|
showSearch?: undefined;
|
|
96
97
|
showTime?: undefined;
|
|
@@ -110,7 +111,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
110
111
|
options?: undefined;
|
|
111
112
|
minInputNumberProps?: undefined;
|
|
112
113
|
maxInputNumberProps?: undefined;
|
|
113
|
-
component?: undefined;
|
|
114
|
+
readonly component?: undefined;
|
|
114
115
|
isSearchServer?: undefined;
|
|
115
116
|
showSearch?: undefined;
|
|
116
117
|
showTime?: undefined;
|
|
@@ -132,7 +133,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
132
133
|
maxTagCount?: undefined;
|
|
133
134
|
minInputNumberProps?: undefined;
|
|
134
135
|
maxInputNumberProps?: undefined;
|
|
135
|
-
component?: undefined;
|
|
136
|
+
readonly component?: undefined;
|
|
136
137
|
showTime?: undefined;
|
|
137
138
|
};
|
|
138
139
|
sort?: undefined;
|
|
@@ -151,7 +152,7 @@ export declare const getFilterButtonList: () => ({
|
|
|
151
152
|
options?: undefined;
|
|
152
153
|
minInputNumberProps?: undefined;
|
|
153
154
|
maxInputNumberProps?: undefined;
|
|
154
|
-
component?: undefined;
|
|
155
|
+
readonly component?: undefined;
|
|
155
156
|
isSearchServer?: undefined;
|
|
156
157
|
showSearch?: undefined;
|
|
157
158
|
};
|
|
@@ -14,7 +14,7 @@ export declare const getSkuCardConfig: (finalConfig: ProductCardConfig) => {
|
|
|
14
14
|
paddingY: number;
|
|
15
15
|
paddingX: number;
|
|
16
16
|
isBorderVisible: boolean;
|
|
17
|
-
layoutDirection: "
|
|
17
|
+
layoutDirection: "column" | "row";
|
|
18
18
|
};
|
|
19
19
|
skuActionConfig: {
|
|
20
20
|
isOpen: boolean;
|
|
@@ -704,7 +704,7 @@ var usePromotion = (state, dispatch, options) => {
|
|
|
704
704
|
setTimeout(() => {
|
|
705
705
|
dispatch({
|
|
706
706
|
type: "setService",
|
|
707
|
-
payload: { value: finalProducts, unfulfilledPromotions }
|
|
707
|
+
payload: { value: finalProducts, unfulfilledPromotions, edit: true }
|
|
708
708
|
});
|
|
709
709
|
}, 100);
|
|
710
710
|
}
|
|
@@ -175,10 +175,10 @@ export declare const getProductTotalPrice: (item: any, options?: {
|
|
|
175
175
|
export declare const getDuration: (duration: number | {
|
|
176
176
|
type: string;
|
|
177
177
|
value: number;
|
|
178
|
-
}) => number | {
|
|
178
|
+
}) => number | "flexible" | {
|
|
179
179
|
type: string;
|
|
180
180
|
value: number;
|
|
181
|
-
}
|
|
181
|
+
};
|
|
182
182
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
183
183
|
export declare const getIsEdit: (state: any) => boolean;
|
|
184
184
|
export {};
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "
|
|
12
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "
|
|
14
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"loading" | "
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "init" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly" | "huifu">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -176,7 +176,7 @@ export declare const updateCustom: (payload: {
|
|
|
176
176
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
177
177
|
type: EActionTypes;
|
|
178
178
|
payload: {
|
|
179
|
-
status: "loading" | "
|
|
179
|
+
status: "loading" | "success" | "warn" | "fail" | "question";
|
|
180
180
|
};
|
|
181
181
|
};
|
|
182
182
|
/**
|
|
@@ -197,7 +197,7 @@ export declare const updateComponent: (component: string, render?: boolean) => {
|
|
|
197
197
|
} | {
|
|
198
198
|
readonly type: "step";
|
|
199
199
|
readonly render: boolean;
|
|
200
|
-
component?: undefined;
|
|
200
|
+
readonly component?: undefined;
|
|
201
201
|
};
|
|
202
202
|
};
|
|
203
203
|
/**
|
|
@@ -297,20 +297,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
297
297
|
name?: string | undefined;
|
|
298
298
|
symbol?: string | undefined;
|
|
299
299
|
amount?: string | number | undefined;
|
|
300
|
-
mode?: "refund" | "
|
|
300
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
301
301
|
order_id?: string | number | undefined;
|
|
302
|
-
eftpos?: "
|
|
303
|
-
action?: "
|
|
302
|
+
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | "huifu" | undefined;
|
|
303
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
|
304
304
|
key?: number | undefined;
|
|
305
305
|
step?: number | undefined;
|
|
306
306
|
title?: string | undefined;
|
|
307
307
|
subTitle?: string | undefined;
|
|
308
|
-
type?: "
|
|
308
|
+
type?: "unset" | "step" | undefined;
|
|
309
309
|
render?: boolean | undefined;
|
|
310
310
|
net?: boolean | undefined;
|
|
311
311
|
component?: string | undefined;
|
|
312
312
|
form?: string | undefined;
|
|
313
|
-
status?: "loading" | "
|
|
313
|
+
status?: "loading" | "success" | "warn" | "init" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
314
314
|
warn?: string | undefined;
|
|
315
315
|
steps?: {
|
|
316
316
|
/** 用于重置当前步骤 */
|
|
@@ -47,7 +47,7 @@ declare type ScanData = {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
export declare const formatScanCustomer: (data: ScanData) => {
|
|
50
|
-
searchType: "
|
|
50
|
+
searchType: "customer" | "product" | "walletPass" | "wallet" | "local_product";
|
|
51
51
|
data: any;
|
|
52
52
|
scanCode: string;
|
|
53
53
|
} | null;
|