@regenbio/regenbio-components-react 1.0.14 → 1.1.1

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,16 @@
1
+ import { RbActionBarItemProps, RbActionBarProps } from "./type";
2
+ /**
3
+ * RB 操作栏子项
4
+ *
5
+ * @param props 参数配置
6
+ * @constructor
7
+ */
8
+ declare const RbActionBarItem: (props: RbActionBarItemProps) => any;
9
+ /**
10
+ * RB 操作栏
11
+ *
12
+ * @param props 参数配置
13
+ * @constructor
14
+ */
15
+ declare const RbActionBar: (props: RbActionBarProps) => any;
16
+ export { RbActionBarItem, RbActionBar };
@@ -0,0 +1,70 @@
1
+ import React, { MutableRefObject } from "react";
2
+ import { RbActionBarItem } from "./index";
3
+ import { RbActionType } from "../DataTable/type";
4
+ /**
5
+ * 操作栏属性
6
+ */
7
+ export type RbActionBarProps = {
8
+ /**
9
+ * 最大展示数量(超出后收起)
10
+ */
11
+ max?: number;
12
+ /**
13
+ * 操作栏子项
14
+ */
15
+ children: React.ReactElement<typeof RbActionBarItem> | React.ReactElement<typeof RbActionBarItem>[];
16
+ /**
17
+ * 全局变量,用来判断当前用户是否携带对应的权限标识
18
+ */
19
+ initialState?: any;
20
+ /**
21
+ * 表格的扩展操作 Ref,传入后可以联动数据表格的 Loading 状态
22
+ */
23
+ tableRef?: MutableRefObject<RbActionType | undefined>;
24
+ };
25
+ /**
26
+ * 操作栏子项属性
27
+ */
28
+ export type RbActionBarItemProps = {
29
+ /**
30
+ * 权限标识
31
+ */
32
+ sign: string;
33
+ /**
34
+ * 隐藏状态
35
+ */
36
+ hide?: boolean;
37
+ /**
38
+ * 表格的扩展操作 Ref,传入后可以联动数据表格的 Loading 状态
39
+ */
40
+ tableRef?: MutableRefObject<RbActionType | undefined>;
41
+ /**
42
+ * 是否检查权限,默认不传递则检查,此时 sign 只有 key 的作用
43
+ */
44
+ checkSign?: boolean;
45
+ /**
46
+ * 点击触发方法
47
+ */
48
+ onClick: () => void;
49
+ /**
50
+ * 内容
51
+ */
52
+ content?: React.ReactNode | string;
53
+ /**
54
+ * 二次确认参数(气泡框提示)
55
+ */
56
+ doubleCheck?: {
57
+ /**
58
+ * 是否开启
59
+ */
60
+ enable: boolean;
61
+ /**
62
+ * 标题
63
+ */
64
+ title: string;
65
+ /**
66
+ * 描述
67
+ */
68
+ description?: string;
69
+ };
70
+ };
@@ -1,8 +1,9 @@
1
1
  import { RbDataTableProps } from "./type";
2
2
  /**
3
3
  * RB 数据表格
4
+ *
4
5
  * @param props 参数配置
5
6
  * @constructor
6
7
  */
7
- declare const RbDataTable: <DataSource, U, ValueType = "text">(props: RbDataTableProps<DataSource, U, ValueType>) => import("react/jsx-runtime").JSX.Element;
8
+ declare const RbDataTable: <DataSource, U, ValueType = "text">(props: RbDataTableProps<DataSource, U, ValueType>) => any;
8
9
  export default RbDataTable;
