@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.
Files changed (94) 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.js +2 -2
  6. package/build/lowcode/view.js +2 -2
  7. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  8. package/es/components/booking/hooks/usePromotion.js +2 -1
  9. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  10. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  11. package/es/components/booking/utils.d.ts +2 -2
  12. package/es/components/eftposPay/amount.d.ts +1 -1
  13. package/es/components/eftposPay/device.d.ts +1 -1
  14. package/es/components/eftposPay/hooks.d.ts +2 -2
  15. package/es/components/eftposPay/store/index.d.ts +7 -7
  16. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  17. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  18. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  19. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  20. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  21. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  22. package/es/plus/pisellReservation/PisellReservation.js +31 -41
  23. package/es/plus/pisellReservation/floorPlanApi.js +3 -1
  24. package/es/plus/pisellReservation/hooks/usePisellReservationBookingData.d.ts +2 -0
  25. package/es/plus/pisellReservation/hooks/usePisellReservationBookingData.js +4 -1
  26. package/es/plus/pisellReservation/hooks/usePisellReservationResourceTableData.d.ts +1 -1
  27. package/es/plus/pisellReservation/hooks/usePisellReservationResourceTableData.js +2 -1
  28. package/es/plus/pisellReservation/index.d.ts +1 -1
  29. package/es/plus/pisellReservation/index.js +1 -1
  30. package/es/plus/pisellReservation/locales-ja.d.ts +69 -0
  31. package/es/plus/pisellReservation/locales-ja.js +68 -0
  32. package/es/plus/pisellReservation/locales-pt.d.ts +69 -0
  33. package/es/plus/pisellReservation/locales-pt.js +68 -0
  34. package/es/plus/pisellReservation/locales.d.ts +161 -0
  35. package/es/plus/pisellReservation/locales.js +35 -4
  36. package/es/plus/pisellReservation/reservationCards.js +7 -4
  37. package/es/plus/pisellReservation/reservationConstants.d.ts +33 -0
  38. package/es/plus/pisellReservation/reservationConstants.js +4 -1
  39. package/es/plus/pisellReservation/reservationMock.d.ts +10 -4
  40. package/es/plus/pisellReservation/reservationMock.js +94 -39
  41. package/es/plus/pisellReservation/useReservationFloorMapMerged.d.ts +2 -0
  42. package/es/plus/pisellReservation/useReservationFloorMapMerged.js +8 -5
  43. package/es/plus/pisellReservation/useReservationFloorPlan.d.ts +3 -0
  44. package/es/plus/pisellReservation/useReservationFloorPlan.js +5 -4
  45. package/es/plus/pisellSalesGrid/serve.js +2 -2
  46. package/es/plus/pisellSalesManagement/config/booking.d.ts +7 -6
  47. package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
  48. package/es/plus/productSelect/ProductCard/utils.d.ts +1 -1
  49. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  50. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  51. package/lib/components/booking/hooks/usePromotion.js +1 -1
  52. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  53. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  54. package/lib/components/booking/utils.d.ts +2 -2
  55. package/lib/components/eftposPay/amount.d.ts +1 -1
  56. package/lib/components/eftposPay/device.d.ts +1 -1
  57. package/lib/components/eftposPay/hooks.d.ts +2 -2
  58. package/lib/components/eftposPay/store/index.d.ts +7 -7
  59. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  60. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  61. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  62. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  63. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  64. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  65. package/lib/plus/pisellReservation/PisellReservation.js +28 -64
  66. package/lib/plus/pisellReservation/floorPlanApi.js +7 -5
  67. package/lib/plus/pisellReservation/hooks/usePisellReservationBookingData.d.ts +2 -0
  68. package/lib/plus/pisellReservation/hooks/usePisellReservationBookingData.js +4 -1
  69. package/lib/plus/pisellReservation/hooks/usePisellReservationResourceTableData.d.ts +1 -1
  70. package/lib/plus/pisellReservation/hooks/usePisellReservationResourceTableData.js +2 -1
  71. package/lib/plus/pisellReservation/index.d.ts +1 -1
  72. package/lib/plus/pisellReservation/index.js +2 -2
  73. package/lib/plus/pisellReservation/locales-ja.d.ts +69 -0
  74. package/lib/plus/pisellReservation/locales-ja.js +91 -0
  75. package/lib/plus/pisellReservation/locales-pt.d.ts +69 -0
  76. package/lib/plus/pisellReservation/locales-pt.js +91 -0
  77. package/lib/plus/pisellReservation/locales.d.ts +161 -0
  78. package/lib/plus/pisellReservation/locales.js +45 -4
  79. package/lib/plus/pisellReservation/reservationCards.js +7 -8
  80. package/lib/plus/pisellReservation/reservationConstants.d.ts +33 -0
  81. package/lib/plus/pisellReservation/reservationConstants.js +10 -0
  82. package/lib/plus/pisellReservation/reservationMock.d.ts +10 -4
  83. package/lib/plus/pisellReservation/reservationMock.js +106 -19
  84. package/lib/plus/pisellReservation/useReservationFloorMapMerged.d.ts +2 -0
  85. package/lib/plus/pisellReservation/useReservationFloorMapMerged.js +10 -4
  86. package/lib/plus/pisellReservation/useReservationFloorPlan.d.ts +3 -0
  87. package/lib/plus/pisellReservation/useReservationFloorPlan.js +4 -3
  88. package/lib/plus/pisellSalesGrid/serve.js +2 -2
  89. package/lib/plus/pisellSalesManagement/config/booking.d.ts +7 -6
  90. package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
  91. package/lib/plus/productSelect/ProductCard/utils.d.ts +1 -1
  92. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  93. package/lowcode/pisell-reservation/meta.ts +1 -1
  94. 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.label === '图片(底图)' && k.value !== FLOOR_MAP_IMAGE_ELEMENT_KIND) {
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
- var RESERVATION_ELEMENT_KIND_CATEGORIES = [{
298
- id: 'background',
299
- label: '底图',
300
- order: 0
301
- }, {
302
- id: 'dining',
303
- label: '桌位',
304
- order: 1
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: RESERVATION_ELEMENT_KIND_CATEGORIES,
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: RESERVATION_ELEMENT_KIND_CATEGORIES,
725
+ elementKindCategories: getReservationElementKindCategories(),
675
726
  elementKinds: getReservationPaletteElementKinds(),
676
727
  sceneElements: cloneSceneElements(defaultReservationSceneElements)
677
728
  };
678
729
  }
679
- export var reservationDataSourceFormColumns = [{
680
- key: 'code',
681
- label: '台号',
682
- type: 'string'
683
- }, {
684
- key: 'guestName',
685
- label: '客人',
686
- type: 'string'
687
- }, {
688
- key: 'time',
689
- label: '时间',
690
- type: 'string'
691
- }, {
692
- key: 'partySize',
693
- label: '人数',
694
- type: 'number'
695
- }, {
696
- key: 'cardStatus',
697
- label: '卡片状态',
698
- type: 'string'
699
- }, {
700
- key: 'area',
701
- label: '区域',
702
- type: 'string'
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 { reservationDataSourceFormColumns } from "./reservationMock";
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, reservationDataSourceFormColumns);
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
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface UseSalesGridDataParams {
2
3
  perspective: 'monitor' | 'handle';
3
4
  extParams?: {
@@ -14,7 +14,7 @@ export declare const getSkuCardConfig: (finalConfig: ProductCardConfig) => {
14
14
  paddingY: number;
15
15
  paddingX: number;
16
16
  isBorderVisible: boolean;
17
- layoutDirection: "row" | "column";
17
+ layoutDirection: "column" | "row";
18
18
  };
19
19
  skuActionConfig: {
20
20
  isOpen: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ErrorTip: ({ text }: any) => import("react").JSX.Element;
3
4
  export default ErrorTip;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SendModalValues } from './index';
2
3
  declare const useSendModal: (bookingId?: number) => {
3
4
  open: 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
  }
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: any;
10
+ locale: string;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -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
- } | "flexible";
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: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
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: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
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" | "warn" | "success" | "fail" | "init" | "pedding" | "resove" | "reject" | "question">;
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<"stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu">;
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" | "warn" | "success" | "fail" | "question";
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" | "fullPay" | "pay" | "query" | undefined;
300
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
301
301
  order_id?: string | number | undefined;
302
- eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu" | undefined;
303
- action?: "amount" | "deviceList" | "pay" | undefined;
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?: "step" | "unset" | undefined;
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" | "warn" | "success" | "fail" | "init" | "pedding" | "resove" | "reject" | "question" | undefined;
313
+ status?: "loading" | "success" | "warn" | "init" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
314
314
  warn?: string | undefined;
315
315
  steps?: {
316
316
  /** 用于重置当前步骤 */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ErrorTip: ({ text }: any) => import("react").JSX.Element;
3
4
  export default ErrorTip;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare type CallToBookProps = {
3
4
  show: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const WeekItem: (props: any) => import("react").JSX.Element;
3
4
  export default WeekItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare type CalenDateWeekProps = {
3
4
  currentDate: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Empty: (props: any) => import("react").JSX.Element;
3
4
  export default Empty;
@@ -47,7 +47,7 @@ declare type ScanData = {
47
47
  };
48
48
  };
49
49
  export declare const formatScanCustomer: (data: ScanData) => {
50
- searchType: "product" | "customer" | "wallet" | "walletPass" | "local_product";
50
+ searchType: "customer" | "product" | "walletPass" | "wallet" | "local_product";
51
51
  data: any;
52
52
  scanCode: string;
53
53
  } | null;