esoftplay 0.0.135 → 0.0.136
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 +14 -15
- package/bin/cli.js +46 -80
- package/bin/mover.js +81 -79
- package/bin/router.js +2 -0
- package/global.ts +1 -0
- package/modules/lib/carrousel.tsx +17 -13
- package/modules/lib/carrousel_snap.tsx +2 -2
- package/modules/lib/collaps.tsx +3 -3
- package/modules/lib/datepicker.tsx +4 -2
- package/modules/lib/direct_text.tsx +2 -2
- package/modules/lib/editbox.tsx +2 -2
- package/modules/lib/focus.tsx +2 -2
- package/modules/lib/gradient.tsx +2 -1
- package/modules/lib/icon.tsx +14 -13
- package/modules/lib/image.tsx +10 -5
- package/modules/lib/infinite.tsx +2 -3
- package/modules/lib/input.tsx +4 -3
- package/modules/lib/keyboard_avoid.tsx +2 -2
- package/modules/lib/lazy.tsx +2 -1
- package/modules/lib/list.tsx +2 -2
- package/modules/lib/notification.ts +12 -6
- package/modules/lib/picture.tsx +2 -1
- package/modules/lib/pin.tsx +4 -4
- package/modules/lib/scroll.tsx +2 -2
- package/modules/lib/scrollpicker.tsx +5 -3
- package/modules/lib/slidingup.tsx +2 -1
- package/modules/lib/textstyle.tsx +2 -2
- package/modules/lib/toast.tsx +1 -0
- package/modules/lib/updater.tsx +11 -4
- package/modules/lib/video.tsx +2 -2
- package/modules/lib/webview.tsx +10 -8
- package/modules/use/worker.tsx +21 -0
- package/moment.ts +10 -0
- package/package.json +1 -1
- package/timeout.d.ts +2 -0
- package/timeout.ts +91 -0
package/bin/build.js
CHANGED
|
@@ -168,6 +168,10 @@ if (fs.existsSync(packjson)) {
|
|
|
168
168
|
"simulator": true
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
|
+
"development_build": {
|
|
172
|
+
"developmentClient": true,
|
|
173
|
+
"distribution": "internal"
|
|
174
|
+
},
|
|
171
175
|
"preview": {
|
|
172
176
|
"distribution": "internal",
|
|
173
177
|
"ios": {
|
|
@@ -194,19 +198,13 @@ if (fs.existsSync(packjson)) {
|
|
|
194
198
|
})
|
|
195
199
|
|
|
196
200
|
const babelconf = `module.exports = function (api) {
|
|
197
|
-
api.cache(true);
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
205
|
-
plugins.push("react-native-reanimated/plugin")
|
|
206
|
-
return {
|
|
207
|
-
presets: ["babel-preset-expo"],
|
|
208
|
-
plugins
|
|
209
|
-
};
|
|
201
|
+
api.cache(true);
|
|
202
|
+
let plugins = []
|
|
203
|
+
plugins.push("react-native-reanimated/plugin")
|
|
204
|
+
return {
|
|
205
|
+
presets: ["babel-preset-expo"],
|
|
206
|
+
plugins
|
|
207
|
+
};
|
|
210
208
|
};
|
|
211
209
|
|
|
212
210
|
`
|
|
@@ -326,8 +324,6 @@ export default UserIndex`;
|
|
|
326
324
|
}
|
|
327
325
|
let devLibs = [
|
|
328
326
|
"@babel/core",
|
|
329
|
-
"babel-plugin-transform-react-native-style-optimizer",
|
|
330
|
-
"babel-plugin-transform-remove-console",
|
|
331
327
|
"@types/react",
|
|
332
328
|
"typescript",
|
|
333
329
|
]
|
|
@@ -340,6 +336,9 @@ export default UserIndex`;
|
|
|
340
336
|
expoLib.forEach((exlib) => {
|
|
341
337
|
if (fs.existsSync("../../node_modules/" + exlib)) {
|
|
342
338
|
console.log(exlib + " is Exist, Skipped")
|
|
339
|
+
if (exlib == '@expo/vector-icons') {
|
|
340
|
+
installExpoLibs.push(exlib)
|
|
341
|
+
}
|
|
343
342
|
} else {
|
|
344
343
|
console.log("⚙⚙⚙ INSTALLING ... " + exlib)
|
|
345
344
|
installExpoLibs.push(exlib)
|
package/bin/cli.js
CHANGED
|
@@ -270,23 +270,6 @@ function consoleFunc(msg, success) {
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
|
|
274
|
-
function jsEng(file, isHermes) {
|
|
275
|
-
if (fs.existsSync(file)) {
|
|
276
|
-
var txt = fs.readFileSync(file, 'utf8');
|
|
277
|
-
let isJSON = txt.startsWith('{') || txt.startsWith('[')
|
|
278
|
-
if (!isJSON) {
|
|
279
|
-
consoleError('app.json tidak valid')
|
|
280
|
-
return
|
|
281
|
-
}
|
|
282
|
-
let app = JSON.parse(txt)
|
|
283
|
-
app.expo.jsEngine = isHermes ? "hermes" : "hermes"
|
|
284
|
-
fs.writeFileSync(file, JSON.stringify(app, undefined, 2))
|
|
285
|
-
} else {
|
|
286
|
-
consoleError(file)
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
273
|
function configUpdate(state) {
|
|
291
274
|
let _path;
|
|
292
275
|
let _slug
|
|
@@ -476,6 +459,9 @@ function readToJSON(path) {
|
|
|
476
459
|
|
|
477
460
|
|
|
478
461
|
function publish(notes) {
|
|
462
|
+
consoleSucces("START PULL OTA..")
|
|
463
|
+
command('cd /var/www/html/ota && git fetch origin master && git reset --hard FETCH_HEAD && git clean -df')
|
|
464
|
+
consoleSucces("END PULL OTA..")
|
|
479
465
|
jsEng(appjson, true)
|
|
480
466
|
jsEng(appdebug, true)
|
|
481
467
|
jsEng(applive, true)
|
|
@@ -501,7 +487,7 @@ function publish(notes) {
|
|
|
501
487
|
if (fs.existsSync(appdebug)) {
|
|
502
488
|
adebug = readToJSON(appdebug)
|
|
503
489
|
}
|
|
504
|
-
if (ajson.expo.updates.url) {
|
|
490
|
+
if (ajson.expo.updates.hasOwnProperty('url')) {
|
|
505
491
|
isCustomServer = true
|
|
506
492
|
}
|
|
507
493
|
if (clive) {
|
|
@@ -567,8 +553,6 @@ function publish(notes) {
|
|
|
567
553
|
ajson.config = {}
|
|
568
554
|
}
|
|
569
555
|
ajson.config.publish_id = last_id + 1
|
|
570
|
-
fs.writeFileSync(appjson, JSON.stringify(ajson, undefined, 2))
|
|
571
|
-
consoleSucces("start publishing " + status.toUpperCase() + " - PUBLISH_ID : " + (last_id + 1))
|
|
572
556
|
if (isCustomServer) {
|
|
573
557
|
if (!fs.existsSync('/var/www/html/ota/')) {
|
|
574
558
|
consoleError("ota not found at /var/www/html/ota, please clone it first!")
|
|
@@ -579,8 +563,17 @@ function publish(notes) {
|
|
|
579
563
|
let date_format_str;
|
|
580
564
|
if (isUpdateExist) {
|
|
581
565
|
currentUpdate = fs.readdirSync('/var/www/html/ota/updates/' + ajson.expo.runtimeVersion)[0]
|
|
582
|
-
|
|
583
|
-
|
|
566
|
+
let formattedDate = new Date(currentUpdate * 1000).toLocaleString('id', {
|
|
567
|
+
day: '2-digit',
|
|
568
|
+
month: 'long',
|
|
569
|
+
year: 'numeric',
|
|
570
|
+
hour: '2-digit',
|
|
571
|
+
minute: '2-digit',
|
|
572
|
+
second: '2-digit',
|
|
573
|
+
hour12: false, // Use 24-hour format
|
|
574
|
+
timeZone: 'Asia/Jakarta'
|
|
575
|
+
});
|
|
576
|
+
date_format_str = formattedDate
|
|
584
577
|
}
|
|
585
578
|
var out = false
|
|
586
579
|
const rl = readline.createInterface({
|
|
@@ -595,14 +588,16 @@ isDebug : ${cjson.config.isDebug}
|
|
|
595
588
|
runtimeVersion : ${ajson.expo.runtimeVersion}
|
|
596
589
|
Update terakhir: ${currentUpdate ? date_format_str : '- not found'}
|
|
597
590
|
|
|
598
|
-
Pastikan data sudah benar sebelum anda melanjutkan, lanjut publish
|
|
591
|
+
Pastikan data sudah benar sebelum anda melanjutkan, lanjut publish ketikkan runtimeVersion: `,
|
|
599
592
|
function (input) {
|
|
600
593
|
out = input
|
|
601
594
|
rl.close();
|
|
602
595
|
});
|
|
603
596
|
|
|
604
597
|
rl.on("close", function () {
|
|
605
|
-
if (out && out
|
|
598
|
+
if (out && out == ajson.expo.runtimeVersion) {
|
|
599
|
+
fs.writeFileSync(appjson, JSON.stringify(ajson, undefined, 2))
|
|
600
|
+
consoleSucces("start publishing " + status.toUpperCase() + " - PUBLISH_ID : " + (last_id + 1))
|
|
606
601
|
command("rm -rf ./dist && esp start && currentPath=$(pwd) && cd /var/www/html/ota/ && npm run publish $currentPath \"" + notes + "\" && cd $currentPath && rm -rf ./dist")
|
|
607
602
|
consoleSucces("Berhasil")
|
|
608
603
|
const os = require('os')
|
|
@@ -640,6 +635,8 @@ Pastikan data sudah benar sebelum anda melanjutkan, lanjut publish(y/n)?`,
|
|
|
640
635
|
});
|
|
641
636
|
return
|
|
642
637
|
} else {
|
|
638
|
+
fs.writeFileSync(appjson, JSON.stringify(ajson, undefined, 2))
|
|
639
|
+
consoleSucces("start publishing " + status.toUpperCase() + " - PUBLISH_ID : " + (last_id + 1))
|
|
643
640
|
command("expo p")
|
|
644
641
|
consoleSucces("Berhasil")
|
|
645
642
|
const os = require('os')
|
|
@@ -811,38 +808,27 @@ function buildPrepare(include = true) {
|
|
|
811
808
|
}
|
|
812
809
|
}
|
|
813
810
|
|
|
814
|
-
|
|
815
811
|
function configAvailable(enabled) {
|
|
816
|
-
|
|
817
|
-
let _git = fs.readFileSync(gitignore, 'utf8')
|
|
818
|
-
var ignore = "config.json"
|
|
819
|
-
var notignore = "#config.json"
|
|
812
|
+
function replace(_git, ignore, enabled) {
|
|
820
813
|
if (enabled) {
|
|
821
|
-
_git = _git.replace(ignore,
|
|
814
|
+
_git = _git.replace('\n' + ignore, '\n#' + ignore)
|
|
822
815
|
} else {
|
|
823
|
-
_git = _git.replace(
|
|
824
|
-
}
|
|
825
|
-
var ignore = "config.live.json"
|
|
826
|
-
var notignore = "#config.live.json"
|
|
827
|
-
if (enabled) {
|
|
828
|
-
_git = _git.replace(ignore, notignore)
|
|
829
|
-
} else {
|
|
830
|
-
_git = _git.replace(notignore, ignore)
|
|
831
|
-
}
|
|
832
|
-
var ignore = "config.debug.json"
|
|
833
|
-
var notignore = "#config.debug.json"
|
|
834
|
-
if (enabled) {
|
|
835
|
-
_git = _git.replace(ignore, notignore)
|
|
836
|
-
} else {
|
|
837
|
-
_git = _git.replace(notignore, ignore)
|
|
838
|
-
}
|
|
839
|
-
var ignore = "code-signing/"
|
|
840
|
-
var notignore = "#code-signing/"
|
|
841
|
-
if (enabled) {
|
|
842
|
-
_git = _git.replace(ignore, notignore)
|
|
843
|
-
} else {
|
|
844
|
-
_git = _git.replace(notignore, ignore)
|
|
816
|
+
_git = _git.replace('\n#' + ignore, '\n' + ignore)
|
|
845
817
|
}
|
|
818
|
+
return _git
|
|
819
|
+
}
|
|
820
|
+
if (fs.existsSync(gitignore)) {
|
|
821
|
+
let _git = fs.readFileSync(gitignore, 'utf8')
|
|
822
|
+
const ignores = [
|
|
823
|
+
"config.json",
|
|
824
|
+
"config.live.json",
|
|
825
|
+
"config.debug.json",
|
|
826
|
+
"code-signing/",
|
|
827
|
+
"certificate.pem"
|
|
828
|
+
]
|
|
829
|
+
ignores.forEach((key) => {
|
|
830
|
+
_git = replace(_git, key, enabled)
|
|
831
|
+
})
|
|
846
832
|
fs.writeFileSync(gitignore, _git, { encoding: 'utf8' })
|
|
847
833
|
} else {
|
|
848
834
|
consoleError(gitignore)
|
|
@@ -883,10 +869,14 @@ function build() {
|
|
|
883
869
|
pre: () => {
|
|
884
870
|
configAvailable(true)
|
|
885
871
|
devClientPre(appjson)
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
name: "2. IOS (Development) - Non Simulator",
|
|
876
|
+
cmd: "eas build --platform ios --profile development_build" + local,
|
|
877
|
+
pre: () => {
|
|
878
|
+
configAvailable(true)
|
|
879
|
+
devClientPre(appjson)
|
|
890
880
|
}
|
|
891
881
|
},
|
|
892
882
|
{
|
|
@@ -895,10 +885,6 @@ function build() {
|
|
|
895
885
|
pre: () => {
|
|
896
886
|
configAvailable(true)
|
|
897
887
|
devClientPos(appjson)
|
|
898
|
-
jsEng(appjson, true)
|
|
899
|
-
jsEng(appdebug, true)
|
|
900
|
-
jsEng(applive, true)
|
|
901
|
-
consoleSucces("Hermes diaktifkan")
|
|
902
888
|
}
|
|
903
889
|
},
|
|
904
890
|
{
|
|
@@ -907,10 +893,6 @@ function build() {
|
|
|
907
893
|
pre: () => {
|
|
908
894
|
configAvailable(true)
|
|
909
895
|
devClientPos(appjson)
|
|
910
|
-
jsEng(appjson, true)
|
|
911
|
-
jsEng(appdebug, true)
|
|
912
|
-
jsEng(applive, true)
|
|
913
|
-
consoleSucces("Hermes diaktifkan")
|
|
914
896
|
}
|
|
915
897
|
},
|
|
916
898
|
{
|
|
@@ -919,10 +901,6 @@ function build() {
|
|
|
919
901
|
pre: () => {
|
|
920
902
|
configAvailable(true)
|
|
921
903
|
devClientPos(appjson)
|
|
922
|
-
jsEng(appjson, true)
|
|
923
|
-
jsEng(appdebug, true)
|
|
924
|
-
jsEng(applive, true)
|
|
925
|
-
consoleSucces("Hermes diaktifkan")
|
|
926
904
|
}
|
|
927
905
|
},
|
|
928
906
|
{
|
|
@@ -931,10 +909,6 @@ function build() {
|
|
|
931
909
|
pre: () => {
|
|
932
910
|
configAvailable(true)
|
|
933
911
|
devClientPre(appjson)
|
|
934
|
-
jsEng(appjson, false)
|
|
935
|
-
jsEng(appdebug, false)
|
|
936
|
-
jsEng(applive, false)
|
|
937
|
-
consoleSucces("Hermes dinonaktifkan")
|
|
938
912
|
}
|
|
939
913
|
},
|
|
940
914
|
{
|
|
@@ -943,10 +917,6 @@ function build() {
|
|
|
943
917
|
pre: () => {
|
|
944
918
|
configAvailable(true)
|
|
945
919
|
devClientPos(appjson)
|
|
946
|
-
jsEng(appjson, true)
|
|
947
|
-
jsEng(appdebug, true)
|
|
948
|
-
jsEng(applive, true)
|
|
949
|
-
consoleSucces("Hermes diaktifkan")
|
|
950
920
|
}
|
|
951
921
|
},
|
|
952
922
|
{
|
|
@@ -955,10 +925,6 @@ function build() {
|
|
|
955
925
|
pre: () => {
|
|
956
926
|
configAvailable(true)
|
|
957
927
|
devClientPos(appjson)
|
|
958
|
-
jsEng(appjson, true)
|
|
959
|
-
jsEng(appdebug, true)
|
|
960
|
-
jsEng(applive, true)
|
|
961
|
-
consoleSucces("Hermes diaktifkan")
|
|
962
928
|
}
|
|
963
929
|
}
|
|
964
930
|
]
|
package/bin/mover.js
CHANGED
|
@@ -13,96 +13,98 @@ const mainModule = args[0]
|
|
|
13
13
|
const moduleName = args[0]?.split("-")?.[1]
|
|
14
14
|
|
|
15
15
|
/* copy directory */
|
|
16
|
-
if (fs.existsSync(
|
|
17
|
-
if (fs.existsSync('../esoftplay/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
if (fs.existsSync("../" + mainModule + "/" + moduleName)) {
|
|
17
|
+
if (fs.existsSync('../esoftplay/esp.ts')) {
|
|
18
|
+
if (fs.existsSync('../esoftplay/modules/' + moduleName))
|
|
19
|
+
shell('rm -r ../esoftplay/modules/' + moduleName)
|
|
20
|
+
shell("cp -r ../" + mainModule + "/" + moduleName + " ../esoftplay/modules/")
|
|
21
|
+
} else {
|
|
22
|
+
throw "Mohon install esoftplay package terlebih dahulu"
|
|
23
|
+
}
|
|
23
24
|
|
|
24
|
-
function readAsJson(path) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
function readAsJson(path) {
|
|
26
|
+
let out = ""
|
|
27
|
+
try {
|
|
28
|
+
out = JSON.parse(fs.readFileSync(path, { encoding: 'utf8' }))
|
|
29
|
+
} catch (e) {
|
|
29
30
|
|
|
31
|
+
}
|
|
32
|
+
return out;
|
|
30
33
|
}
|
|
31
|
-
return out;
|
|
32
|
-
}
|
|
33
34
|
|
|
34
|
-
function injectConfig(configPath) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
function injectConfig(configPath) {
|
|
36
|
+
if (fs.existsSync(configPath)) {
|
|
37
|
+
const config = "../" + mainModule + "/config.json"
|
|
38
|
+
const exsConf = readAsJson(configPath)
|
|
39
|
+
const conf = readAsJson(config)
|
|
40
|
+
let _cf = merge({ config: conf }, exsConf)
|
|
41
|
+
fs.writeFileSync(configPath, JSON.stringify({ ..._cf }, undefined, 2))
|
|
42
|
+
}
|
|
41
43
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* injectConfig */
|
|
45
|
-
injectConfig("../../config.json")
|
|
46
|
-
injectConfig("../../config.live.json")
|
|
47
|
-
injectConfig("../../config.debug.json")
|
|
48
44
|
|
|
49
|
-
/*
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
shell("mkdir -p ../../assets/" + moduleName)
|
|
54
|
-
try {
|
|
55
|
-
shell("cp -r -n ../" + mainModule + "/assets/* ../../assets/" + moduleName + "/")
|
|
56
|
-
} catch (error) { }
|
|
57
|
-
}
|
|
45
|
+
/* injectConfig */
|
|
46
|
+
injectConfig("../../config.json")
|
|
47
|
+
injectConfig("../../config.live.json")
|
|
48
|
+
injectConfig("../../config.debug.json")
|
|
58
49
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
50
|
+
/* move assets */
|
|
51
|
+
if (fs.existsSync("../" + mainModule + "/assets/")) {
|
|
52
|
+
console.log("ADA ASSETS");
|
|
53
|
+
if (!fs.existsSync("../../assets/" + moduleName))
|
|
54
|
+
shell("mkdir -p ../../assets/" + moduleName)
|
|
55
|
+
try {
|
|
56
|
+
shell("cp -r -n ../" + mainModule + "/assets/* ../../assets/" + moduleName + "/")
|
|
57
|
+
} catch (error) { }
|
|
58
|
+
}
|
|
67
59
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
60
|
+
if (fs.existsSync("../" + mainModule + "/fonts/")) {
|
|
61
|
+
console.log("ADA FONTS");
|
|
62
|
+
if (!fs.existsSync("../../" + assetsFonts))
|
|
63
|
+
shell("mkdir -p ../../" + assetsFonts)
|
|
64
|
+
try {
|
|
65
|
+
shell("cp -r -n ../" + mainModule + "/fonts/* ../../" + assetsFonts + "/")
|
|
66
|
+
} catch (error) { }
|
|
75
67
|
}
|
|
76
|
-
fs.writeFileSync("../../assets/locale/id.json", JSON.stringify(moduleLang, undefined, 2))
|
|
77
|
-
/* sort id.JSON */
|
|
78
|
-
shell("cd ../../ && bun ./node_modules/esoftplay/bin/locale.js")
|
|
79
|
-
}
|
|
80
68
|
|
|
81
|
-
/* inject
|
|
82
|
-
if (fs.existsSync("../" + mainModule + "/
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
libsToSkip.push(element)
|
|
69
|
+
/* inject lang */
|
|
70
|
+
if (fs.existsSync("../" + mainModule + "/id.json")) {
|
|
71
|
+
let moduleLang = readAsJson("../" + mainModule + "/id.json")
|
|
72
|
+
if (fs.existsSync("../../assets/locale/id.json")) {
|
|
73
|
+
let projectLang = readAsJson("../../assets/locale/id.json")
|
|
74
|
+
let _lg = merge(moduleLang, projectLang)
|
|
75
|
+
moduleLang = { ..._lg }
|
|
89
76
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
libs = libs.filter((x) => x != lib)
|
|
94
|
-
console.log(lib + " is exist, Skipped")
|
|
95
|
-
})
|
|
77
|
+
fs.writeFileSync("../../assets/locale/id.json", JSON.stringify(moduleLang, undefined, 2))
|
|
78
|
+
/* sort id.JSON */
|
|
79
|
+
shell("cd ../../ && bun ./node_modules/esoftplay/bin/locale.js")
|
|
96
80
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
81
|
+
|
|
82
|
+
/* inject libs */
|
|
83
|
+
if (fs.existsSync("../" + mainModule + "/libs.json")) {
|
|
84
|
+
let libs = readAsJson("../" + mainModule + "/libs.json")
|
|
85
|
+
let libsToSkip = []
|
|
86
|
+
libs.forEach((element, index) => {
|
|
87
|
+
console.log(element.split("@")[0])
|
|
88
|
+
if (fs.existsSync("../../node_modules/" + element.split("@")[0])) {
|
|
89
|
+
libsToSkip.push(element)
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
if (libsToSkip.length > 0) {
|
|
93
|
+
libsToSkip.forEach((lib) => {
|
|
94
|
+
libs = libs.filter((x) => x != lib)
|
|
95
|
+
console.log(lib + " is exist, Skipped")
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
if (libs.length > 0) {
|
|
99
|
+
console.log("mohon tunggu ..")
|
|
100
|
+
console.log("installing \\n" + libs.join("\\n"))
|
|
101
|
+
shell("cd ../../ && expo install " + libs.join(" && expo install "))
|
|
102
|
+
}
|
|
103
|
+
console.log("Success..!")
|
|
101
104
|
}
|
|
102
|
-
console.log("Success..!")
|
|
103
|
-
}
|
|
104
105
|
|
|
105
|
-
/* execute mover on master */
|
|
106
|
-
if (fs.existsSync("../" + mainModule + "/mover.js")) {
|
|
107
|
-
|
|
108
|
-
}
|
|
106
|
+
/* execute mover on master */
|
|
107
|
+
if (fs.existsSync("../" + mainModule + "/mover.js")) {
|
|
108
|
+
shell("bun ../" + mainModule + "/mover.js", { stdio: 'inherit' })
|
|
109
|
+
}
|
|
110
|
+
}
|
package/bin/router.js
CHANGED
|
@@ -168,10 +168,12 @@ function createIndex() {
|
|
|
168
168
|
importer.push(`import useSafeState from 'esoftplay/state'`)
|
|
169
169
|
importer.push(`import useLazyState from 'esoftplay/lazy'`)
|
|
170
170
|
importer.push(`import Storage from 'esoftplay/storage'`)
|
|
171
|
+
importer.push(`import { createDebounce, createInterval, createTimeout, useDebounce, useInterval, useTimeout } from 'esoftplay/timeout'`)
|
|
171
172
|
AllRoutes.forEach((nav) => {
|
|
172
173
|
const [module, task] = nav.split('/')
|
|
173
174
|
const comp = ucword(module) + ucword(task)
|
|
174
175
|
importer.push(`import { ${comp} } from ${'"esoftplay/cache/' + module + '/' + task + '/import"'} `)
|
|
176
|
+
importer.push(`import { * as ${comp}Property } from ${'"esoftplay/cache/' + module + '/' + task + '/import"'} `)
|
|
175
177
|
})
|
|
176
178
|
var PreText = ''
|
|
177
179
|
var Text = `
|
package/global.ts
CHANGED
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
import { LibComponent } from 'esoftplay/cache/lib/component/import';
|
|
3
3
|
import { LibFocus } from 'esoftplay/cache/lib/focus/import';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { Platform, ScrollView, StyleSheet, Text, TouchableOpacity, TouchableWithoutFeedback, View } from 'react-native';
|
|
5
|
+
import { Platform, ScrollView, StyleSheet, Text, TouchableOpacity, TouchableWithoutFeedback, View, ViewStyle } from 'react-native';
|
|
6
6
|
|
|
7
7
|
export interface LibCarrouselProps {
|
|
8
8
|
children: any,
|
|
9
9
|
autoplay?: boolean,
|
|
10
10
|
delay?: number,
|
|
11
11
|
currentPage?: number,
|
|
12
|
-
style?:
|
|
13
|
-
pageStyle?:
|
|
14
|
-
contentContainerStyle?:
|
|
12
|
+
style?: ViewStyle,
|
|
13
|
+
pageStyle?: ViewStyle,
|
|
14
|
+
contentContainerStyle?: ViewStyle,
|
|
15
15
|
pageInfo?: boolean,
|
|
16
16
|
pageInfoBackgroundColor?: string,
|
|
17
17
|
pageInfoTextStyle?: any,
|
|
18
|
-
pageInfoBottomContainerStyle?:
|
|
18
|
+
pageInfoBottomContainerStyle?: ViewStyle,
|
|
19
19
|
pageInfoTextSeparator?: string,
|
|
20
20
|
bullets?: boolean,
|
|
21
|
-
bulletsContainerStyle?:
|
|
22
|
-
bulletStyle?:
|
|
21
|
+
bulletsContainerStyle?: ViewStyle,
|
|
22
|
+
bulletStyle?: ViewStyle,
|
|
23
23
|
arrows?: boolean,
|
|
24
|
-
arrowsContainerStyle?:
|
|
25
|
-
arrowStyle?:
|
|
26
|
-
leftArrowStyle?:
|
|
27
|
-
rightArrowStyle?:
|
|
24
|
+
arrowsContainerStyle?: ViewStyle,
|
|
25
|
+
arrowStyle?: ViewStyle,
|
|
26
|
+
leftArrowStyle?: ViewStyle,
|
|
27
|
+
rightArrowStyle?: ViewStyle,
|
|
28
28
|
leftArrowText?: string,
|
|
29
29
|
rightArrowText?: string,
|
|
30
|
-
chosenBulletStyle?:
|
|
30
|
+
chosenBulletStyle?: ViewStyle,
|
|
31
31
|
onAnimateNextPage?: (currentPage: number) => void,
|
|
32
32
|
onPageBeingChanged?: (nextPage: number) => void,
|
|
33
33
|
swipe?: boolean,
|
|
@@ -205,7 +205,11 @@ export default class m extends LibComponent<LibCarrouselProps, LibCarrouselState
|
|
|
205
205
|
_onLayout(event: any): void {
|
|
206
206
|
const { height, width } = event.nativeEvent.layout;
|
|
207
207
|
this.setState({ size: { width, height } });
|
|
208
|
-
|
|
208
|
+
|
|
209
|
+
const timer = setTimeout(() => {
|
|
210
|
+
this._placeCritical(this.state.currentPage)
|
|
211
|
+
clearTimeout(timer)
|
|
212
|
+
}, 0);
|
|
209
213
|
}
|
|
210
214
|
|
|
211
215
|
_clearTimer(): void {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// noPage
|
|
3
3
|
import esp from 'esoftplay/esp';
|
|
4
4
|
import React, { useEffect, useMemo, useRef } from 'react';
|
|
5
|
-
import { ScrollView, View } from 'react-native';
|
|
5
|
+
import { ScrollView, StyleProp, View, ViewStyle } from 'react-native';
|
|
6
6
|
|
|
7
7
|
export interface LibCarrousel_snapProps {
|
|
8
8
|
data: any[]
|
|
9
9
|
align?: 'center' | 'left'
|
|
10
|
-
style?:
|
|
10
|
+
style?: StyleProp<ViewStyle>,
|
|
11
11
|
maxWidth: number,
|
|
12
12
|
autoCycle?: boolean,
|
|
13
13
|
loop?: boolean,
|
package/modules/lib/collaps.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// noPage
|
|
3
3
|
import useSafeState from 'esoftplay/state';
|
|
4
4
|
import React, { useEffect } from 'react';
|
|
5
|
-
import { Pressable } from 'react-native';
|
|
5
|
+
import { Pressable, ViewStyle } from 'react-native';
|
|
6
6
|
import Animated, { runOnJS, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
7
7
|
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ export interface LibCollapsProps {
|
|
|
13
13
|
header: (isShow: boolean) => any,
|
|
14
14
|
children: any,
|
|
15
15
|
onToggle?: (expanded: boolean) => void,
|
|
16
|
-
style?:
|
|
16
|
+
style?: ViewStyle
|
|
17
17
|
}
|
|
18
18
|
export default function m(props: LibCollapsProps): any {
|
|
19
19
|
const [expand, setExpand] = useSafeState(props.show)
|
|
@@ -55,7 +55,7 @@ export default function m(props: LibCollapsProps): any {
|
|
|
55
55
|
|
|
56
56
|
return (
|
|
57
57
|
<Animated.View>
|
|
58
|
-
<Pressable onPress={toggle} style={{ zIndex: 11 }} >
|
|
58
|
+
<Pressable onPress={toggle} style={{ ...props.style, zIndex: 11 }} >
|
|
59
59
|
{props.header(expand)}
|
|
60
60
|
</Pressable>
|
|
61
61
|
{expand &&
|
|
@@ -90,8 +90,9 @@ export default function m(props: LibDatepickerProps): any {
|
|
|
90
90
|
}
|
|
91
91
|
setMonths(_months)
|
|
92
92
|
if (reset) {
|
|
93
|
-
|
|
93
|
+
const timer = setTimeout(() => {
|
|
94
94
|
refMonth.current!.scrollToIndex(0)
|
|
95
|
+
clearTimeout(timer)
|
|
95
96
|
}, 200);
|
|
96
97
|
setMonth(allMonths[0])
|
|
97
98
|
}
|
|
@@ -117,8 +118,9 @@ export default function m(props: LibDatepickerProps): any {
|
|
|
117
118
|
}
|
|
118
119
|
setDates(_dates)
|
|
119
120
|
if (reset) {
|
|
120
|
-
setTimeout(() => {
|
|
121
|
+
const timer = setTimeout(() => {
|
|
121
122
|
refDate.current!.scrollToIndex(0)
|
|
123
|
+
clearTimeout(timer)
|
|
122
124
|
}, 200);
|
|
123
125
|
setDate(_dates[0])
|
|
124
126
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// noPage
|
|
2
2
|
import { LibComponent } from 'esoftplay/cache/lib/component/import';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { TextInput } from 'react-native';
|
|
4
|
+
import { StyleProp, TextInput, TextStyle } from 'react-native';
|
|
5
5
|
|
|
6
6
|
export interface LibDirect_textProps {
|
|
7
|
-
style?:
|
|
7
|
+
style?: StyleProp<TextStyle>,
|
|
8
8
|
initialText?: string
|
|
9
9
|
}
|
|
10
10
|
export interface LibDirect_textState {
|
package/modules/lib/editbox.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import { LibTheme } from 'esoftplay/cache/lib/theme/import';
|
|
|
8
8
|
import esp from 'esoftplay/esp';
|
|
9
9
|
import useGlobalState from 'esoftplay/global';
|
|
10
10
|
import React from 'react';
|
|
11
|
-
import { Button, TouchableOpacity, View } from 'react-native';
|
|
11
|
+
import { Button, StyleProp, TextStyle, TouchableOpacity, View } from 'react-native';
|
|
12
12
|
|
|
13
13
|
export interface ComponentEditboxProps {
|
|
14
14
|
defaultValue?: string,
|
|
@@ -36,7 +36,7 @@ export interface ComponentEditboxProps {
|
|
|
36
36
|
secureTextEntry?: boolean,
|
|
37
37
|
selectTextOnFocus?: boolean,
|
|
38
38
|
selectionColor?: string,
|
|
39
|
-
style?:
|
|
39
|
+
style?: StyleProp<TextStyle>,
|
|
40
40
|
value?: string,
|
|
41
41
|
}
|
|
42
42
|
|
package/modules/lib/focus.tsx
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
import { useIsFocused } from '@react-navigation/native';
|
|
5
5
|
import React, { useEffect } from 'react';
|
|
6
|
-
import { InteractionManager, View } from 'react-native';
|
|
6
|
+
import { InteractionManager, View, ViewStyle } from 'react-native';
|
|
7
7
|
|
|
8
8
|
export interface LibFocusProps {
|
|
9
9
|
isFocused?: boolean
|
|
10
10
|
blurView?: any,
|
|
11
11
|
onFocus?: () => void,
|
|
12
12
|
onBlur?: () => void,
|
|
13
|
-
style?:
|
|
13
|
+
style?: ViewStyle,
|
|
14
14
|
children?: any
|
|
15
15
|
}
|
|
16
16
|
export interface LibFocusState {
|