@vived/app 2.37.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
- confirmCallback: () => void;
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;
@@ -302,13 +302,16 @@ class AppDistpatcherImp extends AppDispatcher {
302
302
  this.showMarkDownEditor = (data) => {
303
303
  const payload = {
304
304
  initialText: data.initialText,
305
- confirmCallback: data.confirmCallback,
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
  };
309
312
  this.showSelectModel = (callback) => {
310
313
  const payload = {
311
- callback
314
+ callback,
312
315
  };
313
316
  this.formRequestAndDispatch("SHOW_SELECT_MODEL", 1, payload);
314
317
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vived/app",
3
- "version": "2.37.0",
3
+ "version": "2.37.1",
4
4
  "description": "Public package for the VIVED Learning App system",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",