@spacego/fe-components 0.1.1 → 0.2.0
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/_virtual/Resizable.js +4 -0
- package/lib/_virtual/ResizableBox.js +4 -0
- package/lib/_virtual/index.js +5 -0
- package/lib/_virtual/index2.js +4 -0
- package/lib/_virtual/index3.js +4 -0
- package/lib/_virtual/index4.js +4 -0
- package/lib/_virtual/propTypes.js +4 -0
- package/lib/_virtual/react-is.development.js +4 -0
- package/lib/_virtual/react-is.production.min.js +4 -0
- package/lib/_virtual/utils.js +4 -0
- package/lib/fe-auto-complete/index.js +6 -0
- package/lib/fe-button/index.js +27 -0
- package/lib/fe-cascader/index.js +19 -0
- package/lib/fe-checkbox/index.js +6 -0
- package/lib/fe-checkbox-group/index.js +6 -0
- package/lib/fe-date-picker/index.js +19 -0
- package/lib/fe-description-render/index.js +43 -0
- package/lib/fe-descriptions/index.js +6 -0
- package/lib/fe-empty/index.js +6 -0
- package/lib/fe-error-block/index.js +6 -0
- package/lib/fe-form/fe-form/index.js +133 -0
- package/lib/fe-form/fe-form-auto-complete/index.js +57 -0
- package/lib/fe-form/fe-form-btn-group/index.js +29 -0
- package/lib/fe-form/fe-form-cascader/index.js +25 -0
- package/lib/fe-form/fe-form-checkbox-group/index.js +21 -0
- package/lib/fe-form/fe-form-date-picker/index.js +75 -0
- package/lib/fe-form/fe-form-date-range-picker/index.js +99 -0
- package/lib/fe-form/fe-form-input/index.js +53 -0
- package/lib/fe-form/fe-form-input-input/index.js +63 -0
- package/lib/fe-form/fe-form-input-number/index.js +43 -0
- package/lib/fe-form/fe-form-item/index.js +46 -0
- package/lib/fe-form/fe-form-label/index.js +20 -0
- package/lib/fe-form/fe-form-radio/index.js +21 -0
- package/lib/fe-form/fe-form-render/index.js +33 -0
- package/lib/fe-form/fe-form-rich-text/index.js +25 -0
- package/lib/fe-form/fe-form-select/index.js +93 -0
- package/lib/fe-form/fe-form-switch/index.js +21 -0
- package/lib/fe-form/fe-form-text/index.js +20 -0
- package/lib/fe-form/fe-form-text-area/index.js +24 -0
- package/lib/fe-form/fe-form-time-picker/index.js +21 -0
- package/lib/fe-form/fe-form-upload/index.js +63 -0
- package/lib/fe-form/utils/index.js +28 -0
- package/lib/fe-input/index.js +32 -0
- package/lib/fe-input-number/index.js +19 -0
- package/lib/fe-layouts/auth-layout/index.js +35 -17
- package/lib/fe-layouts/basics-layout/index.js +2 -2
- package/lib/fe-layouts/layout.js +34 -16
- package/lib/fe-link/index.js +23 -0
- package/lib/fe-map/index.js +263 -0
- package/lib/fe-modal/index.js +85 -0
- package/lib/fe-pagination/index.js +6 -0
- package/lib/fe-panel/fe-panel-toolbar.js +40 -0
- package/lib/fe-panel/index.js +49 -0
- package/lib/fe-panel/use-panel-context.js +9 -0
- package/lib/fe-permission/index.js +12 -0
- package/lib/fe-permission-provider/index.js +29 -0
- package/lib/fe-radio/index.js +11 -0
- package/lib/fe-radio-group/index.js +6 -0
- package/lib/fe-rich-text/index.js +293 -0
- package/lib/fe-select/index.js +24 -0
- package/lib/fe-switch/index.js +6 -0
- package/lib/fe-table/fe-edit-table/index.js +39 -0
- package/lib/fe-table/fe-edit-table-cell/index.js +63 -0
- package/lib/fe-table/fe-head-title/index.js +9 -0
- package/lib/fe-table/fe-normal-table/index.js +192 -0
- package/lib/fe-table/fe-sub-table/index.js +74 -0
- package/lib/fe-table/fe-table/index.js +7 -0
- package/lib/fe-table/fe-table-alert/index.js +42 -0
- package/lib/fe-table/fe-table-link/index.js +87 -0
- package/lib/fe-table/fe-table-render/index.js +56 -0
- package/lib/fe-table/fe-table-setting/index.js +165 -0
- package/lib/fe-table/fe-table-toolbar/index.js +63 -0
- package/lib/fe-table/fe-table-utils/index.js +157 -0
- package/lib/fe-table/type/table.d.js +4 -0
- package/lib/fe-table/use-edit-table/index.js +151 -0
- package/lib/fe-table/use-pagination/index.js +59 -0
- package/lib/fe-table/use-sub-table/index.js +23 -0
- package/lib/fe-table/use-table/index.js +177 -0
- package/lib/fe-table/use-table-columns/index.js +53 -0
- package/lib/fe-table/use-table-form-context/index.js +14 -0
- package/lib/fe-table/use-table-selection/index.js +53 -0
- package/lib/fe-text-area/index.js +21 -0
- package/lib/fe-time-picker/index.js +19 -0
- package/lib/fe-upload/index.js +182 -0
- package/lib/fe-upload/upload.constant.js +91 -0
- package/lib/fe-upload-atomic/index.js +6 -0
- package/lib/fe-upload-crop/index.js +207 -0
- package/lib/hooks/{use-auth.hook.js → use-auth.hook/index.js} +3 -3
- package/lib/hooks/use-form/index.js +38 -0
- package/lib/hooks/use-permission.hook/index.js +9 -0
- package/lib/index.css +7 -1
- package/lib/index.js +161 -42
- package/lib/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@18.3.1/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
- package/lib/node_modules/.pnpm/@dnd-kit_core@6.3.1_nnrd3gsncyragczmpvfhocinkq/node_modules/@dnd-kit/core/dist/core.esm.js +2344 -0
- package/lib/node_modules/.pnpm/@dnd-kit_modifiers@9.0.0_55ztycxty3xzw7t4rzpvix55vq/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
- package/lib/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_55ztycxty3xzw7t4rzpvix55vq/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +439 -0
- package/lib/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@18.3.1/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
- package/lib/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +54 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js +54 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js +52 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js +329 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +17 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js +7 -0
- package/lib/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +95 -0
- package/lib/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +78 -0
- package/lib/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +10 -0
- package/lib/node_modules/.pnpm/react-resizable@3.1.3_nnrd3gsncyragczmpvfhocinkq/node_modules/react-resizable/build/Resizable.js +233 -0
- package/lib/node_modules/.pnpm/react-resizable@3.1.3_nnrd3gsncyragczmpvfhocinkq/node_modules/react-resizable/build/ResizableBox.js +164 -0
- package/lib/node_modules/.pnpm/react-resizable@3.1.3_nnrd3gsncyragczmpvfhocinkq/node_modules/react-resizable/build/propTypes.js +113 -0
- package/lib/node_modules/.pnpm/react-resizable@3.1.3_nnrd3gsncyragczmpvfhocinkq/node_modules/react-resizable/build/utils.js +56 -0
- package/lib/node_modules/.pnpm/react-resizable@3.1.3_nnrd3gsncyragczmpvfhocinkq/node_modules/react-resizable/index.js +12 -0
- package/lib/store/modules/layout-config.store.js +83 -65
- package/lib/store/modules/theme.store.js +36 -18
- package/lib/types/fe-auto-complete/index.d.ts +2 -0
- package/lib/types/fe-button/index.d.ts +16 -0
- package/lib/types/fe-cascader/index.d.ts +7 -0
- package/lib/types/fe-checkbox/index.d.ts +6 -0
- package/lib/types/fe-checkbox-group/index.d.ts +7 -0
- package/lib/types/fe-date-picker/index.d.ts +3 -0
- package/lib/types/fe-description-render/index.d.ts +31 -0
- package/lib/types/fe-descriptions/index.d.ts +2 -0
- package/lib/types/fe-empty/index.d.ts +2 -0
- package/lib/types/fe-error-block/index.d.ts +6 -0
- package/lib/types/fe-form/fe-form/index.d.ts +356 -0
- package/lib/types/fe-form/fe-form-auto-complete/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-btn-group/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-cascader/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-checkbox-group/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-date-picker/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-date-range-picker/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-input/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-input-input/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-input-number/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-item/index.d.ts +70 -0
- package/lib/types/fe-form/fe-form-label/index.d.ts +45 -0
- package/lib/types/fe-form/fe-form-radio/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-render/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-rich-text/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-select/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-switch/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-text/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-text-area/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-time-picker/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-upload/index.d.ts +3 -0
- package/lib/types/fe-form/index.d.ts +26 -0
- package/lib/types/fe-form/utils/index.d.ts +24 -0
- package/lib/types/fe-input/index.d.ts +12 -0
- package/lib/types/fe-input-number/index.d.ts +2 -0
- package/lib/types/fe-layouts/context/global-context.d.ts +240 -238
- package/lib/types/fe-link/index.d.ts +6 -0
- package/lib/types/fe-map/index.d.ts +73 -0
- package/lib/types/fe-modal/index.d.ts +20 -0
- package/lib/types/fe-pagination/index.d.ts +2 -0
- package/lib/types/fe-panel/fe-panel-toolbar.d.ts +3 -0
- package/lib/types/fe-panel/index.d.ts +61 -0
- package/lib/types/fe-panel/panel-toolbar.d.ts +4 -0
- package/lib/types/fe-panel/use-panel-context.d.ts +6 -0
- package/lib/types/fe-permission/index.d.ts +10 -0
- package/lib/types/fe-permission-provider/index.d.ts +8 -0
- package/lib/types/fe-radio/index.d.ts +2 -0
- package/lib/types/fe-radio-group/index.d.ts +2 -0
- package/lib/types/fe-rich-text/index.d.ts +167 -0
- package/lib/types/fe-select/index.d.ts +8 -0
- package/lib/types/fe-switch/index.d.ts +2 -0
- package/lib/types/fe-table/fe-edit-table/index.d.ts +3 -0
- package/lib/types/fe-table/fe-edit-table-cell/index.d.ts +16 -0
- package/lib/types/fe-table/fe-head-title/index.d.ts +6 -0
- package/lib/types/fe-table/fe-normal-table/index.d.ts +3 -0
- package/lib/types/fe-table/fe-sub-table/index.d.ts +3 -0
- package/lib/types/fe-table/fe-table/index.d.ts +3 -0
- package/lib/types/fe-table/fe-table-alert/index.d.ts +13 -0
- package/lib/types/fe-table/fe-table-link/index.d.ts +12 -0
- package/lib/types/fe-table/fe-table-render/index.d.ts +13 -0
- package/lib/types/fe-table/fe-table-setting/index.d.ts +22 -0
- package/lib/types/fe-table/fe-table-toolbar/index.d.ts +18 -0
- package/lib/types/fe-table/fe-table-utils/index.d.ts +193 -0
- package/lib/types/fe-table/index.d.ts +6 -0
- package/lib/types/fe-table/type/table-context.d.ts +60 -0
- package/lib/types/fe-table/type/table.d.ts +797 -0
- package/lib/types/fe-table/use-edit-table/index.d.ts +6 -0
- package/lib/types/fe-table/use-pagination/index.d.ts +3 -0
- package/lib/types/fe-table/use-sub-table/index.d.ts +8 -0
- package/lib/types/fe-table/use-table/index.d.ts +3 -0
- package/lib/types/fe-table/use-table-columns/index.d.ts +47 -0
- package/lib/types/fe-table/use-table-form-context/index.d.ts +10 -0
- package/lib/types/fe-table/use-table-selection/index.d.ts +46 -0
- package/lib/types/fe-text-area/index.d.ts +4 -0
- package/lib/types/fe-time-picker/index.d.ts +3 -0
- package/lib/types/fe-upload/index.d.ts +85 -0
- package/lib/types/fe-upload/upload.constant.d.ts +39 -0
- package/lib/types/fe-upload-atomic/index.d.ts +2 -0
- package/lib/types/fe-upload-crop/index.d.ts +10 -0
- package/lib/types/hooks/index.d.ts +1 -0
- package/lib/types/hooks/use-descriptions/index.d.ts +3 -0
- package/lib/types/hooks/use-form/index.d.ts +16 -0
- package/lib/types/hooks/use-permission.hook/index.d.ts +10 -0
- package/lib/types/index.d.ts +32 -0
- package/lib/types/typings/index.d.ts +98 -59
- package/lib/types/typings/shims-axios.d.ts +38 -38
- package/package.json +79 -69
- /package/lib/hooks/{use-nprogress.hook.js → use-nprogress.hook/index.js} +0 -0
- /package/lib/types/hooks/{use-auth.hook.d.ts → use-auth.hook/index.d.ts} +0 -0
- /package/lib/types/hooks/{use-nprogress.hook.d.ts → use-nprogress.hook/index.d.ts} +0 -0
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import { create as
|
|
2
|
-
import { persist as
|
|
1
|
+
import { create as b } from "zustand";
|
|
2
|
+
import { persist as u, combine as d, createJSONStorage as g } from "zustand/middleware";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "@ant-design/icons";
|
|
5
5
|
import "./theme.store.js";
|
|
6
|
-
import { STORE_KEY as
|
|
6
|
+
import { STORE_KEY as C } from "../../config/constants.js";
|
|
7
7
|
import "react-router-dom";
|
|
8
8
|
import "react";
|
|
9
9
|
import "../../fe-layouts/context/context.js";
|
|
10
10
|
import "nprogress";
|
|
11
|
+
import "../../hooks/use-permission.hook/index.js";
|
|
12
|
+
import "antd";
|
|
13
|
+
import "@spacego/turbo-utils";
|
|
14
|
+
/* empty css */
|
|
15
|
+
import "lodash-es";
|
|
16
|
+
import "../../fe-form/fe-form-date-range-picker/index.js";
|
|
17
|
+
import "../../fe-rich-text/index.js";
|
|
18
|
+
import "../../fe-text-area/index.js";
|
|
19
|
+
/* empty css */
|
|
20
|
+
/* empty css */
|
|
21
|
+
/* empty css */
|
|
11
22
|
import "@spacego/zustand";
|
|
12
23
|
import "react-icons/fa6";
|
|
13
24
|
import "react-icons/io5";
|
|
@@ -15,10 +26,17 @@ import "react-icons/lu";
|
|
|
15
26
|
import "react-icons/md";
|
|
16
27
|
/* empty css */
|
|
17
28
|
import "../../fe-layouts/basics-layout/index.js";
|
|
18
|
-
|
|
19
|
-
import "@spacego/turbo-utils";
|
|
29
|
+
/* empty css */
|
|
20
30
|
/* empty css */
|
|
21
|
-
|
|
31
|
+
/* empty css */
|
|
32
|
+
import "react-draggable";
|
|
33
|
+
import "../../fe-panel/use-panel-context.js";
|
|
34
|
+
/* empty css */
|
|
35
|
+
import "../../_virtual/index.js";
|
|
36
|
+
import "../../fe-table/fe-edit-table-cell/index.js";
|
|
37
|
+
import "ahooks";
|
|
38
|
+
import "../../fe-table/fe-table-setting/index.js";
|
|
39
|
+
const c = () => ({
|
|
22
40
|
tabsAttribute: {
|
|
23
41
|
tabsList: [{
|
|
24
42
|
key: "Home",
|
|
@@ -35,24 +53,24 @@ const A = () => ({
|
|
|
35
53
|
timer: null
|
|
36
54
|
},
|
|
37
55
|
sidebarCollapsed: !1
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(i,
|
|
56
|
+
}), f = 0.1, rt = b(u(
|
|
57
|
+
d(
|
|
58
|
+
c(),
|
|
59
|
+
(i, e) => ({
|
|
42
60
|
SET_STATE: (t) => i(t),
|
|
43
61
|
/**
|
|
44
62
|
* 添加标签页
|
|
45
63
|
*/
|
|
46
64
|
ADD_TAB: (t) => {
|
|
47
|
-
const { tabsAttribute:
|
|
48
|
-
i(
|
|
65
|
+
const { tabsAttribute: r } = e(), { tabsList: a } = r, m = a.find((o) => o.key === t.key);
|
|
66
|
+
i(m ? {
|
|
49
67
|
tabsAttribute: {
|
|
50
|
-
...
|
|
68
|
+
...r,
|
|
51
69
|
tabsActiveKey: t.key
|
|
52
70
|
}
|
|
53
71
|
} : {
|
|
54
72
|
tabsAttribute: {
|
|
55
|
-
...
|
|
73
|
+
...r,
|
|
56
74
|
tabsList: [...a, t],
|
|
57
75
|
tabsActiveKey: t.key
|
|
58
76
|
}
|
|
@@ -62,23 +80,23 @@ const A = () => ({
|
|
|
62
80
|
* 移除标签页
|
|
63
81
|
*/
|
|
64
82
|
REMOVE_TAB: (t) => {
|
|
65
|
-
const { tabsAttribute:
|
|
66
|
-
let
|
|
67
|
-
return
|
|
83
|
+
const { tabsAttribute: r } = e(), { tabsList: a, tabsActiveKey: m } = r, o = a.filter((n) => n.key !== t);
|
|
84
|
+
let s = m;
|
|
85
|
+
return m === t && o.length > 0 ? s = o[o.length - 1].key : o.length === 0 && (s = ""), i({
|
|
68
86
|
tabsAttribute: {
|
|
69
87
|
tabsList: o,
|
|
70
|
-
tabsActiveKey:
|
|
88
|
+
tabsActiveKey: s
|
|
71
89
|
}
|
|
72
|
-
}), a.find((
|
|
90
|
+
}), a.find((n) => n.key === s) ?? {};
|
|
73
91
|
},
|
|
74
92
|
/**
|
|
75
93
|
* 设置当前激活的标签页
|
|
76
94
|
*/
|
|
77
95
|
SET_ACTIVE_TAB_KEY: (t) => {
|
|
78
|
-
const { tabsAttribute:
|
|
96
|
+
const { tabsAttribute: r } = e();
|
|
79
97
|
i({
|
|
80
98
|
tabsAttribute: {
|
|
81
|
-
...
|
|
99
|
+
...r,
|
|
82
100
|
tabsActiveKey: t
|
|
83
101
|
}
|
|
84
102
|
});
|
|
@@ -99,28 +117,28 @@ const A = () => ({
|
|
|
99
117
|
*/
|
|
100
118
|
SET_LOADING: (t) => {
|
|
101
119
|
if (t && t.showLoading === !1) return;
|
|
102
|
-
const { CLEAR_LOADING_TIMER:
|
|
103
|
-
i((
|
|
104
|
-
const { loadingConfig: o } =
|
|
105
|
-
show:
|
|
106
|
-
limit:
|
|
120
|
+
const { CLEAR_LOADING_TIMER: r, HIDE_LOADING: a } = e();
|
|
121
|
+
i((m) => {
|
|
122
|
+
const { loadingConfig: o } = m, s = o.show === !1, n = o.limit + 1, l = {
|
|
123
|
+
show: s ? !0 : o.show,
|
|
124
|
+
limit: n,
|
|
107
125
|
timer: o.timer
|
|
108
126
|
};
|
|
109
|
-
if (
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
const
|
|
113
|
-
|
|
127
|
+
if (n === 1) {
|
|
128
|
+
r();
|
|
129
|
+
const p = setTimeout(() => {
|
|
130
|
+
const A = e();
|
|
131
|
+
A.loadingConfig.limit === 1 && A.loadingConfig.show && a(t);
|
|
114
132
|
}, 20 * 1e3);
|
|
115
133
|
return {
|
|
116
134
|
loadingConfig: {
|
|
117
|
-
...
|
|
118
|
-
timer:
|
|
135
|
+
...l,
|
|
136
|
+
timer: p
|
|
119
137
|
}
|
|
120
138
|
};
|
|
121
139
|
} else
|
|
122
|
-
return
|
|
123
|
-
loadingConfig:
|
|
140
|
+
return r(), {
|
|
141
|
+
loadingConfig: l
|
|
124
142
|
};
|
|
125
143
|
});
|
|
126
144
|
},
|
|
@@ -129,37 +147,37 @@ const A = () => ({
|
|
|
129
147
|
*/
|
|
130
148
|
HIDE_LOADING: (t) => {
|
|
131
149
|
if (t && t.showLoading === !1) return;
|
|
132
|
-
const { CLEAR_LOADING_TIMER:
|
|
133
|
-
i((
|
|
134
|
-
const { loadingConfig: o } =
|
|
150
|
+
const { CLEAR_LOADING_TIMER: r, HIDE_LOADING: a } = e();
|
|
151
|
+
i((m) => {
|
|
152
|
+
const { loadingConfig: o } = m;
|
|
135
153
|
if (o.limit <= 0)
|
|
136
|
-
return
|
|
137
|
-
const
|
|
154
|
+
return m;
|
|
155
|
+
const s = o.limit - 1, n = {
|
|
138
156
|
...o,
|
|
139
|
-
limit:
|
|
157
|
+
limit: s
|
|
140
158
|
};
|
|
141
|
-
if (
|
|
142
|
-
return
|
|
159
|
+
if (s === 0)
|
|
160
|
+
return n.show = !1, r(), {
|
|
143
161
|
loadingConfig: {
|
|
144
|
-
...
|
|
162
|
+
...n,
|
|
145
163
|
timer: null
|
|
146
164
|
}
|
|
147
165
|
};
|
|
148
|
-
if (
|
|
149
|
-
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
|
|
166
|
+
if (s === 1) {
|
|
167
|
+
r();
|
|
168
|
+
const l = setTimeout(() => {
|
|
169
|
+
const p = e();
|
|
170
|
+
p.loadingConfig.limit === 1 && p.loadingConfig.show && a(t);
|
|
153
171
|
}, 20 * 1e3);
|
|
154
172
|
return {
|
|
155
173
|
loadingConfig: {
|
|
156
|
-
...
|
|
157
|
-
timer:
|
|
174
|
+
...n,
|
|
175
|
+
timer: l
|
|
158
176
|
}
|
|
159
177
|
};
|
|
160
178
|
}
|
|
161
179
|
return {
|
|
162
|
-
loadingConfig:
|
|
180
|
+
loadingConfig: n
|
|
163
181
|
};
|
|
164
182
|
});
|
|
165
183
|
},
|
|
@@ -167,7 +185,7 @@ const A = () => ({
|
|
|
167
185
|
* 清除loading定时器
|
|
168
186
|
*/
|
|
169
187
|
CLEAR_LOADING_TIMER() {
|
|
170
|
-
const { loadingConfig: t } =
|
|
188
|
+
const { loadingConfig: t } = e();
|
|
171
189
|
t.timer && (clearTimeout(t.timer), i({
|
|
172
190
|
loadingConfig: {
|
|
173
191
|
...t,
|
|
@@ -185,36 +203,36 @@ const A = () => ({
|
|
|
185
203
|
* 切换侧边栏折叠状态
|
|
186
204
|
*/
|
|
187
205
|
TOGGLE_SIDEBAR_COLLAPSED: () => {
|
|
188
|
-
const { sidebarCollapsed: t } =
|
|
206
|
+
const { sidebarCollapsed: t } = e();
|
|
189
207
|
i({ sidebarCollapsed: !t });
|
|
190
208
|
},
|
|
191
209
|
/**
|
|
192
210
|
* 重置
|
|
193
211
|
*/
|
|
194
212
|
RESET: () => {
|
|
195
|
-
const { sidebarCollapsed: t, ...
|
|
196
|
-
i(
|
|
213
|
+
const { sidebarCollapsed: t, ...r } = c();
|
|
214
|
+
i(r);
|
|
197
215
|
}
|
|
198
216
|
})
|
|
199
217
|
),
|
|
200
218
|
{
|
|
201
|
-
name:
|
|
219
|
+
name: C.LAYOUT_CONFIG,
|
|
202
220
|
// unique name
|
|
203
|
-
storage:
|
|
204
|
-
version:
|
|
221
|
+
storage: g(() => localStorage),
|
|
222
|
+
version: f,
|
|
205
223
|
// a migration will be triggered if the version in the storage mismatches this one
|
|
206
224
|
// 部分持久化
|
|
207
225
|
partialize: (i) => {
|
|
208
|
-
const { ...
|
|
209
|
-
return
|
|
226
|
+
const { ...e } = i;
|
|
227
|
+
return e;
|
|
210
228
|
},
|
|
211
229
|
// migration logic
|
|
212
|
-
migrate: (i,
|
|
213
|
-
const t =
|
|
214
|
-
return
|
|
230
|
+
migrate: (i, e) => {
|
|
231
|
+
const t = c();
|
|
232
|
+
return e !== f && Object.assign(t, i), t;
|
|
215
233
|
}
|
|
216
234
|
}
|
|
217
235
|
));
|
|
218
236
|
export {
|
|
219
|
-
|
|
237
|
+
rt as useLayoutConfigStore
|
|
220
238
|
};
|
|
@@ -2,13 +2,24 @@ import { create as E } from "zustand";
|
|
|
2
2
|
import { devtools as s, persist as T, combine as l, createJSONStorage as h } from "zustand/middleware";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "@ant-design/icons";
|
|
5
|
-
import { applyThemeColor as n, applyTheme as
|
|
5
|
+
import { applyThemeColor as n, applyTheme as i } from "../../utils/theme.js";
|
|
6
6
|
import "./layout-config.store.js";
|
|
7
|
-
import { STORE_KEY as
|
|
7
|
+
import { STORE_KEY as e } from "../../config/constants.js";
|
|
8
8
|
import "react-router-dom";
|
|
9
9
|
import "react";
|
|
10
10
|
import "../../fe-layouts/context/context.js";
|
|
11
11
|
import "nprogress";
|
|
12
|
+
import "../../hooks/use-permission.hook/index.js";
|
|
13
|
+
import "antd";
|
|
14
|
+
import "@spacego/turbo-utils";
|
|
15
|
+
/* empty css */
|
|
16
|
+
import "lodash-es";
|
|
17
|
+
import "../../fe-form/fe-form-date-range-picker/index.js";
|
|
18
|
+
import "../../fe-rich-text/index.js";
|
|
19
|
+
import "../../fe-text-area/index.js";
|
|
20
|
+
/* empty css */
|
|
21
|
+
/* empty css */
|
|
22
|
+
/* empty css */
|
|
12
23
|
import "@spacego/zustand";
|
|
13
24
|
import "react-icons/fa6";
|
|
14
25
|
import "react-icons/io5";
|
|
@@ -16,48 +27,55 @@ import "react-icons/lu";
|
|
|
16
27
|
import "react-icons/md";
|
|
17
28
|
/* empty css */
|
|
18
29
|
import "../../fe-layouts/basics-layout/index.js";
|
|
19
|
-
|
|
20
|
-
import "@spacego/turbo-utils";
|
|
30
|
+
/* empty css */
|
|
21
31
|
/* empty css */
|
|
32
|
+
/* empty css */
|
|
33
|
+
import "react-draggable";
|
|
34
|
+
import "../../fe-panel/use-panel-context.js";
|
|
35
|
+
/* empty css */
|
|
36
|
+
import "../../_virtual/index.js";
|
|
37
|
+
import "../../fe-table/fe-edit-table-cell/index.js";
|
|
38
|
+
import "ahooks";
|
|
39
|
+
import "../../fe-table/fe-table-setting/index.js";
|
|
22
40
|
const p = () => ({
|
|
23
41
|
theme: "light",
|
|
24
42
|
themeColor: "#006BE6",
|
|
25
43
|
// 默认主题色
|
|
26
44
|
isCustomThemeColor: !1
|
|
27
|
-
}), a = 0.1,
|
|
45
|
+
}), a = 0.1, tt = E(s(
|
|
28
46
|
T(
|
|
29
47
|
l(
|
|
30
48
|
p(),
|
|
31
|
-
(
|
|
32
|
-
SET_STATE: (t) =>
|
|
49
|
+
(o, m) => ({
|
|
50
|
+
SET_STATE: (t) => o(t),
|
|
33
51
|
SET_THEME: (t) => {
|
|
34
|
-
|
|
52
|
+
o({ theme: t }), i(t);
|
|
35
53
|
},
|
|
36
54
|
TOGGLE_THEME: () => {
|
|
37
|
-
const t =
|
|
38
|
-
let
|
|
39
|
-
t === "system" ?
|
|
55
|
+
const t = m().theme;
|
|
56
|
+
let r;
|
|
57
|
+
t === "system" ? r = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "dark" : r = t === "light" ? "dark" : "light", o({ theme: r }), i(r);
|
|
40
58
|
},
|
|
41
59
|
SET_THEME_COLOR: (t) => {
|
|
42
|
-
|
|
60
|
+
o({ themeColor: t }), n(t);
|
|
43
61
|
},
|
|
44
62
|
SET_IS_CUSTOM_THEME_COLOR: (t) => {
|
|
45
|
-
|
|
63
|
+
o({ isCustomThemeColor: t });
|
|
46
64
|
}
|
|
47
65
|
})
|
|
48
66
|
),
|
|
49
67
|
{
|
|
50
|
-
name:
|
|
68
|
+
name: e.THEME,
|
|
51
69
|
storage: h(() => localStorage),
|
|
52
70
|
version: a,
|
|
53
|
-
migrate: (
|
|
71
|
+
migrate: (o, m) => {
|
|
54
72
|
const t = p();
|
|
55
|
-
return
|
|
73
|
+
return m !== a && Object.assign(t, o), t;
|
|
56
74
|
}
|
|
57
75
|
}
|
|
58
76
|
),
|
|
59
|
-
{ name:
|
|
77
|
+
{ name: e.THEME, enabled: !0 }
|
|
60
78
|
));
|
|
61
79
|
export {
|
|
62
|
-
|
|
80
|
+
tt as useThemeStore
|
|
63
81
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ButtonProps } from 'antd';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { IBasicProps, IPermissionProps } from '../typings';
|
|
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
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IDescriptionsItem, TRenderType } from '../hooks/use-descriptions/index.d';
|
|
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
|
+
}
|