esoftplay 0.0.269-beta922a8d5 → 0.0.269-beta96052d3

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 CHANGED
@@ -218,7 +218,8 @@ if (fs.existsSync(packjson)) {
218
218
  }
219
219
  }`
220
220
 
221
- writeFileSyncWithLog(easjson, easconfg);
221
+ if (!fs.existsSync(easjson))
222
+ writeFileSyncWithLog(easjson, easconfg);
222
223
 
223
224
 
224
225
  const metroConfig = `// Learn more https://docs.expo.io/guides/customizing-metro
@@ -299,10 +300,12 @@ yarn-error.log
299
300
  const AppJS = `import { LibNotification } from 'esoftplay/cache/lib/notification/import';
300
301
  import { UserIndex } from 'esoftplay/cache/user/index/import';
301
302
  import * as Notifications from 'expo-notifications';
303
+ import { Platform } from 'react-native';
302
304
  import { SafeAreaProvider } from 'react-native-safe-area-context';
303
305
  import { enableFreeze, enableScreens } from 'react-native-screens';
304
306
 
305
- enableFreeze()
307
+ if (Platform.OS == 'android')
308
+ enableFreeze()
306
309
  enableScreens()
307
310
 
308
311
  Notifications.addNotificationResponseReceivedListener(x => LibNotification.onAction(x));
@@ -1,3 +1,4 @@
1
+ //noPage
1
2
  import esp from 'esoftplay/esp';
2
3
 
3
4
  var crypto
@@ -4,7 +4,6 @@
4
4
  import esp from 'esoftplay/esp';
5
5
  import { LibCrypt } from 'esoftplay/cache/lib/crypt/import';
6
6
  import { reportApiError } from "esoftplay/error";
7
- import { File } from 'expo-file-system';
8
7
 
9
8
  //api_logger_import
10
9
 
@@ -31,7 +30,7 @@ export default class m {
31
30
  }
32
31
 
33
32
  constructor(uri?: string, post?: any, onDone?: (res: any, msg: string) => void, onFailed?: (error: any, timeout: boolean) => void, debug?: number) {
34
- this.header = { version: (esp.config()?.publish_id).toString() }
33
+ this.header = { version: esp.config()?.publish_id }
35
34
  // this.maxRetry = 2;
36
35
  this.setUri = this.setUri.bind(this);
37
36
  this.setUrl = this.setUrl.bind(this);
@@ -357,12 +356,11 @@ export default class m {
357
356
  if (post) {
358
357
  if (upload) {
359
358
  let fd = new FormData();
360
- await Promise.all(Object.keys(post).map(async (key) => {
359
+ Object.keys(post).map(function (key) {
361
360
  if (post[key] !== undefined) {
362
- const file = new File(post[key].uri)
363
- fd.append(key, file as any, post[key].name)
361
+ fd.append(key, post[key])
364
362
  }
365
- }));
363
+ });
366
364
  this.post = fd
367
365
  } else {
368
366
  let ps = Object.keys(post).map((key) => {
@@ -385,11 +383,10 @@ export default class m {
385
383
  this.setUrl(esp.config("url"))
386
384
  }
387
385
  await this.setHeader();
388
- if (!upload)
389
- this.header["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8"
386
+ if (upload)
387
+ this.header["Content-Type"] = "multipart/form-data"
390
388
  else
391
- delete this.header["Content-Type"]
392
-
389
+ this.header["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8"
393
390
  let options: any = {
394
391
  method: !this.post ? "GET" : "POST",
395
392
  headers: this.header,
@@ -17,7 +17,7 @@ export interface LibPictureProps {
17
17
  /** Klik [disini](https://github.com/dev-esoftplay/mobile-docs/blob/main/modules/lib/picture.md) untuk melihat dokumentasi*/
18
18
  export default function m(props: LibPictureProps): any {
19
19
 
20
- let resizeMode
20
+ let resizeMode: any
21
21
  if (props?.style?.resizeMode == 'cover')
22
22
  resizeMode = "cover"
23
23
  else if (props?.style?.resizeMode == 'contain')
@@ -35,6 +35,8 @@ export default function m(props: LibPictureProps): any {
35
35
  }
36
36
 
37
37
  return (
38
- <Image {...props} source={source} contentFit={resizeMode} allowDownscaling cachePolicy={"memory-disk"} />
38
+ <Image {...props}
39
+ recyclingKey={props.source.uri}
40
+ source={source} contentFit={resizeMode} allowDownscaling cachePolicy={"memory-disk"} />
39
41
  )
40
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.269-beta922a8d5",
3
+ "version": "0.0.269-beta96052d3",
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",