Skip to content

Commit 92e78da

Browse files
committed
[WIP]: Add files for api rows for types
1 parent c0737aa commit 92e78da

14 files changed

+248
-54
lines changed

src/data/ActionButtonsAPIRows.tsx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import TypeHighlight from "../components/typeHighlight/TypeHighlight";
2+
3+
export const ActionButtonsAPIRows =[
4+
{
5+
name: "position",
6+
type: <>
7+
<TypeHighlight np>{'"before"'}</TypeHighlight>{" | "}
8+
<TypeHighlight np>{'"after"'}</TypeHighlight>
9+
</>,
10+
default: <TypeHighlight np></TypeHighlight>,
11+
description: (
12+
<>
13+
The position of the action buttons. Before or after the component.
14+
</>
15+
),
16+
},
17+
{
18+
name: "style",
19+
type: <TypeHighlight np>React.CSSProperties</TypeHighlight>,
20+
default: <TypeHighlight np></TypeHighlight>,
21+
description: <>The in-line style object applied to the main container.</>,
22+
},
23+
{
24+
name: "className",
25+
type: <TypeHighlight np>string</TypeHighlight>,
26+
default: <TypeHighlight np></TypeHighlight>,
27+
description: (
28+
<>
29+
The classname to override the css styles in .css or .sass file instead
30+
of using in-line styles. Classname is applied to the main container.
31+
</>
32+
),
33+
},
34+
{
35+
name: "uploadingMessage",
36+
type: <TypeHighlight np>{"string"}</TypeHighlight>,
37+
default: <TypeHighlight np></TypeHighlight>,
38+
description: (
39+
<>
40+
A message to show in the footer when the uploading process takes place.
41+
</>
42+
),
43+
},
44+
]

