react-hook-core 0.2.9 → 0.3.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.
- package/lib/core.js +2 -2
- package/package.json +1 -1
- package/src/core.ts +3 -3
- package/src/input.ts +4 -4
package/lib/core.js
CHANGED
|
@@ -133,8 +133,8 @@ function initForm(form, initMat) {
|
|
|
133
133
|
}
|
|
134
134
|
exports.initForm = initForm;
|
|
135
135
|
function error(err, gv, ae) {
|
|
136
|
-
var title =
|
|
137
|
-
var msg =
|
|
136
|
+
var title = getString('error', gv);
|
|
137
|
+
var msg = getString('error_internal', gv);
|
|
138
138
|
if (!err) {
|
|
139
139
|
ae(msg, undefined, title);
|
|
140
140
|
return;
|
package/package.json
CHANGED
package/src/core.ts
CHANGED
|
@@ -395,9 +395,9 @@ export function initForm(form?: HTMLFormElement, initMat?: (f: HTMLFormElement)
|
|
|
395
395
|
}
|
|
396
396
|
return form;
|
|
397
397
|
}
|
|
398
|
-
export function error(err: any, gv: (key: string) => string, ae: (msg: string, callback?: () => void, header?: string) => void) {
|
|
399
|
-
const title =
|
|
400
|
-
let msg =
|
|
398
|
+
export function error(err: any, gv: StringMap | ((key: string) => string), ae: (msg: string, callback?: () => void, header?: string) => void) {
|
|
399
|
+
const title = getString('error', gv);
|
|
400
|
+
let msg = getString('error_internal', gv);
|
|
401
401
|
if (!err) {
|
|
402
402
|
ae(msg, undefined, title);
|
|
403
403
|
return;
|
package/src/input.ts
CHANGED
|
@@ -49,9 +49,9 @@ export function getMsgFunc(p: ResourceService|ShowMessageInput, showMsg?: (msg:
|
|
|
49
49
|
return (p as any).showMessage;
|
|
50
50
|
}
|
|
51
51
|
interface ConfirmInput {
|
|
52
|
-
confirm: (m2: string,
|
|
52
|
+
confirm: (m2: string, yesCallback?: () => void, header?: string, btnLeftText?: string, btnRightText?: string, noCallback?: () => void) => void;
|
|
53
53
|
}
|
|
54
|
-
export function getConfirmFunc(p: ResourceService|ConfirmInput, cf?: (m2: string,
|
|
54
|
+
export function getConfirmFunc(p: ResourceService|ConfirmInput, cf?: (m2: string, yesCallback?: () => void, header?: string, btnLeftText?: string, btnRightText?: string, noCallback?: () => void) => void): (m2: string, yesCallback?: () => void, header?: string, btnLeftText?: string, btnRightText?: string, noCallback?: () => void) => void {
|
|
55
55
|
if (cf) {
|
|
56
56
|
return cf;
|
|
57
57
|
}
|
|
@@ -67,9 +67,9 @@ export function getLocaleFunc(p: ResourceService|GetLocaleInput, getLoc?: () =>
|
|
|
67
67
|
return (p as any).getLocale;
|
|
68
68
|
}
|
|
69
69
|
interface ShowErrorInput {
|
|
70
|
-
showError: (m: string,
|
|
70
|
+
showError: (m: string, callback?: () => void, header?: string) => void;
|
|
71
71
|
}
|
|
72
|
-
export function getErrorFunc(p: ResourceService|ShowErrorInput, showErr?: (m: string,
|
|
72
|
+
export function getErrorFunc(p: ResourceService|ShowErrorInput, showErr?: (m: string, callback?: () => void, header?: string) => void): (m: string, callback?: () => void, header?: string) => void {
|
|
73
73
|
if (showErr) {
|
|
74
74
|
return showErr;
|
|
75
75
|
}
|