@spacego/fe-components 0.2.2 → 0.2.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/lib/fe-layouts/layout.js +22 -22
- package/lib/index.js +46 -48
- package/lib/types/fe-form/fe-form-item/index.d.ts +1 -3
- package/lib/types/fe-form/index.d.ts +4 -4
- package/lib/types/fe-table/index.d.ts +2 -2
- package/lib/types/fe-table/type/table.d.ts +0 -2
- package/lib/types/fe-table/use-table/index.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/lib/fe-table/type/table.d.js +0 -4
package/lib/fe-layouts/layout.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useSelector as i } from "@spacego/zustand";
|
|
3
|
-
import { theme as p, ConfigProvider as c,
|
|
4
|
-
import { useMemo as
|
|
3
|
+
import { theme as p, ConfigProvider as c, App as u, Spin as g } from "antd";
|
|
4
|
+
import { useMemo as d } from "react";
|
|
5
5
|
import "@ant-design/icons";
|
|
6
|
-
import { getRealTheme as
|
|
7
|
-
import { useLayoutConfigStore as
|
|
8
|
-
import { useThemeStore as
|
|
6
|
+
import { getRealTheme as C } from "../utils/theme.js";
|
|
7
|
+
import { useLayoutConfigStore as y } from "../store/modules/layout-config.store.js";
|
|
8
|
+
import { useThemeStore as k } from "../store/modules/theme.store.js";
|
|
9
9
|
import n from "../config/theme.js";
|
|
10
10
|
import "react-router-dom";
|
|
11
11
|
import "./context/context.js";
|
|
12
|
-
import
|
|
13
|
-
import { useNProgress as
|
|
12
|
+
import L from "./context/global-context.provider.js";
|
|
13
|
+
import { useNProgress as M } from "../hooks/use-nprogress.hook/index.js";
|
|
14
14
|
import "../hooks/use-permission.hook/index.js";
|
|
15
15
|
import "@spacego/turbo-utils";
|
|
16
16
|
/* empty css */
|
|
@@ -21,9 +21,9 @@ import "../fe-text-area/index.js";
|
|
|
21
21
|
/* empty css */
|
|
22
22
|
/* empty css */
|
|
23
23
|
/* empty css */
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
24
|
+
import T from "./auth-layout/index.js";
|
|
25
|
+
import b from "./basics-layout/index.js";
|
|
26
|
+
import w from "./blank-layout/index.js";
|
|
27
27
|
/* empty css */
|
|
28
28
|
/* empty css */
|
|
29
29
|
/* empty css */
|
|
@@ -34,11 +34,11 @@ import "../_virtual/index.js";
|
|
|
34
34
|
import "../fe-table/fe-edit-table-cell/index.js";
|
|
35
35
|
import "ahooks";
|
|
36
36
|
import "../fe-table/fe-table-setting/index.js";
|
|
37
|
-
function
|
|
38
|
-
const { layoutType: r, ...s } = a, { loadingConfig: l } =
|
|
39
|
-
|
|
40
|
-
const f =
|
|
41
|
-
const h =
|
|
37
|
+
function ao(a) {
|
|
38
|
+
const { layoutType: r, ...s } = a, { loadingConfig: l } = y(i(["loadingConfig"])), { theme: t, themeColor: m } = k(i(["theme", "themeColor"]));
|
|
39
|
+
M();
|
|
40
|
+
const f = d(() => {
|
|
41
|
+
const h = C(t);
|
|
42
42
|
return {
|
|
43
43
|
cssVar: {
|
|
44
44
|
prefix: "ant"
|
|
@@ -54,19 +54,19 @@ function no(a) {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
}, [t, m]), e = (/* @__PURE__ */ new Map([
|
|
57
|
-
["blank",
|
|
58
|
-
["basic",
|
|
59
|
-
["auth",
|
|
57
|
+
["blank", w],
|
|
58
|
+
["basic", b],
|
|
59
|
+
["auth", T]
|
|
60
60
|
])).get(r);
|
|
61
|
-
return /* @__PURE__ */ o(c, { theme: f, children: /* @__PURE__ */ o(
|
|
62
|
-
|
|
61
|
+
return /* @__PURE__ */ o(c, { theme: f, children: /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o(L, { ...s, children: /* @__PURE__ */ o(
|
|
62
|
+
g,
|
|
63
63
|
{
|
|
64
64
|
spinning: l.show && r !== "basic",
|
|
65
65
|
wrapperClassName: "spin-wrapper-full",
|
|
66
66
|
children: e && /* @__PURE__ */ o(e, {}, r)
|
|
67
67
|
}
|
|
68
|
-
) }) });
|
|
68
|
+
) }) }) });
|
|
69
69
|
}
|
|
70
70
|
export {
|
|
71
|
-
|
|
71
|
+
ao as default
|
|
72
72
|
};
|
package/lib/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { getIcon as r, renderIcon as t } from "./utils/icon.js";
|
|
2
|
-
import { applyTheme as f, applyThemeColor as m, applyThemeWithTransition as p, getRealTheme as
|
|
2
|
+
import { applyTheme as f, applyThemeColor as m, applyThemeWithTransition as p, getRealTheme as u, getTheme as s, initTheme as l, listenSystemTheme as x, toggleTheme as d } from "./utils/theme.js";
|
|
3
3
|
import { useLayoutConfigStore as i } from "./store/modules/layout-config.store.js";
|
|
4
4
|
import { useThemeStore as c } from "./store/modules/theme.store.js";
|
|
5
5
|
import { NOOP as h, STORE_KEY as P } from "./config/constants.js";
|
|
6
6
|
import { THEME_COLORS as C } from "./config/theme.js";
|
|
7
|
-
import { generateRouter as
|
|
7
|
+
import { generateRouter as b } from "./router/index.js";
|
|
8
8
|
import { useAuth as y } from "./hooks/use-auth.hook/index.js";
|
|
9
9
|
import { useNProgress as I } from "./hooks/use-nprogress.hook/index.js";
|
|
10
10
|
import { usePermission as A } from "./hooks/use-permission.hook/index.js";
|
|
11
11
|
import { default as G } from "./fe-auto-complete/index.js";
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
12
|
+
import { default as D } from "./fe-button/index.js";
|
|
13
|
+
import { default as N } from "./fe-cascader/index.js";
|
|
14
14
|
import { default as v } from "./fe-checkbox/index.js";
|
|
15
15
|
import { default as w } from "./fe-checkbox-group/index.js";
|
|
16
16
|
import { default as q } from "./fe-date-picker/index.js";
|
|
@@ -24,20 +24,20 @@ import { default as oe } from "./fe-form/fe-form-auto-complete/index.js";
|
|
|
24
24
|
import { default as te } from "./fe-form/fe-form-btn-group/index.js";
|
|
25
25
|
import { default as fe } from "./fe-form/fe-form-cascader/index.js";
|
|
26
26
|
import { default as pe } from "./fe-form/fe-form-checkbox-group/index.js";
|
|
27
|
-
import { default as
|
|
27
|
+
import { default as se } from "./fe-form/fe-form-date-picker/index.js";
|
|
28
28
|
import { default as xe } from "./fe-form/fe-form-date-range-picker/index.js";
|
|
29
29
|
import { default as Fe } from "./fe-form/fe-form-input/index.js";
|
|
30
30
|
import { default as ne } from "./fe-form/fe-form-input-input/index.js";
|
|
31
31
|
import { default as Te } from "./fe-form/fe-form-input-number/index.js";
|
|
32
32
|
import { default as Pe } from "./fe-form/fe-form-item/index.js";
|
|
33
33
|
import { default as Ce } from "./fe-form/fe-form-label/index.js";
|
|
34
|
-
import { default as
|
|
34
|
+
import { default as be } from "./fe-form/fe-form-radio/index.js";
|
|
35
35
|
import { default as ye } from "./fe-form/fe-form-render/index.js";
|
|
36
36
|
import { default as Ie } from "./fe-form/fe-form-rich-text/index.js";
|
|
37
37
|
import { default as Ae } from "./fe-form/fe-form-select/index.js";
|
|
38
38
|
import { default as Ge } from "./fe-form/fe-form-switch/index.js";
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
39
|
+
import { default as De } from "./fe-form/fe-form-text/index.js";
|
|
40
|
+
import { default as Ne } from "./fe-form/fe-form-text-area/index.js";
|
|
41
41
|
import { default as ve } from "./fe-form/fe-form-time-picker/index.js";
|
|
42
42
|
import { default as we } from "./fe-form/fe-form-upload/index.js";
|
|
43
43
|
import { getFormItemProps as qe, getLabelProps as ze } from "./fe-form/utils/index.js";
|
|
@@ -50,37 +50,36 @@ import { GlobalContext as eo, useGlobal as oo } from "./fe-layouts/context/conte
|
|
|
50
50
|
import { default as to } from "./fe-layouts/context/global-context.provider.js";
|
|
51
51
|
import { default as fo } from "./fe-layouts/layout.js";
|
|
52
52
|
import { default as po } from "./fe-link/index.js";
|
|
53
|
-
import { default as
|
|
53
|
+
import { default as so } from "./fe-loading/index.js";
|
|
54
54
|
import { default as xo } from "./fe-map/index.js";
|
|
55
55
|
import { default as io } from "./fe-modal/index.js";
|
|
56
56
|
import { default as co } from "./fe-pagination/index.js";
|
|
57
57
|
import { default as ho } from "./fe-panel/index.js";
|
|
58
58
|
import { usePanelContext as go } from "./fe-panel/use-panel-context.js";
|
|
59
|
-
import { FePermission as
|
|
59
|
+
import { FePermission as Ro } from "./fe-permission/index.js";
|
|
60
60
|
import { default as ko } from "./fe-permission-provider/index.js";
|
|
61
61
|
import { default as Lo } from "./fe-radio/index.js";
|
|
62
62
|
import { default as So } from "./fe-radio-group/index.js";
|
|
63
63
|
import { default as Eo } from "./fe-rich-text/index.js";
|
|
64
|
-
import { default as
|
|
65
|
-
import { default as
|
|
66
|
-
import { default as
|
|
64
|
+
import { default as Bo } from "./fe-select/index.js";
|
|
65
|
+
import { default as Oo } from "./fe-switch/index.js";
|
|
66
|
+
import { default as Uo } from "./fe-table/fe-table/index.js";
|
|
67
67
|
import { shouldRequestPreviousPage as Mo } from "./fe-table/fe-table-utils/index.js";
|
|
68
|
-
import {
|
|
69
|
-
import { default as zo } from "./fe-table/use-
|
|
70
|
-
import { default as Ko } from "./fe-
|
|
71
|
-
import { default as Yo } from "./fe-
|
|
72
|
-
import { default as Jo } from "./fe-
|
|
73
|
-
import { default as Vo } from "./fe-upload/index.js";
|
|
74
|
-
import { default as Zo } from "./fe-upload-
|
|
75
|
-
import {
|
|
76
|
-
import { createLazyComponent as rr, getPath as tr, processRoutes as ar } from "./router/utils.js";
|
|
68
|
+
import { default as _o } from "./fe-table/use-edit-table/index.js";
|
|
69
|
+
import { default as zo } from "./fe-table/use-table/index.js";
|
|
70
|
+
import { default as Ko } from "./fe-text-area/index.js";
|
|
71
|
+
import { default as Yo } from "./fe-time-picker/index.js";
|
|
72
|
+
import { default as Jo } from "./fe-upload/index.js";
|
|
73
|
+
import { default as Vo } from "./fe-upload-atomic/index.js";
|
|
74
|
+
import { default as Zo } from "./fe-upload-crop/index.js";
|
|
75
|
+
import { createLazyComponent as er, getPath as or, processRoutes as rr } from "./router/utils.js";
|
|
77
76
|
export {
|
|
78
77
|
Je as AuthLayout,
|
|
79
78
|
Ve as BasicsLayout,
|
|
80
79
|
Ze as BlankLayout,
|
|
81
80
|
G as FeAutoComplete,
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
D as FeButton,
|
|
82
|
+
N as FeCascader,
|
|
84
83
|
v as FeCheckbox,
|
|
85
84
|
w as FeCheckboxGroup,
|
|
86
85
|
q as FeDatePicker,
|
|
@@ -93,75 +92,74 @@ export {
|
|
|
93
92
|
te as FeFormBtnGroup,
|
|
94
93
|
fe as FeFormCascader,
|
|
95
94
|
pe as FeFormCheckboxGroup,
|
|
96
|
-
|
|
95
|
+
se as FeFormDatePicker,
|
|
97
96
|
xe as FeFormDateRangePicker,
|
|
98
97
|
Fe as FeFormInput,
|
|
99
98
|
ne as FeFormInputInput,
|
|
100
99
|
Te as FeFormInputNumber,
|
|
101
100
|
Pe as FeFormItem,
|
|
102
101
|
Ce as FeFormLabel,
|
|
103
|
-
|
|
102
|
+
be as FeFormRadio,
|
|
104
103
|
ye as FeFormRender,
|
|
105
104
|
Ie as FeFormRichText,
|
|
106
105
|
Ae as FeFormSelect,
|
|
107
106
|
Ge as FeFormSwitch,
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
De as FeFormText,
|
|
108
|
+
Ne as FeFormTextArea,
|
|
110
109
|
ve as FeFormTimePicker,
|
|
111
110
|
we as FeFormUpload,
|
|
112
111
|
Ke as FeInput,
|
|
113
112
|
Ye as FeInputNumber,
|
|
114
113
|
fo as FeLayout,
|
|
115
114
|
po as FeLink,
|
|
116
|
-
|
|
115
|
+
so as FeLoading,
|
|
117
116
|
xo as FeMap,
|
|
118
117
|
io as FeModal,
|
|
119
118
|
co as FePagination,
|
|
120
119
|
ho as FePanel,
|
|
121
|
-
|
|
120
|
+
Ro as FePermission,
|
|
122
121
|
ko as FePermissionProvider,
|
|
123
122
|
Lo as FeRadio,
|
|
124
123
|
So as FeRadioGroup,
|
|
125
124
|
Eo as FeRichText,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
X as FeUseForm,
|
|
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,
|
|
135
133
|
eo as GlobalContext,
|
|
136
134
|
to as GlobalContextProvider,
|
|
137
135
|
h as NOOP,
|
|
138
136
|
P as STORE_KEY,
|
|
139
137
|
C as THEME_COLORS,
|
|
140
|
-
zo as UseEditTable,
|
|
141
|
-
Ko as UseTable,
|
|
142
138
|
f as applyTheme,
|
|
143
139
|
m as applyThemeColor,
|
|
144
140
|
p as applyThemeWithTransition,
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
er as createLazyComponent,
|
|
142
|
+
b as generateRouter,
|
|
147
143
|
qe as getFormItemProps,
|
|
148
144
|
r as getIcon,
|
|
149
145
|
ze as getLabelProps,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
146
|
+
or as getPath,
|
|
147
|
+
u as getRealTheme,
|
|
148
|
+
s as getTheme,
|
|
153
149
|
l as initTheme,
|
|
154
150
|
x as listenSystemTheme,
|
|
155
|
-
|
|
151
|
+
rr as processRoutes,
|
|
156
152
|
t as renderIcon,
|
|
157
153
|
Mo as shouldRequestPreviousPage,
|
|
158
154
|
d as toggleTheme,
|
|
159
155
|
y as useAuth,
|
|
156
|
+
_o as useEditTable,
|
|
157
|
+
X as useForm,
|
|
160
158
|
oo as useGlobal,
|
|
161
159
|
i as useLayoutConfigStore,
|
|
162
160
|
I as useNProgress,
|
|
163
161
|
go as usePanelContext,
|
|
164
162
|
A as usePermission,
|
|
165
|
-
|
|
163
|
+
zo as useTable,
|
|
166
164
|
c as useThemeStore
|
|
167
165
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FeFormRule } from '../fe-form/index.d';
|
|
2
2
|
import { FeFormLabelProps } from '../fe-form-label/index.d';
|
|
3
|
-
export type FeFormRule = FeFormRule;
|
|
4
|
-
|
|
5
3
|
export interface FeFormItemProps extends FeFormLabelProps {
|
|
6
4
|
/**
|
|
7
5
|
* 表单标识
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as useForm } from '../hooks/use-form';
|
|
2
2
|
export { default as FeForm } from './fe-form';
|
|
3
|
-
export * from './fe-form';
|
|
3
|
+
export * from './fe-form/index.d';
|
|
4
4
|
export { default as FeFormAutoComplete } from './fe-form-auto-complete';
|
|
5
5
|
export { default as FeFormBtnGroup } from './fe-form-btn-group';
|
|
6
6
|
export { default as FeFormCascader } from './fe-form-cascader';
|
|
@@ -11,9 +11,9 @@ export { default as FeFormInput } from './fe-form-input';
|
|
|
11
11
|
export { default as FeFormInputInput } from './fe-form-input-input';
|
|
12
12
|
export { default as FeFormInputNumber } from './fe-form-input-number';
|
|
13
13
|
export { default as FeFormItem } from './fe-form-item';
|
|
14
|
-
export * from './fe-form-item';
|
|
14
|
+
export * from './fe-form-item/index.d';
|
|
15
15
|
export { default as FeFormLabel } from './fe-form-label';
|
|
16
|
-
export * from './fe-form-label';
|
|
16
|
+
export * from './fe-form-label/index.d';
|
|
17
17
|
export { default as FeFormRadio } from './fe-form-radio';
|
|
18
18
|
export { default as FeFormRender } from './fe-form-render';
|
|
19
19
|
export { default as FeFormRichText } from './fe-form-rich-text';
|
|
@@ -2,5 +2,5 @@ export { default as FeTable } from './fe-table';
|
|
|
2
2
|
export { shouldRequestPreviousPage } from './fe-table-utils';
|
|
3
3
|
export * from './type/table.d';
|
|
4
4
|
export * from './type/table-context.d';
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
5
|
+
export { default as useEditTable } from './use-edit-table';
|
|
6
|
+
export { default as useTable } from './use-table';
|
|
@@ -593,8 +593,6 @@ export interface IUseTableRsp<DataType = Record<string, any>> {
|
|
|
593
593
|
shouldRequestPreviousPage: (record: any[], pageNo: number) => boolean;
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
-
export const useTable = <DataType = Record<string, any>>(params: ITableParams<DataType>) => IUseTableRsp<DataType>;
|
|
597
|
-
|
|
598
596
|
export interface UseTableSelectionProps<T = any> {
|
|
599
597
|
/**
|
|
600
598
|
* 表格行选择配置
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ITableParams, IUseTableRsp } from '../type/table.d';
|
|
2
|
-
declare const useTable: <DataType extends Record<string, any> = Record<string, any>>(params: ITableParams<DataType>) => IUseTableRsp
|
|
2
|
+
declare const useTable: <DataType extends Record<string, any> = Record<string, any>>(params: ITableParams<DataType>) => IUseTableRsp<DataType>;
|
|
3
3
|
export default useTable;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export { default as FePanel } from './fe-panel';
|
|
|
32
32
|
export { usePanelContext } from './fe-panel/use-panel-context';
|
|
33
33
|
export { default as FePermission } from './fe-permission';
|
|
34
34
|
export { default as FePermissionProvider } from './fe-permission-provider';
|
|
35
|
+
export { type FePermissionProviderProps } from './fe-permission-provider/index.d';
|
|
35
36
|
export { default as FeRadio } from './fe-radio';
|
|
36
37
|
export { default as FeRadioGroup } from './fe-radio-group';
|
|
37
38
|
export { default as FeRichText } from './fe-rich-text';
|
package/package.json
CHANGED