@qq1948037137/adminsmart-ui 0.1.28 → 0.1.30
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/README.md +3 -1
- package/dist/index.cjs +189 -90
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -4
- package/dist/index.d.ts +72 -4
- package/dist/index.js +174 -78
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/styles/composites.css +49 -0
package/dist/index.d.cts
CHANGED
|
@@ -317,14 +317,57 @@ interface TableControlsProps {
|
|
|
317
317
|
style?: CSSProperties;
|
|
318
318
|
}
|
|
319
319
|
/**
|
|
320
|
-
*
|
|
321
|
-
* @param props
|
|
320
|
+
* 为列表右侧提供顺序固定的筛选显隐、刷新和显示列。
|
|
321
|
+
* @param props 搜索、刷新与列显隐由宿主管理,控件管理展示及键盘焦点。
|
|
322
322
|
* @returns 可放入 SearchPanel.trailingTools 的一组紧凑工具。
|
|
323
323
|
*/
|
|
324
324
|
declare function TableControls({ searchVisible, onSearchVisibleChange, onRefresh, refreshing, columns, visibleColumns, onVisibleColumnsChange, className, style, }: TableControlsProps): react_jsx_runtime.JSX.Element;
|
|
325
325
|
|
|
326
|
+
interface ErrorReportButtonProps {
|
|
327
|
+
/** 用户点击时由宿主快照并提交诊断数据,异步完成前不重复提交。 */
|
|
328
|
+
onReport: () => unknown | Promise<unknown>;
|
|
329
|
+
/** 宿主明确限制上报时禁用此入口。 */
|
|
330
|
+
disabled?: boolean;
|
|
331
|
+
/** 宿主处理上报失败的回调,可以展示适合当前业务的反馈。 */
|
|
332
|
+
onReportFailure?: (error: unknown) => void;
|
|
333
|
+
/** 展示给用户的说明,由宿主按实际采集范围填写。 */
|
|
334
|
+
description?: string;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* 提供可用于列表工具或页头的手动问题上报入口。
|
|
338
|
+
* @param props 宿主上报回调、启用状态和采集范围说明。
|
|
339
|
+
* @returns 使用组件库样式、支持键盘操作和异步防重的按钮。
|
|
340
|
+
* @remarks 只响应主动点击,数据采集、脱敏和提交均由宿主负责。
|
|
341
|
+
*/
|
|
342
|
+
declare function ErrorReportButton({ onReport, disabled, onReportFailure, description, }: ErrorReportButtonProps): react_jsx_runtime.JSX.Element;
|
|
343
|
+
|
|
344
|
+
interface ReportErrorProviderProps extends ErrorReportButtonProps {
|
|
345
|
+
/** 应用中可显示手动上报的业务工作区。 */
|
|
346
|
+
children: ReactNode;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* 为标准列表工具栏绑定宿主的点击采样和上报行为。
|
|
350
|
+
* @param props 宿主管理的上报回调、反馈与业务页面范围。
|
|
351
|
+
* @returns 为活动页面提供同一份上报配置的 React 子树。
|
|
352
|
+
*/
|
|
353
|
+
declare function ReportErrorProvider({ children, ...config }: ReportErrorProviderProps): react_jsx_runtime.JSX.Element;
|
|
354
|
+
interface OperationToolbarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
355
|
+
/** 左侧业务操作,保留宿主的显示顺序和权限处理。 */
|
|
356
|
+
actions?: ReactNode;
|
|
357
|
+
/** 右侧列表视图工具,如搜索显隐、刷新和列设置。 */
|
|
358
|
+
controls?: ReactNode;
|
|
359
|
+
/** 覆盖上级上报配置;为 false 时不在当前工具栏展示上报。 */
|
|
360
|
+
errorReport?: ErrorReportButtonProps | false;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* 布局左侧业务操作和右侧列表工具,在左侧最后展示宿主配置的手动上报。
|
|
364
|
+
* @param props 业务操作、列表工具、可选上报配置及原生容器属性。
|
|
365
|
+
* @returns 可分别换行的操作栏;没有任何操作和配置时不渲染。
|
|
366
|
+
*/
|
|
367
|
+
declare function OperationToolbar({ actions, controls, errorReport, style, ...props }: OperationToolbarProps): react_jsx_runtime.JSX.Element | null;
|
|
368
|
+
|
|
326
369
|
interface DataTableProps<RecordType extends object> extends TableProps<RecordType> {
|
|
327
|
-
/**
|
|
370
|
+
/** 设置表格整体容器高度;CrudWorkspace 内默认 100%,其它容器沿用视口剩余高度。 */
|
|
328
371
|
containerHeight?: CSSProperties['height'];
|
|
329
372
|
/** 仅作用于外层滚动边界,不覆盖 Ant Table 自身的 style。 */
|
|
330
373
|
containerStyle?: CSSProperties;
|
|
@@ -415,6 +458,31 @@ interface CrudScaffoldProps extends Omit<HTMLAttributes<HTMLElement>, 'children'
|
|
|
415
458
|
*/
|
|
416
459
|
declare function CrudScaffold({ label, description, filters, status, results, drawer, className, ...props }: CrudScaffoldProps): react_jsx_runtime.JSX.Element;
|
|
417
460
|
|
|
461
|
+
interface CrudWorkspaceProps extends HTMLAttributes<HTMLElement> {
|
|
462
|
+
/** 工作区的可访问名称。 */
|
|
463
|
+
label: string;
|
|
464
|
+
/** 第一排查询条件及相关表单操作。 */
|
|
465
|
+
filters?: ReactNode;
|
|
466
|
+
/** 业务操作及表格控制栏,独立于筛选区。 */
|
|
467
|
+
toolbar?: ReactNode;
|
|
468
|
+
/** 标准工具栏左侧业务操作,由工具栏追加宿主配置的问题上报。 */
|
|
469
|
+
actions?: ReactNode;
|
|
470
|
+
/** 标准工具栏右侧列表工具。 */
|
|
471
|
+
controls?: ReactNode;
|
|
472
|
+
/** 查询状态、警告或其它占用自然高度的结果反馈。 */
|
|
473
|
+
feedback?: ReactNode;
|
|
474
|
+
/** 可选的业务页脚,放在结果区域下方。 */
|
|
475
|
+
footer?: ReactNode;
|
|
476
|
+
/** 占满可用高度的表格、列表或其它页面结果。 */
|
|
477
|
+
children: ReactNode;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* 在有明确高度的工作区内组织 CRUD 页面,结果独占剩余高度。
|
|
481
|
+
* @param props 宿主提供内容、状态及原生区块属性;业务请求和分页由宿主控制。
|
|
482
|
+
* @returns 可嵌入 WorkspaceLayout 表格模式的无状态页面骨架。
|
|
483
|
+
*/
|
|
484
|
+
declare function CrudWorkspace({ label, filters, toolbar, actions, controls, feedback, footer, children, className, ...props }: CrudWorkspaceProps): react_jsx_runtime.JSX.Element;
|
|
485
|
+
|
|
418
486
|
interface EllipsisTextProps extends ComponentProps<typeof Typography.Text> {
|
|
419
487
|
/** 单行文本最多占用的宽度;业务表格可按列宽覆盖。 */
|
|
420
488
|
maxWidth?: number | string;
|
|
@@ -543,4 +611,4 @@ declare function mapSchemaField(field: SchemaField): SchemaFieldMapping;
|
|
|
543
611
|
/** 从字段默认值生成表单初值;调用方的 initialValues 可在渲染层覆盖。 */
|
|
544
612
|
declare function schemaInitialValues(schema: SchemaFormSchema): SchemaFormValues;
|
|
545
613
|
|
|
546
|
-
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, type TableControlColumn, TableControls, type TableControlsProps, TableEmpty, type TableEmptyProps, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
|
|
614
|
+
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, CrudWorkspace, type CrudWorkspaceProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, ErrorReportButton, type ErrorReportButtonProps, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, OperationToolbar, type OperationToolbarProps, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, ReportErrorProvider, type ReportErrorProviderProps, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, type TableControlColumn, TableControls, type TableControlsProps, TableEmpty, type TableEmptyProps, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
|
package/dist/index.d.ts
CHANGED
|
@@ -317,14 +317,57 @@ interface TableControlsProps {
|
|
|
317
317
|
style?: CSSProperties;
|
|
318
318
|
}
|
|
319
319
|
/**
|
|
320
|
-
*
|
|
321
|
-
* @param props
|
|
320
|
+
* 为列表右侧提供顺序固定的筛选显隐、刷新和显示列。
|
|
321
|
+
* @param props 搜索、刷新与列显隐由宿主管理,控件管理展示及键盘焦点。
|
|
322
322
|
* @returns 可放入 SearchPanel.trailingTools 的一组紧凑工具。
|
|
323
323
|
*/
|
|
324
324
|
declare function TableControls({ searchVisible, onSearchVisibleChange, onRefresh, refreshing, columns, visibleColumns, onVisibleColumnsChange, className, style, }: TableControlsProps): react_jsx_runtime.JSX.Element;
|
|
325
325
|
|
|
326
|
+
interface ErrorReportButtonProps {
|
|
327
|
+
/** 用户点击时由宿主快照并提交诊断数据,异步完成前不重复提交。 */
|
|
328
|
+
onReport: () => unknown | Promise<unknown>;
|
|
329
|
+
/** 宿主明确限制上报时禁用此入口。 */
|
|
330
|
+
disabled?: boolean;
|
|
331
|
+
/** 宿主处理上报失败的回调,可以展示适合当前业务的反馈。 */
|
|
332
|
+
onReportFailure?: (error: unknown) => void;
|
|
333
|
+
/** 展示给用户的说明,由宿主按实际采集范围填写。 */
|
|
334
|
+
description?: string;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* 提供可用于列表工具或页头的手动问题上报入口。
|
|
338
|
+
* @param props 宿主上报回调、启用状态和采集范围说明。
|
|
339
|
+
* @returns 使用组件库样式、支持键盘操作和异步防重的按钮。
|
|
340
|
+
* @remarks 只响应主动点击,数据采集、脱敏和提交均由宿主负责。
|
|
341
|
+
*/
|
|
342
|
+
declare function ErrorReportButton({ onReport, disabled, onReportFailure, description, }: ErrorReportButtonProps): react_jsx_runtime.JSX.Element;
|
|
343
|
+
|
|
344
|
+
interface ReportErrorProviderProps extends ErrorReportButtonProps {
|
|
345
|
+
/** 应用中可显示手动上报的业务工作区。 */
|
|
346
|
+
children: ReactNode;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* 为标准列表工具栏绑定宿主的点击采样和上报行为。
|
|
350
|
+
* @param props 宿主管理的上报回调、反馈与业务页面范围。
|
|
351
|
+
* @returns 为活动页面提供同一份上报配置的 React 子树。
|
|
352
|
+
*/
|
|
353
|
+
declare function ReportErrorProvider({ children, ...config }: ReportErrorProviderProps): react_jsx_runtime.JSX.Element;
|
|
354
|
+
interface OperationToolbarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
355
|
+
/** 左侧业务操作,保留宿主的显示顺序和权限处理。 */
|
|
356
|
+
actions?: ReactNode;
|
|
357
|
+
/** 右侧列表视图工具,如搜索显隐、刷新和列设置。 */
|
|
358
|
+
controls?: ReactNode;
|
|
359
|
+
/** 覆盖上级上报配置;为 false 时不在当前工具栏展示上报。 */
|
|
360
|
+
errorReport?: ErrorReportButtonProps | false;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* 布局左侧业务操作和右侧列表工具,在左侧最后展示宿主配置的手动上报。
|
|
364
|
+
* @param props 业务操作、列表工具、可选上报配置及原生容器属性。
|
|
365
|
+
* @returns 可分别换行的操作栏;没有任何操作和配置时不渲染。
|
|
366
|
+
*/
|
|
367
|
+
declare function OperationToolbar({ actions, controls, errorReport, style, ...props }: OperationToolbarProps): react_jsx_runtime.JSX.Element | null;
|
|
368
|
+
|
|
326
369
|
interface DataTableProps<RecordType extends object> extends TableProps<RecordType> {
|
|
327
|
-
/**
|
|
370
|
+
/** 设置表格整体容器高度;CrudWorkspace 内默认 100%,其它容器沿用视口剩余高度。 */
|
|
328
371
|
containerHeight?: CSSProperties['height'];
|
|
329
372
|
/** 仅作用于外层滚动边界,不覆盖 Ant Table 自身的 style。 */
|
|
330
373
|
containerStyle?: CSSProperties;
|
|
@@ -415,6 +458,31 @@ interface CrudScaffoldProps extends Omit<HTMLAttributes<HTMLElement>, 'children'
|
|
|
415
458
|
*/
|
|
416
459
|
declare function CrudScaffold({ label, description, filters, status, results, drawer, className, ...props }: CrudScaffoldProps): react_jsx_runtime.JSX.Element;
|
|
417
460
|
|
|
461
|
+
interface CrudWorkspaceProps extends HTMLAttributes<HTMLElement> {
|
|
462
|
+
/** 工作区的可访问名称。 */
|
|
463
|
+
label: string;
|
|
464
|
+
/** 第一排查询条件及相关表单操作。 */
|
|
465
|
+
filters?: ReactNode;
|
|
466
|
+
/** 业务操作及表格控制栏,独立于筛选区。 */
|
|
467
|
+
toolbar?: ReactNode;
|
|
468
|
+
/** 标准工具栏左侧业务操作,由工具栏追加宿主配置的问题上报。 */
|
|
469
|
+
actions?: ReactNode;
|
|
470
|
+
/** 标准工具栏右侧列表工具。 */
|
|
471
|
+
controls?: ReactNode;
|
|
472
|
+
/** 查询状态、警告或其它占用自然高度的结果反馈。 */
|
|
473
|
+
feedback?: ReactNode;
|
|
474
|
+
/** 可选的业务页脚,放在结果区域下方。 */
|
|
475
|
+
footer?: ReactNode;
|
|
476
|
+
/** 占满可用高度的表格、列表或其它页面结果。 */
|
|
477
|
+
children: ReactNode;
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* 在有明确高度的工作区内组织 CRUD 页面,结果独占剩余高度。
|
|
481
|
+
* @param props 宿主提供内容、状态及原生区块属性;业务请求和分页由宿主控制。
|
|
482
|
+
* @returns 可嵌入 WorkspaceLayout 表格模式的无状态页面骨架。
|
|
483
|
+
*/
|
|
484
|
+
declare function CrudWorkspace({ label, filters, toolbar, actions, controls, feedback, footer, children, className, ...props }: CrudWorkspaceProps): react_jsx_runtime.JSX.Element;
|
|
485
|
+
|
|
418
486
|
interface EllipsisTextProps extends ComponentProps<typeof Typography.Text> {
|
|
419
487
|
/** 单行文本最多占用的宽度;业务表格可按列宽覆盖。 */
|
|
420
488
|
maxWidth?: number | string;
|
|
@@ -543,4 +611,4 @@ declare function mapSchemaField(field: SchemaField): SchemaFieldMapping;
|
|
|
543
611
|
/** 从字段默认值生成表单初值;调用方的 initialValues 可在渲染层覆盖。 */
|
|
544
612
|
declare function schemaInitialValues(schema: SchemaFormSchema): SchemaFormValues;
|
|
545
613
|
|
|
546
|
-
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, type TableControlColumn, TableControls, type TableControlsProps, TableEmpty, type TableEmptyProps, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
|
|
614
|
+
export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BUSINESS_DRAWER_WIDTH, BackTop, Badge, BorderBeam, Breadcrumb, BusinessDrawer, type BusinessDrawerProps, type BusinessDrawerSize, Button, Calendar, Card, Carousel, Cascader, Checkbox, Col, Collapse, ColorPicker, ConfigProvider, CrudScaffold, type CrudScaffoldProps, CrudWorkspace, type CrudWorkspaceProps, DataTable, type DataTableProps, DatePicker, Descriptions, Divider, Drawer, Dropdown, EllipsisText, type EllipsisTextProps, Empty, ErrorReportButton, type ErrorReportButtonProps, Flex, FloatButton, Form, Grid, Image, Input, InputNumber, Layout, List, Listy, Masonry, Mentions, Menu, Modal, OperationToolbar, type OperationToolbarProps, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, Rate, ReportErrorProvider, type ReportErrorProviderProps, Result, Row, RowActions, type RowActionsProps, type SchemaBooleanField, type SchemaChoiceField, type SchemaDateField, type SchemaDateRangeField, type SchemaField, type SchemaFieldMapping, type SchemaFieldName, SchemaForm, type SchemaFormProps, type SchemaFormSchema, type SchemaFormValues, type SchemaIssue, type SchemaNumberField, type SchemaNumberValidation, type SchemaOption, type SchemaTextField, type SchemaTextValidation, type SchemaValidationResult, SearchPanel, type SearchPanelProps, Segmented, Select, SessionReplay, type SessionReplayError, type SessionReplayEvent, type SessionReplayHandle, type SessionReplayMarker, type SessionReplayProps, type SessionReplayState, Skeleton, Slider, Space, Spin, Splitter, Statistic, Steps, Switch, Table, type TableControlColumn, TableControls, type TableControlsProps, TableEmpty, type TableEmptyProps, Tabs, Tag, type ThemeMode, ThemeModeButton, type ThemeModeButtonProps, TimePicker, Timeline, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Upload, Watermark, WorkspaceLayout, type WorkspaceLayoutProps, mapSchemaField, schemaInitialValues, tableBodyHeight, validateSchemaForm };
|