esoftplay 0.0.120 → 0.0.121

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.
Files changed (66) hide show
  1. package/bin/build.js +4 -6
  2. package/bin/cli.js +63 -0
  3. package/bin/router.js +41 -43
  4. package/error.ts +2 -1
  5. package/esp.ts +4 -4
  6. package/global.ts +18 -23
  7. package/import_migrator.mjs +5 -5
  8. package/import_translator.mjs +17 -0
  9. package/modules/lib/carrousel.tsx +5 -8
  10. package/modules/lib/carrousel_snap.tsx +5 -8
  11. package/modules/lib/crypt.js +1 -3
  12. package/modules/lib/curl.ts +6 -7
  13. package/modules/lib/datepicker.tsx +4 -4
  14. package/modules/lib/dialog.tsx +6 -6
  15. package/modules/lib/direct_image.tsx +1 -4
  16. package/modules/lib/direct_text.tsx +1 -4
  17. package/modules/lib/document.ts +4 -5
  18. package/modules/lib/editbox.tsx +109 -0
  19. package/modules/lib/effect.tsx +1 -3
  20. package/modules/lib/gallery.tsx +3 -5
  21. package/modules/lib/icon.tsx +1 -1
  22. package/modules/lib/image.tsx +7 -7
  23. package/modules/lib/image_crop.tsx +7 -7
  24. package/modules/lib/image_multi.tsx +6 -6
  25. package/modules/lib/image_shadow.tsx +2 -2
  26. package/modules/lib/infinite.tsx +9 -10
  27. package/modules/lib/input.tsx +4 -5
  28. package/modules/lib/input_base.tsx +2 -3
  29. package/modules/lib/list.tsx +1 -2
  30. package/modules/lib/loading.tsx +2 -3
  31. package/modules/lib/locale.ts +1 -2
  32. package/modules/lib/navigation.ts +5 -5
  33. package/modules/lib/net_status.tsx +2 -2
  34. package/modules/lib/notification.ts +9 -9
  35. package/modules/lib/notify.ts +2 -2
  36. package/modules/lib/picture.tsx +3 -4
  37. package/modules/lib/progress.tsx +5 -5
  38. package/modules/lib/roll.tsx +5 -6
  39. package/modules/lib/scroll.tsx +1 -3
  40. package/modules/lib/scrollpicker.tsx +5 -7
  41. package/modules/lib/skeleton.tsx +2 -3
  42. package/modules/lib/slidingup.tsx +3 -4
  43. package/modules/lib/sociallogin.tsx +4 -4
  44. package/modules/lib/tabs.tsx +5 -6
  45. package/modules/lib/textstyle.tsx +1 -3
  46. package/modules/lib/theme.tsx +2 -6
  47. package/modules/lib/timepicker.tsx +3 -3
  48. package/modules/lib/toast.tsx +2 -2
  49. package/modules/lib/updater.tsx +3 -3
  50. package/modules/lib/utils.ts +1 -1
  51. package/modules/lib/version.tsx +7 -7
  52. package/modules/lib/video.tsx +2 -4
  53. package/modules/lib/webview.tsx +1 -2
  54. package/modules/lib/workloop.tsx +3 -3
  55. package/modules/use/connect.ts +2 -3
  56. package/modules/use/curl.ts +2 -2
  57. package/modules/use/deeplink.ts +4 -4
  58. package/modules/user/class.ts +6 -6
  59. package/modules/user/data.ts +1 -1
  60. package/modules/user/hook.tsx +2 -2
  61. package/modules/user/index.tsx +16 -15
  62. package/modules/user/login.tsx +7 -6
  63. package/modules/user/notifbadge.tsx +4 -4
  64. package/modules/user/notification.tsx +9 -7
  65. package/modules/user/notification_item.tsx +6 -4
  66. package/package.json +1 -1
@@ -1,8 +1,7 @@
1
1
  // noPage
2
- import { } from 'esoftplay';
3
- import { LibComponent } from 'esoftplay/cache/lib/component.import';
4
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
5
- import { LibUtils } from 'esoftplay/cache/lib/utils.import';
2
+ import { LibComponent } from 'esoftplay/cache/lib/component/import';
3
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
4
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
6
5
 
7
6
  import React from 'react';
8
7
  import { ScrollView, View } from 'react-native';
