@sumslack/shadcn-pro 1.2.5

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.
@@ -0,0 +1,1718 @@
1
+ import { AgGridReactProps } from 'ag-grid-react';
2
+ import { CellContextMenuEvent } from 'ag-grid-community';
3
+ import { Checkbox as Checkbox_2 } from 'radix-ui';
4
+ import { ClassProp } from 'class-variance-authority/types';
5
+ import { ColDef } from 'ag-grid-community';
6
+ import { ColumnHeaderContextMenuEvent } from 'ag-grid-community';
7
+ import { DateRange } from 'react-day-picker';
8
+ import { Dialog as Dialog_2 } from 'radix-ui';
9
+ import { EChartsOption } from 'echarts';
10
+ import { ExternalToast } from 'sonner';
11
+ import { GridApi } from 'ag-grid-community';
12
+ import { JSX } from 'react';
13
+ import { LegendComponentOption } from 'echarts';
14
+ import { OnSelectHandler } from 'react-day-picker';
15
+ import * as React_2 from 'react';
16
+ import { RefObject } from 'react';
17
+ import * as ResizablePrimitive from 'react-resizable-panels';
18
+ import { StoreApi } from 'zustand/vanilla';
19
+ import { Switch } from 'radix-ui';
20
+ import { Tabs as Tabs_2 } from 'radix-ui';
21
+ import { toast } from 'sonner';
22
+ import { ToasterProps } from 'sonner';
23
+ import { Tooltip as Tooltip_2 } from 'radix-ui';
24
+ import { VariantProps } from 'class-variance-authority';
25
+ import { Z_INDEX } from '../../constants/z-index';
26
+
27
+ declare interface ApiConfig {
28
+ isbin?: boolean;
29
+ encode_key?: string;
30
+ sign_key?: string;
31
+ }
32
+
33
+ /**
34
+ * 为 legend 区域创建 graphic 背景矩形,置于图表底部,宽度为整个 echart 宽度
35
+ * rect 的 bottom/height 需与 legend 的 bottom/height 一致,实现对齐
36
+ */
37
+ export declare function buildProEChartsLegendBackgroundGraphic(options: {
38
+ width: number;
39
+ bottom: number;
40
+ height: number;
41
+ color?: string;
42
+ }): {
43
+ elements: unknown[];
44
+ };
45
+
46
+ /**
47
+ * 根据 series 生成 legend 配置,柱状图 icon 用 rect,折线图用横条 path
48
+ * 与 temp 中 `buildLegendConfig` 一致;未传入 `legendScrollChrome` 时从 `:root` 读取 token。
49
+ * 推荐业务侧在 `option.legend` 中写官方格式并由 `mergeProEChartsOption` 自动增强;本函数保留供非 React 或一次性合并场景使用。
50
+ */
51
+ export declare function buildProEChartsLegendConfig(series: ProEChartsLegendSeriesItem[], seriesVisible: boolean[], legendBottomOffset?: number, legendScrollChrome?: LegendComponentOption): EChartsOption["legend"];
52
+
53
+ export declare function buildProEChartsScrollLegendChrome(tokens: ProEChartsThemeTokens): LegendComponentOption;
54
+
55
+ export declare function buildProEChartsThemePartials(root: HTMLElement | null): ProEChartsThemePartials;
56
+
57
+ /**
58
+ * 生成 tooltip formatter:图标根据 seriesType(scatter/line/bar)动态渲染
59
+ */
60
+ export declare function buildProEChartsTooltipFormatter(): (params: unknown) => string;
61
+
62
+ /**
63
+ * 根据 series 类型生成与 graphic 一致的 tooltip 图标 HTML
64
+ * line: 12x2 横条 | bar: 10x10 圆角矩形 | scatter/其他: 直径 8 的圆(与 legend 风格一致)
65
+ */
66
+ export declare function buildProEChartsTooltipIconHtml(seriesType: string, color: string | Record<string, unknown> | undefined): string;
67
+
68
+ /**
69
+ * 代理落点的完整 HTTPS URL(展示用)。本机实际请求多为同源 `/gw-nb/`,与 Vite `server` / `preview` 代理目标一致。
70
+ * @param apiId 脚本 API ID,支持前置斜杠
71
+ * @param isbin 是否使用 sdep-gateway-api2(默认 false,即 sdep-gateway-api)
72
+ * @param encode_key ,如果传入秘钥,表示加密二进制,和isbin联动使用
73
+ */
74
+ export declare function buildSdpExecAbsoluteUrl(apiId: string, isbin?: boolean): string;
75
+
76
+ export declare function buildSdpExecUrl(apiId: string, isbin?: boolean): string;
77
+
78
+ declare function Button({ className, variant, size, asChild, ...props }: React_2.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
79
+ asChild?: boolean;
80
+ }): React_2.JSX.Element;
81
+
82
+ declare type ButtonComponentProps = React_2.ComponentProps<typeof Button>;
83
+
84
+ declare const buttonVariants: (props?: ({
85
+ variant?: "primary" | "default" | "text" | "highlight" | "link" | "icon" | null | undefined;
86
+ size?: "default" | "xs" | "relaxed" | "lg" | "xl" | null | undefined;
87
+ } & ClassProp) | undefined) => string;
88
+
89
+ declare function Checkbox({ className, ...props }: React_2.ComponentProps<typeof Checkbox_2.Root>): React_2.JSX.Element;
90
+
91
+ declare type CheckboxComponentProps = React_2.ComponentProps<typeof Checkbox>;
92
+
93
+ export declare function clearProFormLocalStorage(name: string): void;
94
+
95
+ export { DateRange }
96
+
97
+ declare function Dialog({ ...props }: React_2.ComponentProps<typeof Dialog_2.Root>): React_2.JSX.Element;
98
+
99
+ export declare function DialogClose({ ...props }: React_2.ComponentProps<typeof Dialog_2.Close>): React_2.JSX.Element;
100
+
101
+ export declare function DialogContent({ className, children, showCloseButton, closeButtonOnClick, ...props }: React_2.ComponentProps<typeof Dialog_2.Content> & {
102
+ showCloseButton?: boolean;
103
+ /** 点击内容区右上角内置关闭钮时触发(在 Radix 关闭弹层之前调用) */
104
+ closeButtonOnClick?: () => void;
105
+ }): React_2.JSX.Element;
106
+
107
+ export declare function DialogDescription({ className, ...props }: React_2.ComponentProps<typeof Dialog_2.Description>): React_2.JSX.Element;
108
+
109
+ export declare function DialogFooter({ className, showCloseButton, children, ...props }: React_2.ComponentProps<"div"> & {
110
+ showCloseButton?: boolean;
111
+ }): React_2.JSX.Element;
112
+
113
+ export declare function DialogHeader({ className, ...props }: React_2.ComponentProps<"div">): React_2.JSX.Element;
114
+
115
+ export declare function DialogTitle({ className, ...props }: React_2.ComponentProps<typeof Dialog_2.Title>): React_2.JSX.Element;
116
+
117
+ export declare function DialogTrigger({ ...props }: React_2.ComponentProps<typeof Dialog_2.Trigger>): React_2.JSX.Element;
118
+
119
+ declare const engine: ZustandEngine<Record<string, unknown>>;
120
+
121
+ declare const engine_2: ZustandEngine<Record<string, unknown>>;
122
+
123
+ /**
124
+ * 将业务侧按 ECharts 官方格式传入的 `legend` 与主题滚动条样式、尺寸与按 series 推断的 icon 合并。
125
+ * 供 `mergeProEChartsOption` 使用;调用方只需写官方字段(如 `type`、`data`),不必再调 `buildProEChartsLegendConfig`。
126
+ */
127
+ export declare function enrichProEChartsLegend(theme: ProEChartsThemePartials, user: LegendComponentOption, series: ProEChartsLegendSeriesItem[]): LegendComponentOption;
128
+
129
+ /**
130
+ * 仅传 `apiId`,请求 URL 自动为:
131
+ * `{getGwNbGatewayBase()}{SDP_EXEC_API_PREFIX}{apiId}`
132
+ *
133
+ * @param headers 可选;传入时合并进本次 POST(axios 配置),例如 Storybook 侧栏保存到 localStorage 后的 `getGwNbApiDevHeaders()`
134
+ *
135
+ * @returns resolve 为完整响应体;业务载荷在 `data`,其 TypeScript 形态由泛型 `T` 描述(默认 `unknown`)。
136
+ */
137
+ export declare function execApiById<T = unknown>(apiId: string, body?: SdpExecBody, headers?: Record<string, string>, apiConfig?: ApiConfig): Promise<SdpGatewayResponse<T>>;
138
+
139
+ export { ExternalToast }
140
+
141
+ /** 格式化 tooltip 中的数值显示 */
142
+ export declare function formatProEChartsTooltipValue(value: unknown): string;
143
+
144
+ export declare function getCollapserIconRotation(orientation: ProCollapserOrientation, collapsed: boolean, side: ProCollapserHandleSide): number;
145
+
146
+ /**
147
+ * 根据 localStorage 中的用户配置生成请求头;仅包含非空字段。
148
+ * 另附 `Content-Type`(JSON POST 所需),不属于业务联调凭证。
149
+ */
150
+ export declare function getGwNbApiDevHeaders(): Record<string, string>;
151
+
152
+ /**
153
+ * 当前应使用的网关根路径:`localhost` / `127.0.0.1`(含 `vite build` + `vite preview`)走同源
154
+ * `/gw-nb/` 由 Vite 代理;其余按环境选择 QA / 正式完整 HTTPS 基址。
155
+ * ? 不再拼接完整地址, 只返回相对地址, 防止跨域
156
+ */
157
+ export declare function getGwNbGatewayBase(): string;
158
+
159
+ /** 从 option 中解析 legend.bottom 和 legend.height */
160
+ export declare function getProEChartsLegendLayout(option: EChartsOption): {
161
+ bottom: number;
162
+ height: number;
163
+ };
164
+
165
+ /**
166
+ * 同步读取 localStorage 中指定表单的已存快照。
167
+ * `name` 与 `ProForm` 的 `formId` 一致;无数据或解析失败时返回 `null`。
168
+ */
169
+ export declare function getProFormLocalStorage(name: string): Record<string, unknown> | null;
170
+
171
+ /** 生成 ProIcon 使用代码,供 Story 复制 */
172
+ export declare function getProIconUsageCode(type: ProIconType, options?: {
173
+ size?: number | string;
174
+ className?: string;
175
+ }): string;
176
+
177
+ /**
178
+ * 开发态与 Storybook 走 Vite `server.proxy` 的同源路径;生产态为 {@link getGwNbGatewayBase} 的默认落点之一,便于静态展示或 SSR 兜底。
179
+ * 与 `gw-nb-proxy.vite.ts` 中 `/gw-nb` 前缀一致。
180
+ */
181
+ export declare const GW_NB_GATEWAY_BASE = "/gw-nb/";
182
+
183
+ declare function Input({ className, type, ...props }: React_2.ComponentProps<"input">): React_2.JSX.Element;
184
+
185
+ declare type InputComponentProps = React_2.ComponentProps<typeof Input>;
186
+
187
+ /** 判断事件是否发生在 Pro 浮层(Select 下拉等)内,供 Dialog 拦截 outside 事件 */
188
+ export declare function isProPopupElement(target: EventTarget | null): boolean;
189
+
190
+ /** 当前 Dialog 是否为栈顶(最后打开、仍 open 的 Dialog) */
191
+ export declare function isTopmostDialog(currentContent: HTMLElement | null): boolean;
192
+
193
+ /** 从 localStorage 读取侧栏保存的联调项(无数据时为空字符串)。 */
194
+ export declare function loadStorybookGwNbDevFields(): StorybookGwNbDevFields;
195
+
196
+ export declare function mergeProEChartsOption(theme: ProEChartsThemePartials, partial: EChartsOption): EChartsOption;
197
+
198
+ declare type PagePaginationBarProps = {
199
+ totalPages: number;
200
+ currentPage: number;
201
+ pageSize: number;
202
+ pageSizeOptions?: number[];
203
+ disabled?: boolean;
204
+ className?: string;
205
+ onPageChange: (page: number) => void;
206
+ onPageSizeChange: (pageSize: number) => void;
207
+ };
208
+
209
+ /**
210
+ * `formId.name`:`name` 可含 `.`;第一段子串为 formId,余下为字段名。
211
+ */
212
+ export declare function parseFormPath(path: string): {
213
+ formId: string;
214
+ fieldName: string;
215
+ };
216
+
217
+ /** 公共 x/y 轴与 dataZoom(与 temp 中 ECHARTS_COMMON_OPTION 一致) */
218
+ export declare const PRO_ECHARTS_AXIS_AND_DATAZOOM: {
219
+ readonly xAxis: {
220
+ readonly axisLabel: {
221
+ color: string;
222
+ fontSize: number;
223
+ fontWeight: "normal";
224
+ };
225
+ readonly axisTick: {
226
+ readonly show: false;
227
+ };
228
+ readonly axisLine: {
229
+ readonly lineStyle: {
230
+ readonly color: "#102C35";
231
+ };
232
+ };
233
+ readonly scale: true;
234
+ readonly splitLine: {
235
+ readonly show: false;
236
+ };
237
+ };
238
+ readonly yAxis: {
239
+ readonly show: true;
240
+ readonly scale: true;
241
+ readonly axisLine: {
242
+ readonly show: false;
243
+ };
244
+ readonly axisLabel: {
245
+ readonly formatter: (value: number) => string;
246
+ readonly color: string;
247
+ readonly fontSize: number;
248
+ readonly fontWeight: "normal";
249
+ };
250
+ readonly splitLine: {
251
+ readonly show: true;
252
+ readonly lineStyle: {
253
+ readonly color: "rgba(255, 255, 255, 0.15)";
254
+ };
255
+ };
256
+ };
257
+ /** 仅作用 x 轴,避免缩放时 y 轴与 splitLine 被 ECharts 内部更新导致消失 */
258
+ readonly dataZoom: readonly [{
259
+ readonly type: "inside";
260
+ readonly xAxisIndex: 0;
261
+ }];
262
+ };
263
+
264
+ /** 公共轴、图例样式,与业务 option 合并 */
265
+ export declare const PRO_ECHARTS_AXIS_LABEL_COMMON: {
266
+ color: string;
267
+ fontSize: number;
268
+ fontWeight: "normal";
269
+ };
270
+
271
+ /** 公共 grid 配置 */
272
+ export declare const PRO_ECHARTS_COMMON_GRID: {
273
+ readonly left: 10;
274
+ readonly right: 10;
275
+ readonly top: 10;
276
+ readonly bottom: 25;
277
+ readonly containLabel: true;
278
+ };
279
+
280
+ /** 公共 title 样式(业务 option 只需提供 title.text) */
281
+ export declare const PRO_ECHARTS_COMMON_TITLE: {
282
+ left: number;
283
+ top: number;
284
+ textStyle: {
285
+ color: string;
286
+ fontSize: number;
287
+ fontWeight: "bold";
288
+ };
289
+ };
290
+
291
+ /** 公共 tooltip 样式 */
292
+ export declare const PRO_ECHARTS_COMMON_TOOLTIP: {
293
+ backgroundColor: string;
294
+ borderColor: string;
295
+ textStyle: {
296
+ color: string;
297
+ };
298
+ };
299
+
300
+ /** 未在 option 中配置 legend 时使用的 grid 底部留白(为图例预留的 48 可收紧) */
301
+ export declare const PRO_ECHARTS_GRID_BOTTOM_NO_LEGEND = 10;
302
+
303
+ /** legend 背景区域默认高度 */
304
+ export declare const PRO_ECHARTS_LEGEND_BAND_HEIGHT = 24;
305
+
306
+ /** legend 向下偏移的默认值(距容器底边) */
307
+ export declare const PRO_ECHARTS_LEGEND_BOTTOM_OFFSET_DEFAULT = 6;
308
+
309
+ /**
310
+ * 图例 `data[].icon` 只决定形状;像素大小由 legend 的 `itemWidth` / `itemHeight` 决定。
311
+ * 若 `itemHeight` 过小(例如滚动图例 chrome 里为 2),`bar: "rect"` 会被压成细条,看起来像线。
312
+ */
313
+ export declare const PRO_ECHARTS_LEGEND_ICON: {
314
+ readonly bar: "rect";
315
+ readonly line: "path://M0,4 L10,4 L10,6 L0,6 Z";
316
+ };
317
+
318
+ /** 图例符号外框:与 `PRO_ECHARTS_TOOLTIP_ICON.bar` 一致,柱状 rect 为正方形 */
319
+ export declare const PRO_ECHARTS_LEGEND_ITEM: {
320
+ readonly w: 10;
321
+ readonly h: 10;
322
+ };
323
+
324
+ /** tooltip 中图标尺寸 */
325
+ export declare const PRO_ECHARTS_TOOLTIP_ICON: {
326
+ readonly line: {
327
+ readonly w: 12;
328
+ readonly h: 2;
329
+ };
330
+ readonly bar: {
331
+ readonly w: 10;
332
+ readonly h: 10;
333
+ readonly r: 1;
334
+ };
335
+ readonly circle: {
336
+ readonly r: 4;
337
+ };
338
+ };
339
+
340
+ export declare const PRO_ICON_TYPES: readonly ["path-2", "quote-mini-window", "align-vertical-center-03", "annotation", "arrowed-segment", "caret-left", "caret-right", "double-down", "double-left", "double-right", "double-up", "down", "left", "revert", "right", "rollback", "caret-down", "caret-up", "up", "broken-line", "calculate-stroke-1", "calculate-stroke", "check", "divide", "equal-to", "minus", "multiplication", "plus", "union-1", "union-2", "union-23", "channel-lines", "chart-shape-stroke-1", "bars", "curve", "icon-stroke", "candle-stick-chart", "union-28", "union-29", "union-30", "union-31", "union-32", "union-33", "check-circle-o", "circular", "communication-shape-stroke", "contacts", "customer-service", "heart-o", "heart", "idcard", "like-o", "mail", "message", "mobile", "phone", "send-01", "share-alt", "share", "smile-o", "wechat", "team", "union-21", "user", "arrow", "cursor-close", "expand-02", "open", "pointing", "resize-col", "resize-row", "unavailable", "callin", "delete", "download", "drag-drop", "edit", "eye-hidden", "eye-o", "font-adjust", "popup", "save", "swap", "union-3", "union-4", "upload", "elliptical", "f9", "file-path-3", "document", "file", "group-1393", "pdf", "picture", "rectangle-3-1", "rectangle-3", "union-24", "union-25", "union-26", "folder-open", "folder", "frame-21-1", "frame-21-2", "frame-21-3", "frame-21-4", "frame-21", "func-export", "gann-box", "general-group-manage", "general-follow-collect", "general-path-stroke", "general-path", "general-image-copy", "app-full-normal", "app-min-normal", "app-restore-normal", "appstore-o", "arrows-alt", "bell", "belled", "calendar", "camera-o", "clock-circle", "general-close", "copy", "desktop", "error", "flag", "flash", "group-1394", "help-circle-o", "home", "info-circle-o", "jingxuan", "link", "location", "lock-o", "magnify-panel", "minus-square-o", "more-vertical", "more", "need-to-ask", "paper-clip", "plus-square-o", "pushpin-o", "pushpin", "reload", "scan", "general-screenshot", "search", "setting", "shrink", "skin", "star-o", "star", "subtract-1", "subtract-2", "subtract-3", "subtract-4", "subtract-5", "subtract-6", "subtract", "sync", "tag-o", "general-to-top", "union-10", "union-11", "union-12", "union-5", "union-6", "union-7", "union-8", "union-9", "unlock-o", "warning", "group-37", "hexagon", "horizontal-line", "column-vertical-4", "grid-4", "grid-6", "grid-9", "like-thumb-up", "line", "linear-regression-bands", "linear-regression-lines", "measure-target", "measurement", "news-follow-collect", "news-path-1", "news-all-sentiment", "news-daily-weekly-report", "news-shape", "news-important-info", "union-13", "union-14", "union-15", "union-16", "union-17", "union-18", "union-19", "union-20", "union-22", "union-27", "vector-1", "vector", "operation-default-1", "operation-default-2", "operation-default", "parallel-lines", "price-label", "ray", "rectangle-1157", "rectangle", "screenshot", "segment", "standard-deviation-channel", "quote-widget", "text-tool", "time-scale", "triangle", "union", "vertical-line", "wave-ruler"];
341
+
342
+ /** 标签业务类型(机构 / 市场 / 报价等) */
343
+ export declare const PRO_TAG_TYPES: readonly ["国利", "国际", "平安", "信唐", "中诚", "上田", "匿名", "双边", "上固收", "CFETS", "上交所", "深交所", "北交所", "上证固收", "交易所", "经纪商", "中债", "X-Bond", "双边报价"];
344
+
345
+ /**
346
+ * 在 shadcn Button 之上的业务封装:统一加载态与图标间距。
347
+ * 后续可在此集中扩展权限、埋点、尺寸规范等。
348
+ */
349
+ export declare function ProButton({ className, loading, disabled, children, width, style, ...props }: ProButtonProps): React_2.JSX.Element;
350
+
351
+ export declare type ProButtonProps = Omit<ButtonComponentProps, "variant" | "size" | "disabled"> & {
352
+ /**
353
+ * 视觉变体:如主要、文字、线框、强调次要、链接、图标等,与底层 `Button` 一致。
354
+ */
355
+ variant?: ButtonComponentProps["variant"];
356
+ /**
357
+ * 尺寸:紧凑(`xs`)、默认、宽松(`relaxed`)、大型(`lg`)、超大(`xl`)。
358
+ */
359
+ size?: ButtonComponentProps["size"];
360
+ /**
361
+ * 是否禁用。为 `true` 时不可点击;`loading` 为 `true` 时内部也会禁用。
362
+ */
363
+ disabled?: ButtonComponentProps["disabled"];
364
+ /** 是否显示加载态并禁用点击(与 `disabled` 叠加为 `disabled || loading`)。 */
365
+ loading?: boolean;
366
+ /**
367
+ * 按钮宽度,写入内联样式 `width`。
368
+ * `number` 会转为 `${n}px`;`string` 原样使用(如 `100%`、`12rem`)。
369
+ */
370
+ width?: React_2.CSSProperties["width"];
371
+ };
372
+
373
+ /**
374
+ * 在 shadcn Checkbox(Radix)之上的业务封装:统一 Pro 品牌外观。
375
+ */
376
+ export declare function ProCheckbox({ className, type: boxType, children, disabled, name, checked, defaultChecked, onCheckedChange, ...props }: ProCheckboxProps): React_2.JSX.Element;
377
+
378
+ export declare type ProCheckboxProps = Omit<CheckboxComponentProps, "type"> & {
379
+ /** 圆形或正方形(正方为 2px 圆角)。 */
380
+ type?: ProCheckboxType;
381
+ /** 可选:显示在复选框右侧的文案或节点(传入时用 label 包裹,点击文案可切换勾选)。 */
382
+ children?: React_2.ReactNode;
383
+ /** 在 `ProForm` 内写入 `proFormBridge`(字段名) */
384
+ name?: string;
385
+ };
386
+
387
+ export declare type ProCheckboxType = "round" | "square";
388
+
389
+ export declare function ProCollapserHandle({ withHandle, collapsed, onCollapsedChange, side, collapsedSize, className, ...props }: ProCollapserHandleProps): React_2.JSX.Element;
390
+
391
+ export declare type ProCollapserHandleProps = React_2.ComponentProps<"div"> & {
392
+ withHandle?: boolean;
393
+ collapsed?: boolean;
394
+ onCollapsedChange?: (collapsed: boolean) => void;
395
+ /** 折叠方向:`start` 折叠手柄前的面板,`end` 折叠手柄后的面板 */
396
+ side?: ProCollapserHandleSide;
397
+ /**
398
+ * 与相邻折叠面板的 `collapsedSize` 保持一致。
399
+ * 大于 0 时折叠后手柄仍居中于分隔线,避免按钮整体偏移到未折叠侧。
400
+ */
401
+ collapsedSize?: number;
402
+ };
403
+
404
+ export declare type ProCollapserHandleSide = "start" | "end";
405
+
406
+ export declare type ProCollapserOrientation = "horizontal" | "vertical";
407
+
408
+ export declare function ProCollapserPanel({ className, collapsed, collapsedSize, animated, duration, style, children, ...props }: ProCollapserPanelProps): React_2.JSX.Element;
409
+
410
+ export declare function ProCollapserPanelGroup({ className, orientation, ...props }: ProCollapserPanelGroupProps): React_2.JSX.Element;
411
+
412
+ export declare type ProCollapserPanelGroupProps = React_2.ComponentProps<"div"> & {
413
+ orientation?: ProCollapserOrientation;
414
+ };
415
+
416
+ export declare type ProCollapserPanelProps = React_2.ComponentProps<"div"> & {
417
+ collapsed?: boolean;
418
+ /**
419
+ * 折叠后保留的尺寸(px)。默认 `0` 表示完全折叠;
420
+ * 设为大于 0 的值可保留窄条区域(如侧栏图标轨)。
421
+ */
422
+ collapsedSize?: number;
423
+ /** 是否开启折叠动画,默认关闭 */
424
+ animated?: boolean;
425
+ /** 折叠动画时长(ms),默认 200;仅在 `animated` 为 true 时生效 */
426
+ duration?: number;
427
+ };
428
+
429
+ /**
430
+ * 根据表单引擎快照驱动网关请求,并把 `execApiById` 返回的 **整段 `data`**(可经 `onApiRender` 映射)写入全局 bridge 快照。
431
+ * 本身不渲染 UI(返回 `null`)。
432
+ */
433
+ export declare function ProDataBridge({ name, apiId, formName, formFields, action, order, pageSize, preflightCheck, onApiRender, dataKey, socketData, }: ProDataBridgeProps): null;
434
+
435
+ export declare type ProDataBridgeAction = "auto" | "manual";
436
+
437
+ /** 单次 `refetch` / `loadNextPage` / `loadPage` 调用时并入请求 `params` 的扩展字段;同名键覆盖表单与表格排序参数 */
438
+ declare type ProDataBridgeCallParams = Record<string, unknown>;
439
+
440
+ declare type ProDataBridgeEntry = {
441
+ data: unknown;
442
+ loading: boolean;
443
+ error: string | null;
444
+ /**
445
+ * 当前已成功加载的最后一页页码(从 0 起,与请求 `pageNum` 一致)。
446
+ * 尚无成功请求时为 `-1`;`refetch` 或表单触发的首屏请求进行过程中会先被置为 `0`。
447
+ */
448
+ pageNum: number;
449
+ /** 与 {@link ProDataBridge} 请求体中的 `pageSize` 一致,由 Bridge 写入;默认 `20`。 */
450
+ pageSize: number;
451
+ /**
452
+ * 仅当同名 {@link ProDataBridge} 为 `action="auto"` 时:筛选项变化或 `refetch`(第 0 页)由 Bridge 自增;
453
+ * `action="manual"` 时 **不会** 因 `refetch` 或筛选项变化而自增。订阅方在该值变化时将纵向滚动重置到顶部。
454
+ */
455
+ scrollResetToken: number;
456
+ /**
457
+ * 是否启用前置校验(由 {@link ProDataBridge} 在 `action="auto"` 且 `preflightCheck` 为真时写入)。
458
+ * 为真时,须 {@link useProDataBridgePreflight} 将 {@link preflightPassed} 置为 `true` 后才允许发起请求。
459
+ */
460
+ preflightRequired: boolean;
461
+ /** 前置校验是否已通过;未启用前置校验时恒为 `true`。 */
462
+ preflightPassed: boolean;
463
+ /**
464
+ * 是否还可调用 `loadNextPage`(无限滚动末页判定)。
465
+ * 由 {@link ProDataBridge} 在每次请求成功且 `loading` 即将置为 `false` 时按 `pageSize` 启发式更新;
466
+ * 覆盖型请求(`refetch` / `loadPage` / 表单首屏)开始时会乐观重置为 `true`。
467
+ */
468
+ hasMore: boolean;
469
+ };
470
+
471
+ export declare type ProDataBridgeProps = {
472
+ /** 实例标识,供 {@link useProDataBridge} 订阅 */
473
+ name: string;
474
+ /** 网关脚本 / API 标识 */
475
+ apiId: string;
476
+ /**
477
+ * 绑定表单:与 {@link ProForm} 的 `formId` 一致(组件参数命名为 formName 仅为语义上的「表单名」)。
478
+ */
479
+ formName?: string;
480
+ /** 若指定,则仅将这些字段写入请求 `params`;否则传入当前表单全部快照字段 */
481
+ formFields?: string[];
482
+ /**
483
+ * `auto`:表单快照变化时自动请求;筛选项变化或 `refetch` 时会自增 `scrollResetToken`(供表格滚回顶部)。
484
+ * `manual`:仅在被 `useProDataBridge(...).refetch()` 触发时请求;**不会**自增 `scrollResetToken`。
485
+ */
486
+ action?: ProDataBridgeAction;
487
+ /**
488
+ * 仅当 `action="auto"` 且由表单快照触发的自动请求时生效:`0` 最先执行,数值越大越靠后;
489
+ * 相同 `order` 的实例在同一阶段并行请求;较小 `order` 的整层全部结束后才开始下一层。
490
+ * `refetch()`、`loadNextPage()` 以及 `action="manual"` 不受此参数影响。
491
+ */
492
+ order?: number;
493
+ /** 传给 `execApiById` 的分页大小,默认 20 */
494
+ pageSize?: number;
495
+ /**
496
+ * 是否启用前置校验;**仅 `action="auto"` 时生效**。
497
+ * 启用后 `preflightPassed` 初始为 `false`,须通过 {@link useProDataBridgePreflight} 置为 `true` 后才允许任何请求。
498
+ */
499
+ preflightCheck?: boolean;
500
+ /**
501
+ * `apiId` 请求成功后对响应体中的 `data` 做映射(例如非标准结构转为本库期望的形态)。
502
+ * 返回值会写入 bridge 快照;`loadNextPage` 时每一页都会先经此函数再与已有 `data` 合并。
503
+ */
504
+ onApiRender?: (data: unknown) => unknown;
505
+ /**
506
+ * 列表项唯一键字段名;与 {@link socketData} 联用时必填。
507
+ * 仅指定 `dataKey` 而不传 `socketData` 时无额外行为。
508
+ */
509
+ dataKey?: string;
510
+ /**
511
+ * WebSocket 等推送的增量操作;可为单条或批次数组,变更时按 `type` 合并进当前 `data`。
512
+ * 指定时必须同时指定 {@link dataKey}。
513
+ */
514
+ socketData?: ProDataBridgeSocketItem | ProDataBridgeSocketItem[];
515
+ };
516
+
517
+ export declare type ProDataBridgeSocketAction = "INSERT" | "UPDATE" | "DELETE";
518
+
519
+ export declare type ProDataBridgeSocketItem = {
520
+ type: ProDataBridgeSocketAction;
521
+ data: Record<string, unknown>;
522
+ };
523
+
524
+ /**
525
+ * 基于 shadcn `Popover` + `Calendar` 的日期选择,触发器样式与 Pro 系列控件对齐。
526
+ */
527
+ export declare function ProDataPicker({ value, defaultValue, onValueChange, onSelect, placeholder, disabled, className, contentClassName, size, displayFormat, valueFormat, name, allowClear, }: ProDataPickerProps): React_2.JSX.Element;
528
+
529
+ /** `mode="single"` 且非 required 时 DayPicker 的 `onSelect` 签名 */
530
+ declare type ProDataPickerCalendarOnSelect = OnSelectHandler<Date | undefined>;
531
+
532
+ export declare type ProDataPickerProps = {
533
+ /** 当前日期(受控),支持 `Date` 或按 `valueFormat` 格式化的字符串 */
534
+ value?: Date | string;
535
+ /** 默认日期(非受控),支持 `Date` 或按 `valueFormat` 格式化的字符串 */
536
+ defaultValue?: Date | string;
537
+ /**
538
+ * 选择器的**值**变更时触发,按 `valueFormat` 输出字符串(或清空时的 `undefined`)。
539
+ * 用于受控 `value`、表单同步;在 `ProForm` 内配合 `name` 时,内部写入 store 后仍会调用(与 `useProFormFieldSync` 的 `onChange` 一致)。
540
+ * 在日历里点选某一天并成功提交选择后调用,且晚于 `onSelect`。
541
+ */
542
+ onValueChange?: (value: string | undefined) => void;
543
+ /**
544
+ * 日历面板内由 DayPicker 触发的**选日**回调,与 `react-day-picker` 的 `onSelect` 一致:
545
+ * 参数依次为「选中的日期」「触发交互的日期」「该日的 modifiers」「鼠标或键盘事件」。
546
+ * 适合埋点、或需要区分「点击的是哪一天」与「最终选中值」的场景;做表单绑定时仍应使用 `onValueChange`。
547
+ */
548
+ onSelect?: ProDataPickerCalendarOnSelect;
549
+ placeholder?: string;
550
+ disabled?: boolean;
551
+ className?: string;
552
+ contentClassName?: string;
553
+ size?: ProDataPickerSize;
554
+ /** 展示用格式,传给 `date-fns` 的 `format` */
555
+ displayFormat?: string;
556
+ /** 值输出格式(`onValueChange` / 表单快照),传给 `date-fns` 的 `format` */
557
+ valueFormat?: string;
558
+ /** 在 `ProForm` 内写入 `proFormBridge`(字段名) */
559
+ name?: string;
560
+ /** 为 `true` 时,悬停触发器右侧显示清除按钮,点击清空已选日期 */
561
+ allowClear?: boolean;
562
+ };
563
+
564
+ declare type ProDataPickerSize = "small" | "normal" | "big";
565
+
566
+ /**
567
+ * 基于 shadcn `Dialog` 的封装:支持默认标题;未传 `renderFooter` 时使用 `ProButton` 默认底栏(取消 / 确定)。
568
+ * 可选 `onClose` / `onOk` 对应关闭与确定(仅默认底栏与内置关闭钮;自定义 `renderFooter` 请自行处理)。
569
+ * 受控(传 `open`)时「确定」不自动关弹,由 `onOk` 内自行更新 `open`。
570
+ * 非受控时「确定」默认自动关弹;`onOk` 返回 `false` 时保持打开。
571
+ * 头尾也可通过 `renderHeader` / `renderFooter` 完全自定义。
572
+ * 渲染函数会收到 `open` 与 `setOpen`,便于在自定义按钮中关闭弹层。
573
+ */
574
+ export declare function ProDialog({ trigger, title, renderHeader, renderFooter, headerClassName, footerClassName, onClose, onOk, open: openProp, onOpenChange, defaultOpen, modal, children, className, showCloseButton, onPointerDownOutside, onInteractOutside, onFocusOutside, onEscapeKeyDown, ...contentProps }: ProDialogProps): React_2.JSX.Element;
575
+
576
+ export declare type ProDialogContext = {
577
+ /** 当前是否打开(受控时为外部 `open`,非受控时为内部同步状态) */
578
+ open: boolean;
579
+ setOpen: (open: boolean) => void;
580
+ };
581
+
582
+ export declare type ProDialogProps = Omit<React_2.ComponentProps<typeof Dialog>, "children"> & {
583
+ /** 包在 `DialogTrigger asChild` 内;纯受控弹层可不传 */
584
+ trigger?: React_2.ReactElement;
585
+ /** 头部标题文案(用于默认 `DialogTitle`;与 `renderHeader` 互斥,优先 `renderHeader`) */
586
+ title?: React_2.ReactNode;
587
+ /** 完全自定义头部区域 */
588
+ renderHeader?: (ctx: ProDialogContext) => React_2.ReactNode;
589
+ /**
590
+ * 自定义底部区域(建议内部使用 `DialogClose` 或 `ctx.setOpen(false)` 关闭)。
591
+ * 未传时渲染默认底部:`ProButton`「取消」(`variant="default"`)与「确定」(`variant="primary"`),尺寸均为 `default`(常规)。
592
+ */
593
+ renderFooter?: (ctx: ProDialogContext) => React_2.ReactNode;
594
+ /** 套在默认 `DialogHeader` 上的 `className`(仅默认 `title` 头部时生效) */
595
+ headerClassName?: string;
596
+ /** 套在 `renderFooter` 外层 `DialogFooter` 上的 `className` */
597
+ footerClassName?: string;
598
+ /** 主体内容(标题与底部之间) */
599
+ children?: React_2.ReactNode;
600
+ /** 点击头部关闭钮、内容区内置关闭钮,或默认底栏「取消」时触发(默认底栏 / 默认关闭钮;自定义 `renderFooter` 需自行调用) */
601
+ onClose?: () => void;
602
+ /**
603
+ * 默认底栏「确定」点击时触发。
604
+ * **受控**(传了 `open`)时不会自动关弹,请在回调里自行更新外部的 `open`(例如 `setOpen(false)`)。
605
+ * **非受控**时默认在回调后由组件内关闭弹层;若返回 `false` 则保持打开(便于校验失败不关弹)。
606
+ */
607
+ onOk?: () => void | false;
608
+ } & Omit<React_2.ComponentProps<typeof DialogContent>, "children" | "showCloseButton" | "closeButtonOnClick"> & {
609
+ showCloseButton?: boolean;
610
+ };
611
+
612
+ export declare type ProEChartsLegendSeriesItem = {
613
+ name?: string;
614
+ type?: string;
615
+ itemStyle?: {
616
+ color?: string;
617
+ };
618
+ data?: unknown[];
619
+ };
620
+
621
+ export declare type ProEChartsThemePartials = {
622
+ tokens: ProEChartsThemeTokens;
623
+ scrollLegendChrome: LegendComponentOption;
624
+ };
625
+
626
+ export declare type ProEChartsThemeTokens = {
627
+ textSecondary: string;
628
+ textDisabled: string;
629
+ };
630
+
631
+ export declare type ProEChartsTooltipParam = {
632
+ seriesName?: string;
633
+ seriesType?: string;
634
+ color?: string | Record<string, unknown>;
635
+ value?: unknown;
636
+ axisValue?: string;
637
+ };
638
+
639
+ /**
640
+ * 品牌筛选条:根据 `options` 渲染可单选或多选的紧凑项,项间距 2px;`size` 控制高度、内边距与字阶(默认 `normal`)。
641
+ * `multiple` 默认 `true`;值统一为数组 `value`,单选时至多一项。
642
+ * 多选时在首部自动生成「全部」:`value` 为全部可选(未 `disable`)项的有序集合时视为全选;此时页面上仅有「全部」呈选中样式,各分项不高亮;逐项选满后与点「全部」等价(`value` 同上)。全选态下再点击某一分项视为「只选中该项」(`value` 变为仅该项),而非从全集中取消该项。单选与多选均要求至少保留一项选中:仅剩一项时再次点击该项不会取消勾选;全选态下再次点击「全部」也不会取消勾选。
643
+ * 提供可选 `name` 且在 `ProForm` 上下文中时,选中数组与 `proFormBridge` 同步,可通过 `useFormValues` / `useField` / `getField` 等读写。
644
+ */
645
+ export declare function ProFilter<T extends string | number = string | number>(props: ProFilterProps<T>): React_2.ReactElement;
646
+
647
+ export declare type ProFilterOption<T extends string | number = string | number> = {
648
+ label: React_2.ReactNode;
649
+ value: T;
650
+ disable?: boolean;
651
+ };
652
+
653
+ export declare type ProFilterProps<T extends string | number = string | number> = {
654
+ /** 筛选项配置:`label`、`value`、`disable`。 */
655
+ options: ProFilterOption<T>[];
656
+ /** 尺寸规格,默认 `normal`。稿面:`small` 18px;`normal` / `big` 均为 24px(样式一致)。 */
657
+ size?: ProFilterSize;
658
+ className?: string;
659
+ /** 多选,默认 `true`;单选时 `value` 至多一项(长度为 0 或 1)。 */
660
+ multiple?: boolean;
661
+ /** 选中值数组;单选时长度 0 或 1,多选可多元素。 */
662
+ value?: T[];
663
+ /** 非受控初始值;可为数组,或单个 `string` / `number`(会自动包成一项数组)。 */
664
+ defaultValue?: T | T[];
665
+ onChange?: (value: T[]) => void;
666
+ /** 置于 `ProForm` 内时写入 `proFormBridge`(字段值为当前选中数组)。 */
667
+ name?: string;
668
+ };
669
+
670
+ export declare type ProFilterSize = "small" | "normal" | "big";
671
+
672
+ /**
673
+ * 为子树中的 Pro 组件提供 `formId` 上下文;带 `name` 的字段会写入 `proFormBridge`。
674
+ */
675
+ export declare function ProForm({ formId, defaultValues, persistToLocalStorage, className, children, ...rest }: ProFormProps): React_2.JSX.Element;
676
+
677
+ declare type ProFormBridge = {
678
+ engine: typeof engine;
679
+ getFormValues: (formId: string) => Record<string, unknown>;
680
+ setField: (formId: string, fieldName: string, value: unknown) => void;
681
+ /** 按字段 `name` 批量写入快照;已存在的键会被覆盖,界面会随 `useFormValues` / `useField` 更新 */
682
+ setFormValues: (formId: string, values: Record<string, unknown>) => void;
683
+ getFieldByPath: (path: string) => unknown;
684
+ getField: (formId: string, fieldName: string) => unknown;
685
+ hasField: (formId: string, fieldName: string) => boolean;
686
+ clearFormKeys: (formId: string) => void;
687
+ useFormValues: (formId: string) => Record<string, unknown>;
688
+ useField: (formId: string, fieldName: string) => unknown;
689
+ useFieldByPath: (path: string) => unknown;
690
+ };
691
+
692
+ export declare const proFormBridge: ProFormBridge;
693
+
694
+ declare type ProFormContextValue = {
695
+ formId: string;
696
+ };
697
+
698
+ /** 按字段 `name` 为键的初始值;写入 `proFormBridge` 后由子字段消费 */
699
+ declare type ProFormDefaultValues = Record<string, unknown>;
700
+
701
+ declare type ProFormFieldSync<V> = {
702
+ active: false;
703
+ } | {
704
+ active: true;
705
+ merged: V | undefined;
706
+ commit: (next: V) => void;
707
+ };
708
+
709
+ export declare type ProFormProps = React_2.HTMLAttributes<HTMLDivElement> & {
710
+ /** 引擎中识别该表单的 id,并与各字段 `name` 组合成快照键 */
711
+ formId: string;
712
+ /**
713
+ * 表单级默认值:键为各 Pro 字段的 `name`,值为该字段在引擎中的初始快照。
714
+ * 仅在该 `formId` + 本对象组合首次生效,且对应字段在引擎中尚不存在时写入。
715
+ */
716
+ defaultValues?: ProFormDefaultValues;
717
+ /**
718
+ * 是否将表单快照实时写入 localStorage(键为 `formId`)。
719
+ * 开启后会在挂载时尝试从本地恢复;每次引擎中该表单字段变化时同步保存。
720
+ * @default false
721
+ */
722
+ persistToLocalStorage?: boolean;
723
+ };
724
+
725
+ export declare function ProIcon({ type, size, className, style, role, ...props }: ProIconProps): React_2.JSX.Element | null;
726
+
727
+ export declare type ProIconProps = Omit<React_2.HTMLAttributes<HTMLSpanElement>, "children"> & {
728
+ /** 图标名称,对应设计系统 SVG 文件名(已规范化) */
729
+ type: ProIconType;
730
+ /** 图标尺寸,默认 16 */
731
+ size?: number | string;
732
+ };
733
+
734
+ /** 图标 type 对应的原始文件路径(便于排查来源) */
735
+ export declare const proIconSourceMap: Record<ProIconType, string>;
736
+
737
+ export declare type ProIconType = "path-2" | "quote-mini-window" | "align-vertical-center-03" | "annotation" | "arrowed-segment" | "caret-left" | "caret-right" | "double-down" | "double-left" | "double-right" | "double-up" | "down" | "left" | "revert" | "right" | "rollback" | "caret-down" | "caret-up" | "up" | "broken-line" | "calculate-stroke-1" | "calculate-stroke" | "check" | "divide" | "equal-to" | "minus" | "multiplication" | "plus" | "union-1" | "union-2" | "union-23" | "channel-lines" | "chart-shape-stroke-1" | "bars" | "curve" | "icon-stroke" | "candle-stick-chart" | "union-28" | "union-29" | "union-30" | "union-31" | "union-32" | "union-33" | "check-circle-o" | "circular" | "communication-shape-stroke" | "contacts" | "customer-service" | "heart-o" | "heart" | "idcard" | "like-o" | "mail" | "message" | "mobile" | "phone" | "send-01" | "share-alt" | "share" | "smile-o" | "wechat" | "team" | "union-21" | "user" | "arrow" | "cursor-close" | "expand-02" | "open" | "pointing" | "resize-col" | "resize-row" | "unavailable" | "callin" | "delete" | "download" | "drag-drop" | "edit" | "eye-hidden" | "eye-o" | "font-adjust" | "popup" | "save" | "swap" | "union-3" | "union-4" | "upload" | "elliptical" | "f9" | "file-path-3" | "document" | "file" | "group-1393" | "pdf" | "picture" | "rectangle-3-1" | "rectangle-3" | "union-24" | "union-25" | "union-26" | "folder-open" | "folder" | "frame-21-1" | "frame-21-2" | "frame-21-3" | "frame-21-4" | "frame-21" | "func-export" | "gann-box" | "general-group-manage" | "general-follow-collect" | "general-path-stroke" | "general-path" | "general-image-copy" | "app-full-normal" | "app-min-normal" | "app-restore-normal" | "appstore-o" | "arrows-alt" | "bell" | "belled" | "calendar" | "camera-o" | "clock-circle" | "general-close" | "copy" | "desktop" | "error" | "flag" | "flash" | "group-1394" | "help-circle-o" | "home" | "info-circle-o" | "jingxuan" | "link" | "location" | "lock-o" | "magnify-panel" | "minus-square-o" | "more-vertical" | "more" | "need-to-ask" | "paper-clip" | "plus-square-o" | "pushpin-o" | "pushpin" | "reload" | "scan" | "general-screenshot" | "search" | "setting" | "shrink" | "skin" | "star-o" | "star" | "subtract-1" | "subtract-2" | "subtract-3" | "subtract-4" | "subtract-5" | "subtract-6" | "subtract" | "sync" | "tag-o" | "general-to-top" | "union-10" | "union-11" | "union-12" | "union-5" | "union-6" | "union-7" | "union-8" | "union-9" | "unlock-o" | "warning" | "group-37" | "hexagon" | "horizontal-line" | "column-vertical-4" | "grid-4" | "grid-6" | "grid-9" | "like-thumb-up" | "line" | "linear-regression-bands" | "linear-regression-lines" | "measure-target" | "measurement" | "news-follow-collect" | "news-path-1" | "news-all-sentiment" | "news-daily-weekly-report" | "news-shape" | "news-important-info" | "union-13" | "union-14" | "union-15" | "union-16" | "union-17" | "union-18" | "union-19" | "union-20" | "union-22" | "union-27" | "vector-1" | "vector" | "operation-default-1" | "operation-default-2" | "operation-default" | "parallel-lines" | "price-label" | "ray" | "rectangle-1157" | "rectangle" | "screenshot" | "segment" | "standard-deviation-channel" | "quote-widget" | "text-tool" | "time-scale" | "triangle" | "union" | "vertical-line" | "wave-ruler";
738
+
739
+ /**
740
+ * 在 shadcn Input 之上的业务封装:统一加载态、前后缀图标与右侧指示。
741
+ */
742
+ export declare function ProInput({ className, wrapClassName, loading, disabled, size, preIcon, afterIcon, name, value, defaultValue, onChange, ...props }: ProInputProps): React_2.JSX.Element;
743
+
744
+ export declare type ProInputProps = Omit<InputComponentProps, "disabled" | "size"> & {
745
+ /** 在 `ProForm` 内与其它字段一起做引擎同步;不配 `ProForm` 时无 effect */
746
+ name?: string;
747
+ /** 是否禁用。`loading` 为 `true` 时也会禁用。 */
748
+ disabled?: InputComponentProps["disabled"];
749
+ /** 是否显示右侧加载中并禁止输入(与 `disabled` 叠加)。 */
750
+ loading?: boolean;
751
+ /** 尺寸:固定宽度、高度与水平内边距。 */
752
+ size?: ProInputSize;
753
+ /** 外层包裹 div 的 className,可覆盖默认宽度等布局样式。 */
754
+ wrapClassName?: string;
755
+ /** 输入框左侧图标(如 `<ProIcon type="search" />`)。 */
756
+ preIcon?: React_2.ReactNode;
757
+ /** 输入框右侧图标;`loading` 为 `true` 时由加载指示替代。 */
758
+ afterIcon?: React_2.ReactNode;
759
+ };
760
+
761
+ declare type ProInputSize = keyof typeof SIZE_CONFIG;
762
+
763
+ /**
764
+ * 全区域半透明遮罩 + 旋转加载图标,需放在 `position: relative` 的容器内使用。
765
+ */
766
+ export declare function ProLoading({ size, show, className }: ProLoadingProps): JSX.Element | null;
767
+
768
+ export declare type ProLoadingProps = {
769
+ /** 加载指示器尺寸:`small`(40px)、`normal`(64px,ProTable 默认)、`big`(96px)。 */
770
+ size?: ProLoadingSize;
771
+ /** 是否显示加载遮罩;为 `false` 时不渲染。 */
772
+ show?: boolean;
773
+ className?: string;
774
+ };
775
+
776
+ export declare type ProLoadingSize = "small" | "normal" | "big";
777
+
778
+ export declare function ProMultiSelect({ options: optionsProp, value, defaultValue, onChange, placeholder, disabled, loading, className, contentClassName, clearable, maxTagCount, emptyText, size, name, appIdMap, onApiRender, allowSearch, onSearch, }: ProMultiSelectProps): React_2.JSX.Element;
779
+
780
+ /** 自定义远程搜索:传入关键词,返回选项列表(支持 Promise)。 */
781
+ export declare type ProMultiSelectOnSearch = (keyword: string) => ProMultiSelectOption[] | Promise<ProMultiSelectOption[]>;
782
+
783
+ export declare type ProMultiSelectOption = {
784
+ label: React_2.ReactNode;
785
+ value: string;
786
+ disabled?: boolean;
787
+ };
788
+
789
+ export declare type ProMultiSelectProps = {
790
+ /** 未配置 `appIdMap` 时必填;配置网关后由接口填充,可省略 */
791
+ options?: ProMultiSelectOption[];
792
+ value?: string[];
793
+ defaultValue?: string[];
794
+ onChange?: (value: string[]) => void;
795
+ placeholder?: string;
796
+ disabled?: boolean;
797
+ loading?: boolean;
798
+ className?: string;
799
+ contentClassName?: string;
800
+ clearable?: boolean;
801
+ maxTagCount?: number;
802
+ emptyText?: React_2.ReactNode;
803
+ /** 输入框尺寸:trigger 与已选 tag 的样式。 */
804
+ size?: ProSelectSize_2;
805
+ /** 在 `ProForm` 内写入 `proFormBridge`(字段名) */
806
+ name?: string;
807
+ /**
808
+ * 配置后组件内用 `execApiById` 拉取数据(与 ProSelect / RequestPro 网关 Story 一致)。
809
+ */
810
+ appIdMap?: ProSelectGwNbAppIds;
811
+ /**
812
+ * 配置了 `appIdMap` 时:`options` / `search` 接口的 `res.data` 先经此函数转换,再解析为选项。
813
+ */
814
+ onApiRender?: ProSelectOnApiRender;
815
+ /**
816
+ * 为 true 且配置了 `appIdMap` 或 `onSearch` 时:下拉顶部展示搜索框,输入关键词后远程拉取结果。
817
+ */
818
+ allowSearch?: boolean;
819
+ /**
820
+ * 自定义远程搜索函数;与 `appIdMap.search` 二选一(同时配置时优先 `appIdMap`)。
821
+ * 关键词防抖后调用,须返回 `{ label, value }[]`(可选 `disabled`)。
822
+ */
823
+ onSearch?: ProMultiSelectOnSearch;
824
+ };
825
+
826
+ /**
827
+ * 品牌面板容器:固定背景、内边距与圆角,可通过 `className` 扩展样式。
828
+ */
829
+ export declare function ProPanel({ className, ...props }: ProPanelProps): React_2.JSX.Element;
830
+
831
+ export declare type ProPanelProps = React_2.ComponentProps<"div">;
832
+
833
+ /**
834
+ * 基于 shadcn `Popover` + `Calendar`(range)的范围日期选择,触发器与面板样式对齐 ProDataPicker。
835
+ */
836
+ export declare function ProRangePicker({ value, defaultValue, onValueChange, onSelect, startPlaceholder, endPlaceholder, disabled, className, contentClassName, size, displayFormat, valueFormat, name, numberOfMonths, allowClear, }: ProRangePickerProps): React_2.JSX.Element;
837
+
838
+ declare type ProRangePickerCalendarOnSelect = OnSelectHandler<DateRange | undefined>;
839
+
840
+ export declare type ProRangePickerInput = {
841
+ from?: Date | string;
842
+ to?: Date | string;
843
+ };
844
+
845
+ export declare type ProRangePickerProps = {
846
+ /** 当前区间(受控),起止支持 `Date` 或按 `valueFormat` 格式化的字符串 */
847
+ value?: ProRangePickerInput;
848
+ /** 默认区间(非受控),起止支持 `Date` 或按 `valueFormat` 格式化的字符串 */
849
+ defaultValue?: ProRangePickerInput;
850
+ /**
851
+ * 仅在区间选满(起止均有)或清空为 `undefined` 时触发,便于对齐 antd RangePicker 的提交时机。
852
+ * 选择起点但未选终点过程中的临时状态只反映在面板内,不会触发此回调。
853
+ * 输出值按 `valueFormat` 格式化为字符串。
854
+ */
855
+ onValueChange?: (range: ProRangePickerValue | undefined) => void;
856
+ /** 与 `react-day-picker` `onSelect` 一致,含选择过程中的临时区间 */
857
+ onSelect?: ProRangePickerCalendarOnSelect;
858
+ startPlaceholder?: string;
859
+ endPlaceholder?: string;
860
+ disabled?: boolean;
861
+ className?: string;
862
+ contentClassName?: string;
863
+ size?: ProRangePickerSize;
864
+ displayFormat?: string;
865
+ /** 值输出格式(`onValueChange` / 表单快照),传给 `date-fns` 的 `format` */
866
+ valueFormat?: string;
867
+ /** 在 `ProForm` 内写入 `proFormBridge`(字段名) */
868
+ name?: string;
869
+ /** 面板内并排月份数,默认 `2`(对齐 antd RangePicker) */
870
+ numberOfMonths?: number;
871
+ /** 为 `true` 时,悬停触发器右侧显示清除按钮,点击清空已选区间 */
872
+ allowClear?: boolean;
873
+ };
874
+
875
+ declare type ProRangePickerSize = "small" | "normal" | "big";
876
+
877
+ /** 按 `valueFormat` 格式化后的区间值 */
878
+ export declare type ProRangePickerValue = {
879
+ from?: string;
880
+ to?: string;
881
+ };
882
+
883
+ export declare function ProResizerHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
884
+ withHandle?: boolean;
885
+ }): JSX.Element;
886
+
887
+ export declare function ProResizerPanel({ ...props }: ResizablePrimitive.PanelProps): JSX.Element;
888
+
889
+ export declare function ProResizerPanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): JSX.Element;
890
+
891
+ export declare const ProSecondaryTabs: React_2.MemoExoticComponent<typeof ProSecondaryTabsComponent>;
892
+
893
+ export declare type ProSecondaryTabsChangeHandler = (previousKey: string, currentKey: string) => void;
894
+
895
+ declare function ProSecondaryTabsComponent({ items, defaultActiveKey, activeKey: activeKeyProp, includeContent, onTabsChange, className, contentClassName, }: ProSecondaryTabsProps): React_2.JSX.Element | null;
896
+
897
+ export declare type ProSecondaryTabsItem = {
898
+ key: string;
899
+ name: React_2.ReactNode;
900
+ content: React_2.ReactNode;
901
+ /** 为 `true` 时不可点击,展示禁用样式。 */
902
+ disable?: boolean;
903
+ };
904
+
905
+ export declare type ProSecondaryTabsProps = {
906
+ items: ProSecondaryTabsItem[];
907
+ /** 非受控时的初始选中项 `key`。不传时取第一个未禁用项,否则取第一项。 */
908
+ defaultActiveKey?: string;
909
+ /** 受控选中项 `key`。 */
910
+ activeKey?: string;
911
+ /**
912
+ * 是否渲染 `content` 面板。
913
+ * @default true
914
+ */
915
+ includeContent?: boolean;
916
+ /** 选中 `key` 变化时触发;与 `includeContent` 无关,切换成功时调用。 */
917
+ onTabsChange?: ProSecondaryTabsChangeHandler;
918
+ className?: string;
919
+ /** 内容区根节点额外 className。 */
920
+ contentClassName?: string;
921
+ };
922
+
923
+ export declare function ProSelect({ options: optionsProp, value, defaultValue, onChange, placeholder, disabled, loading, clearable, className, contentClassName, contentStyle, popupZIndex, emptyText, size, name, appIdMap, onApiRender, allowSearch, children, allowSelectNonLeaf, }: ProSelectProps): React_2.JSX.Element;
924
+
925
+ export declare namespace ProSelect {
926
+ var Option: typeof ProSelectOptionEl;
927
+ }
928
+
929
+ /**
930
+ * 网关 `execApiById` 脚本 id(调用方式与「RequestPro 网关 API」Story 一致;请求头由内部读取联调配置,非组件 props)。
931
+ *
932
+ * - `options`:挂载后请求**选项列表**;若配置了 `onApiRender`,会先对 `res.data` 做转换,否则直接使用 `res.data`;最终须能被解析为 `{ label, value }[]`(可选 `disabled`)。
933
+ * - `search`(可选):仅在 `allowSearch` 为 true 且用户在触发器内输入非空关键词时请求**筛选列表**;第二参 `params` 固定为 `{ keyword: 用户输入 }`。返回数据同样会先经 `onApiRender`(若配置)。未配置 `search` 时组件会写入错误文案且搜索结果为空。
934
+ */
935
+ export declare type ProSelectGwNbAppIds = {
936
+ options: string;
937
+ search?: string;
938
+ };
939
+
940
+ /**
941
+ * 配置了 `appIdMap` 时:`execApiById` 返回的 `res.data` 先经过此函数,返回值再按 `{ label, value }[]` 规则解析为选项(与未配置时的约定一致)。
942
+ * options、search 两条请求共用同一转换函数。
943
+ */
944
+ declare type ProSelectOnApiRender = (data: unknown) => unknown;
945
+
946
+ export declare type ProSelectOption = {
947
+ label: React_2.ReactNode;
948
+ value: string;
949
+ disabled?: boolean;
950
+ /** 配置子级后进入级联筛选模式;叶子节点为最终可选值 */
951
+ children?: ProSelectOption[];
952
+ };
953
+
954
+ declare function ProSelectOptionEl(_props: ProSelectOptionProps): null;
955
+
956
+ declare namespace ProSelectOptionEl {
957
+ var displayName: string;
958
+ }
959
+
960
+ export declare type ProSelectOptionProps = {
961
+ value: string;
962
+ label: React_2.ReactNode;
963
+ disabled?: boolean;
964
+ children?: React_2.ReactNode;
965
+ };
966
+
967
+ export declare type ProSelectProps = {
968
+ /** 未配置 `appIdMap` 时必填;配置网关后由接口填充,可省略 */
969
+ options?: ProSelectOption[];
970
+ value?: string;
971
+ defaultValue?: string;
972
+ onChange?: (value: string | undefined) => void;
973
+ placeholder?: string;
974
+ disabled?: boolean;
975
+ loading?: boolean;
976
+ /** 为 true 时在有选中项时显示清除按钮,点击可清空选择 */
977
+ clearable?: boolean;
978
+ className?: string;
979
+ contentClassName?: string;
980
+ /** 合并到下拉 listbox 的 style;`zIndex` 可覆盖默认浮层层级 */
981
+ contentStyle?: React_2.CSSProperties;
982
+ /** 下拉层 z-index,默认 `Z_INDEX.popup` */
983
+ popupZIndex?: number;
984
+ emptyText?: React_2.ReactNode;
985
+ size?: ProSelectSize;
986
+ /** 在 `ProForm` 内写入 `proFormBridge`(字段名) */
987
+ name?: string;
988
+ /**
989
+ * 配置后组件内用 `execApiById` 拉取数据(与 RequestPro 网关 Story 一致)。
990
+ * 联调请求头由内部统一处理,非组件入参(Storybook 见该 Story 侧栏与 `getGwNbApiDevHeaders`)。
991
+ */
992
+ appIdMap?: ProSelectGwNbAppIds;
993
+ /**
994
+ * 配置了 `appIdMap` 时生效:`options` / `search` 接口的 `res.data` 先经此函数转换,返回值再解析为下拉项(须可被解析为 `{ label, value }[]`,见 `defaultGwNbMapOptions`)。
995
+ */
996
+ onApiRender?: ProSelectOnApiRender;
997
+ /**
998
+ * 为 true 且配置了 `appIdMap` 时:在触发器内直接输入关键词,自动展开下拉并调用 `appIdMap.search` 展示结果。
999
+ * 未配置 `allowSearch` 时触发器不可输入(纯点击选择)。
1000
+ */
1001
+ allowSearch?: boolean;
1002
+ /**
1003
+ * 以 `ProSelect.Option` 声明级联选项;配置后下拉以多列级联方式展示(与 `options` 中 `children` 字段等效,且优先于 `options`)。
1004
+ */
1005
+ children?: React_2.ReactNode;
1006
+ /**
1007
+ * 级联模式下是否允许选中非叶子节点(含 `children` 的父级)。默认 `true`;
1008
+ * 为 `false` 时仅叶子节点可被点击选中,父级仅用于悬停展开下一列。
1009
+ */
1010
+ allowSelectNonLeaf?: boolean;
1011
+ };
1012
+
1013
+ declare type ProSelectSize = "small" | "normal" | "big";
1014
+
1015
+ declare type ProSelectSize_2 = "small" | "normal" | "big";
1016
+
1017
+ /**
1018
+ * 在 shadcn Sonner(`Toaster`)之上的封装:统一挂载点样式与后续扩展入口。
1019
+ * Toast 各 type 的视觉与品牌稿一致(圆角、描边、背景、阴影、正文字号/行高、图标色)。
1020
+ */
1021
+ export declare function ProSonner({ className, toastOptions, icons, style, richColors, ...props }: ProSonnerProps): React_2.JSX.Element;
1022
+
1023
+ export declare type ProSonnerProps = React_2.ComponentProps<typeof Toaster>;
1024
+
1025
+ /**
1026
+ * 在 Radix Switch 之上的业务封装:统一 Pro 品牌外观(稿面固定 26×16 轨道 + 8×8 滑块)。
1027
+ */
1028
+ export declare function ProSwitch({ className, children, disabled, name, checked, defaultChecked, onCheckedChange, ...props }: ProSwitchProps): React_2.JSX.Element;
1029
+
1030
+ export declare type ProSwitchProps = Omit<SwitchComponentProps, "asChild"> & {
1031
+ /** 可选:显示在开关右侧的文案或节点 */
1032
+ children?: React_2.ReactNode;
1033
+ /** 在 `ProForm` 内写入 `proFormBridge`(字段名) */
1034
+ name?: string;
1035
+ };
1036
+
1037
+ /**
1038
+ * 基于 AG Grid 的数据表格:默认 Quartz 主题与 `AllCommunityModule`,其余 props 与 `AgGridReact` 一致。
1039
+ * 列定义可使用 `align: 'left' | 'center' | 'right'`,表头与单元格同步对齐。
1040
+ *
1041
+ * 传入 `bridgeName` 时,在组件内调用 `useProDataBridge` 绑定 `rowData` / `loading`;可选 `bridgeInfiniteScroll` 在触底时调用 `loadNextPage`。
1042
+ * 可选 `pagePagination` 在表格底部自动渲染页码分页条;可选 `scrollPagination` 在滚动至底部时触发 `onScrollEnd`(二者互斥)。
1043
+ * 可选配置 `headerContextMenuItems` / `cellContextMenuItems`(非空数组)启用表头或单元格自定义右键菜单;不设则无。
1044
+ */
1045
+ export declare function ProTable<TData = unknown>({ bridgeName, bridgeInfiniteScroll, wrapperClassName, className, modules, defaultColDef, columnDefs, rowHeight, headerHeight, noRowsOverlayComponent, enableRowSelection, tableId, onRowClicked, onSelectionChanged, onSelectedRowChange, ...gridProps }: ProTableProps<TData>): JSX.Element;
1046
+
1047
+ declare type ProTableBridge = {
1048
+ engine: typeof engine_2;
1049
+ getSelectedRow: <TData = unknown>(tableId: string) => TData | undefined;
1050
+ /**
1051
+ * 手动设置当前选中行(如默认选中首行)。
1052
+ * 会写入引擎快照;若对应 `tableId` 的 `ProTable` 已挂载,会同步 AG Grid 行高亮。
1053
+ */
1054
+ setSelectedRow: <TData = unknown>(tableId: string, row: TData | undefined) => void;
1055
+ hasSelectedRow: (tableId: string) => boolean;
1056
+ clearSelectedRow: (tableId: string) => void;
1057
+ useSelectedRow: <TData = unknown>(tableId: string) => TData | undefined;
1058
+ };
1059
+
1060
+ export declare const proTableBridge: ProTableBridge;
1061
+
1062
+ /** 单元格右键菜单单项 */
1063
+ declare type ProTableCellContextMenuItem<TData = unknown> = {
1064
+ label: string;
1065
+ onClick: (event: CellContextMenuEvent<TData>) => void;
1066
+ };
1067
+
1068
+ /** 表头右键菜单单项 */
1069
+ declare type ProTableHeaderContextMenuItem<TData = unknown> = {
1070
+ label: string;
1071
+ onClick: (event: ColumnHeaderContextMenuEvent<TData>) => void;
1072
+ };
1073
+
1074
+ /** 页码分页条配置(与 {@link PagePaginationBar} 一致,由 ProTable 在底部自动渲染) */
1075
+ declare type ProTablePagePaginationConfig = PagePaginationBarProps & {
1076
+ /** 分页条外层 className */
1077
+ className?: string;
1078
+ };
1079
+
1080
+ export declare type ProTableProps<TData = unknown> = Omit<AgGridReactProps<TData>, "columnDefs"> & {
1081
+ /** 外层容器:主题、圆角、最小高度等。默认宽度 `40vw`,可用 `wrapperClassName` 覆盖 */
1082
+ wrapperClassName?: string;
1083
+ columnDefs?: SSColDef[];
1084
+ /** 是否允许行选中;默认不允许 */
1085
+ enableRowSelection?: boolean;
1086
+ /** 开启行选中时必填:作为表格选中行在引擎中的唯一标识 */
1087
+ tableId?: string;
1088
+ /**
1089
+ * 行选中变化时回调(与 `enableRowSelection` 配合使用)。
1090
+ * 当前为单选模式:选中时为该行数据,取消选中或未选中时为 `undefined`。
1091
+ */
1092
+ onSelectedRowChange?: (selectedRow: TData | undefined) => void;
1093
+ /**
1094
+ * 与 {@link useProDataBridge} 的 `name` 一致时,在表格内订阅 bridge 数据并驱动 `rowData` / `loading`。
1095
+ * 与 `rowData` **互斥**:同时传入会抛错(请移除 `rowData`)。
1096
+ */
1097
+ bridgeName?: string;
1098
+ /**
1099
+ * 仅在传入 `bridgeName` 时生效:纵向滚动至底部时自动调用 `loadNextPage`。
1100
+ * 建议设置稳定的 `getRowId`;末页是否还可加载由 {@link useProDataBridge} 快照中的 `hasMore`(由 `ProDataBridge` 维护)判断。
1101
+ */
1102
+ bridgeInfiniteScroll?: boolean;
1103
+ /**
1104
+ * 表头右键菜单项;不传或传空数组则不展示自定义菜单。
1105
+ * 每项需 `label`、`onClick`。
1106
+ */
1107
+ headerContextMenuItems?: ProTableHeaderContextMenuItem<TData>[];
1108
+ /**
1109
+ * 单元格(表体)右键菜单项;不传或传空数组则不展示自定义菜单。
1110
+ */
1111
+ cellContextMenuItems?: ProTableCellContextMenuItem<TData>[];
1112
+ /**
1113
+ * 页码分页:传入底部分页条配置后,ProTable 在表格下方自动渲染 {@link PagePaginationBar}。
1114
+ * 与 {@link scrollPagination} 互斥;表格会关闭 AG Grid 内置分页(`pagination={false}`)。
1115
+ */
1116
+ pagePagination?: ProTablePagePaginationConfig;
1117
+ /**
1118
+ * 滚动分页:纵向滚动至底部时触发 `onScrollEnd`,并提供保持视口的 `insertData`。
1119
+ * 与 {@link pagePagination} 互斥;建议同时设置 `getRowId` 与 `suppressScrollOnNewData`。
1120
+ */
1121
+ scrollPagination?: ProTableScrollPaginationConfig<TData>;
1122
+ /**
1123
+ * 可选:绑定 AG Grid 外层 shell(`.ss-table-shell`)的 ref,供外部控制滚动位置。
1124
+ * 传入 `bridgeName` 时,内部仍复用同一 ref 处理 `scrollResetToken` 归零与 `bridgeInfiniteScroll` 触底判定。
1125
+ */
1126
+ gridShellRef?: RefObject<HTMLDivElement | null>;
1127
+ };
1128
+
1129
+ /** 滚动分页:纵向滚动至底部时自动触发 `onScrollEnd` */
1130
+ declare type ProTableScrollPaginationConfig<TData = unknown> = {
1131
+ /**
1132
+ * 更新受控 `rowData`(通常即 `setRows` 的函数式更新)。
1133
+ * ProTable 在 `insertData` 内会先记录当前滚动位置再调用此回调。
1134
+ */
1135
+ onRowDataChange: (updater: (prev: TData[]) => TData[]) => void;
1136
+ /** 滚动至已加载列表底部时触发 */
1137
+ onScrollEnd: (payload: ProTableScrollPaginationOnScrollEndPayload<TData>) => void;
1138
+ /**
1139
+ * 距滚动条底端的像素容差,默认 `1`。
1140
+ * 仅当 `scrollTop + clientHeight >= scrollHeight - bottomTolerancePx` 时视为触底(肉眼滚到底)。
1141
+ */
1142
+ bottomTolerancePx?: number;
1143
+ /** 为 true 时不触发 `onScrollEnd` */
1144
+ loading?: boolean;
1145
+ /** 为 false 时不触发,默认 true */
1146
+ hasMore?: boolean;
1147
+ };
1148
+
1149
+ /** 滚动分页:`onScrollEnd` 触发时由 ProTable 注入的 `insertData`(更新 rowData 并保持视口) */
1150
+ declare type ProTableScrollPaginationOnScrollEndPayload<TData = unknown> = {
1151
+ api: GridApi<TData>;
1152
+ insertData: (updater: (prev: TData[]) => TData[]) => void;
1153
+ };
1154
+
1155
+ /**
1156
+ * 基于 shadcn `Tabs`(Radix)的 Pro 封装:列表与触发器使用品牌色与稿面字体。
1157
+ */
1158
+ export declare function ProTabs({ className, width, style, contentClassName, ...props }: ProTabsProps): React_2.JSX.Element;
1159
+
1160
+ export declare function ProTabsContent({ className, style, ...props }: React_2.ComponentProps<typeof TabsContent>): React_2.JSX.Element;
1161
+
1162
+ export declare function ProTabsList({ className, variant, size, tabHeaderStart, tabHeaderEnd, tabHeaderFill, triggerMinWidth, triggerMaxWidth, ...props }: ProTabsListProps): React_2.JSX.Element;
1163
+
1164
+ export declare type ProTabsListProps = React_2.ComponentProps<typeof TabsList> & {
1165
+ /**
1166
+ * 标签触发器尺寸:`normal` 内容区 16px 高,`big` 为 24px;均为上下 4px padding。
1167
+ * @default "normal"
1168
+ */
1169
+ size?: ProTabsSize;
1170
+ /**
1171
+ * 标签栏 **左侧** 自定义区域(如工具按钮)。与 `tabHeaderEnd` 二选一或同时使用均可。
1172
+ * 传入后,整行包在 `w-full` 容器内,`variant="default"` 时 **底部分隔线** 会横跨 `ProTabs` 全宽(标签触发器本身仍随文案或 `tabHeaderFill` 规则,不会被这条线「撑开」成均分)。
1173
+ */
1174
+ tabHeaderStart?: React_2.ReactNode;
1175
+ /**
1176
+ * 标签栏 **最右侧** 自定义区域。传入后同上:仅 **border-bottom** 铺满全宽,而非 `tabHeaderFill` 那种对触发器宽度的铺满。
1177
+ */
1178
+ tabHeaderEnd?: React_2.ReactNode;
1179
+ /**
1180
+ * 为 `true` 时标签栏横向 **铺满** `ProTabs` 根宽度,各 `ProTabsTrigger` **均分**宽度(文案仍居中;过长配合 `triggerMaxWidth` 省略)。
1181
+ * 为 `false` 时标签宽度随文案,列表为 `w-fit`。
1182
+ * @default false
1183
+ */
1184
+ tabHeaderFill?: boolean;
1185
+ /**
1186
+ * 单个标签触发器的最小宽度。不传则由内容自适应。
1187
+ * `number` 视为 px;也可传 CSS 长度字符串。
1188
+ */
1189
+ triggerMinWidth?: ProTabsTriggerWidth;
1190
+ /**
1191
+ * 单个标签触发器的最大宽度;超出部分单行省略号展示。
1192
+ * `number` 视为 px;也可传 CSS 长度字符串。
1193
+ */
1194
+ triggerMaxWidth?: ProTabsTriggerWidth;
1195
+ };
1196
+
1197
+ export declare type ProTabsProps = React_2.ComponentProps<typeof Tabs> & {
1198
+ /**
1199
+ * **整个 Tabs**(标签栏 + 面板)的宽度。`number` 为 px;`string` 为任意 CSS 长度(如 `"32rem"`、`"100%"`)。
1200
+ * 不传时由外层布局或 `className` 决定。
1201
+ */
1202
+ width?: ProTabsTriggerWidth;
1203
+ /**
1204
+ * 统一加在每个 `ProTabsContent` 根上的 `className`(如 padding、边框、背景),内部子节点只写各自差异即可。
1205
+ */
1206
+ contentClassName?: string;
1207
+ };
1208
+
1209
+ /** `normal`:内容区 16px 高;`big`:24px。两种尺寸触发器均为上下各 4px 内边距(总高 24px / 32px)。 */
1210
+ export declare type ProTabsSize = "normal" | "big";
1211
+
1212
+ export declare function ProTabsTrigger({ className, style, children, ...props }: React_2.ComponentProps<typeof TabsTrigger>): React_2.JSX.Element;
1213
+
1214
+ export declare type ProTabsTriggerLayout = {
1215
+ minWidth?: ProTabsTriggerWidth;
1216
+ maxWidth?: ProTabsTriggerWidth;
1217
+ };
1218
+
1219
+ /** `number` 按 px 写入样式;`string` 作为 CSS 长度原样使用(如 `"12rem"`)。 */
1220
+ export declare type ProTabsTriggerWidth = number | string;
1221
+
1222
+ /**
1223
+ * 机构 / 市场等业务标签:按 `type` 映射品牌色,支持 `primary` / `small` 两种尺寸。
1224
+ */
1225
+ export declare function ProTag({ type, size, className, children, ...props }: ProTagProps): React_2.JSX.Element;
1226
+
1227
+ export declare type ProTagProps = Omit<React_2.ComponentProps<"span">, "children"> & {
1228
+ /** 标签类型,决定底色 / 描边与文案色 */
1229
+ type: ProTagType;
1230
+ /** 尺寸,默认 `primary` */
1231
+ size?: ProTagSize;
1232
+ /** 自定义文案;未传时展示 `type` 本身 */
1233
+ children?: React_2.ReactNode;
1234
+ };
1235
+
1236
+ /** `primary` 高 18px;`small` 高 14px、无内边距 */
1237
+ export declare type ProTagSize = "primary" | "small";
1238
+
1239
+ export declare type ProTagType = (typeof PRO_TAG_TYPES)[number];
1240
+
1241
+ /**
1242
+ * 品牌时间轴:支持预设/自定义节点样式、title/content 双侧文案,以及左右翻转布局。
1243
+ */
1244
+ export declare function ProTimeline({ items, reversed, titleWidth, className, ...props }: ProTimelineProps): React_2.JSX.Element;
1245
+
1246
+ export declare type ProTimelineNode = {
1247
+ key?: React_2.Key;
1248
+ title?: React_2.ReactNode;
1249
+ content?: React_2.ReactNode;
1250
+ /** 预设节点样式;未指定时使用 default */
1251
+ variant?: ProTimelineNodeVariant;
1252
+ /** 自定义圆点图标,渲染区域 12×12;传入后优先于 variant 预设图标 */
1253
+ icon?: React_2.ReactNode;
1254
+ /** 覆盖组件级 titleWidth,仅作用于当前节点 */
1255
+ titleWidth?: number | string;
1256
+ /** link 节点跳转地址;配置后 content 可点击跳转 */
1257
+ url?: string;
1258
+ /** link 节点 `<a>` 的 target,默认 `_self` */
1259
+ urlTarget?: React_2.HTMLAttributeAnchorTarget;
1260
+ };
1261
+
1262
+ export declare type ProTimelineNodeVariant = "default" | "new" | "highlight" | "important" | "link";
1263
+
1264
+ export declare type ProTimelineProps = React_2.ComponentProps<"div"> & {
1265
+ items: ProTimelineNode[];
1266
+ /** 左右翻转:时间轴右对齐,title 与 content 位置对调(样式不变) */
1267
+ reversed?: boolean;
1268
+ /** title 区域宽度,默认 48px */
1269
+ titleWidth?: number | string;
1270
+ };
1271
+
1272
+ /**
1273
+ * shadcn `Tooltip` 薄封装:仅将气泡背景、描边固定为品牌变量。
1274
+ */
1275
+ export declare function ProTooltip({ children, content, triggerMode, delayDuration, open, onOpenChange, side, showArrow, sideOffset, className, ...contentProps }: ProTooltipProps): React_2.JSX.Element;
1276
+
1277
+ export declare type ProTooltipProps = {
1278
+ children: React_2.ReactNode;
1279
+ content: React_2.ReactNode;
1280
+ /**
1281
+ * `hover`:悬停/聚焦打开(默认)。
1282
+ * `click`:仅通过点击触发器切换开关;受控时 Radix 因悬停/聚焦触发的 `onOpenChange(true)` 会被忽略。
1283
+ */
1284
+ triggerMode?: ProTooltipTriggerMode;
1285
+ /**
1286
+ * 气泡位置。支持四边与四角(及侧边上下角)。
1287
+ * 未指定时默认 `bottom-right`(右下角)。
1288
+ */
1289
+ side?: ProTooltipSide;
1290
+ /** 是否显示箭头,默认 `true` */
1291
+ showArrow?: boolean;
1292
+ /**
1293
+ * 气泡与触发器之间的间距(px),对应 Radix `sideOffset`。
1294
+ * 默认 `10`。
1295
+ */
1296
+ sideOffset?: number;
1297
+ } & TooltipRootProps & Omit<React_2.ComponentProps<typeof TooltipContent>, "children" | "bgColor" | "borderColor" | "showArrow" | "side" | "align" | "sideOffset">;
1298
+
1299
+ /** 气泡相对触发器的位置;四角由 side + align 组合实现。默认 `bottom-right`。 */
1300
+ export declare type ProTooltipSide = "top" | "top-left" | "top-right" | "right" | "right-top" | "right-bottom" | "bottom" | "bottom-left" | "bottom-right" | "left" | "left-top" | "left-bottom";
1301
+
1302
+ export declare type ProTooltipTriggerMode = "hover" | "click";
1303
+
1304
+ /**
1305
+ * 穿梭框:交互对齐 Ant Design Transfer,基于 shadcn Checkbox / Input / Button 封装。
1306
+ */
1307
+ export declare function ProTransfer({ dataSource, targetKeys, defaultTargetKeys, selectedKeys, defaultSelectedKeys, onChange, onSelectChange, titles, operations, showSearch, filterOption, disabled, oneWay, listStyle, render, footer, locale, className, style, name, }: ProTransferProps): React_2.JSX.Element;
1308
+
1309
+ export declare type ProTransferDirection = "left" | "right";
1310
+
1311
+ export declare type ProTransferItem = {
1312
+ key: string;
1313
+ title: React_2.ReactNode;
1314
+ disabled?: boolean;
1315
+ };
1316
+
1317
+ export declare type ProTransferLocale = {
1318
+ itemUnit?: string;
1319
+ itemsUnit?: string;
1320
+ searchPlaceholder?: string;
1321
+ notFoundContent?: React_2.ReactNode;
1322
+ };
1323
+
1324
+ export declare type ProTransferProps = {
1325
+ /** 数据源 */
1326
+ dataSource: ProTransferItem[];
1327
+ /** 右侧列表 key(受控) */
1328
+ targetKeys?: string[];
1329
+ /** 右侧列表 key(非受控初始值) */
1330
+ defaultTargetKeys?: string[];
1331
+ /** 两侧已勾选项 key(受控) */
1332
+ selectedKeys?: string[];
1333
+ /** 两侧已勾选项 key(非受控初始值) */
1334
+ defaultSelectedKeys?: string[];
1335
+ /** 目标列表变化 */
1336
+ onChange?: (targetKeys: string[], direction: ProTransferDirection, moveKeys: string[]) => void;
1337
+ /** 勾选变化:左列已选、右列已选 */
1338
+ onSelectChange?: (sourceSelectedKeys: string[], targetSelectedKeys: string[]) => void;
1339
+ /** 左右列表标题 */
1340
+ titles?: [React_2.ReactNode, React_2.ReactNode];
1341
+ /** 中间操作按钮文案(右移、左移) */
1342
+ operations?: [string, string];
1343
+ /** 是否显示搜索 */
1344
+ showSearch?: boolean;
1345
+ /** 自定义过滤;默认按 title 文本包含匹配 */
1346
+ filterOption?: (inputValue: string, item: ProTransferItem) => boolean;
1347
+ /** 禁用整个穿梭框 */
1348
+ disabled?: boolean;
1349
+ /** 单向模式:仅允许从左到右 */
1350
+ oneWay?: boolean;
1351
+ /** 列表容器样式(左右共用) */
1352
+ listStyle?: React_2.CSSProperties;
1353
+ /** 自定义列表项渲染 */
1354
+ render?: (item: ProTransferItem) => React_2.ReactNode;
1355
+ /** 列表底部 */
1356
+ footer?: (props: {
1357
+ direction: ProTransferDirection;
1358
+ }) => React_2.ReactNode;
1359
+ locale?: ProTransferLocale;
1360
+ className?: string;
1361
+ style?: React_2.CSSProperties;
1362
+ /** 在 `ProForm` 内写入 `proFormBridge`(字段值为 targetKeys) */
1363
+ name?: string;
1364
+ };
1365
+
1366
+ /**
1367
+ * 基于 shadcn 设计体系的树形组件:支持展开/选中、多选勾选与品牌样式。
1368
+ */
1369
+ export declare function ProTree({ treeData, showIcon, defaultNodeIcons, multiple, defaultExpandAll, expandedKeys: expandedKeysProp, defaultExpandedKeys, onExpand, selectedKeys: selectedKeysProp, defaultSelectedKeys, onSelect, checkedKeys: checkedKeysProp, defaultCheckedKeys, onCheck, switcherIcon, width, loadData, className, style, ...props }: ProTreeProps): React_2.JSX.Element;
1370
+
1371
+ export declare type ProTreeCheckInfo = {
1372
+ node: ProTreeNodeData;
1373
+ checked: boolean;
1374
+ checkedKeys: string[];
1375
+ };
1376
+
1377
+ export declare type ProTreeContextMenuEvent = {
1378
+ node: ProTreeNodeData;
1379
+ nativeEvent: MouseEvent;
1380
+ };
1381
+
1382
+ export declare type ProTreeContextMenuItem = {
1383
+ /** 菜单项名称 */
1384
+ name: string;
1385
+ /** 点击回调 */
1386
+ onClick: (event: ProTreeContextMenuEvent) => void;
1387
+ };
1388
+
1389
+ /** `ProTree` 默认节点图标;字段为 `null` 时该类型节点不显示图标 */
1390
+ export declare type ProTreeDefaultNodeIcons = {
1391
+ /** 非叶子节点折叠态 */
1392
+ folder?: React_2.ReactNode | null;
1393
+ /** 非叶子节点展开态 */
1394
+ folderOpen?: React_2.ReactNode | null;
1395
+ /** 叶子节点 */
1396
+ leaf?: React_2.ReactNode | null;
1397
+ };
1398
+
1399
+ export declare type ProTreeExpandInfo = {
1400
+ node: ProTreeNodeData;
1401
+ expanded: boolean;
1402
+ expandedKeys: string[];
1403
+ };
1404
+
1405
+ export declare type ProTreeNodeData = {
1406
+ /** 节点唯一标识 */
1407
+ key: string;
1408
+ /** 节点标题 */
1409
+ title: React_2.ReactNode;
1410
+ /** 子节点 */
1411
+ children?: ProTreeNodeData[];
1412
+ /**
1413
+ * 是否为叶子节点;未配置时根据 `children` 推断(无子节点或 `children` 为空则为叶子)。
1414
+ * 显式设为 `false` 时,即使无子节点或 `children` 为空,也按非叶子节点展示(显示展开图标等)。
1415
+ */
1416
+ isLeaf?: boolean;
1417
+ /** 自定义图标(组件形式,如 `<ProIcon type="folder" />`);`null` 表示不显示;优先级高于 `ProTree` 默认图标 */
1418
+ icon?: React_2.ReactNode | null;
1419
+ /** 禁用后不可选中、不可勾选 */
1420
+ disabled?: boolean;
1421
+ /** 节点右键菜单项 */
1422
+ contextMenu?: ProTreeContextMenuItem[];
1423
+ /** 为 true 时,悬停节点后在右侧显示更多按钮;`contextMenu` 右键始终可用 */
1424
+ showContextMenuIcon?: boolean;
1425
+ /**
1426
+ * 展开/折叠图标样式;未配置时继承 `ProTree` 的 `switcherIcon`,均为 `arrow`。
1427
+ * 节点级配置优先级高于 `ProTree`。
1428
+ */
1429
+ switcherIcon?: ProTreeSwitcherIconMode;
1430
+ };
1431
+
1432
+ export declare type ProTreeProps = Omit<React_2.HTMLAttributes<HTMLDivElement>, "onSelect"> & {
1433
+ /** 树形数据 */
1434
+ treeData: ProTreeNodeData[];
1435
+ /** 是否显示节点图标;也可通过 `defaultNodeIcons` 配置默认图标 */
1436
+ showIcon?: boolean;
1437
+ /**
1438
+ * 默认节点图标(非叶子折叠/展开、叶子);字段为 `null` 时不显示对应类型图标。
1439
+ * 节点 `icon` 优先级更高。
1440
+ */
1441
+ defaultNodeIcons?: ProTreeDefaultNodeIcons;
1442
+ /**
1443
+ * 是否可多选;开启后展示勾选框,点击节点或勾选框均可切换选中/勾选状态。
1444
+ * 节点 `disabled` 时该节点不可勾选。
1445
+ */
1446
+ multiple?: boolean;
1447
+ /** 是否默认展开全部父节点 */
1448
+ defaultExpandAll?: boolean;
1449
+ /** 受控:展开的 key */
1450
+ expandedKeys?: string[];
1451
+ /** 非受控:默认展开的 key */
1452
+ defaultExpandedKeys?: string[];
1453
+ onExpand?: (expandedKeys: string[], info: ProTreeExpandInfo) => void;
1454
+ /** 受控:选中的 key */
1455
+ selectedKeys?: string[];
1456
+ /** 非受控:默认选中的 key */
1457
+ defaultSelectedKeys?: string[];
1458
+ onSelect?: (selectedKeys: string[], info: ProTreeSelectInfo) => void;
1459
+ /** 受控:勾选的 key */
1460
+ checkedKeys?: string[];
1461
+ /** 非受控:默认勾选的 key */
1462
+ defaultCheckedKeys?: string[];
1463
+ onCheck?: (checkedKeys: string[], info: ProTreeCheckInfo) => void;
1464
+ /**
1465
+ * 展开/折叠图标样式:`arrow` 箭头(默认)、`button` 方框加减。
1466
+ * 节点级 `switcherIcon` 可覆盖此配置。
1467
+ */
1468
+ switcherIcon?: ProTreeSwitcherIconMode;
1469
+ /**
1470
+ * 树容器固定宽度;`number` 为 px,`string` 为任意 CSS 长度。
1471
+ * 过长标题在节点内省略显示,不会撑开整棵树。
1472
+ * @default 248
1473
+ */
1474
+ width?: number | string;
1475
+ /**
1476
+ * 异步加载子节点:展开尚未加载的非叶子节点时触发。
1477
+ * 返回子节点数组时由组件内部合并;返回 `void` 时由外部更新 `treeData`。
1478
+ */
1479
+ loadData?: (node: ProTreeNodeData) => Promise<ProTreeNodeData[] | void>;
1480
+ };
1481
+
1482
+ export declare type ProTreeSelectInfo = {
1483
+ node: ProTreeNodeData;
1484
+ selected: boolean;
1485
+ selectedKeys: string[];
1486
+ };
1487
+
1488
+ export declare type ProTreeSwitcherIconMode = "arrow" | "button";
1489
+
1490
+ export declare function readProEChartsThemeTokens(root: HTMLElement | null): ProEChartsThemeTokens;
1491
+
1492
+ /** 将联调项写入 localStorage(由侧栏「保存」调用)。 */
1493
+ export declare function saveStorybookGwNbDevFields(fields: StorybookGwNbDevFields): void;
1494
+
1495
+ /** SDP 脚本执行路径前缀(相对 `GW_NB_GATEWAY_BASE`) */
1496
+ export declare const SDP_EXEC_API_PREFIX = "sdep-gateway-api/api/exec/";
1497
+
1498
+ export declare interface SdpExecBody {
1499
+ params?: Record<string, unknown>;
1500
+ pageSize?: number;
1501
+ pageNum?: number;
1502
+ }
1503
+
1504
+ /**
1505
+ * DEP 网关脚本执行响应外壳。`data` 为泛型业务体,结构由具体脚本决定(类型层面为黑盒)。
1506
+ */
1507
+ export declare interface SdpGatewayResponse<T = unknown> {
1508
+ status: string;
1509
+ message: string;
1510
+ error: unknown;
1511
+ data: T;
1512
+ }
1513
+
1514
+ /**
1515
+ * 判断点击/焦点是否落在「不应触发当前 Dialog dismiss」的嵌套弹层上。
1516
+ * 覆盖 Pro 浮层(`data-pro-popup`)与其它 Dialog 的 content / overlay。
1517
+ */
1518
+ export declare function shouldPreventDialogDismiss(target: EventTarget | null, currentContent: HTMLElement | null): boolean;
1519
+
1520
+ /** 是否走 QA 网关完整地址:IP 访问、localhost、hostname 含 qa、或一级路径段包含 qa */
1521
+ export declare function shouldUseQaGatewayBase(hostname: string, pathname: string): boolean;
1522
+
1523
+ declare const SIZE_CONFIG: {
1524
+ readonly small: {
1525
+ readonly wrapper: "w-[148px] gap-1";
1526
+ readonly input: string;
1527
+ readonly preIconPad: "pl-6";
1528
+ readonly afterIconPad: "pr-6";
1529
+ readonly loadingPad: "pr-6";
1530
+ readonly preIconWrap: "left-1";
1531
+ readonly afterIconWrap: "right-1.5";
1532
+ readonly icon: "size-3";
1533
+ };
1534
+ readonly normal: {
1535
+ readonly wrapper: "w-[207px] gap-1";
1536
+ readonly input: string;
1537
+ readonly preIconPad: "pl-7";
1538
+ readonly afterIconPad: "pr-9";
1539
+ readonly loadingPad: "pr-9";
1540
+ readonly preIconWrap: "left-2";
1541
+ readonly afterIconWrap: "right-2.5";
1542
+ readonly icon: "size-4";
1543
+ };
1544
+ readonly large: {
1545
+ readonly wrapper: "w-[207px] gap-1";
1546
+ readonly input: string;
1547
+ readonly preIconPad: "pl-8";
1548
+ readonly afterIconPad: "pr-9";
1549
+ readonly loadingPad: "pr-9";
1550
+ readonly preIconWrap: "left-2";
1551
+ readonly afterIconWrap: "right-2.5";
1552
+ readonly icon: "size-4";
1553
+ };
1554
+ };
1555
+
1556
+ /** `ColDef` 增加 `align`;不与行泛型绑定,便于与 `ColDef` 任意列定义互用 */
1557
+ declare type SSColDef = ColDef & {
1558
+ align?: SSColumnAlign;
1559
+ };
1560
+
1561
+ /** 列水平对齐:`align` 同时作用于表头与单元格(内部映射为品牌样式类) */
1562
+ declare type SSColumnAlign = "left" | "center" | "right";
1563
+
1564
+ /**
1565
+ * Storybook 网关联调头:全部由用户在预览侧栏配置并保存到 localStorage,
1566
+ * 请求前通过 {@link getGwNbApiDevHeaders} 读取。
1567
+ */
1568
+ export declare const STORYBOOK_GW_NB_DEV_LOCAL_STORAGE_KEY = "storybook:gw-nb-dev";
1569
+
1570
+ export declare type StorybookGwNbDevFields = {
1571
+ userId: string;
1572
+ cookies: string;
1573
+ traceId: string;
1574
+ };
1575
+
1576
+ declare type SwitchComponentProps = React_2.ComponentProps<typeof Switch.Root>;
1577
+
1578
+ declare function Tabs({ className, orientation, ...props }: React_2.ComponentProps<typeof Tabs_2.Root>): React_2.JSX.Element;
1579
+
1580
+ declare function TabsContent({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Content>): React_2.JSX.Element;
1581
+
1582
+ declare function TabsList({ className, variant, ...props }: React_2.ComponentProps<typeof Tabs_2.List> & VariantProps<typeof tabsListVariants>): React_2.JSX.Element;
1583
+
1584
+ export declare const tabsListVariants: (props?: ({
1585
+ variant?: "default" | "line" | null | undefined;
1586
+ } & ClassProp) | undefined) => string;
1587
+
1588
+ declare function TabsTrigger({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Trigger>): React_2.JSX.Element;
1589
+
1590
+ export { toast }
1591
+
1592
+ /**
1593
+ * shadcn/ui 风格的 Sonner 挂载点:与设计令牌(popover、border、radius)对齐。
1594
+ * 主题请通过 `theme` 传入,或与根节点 `.dark` 类配合使用 `theme="system"`。
1595
+ * 默认位置为顶部居中(Sonner 库默认为右下角)。
1596
+ * 默认展示关闭按钮,支持手动点击关闭单条 toast。
1597
+ */
1598
+ declare function Toaster({ className, theme, position, closeButton, portalContainer, ...props }: ToasterWithPortalProps): React_2.ReactPortal | null;
1599
+
1600
+ export { ToasterProps }
1601
+
1602
+ declare type ToasterWithPortalProps = ToasterProps & {
1603
+ /**
1604
+ * 传送门挂载节点;默认 `document.body`。
1605
+ * Sonner 自带的 `Toaster` 不会 portal,在 Storybook 等局部容器内会贴在画布内,故默认挂到 body。
1606
+ */
1607
+ portalContainer?: HTMLElement | DocumentFragment | null;
1608
+ };
1609
+
1610
+ declare function Tooltip({ ...props }: React_2.ComponentProps<typeof Tooltip_2.Root>): React_2.JSX.Element;
1611
+
1612
+ declare const TooltipContent: React_2.ForwardRefExoticComponent<Omit<TooltipContentProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1613
+
1614
+ declare type TooltipContentProps = React_2.ComponentProps<typeof Tooltip_2.Content> & {
1615
+ bgColor: string;
1616
+ borderColor: string;
1617
+ borderWidth?: number;
1618
+ showArrow?: boolean;
1619
+ };
1620
+
1621
+ declare type TooltipRootProps = Pick<React_2.ComponentProps<typeof Tooltip>, "delayDuration" | "open" | "onOpenChange">;
1622
+
1623
+ /**
1624
+ * 按 {@link ProDataBridge} 的 `name` 订阅网关返回的数据及加载态。
1625
+ * `refetch` 会触发当前已挂载的同名 Bridge 的发请求逻辑(`action="manual"` 时常用)。
1626
+ */
1627
+ export declare function useProDataBridge(name: string): ProDataBridgeEntry & {
1628
+ refetch: (params?: ProDataBridgeCallParams) => Promise<void>;
1629
+ loadNextPage: (params?: ProDataBridgeCallParams) => Promise<void>;
1630
+ loadPage: (pageNum: number, params?: ProDataBridgeCallParams) => Promise<void>;
1631
+ setData: (data: unknown) => void;
1632
+ };
1633
+
1634
+ /**
1635
+ * 控制同名 {@link ProDataBridge} 的前置校验开关(仅当 Bridge 配置了 `preflightCheck` 且 `action="auto"` 时生效)。
1636
+ * 未通过时,该 Bridge 的自动请求与 `refetch` / `loadNextPage` / `loadPage` 均会被拦截。
1637
+ */
1638
+ export declare function useProDataBridgePreflight(name: string): {
1639
+ preflightRequired: boolean;
1640
+ preflightPassed: boolean;
1641
+ setPreflightPassed: (passed: boolean) => void;
1642
+ };
1643
+
1644
+ export declare function useProECharts(options?: UseProEChartsOptions): UseProEChartsResult;
1645
+
1646
+ export declare interface UseProEChartsOptions {
1647
+ /**
1648
+ * 读取 `--chart-*`、`--foreground` 等 CSS 变量的根节点。
1649
+ * 默认 `document.documentElement`(与 Storybook `data-brand-theme` / `.dark` 同步方式一致)。
1650
+ * 若图表放在局部主题容器内,可传入该容器的 ref.current。
1651
+ */
1652
+ tokenRoot?: HTMLElement | null;
1653
+ }
1654
+
1655
+ export declare interface UseProEChartsResult extends ProEChartsThemePartials {
1656
+ /**
1657
+ * 合并公共主题与自定义 `option`(见 `mergeProEChartsOption`)。
1658
+ * 若 `partial.legend` 存在,会按当前主题的 `scrollLegendChrome` 与 series 类型补全 icon、尺寸等(业务侧按 ECharts 官方 `legend` 写法即可)。
1659
+ */
1660
+ mergeOption: (partial: EChartsOption) => EChartsOption;
1661
+ }
1662
+
1663
+ export declare function useProFormContext(): ProFormContextValue | null;
1664
+
1665
+ /**
1666
+ * 在 `ProForm` 内与 `name` 同时存在时,将字段与 `proFormBridge` 同步;
1667
+ * 否则对组件行为无影响(仍走各自受控/非受控逻辑)。
1668
+ */
1669
+ export declare function useProFormFieldSync<V>(name: string | undefined, options: {
1670
+ value: V | undefined;
1671
+ defaultValue: V | undefined;
1672
+ onChange?: (next: V) => void;
1673
+ }): ProFormFieldSync<V>;
1674
+
1675
+ export declare function useProPopupContainerRef(): React_2.RefObject<HTMLElement | null> | null;
1676
+
1677
+ export { Z_INDEX }
1678
+
1679
+ declare type ZustandEngine<T extends Record<string, unknown>> = {
1680
+ /** 底层 store,形状为 `{ snapshot: T }` */
1681
+ store: StoreApi<ZustandEngineState<T>>;
1682
+ /** Read:读取全部 */
1683
+ getAll: () => T;
1684
+ /** Read:按键读取 */
1685
+ get: <K extends keyof T>(key: K) => T[K];
1686
+ /** Create / Update:写入单键(对象合并语义) */
1687
+ set: <K extends keyof T>(key: K, value: T[K]) => void;
1688
+ /** Create:与 `set` 相同,强调新增键场景 */
1689
+ create: <K extends keyof T>(key: K, value: T[K]) => void;
1690
+ /** Update:批量部分更新 */
1691
+ patch: (partial: Partial<T>) => void;
1692
+ /** Delete:从快照中移除键(注意:若 T 为固定形状,运行后类型可能宽于 T) */
1693
+ remove: (key: keyof T) => void;
1694
+ /** 同 `remove` */
1695
+ delete: (key: keyof T) => void;
1696
+ /** Reset:不传 key 则整体恢复初始快照;传 key 则只恢复该键 */
1697
+ reset: (key?: keyof T) => void;
1698
+ has: (key: keyof T) => boolean;
1699
+ subscribe: (listener: (snapshot: T, prev: T) => void) => () => void;
1700
+ /** React:订阅完整快照 */
1701
+ useSnapshot: () => T;
1702
+ /** React:只订阅某一键,减少重渲染 */
1703
+ useKey: <K extends keyof T>(key: K) => T[K];
1704
+ /** React:自定义 selector */
1705
+ useSelect: <R>(selector: (snapshot: T) => R) => R;
1706
+ };
1707
+
1708
+ /** 引擎内部 Zustand 状态:仅暴露扁平快照,便于 selector */
1709
+ declare type ZustandEngineState<T extends Record<string, unknown>> = {
1710
+ snapshot: T;
1711
+ };
1712
+
1713
+ export { }
1714
+
1715
+
1716
+ declare namespace ProSelectOptionEl {
1717
+ var displayName: string;
1718
+ }