oksy 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Database } from './../../ReactiveStore/ReactiveStore';
|
2
2
|
import { WebSocketServerClient } from './../../Server/Socket/WebSocketServerClient';
|
3
3
|
import { watch as VueWatch, WatchStopHandle } from 'vue';
|
4
|
-
import { BaseUser, BaseWorkspace } from '../../ReactiveStore/BaseEntity';
|
4
|
+
import { BaseFile, BaseUser, BaseWorkspace } from '../../ReactiveStore/BaseEntity';
|
5
5
|
import { UI } from './UI';
|
6
6
|
export declare abstract class BasePage {
|
7
7
|
authUser: BaseUser;
|
@@ -16,7 +16,7 @@ export declare abstract class BasePage {
|
|
16
16
|
state: {
|
17
17
|
[key: string]: any;
|
18
18
|
};
|
19
|
-
UI: UI
|
19
|
+
UI: UI<BaseFile>;
|
20
20
|
constructor(authUser: BaseUser, database: Database, workspace: BaseWorkspace, client: WebSocketServerClient, visitedUrl: string);
|
21
21
|
watch(...args: Parameters<typeof VueWatch>): void;
|
22
22
|
}
|
@@ -10,14 +10,12 @@ export type FileType = {
|
|
10
10
|
onRenameId: string;
|
11
11
|
classInit: string;
|
12
12
|
};
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
export declare function UseFile<TFile extends BaseFile>(page: BasePage): {
|
14
|
+
File: (options: {
|
15
|
+
onUpload: (file: TFile) => void;
|
16
|
+
onDelete: (file: TFile) => void;
|
17
|
+
files?: (() => TFile[]) | undefined;
|
18
|
+
class?: string | undefined;
|
19
|
+
disabled?: FlatOrFunc<() => boolean> | undefined;
|
20
|
+
}) => FileType;
|
19
21
|
};
|
20
|
-
export declare function UseFile(page: BasePage): {
|
21
|
-
File: (options: FileOptions) => FileType;
|
22
|
-
};
|
23
|
-
export {};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { BasePage } from 'oksy';
|
2
|
-
|
2
|
+
import { BaseFile } from 'oksy';
|
3
|
+
export declare class UI<TFile extends BaseFile> {
|
3
4
|
Button: (options: {
|
4
5
|
label: import("./Components/FlatOrFunc").FlatOrFunc<() => string>;
|
5
6
|
onClick: () => void;
|
@@ -28,9 +29,9 @@ export declare class UI {
|
|
28
29
|
items: () => any[];
|
29
30
|
}) => import("./Components/Container").ContainerType;
|
30
31
|
File: (options: {
|
31
|
-
onUpload: (file:
|
32
|
-
onDelete: (file:
|
33
|
-
files?: (() =>
|
32
|
+
onUpload: (file: TFile) => void;
|
33
|
+
onDelete: (file: TFile) => void;
|
34
|
+
files?: (() => TFile[]) | undefined;
|
34
35
|
class?: string | undefined;
|
35
36
|
disabled?: import("./Components/FlatOrFunc").FlatOrFunc<() => boolean> | undefined;
|
36
37
|
}) => import("./Components/File").FileType;
|
@@ -117,9 +118,9 @@ export declare class UI {
|
|
117
118
|
class?: string | undefined;
|
118
119
|
items: () => any[];
|
119
120
|
}) => import("./Components/Container").ContainerType, File?: (options: {
|
120
|
-
onUpload: (file:
|
121
|
-
onDelete: (file:
|
122
|
-
files?: (() =>
|
121
|
+
onUpload: (file: TFile) => void;
|
122
|
+
onDelete: (file: TFile) => void;
|
123
|
+
files?: (() => TFile[]) | undefined;
|
123
124
|
class?: string | undefined;
|
124
125
|
disabled?: import("./Components/FlatOrFunc").FlatOrFunc<() => boolean> | undefined;
|
125
126
|
}) => import("./Components/File").FileType, SelectOne?: (options: {
|