@@ -27,7 +26,7 @@ export default class m extends LibComponent<LibTabsProps, LibTabsState> {
27
26
 
28
27
  length = React.Children.toArray(this.props.children).length
29
28
  scrollRef = React.createRef<ScrollView>()
30
- allIds = []
29
+ allIds: any[] = []
31
30
 
32
31
  constructor(props: LibTabsProps) {
33
32
  super(props);
@@ -43,7 +42,7 @@ export default class m extends LibComponent<LibTabsProps, LibTabsState> {
43
42
  arrayOfLimit(page: number, pageOffset: number): any[] {
44
43
  let limitBottom = page - pageOffset
45
44
  let limitTop = page + pageOffset + 1
46
- let arr = []
45
+ let arr: any[] = []
47
46
  for (let i = limitBottom; i < limitTop; i++) {
48
47
  arr.push(i)
49
48
  }
@@ -1,7 +1,5 @@
1
1
  // noPage
2
- import { } from 'esoftplay';
3
- import { LibComponent } from 'esoftplay/cache/lib/component.import';
4
-
2
+ import { LibComponent } from 'esoftplay/cache/lib/component/import';
5
3
  import React from "react";
6
4
  import { StyleSheet, Text } from "react-native";
7
5
 
@@ -1,7 +1,7 @@
1
1
  // noPage
2
2
  import { esp } from 'esoftplay';
3
- import { LibNavigation } from 'esoftplay/cache/lib/navigation.import';
4
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
3
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
4
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
5
5
  import useGlobalState from 'esoftplay/global';
6
6
 
7
7
  import AsyncStorage from '@react-native-async-storage/async-storage';
@@ -14,10 +14,6 @@ const state = useGlobalState({
14
14
  export default class m {
15
15
 
16
16
  static setTheme(themeName: string): void {
17
- esp.dispatch({
18
- type: 'lib_theme_switch',
19
- payload: themeName
20
- })
21
17
  state.set({ theme: themeName })
22
18
  LibNavigation.reset()
23
19
  AsyncStorage.setItem('theme', themeName)
@@ -1,8 +1,8 @@
1
1
  // withHooks
2
2
  // noPage
3
3
  import { useSafeState } from 'esoftplay';
4
- import { LibScrollpicker } from 'esoftplay/cache/lib/scrollpicker.import';
5
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
4
+ import { LibScrollpicker } from 'esoftplay/cache/lib/scrollpicker/import';
5
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
6
6
 
7
7
  import { LinearGradient } from 'expo-linear-gradient';
8
8
  import React, { useEffect, useRef } from 'react';
@@ -49,7 +49,7 @@ export default function m(props: LibTimepickerProps): any {
49
49
 
50
50
  useEffect(() => {
51
51
  if (selectedTime) {
52
- let toTime = null
52
+ let toTime: any = null
53
53
  if (maxTime && selectedTime > maxTime) {
54
54
  toTime = maxTime;
55
55
  } else if (minTime && selectedTime < minTime) {
@@ -1,6 +1,6 @@
1
1
  // withHooks
2
2
  // noPage
3
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
3
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
4
4
  import useGlobalState from 'esoftplay/global';
5
5
  import React, { useEffect } from 'react';
6
6
  import { Text } from 'react-native';
@@ -15,7 +15,7 @@ const initState = {
15
15
  timeout: 3000
16
16
  }
17
17
 
18
- const state = useGlobalState(initState)
18
+ const state = useGlobalState<any>(initState)
19
19
 
20
20
  let _timeout: any = undefined
21
21
 
@@ -1,9 +1,9 @@
1
1
  // withHooks
2
2
  // noPage
3
3
  import { esp } from 'esoftplay';
4
- import { LibIcon } from 'esoftplay/cache/lib/icon.import';
5
- import { LibProgress } from 'esoftplay/cache/lib/progress.import';
6
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
4
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
5
+ import { LibProgress } from 'esoftplay/cache/lib/progress/import';
6
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
7
7
 
8
8
  import Constants from 'expo-constants';
9
9
  import * as Updates from 'expo-updates';
@@ -1,6 +1,6 @@
1
1
  // noPage
2
2
  import { esp } from 'esoftplay';
3
- import { LibToastProperty } from 'esoftplay/cache/lib/toast.import';
3
+ import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
4
4
  import { fastFilter, fastLoop } from 'esoftplay/fast';
5
5
  import useGlobalState from 'esoftplay/global';
6
6
  import moment from "esoftplay/moment";
@@ -1,12 +1,12 @@
1
1
 
2
2
  import { esp } from 'esoftplay';
3
- import { LibComponent } from 'esoftplay/cache/lib/component.import';
4
- import { LibCurl } from 'esoftplay/cache/lib/curl.import';
5
- import { LibDialog } from 'esoftplay/cache/lib/dialog.import';
6
- import { LibIcon } from 'esoftplay/cache/lib/icon.import';
7
- import { LibNavigation } from 'esoftplay/cache/lib/navigation.import';
8
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
9
- import { LibTextstyle } from 'esoftplay/cache/lib/textstyle.import';
3
+ import { LibComponent } from 'esoftplay/cache/lib/component/import';
4
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
5
+ import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
6
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
7
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
8
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
9
+ import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
10
10
 
11
11
  import Constants from 'expo-constants';
12
12
  import React from 'react';
@@ -1,9 +1,7 @@
1
1
  // withHooks
2
2
  // noPage
3
- import { } from 'esoftplay';
4
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
5
- import { LibToastProperty } from 'esoftplay/cache/lib/toast.import';
6
-
3
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
4
+ import { LibToastProperty } from 'esoftplay/cache/lib/toast/import';
7
5
  import React from 'react';
8
6
  import { ActivityIndicator, StyleSheet, View } from 'react-native';
9
7
  import { WebView } from 'react-native-webview';
@@ -1,8 +1,7 @@
1
1
  /* */
2
2
  // noPage
3
3
  import { esp } from 'esoftplay';
4
- import { LibComponent } from 'esoftplay/cache/lib/component.import';
5
-
4
+ import { LibComponent } from 'esoftplay/cache/lib/component/import';
6
5
  import React from "react";
7
6
  import { Animated, Dimensions, Linking, Platform } from "react-native";
8
7
  import { WebView } from 'react-native-webview';
@@ -1,8 +1,8 @@
1
1
  // noPage
2
2
  import { esp } from 'esoftplay';
3
- import { LibComponent } from 'esoftplay/cache/lib/component.import';
4
- import { LibNotification } from 'esoftplay/cache/lib/notification.import';
5
- import { UserClass } from 'esoftplay/cache/user/class.import';
3
+ import { LibComponent } from 'esoftplay/cache/lib/component/import';
4
+ import { LibNotification } from 'esoftplay/cache/lib/notification/import';
5
+ import { UserClass } from 'esoftplay/cache/user/class/import';
6
6
 
7
7
  import React from 'react';
8
8
  import { InteractionManager, View } from 'react-native';
@@ -1,8 +1,7 @@
1
1
  // useLibs
2
2
  // noPage
3
- import { } from 'esoftplay';
4
- import { UseDataProperty } from 'esoftplay/cache/use/data.import';
5
-
3
+ import { } from 'esoftplay';
4
+ import { UseDataProperty } from 'esoftplay/cache/use/data/import';
6
5
  import { useEffect, useState } from 'react';
7
6
  const isEqual = require('react-fast-compare');
8
7
 
@@ -1,8 +1,8 @@
1
1
  // useLibs
2
2
  // noPage
3
3
  import { useSafeState } from 'esoftplay';
4
- import { LibCurl } from 'esoftplay/cache/lib/curl.import';
5
- import { LibProgress } from 'esoftplay/cache/lib/progress.import';
4
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
5
+ import { LibProgress } from 'esoftplay/cache/lib/progress/import';
6
6
 
7
7
 
8
8
  export default function m(initialWithLoading?: boolean, withProgressText?: string): [(uri: string, post: any, onDone: (res: any, msg: string) => void, debug?: 0 | 1) => void, boolean, string] {
@@ -1,10 +1,10 @@
1
1
  // useLibs
2
2
  // noPage
3
3
  import { esp } from 'esoftplay';
4
- import { LibCurl } from 'esoftplay/cache/lib/curl.import';
5
- import { LibNavigation } from 'esoftplay/cache/lib/navigation.import';
6
- import { LibUtils } from 'esoftplay/cache/lib/utils.import';
7
-
4
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
5
+ import { LibNavigation } from 'esoftplay/cache/lib/navigation/import';
6
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
7
+ import _global from 'esoftplay/_global';
8
8
  import { useCallback, useEffect } from 'react';
9
9
  import { Alert, Linking } from 'react-native';
10
10
 
@@ -1,11 +1,11 @@
1
1
  // noPage
2
2
  import AsyncStorage from '@react-native-async-storage/async-storage';
3
3
  import { esp, useGlobalReturn } from 'esoftplay';
4
- import { LibCrypt } from 'esoftplay/cache/lib/crypt.import';
5
- import { LibCurl } from 'esoftplay/cache/lib/curl.import';
6
- import { LibNotification } from 'esoftplay/cache/lib/notification.import';
7
- import { UserClass } from 'esoftplay/cache/user/class.import';
8
- import { UserData } from 'esoftplay/cache/user/data.import';
4
+ import { LibCrypt } from 'esoftplay/cache/lib/crypt/import';
5
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
6
+ import { LibNotification } from 'esoftplay/cache/lib/notification/import';
7
+ import { UserClass } from 'esoftplay/cache/user/class/import';
8
+ import { UserData } from 'esoftplay/cache/user/data/import';
9
9
 
10
10
  import useGlobalState from 'esoftplay/global';
11
11
  import Constants from 'expo-constants';
@@ -13,7 +13,7 @@ import * as Notifications from 'expo-notifications';
13
13
  import { Platform } from 'react-native';
14
14
  import moment from "../../moment";
15
15
 
16
- const state = useGlobalState?.(null, { persistKey: "user" })
16
+ const state = useGlobalState(null, { persistKey: "user" })
17
17
 
18
18
  export default class m {
19
19
  static state(): useGlobalReturn<any> {
@@ -1,6 +1,6 @@
1
1
  // noPage
2
2
  import AsyncStorage from '@react-native-async-storage/async-storage';
3
- import { } from 'esoftplay';
3
+ import _global from 'esoftplay/_global';
4
4
  import { fastFilter } from './../../fast';
5
5
 
6
6
  export default class m {
@@ -1,6 +1,6 @@
1
1
  // noPage
2
- import { } from 'esoftplay';
3
- import { LibComponent } from 'esoftplay/cache/lib/component.import';
2
+
3
+ import { LibComponent } from 'esoftplay/cache/lib/component/import';
4
4
 
5
5
 
6
6
  export interface UserMainProps {
@@ -1,21 +1,22 @@
1
1
  // withHooks
2
2
  // noPage
3
- import { esp, useSafeState, _global } from 'esoftplay';
4
- import { LibDialog } from 'esoftplay/cache/lib/dialog.import';
5
- import { LibImage } from 'esoftplay/cache/lib/image.import';
6
- import { LibNet_status } from 'esoftplay/cache/lib/net_status.import';
7
- import { LibProgress } from 'esoftplay/cache/lib/progress.import';
8
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
9
- import { LibToast } from 'esoftplay/cache/lib/toast.import';
10
- import { LibUpdaterProperty } from 'esoftplay/cache/lib/updater.import';
11
- import { LibVersion } from 'esoftplay/cache/lib/version.import';
12
- import { LibWorkloop } from 'esoftplay/cache/lib/workloop.import';
13
- import { UseDeeplink } from 'esoftplay/cache/use/deeplink.import';
14
- import { UserClass } from 'esoftplay/cache/user/class.import';
15
- import { UserHook } from 'esoftplay/cache/user/hook.import';
16
- import { UserLoading } from 'esoftplay/cache/user/loading.import';
17
- import { UserRoutes } from 'esoftplay/cache/user/routes.import';
3
+ import { esp, useSafeState } from 'esoftplay';
4
+ import { LibDialog } from 'esoftplay/cache/lib/dialog/import';
5
+ import { LibImage } from 'esoftplay/cache/lib/image/import';
6
+ import { LibNet_status } from 'esoftplay/cache/lib/net_status/import';
7
+ import { LibProgress } from 'esoftplay/cache/lib/progress/import';
8
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
9
+ import { LibToast } from 'esoftplay/cache/lib/toast/import';
10
+ import { LibUpdaterProperty } from 'esoftplay/cache/lib/updater/import';
11
+ import { LibVersion } from 'esoftplay/cache/lib/version/import';
12
+ import { LibWorkloop } from 'esoftplay/cache/lib/workloop/import';
13
+ import { UseDeeplink } from 'esoftplay/cache/use/deeplink/import';
14
+ import { UserClass } from 'esoftplay/cache/user/class/import';
15
+ import { UserHook } from 'esoftplay/cache/user/hook/import';
16
+ import { UserLoading } from 'esoftplay/cache/user/loading/import';
17
+ import { UserRoutes } from 'esoftplay/cache/user/routes/import';
18
18
  import Worker from 'esoftplay/libs/worker';
19
+ import _global from 'esoftplay/_global';
19
20
  import * as Font from "expo-font";
20
21
  import React, { useEffect, useLayoutEffect } from 'react';
21
22
  import { Platform, View } from "react-native";
@@ -1,10 +1,11 @@
1
1
 
2
- import { } from 'esoftplay';
3
- import { LibComponent } from 'esoftplay/cache/lib/component.import';
4
- import { LibCrypt } from 'esoftplay/cache/lib/crypt.import';
5
- import { LibCurl } from 'esoftplay/cache/lib/curl.import';
6
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
7
- import { UserClass } from 'esoftplay/cache/user/class.import';
2
+ import { Ionicons } from '@expo/vector-icons';
3
+ import { esp } from 'esoftplay';
4
+ import { LibComponent } from 'esoftplay/cache/lib/component/import';
5
+ import { LibCrypt } from 'esoftplay/cache/lib/crypt/import';
6
+ import { LibCurl } from 'esoftplay/cache/lib/curl/import';
7
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
8
+ import { UserClass } from 'esoftplay/cache/user/class/import';
8
9
 
9
10
  import { StatusBar } from 'expo-status-bar';
10
11
  import React from "react";
@@ -1,8 +1,8 @@
1
1
  // noPage
2
- import { } from 'esoftplay';
3
- import { LibComponent } from 'esoftplay/cache/lib/component.import';
4
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
5
-
2
+ import { } from 'esoftplay';
3
+ import { LibComponent } from 'esoftplay/cache/lib/component/import';
4
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
5
+ import React from 'react';
6
6
  import { Text, TouchableOpacity, View } from "react-native";
7
7
 
8
8
  export interface UserNotifbadgeProps {
@@ -1,13 +1,15 @@
1
1
  //
2
2
  import { useGlobalReturn } from 'esoftplay';
3
- import { LibComponent } from 'esoftplay/cache/lib/component.import';
4
- import { LibIcon } from 'esoftplay/cache/lib/icon.import';
5
- import { LibList } from 'esoftplay/cache/lib/list.import';
6
- import { LibNotification } from 'esoftplay/cache/lib/notification.import';
7
- import { LibStatusbar } from 'esoftplay/cache/lib/statusbar.import';
8
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
9
- import { UserNotification_item } from 'esoftplay/cache/user/notification_item.import';
3
+ import { LibComponent } from 'esoftplay/cache/lib/component/import';
4
+ import { LibIcon } from 'esoftplay/cache/lib/icon/import';
5
+ import { LibList } from 'esoftplay/cache/lib/list/import';
6
+ import { LibNotification } from 'esoftplay/cache/lib/notification/import';
7
+ import { LibStatusbar } from 'esoftplay/cache/lib/statusbar/import';
8
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
9
+ import { UserNotification_item } from 'esoftplay/cache/user/notification_item/import';
10
10
  import useGlobalState from 'esoftplay/global';
11
+ import React from 'react';
12
+
11
13
 
12
14
  import { Pressable, Text, TouchableOpacity, View } from "react-native";
13
15
  //@ts-ignore
@@ -1,8 +1,10 @@
1
- // noPage
2
- import { } from 'esoftplay';
3
- import { LibStyle } from 'esoftplay/cache/lib/style.import';
4
- import { LibUtils } from 'esoftplay/cache/lib/utils.import';
5
1
 
2
+ // withHooks
3
+ // noPage
4
+ import { } from 'esoftplay';
5
+ import { LibStyle } from 'esoftplay/cache/lib/style/import';
6
+ import { LibUtils } from 'esoftplay/cache/lib/utils/import';
7
+ import React from 'react';
6
8
  import { Text, View } from 'react-native';
7
9
 
8
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.120",
3
+ "version": "0.0.121",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",