@spacego/fe-components 0.3.1 → 0.3.3

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
package/lib/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { getIcon as a, renderIcon as f } from "./utils/icon.js";
2
- import { applyTheme as p, applyThemeColor as u, applyThemeWithTransition as s, getRealTheme as l, getTheme as x, initTheme as d, listenSystemTheme as F, toggleTheme as i } from "./utils/theme.js";
2
+ import { applyTheme as p, applyThemeColor as s, applyThemeWithTransition as u, getRealTheme as l, getTheme as x, initTheme as d, listenSystemTheme as F, toggleTheme as i } from "./utils/theme.js";
3
3
  import { useLayoutConfigStore as c } from "./store/modules/layout-config.store.js";
4
4
  import { useThemeStore as h } from "./store/modules/theme.store.js";
5
5
  import { NOOP as g, STORE_KEY as C } from "./config/constants.js";
6
6
  import { THEME_COLORS as b } from "./config/theme.js";
7
7
  import { generateRouter as y } from "./router/index.js";
8
- import { useAuth as I } from "./hooks/use-auth.hook/index.js";
8
+ import { useAuth as S } from "./hooks/use-auth.hook/index.js";
9
9
  import "@spacego/turbo-utils";
10
10
  import "react";
11
11
  import { default as A } from "./fe-description-render/index.js";
@@ -25,60 +25,59 @@ import { default as oe } from "./fe-form/fe-form/index.js";
25
25
  import { default as te } from "./fe-form/fe-form-auto-complete/index.js";
26
26
  import { default as fe } from "./fe-form/fe-form-btn-group/index.js";
27
27
  import { default as pe } from "./fe-form/fe-form-cascader/index.js";
28
- import { default as se } from "./fe-form/fe-form-checkbox-group/index.js";
28
+ import { default as ue } from "./fe-form/fe-form-checkbox-group/index.js";
29
29
  import { default as xe } from "./fe-form/fe-form-date-picker/index.js";
30
30
  import { default as Fe } from "./fe-form/fe-form-date-range-picker/index.js";
31
31
  import { default as ne } from "./fe-form/fe-form-input/index.js";
