@pisell/materials 6.12.17 → 6.12.18
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/package.json +3 -3
- package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +0 -8
- package/es/components/PisellTabbar/index.d.ts +0 -10
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +0 -16
- package/es/components/PisellTabbar/template/Template1/index.d.ts +0 -7
- package/es/components/PisellTabbar/types.d.ts +0 -123
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +0 -48
- package/es/components/pisellFind/index.d.ts +0 -69
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -94
- package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/es/components/pisellLookup/types.d.ts +0 -797
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
- package/es/components/pisellRecordBoard/index.d.ts +0 -55
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +0 -9
- package/es/components/productCard/cartSkuCard/components/Gift/index.d.ts +0 -5
- package/es/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +0 -15
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/es/components/productCard/cartSkuCard/index.d.ts +0 -16
- package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +0 -3
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +0 -23
- package/es/components/productCard/lineItem/index.d.ts +0 -72
- package/es/components/productCard/types.d.ts +0 -98
- package/es/components/table/hooks/useTableSetting.d.ts +0 -21
- package/es/hooks/useInitLocalesOnce.d.ts +0 -4
- package/es/hooks/useTranslationOriginal.d.ts +0 -4
- package/es/index.d.ts +0 -271
- package/es/locales/ja.d.ts +0 -534
- package/es/locales/pt.d.ts +0 -534
- package/es/locales/zh-CN.d.ts +0 -561
- package/es/locales/zh-TW.d.ts +0 -561
- package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +0 -8
- package/lib/components/PisellTabbar/index.d.ts +0 -10
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +0 -16
- package/lib/components/PisellTabbar/template/Template1/index.d.ts +0 -7
- package/lib/components/PisellTabbar/types.d.ts +0 -123
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +0 -48
- package/lib/components/pisellFind/index.d.ts +0 -69
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -94
- package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/lib/components/pisellLookup/types.d.ts +0 -797
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
- package/lib/components/pisellRecordBoard/index.d.ts +0 -55
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +0 -9
- package/lib/components/productCard/cartSkuCard/components/Gift/index.d.ts +0 -5
- package/lib/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +0 -15
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/lib/components/productCard/cartSkuCard/index.d.ts +0 -16
- package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +0 -3
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +0 -23
- package/lib/components/productCard/lineItem/index.d.ts +0 -72
- package/lib/components/productCard/types.d.ts +0 -98
- package/lib/components/table/hooks/useTableSetting.d.ts +0 -21
- package/lib/hooks/useInitLocalesOnce.d.ts +0 -4
- package/lib/hooks/useTranslationOriginal.d.ts +0 -4
- package/lib/index.d.ts +0 -271
- package/lib/locales/ja.d.ts +0 -534
- package/lib/locales/pt.d.ts +0 -534
- package/lib/locales/zh-CN.d.ts +0 -561
- package/lib/locales/zh-TW.d.ts +0 -561
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.18",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"swiper": "^8.4.7",
|
|
96
96
|
"antd-mobile": "^5.38.1",
|
|
97
97
|
"vod-js-sdk-v6": "^1.4.11",
|
|
98
|
-
"@pisell/
|
|
98
|
+
"@pisell/icon": "0.0.11",
|
|
99
99
|
"@pisell/utils": "3.0.4",
|
|
100
|
-
"@pisell/
|
|
100
|
+
"@pisell/date-picker": "3.0.10"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"react": "^18.0.0",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './PisellSuperTabs.less';
|
|
3
|
-
import type { PisellSuperTabsProps } from './types';
|
|
4
|
-
interface PisellSuperTabsRef {
|
|
5
|
-
scrollItemByRowKey: (key: string) => void;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: React.ForwardRefExoticComponent<PisellSuperTabsProps<unknown> & React.RefAttributes<PisellSuperTabsRef>>;
|
|
8
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PisellTabbar 组件导出文件
|
|
3
|
-
* @module PisellTabbar
|
|
4
|
-
*/
|
|
5
|
-
import PisellTabbar from './PisellTabbar';
|
|
6
|
-
import PisellTabbarTemplate1 from './template/Template1';
|
|
7
|
-
export type { LevelType, PisellTabbarProps, TabbarActionItem, TabbarDataSource, } from './types';
|
|
8
|
-
export type { PisellTabbarTemplate1Direction, PisellTabbarTemplate1Props, } from './template/Template1';
|
|
9
|
-
export { PisellTabbarTemplate1 };
|
|
10
|
-
export default PisellTabbar;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import '../../PisellTabbar.less';
|
|
3
|
-
import { PisellTabbarProps } from '../../types';
|
|
4
|
-
export declare type PisellTabbarTemplate1Direction = 'horizontal' | 'vertical';
|
|
5
|
-
export interface PisellTabbarTemplate1Props extends PisellTabbarProps {
|
|
6
|
-
/** Tab 排列方向;默认保持现有横向布局。 */
|
|
7
|
-
direction?: PisellTabbarTemplate1Direction;
|
|
8
|
-
/** 是否在每个层级展示自动生成的 All 分类;默认保持展示。 */
|
|
9
|
-
showAllItem?: boolean;
|
|
10
|
-
/** 是否展示一级分类中自动生成的搜索入口;默认保持展示。 */
|
|
11
|
-
showSearchItem?: boolean;
|
|
12
|
-
/** 外部切换选中项时,是否自动把一级分类滚动到可视区域。 */
|
|
13
|
-
scrollActiveItemIntoView?: boolean;
|
|
14
|
-
}
|
|
15
|
-
declare const _default: React.ForwardRefExoticComponent<PisellTabbarTemplate1Props & React.RefAttributes<unknown>>;
|
|
16
|
-
export default _default;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* 一级 Tabbar 操作项。
|
|
4
|
-
*
|
|
5
|
-
* 操作项复用一级卡片样式,但点击时不进入分类选中态。
|
|
6
|
-
*/
|
|
7
|
-
export interface TabbarActionItem {
|
|
8
|
-
/** 唯一标识 */
|
|
9
|
-
key: string | number;
|
|
10
|
-
/** 卡片图标 */
|
|
11
|
-
icon: ReactNode;
|
|
12
|
-
/** 可选的卡片文案;未传时只显示图标 */
|
|
13
|
-
label?: ReactNode;
|
|
14
|
-
/** 无障碍名称 */
|
|
15
|
-
ariaLabel: string;
|
|
16
|
-
/** 点击回调 */
|
|
17
|
-
onClick: () => void;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Tabbar 数据源项类型
|
|
21
|
-
*/
|
|
22
|
-
export interface TabbarDataSource {
|
|
23
|
-
/** 唯一标识 */
|
|
24
|
-
id: string | number;
|
|
25
|
-
/** 店铺ID */
|
|
26
|
-
shop_id?: number;
|
|
27
|
-
/** 父级ID */
|
|
28
|
-
parent_id?: number;
|
|
29
|
-
/** 显示名称 */
|
|
30
|
-
name: string;
|
|
31
|
-
/** URL slug */
|
|
32
|
-
slug?: string;
|
|
33
|
-
/** 图标 URL 或图标名称 */
|
|
34
|
-
icon?: string;
|
|
35
|
-
/** 子级数据 */
|
|
36
|
-
children?: TabbarDataSource[];
|
|
37
|
-
/** 自定义点击事件标识 */
|
|
38
|
-
customClick?: boolean;
|
|
39
|
-
/** 唯一 key */
|
|
40
|
-
key?: string;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 层级配置
|
|
44
|
-
*/
|
|
45
|
-
export interface TabbarLevelConfig {
|
|
46
|
-
/** SuperTabs 背景色 */
|
|
47
|
-
superTabsBg: string;
|
|
48
|
-
/** 卡片宽度 */
|
|
49
|
-
cardWidth: number;
|
|
50
|
-
/** 卡片高度 */
|
|
51
|
-
cardHeight: number;
|
|
52
|
-
/** 卡片背景色;未传时使用模板默认白色 */
|
|
53
|
-
cardBackground?: string;
|
|
54
|
-
/** 卡片选中背景色;未传时使用模板默认紫色 */
|
|
55
|
-
activeBackground?: string;
|
|
56
|
-
/** 左侧缩进 */
|
|
57
|
-
paddingLeft?: number;
|
|
58
|
-
/** 卡片圆角;未传时使用模板默认值 */
|
|
59
|
-
borderRadius?: number | string;
|
|
60
|
-
/** 卡片文字对齐方式;未传时居中 */
|
|
61
|
-
textAlign?: 'left' | 'center' | 'right';
|
|
62
|
-
/** 是否展示分类数据中的 icon */
|
|
63
|
-
showIcon?: boolean;
|
|
64
|
-
/** 分类图标尺寸 */
|
|
65
|
-
iconSize?: number;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* 展开配置
|
|
69
|
-
*/
|
|
70
|
-
export interface ExpandConfig {
|
|
71
|
-
/** 激活状态配置 */
|
|
72
|
-
active: {
|
|
73
|
-
icon: string;
|
|
74
|
-
text: string;
|
|
75
|
-
};
|
|
76
|
-
/** 未激活状态配置 */
|
|
77
|
-
inactive: {
|
|
78
|
-
icon: string;
|
|
79
|
-
text: string;
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* 展开状态
|
|
84
|
-
*/
|
|
85
|
-
export interface ExpandState {
|
|
86
|
-
level1: boolean;
|
|
87
|
-
level2: boolean;
|
|
88
|
-
level3: boolean;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* 层级类型
|
|
92
|
-
*/
|
|
93
|
-
export declare type LevelType = 'level1' | 'level2' | 'level3';
|
|
94
|
-
/**
|
|
95
|
-
* PisellTabbar 组件属性
|
|
96
|
-
*/
|
|
97
|
-
export interface PisellTabbarProps {
|
|
98
|
-
/** 数据源 */
|
|
99
|
-
dataSource?: TabbarDataSource[];
|
|
100
|
-
/** 当前选中的值(多层级 key 数组) */
|
|
101
|
-
value?: (string | number)[];
|
|
102
|
-
/** 值变化回调 */
|
|
103
|
-
onChange?: (value: (string | number)[]) => void;
|
|
104
|
-
/** 自定义类名 */
|
|
105
|
-
className?: string;
|
|
106
|
-
/** 自定义样式 */
|
|
107
|
-
style?: CSSProperties;
|
|
108
|
-
/** 层级配置(可按层级自定义) */
|
|
109
|
-
levelConfig?: Partial<Record<LevelType, Partial<TabbarLevelConfig>>>;
|
|
110
|
-
/** 展开配置 */
|
|
111
|
-
expandConfig?: ExpandConfig;
|
|
112
|
-
/** 最大层级数 */
|
|
113
|
-
maxLevel?: 1 | 2 | 3;
|
|
114
|
-
onSearch?: (value: string) => void;
|
|
115
|
-
/** 透传给内部 PisellFind 的搜索配置(如 inputRender 插槽)。 */
|
|
116
|
-
searchProps?: Record<string, any>;
|
|
117
|
-
/** 追加在一级分类末尾、且不参与分类选中态的操作卡片。 */
|
|
118
|
-
level1Actions?: TabbarActionItem[];
|
|
119
|
-
__designMode?: boolean;
|
|
120
|
-
}
|
|
121
|
-
export interface PisellTabbarRef {
|
|
122
|
-
closeSearchMode: () => void;
|
|
123
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Field } from '../../provider/dataSource/DataSourceContext';
|
|
2
|
-
export declare type ListResult = {
|
|
3
|
-
data: any[];
|
|
4
|
-
count: number;
|
|
5
|
-
page: number;
|
|
6
|
-
pageSize: number;
|
|
7
|
-
};
|
|
8
|
-
export declare type UseFormatParams = {
|
|
9
|
-
dataSourceKey: string;
|
|
10
|
-
fields: Field[];
|
|
11
|
-
};
|
|
12
|
-
export declare type ApiListResult = {
|
|
13
|
-
list: any[];
|
|
14
|
-
count: number;
|
|
15
|
-
size: number;
|
|
16
|
-
} & ({
|
|
17
|
-
page: number;
|
|
18
|
-
} | {
|
|
19
|
-
skip: number;
|
|
20
|
-
});
|
|
21
|
-
export declare type FormatListResultParams = ApiListResult | {
|
|
22
|
-
data: any[];
|
|
23
|
-
meta: {
|
|
24
|
-
count: number;
|
|
25
|
-
page: number;
|
|
26
|
-
pageSize: number;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export declare type FilterValue = {
|
|
30
|
-
[key: string]: any;
|
|
31
|
-
};
|
|
32
|
-
export declare type FilterOperator = '$includes' | '$dateAfter' | '$dateBefore' | '$eq' | '$in' | '$isTruly' | '$and';
|
|
33
|
-
export declare type SimpleFilterValue = {
|
|
34
|
-
[key in Exclude<FilterOperator, '$and'>]?: any;
|
|
35
|
-
};
|
|
36
|
-
export declare type AndFilterValue = {
|
|
37
|
-
$and: FilterCondition[];
|
|
38
|
-
};
|
|
39
|
-
export declare type FilterConditionValue = SimpleFilterValue | AndFilterValue;
|
|
40
|
-
export declare type FilterCondition = {
|
|
41
|
-
[key: string]: FilterConditionValue;
|
|
42
|
-
} | AndFilterValue;
|
|
43
|
-
declare const useFormat: ({ dataSourceKey, fields }: UseFormatParams) => {
|
|
44
|
-
formatListResult: (this: unknown, res: FormatListResultParams) => ListResult;
|
|
45
|
-
formatListParams: (this: unknown, params: any) => any;
|
|
46
|
-
formatCreateUpdateParams: (this: unknown, params: any) => any;
|
|
47
|
-
};
|
|
48
|
-
export default useFormat;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PisellLookupProps, PisellLookupRef } from '../pisellLookup';
|
|
3
|
-
/**
|
|
4
|
-
* 原生扫码事件名,对齐宿主端约定。
|
|
5
|
-
*/
|
|
6
|
-
export declare const SCAN_RESULT_EVENT = "nativeScanResult";
|
|
7
|
-
/** 无扫码焦点栈时,供页面级全局扫码监听避让 Find 的回退计数。 */
|
|
8
|
-
export declare const FIND_FALLBACK_SCANNER_COUNT_KEY = "__pisellFindFallbackScannerCount";
|
|
9
|
-
/**
|
|
10
|
-
* 扫码枪回传数据(对齐宿主 ScanResultPayload)
|
|
11
|
-
* - code: 条码标识(如条码格式 / 业务字段)
|
|
12
|
-
* - data: 扫描得到的字符串值(写入输入框的内容)
|
|
13
|
-
*/
|
|
14
|
-
export interface PisellFindScannerData {
|
|
15
|
-
code: string;
|
|
16
|
-
data: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* PisellFind Props
|
|
20
|
-
* 继承 PisellLookup 的所有 Props,并扩展扫码枪监听相关字段。
|
|
21
|
-
*/
|
|
22
|
-
export interface PisellFindProps extends PisellLookupProps {
|
|
23
|
-
/**
|
|
24
|
-
* 是否开启扫码枪监听
|
|
25
|
-
* - 优先:通过宿主 `appHelper.utils.acquireScanFocus` 接入「扫码焦点栈」,
|
|
26
|
-
* 保证同一页面存在多个 PisellFind 时,只有「栈顶」(最后开启监听的那个,
|
|
27
|
-
* 如列表上方拉起的弹窗)响应扫码,底层组件不响应;关闭/卸载时自动释放,焦点回退。
|
|
28
|
-
* - 回退:宿主未注册焦点栈时,退回到直连 `app.pubsub.subscribe('nativeScanResult', ...)`。
|
|
29
|
-
* 切换 false 时会释放焦点 / unsubscribe,停止接收事件。
|
|
30
|
-
* @default false
|
|
31
|
-
*/
|
|
32
|
-
enableScanner?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* 扫码枪回调
|
|
35
|
-
* 监听到扫码枪事件时触发,参数为原始 payload 对象(含 `data` 字段)。
|
|
36
|
-
* 注意:仅在 enableScanner 为 true 时才会触发。
|
|
37
|
-
*/
|
|
38
|
-
onScannerData?: (data: PisellFindScannerData) => void;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* PisellFind Ref
|
|
42
|
-
* 继承 PisellLookup 的所有 Ref 方法
|
|
43
|
-
*/
|
|
44
|
-
export declare type PisellFindRef = PisellLookupRef;
|
|
45
|
-
/**
|
|
46
|
-
* PisellFind 组件
|
|
47
|
-
* 基于 PisellLookup 的组件内查找优化版本
|
|
48
|
-
*
|
|
49
|
-
* 核心特点:
|
|
50
|
-
* - 默认使用 button 触发器
|
|
51
|
-
* - 默认不显示确认按钮(输入即搜索)
|
|
52
|
-
* - 默认开启搜索历史
|
|
53
|
-
* - 默认不展示结果区(结果在页面其他位置展示)
|
|
54
|
-
* - 通过 `enableScanner` 接入扫码枪:优先走宿主注入的「扫码焦点栈」
|
|
55
|
-
* (`appHelper.utils.acquireScanFocus`),保证同页多个 PisellFind 只有栈顶响应;
|
|
56
|
-
* 宿主未注册时回退到直连 `app.pubsub.subscribe(SCAN_RESULT_EVENT, ...)`。
|
|
57
|
-
* 每次扫码直接覆盖输入框内容并触发 onSearch / onScannerData;切回 false 时自动释放 / unsubscribe。
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```tsx
|
|
61
|
-
* <PisellFind
|
|
62
|
-
* triggerType="input"
|
|
63
|
-
* enableScanner={isActive}
|
|
64
|
-
* onScannerData={(payload) => console.log('scan:', payload.data)}
|
|
65
|
-
* onSearch={(keyword) => filterData(keyword)}
|
|
66
|
-
* />
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
export declare const PisellFind: React.ForwardRefExoticComponent<PisellFindProps & React.RefAttributes<PisellLookupRef>>;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import type { MouseEvent, MutableRefObject } from 'react';
|
|
2
|
-
import { type PlacementBoundingBox } from '../utils/batchScenePlacementLayout';
|
|
3
|
-
import type { DataSourceFormColumn, FloorMapCanvasNameI18n, FloorMapDataSourceRecordFormContent, FloorMapDataSources, FloorMapItemBase, FloorMapMergedItem, FloorMapPlaceMode, FloorMapSceneElement, FloorMapViewConfig } from '../types';
|
|
4
|
-
export interface UseFloorMapEditStateParams<T extends FloorMapItemBase> {
|
|
5
|
-
floorMapConfigProp: FloorMapViewConfig | undefined;
|
|
6
|
-
isFloorMapView: boolean;
|
|
7
|
-
itemsProp: T[];
|
|
8
|
-
cellSizeProp?: number;
|
|
9
|
-
dataSources: FloorMapDataSources | undefined;
|
|
10
|
-
onSave: ((config: FloorMapViewConfig) => void) | undefined;
|
|
11
|
-
onDataSourceRecordSave: ((dataSourceKey: string, id: string, newData: Record<string, unknown>) => void) | undefined;
|
|
12
|
-
dataSourceFormColumns: Record<string, DataSourceFormColumn[]> | undefined;
|
|
13
|
-
dataSourceRecordForm: Record<string, FloorMapDataSourceRecordFormContent> | undefined;
|
|
14
|
-
dataSourceLabels?: Record<string, string>;
|
|
15
|
-
layoutPrefix: string;
|
|
16
|
-
contentOffsetRef: MutableRefObject<{
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
}>;
|
|
20
|
-
showDataSourceRecordFormBlock?: boolean;
|
|
21
|
-
/** 批量落点后由布局层注入:将视口移至新增图元区域 */
|
|
22
|
-
focusViewportOnBoundsRef?: MutableRefObject<((bounds: PlacementBoundingBox) => void) | null>;
|
|
23
|
-
/**
|
|
24
|
-
* 网格显隐缓存命名空间(通常与视口 `viewportPersistNamespace` 同源,拼自业务/门店/平面图)。
|
|
25
|
-
* 传入后网格 localStorage key 变为 `prefix:namespace:canvasId`,隔离不同门店/场景;
|
|
26
|
-
* 不传则沿用 `prefix:canvasId`(向后兼容,跨场景可能共享)。
|
|
27
|
-
*/
|
|
28
|
-
gridPersistNamespace?: string;
|
|
29
|
-
}
|
|
30
|
-
export declare function useFloorMapEditState<T extends FloorMapItemBase>(params: UseFloorMapEditStateParams<T>): {
|
|
31
|
-
config: FloorMapViewConfig | null;
|
|
32
|
-
currentCanvasId: string | null;
|
|
33
|
-
setCurrentCanvasId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
34
|
-
selectedId: string | null;
|
|
35
|
-
setSelectedId: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
36
|
-
placeMode: FloorMapPlaceMode;
|
|
37
|
-
setPlaceMode: import("react").Dispatch<import("react").SetStateAction<FloorMapPlaceMode>>;
|
|
38
|
-
mergedItems: FloorMapMergedItem[];
|
|
39
|
-
items: T[];
|
|
40
|
-
saving: boolean;
|
|
41
|
-
savingRecord: boolean;
|
|
42
|
-
handleAddCanvas: () => void;
|
|
43
|
-
handleRemoveCanvas: (canvasId: string) => void;
|
|
44
|
-
handleRenameCanvas: (canvasId: string, name: string | FloorMapCanvasNameI18n) => void;
|
|
45
|
-
handleUpdateItem: (itemId: string, patch: Partial<{
|
|
46
|
-
x: number;
|
|
47
|
-
y: number;
|
|
48
|
-
width: number;
|
|
49
|
-
height: number;
|
|
50
|
-
}>) => void;
|
|
51
|
-
handleUpdateItemsBatch: (patches: Array<{
|
|
52
|
-
id: string;
|
|
53
|
-
patch: Partial<{
|
|
54
|
-
x: number;
|
|
55
|
-
y: number;
|
|
56
|
-
width: number;
|
|
57
|
-
height: number;
|
|
58
|
-
}>;
|
|
59
|
-
}>) => void;
|
|
60
|
-
handleCanvasPlaceClick: (e: MouseEvent<HTMLDivElement>) => void;
|
|
61
|
-
handleSave: () => void;
|
|
62
|
-
discardDraft: () => void;
|
|
63
|
-
placeSceneElementFromPaletteDrop: (contentX: number, contentY: number, scene: Extract<FloorMapPlaceMode, {
|
|
64
|
-
type: 'scene';
|
|
65
|
-
}>) => boolean;
|
|
66
|
-
bulkPlacePaletteItems: (items: Array<{
|
|
67
|
-
elementKind: string;
|
|
68
|
-
builtinShapeKey?: string;
|
|
69
|
-
}>) => void;
|
|
70
|
-
editPanelParams: {
|
|
71
|
-
itemId: string;
|
|
72
|
-
sceneElement: FloorMapSceneElement;
|
|
73
|
-
onUpdate: (patch: Partial<FloorMapSceneElement>) => void;
|
|
74
|
-
onSaveRecord: ((dataSourceKey: string, id: string, newData: Record<string, unknown>) => void) | undefined;
|
|
75
|
-
onClose: () => void;
|
|
76
|
-
onDelete: (() => void) | undefined;
|
|
77
|
-
recordFormColumns: Record<string, DataSourceFormColumn[]> | undefined;
|
|
78
|
-
dataSourceRecordForm: Record<string, FloorMapDataSourceRecordFormContent> | undefined;
|
|
79
|
-
dataSourceLabels: Record<string, string> | undefined;
|
|
80
|
-
layoutDraftDirty: boolean;
|
|
81
|
-
showDataSourceRecordFormBlock: boolean | undefined;
|
|
82
|
-
} | null;
|
|
83
|
-
placeOverlayClass: string;
|
|
84
|
-
isLayoutDirty: boolean;
|
|
85
|
-
toggleDraftCanvasShowGrid: () => void;
|
|
86
|
-
toggleSelectedLayoutLock: () => void;
|
|
87
|
-
duplicateSelectedElement: () => void;
|
|
88
|
-
deleteSelectedElement: () => void;
|
|
89
|
-
undoDraft: () => void;
|
|
90
|
-
redoDraft: () => void;
|
|
91
|
-
canUndo: boolean;
|
|
92
|
-
canRedo: boolean;
|
|
93
|
-
commitDraft: (next: FloorMapViewConfig | ((prev: FloorMapViewConfig | null) => FloorMapViewConfig | null) | null, options?: import("./useDraftConfigHistory").DraftHistoryCommitOptions | undefined) => void;
|
|
94
|
-
};
|