@vived/app 2.35.0 → 2.37.0
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.
|
@@ -18,6 +18,10 @@ export interface ShowConfirmDTO {
|
|
|
18
18
|
confirmCallback: () => void;
|
|
19
19
|
cancelCallback: () => void;
|
|
20
20
|
}
|
|
21
|
+
export interface ShowMarkDownEditorDTO {
|
|
22
|
+
initialText: string;
|
|
23
|
+
confirmCallback: () => void;
|
|
24
|
+
}
|
|
21
25
|
export declare abstract class AppDispatcher {
|
|
22
26
|
abstract registerHostHandler: (hostHandler: Handler) => void;
|
|
23
27
|
abstract dispatch: (request: Request) => void;
|
|
@@ -46,5 +50,7 @@ export declare abstract class AppDispatcher {
|
|
|
46
50
|
abstract stopZSpace: () => void;
|
|
47
51
|
abstract showAlert: (data: ShowAlertDTO) => void;
|
|
48
52
|
abstract showConfirm: (data: ShowConfirmDTO) => void;
|
|
53
|
+
abstract showMarkDownEditor: (data: ShowMarkDownEditorDTO) => void;
|
|
54
|
+
abstract showSelectModel(callback: (modelId: string) => void): void;
|
|
49
55
|
}
|
|
50
56
|
export declare function makeAppDispatcher(): AppDispatcher;
|
|
@@ -299,6 +299,19 @@ class AppDistpatcherImp extends AppDispatcher {
|
|
|
299
299
|
};
|
|
300
300
|
this.formRequestAndDispatch("SHOW_CONFIRM", 1, payload);
|
|
301
301
|
};
|
|
302
|
+
this.showMarkDownEditor = (data) => {
|
|
303
|
+
const payload = {
|
|
304
|
+
initialText: data.initialText,
|
|
305
|
+
confirmCallback: data.confirmCallback,
|
|
306
|
+
};
|
|
307
|
+
this.formRequestAndDispatch("SHOW_MARKDOWN_EDITOR", 1, payload);
|
|
308
|
+
};
|
|
309
|
+
this.showSelectModel = (callback) => {
|
|
310
|
+
const payload = {
|
|
311
|
+
callback
|
|
312
|
+
};
|
|
313
|
+
this.formRequestAndDispatch("SHOW_SELECT_MODEL", 1, payload);
|
|
314
|
+
};
|
|
302
315
|
}
|
|
303
316
|
formRequestAndDispatch(type, version, payload) {
|
|
304
317
|
const request = {
|