32
- import { default as Te } from "./fe-form/fe-form-input-input/index.js";
33
- import { default as Pe } from "./fe-form/fe-form-input-number/index.js";
34
- import { default as Ce } from "./fe-form/fe-form-item/index.js";
35
- import { default as be } from "./fe-form/fe-form-label/index.js";
36
- import { default as ye } from "./fe-form/fe-form-radio/index.js";
37
- import { default as Ie } from "./fe-form/fe-form-render/index.js";
38
- import { default as Ae } from "./fe-form/fe-form-rich-text/index.js";
39
- import { default as Ge } from "./fe-form/fe-form-select/index.js";
40
- import { default as De } from "./fe-form/fe-form-switch/index.js";
41
- import { default as Ne } from "./fe-form/fe-form-text/index.js";
42
- import { default as ve } from "./fe-form/fe-form-text-area/index.js";
43
- import { default as we } from "./fe-form/fe-form-time-picker/index.js";
44
- import { default as qe } from "./fe-form/fe-form-upload/index.js";
45
- import { getFormItemProps as He, getLabelProps as Ke } from "./fe-form/utils/index.js";
46
- import { default as Ye } from "./fe-input/index.js";
47
- import { default as Je } from "./fe-input-number/index.js";
48
- import { default as Ve } from "./fe-layouts/auth-layout/index.js";
49
- import { default as Ze } from "./fe-layouts/basics-layout/index.js";
50
- import { default as eo } from "./fe-layouts/blank-layout/index.js";
51
- import { GlobalContext as ro, useGlobal as to } from "./fe-layouts/context/context.js";
52
- import { default as fo } from "./fe-layouts/context/global-context.provider.js";
53
- import { default as po } from "./fe-layouts/layout.js";
54
- import { default as so } from "./fe-link/index.js";
55
- import { default as xo } from "./fe-loading/index.js";
56
- import { default as io } from "./fe-map/index.js";
57
- import { default as co } from "./fe-modal/index.js";
58
- import { default as ho } from "./fe-pagination/index.js";
59
- import { default as go } from "./fe-panel/index.js";
60
- import { usePanelContext as Ro } from "./fe-panel/use-panel-context.js";
61
- import { FePermission as ko } from "./fe-permission/index.js";
62
- import { default as Lo } from "./fe-permission-provider/index.js";
63
- import { default as So } from "./fe-radio/index.js";
64
- import { default as Eo } from "./fe-radio-group/index.js";
65
- import { default as Bo } from "./fe-rich-text/index.js";
66
- import { default as Oo } from "./fe-select/index.js";
67
- import { default as Uo } from "./fe-switch/index.js";
68
- import { default as Mo } from "./fe-table/fe-table/index.js";
69
- import { shouldRequestPreviousPage as _o } from "./fe-table/fe-table-utils/index.js";
70
- import { default as zo } from "./fe-table/use-edit-table/index.js";
71
- import { default as Ko } from "./fe-table/use-table/index.js";
72
- import { default as Yo } from "./fe-text-area/index.js";
73
- import { default as Jo } from "./fe-time-picker/index.js";
74
- import { default as Vo } from "./fe-upload/index.js";
75
- import { default as Zo } from "./fe-upload-atomic/index.js";
76
- import { default as er } from "./fe-upload-crop/index.js";
77
- import { createLazyComponent as rr, getPath as tr, processRoutes as ar } from "./router/utils.js";
32
+ import { default as Te } from "./fe-form/fe-form-input-number/index.js";
33
+ import { default as Pe } from "./fe-form/fe-form-item/index.js";
34
+ import { default as Ce } from "./fe-form/fe-form-label/index.js";
35
+ import { default as be } from "./fe-form/fe-form-radio/index.js";
36
+ import { default as ye } from "./fe-form/fe-form-render/index.js";
37
+ import { default as Se } from "./fe-form/fe-form-rich-text/index.js";
38
+ import { default as Ae } from "./fe-form/fe-form-select/index.js";
39
+ import { default as Ge } from "./fe-form/fe-form-switch/index.js";
40
+ import { default as De } from "./fe-form/fe-form-text/index.js";
41
+ import { default as Ne } from "./fe-form/fe-form-text-area/index.js";
42
+ import { default as ve } from "./fe-form/fe-form-time-picker/index.js";
43
+ import { default as we } from "./fe-form/fe-form-upload/index.js";
44
+ import { getFormItemProps as qe, getLabelProps as ze } from "./fe-form/utils/index.js";
45
+ import { default as Ke } from "./fe-input/index.js";
46
+ import { default as Ye } from "./fe-input-number/index.js";
47
+ import { default as Je } from "./fe-layouts/auth-layout/index.js";
48
+ import { default as Ve } from "./fe-layouts/basics-layout/index.js";
49
+ import { default as Ze } from "./fe-layouts/blank-layout/index.js";
50
+ import { GlobalContext as eo, useGlobal as oo } from "./fe-layouts/context/context.js";
51
+ import { default as to } from "./fe-layouts/context/global-context.provider.js";
52
+ import { default as fo } from "./fe-layouts/layout.js";
53
+ import { default as po } from "./fe-link/index.js";
54
+ import { default as uo } from "./fe-loading/index.js";
55
+ import { default as xo } from "./fe-map/index.js";
56
+ import { default as io } from "./fe-modal/index.js";
57
+ import { default as co } from "./fe-pagination/index.js";
58
+ import { default as ho } from "./fe-panel/index.js";
59
+ import { usePanelContext as go } from "./fe-panel/use-panel-context.js";
60
+ import { FePermission as Ro } from "./fe-permission/index.js";
61
+ import { default as ko } from "./fe-permission-provider/index.js";
62
+ import { default as Lo } from "./fe-radio/index.js";
63
+ import { default as Io } from "./fe-radio-group/index.js";
64
+ import { default as Eo } from "./fe-rich-text/index.js";
65
+ import { default as Bo } from "./fe-select/index.js";
66
+ import { default as Oo } from "./fe-switch/index.js";
67
+ import { default as Uo } from "./fe-table/fe-table/index.js";
68
+ import { shouldRequestPreviousPage as Mo } from "./fe-table/fe-table-utils/index.js";
69
+ import { default as _o } from "./fe-table/use-edit-table/index.js";
70
+ import { default as zo } from "./fe-table/use-table/index.js";
71
+ import { default as Ko } from "./fe-text-area/index.js";
72
+ import { default as Yo } from "./fe-time-picker/index.js";
73
+ import { default as Jo } from "./fe-upload/index.js";
74
+ import { default as Vo } from "./fe-upload-atomic/index.js";
75
+ import { default as Zo } from "./fe-upload-crop/index.js";
76
+ import { createLazyComponent as er, getPath as or, processRoutes as rr } from "./router/utils.js";
78
77
  export {
79
- Ve as AuthLayout,
80
- Ze as BasicsLayout,
81
- eo as BlankLayout,
78
+ Je as AuthLayout,
79
+ Ve as BasicsLayout,
80
+ Ze as BlankLayout,
82
81
  N as FeAutoComplete,
83
82
  v as FeButton,
84
83
  w as FeCascader,
@@ -93,75 +92,74 @@ export {
93
92
  te as FeFormAutoComplete,
94
93
  fe as FeFormBtnGroup,
95
94
  pe as FeFormCascader,
96
- se as FeFormCheckboxGroup,
95
+ ue as FeFormCheckboxGroup,
97
96
  xe as FeFormDatePicker,
98
97
  Fe as FeFormDateRangePicker,
99
98
  ne as FeFormInput,
100
- Te as FeFormInputInput,
101
- Pe as FeFormInputNumber,
102
- Ce as FeFormItem,
103
- be as FeFormLabel,
104
- ye as FeFormRadio,
105
- Ie as FeFormRender,
106
- Ae as FeFormRichText,
107
- Ge as FeFormSelect,
108
- De as FeFormSwitch,
109
- Ne as FeFormText,
110
- ve as FeFormTextArea,
111
- we as FeFormTimePicker,
112
- qe as FeFormUpload,
113
- Ye as FeInput,
114
- Je as FeInputNumber,
115
- po as FeLayout,
116
- so as FeLink,
117
- xo as FeLoading,
118
- io as FeMap,
119
- co as FeModal,
120
- ho as FePagination,
121
- go as FePanel,
122
- ko as FePermission,
123
- Lo as FePermissionProvider,
124
- So as FeRadio,
125
- Eo as FeRadioGroup,
126
- Bo as FeRichText,
127
- Oo as FeSelect,
128
- Uo as FeSwitch,
129
- Mo as FeTable,
130
- Yo as FeTextArea,
131
- Jo as FeTimePicker,
132
- Vo as FeUpload,
133
- Zo as FeUploadAtomic,
134
- er as FeUploadCrop,
135
- ro as GlobalContext,
136
- fo as GlobalContextProvider,
99
+ Te as FeFormInputNumber,
100
+ Pe as FeFormItem,
101
+ Ce as FeFormLabel,
102
+ be as FeFormRadio,
103
+ ye as FeFormRender,
104
+ Se as FeFormRichText,
105
+ Ae as FeFormSelect,
106
+ Ge as FeFormSwitch,
107
+ De as FeFormText,
108
+ Ne as FeFormTextArea,
109
+ ve as FeFormTimePicker,
110
+ we as FeFormUpload,
111
+ Ke as FeInput,
112
+ Ye as FeInputNumber,
113
+ fo as FeLayout,
114
+ po as FeLink,
115
+ uo as FeLoading,
116
+ xo as FeMap,
117
+ io as FeModal,
118
+ co as FePagination,
119
+ ho as FePanel,
120
+ Ro as FePermission,
121
+ ko as FePermissionProvider,
122
+ Lo as FeRadio,
123
+ Io as FeRadioGroup,
124
+ Eo as FeRichText,
125
+ Bo as FeSelect,
126
+ Oo as FeSwitch,
127
+ Uo as FeTable,
128
+ Ko as FeTextArea,
129
+ Yo as FeTimePicker,
130
+ Jo as FeUpload,
131
+ Vo as FeUploadAtomic,
132
+ Zo as FeUploadCrop,
133
+ eo as GlobalContext,
134
+ to as GlobalContextProvider,
137
135
  g as NOOP,
138
136
  C as STORE_KEY,
139
137
  b as THEME_COLORS,
140
138
  p as applyTheme,
141
- u as applyThemeColor,
142
- s as applyThemeWithTransition,
143
- rr as createLazyComponent,
139
+ s as applyThemeColor,
140
+ u as applyThemeWithTransition,
141
+ er as createLazyComponent,
144
142
  y as generateRouter,
145
- He as getFormItemProps,
143
+ qe as getFormItemProps,
146
144
  a as getIcon,
147
- Ke as getLabelProps,
148
- tr as getPath,
145
+ ze as getLabelProps,
146
+ or as getPath,
149
147
  l as getRealTheme,
150
148
  x as getTheme,
151
149
  d as initTheme,
152
150
  F as listenSystemTheme,
153
- ar as processRoutes,
151
+ rr as processRoutes,
154
152
  f as renderIcon,
155
- _o as shouldRequestPreviousPage,
153
+ Mo as shouldRequestPreviousPage,
156
154
  i as toggleTheme,
157
- I as useAuth,
158
- zo as useEditTable,
155
+ S as useAuth,
156
+ _o as useEditTable,
159
157
  $ as useForm,
160
- to as useGlobal,
158
+ oo as useGlobal,
161
159
  c as useLayoutConfigStore,
162
160
  G as useNProgress,
163
- Ro as usePanelContext,
161
+ go as usePanelContext,
164
162
  D as usePermission,
165
- Ko as useTable,
163
+ zo as useTable,
166
164
  h as useThemeStore
167
165
  };
@@ -1,4 +1,2 @@
1
1
  import { AutoCompleteProps } from 'antd';
2
-
3
-
4
- export interface FeAutoCompleteProps extends AutoCompleteProps { }
2
+ export interface FeAutoCompleteProps extends AutoCompleteProps { }
@@ -1,18 +1,16 @@
1
1
  import { ButtonProps } from 'antd';
2
2
  import { default as React } from 'react';
3
3
  import { IBasicProps, IPermissionProps } from '../typings';
4
-
5
-
6
- export interface FeButtonProps
7
- extends ButtonProps, IPermissionProps, Pick<IBasicProps, 'children'> {
8
- /**
9
- * 设置按钮最小宽度,支持数字(px)或字符串
10
- * @default 120px
11
- */
12
- minWidth?: number | string;
13
- /**
14
- * 禁用状态时的提示内容
15
- * @description 当按钮被禁用时,显示该提示内容
16
- */
17
- disabledTooltip?: string | React.ReactNode;
18
- }
4
+ export interface FeButtonProps
5
+ extends ButtonProps, IPermissionProps, Pick<IBasicProps, 'children'> {
6
+ /**
7
+ * 设置按钮最小宽度,支持数字(px)或字符串
8
+ * @default 120px
9
+ */
10
+ minWidth?: number | string;
11
+ /**
12
+ * 禁用状态时的提示内容
13
+ * @description 当按钮被禁用时,显示该提示内容
14
+ */
15
+ disabledTooltip?: string | React.ReactNode;
16
+ }
@@ -1,9 +1,7 @@
1
1
  import { CascaderProps } from 'antd';
2
-
3
-
4
- export interface FeCascaderProps extends CascaderProps {
5
- /**
6
- * @name 多选
7
- */
8
- multiple?: false;
9
- }
2
+ export interface FeCascaderProps extends CascaderProps {
3
+ /**
4
+ * @name 多选
5
+ */
6
+ multiple?: false;
7
+ }
@@ -1,8 +1,6 @@
1
1
  import { CheckboxProps } from 'antd';
2
2
  import { default as React } from 'react';
3
-
4
-
5
- export interface FeCheckboxProps extends CheckboxProps {
6
- }
7
-
8
- declare const FeCheckbox: React.ForwardRefExoticComponent<FeCheckboxProps>;
3
+ export interface FeCheckboxProps extends CheckboxProps {
4
+ }
5
+
6
+ declare const FeCheckbox: React.ForwardRefExoticComponent<FeCheckboxProps>;
@@ -1,7 +1,5 @@
1
1
  import { Checkbox } from 'antd';
2
-
3
-
4
- type CheckboxGroupProps = Parameters<typeof Checkbox.Group>[0]
5
-
6
- export interface FeCheckboxGroupProps extends CheckboxGroupProps {
7
- }
2
+ type CheckboxGroupProps = Parameters<typeof Checkbox.Group>[0]
3
+
4
+ export interface FeCheckboxGroupProps extends CheckboxGroupProps {
5
+ }
@@ -1,5 +1,3 @@
1
1
  import { DatePickerProps } from 'antd';
2
-
3
-
4
- export interface FeDatePickerProps extends DatePickerProps {
5
- }
2
+ export interface FeDatePickerProps extends DatePickerProps {
3
+ }
@@ -1,33 +1,31 @@
1
1
  import { IDescriptionsItem, TRenderType } from '../hooks/use-descriptions.hook/use-descriptions.d';
2
-
3
-
4
- export interface FeDescriptionRenderProps<DataType extends Record<string, any>> {
5
- /**
6
- *
7
- */
8
- value: any;
9
- /**
10
- * 原始值
11
- */
12
- rawValue: any;
13
- /**
14
- * @name 渲染类型
15
- */
16
- renderType: TRenderType;
17
- /**
18
- * 列宽
19
- */
20
- colSpan: IDescriptionsItem<DataType>['colSpan'];
21
- /**
22
- * @name tag渲染器参数
23
- */
24
- tagRenderParams: IDescriptionsItem<DataType>['tagRenderParams'];
25
- /**
26
- * @name link渲染器参数
27
- */
28
- linkRenderParams: IDescriptionsItem<DataType>['linkRenderParams'];
29
- /**
30
- * @name image渲染器参数
31
- */
32
- imageRenderParams: IDescriptionsItem<DataType>['imageRenderParams'];
33
- }
2
+ export interface FeDescriptionRenderProps<DataType extends Record<string, any>> {
3
+ /**
4
+ *
5
+ */
6
+ value: any;
7
+ /**
8
+ * 原始值
9
+ */
10
+ rawValue: any;
11
+ /**
12
+ * @name 渲染类型
13
+ */
14
+ renderType: TRenderType;
15
+ /**
16
+ * 列宽
17
+ */
18
+ colSpan: IDescriptionsItem<DataType>['colSpan'];
19
+ /**
20
+ * @name tag渲染器参数
21
+ */
22
+ tagRenderParams: IDescriptionsItem<DataType>['tagRenderParams'];
23
+ /**
24
+ * @name link渲染器参数
25
+ */
26
+ linkRenderParams: IDescriptionsItem<DataType>['linkRenderParams'];
27
+ /**
28
+ * @name image渲染器参数
29
+ */
30
+ imageRenderParams: IDescriptionsItem<DataType>['imageRenderParams'];
31
+ }
@@ -1,4 +1,2 @@
1
1
  import { DescriptionsProps } from 'antd';
2
-
3
-
4
- export interface FeDescriptionsProps extends DescriptionsProps {}
2
+ export interface FeDescriptionsProps extends DescriptionsProps {}
@@ -1,4 +1,2 @@
1
1
  import { EmptyProps } from 'antd';
2
-
3
-
4
- export interface FeEmptyProps extends EmptyProps {}
2
+ export interface FeEmptyProps extends EmptyProps {}
@@ -1,8 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
-
3
-
4
- export interface FeErrorBlockProps {
5
- children?: ReactNode;
6
- /** 错误信息 */
7
- message?: string;
8
- }
2
+ export interface FeErrorBlockProps {
3
+ children?: ReactNode;
4
+ /** 错误信息 */
5
+ message?: string;
6
+ }