@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.
- package/README.md +37 -37
- package/lib/fe-form/fe-form/index.js +25 -27
- package/lib/index.css +1 -1
- package/lib/index.js +101 -103
- package/lib/types/fe-auto-complete/auto-complete.d.ts +1 -3
- package/lib/types/fe-button/button.d.ts +13 -15
- package/lib/types/fe-cascader/cascader.d.ts +6 -8
- package/lib/types/fe-checkbox/checkbox.d.ts +4 -6
- package/lib/types/fe-checkbox-group/checkbox-group.d.ts +4 -6
- package/lib/types/fe-date-picker/date-picker.d.ts +2 -4
- package/lib/types/fe-description-render/description-render.d.ts +30 -32
- package/lib/types/fe-descriptions/descriptions.d.ts +1 -3
- package/lib/types/fe-empty/empty.d.ts +1 -3
- package/lib/types/fe-error-block/error-block.d.ts +5 -7
- package/lib/types/fe-form/fe-form/form.d.ts +279 -338
- package/lib/types/fe-form/fe-form-item/form-item.d.ts +64 -66
- package/lib/types/fe-form/fe-form-label/form-label.d.ts +42 -44
- package/lib/types/fe-form/index.d.ts +0 -1
- package/lib/types/fe-input/input.d.ts +10 -12
- package/lib/types/fe-input-number/input-number.d.ts +1 -3
- package/lib/types/fe-layouts/context/global-context.d.ts +238 -240
- package/lib/types/fe-link/link.d.ts +4 -6
- package/lib/types/fe-map/map.d.ts +73 -73
- package/lib/types/fe-modal/modal.d.ts +18 -20
- package/lib/types/fe-pagination/pagination.d.ts +1 -3
- package/lib/types/fe-panel/panel-toolbar.d.ts +3 -5
- package/lib/types/fe-panel/panel.d.ts +58 -60
- package/lib/types/fe-permission/permission.d.ts +9 -11
- package/lib/types/fe-permission-provider/permission-provider.d.ts +6 -8
- package/lib/types/fe-radio/radio.d.ts +1 -3
- package/lib/types/fe-radio-group/radio-group.d.ts +1 -3
- package/lib/types/fe-rich-text/rich-text.d.ts +165 -167
- package/lib/types/fe-select/select.d.ts +7 -9
- package/lib/types/fe-switch/switch.d.ts +1 -3
- package/lib/types/fe-table/fe-table-link/table-link.d.ts +8 -10
- package/lib/types/fe-table/fe-table-render/table-render.d.ts +10 -12
- package/lib/types/fe-table/fe-table-toolbar/table-toolbar.d.ts +14 -16
- package/lib/types/fe-table/fe-table-utils/index.d.ts +4 -4
- package/lib/types/fe-table/type/table-context.d.ts +60 -60
- package/lib/types/fe-table/type/table.d.ts +787 -789
- package/lib/types/fe-text-area/text-area.d.ts +3 -5
- package/lib/types/fe-time-picker/time-picker.d.ts +2 -4
- package/lib/types/fe-upload/upload.d.ts +81 -83
- package/lib/types/fe-upload-atomic/upload-atomic.d.ts +1 -3
- package/lib/types/hooks/use-descriptions.hook/use-descriptions.d.ts +149 -151
- package/lib/types/hooks/use-form.hook/use-form.d.ts +11 -13
- package/lib/types/hooks/use-permission.hook/use-permission.d.ts +10 -10
- package/lib/types/typings/index.d.ts +98 -98
- package/lib/types/typings/shims-axios.d.ts +38 -38
- package/package.json +3 -3
- package/lib/fe-form/fe-form-input-input/index.js +0 -63
- 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
|
|
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
|
|
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
|
|
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-
|
|
33
|
-
import { default as Pe } from "./fe-form/fe-form-
|
|
34
|
-
import { default as Ce } from "./fe-form/fe-form-
|
|
35
|
-
import { default as be } from "./fe-form/fe-form-
|
|
36
|
-
import { default as ye } from "./fe-form/fe-form-
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as Ae } from "./fe-form/fe-form-
|
|
39
|
-
import { default as Ge } from "./fe-form/fe-form-
|
|
40
|
-
import { default as De } from "./fe-form/fe-form-
|
|
41
|
-
import { default as Ne } from "./fe-form/fe-form-text/index.js";
|
|
42
|
-
import { default as ve } from "./fe-form/fe-form-
|
|
43
|
-
import { default as we } from "./fe-form/fe-form-
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import { default as Ye } from "./fe-input/index.js";
|
|
47
|
-
import { default as Je } from "./fe-
|
|
48
|
-
import { default as Ve } from "./fe-layouts/
|
|
49
|
-
import { default as Ze } from "./fe-layouts/
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import { default as fo } from "./fe-layouts/
|
|
53
|
-
import { default as po } from "./fe-
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as xo } from "./fe-
|
|
56
|
-
import { default as io } from "./fe-
|
|
57
|
-
import { default as co } from "./fe-
|
|
58
|
-
import { default as ho } from "./fe-
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import { default as Lo } from "./fe-
|
|
63
|
-
import { default as
|
|
64
|
-
import { default as Eo } from "./fe-
|
|
65
|
-
import { default as Bo } from "./fe-
|
|
66
|
-
import { default as Oo } from "./fe-
|
|
67
|
-
import { default as Uo } from "./fe-
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import { default as zo } from "./fe-table/use-
|
|
71
|
-
import { default as Ko } from "./fe-
|
|
72
|
-
import { default as Yo } from "./fe-
|
|
73
|
-
import { default as Jo } from "./fe-
|
|
74
|
-
import { default as Vo } from "./fe-upload/index.js";
|
|
75
|
-
import { default as Zo } from "./fe-upload-
|
|
76
|
-
import {
|
|
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
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
|
|
95
|
+
ue as FeFormCheckboxGroup,
|
|
97
96
|
xe as FeFormDatePicker,
|
|
98
97
|
Fe as FeFormDateRangePicker,
|
|
99
98
|
ne as FeFormInput,
|
|
100
|
-
Te as
|
|
101
|
-
Pe as
|
|
102
|
-
Ce as
|
|
103
|
-
be as
|
|
104
|
-
ye as
|
|
105
|
-
|
|
106
|
-
Ae as
|
|
107
|
-
Ge as
|
|
108
|
-
De as
|
|
109
|
-
Ne as
|
|
110
|
-
ve as
|
|
111
|
-
we as
|
|
112
|
-
|
|
113
|
-
Ye as
|
|
114
|
-
|
|
115
|
-
po as
|
|
116
|
-
|
|
117
|
-
xo as
|
|
118
|
-
io as
|
|
119
|
-
co as
|
|
120
|
-
ho as
|
|
121
|
-
|
|
122
|
-
ko as
|
|
123
|
-
Lo as
|
|
124
|
-
|
|
125
|
-
Eo as
|
|
126
|
-
Bo as
|
|
127
|
-
Oo as
|
|
128
|
-
Uo as
|
|
129
|
-
|
|
130
|
-
Yo as
|
|
131
|
-
Jo as
|
|
132
|
-
Vo as
|
|
133
|
-
Zo as
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
s as applyThemeColor,
|
|
140
|
+
u as applyThemeWithTransition,
|
|
141
|
+
er as createLazyComponent,
|
|
144
142
|
y as generateRouter,
|
|
145
|
-
|
|
143
|
+
qe as getFormItemProps,
|
|
146
144
|
a as getIcon,
|
|
147
|
-
|
|
148
|
-
|
|
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
|
-
|
|
151
|
+
rr as processRoutes,
|
|
154
152
|
f as renderIcon,
|
|
155
|
-
|
|
153
|
+
Mo as shouldRequestPreviousPage,
|
|
156
154
|
i as toggleTheme,
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
S as useAuth,
|
|
156
|
+
_o as useEditTable,
|
|
159
157
|
$ as useForm,
|
|
160
|
-
|
|
158
|
+
oo as useGlobal,
|
|
161
159
|
c as useLayoutConfigStore,
|
|
162
160
|
G as useNProgress,
|
|
163
|
-
|
|
161
|
+
go as usePanelContext,
|
|
164
162
|
D as usePermission,
|
|
165
|
-
|
|
163
|
+
zo as useTable,
|
|
166
164
|
h as useThemeStore
|
|
167
165
|
};
|
|
@@ -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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,33 +1,31 @@
|
|
|
1
1
|
import { IDescriptionsItem, TRenderType } from '../hooks/use-descriptions.hook/use-descriptions.d';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
+
}
|