@vived/app 2.36.0 → 2.37.1
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.
|
@@ -20,7 +20,8 @@ export interface ShowConfirmDTO {
|
|
|
20
20
|
}
|
|
21
21
|
export interface ShowMarkDownEditorDTO {
|
|
22
22
|
initialText: string;
|
|
23
|
-
|
|
23
|
+
submitCallback: (text: string) => void;
|
|
24
|
+
validateString?: (text: string) => string | null;
|
|
24
25
|
}
|
|
25
26
|
export declare abstract class AppDispatcher {
|
|
26
27
|
abstract registerHostHandler: (hostHandler: Handler) => void;
|
|
@@ -51,5 +52,6 @@ export declare abstract class AppDispatcher {
|
|
|
51
52
|
abstract showAlert: (data: ShowAlertDTO) => void;
|
|
52
53
|
abstract showConfirm: (data: ShowConfirmDTO) => void;
|
|
53
54
|
abstract showMarkDownEditor: (data: ShowMarkDownEditorDTO) => void;
|
|
55
|
+
abstract showSelectModel(callback: (modelId: string) => void): void;
|
|
54
56
|
}
|
|
55
57
|
export declare function makeAppDispatcher(): AppDispatcher;
|
|
@@ -302,10 +302,19 @@ class AppDistpatcherImp extends AppDispatcher {
|
|
|
302
302
|
this.showMarkDownEditor = (data) => {
|
|
303
303
|
const payload = {
|
|
304
304
|
initialText: data.initialText,
|
|
305
|
-
|
|
305
|
+
submitCallback: data.submitCallback,
|
|
306
306
|
};
|
|
307
|
+
if (data.validateString) {
|
|
308
|
+
payload.validateString = data.validateString;
|
|
309
|
+
}
|
|
307
310
|
this.formRequestAndDispatch("SHOW_MARKDOWN_EDITOR", 1, payload);
|
|
308
311
|
};
|
|
312
|
+
this.showSelectModel = (callback) => {
|
|
313
|
+
const payload = {
|
|
314
|
+
callback,
|
|
315
|
+
};
|
|
316
|
+
this.formRequestAndDispatch("SHOW_SELECT_MODEL", 1, payload);
|
|
317
|
+
};
|
|
309
318
|
}
|
|
310
319
|
formRequestAndDispatch(type, version, payload) {
|
|
311
320
|
const request = {
|