@faasjs/ant-design 0.0.3-beta.98 → 0.0.3-beta.99
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.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +31 -19
- package/dist/index.mjs +33 -20
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -440,7 +440,7 @@ declare namespace Form {
|
|
|
440
440
|
|
|
441
441
|
interface LinkProps {
|
|
442
442
|
href: string;
|
|
443
|
-
target?:
|
|
443
|
+
target?: '_blank';
|
|
444
444
|
text?: string | number;
|
|
445
445
|
children?: ReactNode;
|
|
446
446
|
style?: CSSProperties;
|
|
@@ -461,7 +461,6 @@ interface LinkProps {
|
|
|
461
461
|
* ```
|
|
462
462
|
*/
|
|
463
463
|
declare function Link(props: LinkProps): react_jsx_runtime.JSX.Element;
|
|
464
|
-
declare function LinkBody(props: LinkProps): string | number | true | Iterable<ReactNode> | react_jsx_runtime.JSX.Element;
|
|
465
464
|
|
|
466
465
|
declare function PageNotFound(): react_jsx_runtime.JSX.Element;
|
|
467
466
|
interface RoutesProps {
|
|
@@ -542,4 +541,4 @@ interface TitleProps {
|
|
|
542
541
|
*/
|
|
543
542
|
declare function Title(props: TitleProps): JSX.Element;
|
|
544
543
|
|
|
545
|
-
export { App, AppProps, BaseItemProps, BaseOption, Blank, BlankProps, ConfigContext, ConfigProvider, ConfigProviderProps, Description, DescriptionItemContentProps, DescriptionItemProps, DescriptionProps, DrawerProps, ErrorBoundary, ExtendDescriptionItemProps, ExtendDescriptionTypeProps, ExtendFormItemProps, ExtendFormTypeProps, ExtendTableItemProps, ExtendTableTypeProps, ExtendTypes, FaasDataInjection, FaasDataWrapper, FaasDataWrapperProps, FaasItemProps, FaasItemType, FaasItemTypeValue, Form, FormItem, FormItemProps, FormProps, FormSubmitProps, Link,
|
|
544
|
+
export { App, AppProps, BaseItemProps, BaseOption, Blank, BlankProps, ConfigContext, ConfigProvider, ConfigProviderProps, Description, DescriptionItemContentProps, DescriptionItemProps, DescriptionProps, DrawerProps, ErrorBoundary, ExtendDescriptionItemProps, ExtendDescriptionTypeProps, ExtendFormItemProps, ExtendFormTypeProps, ExtendTableItemProps, ExtendTableTypeProps, ExtendTypes, FaasDataInjection, FaasDataWrapper, FaasDataWrapperProps, FaasItemProps, FaasItemType, FaasItemTypeValue, Form, FormItem, FormItemProps, FormProps, FormSubmitProps, Link, LinkProps, Loading, LoadingProps, ModalProps, PageNotFound, Routes, RoutesProps, TabProps, Table, TableItemProps, TableProps, Tabs, TabsProps, Title, TitleProps, UnionFaasItemElement, UnionFaasItemInjection, UnionFaasItemProps, UnionFaasItemRender, UnionScene, setDrawerProps, setModalProps, transferOptions, transferValue, useApp, useAppProps, useConfigContext, useDrawer, useModal };
|
package/dist/index.d.ts
CHANGED
|
@@ -440,7 +440,7 @@ declare namespace Form {
|
|
|
440
440
|
|
|
441
441
|
interface LinkProps {
|
|
442
442
|
href: string;
|
|
443
|
-
target?:
|
|
443
|
+
target?: '_blank';
|
|
444
444
|
text?: string | number;
|
|
445
445
|
children?: ReactNode;
|
|
446
446
|
style?: CSSProperties;
|
|
@@ -461,7 +461,6 @@ interface LinkProps {
|
|
|
461
461
|
* ```
|
|
462
462
|
*/
|
|
463
463
|
declare function Link(props: LinkProps): react_jsx_runtime.JSX.Element;
|
|
464
|
-
declare function LinkBody(props: LinkProps): string | number | true | Iterable<ReactNode> | react_jsx_runtime.JSX.Element;
|
|
465
464
|
|
|
466
465
|
declare function PageNotFound(): react_jsx_runtime.JSX.Element;
|
|
467
466
|
interface RoutesProps {
|
|
@@ -542,4 +541,4 @@ interface TitleProps {
|
|
|
542
541
|
*/
|
|
543
542
|
declare function Title(props: TitleProps): JSX.Element;
|
|
544
543
|
|
|
545
|
-
export { App, AppProps, BaseItemProps, BaseOption, Blank, BlankProps, ConfigContext, ConfigProvider, ConfigProviderProps, Description, DescriptionItemContentProps, DescriptionItemProps, DescriptionProps, DrawerProps, ErrorBoundary, ExtendDescriptionItemProps, ExtendDescriptionTypeProps, ExtendFormItemProps, ExtendFormTypeProps, ExtendTableItemProps, ExtendTableTypeProps, ExtendTypes, FaasDataInjection, FaasDataWrapper, FaasDataWrapperProps, FaasItemProps, FaasItemType, FaasItemTypeValue, Form, FormItem, FormItemProps, FormProps, FormSubmitProps, Link,
|
|
544
|
+
export { App, AppProps, BaseItemProps, BaseOption, Blank, BlankProps, ConfigContext, ConfigProvider, ConfigProviderProps, Description, DescriptionItemContentProps, DescriptionItemProps, DescriptionProps, DrawerProps, ErrorBoundary, ExtendDescriptionItemProps, ExtendDescriptionTypeProps, ExtendFormItemProps, ExtendFormTypeProps, ExtendTableItemProps, ExtendTableTypeProps, ExtendTypes, FaasDataInjection, FaasDataWrapper, FaasDataWrapperProps, FaasItemProps, FaasItemType, FaasItemTypeValue, Form, FormItem, FormItemProps, FormProps, FormSubmitProps, Link, LinkProps, Loading, LoadingProps, ModalProps, PageNotFound, Routes, RoutesProps, TabProps, Table, TableItemProps, TableProps, Tabs, TabsProps, Title, TitleProps, UnionFaasItemElement, UnionFaasItemInjection, UnionFaasItemProps, UnionFaasItemRender, UnionScene, setDrawerProps, setModalProps, transferOptions, transferValue, useApp, useAppProps, useConfigContext, useDrawer, useModal };
|
package/dist/index.js
CHANGED
|
@@ -864,6 +864,7 @@ Form.Provider = antd.Form.Provider;
|
|
|
864
864
|
function Link(props) {
|
|
865
865
|
var _a, _b;
|
|
866
866
|
const { Link: Config } = useConfigContext();
|
|
867
|
+
const navigate = reactRouterDom.useNavigate();
|
|
867
868
|
let style = {
|
|
868
869
|
...Config.style || {},
|
|
869
870
|
cursor: "pointer",
|
|
@@ -886,47 +887,59 @@ function Link(props) {
|
|
|
886
887
|
children: (_a = props.text) != null ? _a : props.children
|
|
887
888
|
}
|
|
888
889
|
);
|
|
890
|
+
if (props.children)
|
|
891
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
892
|
+
"a",
|
|
893
|
+
{
|
|
894
|
+
href: props.href,
|
|
895
|
+
target: props.target || (Config == null ? void 0 : Config.target),
|
|
896
|
+
style,
|
|
897
|
+
children: props.children
|
|
898
|
+
}
|
|
899
|
+
);
|
|
889
900
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
890
|
-
|
|
901
|
+
antd.Typography.Link,
|
|
891
902
|
{
|
|
892
903
|
href: props.href,
|
|
893
904
|
target: props.target || (Config == null ? void 0 : Config.target) || "_blank",
|
|
894
905
|
style,
|
|
895
|
-
|
|
906
|
+
copyable: props.copyable,
|
|
907
|
+
children: props.text
|
|
896
908
|
}
|
|
897
909
|
);
|
|
898
910
|
}
|
|
899
911
|
if (props.button)
|
|
912
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
913
|
+
antd.Button,
|
|
914
|
+
{
|
|
915
|
+
...props.button,
|
|
916
|
+
style,
|
|
917
|
+
onClick: () => (props.target || (Config == null ? void 0 : Config.target)) === "_blank" ? window.open(props.href) : navigate(props.href),
|
|
918
|
+
children: (_b = props.text) != null ? _b : props.children
|
|
919
|
+
}
|
|
920
|
+
);
|
|
921
|
+
if (props.children)
|
|
900
922
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
901
923
|
reactRouterDom.Link,
|
|
902
924
|
{
|
|
903
925
|
to: props.href,
|
|
904
926
|
target: props.target || (Config == null ? void 0 : Config.target),
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
{
|
|
908
|
-
...props.button,
|
|
909
|
-
style,
|
|
910
|
-
children: (_b = props.text) != null ? _b : props.children
|
|
911
|
-
}
|
|
912
|
-
)
|
|
927
|
+
style,
|
|
928
|
+
children: props.children
|
|
913
929
|
}
|
|
914
930
|
);
|
|
915
931
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
916
|
-
|
|
932
|
+
antd.Typography.Link,
|
|
917
933
|
{
|
|
918
|
-
|
|
934
|
+
href: props.href,
|
|
919
935
|
target: props.target || (Config == null ? void 0 : Config.target),
|
|
920
936
|
style,
|
|
921
|
-
|
|
937
|
+
copyable: props.copyable,
|
|
938
|
+
onClick: () => (props.target || (Config == null ? void 0 : Config.target)) === "_blank" ? window.open(props.href) : navigate(props.href),
|
|
939
|
+
children: props.text
|
|
922
940
|
}
|
|
923
941
|
);
|
|
924
942
|
}
|
|
925
|
-
function LinkBody(props) {
|
|
926
|
-
if (props.children)
|
|
927
|
-
return props.children;
|
|
928
|
-
return /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { copyable: props.copyable, children: props.text });
|
|
929
|
-
}
|
|
930
943
|
function PageNotFound() {
|
|
931
944
|
const config = useConfigContext();
|
|
932
945
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1607,7 +1620,6 @@ exports.FaasDataWrapper = FaasDataWrapper;
|
|
|
1607
1620
|
exports.Form = Form;
|
|
1608
1621
|
exports.FormItem = FormItem;
|
|
1609
1622
|
exports.Link = Link;
|
|
1610
|
-
exports.LinkBody = LinkBody;
|
|
1611
1623
|
exports.Loading = Loading;
|
|
1612
1624
|
exports.PageNotFound = PageNotFound;
|
|
1613
1625
|
exports.Routes = Routes;
|
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { StyleProvider, legacyLogicalPropertiesTransformer } from '@ant-design/c
|
|
|
6
6
|
import { createContext, useState, useMemo, useContext, useEffect, cloneElement, useCallback, isValidElement, Suspense } from 'react';
|
|
7
7
|
export { lazy } from 'react';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
|
-
import { BrowserRouter, Link as Link$1, Routes as Routes$1, Route, useLocation } from 'react-router-dom';
|
|
9
|
+
import { BrowserRouter, useNavigate, Link as Link$1, Routes as Routes$1, Route, useLocation } from 'react-router-dom';
|
|
10
10
|
import { defaultsDeep, isNil, upperFirst, isFunction, uniqBy } from 'lodash-es';
|
|
11
11
|
import dayjs2 from 'dayjs';
|
|
12
12
|
import { PlusOutlined, MinusCircleOutlined, CheckOutlined, CloseOutlined } from '@ant-design/icons';
|
|
@@ -861,6 +861,7 @@ Form.Provider = Form$1.Provider;
|
|
|
861
861
|
function Link(props) {
|
|
862
862
|
var _a, _b;
|
|
863
863
|
const { Link: Config } = useConfigContext();
|
|
864
|
+
const navigate = useNavigate();
|
|
864
865
|
let style = {
|
|
865
866
|
...Config.style || {},
|
|
866
867
|
cursor: "pointer",
|
|
@@ -883,47 +884,59 @@ function Link(props) {
|
|
|
883
884
|
children: (_a = props.text) != null ? _a : props.children
|
|
884
885
|
}
|
|
885
886
|
);
|
|
887
|
+
if (props.children)
|
|
888
|
+
return /* @__PURE__ */ jsx(
|
|
889
|
+
"a",
|
|
890
|
+
{
|
|
891
|
+
href: props.href,
|
|
892
|
+
target: props.target || (Config == null ? void 0 : Config.target),
|
|
893
|
+
style,
|
|
894
|
+
children: props.children
|
|
895
|
+
}
|
|
896
|
+
);
|
|
886
897
|
return /* @__PURE__ */ jsx(
|
|
887
|
-
|
|
898
|
+
Typography.Link,
|
|
888
899
|
{
|
|
889
900
|
href: props.href,
|
|
890
901
|
target: props.target || (Config == null ? void 0 : Config.target) || "_blank",
|
|
891
902
|
style,
|
|
892
|
-
|
|
903
|
+
copyable: props.copyable,
|
|
904
|
+
children: props.text
|
|
893
905
|
}
|
|
894
906
|
);
|
|
895
907
|
}
|
|
896
908
|
if (props.button)
|
|
909
|
+
return /* @__PURE__ */ jsx(
|
|
910
|
+
Button,
|
|
911
|
+
{
|
|
912
|
+
...props.button,
|
|
913
|
+
style,
|
|
914
|
+
onClick: () => (props.target || (Config == null ? void 0 : Config.target)) === "_blank" ? window.open(props.href) : navigate(props.href),
|
|
915
|
+
children: (_b = props.text) != null ? _b : props.children
|
|
916
|
+
}
|
|
917
|
+
);
|
|
918
|
+
if (props.children)
|
|
897
919
|
return /* @__PURE__ */ jsx(
|
|
898
920
|
Link$1,
|
|
899
921
|
{
|
|
900
922
|
to: props.href,
|
|
901
923
|
target: props.target || (Config == null ? void 0 : Config.target),
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
{
|
|
905
|
-
...props.button,
|
|
906
|
-
style,
|
|
907
|
-
children: (_b = props.text) != null ? _b : props.children
|
|
908
|
-
}
|
|
909
|
-
)
|
|
924
|
+
style,
|
|
925
|
+
children: props.children
|
|
910
926
|
}
|
|
911
927
|
);
|
|
912
928
|
return /* @__PURE__ */ jsx(
|
|
913
|
-
Link
|
|
929
|
+
Typography.Link,
|
|
914
930
|
{
|
|
915
|
-
|
|
931
|
+
href: props.href,
|
|
916
932
|
target: props.target || (Config == null ? void 0 : Config.target),
|
|
917
933
|
style,
|
|
918
|
-
|
|
934
|
+
copyable: props.copyable,
|
|
935
|
+
onClick: () => (props.target || (Config == null ? void 0 : Config.target)) === "_blank" ? window.open(props.href) : navigate(props.href),
|
|
936
|
+
children: props.text
|
|
919
937
|
}
|
|
920
938
|
);
|
|
921
939
|
}
|
|
922
|
-
function LinkBody(props) {
|
|
923
|
-
if (props.children)
|
|
924
|
-
return props.children;
|
|
925
|
-
return /* @__PURE__ */ jsx(Typography.Text, { copyable: props.copyable, children: props.text });
|
|
926
|
-
}
|
|
927
940
|
function PageNotFound() {
|
|
928
941
|
const config = useConfigContext();
|
|
929
942
|
return /* @__PURE__ */ jsx(
|
|
@@ -1574,4 +1587,4 @@ function Title(props) {
|
|
|
1574
1587
|
return null;
|
|
1575
1588
|
}
|
|
1576
1589
|
|
|
1577
|
-
export { App, Blank, ConfigContext, ConfigProvider2 as ConfigProvider, Description, ErrorBoundary, FaasDataWrapper, Form, FormItem, Link,
|
|
1590
|
+
export { App, Blank, ConfigContext, ConfigProvider2 as ConfigProvider, Description, ErrorBoundary, FaasDataWrapper, Form, FormItem, Link, Loading, PageNotFound, Routes, Table, Tabs, Title, transferOptions, transferValue, useApp, useConfigContext, useDrawer, useModal };
|
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.99",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@faasjs/react": "0.0.3-beta.
|
|
25
|
+
"@faasjs/react": "0.0.3-beta.99",
|
|
26
26
|
"@ant-design/icons": "*",
|
|
27
27
|
"lodash-es": "*",
|
|
28
28
|
"dayjs": "*"
|