@spacego/fe-components 0.3.1 → 0.3.2

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.
Files changed (52) hide show
  1. package/README.md +37 -37
  2. package/lib/fe-form/fe-form/index.js +25 -27
  3. package/lib/index.css +1 -1
  4. package/lib/index.js +101 -103
  5. package/lib/types/fe-auto-complete/auto-complete.d.ts +1 -3
  6. package/lib/types/fe-button/button.d.ts +13 -15
  7. package/lib/types/fe-cascader/cascader.d.ts +6 -8
  8. package/lib/types/fe-checkbox/checkbox.d.ts +4 -6
  9. package/lib/types/fe-checkbox-group/checkbox-group.d.ts +4 -6
  10. package/lib/types/fe-date-picker/date-picker.d.ts +2 -4
  11. package/lib/types/fe-description-render/description-render.d.ts +30 -32
  12. package/lib/types/fe-descriptions/descriptions.d.ts +1 -3
  13. package/lib/types/fe-empty/empty.d.ts +1 -3
  14. package/lib/types/fe-error-block/error-block.d.ts +5 -7
  15. package/lib/types/fe-form/fe-form/form.d.ts +279 -338
  16. package/lib/types/fe-form/fe-form-item/form-item.d.ts +64 -66
  17. package/lib/types/fe-form/fe-form-label/form-label.d.ts +42 -44
  18. package/lib/types/fe-form/index.d.ts +0 -1
  19. package/lib/types/fe-input/input.d.ts +10 -12
  20. package/lib/types/fe-input-number/input-number.d.ts +1 -3
  21. package/lib/types/fe-layouts/context/global-context.d.ts +238 -240
  22. package/lib/types/fe-link/link.d.ts +4 -6
  23. package/lib/types/fe-map/map.d.ts +73 -73
  24. package/lib/types/fe-modal/modal.d.ts +18 -20
  25. package/lib/types/fe-pagination/pagination.d.ts +1 -3
  26. package/lib/types/fe-panel/panel-toolbar.d.ts +3 -5
  27. package/lib/types/fe-panel/panel.d.ts +58 -60
  28. package/lib/types/fe-permission/permission.d.ts +9 -11
  29. package/lib/types/fe-permission-provider/permission-provider.d.ts +6 -8
  30. package/lib/types/fe-radio/radio.d.ts +1 -3
  31. package/lib/types/fe-radio-group/radio-group.d.ts +1 -3
  32. package/lib/types/fe-rich-text/rich-text.d.ts +165 -167
  33. package/lib/types/fe-select/select.d.ts +7 -9
  34. package/lib/types/fe-switch/switch.d.ts +1 -3
  35. package/lib/types/fe-table/fe-table-link/table-link.d.ts +8 -10
  36. package/lib/types/fe-table/fe-table-render/table-render.d.ts +10 -12
  37. package/lib/types/fe-table/fe-table-toolbar/table-toolbar.d.ts +14 -16
  38. package/lib/types/fe-table/fe-table-utils/index.d.ts +4 -4
  39. package/lib/types/fe-table/type/table-context.d.ts +60 -60
  40. package/lib/types/fe-table/type/table.d.ts +787 -789
  41. package/lib/types/fe-text-area/text-area.d.ts +3 -5
  42. package/lib/types/fe-time-picker/time-picker.d.ts +2 -4
  43. package/lib/types/fe-upload/upload.d.ts +81 -83
  44. package/lib/types/fe-upload-atomic/upload-atomic.d.ts +1 -3
  45. package/lib/types/hooks/use-descriptions.hook/use-descriptions.d.ts +149 -151
  46. package/lib/types/hooks/use-form.hook/use-form.d.ts +11 -13
  47. package/lib/types/hooks/use-permission.hook/use-permission.d.ts +10 -10
  48. package/lib/types/typings/index.d.ts +98 -98
  49. package/lib/types/typings/shims-axios.d.ts +38 -38
  50. package/package.json +3 -3
  51. package/lib/fe-form/fe-form-input-input/index.js +0 -63
  52. package/lib/types/fe-form/fe-form-input-input/index.d.ts +0 -3
@@ -1,18 +1,16 @@
1
1
  import { default as React } from 'react';
2
2
  import { IToolBarBtnConfig } from '../type/table.d';
