esoftplay 0.0.136-e → 0.0.136-g
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.
|
@@ -6,12 +6,13 @@ import useSafeState from 'esoftplay/state';
|
|
|
6
6
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
7
7
|
import React, { useEffect, useRef } from 'react';
|
|
8
8
|
import { Text, TouchableOpacity, View } from 'react-native';
|
|
9
|
+
type DateFormat = `${number}-${number}-${number}`
|
|
9
10
|
export interface LibDatepickerProps {
|
|
10
|
-
minDate:
|
|
11
|
-
maxDate:
|
|
11
|
+
minDate: DateFormat,
|
|
12
|
+
maxDate: DateFormat,
|
|
12
13
|
monthsDisplay?: string[],
|
|
13
|
-
selectedDate:
|
|
14
|
-
onDateChange: (date:
|
|
14
|
+
selectedDate: DateFormat,
|
|
15
|
+
onDateChange: (date: DateFormat) => void,
|
|
15
16
|
type?: "date" | "month" | "year"
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -192,15 +192,15 @@ export default {
|
|
|
192
192
|
onAction(notification: any): void {
|
|
193
193
|
this.loadData(true)
|
|
194
194
|
const data = this.getData(notification)
|
|
195
|
-
|
|
195
|
+
const doOpen = (data: any) => {
|
|
196
196
|
if (!LibNavigation.getIsReady()) {
|
|
197
|
-
|
|
197
|
+
const timer = setTimeout(() => {
|
|
198
198
|
doOpen(data)
|
|
199
199
|
clearTimeout(timer)
|
|
200
200
|
}, 300);
|
|
201
201
|
return
|
|
202
202
|
} else {
|
|
203
|
-
|
|
203
|
+
const timer = setTimeout(() => {
|
|
204
204
|
this.openPushNotif(data)
|
|
205
205
|
clearTimeout(timer)
|
|
206
206
|
}, 0)
|
|
@@ -285,7 +285,7 @@ export default {
|
|
|
285
285
|
} else {
|
|
286
286
|
btns.push({ text: "OK", onPress: () => { }, style: "cancel" })
|
|
287
287
|
}
|
|
288
|
-
|
|
288
|
+
const timer = setTimeout(() => {
|
|
289
289
|
Alert.alert(
|
|
290
290
|
param.title,
|
|
291
291
|
param.message,
|
|
@@ -297,7 +297,7 @@ export default {
|
|
|
297
297
|
case "default":
|
|
298
298
|
if (param.module && param.module != "") {
|
|
299
299
|
if (!String(param.module).includes("/")) param.module = param.module + "/index"
|
|
300
|
-
|
|
300
|
+
const timer = setTimeout(() => {
|
|
301
301
|
LibNavigation.navigate(param.module, param.params)
|
|
302
302
|
clearTimeout(timer)
|
|
303
303
|
}, 10)
|
|
@@ -319,7 +319,7 @@ export default {
|
|
|
319
319
|
} else {
|
|
320
320
|
btns.push({ text: "OK", onPress: () => { }, style: "cancel" })
|
|
321
321
|
}
|
|
322
|
-
|
|
322
|
+
const timer = setTimeout(() => {
|
|
323
323
|
Alert.alert(
|
|
324
324
|
data.title,
|
|
325
325
|
data.message,
|
|
@@ -332,7 +332,7 @@ export default {
|
|
|
332
332
|
case "default":
|
|
333
333
|
if (param.module != "") {
|
|
334
334
|
if (!String(param.module).includes("/")) param.module = param.module + "/index"
|
|
335
|
-
|
|
335
|
+
const timer = setTimeout(() => {
|
|
336
336
|
LibNavigation.navigate(param.module, param.arguments)
|
|
337
337
|
clearTimeout(timer)
|
|
338
338
|
}, 10)
|
|
@@ -8,15 +8,15 @@ import useSafeState from 'esoftplay/state';
|
|
|
8
8
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
9
9
|
import React, { useEffect, useRef } from 'react';
|
|
10
10
|
import { Text, TouchableOpacity, View } from 'react-native';
|
|
11
|
-
|
|
11
|
+
type TimeFormat= `${number}:${number}:${number}`
|
|
12
12
|
export interface LibTimepickerProps {
|
|
13
13
|
/* hh:mm:ss */
|
|
14
|
-
selectedTime:
|
|
15
|
-
onTimeChange: (second:
|
|
14
|
+
selectedTime: TimeFormat,
|
|
15
|
+
onTimeChange: (second: TimeFormat) => void,
|
|
16
16
|
/* hh:mm:ss */
|
|
17
|
-
minTime?:
|
|
17
|
+
minTime?: TimeFormat,
|
|
18
18
|
/* hh:mm:ss */
|
|
19
|
-
maxTime?:
|
|
19
|
+
maxTime?: TimeFormat,
|
|
20
20
|
mode?: 24 | 12,
|
|
21
21
|
/* hh:mm:ss */
|
|
22
22
|
type?: "hour" | "hourMinute" | "hourMinuteSecond"
|