@pisell/materials 6.11.243 → 6.11.245
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 +4 -4
- package/build/lowcode/render/default/view.js +4 -4
- package/build/lowcode/view.js +5 -5
- package/es/components/PisellCards/components/MultilevelCard/hooks/useMultilevelCardExpand.d.ts +1 -0
- package/es/components/PisellCards/components/PisellImageCard/hooks/useImageLoad.d.ts +1 -0
- package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
- package/es/components/PisellScrollView/PisellScrollView.d.ts +5 -0
- package/es/components/PisellScrollView/PisellScrollView.stories.d.ts +87 -0
- package/es/components/PisellScrollView/hooks/useScrollState.d.ts +13 -0
- package/es/components/PisellSteps/PisellSteps.stories.d.ts +155 -0
- package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
- package/es/components/PisellSuperTabs/PisellSuperTabs.js +8 -3
- package/es/components/PisellTabbar/constants.d.ts +47 -0
- package/es/components/PisellTabbar/index.d.ts +10 -0
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +16 -0
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +19 -3
- package/es/components/PisellTabbar/template/Template1/index.d.ts +7 -0
- package/es/components/PisellTabbar/types.d.ts +123 -0
- package/es/components/batch-editor/fields/index.d.ts +1 -0
- package/es/components/buttonGroupPreview/index.d.ts +19 -0
- package/es/components/calendar/index.d.ts +1 -0
- package/es/components/checkbox/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +48 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +22 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +2 -2
- package/es/components/filter/components/items/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/es/components/filter/components/items/text/index.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/pisellDatePicker/index.d.ts +1 -0
- package/es/components/pisellFind/index.d.ts +69 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +94 -0
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +184 -0
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +184 -0
- package/es/components/pisellFloorMapLayout/locales.d.ts +969 -0
- package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +80 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +109 -0
- package/es/components/pisellLookup/PisellLookup.d.ts +4 -0
- package/es/components/pisellLookup/components/LookupResultHost.d.ts +7 -0
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
- package/es/components/pisellLookup/types.d.ts +797 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +9 -0
- package/es/components/pisellRecordBoard/index.d.ts +55 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +43 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +102 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +9 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +32 -0
- package/es/components/pisellTimeRangeDisplay/index.d.ts +3 -0
- package/es/components/pisellTimeRangeDisplay/types.d.ts +145 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +2 -2
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +3 -3
- package/es/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +15 -0
- package/es/components/productCard/cartSkuCard/components/weighing/index.js +9 -4
- package/es/components/productCard/cartSkuCard/index.d.ts +16 -0
- package/es/components/productCard/cartSkuCard/index.js +2 -0
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +23 -0
- package/es/components/productCard/lineItem/components/Resources/index.d.ts +7 -0
- package/es/components/productCard/lineItem/index.d.ts +72 -0
- package/es/components/productCard/lineItem/locales.d.ts +38 -0
- package/es/components/productCard/types.d.ts +98 -0
- package/es/components/radio/index.d.ts +1 -0
- package/es/components/select-time/RightPanel/index.d.ts +10 -0
- package/es/components/select-time/index.d.ts +16 -0
- package/es/components/skeleton/index.d.ts +1 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/fields/image/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/select/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useTableSetting.d.ts +21 -0
- package/es/components/time-picker/index.d.ts +1 -0
- package/es/components/upload/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Time/utils.d.ts +1 -0
- package/es/hooks/useTranslationOriginal.d.ts +4 -0
- package/es/index.d.ts +271 -0
- package/es/locales/en-US.d.ts +566 -0
- package/es/locales/ja.d.ts +534 -0
- package/es/locales/pt.d.ts +534 -0
- package/es/locales/zh-CN.d.ts +561 -0
- package/es/locales/zh-TW.d.ts +561 -0
- package/es/utils/index.d.ts +1 -1
- package/lib/components/PisellCards/components/MultilevelCard/hooks/useMultilevelCardExpand.d.ts +1 -0
- package/lib/components/PisellCards/components/PisellImageCard/hooks/useImageLoad.d.ts +1 -0
- package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
- package/lib/components/PisellScrollView/PisellScrollView.d.ts +5 -0
- package/lib/components/PisellScrollView/PisellScrollView.stories.d.ts +87 -0
- package/lib/components/PisellScrollView/hooks/useScrollState.d.ts +13 -0
- package/lib/components/PisellSteps/PisellSteps.stories.d.ts +155 -0
- package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
- package/lib/components/PisellSuperTabs/PisellSuperTabs.js +12 -3
- package/lib/components/PisellTabbar/constants.d.ts +47 -0
- package/lib/components/PisellTabbar/index.d.ts +10 -0
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +16 -0
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +22 -3
- package/lib/components/PisellTabbar/template/Template1/index.d.ts +7 -0
- package/lib/components/PisellTabbar/types.d.ts +123 -0
- package/lib/components/batch-editor/fields/index.d.ts +1 -0
- package/lib/components/buttonGroupPreview/index.d.ts +19 -0
- package/lib/components/calendar/index.d.ts +1 -0
- package/lib/components/checkbox/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +48 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +22 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +2 -2
- package/lib/components/filter/components/items/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/index.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/pisellDatePicker/index.d.ts +1 -0
- package/lib/components/pisellFind/index.d.ts +69 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +94 -0
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +184 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +184 -0
- package/lib/components/pisellFloorMapLayout/locales.d.ts +969 -0
- package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +80 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +109 -0
- package/lib/components/pisellLookup/PisellLookup.d.ts +4 -0
- package/lib/components/pisellLookup/components/LookupResultHost.d.ts +7 -0
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
- package/lib/components/pisellLookup/types.d.ts +797 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +9 -0
- package/lib/components/pisellRecordBoard/index.d.ts +55 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +43 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +102 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +9 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +32 -0
- package/lib/components/pisellTimeRangeDisplay/index.d.ts +3 -0
- package/lib/components/pisellTimeRangeDisplay/types.d.ts +145 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +2 -2
- package/lib/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +15 -0
- package/lib/components/productCard/cartSkuCard/components/weighing/index.js +10 -3
- package/lib/components/productCard/cartSkuCard/index.d.ts +16 -0
- package/lib/components/productCard/cartSkuCard/index.js +3 -0
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +23 -0
- package/lib/components/productCard/lineItem/components/Resources/index.d.ts +7 -0
- package/lib/components/productCard/lineItem/index.d.ts +72 -0
- package/lib/components/productCard/lineItem/locales.d.ts +38 -0
- package/lib/components/productCard/types.d.ts +98 -0
- package/lib/components/radio/index.d.ts +1 -0
- package/lib/components/select-time/RightPanel/index.d.ts +10 -0
- package/lib/components/select-time/index.d.ts +16 -0
- package/lib/components/skeleton/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/fields/image/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/select/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/hooks/useTableSetting.d.ts +21 -0
- package/lib/components/time-picker/index.d.ts +1 -0
- package/lib/components/upload/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Time/utils.d.ts +1 -0
- package/lib/hooks/useTranslationOriginal.d.ts +4 -0
- package/lib/index.d.ts +271 -0
- package/lib/locales/en-US.d.ts +566 -0
- package/lib/locales/ja.d.ts +534 -0
- package/lib/locales/pt.d.ts +534 -0
- package/lib/locales/zh-CN.d.ts +561 -0
- package/lib/locales/zh-TW.d.ts +561 -0
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/form.item/meta.ts +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,123 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MenuProps, ButtonProps } from 'antd';
|
|
3
|
+
export interface ButtonGroupListItemProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
isMore?: boolean;
|
|
6
|
+
menuData?: MenuProps['items'];
|
|
7
|
+
buttonProps?: ButtonProps;
|
|
8
|
+
}
|
|
9
|
+
interface ButtonConfigProps {
|
|
10
|
+
[id: string]: ButtonGroupListItemProps;
|
|
11
|
+
}
|
|
12
|
+
export declare type ButtonGroupListProps = ButtonGroupListItemProps[][];
|
|
13
|
+
interface ButtonGroupPreviewProps {
|
|
14
|
+
buttonConfig?: ButtonConfigProps;
|
|
15
|
+
buttonGroupList?: ButtonGroupListProps;
|
|
16
|
+
updateButtonProps?: ButtonGroupListItemProps;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonGroupPreviewProps & React.RefAttributes<any>>>;
|
|
19
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -0,0 +1,48 @@
|
|
|
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;
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
22
|
+
title: string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
31
|
+
subTitle: string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -72,7 +72,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
72
72
|
useCustomAction: boolean;
|
|
73
73
|
actionType: string;
|
|
74
74
|
openMode: "modal" | "drawer";
|
|
75
|
-
openContentSize: "
|
|
75
|
+
openContentSize: "large" | "middle" | "small";
|
|
76
76
|
openTitle: string;
|
|
77
77
|
key: string;
|
|
78
78
|
} | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ModeType } from "../../dataSourceForm/type";
|
|
3
|
+
export interface TranslationValue {
|
|
4
|
+
en: string;
|
|
5
|
+
'zh-CN': string;
|
|
6
|
+
'zh-HK': string;
|
|
7
|
+
'ja': string;
|
|
8
|
+
'pt': string;
|
|
9
|
+
original: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TranslationProps {
|
|
12
|
+
renderMode: ModeType;
|
|
13
|
+
value?: TranslationValue;
|
|
14
|
+
onChange?: (value: TranslationValue) => void;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
type?: 'text' | 'textarea';
|
|
19
|
+
maxLength?: number;
|
|
20
|
+
inputStyle?: React.CSSProperties;
|
|
21
|
+
allowClear?: boolean;
|
|
22
|
+
}
|
|
@@ -81,7 +81,7 @@ declare const formFieldMap: {
|
|
|
81
81
|
extraParams?: Record<string, any> | undefined;
|
|
82
82
|
}) => import("react").JSX.Element;
|
|
83
83
|
};
|
|
84
|
-
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
|
|
84
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<{}> & {
|
|
85
85
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
86
86
|
} & {
|
|
87
87
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -118,7 +118,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
118
118
|
} & {
|
|
119
119
|
dataSource?: any;
|
|
120
120
|
extraParams?: Record<string, any> | undefined;
|
|
121
|
-
}) => import("react").JSX.Element) | import("react").FC<
|
|
121
|
+
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
122
122
|
onChange: (value: string) => void;
|
|
123
123
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | ((props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
124
124
|
options?: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -0,0 +1,69 @@
|
|
|
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>>;
|
|
@@ -0,0 +1,94 @@
|
|
|
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
|
+
};
|