3
-
4
-
5
- export interface FeTableToolbarProps {
6
- config: IToolBarBtnConfig[];
7
- btnPermissionList?: string[];
8
- modal?: {
9
- confirm: (config: {
10
- title?: string;
11
- content?: React.ReactNode;
12
- onOk?: () => void;
13
- onCancel?: () => void;
14
- }) => void;
15
- }
16
- }
17
-
18
- declare const FeTableToolbar: React.ForwardRefExoticComponent<FeTableToolbarProps>;
3
+ export interface FeTableToolbarProps {
4
+ config: IToolBarBtnConfig[];
5
+ btnPermissionList?: string[];
6
+ modal?: {
7
+ confirm: (config: {
8
+ title?: string;
9
+ content?: React.ReactNode;
10
+ onOk?: () => void;
11
+ onCancel?: () => void;
12
+ }) => void;
13
+ }
14
+ }
15
+
16
+ declare const FeTableToolbar: React.ForwardRefExoticComponent<FeTableToolbarProps>;
@@ -48,7 +48,7 @@ export declare const processTableColumns: (columns: ITableColumns<any>[], column
48
48
  filter?: any;
49
49
  dictfilterParams?: {
50
50
  dictList: Array<{
51
- dataIndex: string;
51
+ value: string;
52
52
  label: string;
53
53
  }>;
54
54
  };
@@ -57,7 +57,7 @@ export declare const processTableColumns: (columns: ITableColumns<any>[], column
57
57
  filter?: any;
58
58
  dictfilterParams?: {
59
59
  dictList: Array<{
60
- dataIndex: string;
60
+ value: string;
61
61
  label: string;
62
62
  }>;
63
63
  };
@@ -100,7 +100,7 @@ export declare const applyColumnStyles: (columns: ITableColumns<any>[]) => {
100
100
  filter?: any;
101
101
  dictfilterParams?: {
102
102
  dictList: Array<{
103
- dataIndex: string;
103
+ value: string;
104
104
  label: string;
105
105
  }>;
106
106
  };
@@ -109,7 +109,7 @@ export declare const applyColumnStyles: (columns: ITableColumns<any>[]) => {
109
109
  filter?: any;
110
110
  dictfilterParams?: {
111
111
  dictList: Array<{
112
- dataIndex: string;
112
+ value: string;
113
113
  label: string;
114
114
  }>;
115
115
  };
@@ -1,60 +1,60 @@
1
- /**
2
- * 可编辑表格上下文类型定义
3
- */
4
- export interface TableContext {
5
- /**
6
- * 当前行记录(包含最新表单数据)
7
- * 注意:这里的字段值是已经从表单中获取的最新值
8
- */
9
-
10
- currentRecord: Record<string, any>;
11
-
12
- /**
13
- * 所有表格行数据
14
- * 格式: { rowId: rowData }
15
- * 例如: { '1': { id: 1, name: '张三' }, '2': { id: 2, name: '李四' } }
16
- */
17
- allTableData: Record<string, Record<string, any>>;
18
-
19
- /**
20
- * Ant Design Form 表单实例
21
- * 可以使用所有表单方法,如:
22
- * - getFieldValue(name)
23
- * - setFieldValue(name, value)
24
- * - getFieldsValue()
25
- * - setFieldsValue(values)
26
- * - validateFields()
27
- */
28
- form: any;
29
- }
30
-
31
- /**
32
- * 带表格上下文的事件处理器类型
33
- * 用于为事件处理器提供类型提示
34
- *
35
- * @example
36
- * ```typescript
37
- * import type { TableEventHandler } from '@orchid/fe-table';
38
- *
39
- * const handleBlur: TableEventHandler<[React.FocusEvent]> = (event, tableContext) => {
40
- * const { currentRecord, form } = tableContext;
41
- * // ...
42
- * };
43
- * ```
44
- */
45
- export type TableEventHandler<T extends any[] = any[]> = (...args: [...T, TableContext]) => void | Promise<void>;
46
-
47
- /**
48
- * 表格值变更事件处理器
49
- */
50
- export type TableValueChangeHandler = TableEventHandler<[any]>;
51
-
52
- /**
53
- * 表格点击事件处理器
54
- */
55
- export type TableClickHandler = TableEventHandler<[React.MouseEvent]>;
56
-
57
- /**
58
- * 表格焦点事件处理器
59
- */
60
- export type TableFocusHandler = TableEventHandler<[React.FocusEvent]>;
1
+ /**
2
+ * 可编辑表格上下文类型定义
3
+ */
4
+ export interface TableContext {
5
+ /**
6
+ * 当前行记录(包含最新表单数据)
7
+ * 注意:这里的字段值是已经从表单中获取的最新值
8
+ */
9
+
10
+ currentRecord: Record<string, any>;
11
+
12
+ /**
13
+ * 所有表格行数据
14
+ * 格式: { rowId: rowData }
15
+ * 例如: { '1': { id: 1, name: '张三' }, '2': { id: 2, name: '李四' } }
16
+ */
17
+ allTableData: Record<string, Record<string, any>>;
18
+
19
+ /**
20
+ * Ant Design Form 表单实例
21
+ * 可以使用所有表单方法,如:
22
+ * - getFieldValue(name)
23
+ * - setFieldValue(name, value)
24
+ * - getFieldsValue()
25
+ * - setFieldsValue(values)
26
+ * - validateFields()
27
+ */
28
+ form: any;
29
+ }
30
+
31
+ /**
32
+ * 带表格上下文的事件处理器类型
33
+ * 用于为事件处理器提供类型提示
34
+ *
35
+ * @example
36
+ * ```typescript
37
+ * import type { TableEventHandler } from '@orchid/fe-table';
38
+ *
39
+ * const handleBlur: TableEventHandler<[React.FocusEvent]> = (event, tableContext) => {
40
+ * const { currentRecord, form } = tableContext;
41
+ * // ...
42
+ * };
43
+ * ```
44
+ */
45
+ export type TableEventHandler<T extends any[] = any[]> = (...args: [...T, TableContext]) => void | Promise<void>;
46
+
47
+ /**
48
+ * 表格值变更事件处理器
49
+ */
50
+ export type TableValueChangeHandler = TableEventHandler<[any]>;
51
+
52
+ /**
53
+ * 表格点击事件处理器
54
+ */
55
+ export type TableClickHandler = TableEventHandler<[React.MouseEvent]>;
56
+
57
+ /**
58
+ * 表格焦点事件处理器
59
+ */
60
+ export type TableFocusHandler = TableEventHandler<[React.FocusEvent]>;