esoftplay 0.0.110 → 0.0.111-c
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/bin/build.js +0 -1
- package/bin/cli.js +0 -0
- package/bin/router.js +3 -5
- package/error.ts +2 -3
- package/esp.ts +21 -17
- package/modules/lib/crypt.js +2 -1
- package/modules/lib/curl.ts +89 -27
- package/modules/lib/datepicker.tsx +1 -1
- package/modules/lib/picture.tsx +10 -5
- package/modules/lib/timepicker.tsx +131 -0
- package/modules/user/index.tsx +9 -7
- package/package.json +1 -1
- package/modules/content/audio.tsx +0 -126
package/bin/build.js
CHANGED
package/bin/cli.js
CHANGED
|
File without changes
|
package/bin/router.js
CHANGED
|
@@ -383,7 +383,7 @@ declare module "esoftplay" {
|
|
|
383
383
|
function useGlobalState<S>(initialState?: S, option?: useGlobalOption): useGlobalReturn<S>;
|
|
384
384
|
function usePersistState<S>(key: string, initialState?: S | (() => S)): [S, (a: S | ((b: S )=> S)) => S | undefined, (a?: (x: S) => void) => void, () => void];
|
|
385
385
|
function useSafeState<S>(initialState?: S | (() => S)): [S, (a: S | ((b: S )=> S)) => S | undefined];
|
|
386
|
-
function applyStyle(style:
|
|
386
|
+
function applyStyle<T>(style: T): T;
|
|
387
387
|
function usePersistState<S>(key: string, initialState?: S | (() => S)): [S, (a: S) => void, (a?: (x: S)=> void) => void, () => void];
|
|
388
388
|
namespace esp {
|
|
389
389
|
function appjson(): any;
|
|
@@ -578,14 +578,12 @@ function createRouter() {
|
|
|
578
578
|
staticImport.splice(0, 0, item)
|
|
579
579
|
} else if (module == 'lib' && task == 'style') {
|
|
580
580
|
staticImport.splice(0, 0, item)
|
|
581
|
-
} else if (module == 'lib' && task == 'sqlite') {
|
|
582
|
-
staticImport.splice(1, 0, item)
|
|
583
|
-
} else if (module == 'lib' && task == 'worker_data') {
|
|
584
|
-
staticImport.splice(2, 0, item)
|
|
585
581
|
} else if (module == 'lib' && task == 'worker') {
|
|
586
582
|
staticImport.splice(2, 0, item)
|
|
587
583
|
} else if (module == 'lib' && task == 'navigation') {
|
|
588
584
|
staticImport.splice(2, 0, item)
|
|
585
|
+
} else if (task == 'style') {
|
|
586
|
+
staticImport.splice(9, 0, item)
|
|
589
587
|
} else {
|
|
590
588
|
staticImport.push(item);
|
|
591
589
|
}
|
package/error.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
2
|
-
import { LibCurl, UserClass } from 'esoftplay';
|
|
2
|
+
import { LibCurl, UserClass, esp } from 'esoftplay';
|
|
3
3
|
import Constants from 'expo-constants';
|
|
4
4
|
import { Platform } from 'react-native';
|
|
5
|
-
import esp from './esp';
|
|
6
5
|
import { default as UserRoutes } from './modules/user/routes';
|
|
7
6
|
let pack = require('../../package.json');
|
|
8
7
|
let app = require('../../app.json');
|
|
@@ -42,7 +41,7 @@ export function reportApiError(fetch: any, error: any) {
|
|
|
42
41
|
'fetch: ' + String(JSON.stringify(fetch || {}, undefined, 2)).replace(/[\[\]\{\}\"]+/g, ''),
|
|
43
42
|
'error: ' + error
|
|
44
43
|
].join('\n')
|
|
45
|
-
|
|
44
|
+
|
|
46
45
|
if (manifest?.packagerOpts) {
|
|
47
46
|
let post = {
|
|
48
47
|
text: msg,
|
package/esp.ts
CHANGED
|
@@ -8,27 +8,31 @@ import routers from './cache/routers';
|
|
|
8
8
|
import './oneplusfixfont';
|
|
9
9
|
LogBox.ignoreLogs(['YellowBox has been replaced with LogBox. Please call LogBox.ignoreLogs() instead.']);
|
|
10
10
|
LogBox.ignoreLogs(['VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList-backed container instead.']);
|
|
11
|
+
LogBox.ignoreLogs([`Got a component with the name 'm' for the screen 'component/map'. React Components must start with an uppercase letter. If you're passing a regular function and not a component, pass it as children to 'Screen' instead. Otherwise capitalize your component's name.`]);
|
|
11
12
|
let app = require('../../app.json');
|
|
12
13
|
let conf = require('../../config.json');
|
|
13
|
-
let lconf
|
|
14
|
+
let lconf
|
|
15
|
+
try {
|
|
16
|
+
lconf = require('../../config.live.json');
|
|
17
|
+
} catch (error) {
|
|
18
|
+
|
|
19
|
+
}
|
|
14
20
|
|
|
15
21
|
export default (() => {
|
|
16
|
-
function mergeDeep(target
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} else {
|
|
29
|
-
target[key] = sourceValue;
|
|
22
|
+
function mergeDeep(target, ...sources) {
|
|
23
|
+
target = Object(target);
|
|
24
|
+
for (let source of sources) {
|
|
25
|
+
source = Object(source);
|
|
26
|
+
for (let key in source) {
|
|
27
|
+
if (source.hasOwnProperty(key)) {
|
|
28
|
+
if (source[key] && typeof source[key] === 'object') {
|
|
29
|
+
target[key] = mergeDeep(target[key], source[key]);
|
|
30
|
+
} else {
|
|
31
|
+
target[key] = source[key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
|
-
}
|
|
35
|
+
}
|
|
32
36
|
return target;
|
|
33
37
|
}
|
|
34
38
|
app = mergeDeep(app, conf)
|
|
@@ -89,7 +93,7 @@ export default (() => {
|
|
|
89
93
|
function lang(moduleTask: string, langName: string, ...stringToBe: string[]): string {
|
|
90
94
|
let string = esp.assets("locale/" + langId() + ".json")?.[moduleTask]?.[langName]
|
|
91
95
|
if (!string) {
|
|
92
|
-
string = esp.assets("locale/id.json")
|
|
96
|
+
string = esp.assets("locale/id.json")[moduleTask][langName]
|
|
93
97
|
}
|
|
94
98
|
function sprintf(string: string, index: number) {
|
|
95
99
|
if (stringToBe[index] != undefined) {
|