esoftplay 0.0.106 → 0.0.107
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/_cache.ts +2 -2
- package/bin/build.js +24 -14
- package/bin/cli.js +24 -2
- package/bin/router.js +29 -22
- package/config.js +1 -0
- package/error.ts +24 -17
- package/esp.ts +4 -5
- package/global.ts +2 -2
- package/modules/content/audio.tsx +3 -2
- package/modules/content/bookmark.tsx +2 -2
- package/modules/content/category.tsx +1 -1
- package/modules/content/category_list.tsx +2 -2
- package/modules/content/comment.tsx +7 -7
- package/modules/content/comment_item.tsx +6 -5
- package/modules/content/config.tsx +2 -1
- package/modules/content/detail.tsx +12 -12
- package/modules/content/gallery.tsx +1 -1
- package/modules/content/header.tsx +4 -3
- package/modules/content/index.tsx +2 -2
- package/modules/content/item.tsx +5 -4
- package/modules/content/item_header.tsx +6 -5
- package/modules/content/list.tsx +1 -2
- package/modules/content/video.tsx +3 -2
- package/modules/lib/autoreload.ts +2 -1
- package/modules/lib/carrousel.tsx +4 -2
- package/modules/lib/carrousel_snap.tsx +4 -3
- package/modules/lib/collaps.tsx +4 -5
- package/modules/lib/component.ts +2 -0
- package/modules/lib/crypt.js +1 -0
- package/modules/lib/curl.ts +4 -5
- package/modules/lib/datepicker.tsx +4 -3
- package/modules/lib/dialog.tsx +4 -2
- package/modules/lib/direct_image.tsx +3 -1
- package/modules/lib/direct_text.tsx +3 -1
- package/modules/lib/document.ts +3 -2
- package/modules/lib/effect.tsx +3 -2
- package/modules/lib/focus.tsx +2 -1
- package/modules/lib/icon.tsx +15 -19
- package/modules/lib/image.tsx +8 -10
- package/modules/lib/image_crop.tsx +3 -3
- package/modules/lib/image_multi.tsx +3 -3
- package/modules/lib/infinite.tsx +5 -3
- package/modules/lib/input.tsx +3 -3
- package/modules/lib/input_base.tsx +3 -2
- package/modules/lib/input_base_data.ts +1 -0
- package/modules/lib/keyboard_avoid.tsx +2 -1
- package/modules/lib/lazy.tsx +3 -2
- package/modules/lib/list.tsx +5 -3
- package/modules/lib/loading.tsx +4 -2
- package/modules/lib/locale.ts +3 -2
- package/modules/lib/menu.tsx +4 -3
- package/modules/lib/menusub.tsx +4 -3
- package/modules/lib/navigation.ts +3 -3
- package/modules/lib/net_status.tsx +4 -2
- package/modules/lib/notification.ts +5 -4
- package/modules/lib/object.ts +2 -0
- package/modules/lib/picture.tsx +1 -0
- package/modules/lib/pin.tsx +5 -4
- package/modules/lib/progress.tsx +4 -2
- package/modules/lib/roll.tsx +3 -1
- package/modules/lib/scroll.tsx +3 -3
- package/modules/lib/skeleton.tsx +6 -5
- package/modules/lib/slidingup.tsx +3 -2
- package/modules/lib/sociallogin.tsx +6 -5
- package/modules/lib/statusbar.tsx +2 -1
- package/modules/lib/style.ts +24 -6
- package/modules/lib/tabs.tsx +4 -2
- package/modules/lib/textstyle.tsx +4 -3
- package/modules/lib/theme.tsx +3 -2
- package/modules/lib/toast.tsx +4 -2
- package/modules/lib/updater.tsx +4 -3
- package/modules/lib/utils.ts +7 -5
- package/modules/lib/version.tsx +4 -3
- package/modules/lib/webview.tsx +4 -3
- package/modules/lib/worker.tsx +4 -3
- package/modules/lib/workloop.tsx +4 -2
- package/modules/lib/workview.tsx +1 -0
- package/modules/use/connect.ts +3 -2
- package/modules/use/curl.ts +2 -1
- package/modules/use/data.ts +1 -0
- package/modules/use/deeplink.ts +4 -3
- package/modules/use/form.ts +2 -1
- package/modules/use/form_persist.ts +3 -2
- package/modules/user/class.ts +6 -7
- package/modules/user/data.ts +4 -2
- package/modules/user/index.tsx +7 -10
- package/modules/user/loading.tsx +2 -1
- package/modules/user/login.tsx +6 -13
- package/modules/user/main.tsx +2 -1
- package/modules/user/notifbadge.tsx +4 -4
- package/modules/user/notification.tsx +7 -19
- package/modules/user/notification_item.tsx +4 -4
- package/modules/user/routes.ts +2 -1
- package/package.json +2 -1
- package/persist.ts +1 -1
- package/state.ts +1 -1
- package/assets/Roboto.ttf +0 -0
- package/assets/Roboto_medium.ttf +0 -0
- package/assets/digital.ttf +0 -0
package/_cache.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as R from 'react'
|
|
2
1
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
2
|
+
import * as R from 'react';
|
|
3
|
+
import { fastFilter, fastLoop } from './fast';
|
|
3
4
|
const isEqual = require('react-fast-compare');
|
|
4
|
-
import { fastFilter, fastLoop } from './fast'
|
|
5
5
|
|
|
6
6
|
export interface UseCache_return<T> {
|
|
7
7
|
useCache: () => [T, (newCache: T | ((oldCache: T) => T)) => void, () => void],
|
package/bin/build.js
CHANGED
|
@@ -98,27 +98,28 @@ if (fs.existsSync(packjson)) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
if (rewrite) {
|
|
101
|
-
fs.readFile(packjson, 'utf8', function (err, data) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
// fs.readFile(packjson, 'utf8', function (err, data) {
|
|
102
|
+
// if (err) {
|
|
103
|
+
// return console.log(err);
|
|
104
|
+
// }
|
|
105
|
+
// let result = data.replace(stringExist, stringToBe);
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
});
|
|
107
|
+
// fs.writeFile(packjson, result, 'utf8', function (err) {
|
|
108
|
+
// if (err) return console.log(err);
|
|
109
|
+
// });
|
|
110
|
+
// });
|
|
111
111
|
// console.log("Please change scripts.start in package.json into '" + $package.scripts.start + "'")
|
|
112
112
|
// spawn('node', ['./packager.js', args[0], packjson], { stdio: 'inherit' })
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
fs.writeFile(packjson, JSON.stringify($package, null, 2), (err) => {
|
|
114
|
+
if (err) throw err;
|
|
115
|
+
console.log('package.json has been updated');
|
|
116
|
+
});
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
/* Create esp command line */
|
|
121
121
|
if (args[0] == "install") {
|
|
122
|
+
execSync('esp start', { stdio: ['inherit', 'inherit', 'inherit'] })
|
|
122
123
|
spawn('esp', ['start'], { stdio: 'inherit' })
|
|
123
124
|
.on('exit', function (code) {
|
|
124
125
|
console.log(code);
|
|
@@ -296,6 +297,7 @@ export default function App() {
|
|
|
296
297
|
'@react-native-async-storage/async-storage',
|
|
297
298
|
'@react-native-masked-view/masked-view',
|
|
298
299
|
'@react-native-community/netinfo',
|
|
300
|
+
'@react-navigation/native-stack',
|
|
299
301
|
'@react-navigation/native',
|
|
300
302
|
'@react-navigation/stack',
|
|
301
303
|
'buffer',
|
|
@@ -328,6 +330,12 @@ export default function App() {
|
|
|
328
330
|
'react-native-webview',
|
|
329
331
|
'shorthash'
|
|
330
332
|
]
|
|
333
|
+
if ($config.config.hasOwnProperty('excludePackages')) {
|
|
334
|
+
if ($config.config.excludePackages) {
|
|
335
|
+
const excludePackages = $config.config.excludePackages
|
|
336
|
+
expoLib = expoLib.filter((item) => !excludePackages.includes(item))
|
|
337
|
+
}
|
|
338
|
+
}
|
|
331
339
|
let devLibs = [
|
|
332
340
|
"@babel/core",
|
|
333
341
|
"@types/react",
|
|
@@ -360,9 +368,10 @@ export default function App() {
|
|
|
360
368
|
fs.mkdirSync(DIR + 'modules')
|
|
361
369
|
let cmd = "cd ../../ "
|
|
362
370
|
if (installDevLibs.length > 0)
|
|
363
|
-
cmd += "&&
|
|
371
|
+
cmd += "&& yarn add " + installDevLibs.join(" ") + " --dev "
|
|
364
372
|
if (installExpoLibs.length > 0)
|
|
365
373
|
cmd += "&& expo install " + installExpoLibs.join(" ")
|
|
374
|
+
cmd += "&& esp start"
|
|
366
375
|
execSync(cmd, { stdio: ['inherit', 'inherit', 'inherit'] })
|
|
367
376
|
console.log('App.js has been replace to App.tsx');
|
|
368
377
|
if (fs.existsSync('../@expo/vector-icons')) {
|
|
@@ -383,6 +392,7 @@ export default function App() {
|
|
|
383
392
|
}
|
|
384
393
|
console.log('Please wait until processes has finished...');
|
|
385
394
|
});
|
|
395
|
+
// execSync('esp start', { stdio: ['inherit', 'inherit', 'inherit'] })
|
|
386
396
|
}
|
|
387
397
|
} else {
|
|
388
398
|
console.log(packjson + " not found!!")
|
package/bin/cli.js
CHANGED
|
@@ -91,6 +91,7 @@ switch (args[0]) {
|
|
|
91
91
|
createMaster(args[1])
|
|
92
92
|
break;
|
|
93
93
|
case "start":
|
|
94
|
+
excludeModules()
|
|
94
95
|
execution();
|
|
95
96
|
break;
|
|
96
97
|
case "bcl":
|
|
@@ -106,6 +107,27 @@ switch (args[0]) {
|
|
|
106
107
|
break;
|
|
107
108
|
}
|
|
108
109
|
|
|
110
|
+
function excludeModules() {
|
|
111
|
+
let cjson = readToJSON(confjson)
|
|
112
|
+
if (cjson.config.hasOwnProperty('excludeModules')) {
|
|
113
|
+
if (cjson.config.excludeModules) {
|
|
114
|
+
const allmodules = cjson.config.excludeModules
|
|
115
|
+
if (allmodules.length > 0) {
|
|
116
|
+
consoleSucces('\nSuccess to exclude this modules:')
|
|
117
|
+
allmodules.forEach((mod) => {
|
|
118
|
+
const fileTsxPath = DIR + 'node_modules/esoftplay/modules/' + mod + '.tsx'
|
|
119
|
+
const fileTsPath = DIR + 'node_modules/esoftplay/modules/' + mod + '.ts'
|
|
120
|
+
const fileJsPath = DIR + 'node_modules/esoftplay/modules/' + mod + '.js'
|
|
121
|
+
if (fs.existsSync(fileTsxPath)) fs.unlinkSync(fileTsxPath)
|
|
122
|
+
if (fs.existsSync(fileTsPath)) fs.unlinkSync(fileTsPath)
|
|
123
|
+
if (fs.existsSync(fileJsPath)) fs.unlinkSync(fileJsPath)
|
|
124
|
+
consoleSucces('- ' + mod)
|
|
125
|
+
})
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
109
131
|
function consoleFunc(msg, success) {
|
|
110
132
|
if (success) {
|
|
111
133
|
consoleSucces(msg)
|
|
@@ -132,7 +154,7 @@ function configUpdate(state) {
|
|
|
132
154
|
}
|
|
133
155
|
|
|
134
156
|
function update() {
|
|
135
|
-
command("
|
|
157
|
+
command("yarn upgrade esoftplay --latest")
|
|
136
158
|
if (fs.existsSync(packjson)) {
|
|
137
159
|
let pack = readToJSON(packjson)
|
|
138
160
|
let esplibs = Object.keys(pack.dependencies).filter((key) => key.includes("esoftplay"))
|
|
@@ -140,7 +162,7 @@ function update() {
|
|
|
140
162
|
esplibs.forEach((key) => {
|
|
141
163
|
if (key != 'esoftplay') {
|
|
142
164
|
if (args[1] == 'all')
|
|
143
|
-
command('
|
|
165
|
+
command('yarn upgrade ' + key + ' --latest')
|
|
144
166
|
command("cd node_modules/" + key + " && node mover.js")
|
|
145
167
|
consoleSucces(key + " succesfully implemented!")
|
|
146
168
|
}
|
package/bin/router.js
CHANGED
|
@@ -8,7 +8,6 @@ var typesDir = "./"
|
|
|
8
8
|
var replacer = new RegExp(/(?:\-|\.(?:ios|android))?\.(?:jsx|js|ts|tsx)$/);
|
|
9
9
|
var Text = "";
|
|
10
10
|
const rngh = "./node_modules/react-native-gesture-handler/react-native-gesture-handler.d.ts"
|
|
11
|
-
// const isEqual = require('react-fast-compare');
|
|
12
11
|
|
|
13
12
|
const curPackjson = require('../package.json')
|
|
14
13
|
const mainPackjson = require('../../../package.json')
|
|
@@ -39,6 +38,7 @@ var UseLibs = []
|
|
|
39
38
|
var SuffixHooksProperty = ('Property').trim()
|
|
40
39
|
var Persistor = {};
|
|
41
40
|
var Extender = {};
|
|
41
|
+
var NavsExclude = {};
|
|
42
42
|
var grabClass = null;
|
|
43
43
|
var delReducer = true;
|
|
44
44
|
var countLoop = 0; // jumlah file yang telah dihitung
|
|
@@ -50,8 +50,9 @@ var Nav5 = (importer, navs) => {
|
|
|
50
50
|
// @ts-nocheck
|
|
51
51
|
import React from 'react';
|
|
52
52
|
import { NavigationContainer } from '@react-navigation/native';
|
|
53
|
-
import { createNativeStackNavigator } from 'react-
|
|
53
|
+
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
|
54
54
|
\nimport { `+ importer + `, esp, _global } from "esoftplay";\n
|
|
55
|
+
\nimport { LibNavigation } from "esoftplay";\n
|
|
55
56
|
const Stack = createNativeStackNavigator();
|
|
56
57
|
|
|
57
58
|
export default function m(props): any{
|
|
@@ -111,7 +112,11 @@ checks.forEach(modules => {
|
|
|
111
112
|
var isHooks = false
|
|
112
113
|
var isUseLibs = false
|
|
113
114
|
/* REGEX HOOKS */
|
|
114
|
-
|
|
115
|
+
if (n = (/\n?(?:(?:\/\/\s{0,})|(?:\/\*\s{0,}))noPage/).exec(data)) {
|
|
116
|
+
NavsExclude[module + '/' + file.slice(0, file.lastIndexOf('.'))] = true
|
|
117
|
+
} else {
|
|
118
|
+
NavsExclude[module + '/' + file.slice(0, file.lastIndexOf('.'))] = false
|
|
119
|
+
}
|
|
115
120
|
if (isIndexed) {
|
|
116
121
|
if (n = (/\n?(?:(?:\/\/\s{0,})|(?:\/\*\s{0,}))useLibs/).exec(data)) {
|
|
117
122
|
isUseLibs = true
|
|
@@ -572,7 +577,9 @@ function createRouter() {
|
|
|
572
577
|
for (const module in Modules) {
|
|
573
578
|
for (const task in Modules[module]) {
|
|
574
579
|
nav = module + '/' + task;
|
|
575
|
-
|
|
580
|
+
if (NavsExclude[nav] == false) {
|
|
581
|
+
Navigations.push(nav);
|
|
582
|
+
}
|
|
576
583
|
Task += "\t\t" + 'case "' + nav + '":' + "\n\t\t\t" + 'Out = require("../../.' + Modules[module][task] + '").default' + "\n\t\t\t" + 'break;' + "\n";
|
|
577
584
|
/* ADD ROUTER EACH FILE FOR STATIC IMPORT */
|
|
578
585
|
var item = "import { default as _" + ucword(module) + ucword(task) + " } from '../../." + Modules[module][task] + "';\n"
|
|
@@ -632,28 +639,28 @@ function createRouter() {
|
|
|
632
639
|
return console.log(err);
|
|
633
640
|
}
|
|
634
641
|
});
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
})
|
|
650
|
-
|
|
651
|
-
let N = Nav5(importer.join(", "), screens.join("\n"))
|
|
642
|
+
}
|
|
643
|
+
/* CREATE NAVIGATION LIST */
|
|
644
|
+
Text = "export default [\"" + Navigations.join('", "') + "\"]";
|
|
645
|
+
fs.writeFile(tmpDir + "navigations.js", Text, { flag: 'w' }, function (err) {
|
|
646
|
+
if (err) {
|
|
647
|
+
return console.log(err);
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
let importer = []
|
|
651
|
+
let screens = []
|
|
652
|
+
Navigations.forEach((nav) => {
|
|
653
|
+
const [module, task] = nav.split('/')
|
|
654
|
+
const comp = ucword(module) + ucword(task)
|
|
655
|
+
importer.push(comp)
|
|
656
|
+
screens.push("\t\t\t\t<Stack.Screen name={\"" + nav + "\"} component={" + comp + "} />")
|
|
657
|
+
})
|
|
652
658
|
|
|
659
|
+
let N = Nav5(importer.join(", "), screens.join("\n"))
|
|
660
|
+
if (isChange(tmpDir + 'navs.tsx', N))
|
|
653
661
|
fs.writeFile(tmpDir + "navs.tsx", N, { flag: 'w' }, function (err) {
|
|
654
662
|
if (err) {
|
|
655
663
|
return console.log(err);
|
|
656
664
|
}
|
|
657
665
|
});
|
|
658
|
-
}
|
|
659
666
|
}
|
package/config.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"isDebug": 1, // optional: display console on esp.log('any message'), don't use it for automatic detect the environment (production / development)
|
|
20
20
|
"salt": "CHANGE_INTO_YOUR_OWN_SALT", // SALT form config.php in your website
|
|
21
21
|
"notification": 1, // optional: to determine is this application have notification or not
|
|
22
|
+
"exludeModules":[], // optional: to delete module when listed
|
|
22
23
|
"firebase": { // https://console.firebase.google.com - download google-services.json
|
|
23
24
|
"apiKey": "FIREBASE_Web_API_Key", // Eg. AIzaSyAvVyNeXI3RTo7Tl5LCBSZ-mu92VpbPBK8Y
|
|
24
25
|
"authDomain": "FIREBASE_authDomain", // Eg. project-6495177974885932998.firebaseapp.com
|
package/error.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Platform } from 'react-native';
|
|
1
|
+
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
3
2
|
import { LibCurl, UserClass } from 'esoftplay';
|
|
4
|
-
import { default as UserRoutes } from './modules/user/routes'
|
|
5
3
|
import Constants from 'expo-constants';
|
|
6
|
-
import
|
|
4
|
+
import { Platform } from 'react-native';
|
|
7
5
|
import esp from './esp';
|
|
6
|
+
import { default as UserRoutes } from './modules/user/routes';
|
|
8
7
|
let pack = require('../../package.json');
|
|
9
8
|
let app = require('../../app.json');
|
|
10
9
|
const { manifest } = Constants;
|
|
@@ -31,21 +30,29 @@ export function setError(error?: any) {
|
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
export function reportApiError(fetch: any, error: any) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// }
|
|
33
|
+
|
|
34
|
+
const user = UserClass.state().get()
|
|
37
35
|
let config = esp.config()
|
|
36
|
+
let msg = [
|
|
37
|
+
'slug: ' + "#" + app.expo.slug,
|
|
38
|
+
'dev: ' + Platform.OS + ' - ' + Constants.deviceName,
|
|
39
|
+
'app/pub_id: ' + Constants.appOwnership + '/' + (config?.publish_id || '-'),
|
|
40
|
+
'user_id: ' + user?.id || user?.user_id || '-',
|
|
41
|
+
'username: ' + user?.username || '-',
|
|
42
|
+
'fetch: ' + String(JSON.stringify(fetch || {}, undefined, 2)).replace(/[\[\]\{\}\"]+/g, ''),
|
|
43
|
+
'error: ' + error
|
|
44
|
+
].join('\n')
|
|
45
|
+
|
|
46
|
+
if (manifest?.packagerOpts) {
|
|
47
|
+
let post = {
|
|
48
|
+
text: msg,
|
|
49
|
+
chat_id: '-626800023',
|
|
50
|
+
disable_web_page_preview: true
|
|
51
|
+
}
|
|
52
|
+
new LibCurl().custom('https://api.telegram.org/bot923808407:AAEFBlllQNKCEn8E66fwEzCj5vs9qGwVGT4/sendMessage', post)
|
|
53
|
+
return
|
|
54
|
+
}
|
|
38
55
|
config?.errorReport?.telegramIds?.forEach?.((id: string) => {
|
|
39
|
-
const user = UserClass.state().get()
|
|
40
|
-
const msg = [
|
|
41
|
-
'slug: ' + "#" + app.expo.slug,
|
|
42
|
-
'dev: ' + Platform.OS + ' - ' + Constants.deviceName,
|
|
43
|
-
'app/pub_id: ' + Constants.appOwnership + '/' + (config?.publish_id || '-'),
|
|
44
|
-
'user_id: ' + user?.id || user?.user_id || '-',
|
|
45
|
-
'username: ' + user?.username || '-',
|
|
46
|
-
'fetch: ' + String(JSON.stringify(fetch || {}, undefined, 2)).replace(/[\[\]\{\}\"]+/g, ''),
|
|
47
|
-
'error: ' + error
|
|
48
|
-
].join('\n')
|
|
49
56
|
let post = {
|
|
50
57
|
text: msg,
|
|
51
58
|
chat_id: id,
|
package/esp.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
+
import { esp, LibLocale, UserRoutes } from 'esoftplay';
|
|
2
|
+
import Constants from 'expo-constants';
|
|
3
|
+
import { LogBox, Platform } from 'react-native';
|
|
1
4
|
import _assets from './cache/assets';
|
|
2
5
|
import navs from './cache/navigations';
|
|
3
6
|
import routers from './cache/routers';
|
|
4
|
-
import
|
|
5
|
-
import { _global, esp, LibLocale, UserRoutes } from 'esoftplay';
|
|
6
|
-
import { LogBox } from 'react-native';
|
|
7
|
-
import Constants from 'expo-constants';
|
|
7
|
+
import './oneplusfixfont';
|
|
8
8
|
LogBox.ignoreLogs(['YellowBox has been replaced with LogBox. Please call LogBox.ignoreLogs() instead.']);
|
|
9
9
|
LogBox.ignoreLogs(['VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList-backed container instead.']);
|
|
10
10
|
let app = require('../../app.json');
|
|
11
11
|
let conf = require('../../config.json');
|
|
12
12
|
let lconf = require('../../config.live.json');
|
|
13
|
-
import './oneplusfixfont'
|
|
14
13
|
|
|
15
14
|
export default (() => {
|
|
16
15
|
function mergeDeep(target: any, source: any): any {
|
package/global.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as R from 'react'
|
|
2
1
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
2
|
+
import * as R from 'react';
|
|
3
|
+
import { fastFilter, fastLoop } from './fast';
|
|
3
4
|
const _global = require('./_global')
|
|
4
5
|
const isEqual = require('react-fast-compare');
|
|
5
|
-
import { fastFilter, fastLoop } from './fast'
|
|
6
6
|
|
|
7
7
|
export interface useGlobalReturn<T> {
|
|
8
8
|
useState: () => [T, (newState: T) => void, () => void],
|
|
@@ -70,8 +70,8 @@ export default function m(props: ContentBookmarkProps): any {
|
|
|
70
70
|
ListEmptyComponent={
|
|
71
71
|
<View style={{ height: LibStyle.height - 100, justifyContent: 'center', alignItems: 'center', marginHorizontal: 24 }} >
|
|
72
72
|
<LibIcon name='bookmark-plus-outline' color={"#FD5593"} size={40} />
|
|
73
|
-
<Text style={{
|
|
74
|
-
<Text style={{
|
|
73
|
+
<Text style={{ fontSize: 34, marginTop: 10, fontWeight: "500", lineHeight: 40, textAlign: "center", color: "#060606" }} >Artikel belum ada</Text>
|
|
74
|
+
<Text style={{ fontSize: 16, marginTop: 10, lineHeight: 22, textAlign: "center", color: "#686868" }} >Kamu dapat menyimpan artikel untuk dibaca nanti dengan cara klik lambang bookmark</Text>
|
|
75
75
|
</View>
|
|
76
76
|
}
|
|
77
77
|
renderItem={(item) => <ContentItem {...item} />}
|
|
@@ -49,7 +49,7 @@ export default function m(props: ContentCategoryProps): any {
|
|
|
49
49
|
onPress={() => { LibNavigation.push('content/list', { url: item.url, title: item.title, id: item.id }) }}
|
|
50
50
|
style={{ borderRadius: 8, backgroundColor: "#f2f2f2", flex: 0.35, margin: 5, alignItems: 'center' }} >
|
|
51
51
|
<LibPicture source={{ uri: item.image }} style={{ height: 70, width: 70, marginTop: 16, }} />
|
|
52
|
-
<Text style={{
|
|
52
|
+
<Text style={{ fontSize: 12, fontWeight: "500", lineHeight: 20, color: "#060606", marginBottom: 12, }}>{item?.title}</Text>
|
|
53
53
|
</Pressable>
|
|
54
54
|
)
|
|
55
55
|
}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// withHooks
|
|
2
|
-
|
|
2
|
+
// noPage
|
|
3
3
|
import { ContentCategoryProperty, esp, LibCurl, LibNavigation, LibPicture, LibUtils } from 'esoftplay';
|
|
4
4
|
import React, { useEffect, useRef } from 'react';
|
|
5
5
|
import { Pressable, ScrollView, Text, View } from 'react-native';
|
|
@@ -42,7 +42,7 @@ export default function m(props: ContentCategory_listProps): any {
|
|
|
42
42
|
onPress={() => { LibNavigation.push('content/list', { url: row.url, title: row.title, id: row.id }) }}
|
|
43
43
|
style={{ borderRadius: 8, flexDirection: 'row', borderWidth: 1, borderColor: "#f2f2f2", margin: 5, padding: 8, alignItems: 'center' }} >
|
|
44
44
|
<LibPicture source={{ uri: row.image }} style={{ width: 20, height: 20, resizeMode: 'contain' }} />
|
|
45
|
-
<Text style={{
|
|
45
|
+
<Text style={{ marginLeft: 8 }} >{row.title}</Text>
|
|
46
46
|
</Pressable>
|
|
47
47
|
))
|
|
48
48
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
|
|
3
|
-
import React, { useEffect, useRef } from 'react';
|
|
4
|
-
import esp from 'esoftplay/esp';
|
|
5
3
|
import { ContentComment_item, ContentHeader, LibCurl, LibIcon, LibInfinite, LibInput, LibKeyboard_avoid, LibObject, LibSociallogin, LibStyle, LibToastProperty, LibUtils, useGlobalReturn, useGlobalState, useSafeState } from 'esoftplay';
|
|
4
|
+
import esp from 'esoftplay/esp';
|
|
5
|
+
import React, { useEffect, useRef } from 'react';
|
|
6
6
|
import { Alert, Image, Pressable, Text, View } from 'react-native';
|
|
7
7
|
|
|
8
8
|
|
|
@@ -98,7 +98,7 @@ export default function m(props: ContentCommentProps): any {
|
|
|
98
98
|
<View style={{ flex: 1, backgroundColor: "white" }} >
|
|
99
99
|
<ContentHeader title="Login dengan akun" />
|
|
100
100
|
<View style={{ flexDirection: "row", alignItems: "center", justifyContent: "center", paddingRight: 16 }} >
|
|
101
|
-
<Text style={{ flex: 1, padding: 10,
|
|
101
|
+
<Text style={{ flex: 1, padding: 10, color: '#606060' }} >{"Silakan login dengan salah satu akun sosial media berikut untuk dapat mengirimkan komentar"}</Text>
|
|
102
102
|
<View style={{ justifyContent: "center" }} >
|
|
103
103
|
<Pressable
|
|
104
104
|
onPress={() => { setShowLoginForm(false) }} >
|
|
@@ -130,13 +130,13 @@ export default function m(props: ContentCommentProps): any {
|
|
|
130
130
|
<Image source={{ uri: headerComment.image }} style={{ height: 50, backgroundColor: '#f8f8f8', width: 50, resizeMode: 'cover', overflow: 'hidden', borderRadius: 25 }} />
|
|
131
131
|
</View>
|
|
132
132
|
<View style={{ flex: 1, paddingVertical: 16, marginHorizontal: 16 }} >
|
|
133
|
-
<Text style={{
|
|
134
|
-
<Text style={{
|
|
135
|
-
<Text style={{
|
|
133
|
+
<Text style={{ fontSize: 10, fontWeight: "500", letterSpacing: 1.5, color: "#686868" }} >{LibUtils.moment(headerComment.date).format('DD MMM YYYY HH:mm').toUpperCase()}</Text>
|
|
134
|
+
<Text style={{ fontSize: 16, fontWeight: "500", lineHeight: 20, color: "#060606", marginTop: 8 }} >{headerComment.name}</Text>
|
|
135
|
+
<Text style={{ fontSize: 14, fontWeight: "500", lineHeight: 20, color: "#606060" }} >{headerComment.content}</Text>
|
|
136
136
|
<Pressable style={{ flexDirection: 'row' }} >
|
|
137
137
|
<View style={{ flexDirection: 'row', alignItems: 'center', marginTop: 9, /* backgroundColor: '#f1f1f1', padding: 3, borderRadius: 6 */ }} >
|
|
138
138
|
<LibIcon.AntDesign name='message1' size={12} color="#ababab" />
|
|
139
|
-
<Text style={{
|
|
139
|
+
<Text style={{ fontSize: 12, lineHeight: 16, color: "#ababab", marginLeft: 5 }} >{headerComment.reply} Balasan</Text>
|
|
140
140
|
</View>
|
|
141
141
|
</Pressable>
|
|
142
142
|
</View>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// withHooks
|
|
2
|
+
// noPage
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import { LibIcon, LibNavigation, LibUtils } from 'esoftplay';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { Image, Pressable, Text, View } from 'react-native';
|
|
6
7
|
|
|
@@ -51,9 +52,9 @@ export default function m(props: ContentComment_itemProps): any {
|
|
|
51
52
|
const styleId_14E1yO: any = { marginTop: 18, marginLeft: 16 }
|
|
52
53
|
const styleId_2e0Fad: any = { height: 50, width: 50, backgroundColor: '#f8f8f8', resizeMode: 'cover', overflow: 'hidden', borderRadius: 25 }
|
|
53
54
|
const styleId_ZLhjsk: any = { flex: 1, paddingVertical: 16, marginHorizontal: 16, borderBottomWidth: 1, borderBottomColor: '#f9f9f9' }
|
|
54
|
-
const styleId_ZCtIoL: any = {
|
|
55
|
-
const styleId_ZmiARo: any = {
|
|
56
|
-
const styleId_1jN6UB: any = {
|
|
55
|
+
const styleId_ZCtIoL: any = { fontSize: 10, fontWeight: "500", letterSpacing: 1.5, color: "#686868" }
|
|
56
|
+
const styleId_ZmiARo: any = { fontSize: 16, fontWeight: "500", lineHeight: 20, color: "#060606", marginTop: 8 }
|
|
57
|
+
const styleId_1jN6UB: any = { fontSize: 14, fontWeight: "500", lineHeight: 20, color: "#606060" }
|
|
57
58
|
const styleId_Z1IS0fI: any = { flexDirection: 'row' }
|
|
58
59
|
const styleId_Z2nP5oE: any = { flexDirection: 'row', alignItems: 'center', marginTop: 9, backgroundColor: '#f1f1f1', padding: 3, borderRadius: 6 }
|
|
59
|
-
const styleId_Z1pDQI5: any = {
|
|
60
|
+
const styleId_Z1pDQI5: any = { fontSize: 12, lineHeight: 16, color: "#ababab", marginLeft: 5 }
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
|
|
3
|
+
import { applyStyle, ContentAudio, ContentConfig, ContentItem, ContentVideo, LibCurl, LibIcon, LibNavigation, LibObject, LibScroll, LibStyle, LibUtils, LibWebview, useSafeState } from 'esoftplay';
|
|
4
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
3
5
|
import React, { useEffect, useRef } from 'react';
|
|
4
|
-
import { applyStyle, ContentAudio, ContentItem, ContentVideo, LibObject, ContentConfig, LibCurl, LibIcon, LibNavigation, LibScroll, LibStyle, LibUtils, LibWebview, useSafeState } from 'esoftplay';
|
|
5
6
|
import { ImageBackground, Linking, Pressable, Text, View } from 'react-native';
|
|
6
|
-
import { LinearGradient } from 'expo-linear-gradient'
|
|
7
7
|
|
|
8
8
|
export interface ContentDetailArgs {
|
|
9
9
|
|
|
@@ -60,17 +60,17 @@ export default function m(props: ContentDetailProps): any {
|
|
|
60
60
|
{result?.images?.length > 0 && <LibIcon.Ionicons name="copy-outline" color={'white'} size={30} style={{ transform: [{ scaleX: -1 }] }} />}
|
|
61
61
|
{
|
|
62
62
|
configlist.created == 1 &&
|
|
63
|
-
<Text style={applyStyle({
|
|
63
|
+
<Text style={applyStyle({ fontSize: 10, fontWeight: "500", letterSpacing: 1.5, color: "white", textTransform: 'uppercase', marginTop: 12 })} >{LibUtils.moment(result.created, 'id').format('DD MMM YYYY HH:mm')}</Text>
|
|
64
64
|
}
|
|
65
65
|
{
|
|
66
66
|
configlist.title == 1 &&
|
|
67
|
-
<Text style={applyStyle({
|
|
67
|
+
<Text style={applyStyle({ fontSize: 34, fontWeight: "500", lineHeight: 40, color: "white", marginTop: 5 })} >{result.title}</Text>
|
|
68
68
|
}
|
|
69
69
|
{
|
|
70
70
|
configlist.author == 1 &&
|
|
71
71
|
<View style={applyStyle({ flexDirection: 'row', marginTop: 5 })} >
|
|
72
72
|
<View style={applyStyle({ backgroundColor: 'rgba(255,255,255,0.6)', borderRadius: 4, paddingHorizontal: 10, })} >
|
|
73
|
-
<Text style={applyStyle({
|
|
73
|
+
<Text style={applyStyle({ fontSize: 14, lineHeight: 20, color: LibStyle.colorPrimary, })} >{result.created_by_alias}</Text>
|
|
74
74
|
</View>
|
|
75
75
|
</View>
|
|
76
76
|
}
|
|
@@ -84,7 +84,7 @@ export default function m(props: ContentDetailProps): any {
|
|
|
84
84
|
<ContentAudio code={result.code} onStatusChange={setIsAudioPlaying} ref={audioRef} />
|
|
85
85
|
<Pressable onPress={() => audioRef.current?._onPlayPausePressed()} style={{ backgroundColor: '#f8f8f8', borderWidth: 1, borderColor: LibStyle.colorPrimary, borderRadius: 13, padding: 16, margin: 16, flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }} >
|
|
86
86
|
<LibIcon.AntDesign name={isAudioPlaying ? 'pause' : 'play'} color={LibStyle.colorPrimary} />
|
|
87
|
-
<Text style={{
|
|
87
|
+
<Text style={{ fontSize: 16, marginLeft: 16, fontWeight: "500", letterSpacing: 1.2, color: LibStyle.colorPrimary }} >Klik disini untuk memainkan audio</Text>
|
|
88
88
|
</Pressable>
|
|
89
89
|
</>
|
|
90
90
|
}
|
|
@@ -92,7 +92,7 @@ export default function m(props: ContentDetailProps): any {
|
|
|
92
92
|
isDownload &&
|
|
93
93
|
<Pressable onPress={() => Linking.openURL(result.link)} style={{ backgroundColor: '#f8f8f8', borderWidth: 1, borderColor: LibStyle.colorPrimary, borderRadius: 13, padding: 16, margin: 16, flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }} >
|
|
94
94
|
<LibIcon.SimpleLineIcons name='cloud-download' color={LibStyle.colorPrimary} />
|
|
95
|
-
<Text style={{
|
|
95
|
+
<Text style={{ fontSize: 16, marginLeft: 16, fontWeight: "500", letterSpacing: 1.2, color: LibStyle.colorPrimary }} >Klik disini untuk mengunduh</Text>
|
|
96
96
|
</Pressable>
|
|
97
97
|
}
|
|
98
98
|
{
|
|
@@ -100,16 +100,16 @@ export default function m(props: ContentDetailProps): any {
|
|
|
100
100
|
<View pointerEvents={'none'} style={applyStyle({ padding: 17, paddingVertical: 5 })} >
|
|
101
101
|
{
|
|
102
102
|
configlist.created == 1 &&
|
|
103
|
-
<Text style={applyStyle({
|
|
103
|
+
<Text style={applyStyle({ fontSize: 10, fontWeight: "500", letterSpacing: 1.5, color: "#555", textTransform: 'uppercase', marginTop: 12 })} >{LibUtils.moment(result.created, 'id').format('DD MMM YYYY HH:mm')}</Text>
|
|
104
104
|
}
|
|
105
105
|
{
|
|
106
106
|
configlist.title == 1 &&
|
|
107
|
-
<Text style={applyStyle({
|
|
107
|
+
<Text style={applyStyle({ fontSize: 34, fontWeight: "500", lineHeight: 40, color: "#555", marginTop: 5 })} >{result.title}</Text>
|
|
108
108
|
}
|
|
109
109
|
{
|
|
110
110
|
configlist.author == 1 &&
|
|
111
111
|
<View style={applyStyle({ flexDirection: 'row', marginTop: 5 })} >
|
|
112
|
-
<Text style={applyStyle({
|
|
112
|
+
<Text style={applyStyle({ fontSize: 14, lineHeight: 20, color: LibStyle.colorPrimary, })} >{result.created_by_alias}</Text>
|
|
113
113
|
</View>
|
|
114
114
|
}
|
|
115
115
|
</View>
|
|
@@ -123,11 +123,11 @@ export default function m(props: ContentDetailProps): any {
|
|
|
123
123
|
configlist.comment == 1 &&
|
|
124
124
|
<View style={{ alignItems: 'center', borderBottomWidth: 8, borderBottomColor: '#f2f2f2', paddingBottom: 13 }} >
|
|
125
125
|
<Pressable onPress={() => LibNavigation.navigate('content/comment', { id: result.id })} style={{ borderRadius: 8, paddingHorizontal: 24, paddingVertical: 10, backgroundColor: LibStyle.colorPrimary, }} >
|
|
126
|
-
<Text style={{
|
|
126
|
+
<Text style={{ fontSize: 14, fontWeight: "500", lineHeight: 18, color: LibStyle.colorAccent }} >KOMENTAR</Text>
|
|
127
127
|
</Pressable>
|
|
128
128
|
</View>
|
|
129
129
|
}
|
|
130
|
-
{result?.related?.length > 0 && <Text style={{
|
|
130
|
+
{result?.related?.length > 0 && <Text style={{ fontSize: 20, fontWeight: "500", lineHeight: 26, color: "#060606", marginLeft: 16, marginBottom: 13, marginTop: 20 }} >Artikel Terkait</Text>}
|
|
131
131
|
{
|
|
132
132
|
result?.related?.map?.((rel: any, i: number) => {
|
|
133
133
|
return (<ContentItem key={rel + i} {...rel} />)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
|
|
3
|
+
import { LibIcon, LibNavigation, LibStyle, LibUtils } from 'esoftplay';
|
|
3
4
|
import React, { useRef } from 'react';
|
|
4
5
|
import { Pressable, ScrollView } from 'react-native';
|
|
5
6
|
import Gallery from 'react-native-awesome-gallery';
|
|
6
|
-
import { LibIcon, LibNavigation, LibStyle, LibUtils } from 'esoftplay'
|
|
7
7
|
|
|
8
8
|
export interface ContentGalleryArgs {
|
|
9
9
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// withHooks
|
|
2
|
+
// noPage
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import { LibIcon, LibNavigation, LibStatusbar, LibStyle } from 'esoftplay';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { Pressable, Text, View } from 'react-native';
|
|
6
7
|
|
|
@@ -28,10 +29,10 @@ export default function m(props: ContentHeaderProps): any {
|
|
|
28
29
|
</Pressable>
|
|
29
30
|
}
|
|
30
31
|
<View style={{ flex: 1 }} >
|
|
31
|
-
<Text style={{
|
|
32
|
+
<Text style={{ fontSize: 20, fontWeight: "500", lineHeight: 26, color: LibStyle.colorAccent }} >{props?.title}</Text>
|
|
32
33
|
{/* {
|
|
33
34
|
!props.backButton &&
|
|
34
|
-
<Text style={{
|
|
35
|
+
<Text style={{ fontSize: 14, lineHeight: 20, color: LibStyle.colorAccent }} >{LibUtils.moment(undefined, 'id').format('dddd, DD MMMM YYYY')}</Text>
|
|
35
36
|
} */}
|
|
36
37
|
</View>
|
|
37
38
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// withHooks
|
|
2
2
|
|
|
3
|
+
import { ContentBookmark, ContentCategory, ContentList, LibIcon, LibStyle, useGlobalReturn, useGlobalState } from 'esoftplay';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
import { applyStyle, ContentBookmark, ContentCategory, ContentList, LibIcon, LibStyle, useGlobalReturn, useGlobalState } from 'esoftplay';
|
|
5
5
|
import { Pressable, Text, View } from 'react-native';
|
|
6
6
|
|
|
7
7
|
export interface ContentIndexArgs {
|
|
@@ -49,4 +49,4 @@ export default function m(props: ContentIndexProps): any {
|
|
|
49
49
|
}
|
|
50
50
|
const styleId_ZKPd2h: any = { height: 56, flexDirection: 'row', borderTopWidth: 3, borderTopColor: '#f8f8f8' }
|
|
51
51
|
const styleId_Z2pKvdh: any = { flex: 1, justifyContent: 'center', alignItems: 'center' }
|
|
52
|
-
const styleId_Z25Lwf9: any = {
|
|
52
|
+
const styleId_Z25Lwf9: any = { fontSize: 12, fontWeight: "500", lineHeight: 16, textAlign: "center", color: 'grey' }
|
package/modules/content/item.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// withHooks
|
|
2
|
+
// noPage
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import { ContentBookmarkProperty, ContentConfig, LibIcon, LibNavigation, LibPicture, LibStyle, LibUtils } from 'esoftplay';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { Image, Linking, Pressable, Text, View } from 'react-native';
|
|
6
7
|
|
|
@@ -104,8 +105,8 @@ export default function m(props: ContentItemProps): any {
|
|
|
104
105
|
const styleId_Z1pdPtF: any = { width: LibStyle.width, height: 110, resizeMode: 'contain' }
|
|
105
106
|
const styleId_Z1S0WHq: any = { paddingHorizontal: 16, paddingVertical: 16, flexDirection: 'row', borderBottomWidth: 1, borderTopWidth: 1, borderBottomColor: '#f2f2f2', borderTopColor: '#f8f8f8' }
|
|
106
107
|
const styleId_Z13iiKo: any = { flex: 1, marginLeft: 16, paddingTop: 0 }
|
|
107
|
-
const styleId_Z14zkzb: any = {
|
|
108
|
-
const styleId_1NrPkO: any = {
|
|
108
|
+
const styleId_Z14zkzb: any = { fontSize: 10, fontWeight: "500", letterSpacing: 1.5, color: "#686868" }
|
|
109
|
+
const styleId_1NrPkO: any = { fontSize: 17, fontWeight: "500", lineHeight: 21, color: "#060606", marginTop: 5, }
|
|
109
110
|
const styleId_Z1i5LUH: any = { flexDirection: 'row', marginTop: 5 }
|
|
110
|
-
const styleId_mzCdS: any = {
|
|
111
|
+
const styleId_mzCdS: any = { fontSize: 14, lineHeight: 20, color: LibStyle.colorPrimary, }
|
|
111
112
|
const styleId_Zl1hMr: any = { height: 90, width: 110, borderRadius: 8, backgroundColor: '#f8f8f8' }
|