src/data/DropzoneAPIPropsRows.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export const DropzoneAPIPropsRows = [
218218
name: "style",
219219
type: <TypeHighlight np>React.CSSProperties</TypeHighlight>,
220220
default: <TypeHighlight np></TypeHighlight>,
221-
description: <>The in-line style object.</>,
221+
description: <>The in-line style object applied to the main container.</>,
222222
},
223223
{
224224
name: "className",
@@ -227,7 +227,7 @@ export const DropzoneAPIPropsRows = [
227227
description: (
228228
<>
229229
The classname to override the css styles in .css or .sass file instead
230-
of using in-line styles.
230+
of using in-line styles. Classname is applied to the main container.
231231
</>
232232
),
233233
},

src/data/FileMosaicAPIPropsRows.tsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,7 @@ export const FileMosaicAPIPropsRows = [
5959
</>
6060
),
6161
}, */
62-
{
63-
id: 2,
64-
name: "errors",
65-
type: <TypeHighlight np>{"string[]"}</TypeHighlight>,
66-
default: <TypeHighlight np></TypeHighlight>,
67-
description: (
68-
<>
69-
The list of errors according to the validation criteria or the result of
70-
the given custom validation function.
71-
</>
72-
),
73-
},
62+
7463
{
7564
id: 5,
7665
name: "id",
@@ -120,6 +109,18 @@ export const FileMosaicAPIPropsRows = [
120109
</>
121110
),
122111
},
112+
{
113+
id: 2,
114+
name: "errors",
115+
type: <TypeHighlight np>{"string[]"}</TypeHighlight>,
116+
default: <TypeHighlight np></TypeHighlight>,
117+
description: (
118+
<>
119+
The list of errors according to the validation criteria or the result of
120+
the given custom validation function.
121+
</>
122+
),
123+
},
123124
{
124125
id: 6,
125126
name: "info",

src/data/FooterConfigAPIRows.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const FooterConfigAPIRows =[];

src/data/HeaderConfigAPIRows.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const HeaderConfigAPIRows=[]

src/data/ServerResponseAPIRows.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const ServerResponseAPIRows=[
2+
3+
]

src/data/UploadConfigAPIRows.tsx

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
import TypeHighlight from "../components/typeHighlight/TypeHighlight";
2+
3+
export const UploadConfigAPIRows = [
4+
{
5+
name: "url",
6+
type: <TypeHighlight np>{"string"}</TypeHighlight>,
7+
default: <TypeHighlight np></TypeHighlight>,
8+
description: (
9+
<>
10+
The url endpoint to upload the file. e.g.
11+
"https://www.myasomwbackend/uploads/file".
12+
</>
13+
),
14+
},
15+
{
16+
name: "method",
17+
type: (
18+
<>
19+
<TypeHighlight np>{'"POST"'}</TypeHighlight>
20+
{" | "}
21+
<TypeHighlight np>{'"PUT"'}</TypeHighlight>
22+
{" | "}
23+
<TypeHighlight np>{'"PATCH"'}</TypeHighlight>
24+
</>
25+
),
26+
default: <TypeHighlight np>{'"POST"'}</TypeHighlight>,
27+
description: <>Request headers for http request.</>,
28+
},
29+
{
30+
name: "uploadLabel",
31+
type: <TypeHighlight np>{"string"}</TypeHighlight>,
32+
default: <TypeHighlight np>{'"file"'}</TypeHighlight>,
33+
description: (
34+
<>
35+
The label to use in the request. On the server this must be the label to
36+
get the file.
37+
</>
38+
),
39+
},
40+
{
41+
name: "cleanOnUpload",
42+
type: <TypeHighlight np>{"boolean"}</TypeHighlight>,
43+
default: <TypeHighlight np></TypeHighlight>,
44+
description: (
45+
<>
46+
Flag for indicating whther to remove the non-valid files before starting
47+
the upload process. This flag is valid only if validation is enable.
48+
</>
49+
),
50+
},
51+
{
52+
name: "autoUpload",
53+
type: <TypeHighlight np>{"boolean"}</TypeHighlight>,
54+
default: <TypeHighlight np></TypeHighlight>,
55+
description: (
56+
<>
57+
If true, onDrop event or file selection not only will make Dropzone to
58+
return the list of files, but also it will start the upload stage for
59+
the files if at least url was set By default is false
60+
</>
61+
),
62+
},
63+
{
64+
name: "preparingTime",
65+
type: <TypeHighlight np>{"number"}</TypeHighlight>,
66+
default: <TypeHighlight np></TypeHighlight>,
67+
description: (
68+
<>
69+
The time that will last the "preparing" stage By default is 1500
70+
miliseconds = 1.5 seconds.
71+
</>
72+
),
73+
},
74+
{
75+
name: "uploadingMessage",
76+
type: <TypeHighlight np>{"string"}</TypeHighlight>,
77+
default: <TypeHighlight np></TypeHighlight>,
78+
description: (
79+
<>
80+
A message to show in the footer when the uploading process takes place.
81+
</>
82+
),
83+
},
84+
];

src/data/UploadStatusAPIRows.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const UPLOADSTATUSAPIRows=[
2+
3+
]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import CodeHighlight from "../components/codeHighlight/CodeHighlight";
2+
import TypeHighlight from "../components/typeHighlight/TypeHighlight";
3+
4+
export const ValidateFileResponseAPIrows = [
5+
{
6+
name: "valid",
7+
type: <TypeHighlight np>{"boolean"}</TypeHighlight>,
8+
default: <TypeHighlight np></TypeHighlight>,
9+
description: <>If true, that means that the File is valid</>,
10+
},
11+
{
12+
id: 2,
13+
name: "errors",
14+
type: <TypeHighlight np>{"string[]"}</TypeHighlight>,
15+
default: <TypeHighlight np></TypeHighlight>,
16+
description: <>The list of errors associated with an specific file.</>,
17+
},
18+
];

src/files-ui/core/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export type {
9292

9393
export {
9494
//UPLOADSTATUS,
95-
ExtFileInstance, ExtFileManager, extFileMock
95+
ExtFileInstance, ExtFileManager, extFileMock, createUploadConfig
9696
} from "./types"
9797

9898
export {

0 commit comments

Comments
 (0)