esoftplay 0.0.228 → 0.0.230
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/error.ts +2 -0
- package/modules/lib/input.tsx +3 -1
- package/modules/lib/navigation.ts +12 -0
- package/package.json +1 -1
package/error.ts
CHANGED
|
@@ -2,6 +2,7 @@ import Constants from 'expo-constants';
|
|
|
2
2
|
import * as FileSystem from 'expo-file-system';
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
4
|
import { LibCurl } from './cache/lib/curl/import';
|
|
5
|
+
import { LibNavigationProperty } from './cache/lib/navigation/import';
|
|
5
6
|
import { UserClass } from './cache/user/class/import';
|
|
6
7
|
import esp from './esp';
|
|
7
8
|
import FastStorage from './mmkv';
|
|
@@ -34,6 +35,7 @@ export function setError(error?: any) {
|
|
|
34
35
|
user,
|
|
35
36
|
error: String(error),
|
|
36
37
|
routes: routesName,
|
|
38
|
+
args: LibNavigationProperty.lastArgs.get(),
|
|
37
39
|
time: getTime()
|
|
38
40
|
};
|
|
39
41
|
try {
|
package/modules/lib/input.tsx
CHANGED
|
@@ -253,7 +253,9 @@ export default class m extends LibComponent<LibInputProps, LibInputState> {
|
|
|
253
253
|
this.text = this.mask(e)
|
|
254
254
|
if (error != undefined)
|
|
255
255
|
this.clearError()
|
|
256
|
-
if (this.props.onChangeText)
|
|
256
|
+
if (this.props.onChangeText) {
|
|
257
|
+
this.props.onChangeText(this.unmask(e), this.text)
|
|
258
|
+
}
|
|
257
259
|
}}
|
|
258
260
|
/>
|
|
259
261
|
{
|
|
@@ -23,6 +23,12 @@ export interface LibNavigationInjector {
|
|
|
23
23
|
children?: any
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
export const lastArgs = useGlobalState(undefined, { persistKey: "lib/navigation/lastargs" })
|
|
27
|
+
|
|
28
|
+
function logArgs(params: any) {
|
|
29
|
+
lastArgs.set(params)
|
|
30
|
+
}
|
|
31
|
+
|
|
26
32
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/lib/navigation.md) untuk melihat dokumentasi*/
|
|
27
33
|
export default {
|
|
28
34
|
_redirect: {} as any,
|
|
@@ -86,10 +92,12 @@ export default {
|
|
|
86
92
|
/* <T EspRouterInterface>(path: T): EspRouterInterface[T] { */
|
|
87
93
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/lib/navigation.md#navigate) untuk melihat dokumentasi*/
|
|
88
94
|
navigate<S extends keyof EspArgsInterface>(route: S, params?: EspArgsInterface[S]): void {
|
|
95
|
+
logArgs(params)
|
|
89
96
|
this._ref?.navigate?.(replaceModuleByUrlParam(params, route), params)
|
|
90
97
|
},
|
|
91
98
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/lib/navigation.md#navigateTab) untuk melihat dokumentasi*/
|
|
92
99
|
navigateTab<S extends keyof EspArgsInterface>(route: S, tabIndex: number, params?: EspArgsInterface[S]): void {
|
|
100
|
+
logArgs(params)
|
|
93
101
|
this._ref?.navigate?.(replaceModuleByUrlParam(params, route), params)
|
|
94
102
|
setTimeout(() => {
|
|
95
103
|
const TabConfig = esp.modProp(replaceModuleByUrlParam(params, route))?.TabConfig;
|
|
@@ -164,17 +172,20 @@ export default {
|
|
|
164
172
|
r(value)
|
|
165
173
|
};
|
|
166
174
|
}
|
|
175
|
+
logArgs(params)
|
|
167
176
|
this.push(replaceModuleByUrlParam(params, route), params)
|
|
168
177
|
})
|
|
169
178
|
},
|
|
170
179
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/lib/navigation.md#replace) untuk melihat dokumentasi*/
|
|
171
180
|
replace<S extends keyof EspArgsInterface>(route: S, params?: EspArgsInterface[S]): void {
|
|
181
|
+
logArgs(params)
|
|
172
182
|
this._ref.dispatch(
|
|
173
183
|
StackActions.replace(replaceModuleByUrlParam(params, route), params)
|
|
174
184
|
)
|
|
175
185
|
},
|
|
176
186
|
/** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/lib/navigation.md#push) untuk melihat dokumentasi*/
|
|
177
187
|
push<S extends keyof EspArgsInterface>(route: S, params?: EspArgsInterface[S]): void {
|
|
188
|
+
logArgs(params)
|
|
178
189
|
this._ref?.dispatch?.(
|
|
179
190
|
StackActions.push(
|
|
180
191
|
replaceModuleByUrlParam(params, route),
|
|
@@ -224,6 +235,7 @@ export default {
|
|
|
224
235
|
|
|
225
236
|
function replaceModuleByUrlParam<S extends keyof EspArgsInterface>(params: any, defaultModule: S) {
|
|
226
237
|
let module = defaultModule
|
|
238
|
+
logArgs(params)
|
|
227
239
|
if (params?.url) {
|
|
228
240
|
const urlParams = LibUtils.getUrlParams(params.url)
|
|
229
241
|
if (urlParams?.module && urlParams?.url?.includes?.(".")) {
|