esoftplay 0.0.119-b → 0.0.119-e

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 (69) hide show
  1. package/bin/router.js +77 -49
  2. package/global.ts +0 -2
  3. package/import_migrator.mjs +44 -0
  4. package/{modules/lib → libs}/worker.tsx +63 -75
  5. package/modules/lib/carrousel.tsx +4 -1
  6. package/modules/lib/carrousel_snap.tsx +3 -1
  7. package/modules/lib/collaps.tsx +2 -1
  8. package/modules/lib/{component.ts → component.tsx} +0 -0
  9. package/modules/lib/crypt.js +3 -1
  10. package/modules/lib/curl.ts +9 -1
  11. package/modules/lib/datepicker.tsx +6 -1
  12. package/modules/lib/dialog.tsx +8 -1
  13. package/modules/lib/direct_image.tsx +3 -1
  14. package/modules/lib/direct_text.tsx +3 -1
  15. package/modules/lib/document.ts +4 -1
  16. package/modules/lib/effect.tsx +3 -1
  17. package/modules/lib/gallery.tsx +5 -1
  18. package/modules/lib/icon.tsx +27 -22
  19. package/modules/lib/image.tsx +7 -1
  20. package/modules/lib/image_crop.tsx +8 -1
  21. package/modules/lib/image_multi.tsx +11 -2
  22. package/modules/lib/image_shadow.tsx +2 -1
  23. package/modules/lib/infinite.tsx +12 -2
  24. package/modules/lib/input.tsx +6 -1
  25. package/modules/lib/input_base.tsx +3 -1
  26. package/modules/lib/lazy.tsx +1 -1
  27. package/modules/lib/list.tsx +6 -2
  28. package/modules/lib/loading.tsx +3 -1
  29. package/modules/lib/locale.ts +2 -1
  30. package/modules/lib/navigation.ts +8 -2
  31. package/modules/lib/net_status.tsx +2 -2
  32. package/modules/lib/notification.ts +9 -1
  33. package/modules/lib/notify.ts +3 -1
  34. package/modules/lib/picture.tsx +5 -2
  35. package/modules/lib/progress.tsx +5 -1
  36. package/modules/lib/roll.tsx +6 -1
  37. package/modules/lib/scroll.tsx +2 -1
  38. package/modules/lib/scrollpicker.tsx +2 -1
  39. package/modules/lib/skeleton.tsx +3 -2
  40. package/modules/lib/slidingup.tsx +5 -1
  41. package/modules/lib/sociallogin.tsx +4 -2
  42. package/modules/lib/tabs.tsx +4 -1
  43. package/modules/lib/textstyle.tsx +2 -1
  44. package/modules/lib/theme.tsx +3 -2
  45. package/modules/lib/timepicker.tsx +3 -1
  46. package/modules/lib/toast.tsx +2 -1
  47. package/modules/lib/updater.tsx +8 -5
  48. package/modules/lib/utils.ts +2 -1
  49. package/modules/lib/version.tsx +9 -1
  50. package/modules/lib/video.tsx +3 -1
  51. package/modules/lib/webview.tsx +2 -1
  52. package/modules/lib/workloop.tsx +4 -1
  53. package/modules/use/connect.ts +2 -1
  54. package/modules/use/curl.ts +3 -1
  55. package/modules/use/deeplink.ts +4 -1
  56. package/modules/use/form.ts +1 -1
  57. package/modules/use/form_persist.ts +1 -2
  58. package/modules/user/class.ts +6 -2
  59. package/modules/user/data.ts +1 -2
  60. package/modules/user/hook.tsx +2 -1
  61. package/modules/user/index.tsx +20 -8
  62. package/modules/user/loading.tsx +1 -1
  63. package/modules/user/login.tsx +8 -5
  64. package/modules/user/notifbadge.tsx +3 -2
  65. package/modules/user/notification.tsx +8 -1
  66. package/modules/user/notification_item.tsx +3 -1
  67. package/modules/user/routes.ts +1 -1
  68. package/package.json +1 -1
  69. package/modules/lib/workview.tsx +0 -33
@@ -1,6 +1,9 @@
1
1
  // noPage
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';
2
6
 
3
- import { esp, LibComponent, LibNotification, UserClass } from 'esoftplay';
4
7
  import React from 'react';
5
8
  import { InteractionManager, View } from 'react-native';
6
9
  import { WebView } from 'react-native-webview';
@@ -1,7 +1,8 @@
1
1
  // useLibs
