@faasjs/ant-design 0.0.3-beta.34 → 0.0.3-beta.36
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/dist/index.d.ts +1 -1
- package/dist/index.js +25 -23
- package/dist/index.mjs +26 -28
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -157,7 +157,7 @@ interface FaasDataWrapperProps<T = any> extends FaasDataWrapperProps$1<T> {
|
|
|
157
157
|
loading?: JSX.Element;
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
160
|
-
* FaasDataWrapper component with Loading
|
|
160
|
+
* FaasDataWrapper component with Loading
|
|
161
161
|
*/
|
|
162
162
|
declare function FaasDataWrapper<T = any>(props: FaasDataWrapperProps<T>): JSX.Element;
|
|
163
163
|
|
package/dist/index.js
CHANGED
|
@@ -114,7 +114,7 @@ function ConfigProvider({
|
|
|
114
114
|
Form: { submit: { text: zh.submit } }
|
|
115
115
|
}, baseConfig));
|
|
116
116
|
} else
|
|
117
|
-
setValues(values);
|
|
117
|
+
setValues((0, import_lodash_es.defaultsDeep)(config, values));
|
|
118
118
|
}, []);
|
|
119
119
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConfigContext.Provider, {
|
|
120
120
|
value: values,
|
|
@@ -963,7 +963,11 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
963
963
|
function Link(props) {
|
|
964
964
|
var _a, _b, _c, _d;
|
|
965
965
|
const { Link: Link2 } = useConfigContext();
|
|
966
|
-
let style =
|
|
966
|
+
let style = {
|
|
967
|
+
...Link2.style || {},
|
|
968
|
+
cursor: "pointer",
|
|
969
|
+
...props.style
|
|
970
|
+
};
|
|
967
971
|
if (props.block)
|
|
968
972
|
style = Object.assign({
|
|
969
973
|
display: "block",
|
|
@@ -1043,27 +1047,25 @@ function PageNotFound() {
|
|
|
1043
1047
|
});
|
|
1044
1048
|
}
|
|
1045
1049
|
function Routes(props) {
|
|
1046
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
1047
|
-
children:
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
]
|
|
1066
|
-
})
|
|
1050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_router_dom2.Routes, {
|
|
1051
|
+
children: [
|
|
1052
|
+
props.routes.map((r) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom2.Route, {
|
|
1053
|
+
...r,
|
|
1054
|
+
element: r.element || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react11.Suspense, {
|
|
1055
|
+
fallback: props.fallback || /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
1056
|
+
style: { padding: "24px" },
|
|
1057
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd10.Skeleton, {
|
|
1058
|
+
active: true
|
|
1059
|
+
})
|
|
1060
|
+
}),
|
|
1061
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(r.page, {})
|
|
1062
|
+
})
|
|
1063
|
+
}, r.path)),
|
|
1064
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom2.Route, {
|
|
1065
|
+
path: "*",
|
|
1066
|
+
element: props.notFound || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageNotFound, {})
|
|
1067
|
+
}, "*")
|
|
1068
|
+
]
|
|
1067
1069
|
});
|
|
1068
1070
|
}
|
|
1069
1071
|
|
package/dist/index.mjs
CHANGED
|
@@ -67,7 +67,7 @@ function ConfigProvider({
|
|
|
67
67
|
Form: { submit: { text: zh.submit } }
|
|
68
68
|
}, baseConfig));
|
|
69
69
|
} else
|
|
70
|
-
setValues(values);
|
|
70
|
+
setValues(defaultsDeep(config, values));
|
|
71
71
|
}, []);
|
|
72
72
|
return /* @__PURE__ */ jsx(ConfigContext.Provider, {
|
|
73
73
|
value: values,
|
|
@@ -946,7 +946,11 @@ import { jsx as jsx10 } from "react/jsx-runtime";
|
|
|
946
946
|
function Link(props) {
|
|
947
947
|
var _a, _b, _c, _d;
|
|
948
948
|
const { Link: Link2 } = useConfigContext();
|
|
949
|
-
let style =
|
|
949
|
+
let style = {
|
|
950
|
+
...Link2.style || {},
|
|
951
|
+
cursor: "pointer",
|
|
952
|
+
...props.style
|
|
953
|
+
};
|
|
950
954
|
if (props.block)
|
|
951
955
|
style = Object.assign({
|
|
952
956
|
display: "block",
|
|
@@ -1014,11 +1018,7 @@ function useModal(init) {
|
|
|
1014
1018
|
}
|
|
1015
1019
|
|
|
1016
1020
|
// src/Routers.tsx
|
|
1017
|
-
import {
|
|
1018
|
-
Result,
|
|
1019
|
-
Skeleton,
|
|
1020
|
-
Alert as Alert2
|
|
1021
|
-
} from "antd";
|
|
1021
|
+
import { Result, Skeleton } from "antd";
|
|
1022
1022
|
import {
|
|
1023
1023
|
Suspense
|
|
1024
1024
|
} from "react";
|
|
@@ -1035,27 +1035,25 @@ function PageNotFound() {
|
|
|
1035
1035
|
});
|
|
1036
1036
|
}
|
|
1037
1037
|
function Routes(props) {
|
|
1038
|
-
return /* @__PURE__ */
|
|
1039
|
-
children:
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
]
|
|
1058
|
-
})
|
|
1038
|
+
return /* @__PURE__ */ jsxs3(OriginRoutes, {
|
|
1039
|
+
children: [
|
|
1040
|
+
props.routes.map((r) => /* @__PURE__ */ jsx12(Route, {
|
|
1041
|
+
...r,
|
|
1042
|
+
element: r.element || /* @__PURE__ */ jsx12(Suspense, {
|
|
1043
|
+
fallback: props.fallback || /* @__PURE__ */ jsx12("div", {
|
|
1044
|
+
style: { padding: "24px" },
|
|
1045
|
+
children: /* @__PURE__ */ jsx12(Skeleton, {
|
|
1046
|
+
active: true
|
|
1047
|
+
})
|
|
1048
|
+
}),
|
|
1049
|
+
children: /* @__PURE__ */ jsx12(r.page, {})
|
|
1050
|
+
})
|
|
1051
|
+
}, r.path)),
|
|
1052
|
+
/* @__PURE__ */ jsx12(Route, {
|
|
1053
|
+
path: "*",
|
|
1054
|
+
element: props.notFound || /* @__PURE__ */ jsx12(PageNotFound, {})
|
|
1055
|
+
}, "*")
|
|
1056
|
+
]
|
|
1059
1057
|
});
|
|
1060
1058
|
}
|
|
1061
1059
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "0.0.3-beta.
|
|
3
|
+
"version": "0.0.3-beta.36",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lodash-es": "*",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-dom": "*",
|
|
31
|
-
"@faasjs/react": "^0.0.3-beta.
|
|
31
|
+
"@faasjs/react": "^0.0.3-beta.36",
|
|
32
32
|
"react-router-dom": "*",
|
|
33
33
|
"dayjs": "*"
|
|
34
34
|
},
|