@@ -35,7 +35,7 @@ export type RbDataTableProps<DataSource, U, ValueType = 'text'> = {
35
35
  /**
36
36
  * 查询参数配置
37
37
  */
38
- params: U;
38
+ params?: U;
39
39
  /**
40
40
  * 远程数据请求
41
41
  *
@@ -51,7 +51,7 @@ export type RbDataTableProps<DataSource, U, ValueType = 'text'> = {
51
51
  /**
52
52
  * Table action 的引用,便于自定义触发
53
53
  */
54
- actionRef: Ref<RbActionType | undefined>;
54
+ actionRef?: Ref<RbActionType | undefined>;
55
55
  /**
56
56
  * 工具栏渲染
57
57
  */
@@ -67,7 +67,7 @@ export type RbDataTableProps<DataSource, U, ValueType = 'text'> = {
67
67
  */
68
68
  tableAlertOptionRender?: AlertRenderType<DataSource>;
69
69
  /**
70
- * 缓存Key后缀,控制同一个URL下的两张表不起冲突
70
+ * 缓存 Key 后缀,控制同一个 URL 下的两张表不起冲突
71
71
  */
72
72
  cacheSuffix?: string;
73
73
  /**
@@ -0,0 +1,9 @@
1
+ import { RbThemeListenerProps } from "./type";
2
+ /**
3
+ * RB 主题监听器
4
+ *
5
+ * @param props 配置参数
6
+ * @constructor
7
+ */
8
+ declare const RbThemeListener: (props: RbThemeListenerProps) => any;
9
+ export default RbThemeListener;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ /**
3
+ * 主题监听器属性
4
+ */
5
+ export type RbThemeListenerProps = {
6
+ /**
7
+ * 子项
8
+ */
9
+ children?: React.ReactNode;
10
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * RB 主题设置器
3
+ *
4
+ * @param props 配置参数
5
+ * @constructor
6
+ */
7
+ declare const RbThemeSetter: (props: any) => any;
8
+ export default RbThemeSetter;
package/build/index.d.ts CHANGED
@@ -1,25 +1,34 @@
1
1
  import RbDataTable from "./components/DataTable/index";
2
- import RbPdfPreviewer from "./components/PdfPreviewer";
3
- import { RbActionType, RbDataTableProps } from "./components/DataTable/type";
4
- import { RbPdfPreviewerProps } from "./components/PdfPreviewer/type";
2
+ import { RbDataTableProps, RbActionType } from "./components/DataTable/type";
3
+ import { RbActionBarItem, RbActionBar } from "./components/ActionBar";
4
+ import { RbActionBarItemProps, RbActionBarProps } from "./components/ActionBar/type";
5
+ import RbThemeSetter from "./components/ThemeSetter";
6
+ import RbThemeListener from "./components/ThemeListener";
7
+ import { RbThemeListenerProps } from "./components/ThemeListener/type";
5
8
  import DbUtil from "./services/utils/dbUtil";
6
9
  import ObjectUtil from "./services/utils/objectUtil";
7
- export * from "./components/DataTable";
8
- export * from "./components/PdfPreviewer";
9
- /**
10
- * 组件
11
- */
12
- export { RbDataTable, RbPdfPreviewer };
13
- /**
14
- * 类型
15
- */
16
- export type { RbActionType, RbDataTableProps, RbPdfPreviewerProps };
17
- /**
18
- * 工具方法
19
- */
20
- export { DbUtil, ObjectUtil };
10
+ import EventUtil from "./services/utils/eventUtil";
11
+ import StorageUtil from "./services/utils/storageUtil";
12
+ import ResourceUtil from "./services/utils/resourceUtil";
13
+ import EventEnum from "./services/enums/eventEnum";
14
+ import StorageEnum from "./services/enums/storageEnum";
15
+ import zhCN from "./locales/zh-CN";
16
+ import enUS from "./locales/en-US";
17
+ export { RbDataTable };
18
+ export type { RbDataTableProps, RbActionType };
19
+ export { RbActionBarItem, RbActionBar };
20
+ export type { RbActionBarItemProps, RbActionBarProps };
21
+ export { RbThemeSetter };
22
+ export { RbThemeListener };
23
+ export type { RbThemeListenerProps };
24
+ export { DbUtil, ObjectUtil, EventUtil, StorageUtil, ResourceUtil };
25
+ export { EventEnum, StorageEnum };
26
+ export { zhCN, enUS };
21
27
  declare const _default: {
22
- RbDataTable: <DataSource, U, ValueType = "text">(props: RbDataTableProps<DataSource, U, ValueType>) => import("react/jsx-runtime").JSX.Element;
23
- RbPdfPreviewer: import("react").FC<RbPdfPreviewerProps>;
28
+ RbDataTable: <DataSource, U, ValueType = "text">(props: RbDataTableProps<DataSource, U, ValueType>) => any;
29
+ RbActionBarItem: (props: RbActionBarItemProps) => any;
30
+ RbActionBar: (props: RbActionBarProps) => any;
31
+ RbThemeSetter: (props: any) => any;
32
+ RbThemeListener: (props: RbThemeListenerProps) => any;
24
33
  };
25
34
  export default _default;