@faasjs/ant-design 0.0.3-beta.97 → 0.0.3-beta.98

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 CHANGED
@@ -446,6 +446,8 @@ interface LinkProps {
446
446
  style?: CSSProperties;
447
447
  button?: ButtonProps;
448
448
  block?: boolean;
449
+ /** only use for text without button */
450
+ copyable?: boolean;
449
451
  }
450
452
  /**
451
453
  * Link component with button.
@@ -459,6 +461,7 @@ interface LinkProps {
459
461
  * ```
460
462
  */
461
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;
462
465
 
463
466
  declare function PageNotFound(): react_jsx_runtime.JSX.Element;
464
467
  interface RoutesProps {
@@ -539,4 +542,4 @@ interface TitleProps {
539
542
  */
540
543
  declare function Title(props: TitleProps): JSX.Element;
541
544
 
542
- 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 };
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, LinkBody, 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
@@ -446,6 +446,8 @@ interface LinkProps {
446
446
  style?: CSSProperties;
447
447
  button?: ButtonProps;
448
448
  block?: boolean;
449
+ /** only use for text without button */
450
+ copyable?: boolean;
449
451
  }
450
452
  /**
451
453
  * Link component with button.
@@ -459,6 +461,7 @@ interface LinkProps {
459
461
  * ```
460
462
  */
461
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;
462
465
 
463
466
  declare function PageNotFound(): react_jsx_runtime.JSX.Element;
464
467
  interface RoutesProps {
@@ -539,4 +542,4 @@ interface TitleProps {
539
542
  */
540
543
  declare function Title(props: TitleProps): JSX.Element;
541
544
 
542
- 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 };
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, LinkBody, 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
@@ -862,10 +862,10 @@ Form.List = antd.Form.List;
862
862
  Form.ErrorList = antd.Form.ErrorList;
863
863
  Form.Provider = antd.Form.Provider;
864
864
  function Link(props) {
865
- var _a, _b, _c, _d;
866
- const { Link: Link2 } = useConfigContext();
865
+ var _a, _b;
866
+ const { Link: Config } = useConfigContext();
867
867
  let style = {
868
- ...Link2.style || {},
868
+ ...Config.style || {},
869
869
  cursor: "pointer",
870
870
  ...props.style
871
871
  };
@@ -880,7 +880,7 @@ function Link(props) {
880
880
  antd.Button,
881
881
  {
882
882
  ...props.button,
883
- target: props.target || (Link2 == null ? void 0 : Link2.target) || "_blank",
883
+ target: props.target || (Config == null ? void 0 : Config.target) || "_blank",
884
884
  style,
885
885
  href: props.href,
886
886
  children: (_a = props.text) != null ? _a : props.children
@@ -890,9 +890,9 @@ function Link(props) {
890
890
  "a",
891
891
  {
892
892
  href: props.href,
893
- target: props.target || (Link2 == null ? void 0 : Link2.target) || "_blank",
893
+ target: props.target || (Config == null ? void 0 : Config.target) || "_blank",
894
894
  style,
895
- children: (_b = props.text) != null ? _b : props.children
895
+ children: /* @__PURE__ */ jsxRuntime.jsx(LinkBody, { ...props })
896
896
  }
897
897
  );
898
898
  }
@@ -901,13 +901,13 @@ function Link(props) {
901
901
  reactRouterDom.Link,
902
902
  {
903
903
  to: props.href,
904
- target: props.target || (Link2 == null ? void 0 : Link2.target),
904
+ target: props.target || (Config == null ? void 0 : Config.target),
905
905
  children: /* @__PURE__ */ jsxRuntime.jsx(
906
906
  antd.Button,
907
907
  {
908
908
  ...props.button,
909
909
  style,
910
- children: (_c = props.text) != null ? _c : props.children
910
+ children: (_b = props.text) != null ? _b : props.children
911
911
  }
912
912
  )
913
913
  }
@@ -916,12 +916,17 @@ function Link(props) {
916
916
  reactRouterDom.Link,
917
917
  {
918
918
  to: props.href,
919
- target: props.target || (Link2 == null ? void 0 : Link2.target),
919
+ target: props.target || (Config == null ? void 0 : Config.target),
920
920
  style,
921
- children: (_d = props.text) != null ? _d : props.children
921
+ children: /* @__PURE__ */ jsxRuntime.jsx(LinkBody, { ...props })
922
922
  }
923
923
  );
924
924
  }
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
+ }
925
930
  function PageNotFound() {
926
931
  const config = useConfigContext();
927
932
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -1602,6 +1607,7 @@ exports.FaasDataWrapper = FaasDataWrapper;
1602
1607
  exports.Form = Form;
1603
1608
  exports.FormItem = FormItem;
1604
1609
  exports.Link = Link;
1610
+ exports.LinkBody = LinkBody;
1605
1611
  exports.Loading = Loading;
1606
1612
  exports.PageNotFound = PageNotFound;
1607
1613
  exports.Routes = Routes;
package/dist/index.mjs CHANGED
@@ -859,10 +859,10 @@ Form.List = Form$1.List;
859
859
  Form.ErrorList = Form$1.ErrorList;
860
860
  Form.Provider = Form$1.Provider;
861
861
  function Link(props) {
862
- var _a, _b, _c, _d;
863
- const { Link: Link2 } = useConfigContext();
862
+ var _a, _b;
863
+ const { Link: Config } = useConfigContext();
864
864
  let style = {
865
- ...Link2.style || {},
865
+ ...Config.style || {},
866
866
  cursor: "pointer",
867
867
  ...props.style
868
868
  };
@@ -877,7 +877,7 @@ function Link(props) {
877
877
  Button,
878
878
  {
879
879
  ...props.button,
880
- target: props.target || (Link2 == null ? void 0 : Link2.target) || "_blank",
880
+ target: props.target || (Config == null ? void 0 : Config.target) || "_blank",
881
881
  style,
882
882
  href: props.href,
883
883
  children: (_a = props.text) != null ? _a : props.children
@@ -887,9 +887,9 @@ function Link(props) {
887
887
  "a",
888
888
  {
889
889
  href: props.href,
890
- target: props.target || (Link2 == null ? void 0 : Link2.target) || "_blank",
890
+ target: props.target || (Config == null ? void 0 : Config.target) || "_blank",
891
891
  style,
892
- children: (_b = props.text) != null ? _b : props.children
892
+ children: /* @__PURE__ */ jsx(LinkBody, { ...props })
893
893
  }
894
894
  );
895
895
  }
@@ -898,13 +898,13 @@ function Link(props) {
898
898
  Link$1,
899
899
  {
900
900
  to: props.href,
901
- target: props.target || (Link2 == null ? void 0 : Link2.target),
901
+ target: props.target || (Config == null ? void 0 : Config.target),
902
902
  children: /* @__PURE__ */ jsx(
903
903
  Button,
904
904
  {
905
905
  ...props.button,
906
906
  style,
907
- children: (_c = props.text) != null ? _c : props.children
907
+ children: (_b = props.text) != null ? _b : props.children
908
908
  }
909
909
  )
910
910
  }
@@ -913,12 +913,17 @@ function Link(props) {
913
913
  Link$1,
914
914
  {
915
915
  to: props.href,
916
- target: props.target || (Link2 == null ? void 0 : Link2.target),
916
+ target: props.target || (Config == null ? void 0 : Config.target),
917
917
  style,
918
- children: (_d = props.text) != null ? _d : props.children
918
+ children: /* @__PURE__ */ jsx(LinkBody, { ...props })
919
919
  }
920
920
  );
921
921
  }
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
+ }
922
927
  function PageNotFound() {
923
928
  const config = useConfigContext();
924
929
  return /* @__PURE__ */ jsx(
@@ -1569,4 +1574,4 @@ function Title(props) {
1569
1574
  return null;
1570
1575
  }
1571
1576
 
1572
- 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 };
1577
+ export { App, Blank, ConfigContext, ConfigProvider2 as ConfigProvider, Description, ErrorBoundary, FaasDataWrapper, Form, FormItem, Link, LinkBody, 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.97",
3
+ "version": "0.0.3-beta.98",
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.97",
25
+ "@faasjs/react": "0.0.3-beta.98",
26
26
  "@ant-design/icons": "*",
27
27
  "lodash-es": "*",
28
28
  "dayjs": "*"