@pisell/private-materials 6.11.145 → 6.11.146

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.
@@ -2073,7 +2073,7 @@ var PaymentModal = function PaymentModal(_ref19) {
2073
2073
  });
2074
2074
  };
2075
2075
  var handlePaymentCancel = function handlePaymentCancel(reset, notCancelOrder) {
2076
- var _paymentContentRef$cu, _paymentContentRef$cu2;
2076
+ var _paymentContentRef$cu, _paymentContentRef$cu2, _checkout$getCurrentO;
2077
2077
  // 如果需要在父组件读取子组件 PaymentContent 的内部状态(如 syncingLock),只能通过 ref/回调或将状态上提
2078
2078
  var isSyncingLocked = ((_paymentContentRef$cu = paymentContentRef.current) === null || _paymentContentRef$cu === void 0 || (_paymentContentRef$cu2 = _paymentContentRef$cu.getSyncingLock) === null || _paymentContentRef$cu2 === void 0 ? void 0 : _paymentContentRef$cu2.call(_paymentContentRef$cu)) || false;
2079
2079
  console.log('Payment cancelled, syncingLock:', isSyncingLocked);
@@ -2104,7 +2104,9 @@ var PaymentModal = function PaymentModal(_ref19) {
2104
2104
  // 确认是否有地方重复调用 checkout
2105
2105
  checkout.cancelCurrentOrderAsync();
2106
2106
  // 不关闭PaymentResultToast,让它独立存在
2107
- onClose === null || onClose === void 0 || onClose(reset || false);
2107
+ onClose === null || onClose === void 0 || onClose(reset || false, {
2108
+ order_id: checkout === null || checkout === void 0 || (_checkout$getCurrentO = checkout.getCurrentOrderId) === null || _checkout$getCurrentO === void 0 ? void 0 : _checkout$getCurrentO.call(checkout)
2109
+ });
2108
2110
  };
2109
2111
 
2110
2112
  // 如果订单已经同步过,此时点击左上角返回,需要通知购物车进入编辑态
@@ -2167,10 +2169,10 @@ var PaymentModal = function PaymentModal(_ref19) {
2167
2169
  size: "small",
2168
2170
  type: "text",
2169
2171
  onClick: function onClick() {
2170
- var _checkout$getCurrentO;
2172
+ var _checkout$getCurrentO2;
2171
2173
  var checkout = pisellos.getModule('checkout');
2172
2174
  // 如果订单是 unpaid(弃单) ,则不进入编辑状态,直接关闭弹窗
2173
- if (checkout.isCurrentOrderSynced() && ((_checkout$getCurrentO = checkout.getCurrentOrderInfo()) === null || _checkout$getCurrentO === void 0 ? void 0 : _checkout$getCurrentO.paymentStatus) !== 'unpaid') {
2175
+ if (checkout.isCurrentOrderSynced() && ((_checkout$getCurrentO2 = checkout.getCurrentOrderInfo()) === null || _checkout$getCurrentO2 === void 0 ? void 0 : _checkout$getCurrentO2.paymentStatus) !== 'unpaid') {
2174
2176
  handleSetEditCartMode(true);
2175
2177
  } else {
2176
2178
  handlePaymentCancel(false, true);
@@ -1477,7 +1477,7 @@ var PaymentModal = ({
1477
1477
  });
1478
1478
  };
1479
1479
  const handlePaymentCancel = (reset, notCancelOrder) => {
1480
- var _a2, _b2;
1480
+ var _a2, _b2, _c2;
1481
1481
  const isSyncingLocked = ((_b2 = (_a2 = paymentContentRef.current) == null ? void 0 : _a2.getSyncingLock) == null ? void 0 : _b2.call(_a2)) || false;
1482
1482
  console.log("Payment cancelled, syncingLock:", isSyncingLocked);
1483
1483
  if (isSyncingLocked) {
@@ -1494,7 +1494,9 @@ var PaymentModal = ({
1494
1494
  callback == null ? void 0 : callback({ status: "cancelled" });
1495
1495
  const checkout = pisellos.getModule("checkout");
1496
1496
  checkout.cancelCurrentOrderAsync();
1497
- onClose == null ? void 0 : onClose(reset || false);
1497
+ onClose == null ? void 0 : onClose(reset || false, {
1498
+ order_id: (_c2 = checkout == null ? void 0 : checkout.getCurrentOrderId) == null ? void 0 : _c2.call(checkout)
1499
+ });
1498
1500
  };
1499
1501
  const handleSetEditCartMode = async (closeModal = false) => {
1500
1502
  const checkout = pisellos.getModule("checkout");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.11.145",
3
+ "version": "6.11.146",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -67,10 +67,10 @@
67
67
  "react-infinite-scroll-component": "^6.1.0",
68
68
  "react-resizable": "^3.0.5",
69
69
  "styled-components": "^6.0.0-rc.3",
70
- "@pisell/date-picker": "3.0.8",
71
- "@pisell/icon": "0.0.11",
72
70
  "@pisell/utils": "3.0.2",
73
- "@pisell/materials": "6.11.46"
71
+ "@pisell/icon": "0.0.11",
72
+ "@pisell/materials": "6.11.46",
73
+ "@pisell/date-picker": "3.0.8"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "react": "^18.0.0",
@@ -1,42 +0,0 @@
1
- /// <reference types="react" />
2
- import './dialog.less';
3
- import { ProductDisplayPresetKey } from './components/ProductDisplayAdapter/types';
4
- /**
5
- * 新建模式配置,与 order_id 互斥。
6
- * 外部预选好部分数据后通过此配置直接唤起卖票弹窗的新建流程。
7
- */
8
- interface CreateModeConfig {
9
- /** 预填充的 modalState 片段(客户、商品、日期等任意字段) */
10
- initialModalState?: Record<string, any>;
11
- /** 必传,决定商品类型和子类型 */
12
- bookingConfigParams: Record<string, any>;
13
- /** 商品展示配置,默认 'sku-list-a2' */
14
- productDisplayConfig?: ProductDisplayPresetKey;
15
- /** 业务编码 */
16
- businessCode?: string;
17
- /** 餐牌 ID 列表,存在且非空时覆盖 getProducts 的 menu_list_ids */
18
- associated_menu_list_ids?: number[];
19
- /**
20
- * 入口订单类型意图;存在时 `formatValues` 最终将 `values.type` 设为该值(如桌位单 `table-order`)。
21
- */
22
- order_type?: string;
23
- }
24
- interface TicketBookingDialogProps {
25
- open: boolean;
26
- order_id?: number;
27
- onClose?: () => void;
28
- callback?: (result: any) => void;
29
- rulesHooks: any;
30
- /** 新建模式配置,与 order_id 互斥 */
31
- createModeConfig?: CreateModeConfig;
32
- }
33
- /**
34
- * TicketBooking dialog wrapper,支持编辑模式和新建模式。
35
- *
36
- * - 编辑模式:传入 order_id,拉取详情后渲染 TicketBooking。
37
- * - 新建模式:传入 createModeConfig(含预填充 modalState),跳过 API 直接渲染。
38
- *
39
- * 两种模式互斥,优先判断 order_id。
40
- */
41
- declare function TicketBookingDialog(props: TicketBookingDialogProps): JSX.Element;
42
- export default TicketBookingDialog;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { type FloorMapMergedItem, type FloorMapDataSources } from '@pisell/materials';
3
- import type { PisellReservationTableRow } from '../types';
4
- import './ReservationCards.less';
5
- export declare function findReservationRow(item: FloorMapMergedItem, dataSources: FloorMapDataSources): PisellReservationTableRow | undefined;
6
- export declare function renderReservationTableCard(item: FloorMapMergedItem, dataSources: FloorMapDataSources): React.ReactNode;
7
- export declare function renderReservationPartyCard(item: FloorMapMergedItem, dataSources: FloorMapDataSources): React.ReactNode;
8
- export declare function renderReservationBarCard(item: FloorMapMergedItem, dataSources: FloorMapDataSources): React.ReactNode;
9
- export declare function getReservationRenderItemByKind(dataSources: FloorMapDataSources): {
10
- [x: number]: (item: FloorMapItemBase, _index: number, _options?: any) => any;
11
- reservationBoundTable: (item: FloorMapItemBase, _index: number, _options?: any) => React.ReactNode;
12
- reservationBoundRoundTable: (item: FloorMapItemBase, _index: number, _options?: any) => React.ReactNode;
13
- reservationTable: (item: FloorMapItemBase, _index: number, _options?: any) => React.ReactNode;
14
- reservationPartyBench: (item: FloorMapItemBase, _index: number, _options?: any) => React.ReactNode;
15
- reservationBarSeat: (item: FloorMapItemBase, _index: number, _options?: any) => React.ReactNode;
16
- };
@@ -1,78 +0,0 @@
1
- import { type FloorMapElementKindCategory, type FloorMapElementKindConfig, type FloorMapSceneElement, type FloorMapViewConfig } from '@pisell/materials';
2
- import type { PisellReservationTableRow } from '../types';
3
- /**
4
- * 父级/接口 elementKinds 与预约默认合并:
5
- * - 去掉与 Story 图片图元重复的旧版种类;
6
- * - 远程若已有 `floorMapImage` 也先去掉,统一用 defaults 里那份(避免两套「图片底图」并存)。
7
- * - 对**同一 value**:用 `{ ...default, ...remote }` 合并,避免远程 JSON 只存了精简字段时
8
- * 把预约默认里的 `nameAsTitleConfigurable` 等能力位整段丢掉(否则编辑面板不显示「图元名作为标题」勾选)。
9
- */
10
- export declare function mergeFloorMapElementKindsWithDefaults(defaults: FloorMapElementKindConfig[], remote: FloorMapElementKindConfig[] | undefined): FloorMapElementKindConfig[];
11
- /** 同上,补全图元分类(如「底图」),避免调色板分组缺失 */
12
- export declare function mergeFloorMapElementKindCategoriesWithDefaults(defaults: FloorMapElementKindCategory[], remote: FloorMapElementKindCategory[] | undefined): FloorMapElementKindCategory[];
13
- /**
14
- * 按当前 {@link locales} 刷新调色板分组、图元展示名(底图 / 资源绑定等)。
15
- * 持久化里若仍使用约定 `categoryId`:`background`、`dining` 与约定 kind value,会覆盖旧快照文案以便随引擎语言切换。
16
- */
17
- export declare function applyReservationFloorMapLiveLabels(config: FloorMapViewConfig): FloorMapViewConfig;
18
- /**
19
- * 预约平面图「绑定桌位」唯一图元 value(与底图 `floorMapImage` 并存)。
20
- * 旧版方桌 / 长条 / 吧台图元仍可从接口 scene 回显,渲染走同一套房间卡片。
21
- */
22
- export declare const RESERVATION_BOUND_TABLE_ELEMENT_KIND: "reservationBoundTable";
23
- /** 绑定圆桌位:与方桌同一数据源与卡片逻辑,默认 `shape: circle` */
24
- export declare const RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND: "reservationBoundRoundTable";
25
- /** 与设计稿一致的预约桌位 mock(表格 + 平面图同源) */
26
- export declare const defaultReservationTableRows: PisellReservationTableRow[];
27
- /**
28
- * 默认平面图图元(唯一真相源)。
29
- * 有 floorMapConfig 时 PisellFloorMapLayout 强制 itemUnit=pixel,故 x/y/width/height 均为「像素」,非格子数。
30
- */
31
- export declare const defaultReservationSceneElements: FloorMapSceneElement[];
32
- /** 由 sceneElements 派生的落位摘要(数值与 sceneElements 一致,均为像素;兼容旧引用) */
33
- export declare const reservationDataSourcePlacements: {
34
- dataSourceKey: string;
35
- id: string;
36
- floorMapId: string;
37
- x: number;
38
- y: number;
39
- name: string;
40
- width: number;
41
- height: number;
42
- elementKind: string;
43
- shape?: "circle" | undefined;
44
- }[];
45
- /**
46
- * 将落位表转为 sceneElements(外部自定义 placements 时用)。
47
- * 与 RecordBoard 平面图一致时,x/y/width/height 应为像素(floorMap 视图下 itemUnit 为 pixel)。
48
- */
49
- export declare function reservationPlacementsToSceneElements(placements: Array<{
50
- dataSourceKey: string;
51
- id: string;
52
- floorMapId: string;
53
- x: number;
54
- y: number;
55
- name: string;
56
- width: number;
57
- height: number;
58
- elementKind: string;
59
- shape?: 'circle';
60
- }>): FloorMapSceneElement[];
61
- export declare type ReservationFloorMapConfigPersisted = FloorMapViewConfig;
62
- /**
63
- * 预约页默认平面图壳子:画布/图元种类与 mock 一致,但不带演示 sceneElements。
64
- * 生产态布局以 floor-plan 接口与编辑保存为准。
65
- */
66
- export declare function getReservationFloorMapShellConfig(): ReservationFloorMapConfigPersisted;
67
- /** 平面图初始配置:sceneElements 使用上方完整 width/height,勿仅依赖派生表 */
68
- export declare function getDefaultReservationFloorMapConfig(): ReservationFloorMapConfigPersisted;
69
- /** 平面图侧栏数据源记录表单列(随当前语言刷新) */
70
- export declare function getReservationDataSourceFormColumns(): ({
71
- key: string;
72
- label: any;
73
- type: "string";
74
- } | {
75
- key: string;
76
- label: any;
77
- type: "number";
78
- })[];
@@ -1,46 +0,0 @@
1
- /**
2
- * 合并 RecordBoard.floorMap 与预约默认:持久化 onSave、画布 Tab 尾区、缩放/平移等
3
- */
4
- import React from 'react';
5
- import type { FloorMapDataSources, FloorMapMergedItem, FloorMapViewConfig, FloorMapViewportOverlayRenderArgs, PisellFloorMapLayoutRef, RecordBoardProps } from '@pisell/materials';
6
- import { getReservationRenderItemByKind } from './reservationCards';
7
- export interface UseReservationFloorMapMergedParams {
8
- floorMapProp: RecordBoardProps['floorMap'];
9
- baseFloorConfig: FloorMapViewConfig;
10
- dataSources: FloorMapDataSources;
11
- renderItemByKind: ReturnType<typeof getReservationRenderItemByKind>;
12
- gridDataSourceKey: string;
13
- effectiveMapMode: 'read' | 'edit';
14
- resolvedFloorPlanId: number | null;
15
- floorPlanRemoteId: number | null;
16
- effectiveFloorPlanCode: string;
17
- floorPlanCanvasWidth?: number;
18
- floorPlanCanvasHeight?: number;
19
- floorPlanName?: Record<string, string>;
20
- floorPlanSort?: number;
21
- floorPlanStatus?: number;
22
- onFloorPlanPersisted?: () => void;
23
- putFloorPlan?: (id: number, body: Record<string, unknown>) => Promise<unknown>;
24
- isFloorModeControlled: boolean;
25
- mapEditInternal: boolean;
26
- setMapEditInternal: React.Dispatch<React.SetStateAction<boolean>>;
27
- floorMapLayoutRef: React.RefObject<PisellFloorMapLayoutRef | null>;
28
- reservationFloorMapViewportOverlay: (args: FloorMapViewportOverlayRenderArgs) => React.ReactNode;
29
- setRemoteFloorPlanView: React.Dispatch<React.SetStateAction<Partial<FloorMapViewConfig> | null>>;
30
- /**
31
- * 平面图图元点击时先于 `floorMap.onItemClick` 调用;用于只读态打开宿主抽屉等。
32
- * `dataSources` 与合并后的 `floorMap.dataSources` 一致。
33
- */
34
- floorMapItemClickBefore?: (args: {
35
- item: FloorMapMergedItem;
36
- index: number;
37
- event: React.MouseEvent<HTMLElement>;
38
- mode: 'read' | 'edit';
39
- dataSources: FloorMapDataSources;
40
- }) => void;
41
- /** 与引擎语言同步,避免 dataSourceLabels 等停留在首次渲染语言 */
42
- engineLocale: string;
43
- /** 场控等:HUD 表抽屉开启时视口叠加层锚左下、Dock 默认右下(可由 floorMap 显式覆盖) */
44
- floorMapHudTableDrawer?: boolean;
45
- }
46
- export declare function useReservationFloorMapMerged(params: UseReservationFloorMapMergedParams): any;
@@ -1,42 +0,0 @@
1
- /// <reference types="react" />
2
- import './dialog.less';
3
- import { ProductDisplayPresetKey } from './components/ProductDisplayAdapter/types';
4
- /**
5
- * 新建模式配置,与 order_id 互斥。
6
- * 外部预选好部分数据后通过此配置直接唤起卖票弹窗的新建流程。
7
- */
8
- interface CreateModeConfig {
9
- /** 预填充的 modalState 片段(客户、商品、日期等任意字段) */
10
- initialModalState?: Record<string, any>;
11
- /** 必传,决定商品类型和子类型 */
12
- bookingConfigParams: Record<string, any>;
13
- /** 商品展示配置,默认 'sku-list-a2' */
14
- productDisplayConfig?: ProductDisplayPresetKey;
15
- /** 业务编码 */
16
- businessCode?: string;
17
- /** 餐牌 ID 列表,存在且非空时覆盖 getProducts 的 menu_list_ids */
18
- associated_menu_list_ids?: number[];
19
- /**
20
- * 入口订单类型意图;存在时 `formatValues` 最终将 `values.type` 设为该值(如桌位单 `table-order`)。
21
- */
22
- order_type?: string;
23
- }
24
- interface TicketBookingDialogProps {
25
- open: boolean;
26
- order_id?: number;
27
- onClose?: () => void;
28
- callback?: (result: any) => void;
29
- rulesHooks: any;
30
- /** 新建模式配置,与 order_id 互斥 */
31
- createModeConfig?: CreateModeConfig;
32
- }
33
- /**
34
- * TicketBooking dialog wrapper,支持编辑模式和新建模式。
35
- *
36
- * - 编辑模式:传入 order_id,拉取详情后渲染 TicketBooking。
37
- * - 新建模式:传入 createModeConfig(含预填充 modalState),跳过 API 直接渲染。
38
- *
39
- * 两种模式互斥,优先判断 order_id。
40
- */
41
- declare function TicketBookingDialog(props: TicketBookingDialogProps): JSX.Element;
42
- export default TicketBookingDialog;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { type FloorMapMergedItem, type FloorMapDataSources } from '@pisell/materials';
3
- import type { PisellReservationTableRow } from '../types';
4
- import './ReservationCards.less';
5
- export declare function findReservationRow(item: FloorMapMergedItem, dataSources: FloorMapDataSources): PisellReservationTableRow | undefined;
6
- export declare function renderReservationTableCard(item: FloorMapMergedItem, dataSources: FloorMapDataSources): React.ReactNode;
7
- export declare function renderReservationPartyCard(item: FloorMapMergedItem, dataSources: FloorMapDataSources): React.ReactNode;
8
- export declare function renderReservationBarCard(item: FloorMapMergedItem, dataSources: FloorMapDataSources): React.ReactNode;
9
- export declare function getReservationRenderItemByKind(dataSources: FloorMapDataSources): {
10
- [x: number]: (item: FloorMapItemBase, _index: number, _options?: any) => any;
11
- reservationBoundTable: (item: FloorMapItemBase, _index: number, _options?: any) => React.ReactNode;
12
- reservationBoundRoundTable: (item: FloorMapItemBase, _index: number, _options?: any) => React.ReactNode;
13
- reservationTable: (item: FloorMapItemBase, _index: number, _options?: any) => React.ReactNode;
14
- reservationPartyBench: (item: FloorMapItemBase, _index: number, _options?: any) => React.ReactNode;
15
- reservationBarSeat: (item: FloorMapItemBase, _index: number, _options?: any) => React.ReactNode;
16
- };
@@ -1,78 +0,0 @@
1
- import { type FloorMapElementKindCategory, type FloorMapElementKindConfig, type FloorMapSceneElement, type FloorMapViewConfig } from '@pisell/materials';
2
- import type { PisellReservationTableRow } from '../types';
3
- /**
4
- * 父级/接口 elementKinds 与预约默认合并:
5
- * - 去掉与 Story 图片图元重复的旧版种类;
6
- * - 远程若已有 `floorMapImage` 也先去掉,统一用 defaults 里那份(避免两套「图片底图」并存)。
7
- * - 对**同一 value**:用 `{ ...default, ...remote }` 合并,避免远程 JSON 只存了精简字段时
8
- * 把预约默认里的 `nameAsTitleConfigurable` 等能力位整段丢掉(否则编辑面板不显示「图元名作为标题」勾选)。
9
- */
10
- export declare function mergeFloorMapElementKindsWithDefaults(defaults: FloorMapElementKindConfig[], remote: FloorMapElementKindConfig[] | undefined): FloorMapElementKindConfig[];
11
- /** 同上,补全图元分类(如「底图」),避免调色板分组缺失 */
12
- export declare function mergeFloorMapElementKindCategoriesWithDefaults(defaults: FloorMapElementKindCategory[], remote: FloorMapElementKindCategory[] | undefined): FloorMapElementKindCategory[];
13
- /**
14
- * 按当前 {@link locales} 刷新调色板分组、图元展示名(底图 / 资源绑定等)。
15
- * 持久化里若仍使用约定 `categoryId`:`background`、`dining` 与约定 kind value,会覆盖旧快照文案以便随引擎语言切换。
16
- */
17
- export declare function applyReservationFloorMapLiveLabels(config: FloorMapViewConfig): FloorMapViewConfig;
18
- /**
19
- * 预约平面图「绑定桌位」唯一图元 value(与底图 `floorMapImage` 并存)。
20
- * 旧版方桌 / 长条 / 吧台图元仍可从接口 scene 回显,渲染走同一套房间卡片。
21
- */
22
- export declare const RESERVATION_BOUND_TABLE_ELEMENT_KIND: "reservationBoundTable";
23
- /** 绑定圆桌位:与方桌同一数据源与卡片逻辑,默认 `shape: circle` */
24
- export declare const RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND: "reservationBoundRoundTable";
25
- /** 与设计稿一致的预约桌位 mock(表格 + 平面图同源) */
26
- export declare const defaultReservationTableRows: PisellReservationTableRow[];
27
- /**
28
- * 默认平面图图元(唯一真相源)。
29
- * 有 floorMapConfig 时 PisellFloorMapLayout 强制 itemUnit=pixel,故 x/y/width/height 均为「像素」,非格子数。
30
- */
31
- export declare const defaultReservationSceneElements: FloorMapSceneElement[];
32
- /** 由 sceneElements 派生的落位摘要(数值与 sceneElements 一致,均为像素;兼容旧引用) */
33
- export declare const reservationDataSourcePlacements: {
34
- dataSourceKey: string;
35
- id: string;
36
- floorMapId: string;
37
- x: number;
38
- y: number;
39
- name: string;
40
- width: number;
41
- height: number;
42
- elementKind: string;
43
- shape?: "circle" | undefined;
44
- }[];
45
- /**
46
- * 将落位表转为 sceneElements(外部自定义 placements 时用)。
47
- * 与 RecordBoard 平面图一致时,x/y/width/height 应为像素(floorMap 视图下 itemUnit 为 pixel)。
48
- */
49
- export declare function reservationPlacementsToSceneElements(placements: Array<{
50
- dataSourceKey: string;
51
- id: string;
52
- floorMapId: string;
53
- x: number;
54
- y: number;
55
- name: string;
56
- width: number;
57
- height: number;
58
- elementKind: string;
59
- shape?: 'circle';
60
- }>): FloorMapSceneElement[];
61
- export declare type ReservationFloorMapConfigPersisted = FloorMapViewConfig;
62
- /**
63
- * 预约页默认平面图壳子:画布/图元种类与 mock 一致,但不带演示 sceneElements。
64
- * 生产态布局以 floor-plan 接口与编辑保存为准。
65
- */
66
- export declare function getReservationFloorMapShellConfig(): ReservationFloorMapConfigPersisted;
67
- /** 平面图初始配置:sceneElements 使用上方完整 width/height,勿仅依赖派生表 */
68
- export declare function getDefaultReservationFloorMapConfig(): ReservationFloorMapConfigPersisted;
69
- /** 平面图侧栏数据源记录表单列(随当前语言刷新) */
70
- export declare function getReservationDataSourceFormColumns(): ({
71
- key: string;
72
- label: any;
73
- type: "string";
74
- } | {
75
- key: string;
76
- label: any;
77
- type: "number";
78
- })[];
@@ -1,46 +0,0 @@
1
- /**
2
- * 合并 RecordBoard.floorMap 与预约默认:持久化 onSave、画布 Tab 尾区、缩放/平移等
3
- */
4
- import React from 'react';
5
- import type { FloorMapDataSources, FloorMapMergedItem, FloorMapViewConfig, FloorMapViewportOverlayRenderArgs, PisellFloorMapLayoutRef, RecordBoardProps } from '@pisell/materials';
6
- import { getReservationRenderItemByKind } from './reservationCards';
7
- export interface UseReservationFloorMapMergedParams {
8
- floorMapProp: RecordBoardProps['floorMap'];
9
- baseFloorConfig: FloorMapViewConfig;
10
- dataSources: FloorMapDataSources;
11
- renderItemByKind: ReturnType<typeof getReservationRenderItemByKind>;
12
- gridDataSourceKey: string;
13
- effectiveMapMode: 'read' | 'edit';
14
- resolvedFloorPlanId: number | null;
15
- floorPlanRemoteId: number | null;
16
- effectiveFloorPlanCode: string;
17
- floorPlanCanvasWidth?: number;
18
- floorPlanCanvasHeight?: number;
19
- floorPlanName?: Record<string, string>;
20
- floorPlanSort?: number;
21
- floorPlanStatus?: number;
22
- onFloorPlanPersisted?: () => void;
23
- putFloorPlan?: (id: number, body: Record<string, unknown>) => Promise<unknown>;
24
- isFloorModeControlled: boolean;
25
- mapEditInternal: boolean;
26
- setMapEditInternal: React.Dispatch<React.SetStateAction<boolean>>;
27
- floorMapLayoutRef: React.RefObject<PisellFloorMapLayoutRef | null>;
28
- reservationFloorMapViewportOverlay: (args: FloorMapViewportOverlayRenderArgs) => React.ReactNode;
29
- setRemoteFloorPlanView: React.Dispatch<React.SetStateAction<Partial<FloorMapViewConfig> | null>>;
30
- /**
31
- * 平面图图元点击时先于 `floorMap.onItemClick` 调用;用于只读态打开宿主抽屉等。
32
- * `dataSources` 与合并后的 `floorMap.dataSources` 一致。
33
- */
34
- floorMapItemClickBefore?: (args: {
35
- item: FloorMapMergedItem;
36
- index: number;
37
- event: React.MouseEvent<HTMLElement>;
38
- mode: 'read' | 'edit';
39
- dataSources: FloorMapDataSources;
40
- }) => void;
41
- /** 与引擎语言同步,避免 dataSourceLabels 等停留在首次渲染语言 */
42
- engineLocale: string;
43
- /** 场控等:HUD 表抽屉开启时视口叠加层锚左下、Dock 默认右下(可由 floorMap 显式覆盖) */
44
- floorMapHudTableDrawer?: boolean;
45
- }
46
- export declare function useReservationFloorMapMerged(params: UseReservationFloorMapMergedParams): any;