@faasjs/ant-design 0.0.3-beta.100 → 0.0.3-beta.102
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 +30 -20
- package/dist/index.js +23 -14
- package/dist/index.mjs +23 -14
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -45,10 +45,6 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
|
|
|
45
45
|
- [Form](modules/Form.md)
|
|
46
46
|
- [FormItem](modules/FormItem.md)
|
|
47
47
|
|
|
48
|
-
### Classes
|
|
49
|
-
|
|
50
|
-
- [ErrorBoundary](classes/ErrorBoundary.md)
|
|
51
|
-
|
|
52
48
|
### Interfaces
|
|
53
49
|
|
|
54
50
|
- [AppProps](interfaces/AppProps.md)
|
|
@@ -107,6 +103,7 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
|
|
|
107
103
|
- [Blank](#blank)
|
|
108
104
|
- [ConfigProvider](#configprovider)
|
|
109
105
|
- [Description](#description)
|
|
106
|
+
- [ErrorBoundary](#errorboundary)
|
|
110
107
|
- [FaasDataWrapper](#faasdatawrapper)
|
|
111
108
|
- [Form](#form)
|
|
112
109
|
- [FormItem](#formitem)
|
|
@@ -502,6 +499,22 @@ Description component.
|
|
|
502
499
|
|
|
503
500
|
___
|
|
504
501
|
|
|
502
|
+
### ErrorBoundary
|
|
503
|
+
|
|
504
|
+
▸ **ErrorBoundary**(`props`): `Element`
|
|
505
|
+
|
|
506
|
+
#### Parameters
|
|
507
|
+
|
|
508
|
+
| Name | Type |
|
|
509
|
+
| :------ | :------ |
|
|
510
|
+
| `props` | [`ErrorBoundaryProps`](interfaces/ErrorBoundaryProps.md) |
|
|
511
|
+
|
|
512
|
+
#### Returns
|
|
513
|
+
|
|
514
|
+
`Element`
|
|
515
|
+
|
|
516
|
+
___
|
|
517
|
+
|
|
505
518
|
### FaasDataWrapper
|
|
506
519
|
|
|
507
520
|
▸ **FaasDataWrapper**<`T`\>(`props`): `JSX.Element`
|
|
@@ -544,10 +557,6 @@ ___
|
|
|
544
557
|
|
|
545
558
|
Form component with Ant Design & FaasJS
|
|
546
559
|
|
|
547
|
-
**`Ref`**
|
|
548
|
-
|
|
549
|
-
https://ant.design/components/form/
|
|
550
|
-
|
|
551
560
|
#### Type parameters
|
|
552
561
|
|
|
553
562
|
| Name | Type |
|
|
@@ -564,6 +573,10 @@ https://ant.design/components/form/
|
|
|
564
573
|
|
|
565
574
|
`Element`
|
|
566
575
|
|
|
576
|
+
**`Ref`**
|
|
577
|
+
|
|
578
|
+
https://ant.design/components/form/
|
|
579
|
+
|
|
567
580
|
___
|
|
568
581
|
|
|
569
582
|
### FormItem
|
|
@@ -702,10 +715,6 @@ ___
|
|
|
702
715
|
|
|
703
716
|
Table component with Ant Design & FaasJS
|
|
704
717
|
|
|
705
|
-
**`Ref`**
|
|
706
|
-
|
|
707
|
-
https://ant.design/components/table/
|
|
708
|
-
|
|
709
718
|
#### Type parameters
|
|
710
719
|
|
|
711
720
|
| Name | Type |
|
|
@@ -723,6 +732,10 @@ https://ant.design/components/table/
|
|
|
723
732
|
|
|
724
733
|
`Element`
|
|
725
734
|
|
|
735
|
+
**`Ref`**
|
|
736
|
+
|
|
737
|
+
https://ant.design/components/table/
|
|
738
|
+
|
|
726
739
|
___
|
|
727
740
|
|
|
728
741
|
### Tabs
|
|
@@ -731,10 +744,6 @@ ___
|
|
|
731
744
|
|
|
732
745
|
Tabs component with Ant Design & FaasJS
|
|
733
746
|
|
|
734
|
-
**`Ref`**
|
|
735
|
-
|
|
736
|
-
https://ant.design/components/tabs/
|
|
737
|
-
|
|
738
747
|
#### Parameters
|
|
739
748
|
|
|
740
749
|
| Name | Type |
|
|
@@ -745,6 +754,10 @@ https://ant.design/components/tabs/
|
|
|
745
754
|
|
|
746
755
|
`Element`
|
|
747
756
|
|
|
757
|
+
**`Ref`**
|
|
758
|
+
|
|
759
|
+
https://ant.design/components/tabs/
|
|
760
|
+
|
|
748
761
|
___
|
|
749
762
|
|
|
750
763
|
### Title
|
|
@@ -907,10 +920,7 @@ Request faas server with React hook
|
|
|
907
920
|
| :------ | :------ | :------ |
|
|
908
921
|
| `action` | `string` \| `PathOrData` | {string} action name |
|
|
909
922
|
| `defaultParams` | `FaasParams`<`PathOrData`\> | {object} initial action params |
|
|
910
|
-
| `options?` | `
|
|
911
|
-
| `options.data?` | `FaasData`<`PathOrData`\> | - |
|
|
912
|
-
| `options.setData?` | `Dispatch`<`SetStateAction`<`FaasData`<`PathOrData`\>\>\> | - |
|
|
913
|
-
| `options.skip?` | `boolean` | - |
|
|
923
|
+
| `options?` | `useFaasOptions`<`PathOrData`\> | - |
|
|
914
924
|
|
|
915
925
|
#### Returns
|
|
916
926
|
|
package/dist/index.js
CHANGED
|
@@ -865,16 +865,26 @@ function Link(props) {
|
|
|
865
865
|
var _a, _b;
|
|
866
866
|
const { Link: Config } = useConfigContext();
|
|
867
867
|
const navigate = reactRouterDom.useNavigate();
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
868
|
+
const [style, setStyle] = react$1.useState();
|
|
869
|
+
react$1.useEffect(() => {
|
|
870
|
+
let computedStyle = {
|
|
871
|
+
...Config.style || {},
|
|
872
|
+
cursor: "pointer",
|
|
873
|
+
...props.style
|
|
874
|
+
};
|
|
875
|
+
if (props.block)
|
|
876
|
+
computedStyle = Object.assign({
|
|
877
|
+
display: "block",
|
|
878
|
+
width: "100%"
|
|
879
|
+
}, computedStyle);
|
|
880
|
+
setStyle(computedStyle);
|
|
881
|
+
}, [
|
|
882
|
+
props.style,
|
|
883
|
+
props.block,
|
|
884
|
+
Config.style
|
|
885
|
+
]);
|
|
886
|
+
if (!style)
|
|
887
|
+
return null;
|
|
878
888
|
if (props.href.startsWith("http")) {
|
|
879
889
|
if (props.button)
|
|
880
890
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -936,11 +946,10 @@ function Link(props) {
|
|
|
936
946
|
style,
|
|
937
947
|
copyable: props.copyable,
|
|
938
948
|
onClick: (e) => {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
window.open(props.href);
|
|
942
|
-
else
|
|
949
|
+
if ((props.target || (Config == null ? void 0 : Config.target)) !== "_blank") {
|
|
950
|
+
e.preventDefault();
|
|
943
951
|
navigate(props.href);
|
|
952
|
+
}
|
|
944
953
|
},
|
|
945
954
|
children: props.text
|
|
946
955
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -862,16 +862,26 @@ function Link(props) {
|
|
|
862
862
|
var _a, _b;
|
|
863
863
|
const { Link: Config } = useConfigContext();
|
|
864
864
|
const navigate = useNavigate();
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
865
|
+
const [style, setStyle] = useState();
|
|
866
|
+
useEffect(() => {
|
|
867
|
+
let computedStyle = {
|
|
868
|
+
...Config.style || {},
|
|
869
|
+
cursor: "pointer",
|
|
870
|
+
...props.style
|
|
871
|
+
};
|
|
872
|
+
if (props.block)
|
|
873
|
+
computedStyle = Object.assign({
|
|
874
|
+
display: "block",
|
|
875
|
+
width: "100%"
|
|
876
|
+
}, computedStyle);
|
|
877
|
+
setStyle(computedStyle);
|
|
878
|
+
}, [
|
|
879
|
+
props.style,
|
|
880
|
+
props.block,
|
|
881
|
+
Config.style
|
|
882
|
+
]);
|
|
883
|
+
if (!style)
|
|
884
|
+
return null;
|
|
875
885
|
if (props.href.startsWith("http")) {
|
|
876
886
|
if (props.button)
|
|
877
887
|
return /* @__PURE__ */ jsx(
|
|
@@ -933,11 +943,10 @@ function Link(props) {
|
|
|
933
943
|
style,
|
|
934
944
|
copyable: props.copyable,
|
|
935
945
|
onClick: (e) => {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
window.open(props.href);
|
|
939
|
-
else
|
|
946
|
+
if ((props.target || (Config == null ? void 0 : Config.target)) !== "_blank") {
|
|
947
|
+
e.preventDefault();
|
|
940
948
|
navigate(props.href);
|
|
949
|
+
}
|
|
941
950
|
},
|
|
942
951
|
children: props.text
|
|
943
952
|
}
|
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.102",
|
|
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.102",
|
|
26
26
|
"@ant-design/icons": "*",
|
|
27
27
|
"lodash-es": "*",
|
|
28
28
|
"dayjs": "*"
|