esoftplay 0.0.135-u → 0.0.135-v
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/global.ts +1 -0
- package/modules/lib/carrousel.tsx +5 -1
- package/modules/lib/datepicker.tsx +4 -2
- package/modules/lib/image.tsx +10 -5
- package/modules/lib/input.tsx +2 -1
- package/modules/lib/lazy.tsx +2 -1
- package/modules/lib/notification.ts +12 -6
- package/modules/lib/pin.tsx +1 -1
- package/modules/lib/scrollpicker.tsx +2 -1
- package/modules/lib/slidingup.tsx +2 -1
- package/modules/lib/toast.tsx +1 -0
- package/modules/lib/webview.tsx +4 -2
- package/package.json +1 -1
package/global.ts
CHANGED
|
@@ -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 {
|
|
@@ -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
|
}
|
package/modules/lib/image.tsx
CHANGED
|
@@ -104,7 +104,7 @@ class m extends LibComponent<LibImageProps, LibImageState> {
|
|
|
104
104
|
|
|
105
105
|
static fromCamera(options?: LibImageCameraOptions): Promise<string> {
|
|
106
106
|
return new Promise((_r) => {
|
|
107
|
-
|
|
107
|
+
const timer = setTimeout(async () => {
|
|
108
108
|
const cameraPermission = await ImagePicker.getCameraPermissionsAsync();
|
|
109
109
|
var finalStatus = cameraPermission.status
|
|
110
110
|
if (finalStatus !== 'granted') {
|
|
@@ -144,13 +144,14 @@ class m extends LibComponent<LibImageProps, LibImageState> {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
})
|
|
147
|
+
clearTimeout(timer)
|
|
147
148
|
}, 1);
|
|
148
149
|
})
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
static fromGallery(options?: LibImageGalleryOptions): Promise<string | string[]> {
|
|
152
153
|
return new Promise((_r) => {
|
|
153
|
-
|
|
154
|
+
const timer= setTimeout(async () => {
|
|
154
155
|
const { status } = await ImagePicker.getMediaLibraryPermissionsAsync();
|
|
155
156
|
var finalStatus = status
|
|
156
157
|
if (finalStatus !== 'granted') {
|
|
@@ -231,6 +232,7 @@ class m extends LibComponent<LibImageProps, LibImageState> {
|
|
|
231
232
|
}, 1)
|
|
232
233
|
});
|
|
233
234
|
})
|
|
235
|
+
clearTimeout(timer)
|
|
234
236
|
}, 1)
|
|
235
237
|
})
|
|
236
238
|
}
|
|
@@ -255,7 +257,7 @@ class m extends LibComponent<LibImageProps, LibImageState> {
|
|
|
255
257
|
}
|
|
256
258
|
}
|
|
257
259
|
|
|
258
|
-
|
|
260
|
+
const timer= setTimeout(async () => {
|
|
259
261
|
const manipImage = await ImageManipulator.manipulateAsync(
|
|
260
262
|
result.uri,
|
|
261
263
|
doResize ? [{ resize: { width: wantedwidth, height: wantedheight } }] : [],
|
|
@@ -270,6 +272,7 @@ class m extends LibComponent<LibImageProps, LibImageState> {
|
|
|
270
272
|
LibProgress.hide()
|
|
271
273
|
r(msg.message);
|
|
272
274
|
}, 1)
|
|
275
|
+
clearTimeout(timer)
|
|
273
276
|
}, 1);
|
|
274
277
|
}
|
|
275
278
|
})
|
|
@@ -333,22 +336,24 @@ class m extends LibComponent<LibImageProps, LibImageState> {
|
|
|
333
336
|
{
|
|
334
337
|
image ?
|
|
335
338
|
<TouchableOpacity onPress={() => {
|
|
336
|
-
setTimeout(
|
|
339
|
+
const timer = setTimeout(
|
|
337
340
|
async () => {
|
|
338
341
|
let imageUri = await m.processImage(image, maxDimension)
|
|
339
342
|
m.setResult(imageUri)
|
|
340
343
|
this.setState({ image: null })
|
|
344
|
+
clearTimeout(timer)
|
|
341
345
|
});
|
|
342
346
|
}} >
|
|
343
347
|
<LibIcon.Ionicons name='ios-checkmark-circle' style={{ fontSize: 40, color: 'white' }} />
|
|
344
348
|
</TouchableOpacity>
|
|
345
349
|
:
|
|
346
350
|
<TouchableOpacity onPress={() => {
|
|
347
|
-
|
|
351
|
+
const timer = setTimeout(
|
|
348
352
|
async () => {
|
|
349
353
|
m.hide()
|
|
350
354
|
this.setState({ image: null })
|
|
351
355
|
});
|
|
356
|
+
clearTimeout(timer)
|
|
352
357
|
}} >
|
|
353
358
|
<LibIcon.Ionicons name='ios-close-circle' style={{ fontSize: 40, color: 'white' }} />
|
|
354
359
|
</TouchableOpacity>
|
package/modules/lib/input.tsx
CHANGED
|
@@ -179,10 +179,11 @@ export default class m extends LibComponent<LibInputProps, LibInputState>{
|
|
|
179
179
|
|
|
180
180
|
componentDidMount(): void {
|
|
181
181
|
super.componentDidMount()
|
|
182
|
-
|
|
182
|
+
const timer = setTimeout(() => {
|
|
183
183
|
if (this.props.defaultValue) {
|
|
184
184
|
this.setText(this.props.defaultValue)
|
|
185
185
|
}
|
|
186
|
+
clearTimeout(timer)
|
|
186
187
|
});
|
|
187
188
|
}
|
|
188
189
|
|
package/modules/lib/lazy.tsx
CHANGED
|
@@ -35,8 +35,9 @@ export default function m(props: LibLazyProps): any {
|
|
|
35
35
|
InteractionManager.runAfterInteractions(() => {
|
|
36
36
|
startTransition(() => {
|
|
37
37
|
item(true)
|
|
38
|
-
|
|
38
|
+
const timer = setTimeout(() => {
|
|
39
39
|
next()
|
|
40
|
+
clearTimeout(timer)
|
|
40
41
|
}, 50);
|
|
41
42
|
})
|
|
42
43
|
})
|
|
@@ -194,13 +194,15 @@ export default {
|
|
|
194
194
|
const data = this.getData(notification)
|
|
195
195
|
function doOpen(data: any) {
|
|
196
196
|
if (!LibNavigation.getIsReady()) {
|
|
197
|
-
|
|
197
|
+
const timer = setTimeout(() => {
|
|
198
198
|
doOpen(data)
|
|
199
|
+
clearTimeout(timer)
|
|
199
200
|
}, 300);
|
|
200
201
|
return
|
|
201
202
|
} else {
|
|
202
|
-
|
|
203
|
+
const timer = setTimeout(() => {
|
|
203
204
|
this.openPushNotif(data)
|
|
205
|
+
clearTimeout(timer)
|
|
204
206
|
}, 0)
|
|
205
207
|
}
|
|
206
208
|
}
|
|
@@ -283,19 +285,21 @@ export default {
|
|
|
283
285
|
} else {
|
|
284
286
|
btns.push({ text: "OK", onPress: () => { }, style: "cancel" })
|
|
285
287
|
}
|
|
286
|
-
|
|
288
|
+
const timer = setTimeout(() => {
|
|
287
289
|
Alert.alert(
|
|
288
290
|
param.title,
|
|
289
291
|
param.message,
|
|
290
292
|
btns, { cancelable: false }
|
|
291
293
|
)
|
|
294
|
+
clearTimeout(timer)
|
|
292
295
|
}, 10)
|
|
293
296
|
break;
|
|
294
297
|
case "default":
|
|
295
298
|
if (param.module && param.module != "") {
|
|
296
299
|
if (!String(param.module).includes("/")) param.module = param.module + "/index"
|
|
297
|
-
|
|
300
|
+
const timer = setTimeout(() => {
|
|
298
301
|
LibNavigation.navigate(param.module, param.params)
|
|
302
|
+
clearTimeout(timer)
|
|
299
303
|
}, 10)
|
|
300
304
|
}
|
|
301
305
|
break;
|
|
@@ -315,20 +319,22 @@ export default {
|
|
|
315
319
|
} else {
|
|
316
320
|
btns.push({ text: "OK", onPress: () => { }, style: "cancel" })
|
|
317
321
|
}
|
|
318
|
-
|
|
322
|
+
const timer = setTimeout(() => {
|
|
319
323
|
Alert.alert(
|
|
320
324
|
data.title,
|
|
321
325
|
data.message,
|
|
322
326
|
btns,
|
|
323
327
|
{ cancelable: false }
|
|
324
328
|
)
|
|
329
|
+
clearTimeout(timer)
|
|
325
330
|
}, 10)
|
|
326
331
|
break;
|
|
327
332
|
case "default":
|
|
328
333
|
if (param.module != "") {
|
|
329
334
|
if (!String(param.module).includes("/")) param.module = param.module + "/index"
|
|
330
|
-
|
|
335
|
+
const timer = setTimeout(() => {
|
|
331
336
|
LibNavigation.navigate(param.module, param.arguments)
|
|
337
|
+
clearTimeout(timer)
|
|
332
338
|
}, 10)
|
|
333
339
|
}
|
|
334
340
|
break;
|
package/modules/lib/pin.tsx
CHANGED
|
@@ -17,7 +17,7 @@ export default function m(props: LibPinProps): any {
|
|
|
17
17
|
const input = useRef<TextInput>(null)
|
|
18
18
|
|
|
19
19
|
useEffect(() => {
|
|
20
|
-
|
|
20
|
+
const timer = setTimeout(() => { input?.current?.focus() ; clearTimeout(timer)}, 100);
|
|
21
21
|
setPin(props?.pinValue?.split?.(''))
|
|
22
22
|
props.onChangePin(props?.pinValue || '')
|
|
23
23
|
}, [props.pinValue])
|
|
@@ -50,8 +50,9 @@ export default class m extends LibComponent<LibScrollpickerProps, LibScrollpicke
|
|
|
50
50
|
componentDidMount() {
|
|
51
51
|
super.componentDidMount()
|
|
52
52
|
if (this.props.selectedIndex) {
|
|
53
|
-
|
|
53
|
+
const timer = setTimeout(() => {
|
|
54
54
|
this.scrollToIndex(this.props.selectedIndex);
|
|
55
|
+
clearTimeout(timer)
|
|
55
56
|
}, 0);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
@@ -46,8 +46,9 @@ export default class m extends LibComponent<LibSlidingupProps, LibSlidingupState
|
|
|
46
46
|
Keyboard.dismiss()
|
|
47
47
|
if (this.props.children) {
|
|
48
48
|
this.setState({ show: true }, () => {
|
|
49
|
-
|
|
49
|
+
const timer = setTimeout(() => {
|
|
50
50
|
this._toggleSubview(true)
|
|
51
|
+
clearTimeout(timer)
|
|
51
52
|
}, 1);
|
|
52
53
|
})
|
|
53
54
|
}
|
package/modules/lib/toast.tsx
CHANGED
package/modules/lib/webview.tsx
CHANGED
|
@@ -142,11 +142,13 @@ class ewebview extends LibComponent<LibWebviewProps, LibWebviewState> {
|
|
|
142
142
|
}}
|
|
143
143
|
injectedJavaScript={'window.ReactNativeWebView.postMessage(document.body.scrollWidth+"-"+document.body.scrollHeight)'}
|
|
144
144
|
onLoadEnd={() => {
|
|
145
|
-
if (this.props.onFinishLoad !== undefined)
|
|
146
|
-
|
|
145
|
+
if (this.props.onFinishLoad !== undefined){
|
|
146
|
+
const timer = setTimeout(() => {
|
|
147
147
|
this.setState({ isFinish: true })
|
|
148
148
|
this.props.onFinishLoad()
|
|
149
|
+
clearTimeout(timer)
|
|
149
150
|
}, 1000)
|
|
151
|
+
}
|
|
150
152
|
}}
|
|
151
153
|
style={[{ width: width, height: this.state.height }, style !== undefined ? style : {}]}
|
|
152
154
|
scrollEnabled={scrollEnabled !== undefined ? scrollEnabled : false}
|