2
2
  // noPage
3
+ import { } from 'esoftplay';
4
+ import { UseDataProperty } from 'esoftplay/cache/use/data.import';
3
5
 
4
- import { UseDataProperty } from 'esoftplay';
5
6
  import { useEffect, useState } from 'react';
6
7
  const isEqual = require('react-fast-compare');
7
8
 
@@ -1,7 +1,9 @@
1
1
  // useLibs
2
2
  // noPage
3
+ import { useSafeState } from 'esoftplay';
4
+ import { LibCurl } from 'esoftplay/cache/lib/curl.import';
5
+ import { LibProgress } from 'esoftplay/cache/lib/progress.import';
3
6
 
4
- import { LibCurl, LibProgress, useSafeState } from 'esoftplay';
5
7
 
6
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] {
7
9
  const [loading, setLoading] = useSafeState(initialWithLoading)
@@ -1,7 +1,10 @@
1
1
  // useLibs
2
2
  // noPage
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';
3
7
 
4
- import { esp, LibCurl, LibNavigation, LibUtils, _global } from 'esoftplay';
5
8
  import { useCallback, useEffect } from 'react';
6
9
  import { Alert, Linking } from 'react-native';
7
10
 
@@ -1,7 +1,7 @@
1
1
  // useLibs
2
2
  // noPage
3
-
4
3
  import { useSafeState } from 'esoftplay';
4
+
5
5
  import { useLayoutEffect } from 'react';
6
6
  import { fastFilter } from './../../fast';
7
7
 
@@ -1,8 +1,7 @@
1
1
  // useLibs
2
2
  // noPage
3
-
4
- import AsyncStorage from '@react-native-async-storage/async-storage';
5
3
  import { usePersistState } from 'esoftplay';
4
+
6
5
  import { useEffect } from 'react';
7
6
 
8
7
  export default (() => {
@@ -1,7 +1,11 @@
1
1
  // noPage
2
+ import { esp, useGlobalReturn } from 'esoftplay';
3
+ import { LibCrypt } from 'esoftplay/cache/lib/crypt.import';
4
+ import { LibCurl } from 'esoftplay/cache/lib/curl.import';
5
+ import { LibNotification } from 'esoftplay/cache/lib/notification.import';
6
+ import { UserClass } from 'esoftplay/cache/user/class.import';
7
+ import { UserData } from 'esoftplay/cache/user/data.import';
2
8
 
3
- import AsyncStorage from '@react-native-async-storage/async-storage';
4
- import { esp, LibCrypt, LibCurl, LibNotification, useGlobalReturn, UserClass, UserData } from 'esoftplay';
5
9
  import Constants from 'expo-constants';
6
10
  import * as Notifications from 'expo-notifications';
7
11
  import { Platform } from 'react-native';
@@ -1,7 +1,6 @@
1
1
  // noPage
2
+ import { } from 'esoftplay';
2
3
 
3
- import AsyncStorage from '@react-native-async-storage/async-storage';
4
- import { _global } from 'esoftplay';
5
4
  import { fastFilter } from './../../fast';
6
5
 
7
6
  export default class m {
@@ -1,6 +1,7 @@
1
1
  // noPage
2
+ import { } from 'esoftplay';
3
+ import { LibComponent } from 'esoftplay/cache/lib/component.import';
2
4
 
3
- import { LibComponent } from 'esoftplay';
4
5
 
5
6
  export interface UserMainProps {
6
7
 
@@ -1,7 +1,22 @@
1
1
  // withHooks
2
2
  // noPage
3
-
4
- import { esp, LibDialog, LibImage, LibNet_status, LibProgress, LibStyle, LibToast, LibUpdaterProperty, LibVersion, LibWorker, LibWorkloop, LibWorkview, UseDeeplink, UserClass, UserHook, UserLoading, UserRoutes, useSafeState, _global } from 'esoftplay';
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
+
19
+ import Worker from 'esoftplay/libs/worker';
5
20
  import * as Font from "expo-font";
6
21
  import React, { useEffect, useLayoutEffect } from "react";
7
22
  import { Platform, View } from "react-native";
@@ -31,7 +46,7 @@ function setFonts(): Promise<void> {
31
46
 
32
47
 
33
48
  function isWorkerReady(onReady: () => void): void {
34
- if (_global.LibWorkerReady < 1) {
49
+ if (_global.WorkerReady < 1) {
35
50
  setTimeout(() => isWorkerReady(onReady), 10)
36
51
  } else {
37
52
  onReady()
@@ -103,9 +118,7 @@ export default function m(props: UserIndexProps): any {
103
118
 
104
119
  }
105
120
  }
106
-
107
-
108
- LibUpdaterProperty.check((isNew) => { })
121
+ LibUpdaterProperty.check()
109
122
  }, [])
110
123
 
111
124
  useEffect(() => {
@@ -119,8 +132,7 @@ export default function m(props: UserIndexProps): any {
119
132
  return (
120
133
  <GestureHandlerRootView style={{ flex: 1 }}>
121
134
  <View style={{ flex: 1 }}>
122
- <LibWorker />
123
- <LibWorkview />
135
+ <Worker.View />
124
136
  {
125
137
  loading ?
126
138
  <UserLoading />
@@ -1,7 +1,7 @@
1
1
  // withHooks
2
2
  // noPage
3
-
4
3
  import { esp } from 'esoftplay';
4
+
5
5
  import React from 'react';
6
6
  import { ImageBackground } from "react-native";
7
7
 
@@ -1,8 +1,11 @@
1
- import { Ionicons } from "@expo/vector-icons";
2
- import {
3
- esp, LibComponent, LibCrypt,
4
- LibCurl, LibStyle, UserClass
5
- } from "esoftplay";
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';
8
+
6
9
  import { StatusBar } from 'expo-status-bar';
7
10
  import React from "react";
8
11
  import { Image, KeyboardAvoidingView, Pressable, ScrollView, Text, TextInput, TouchableOpacity, View } from "react-native";
@@ -1,7 +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';
2
5
 
3
-
4
- import { LibComponent, LibStyle } from "esoftplay";
5
6
  import { Text, TouchableOpacity, View } from "react-native";
6
7
 
7
8
  export interface UserNotifbadgeProps {
@@ -1,6 +1,13 @@
1
1
  //
2
+ import { useGlobalReturn, useGlobalState } 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';
2
10
 
3
- import { LibComponent, LibIcon, LibList, LibNotification, LibStatusbar, LibStyle, useGlobalReturn, useGlobalState, UserNotification_item } from "esoftplay";
4
11
  import { Pressable, Text, TouchableOpacity, View } from "react-native";
5
12
  //@ts-ignore
6
13
  export interface UserNotificationProps {
@@ -1,6 +1,8 @@
1
1
  // noPage
2
+ import { } from 'esoftplay';
3
+ import { LibStyle } from 'esoftplay/cache/lib/style.import';
4
+ import { LibUtils } from 'esoftplay/cache/lib/utils.import';
2
5
 
3
- import { LibStyle, LibUtils } from 'esoftplay';
4
6
  import { Text, View } from 'react-native';
5
7
 
6
8
 
@@ -1,7 +1,7 @@
1
1
  // noPage
2
-
3
2
  import { useGlobalReturn, useGlobalState } from 'esoftplay';
4
3
 
4
+
5
5
  const state = useGlobalState(undefined)
6
6
 
7
7
  export default class m {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.119-b",
3
+ "version": "0.0.119-e",
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",
@@ -1,33 +0,0 @@
1
- // withHooks
2
- // noPage
3
-
4
- import { esp, LibWorker, _global } from 'esoftplay';
5
- import React from 'react';
6
- import { Platform, View } from 'react-native';
7
- import WebView from 'react-native-webview';
8
-
9
- export interface LibWorkviewArgs {
10
-
11
- }
12
- export interface LibWorkviewProps {
13
-
14
- }
15
- export default function m(props: LibWorkviewProps): any {
16
- if (Platform.OS == 'android')
17
- if (Platform.Version <= 22) {
18
- return null
19
- }
20
- return (
21
- <View style={{ height: 0, width: 0 }} >
22
- <WebView
23
- ref={_global.LibWorkerBase}
24
- style={{ width: 0, height: 0 }}
25
- javaScriptEnabled={true}
26
- injectedJavaScript={`\nwindow.ReactNativeWebView.postMessage("BaseWorkerIsReady")\n` + _global.injectedJavaScripts.join('\n') + '\ntrue;'}
27
- originWhitelist={["*"]}
28
- source={{ uri: esp.config("protocol") + "://" + esp.config("domain") + esp.config("uri") + "dummyPageToBypassCORS" }}
29
- onMessage={LibWorker.onMessage('BaseWorkerIsReady')}
30
- />
31
- </View>
32
- )
33
- }