@jescon-technologies/react-native-ui-kit 0.0.18 → 0.0.20
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/index.d.ts +0 -4
- package/index.js +0 -4
- package/package.json +1 -1
- package/src/Alerts/AAlert.tsx +1 -1
- package/src/Alerts/AAlertIOS.tsx +1 -1
- package/src/Common/ErrorBoundary.tsx +1 -2
- package/src/Common/NetworkServiceCall.ts +197 -229
- package/src/CommonStyle/ComponentFunctions.tsx +68 -36
- package/src/Components/SDropDown.tsx +31 -6
- package/src/Custom/CSliderMenu.tsx +14 -3
- package/src/Custom/Loader.tsx +1 -1
- package/src/Custom/OUserView.tsx +1 -1
- package/src/CustomComponents/CBackHandler.tsx +1 -1
- package/src/CustomComponents/CDetailView.tsx +1 -1
- package/src/CustomComponents/CNetworkStatus.tsx +1 -1
- package/src/CustomComponents/COverlay.tsx +1 -1
- package/src/CustomComponents/HeaderBlock.tsx +1 -1
- package/src/Hoc/HDashboard.tsx +1 -1
- package/src/StaticComponents/SDateTimePicker.tsx +1 -1
- package/src/StaticComponents/SSearchBar.tsx +1 -1
- package/src/CommonStyle/PopupStyle.ts +0 -161
- package/src/CommonStyle/commonStyle.tsx +0 -101
- package/src/CommonStyle/componentStyle.ts +0 -651
- package/src/CommonStyle/optionListStyles.ts +0 -191
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import ComponentStyles from '../CommonStyle/componentStyle';
|
|
2
|
-
import { colors, fontWeight } from '../CommonStyle/commonStyle';
|
|
3
1
|
import {
|
|
4
2
|
ToastAndroid,
|
|
5
3
|
Platform,
|
|
@@ -9,15 +7,12 @@ import {
|
|
|
9
7
|
DeviceEventEmitter,
|
|
10
8
|
PixelRatio,
|
|
11
9
|
Dimensions,
|
|
12
|
-
View,
|
|
13
|
-
Image,
|
|
14
10
|
ViewStyle,
|
|
15
11
|
TextStyle,
|
|
16
12
|
ImageStyle,
|
|
17
13
|
} from 'react-native';
|
|
18
14
|
import NetInfo from '@react-native-community/netinfo';
|
|
19
15
|
import { Global } from '../../../../../src/Common/Global';
|
|
20
|
-
;
|
|
21
16
|
import React from 'react';
|
|
22
17
|
|
|
23
18
|
const {
|
|
@@ -26,6 +21,7 @@ const {
|
|
|
26
21
|
} = Dimensions.get('window');
|
|
27
22
|
|
|
28
23
|
const scale = SCREEN_WIDTH / 320;
|
|
24
|
+
const radio_height = 20;
|
|
29
25
|
|
|
30
26
|
// Type definitions
|
|
31
27
|
interface ShadowStyle {
|
|
@@ -50,6 +46,24 @@ interface NetInfoState {
|
|
|
50
46
|
details?: any;
|
|
51
47
|
}
|
|
52
48
|
|
|
49
|
+
// Utility Functions
|
|
50
|
+
export function normalize(size: number): number {
|
|
51
|
+
const newSize = scale < 1.5 ? size * scale : size * 1.6;
|
|
52
|
+
if (Platform.OS === 'ios') {
|
|
53
|
+
return Math.round(PixelRatio.roundToNearestPixel(newSize)) - 2;
|
|
54
|
+
} else {
|
|
55
|
+
return Math.round(PixelRatio.roundToNearestPixel(newSize)) - 2;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function width(itemwidth: number): number {
|
|
60
|
+
return SCREEN_WIDTH * (itemwidth / 100);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function height(itemheight: number): number {
|
|
64
|
+
return SCREEN_HEIGHT * (itemheight / 100);
|
|
65
|
+
}
|
|
66
|
+
|
|
53
67
|
// Shadow Functions
|
|
54
68
|
export function CButtonShadow(): ShadowStyle {
|
|
55
69
|
const isAndroidBelow9 = Platform.OS === 'android' && Platform.Version < 28;
|
|
@@ -99,24 +113,12 @@ export function CShadowDynamic(
|
|
|
99
113
|
};
|
|
100
114
|
}
|
|
101
115
|
|
|
102
|
-
|
|
103
116
|
export function Loader(): React.JSX.Element {
|
|
104
117
|
return (
|
|
105
118
|
<ActivityIndicator size={normalize(30)} style={{ marginTop: normalize(10) }} color="red" />
|
|
106
119
|
);
|
|
107
120
|
}
|
|
108
121
|
|
|
109
|
-
// Utility Functions
|
|
110
|
-
export function normalize(size: number): number {
|
|
111
|
-
const newSize = scale < 1.5 ? size * scale : size * 1.6;
|
|
112
|
-
if (Platform.OS === 'ios') {
|
|
113
|
-
return Math.round(PixelRatio.roundToNearestPixel(newSize)) - 2;
|
|
114
|
-
} else {
|
|
115
|
-
return Math.round(PixelRatio.roundToNearestPixel(newSize)) - 2;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
122
|
// Value Check Functions
|
|
121
123
|
export function isBNU(i: any): boolean {
|
|
122
124
|
return (i && i != null && i != undefined ? true : false);
|
|
@@ -293,8 +295,12 @@ export function isConnected(): Promise<void> {
|
|
|
293
295
|
// Footer Functions
|
|
294
296
|
export function getFooterIcon(opacity: number): ViewStyle {
|
|
295
297
|
return {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
+
height: 25,
|
|
299
|
+
width: 25,
|
|
300
|
+
alignItems: 'center',
|
|
301
|
+
alignSelf: 'center',
|
|
302
|
+
opacity: 0.9,
|
|
303
|
+
...{ opacity: opacity },
|
|
298
304
|
};
|
|
299
305
|
}
|
|
300
306
|
|
|
@@ -307,7 +313,8 @@ export function notifyMessage(msg: string, type?: any): void {
|
|
|
307
313
|
|
|
308
314
|
export function getFooterIconText(opacity: number, color: string): TextStyle {
|
|
309
315
|
return {
|
|
310
|
-
|
|
316
|
+
textAlign: 'center',
|
|
317
|
+
fontSize: normalize(6),
|
|
311
318
|
opacity: opacity,
|
|
312
319
|
color: color,
|
|
313
320
|
};
|
|
@@ -316,7 +323,9 @@ export function getFooterIconText(opacity: number, color: string): TextStyle {
|
|
|
316
323
|
// Header Functions
|
|
317
324
|
export function getHeaderBlockContainer(width: number): ViewStyle {
|
|
318
325
|
return {
|
|
319
|
-
|
|
326
|
+
backgroundColor: '#0E2F56',
|
|
327
|
+
justifyContent: 'flex-end',
|
|
328
|
+
padding: 10,
|
|
320
329
|
width: width,
|
|
321
330
|
paddingTop: '5%',
|
|
322
331
|
};
|
|
@@ -340,16 +349,16 @@ export function getResultViewObservedvalueTextvalidate(
|
|
|
340
349
|
case 'integer':
|
|
341
350
|
case 'numeric':
|
|
342
351
|
if (minvalue != null && minvalue != undefined && value < minvalue) {
|
|
343
|
-
return
|
|
352
|
+
return '#283747';
|
|
344
353
|
}
|
|
345
354
|
else if (maxvalue != null && maxvalue != undefined && value > maxvalue) {
|
|
346
|
-
return
|
|
355
|
+
return '#283747';
|
|
347
356
|
}
|
|
348
357
|
else {
|
|
349
|
-
return
|
|
358
|
+
return '#283747';
|
|
350
359
|
}
|
|
351
360
|
default:
|
|
352
|
-
return
|
|
361
|
+
return '#283747';
|
|
353
362
|
}
|
|
354
363
|
}
|
|
355
364
|
|
|
@@ -414,7 +423,7 @@ export function getProfileContentLogo2(): TextStyle {
|
|
|
414
423
|
export function getProfilecardSubheadingTop(color: string): TextStyle {
|
|
415
424
|
return {
|
|
416
425
|
fontSize: normalize(10),
|
|
417
|
-
fontWeight:
|
|
426
|
+
fontWeight: '700',
|
|
418
427
|
color: color,
|
|
419
428
|
paddingBottom: 0,
|
|
420
429
|
paddingTop: 2,
|
|
@@ -424,7 +433,7 @@ export function getProfilecardSubheadingTop(color: string): TextStyle {
|
|
|
424
433
|
export function getProfilecardSubheadingBottom(color: string, position: string): TextStyle {
|
|
425
434
|
return {
|
|
426
435
|
fontSize: normalize(10),
|
|
427
|
-
fontWeight:
|
|
436
|
+
fontWeight: '100',
|
|
428
437
|
color: color,
|
|
429
438
|
paddingLeft: position == 'right' ? 5 : 0,
|
|
430
439
|
paddingRight: position == 'left' ? 5 : 0,
|
|
@@ -434,7 +443,7 @@ export function getProfilecardSubheadingBottom(color: string, position: string):
|
|
|
434
443
|
export function getProfilecardMobileNO(color: string, position: string): TextStyle {
|
|
435
444
|
return {
|
|
436
445
|
fontSize: normalize(12),
|
|
437
|
-
fontWeight:
|
|
446
|
+
fontWeight: 'bold',
|
|
438
447
|
color: color,
|
|
439
448
|
paddingLeft: position == 'right' ? 5 : 0,
|
|
440
449
|
paddingRight: position == 'left' ? 5 : 0,
|
|
@@ -464,14 +473,25 @@ export function getGroupButtonView(width: number): ViewStyle {
|
|
|
464
473
|
// Media Functions
|
|
465
474
|
export function getMediaoverlayContainerStyle(height: number): ViewStyle {
|
|
466
475
|
return {
|
|
467
|
-
|
|
476
|
+
position: 'absolute',
|
|
477
|
+
left: 0,
|
|
478
|
+
right: 0,
|
|
479
|
+
elevation: 999,
|
|
480
|
+
alignItems: 'center',
|
|
481
|
+
zIndex: 10000,
|
|
482
|
+
backgroundColor: 'rgba(0, 0, 0, 0.50)',
|
|
483
|
+
justifyContent: 'flex-end',
|
|
484
|
+
flex: 1,
|
|
468
485
|
height: height,
|
|
469
486
|
};
|
|
470
487
|
}
|
|
471
488
|
|
|
472
489
|
export function getMediaViewContainer(width: number, height: number, itemwidth: number): ViewStyle {
|
|
473
490
|
return {
|
|
474
|
-
|
|
491
|
+
justifyContent: 'center',
|
|
492
|
+
alignContent: 'center',
|
|
493
|
+
alignItems: 'center',
|
|
494
|
+
flexDirection: 'column',
|
|
475
495
|
width: width * (itemwidth / 100),
|
|
476
496
|
margin: height * 0.003,
|
|
477
497
|
};
|
|
@@ -482,7 +502,7 @@ export function getMediaViewChildContainer(width: number, itemwidth: number): Vi
|
|
|
482
502
|
borderWidth: 0.5,
|
|
483
503
|
borderRadius: 2,
|
|
484
504
|
width: width * (itemwidth / 100),
|
|
485
|
-
borderColor:
|
|
505
|
+
borderColor: '#606266',
|
|
486
506
|
};
|
|
487
507
|
}
|
|
488
508
|
|
|
@@ -507,7 +527,10 @@ export function getMediaoverlayChildrenwrapperStyle(
|
|
|
507
527
|
|
|
508
528
|
export function getMediaoverlayTopLineContainer(width: number, height: number): ViewStyle {
|
|
509
529
|
return {
|
|
510
|
-
|
|
530
|
+
justifyContent: 'center',
|
|
531
|
+
alignContent: 'center',
|
|
532
|
+
alignItems: 'center',
|
|
533
|
+
flexDirection: 'column',
|
|
511
534
|
width: width * 0.15,
|
|
512
535
|
height: height * 0.02,
|
|
513
536
|
};
|
|
@@ -515,7 +538,10 @@ export function getMediaoverlayTopLineContainer(width: number, height: number):
|
|
|
515
538
|
|
|
516
539
|
export function getMediaoverlayOptionRow(width: number, height: number): ViewStyle {
|
|
517
540
|
return {
|
|
518
|
-
|
|
541
|
+
flexDirection: 'row',
|
|
542
|
+
justifyContent: 'space-around',
|
|
543
|
+
alignContent: 'center',
|
|
544
|
+
alignItems: 'center',
|
|
519
545
|
borderRadius: 14,
|
|
520
546
|
marginTop: height * 0.02,
|
|
521
547
|
width: width * 0.90,
|
|
@@ -524,7 +550,10 @@ export function getMediaoverlayOptionRow(width: number, height: number): ViewSty
|
|
|
524
550
|
|
|
525
551
|
export function getMediaoverlayOptionContainer(width: number, height: number): ViewStyle {
|
|
526
552
|
return {
|
|
527
|
-
|
|
553
|
+
justifyContent: 'center',
|
|
554
|
+
alignContent: 'center',
|
|
555
|
+
alignItems: 'center',
|
|
556
|
+
flexDirection: 'column',
|
|
528
557
|
margin: 5,
|
|
529
558
|
height: height * 0.1,
|
|
530
559
|
width: width * 0.20,
|
|
@@ -534,7 +563,10 @@ export function getMediaoverlayOptionContainer(width: number, height: number): V
|
|
|
534
563
|
export function getMediaoverlayMsgorLoaderView(height: number): ViewStyle {
|
|
535
564
|
return {
|
|
536
565
|
height: height,
|
|
537
|
-
|
|
566
|
+
justifyContent: 'center',
|
|
567
|
+
alignContent: 'center',
|
|
568
|
+
alignItems: 'center',
|
|
569
|
+
flexDirection: 'column',
|
|
538
570
|
};
|
|
539
571
|
}
|
|
540
572
|
|
|
@@ -553,7 +585,7 @@ export function getMediaGalleryDeleteView(width: number, height: number): ViewSt
|
|
|
553
585
|
borderRadius: 2,
|
|
554
586
|
height: height / 5,
|
|
555
587
|
width: width * 0.90,
|
|
556
|
-
borderColor:
|
|
588
|
+
borderColor: '#606266',
|
|
557
589
|
alignItems: 'center',
|
|
558
590
|
justifyContent: 'center',
|
|
559
591
|
};
|
|
@@ -14,13 +14,11 @@ import {
|
|
|
14
14
|
ViewStyle,
|
|
15
15
|
TextStyle,
|
|
16
16
|
} from 'react-native';
|
|
17
|
-
import { getListviewItem, getListviewItemText } from '../CommonStyle/PopupStyle';
|
|
18
17
|
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
19
18
|
import Loader from '../Custom/Loader';
|
|
20
19
|
import { isBNU, isBNUL, isNU, normalize } from '../CommonStyle/ComponentFunctions';
|
|
21
20
|
import NetworkServiceCall from '../Common/NetworkServiceCall';
|
|
22
21
|
import HIcons from '../Hoc/HIcons';
|
|
23
|
-
import { colors } from '../CommonStyle/commonStyle';
|
|
24
22
|
import { Global } from '../../../../../src/Common/Global';
|
|
25
23
|
import { Menu, MenuOptions, MenuTrigger } from 'react-native-popup-menu';
|
|
26
24
|
// import SHelpDescription from './SHelpDescription';
|
|
@@ -117,6 +115,33 @@ interface NetworkResponse {
|
|
|
117
115
|
};
|
|
118
116
|
}
|
|
119
117
|
|
|
118
|
+
// ---------------------------------------------------------------------------
|
|
119
|
+
// Hardcoded helpers (originally from ../CommonStyle/PopupStyle)
|
|
120
|
+
// NOTE: ComponentStyles.select_TextStyle spread has been replaced by the
|
|
121
|
+
// concrete values it contributed where known. If your original
|
|
122
|
+
// ComponentStyles.select_TextStyle provided additional properties (padding,
|
|
123
|
+
// fontSize, etc.), merge them back in here.
|
|
124
|
+
// ---------------------------------------------------------------------------
|
|
125
|
+
|
|
126
|
+
function getListviewItem(selected?: boolean, borderbottomwidth?: boolean): ViewStyle {
|
|
127
|
+
return {
|
|
128
|
+
borderColor: '#DCDEDD',
|
|
129
|
+
borderWidth: borderbottomwidth ? 0 : 1,
|
|
130
|
+
borderBottomWidth: 1,
|
|
131
|
+
width: '100%',
|
|
132
|
+
borderRadius: 7,
|
|
133
|
+
backgroundColor: selected ? 'lightblue' : '#fff', // colors.color_DeselectBgCOlor
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function getListviewItemText(selected?: boolean): TextStyle {
|
|
138
|
+
return {
|
|
139
|
+
// ...ComponentStyles.select_TextStyle, <-- hardcoded out; see note above
|
|
140
|
+
fontWeight: selected ? 'bold' : 'normal',
|
|
141
|
+
color: selected ? '#094485' : 'black',
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
120
145
|
// ---------------------------------------------------------------------------
|
|
121
146
|
// Module-scope scratch (matches original; NOT ideal but preserved for behavior)
|
|
122
147
|
// ---------------------------------------------------------------------------
|
|
@@ -649,7 +674,7 @@ const SDropDown: React.FC<SDropDownNewProps> = (props) => {
|
|
|
649
674
|
<View>
|
|
650
675
|
<Text style={{
|
|
651
676
|
fontSize: normalize(12),
|
|
652
|
-
color: colors.color_componentText
|
|
677
|
+
color: '#0C4F60', // colors.color_componentText
|
|
653
678
|
fontWeight: '800', alignItems: 'center', justifyContent: 'center',
|
|
654
679
|
}}>
|
|
655
680
|
No Result Found
|
|
@@ -795,7 +820,7 @@ const layoutstyles = StyleSheet.create({
|
|
|
795
820
|
fontSize: normalize(12),
|
|
796
821
|
fontWeight: 'bold',
|
|
797
822
|
paddingLeft: Dimensions.get('window').width * 0.02,
|
|
798
|
-
color: colors.color_PopupHeadingText
|
|
823
|
+
color: '#0C4F60', // colors.color_PopupHeadingText
|
|
799
824
|
width: '100%',
|
|
800
825
|
},
|
|
801
826
|
overlay_screen_container: {
|
|
@@ -819,7 +844,7 @@ const layoutstyles = StyleSheet.create({
|
|
|
819
844
|
searchTextbox_View: {
|
|
820
845
|
flexDirection: 'row',
|
|
821
846
|
borderWidth: 0,
|
|
822
|
-
borderColor: colors.color_componentBordercolor
|
|
847
|
+
borderColor: '#606266', // colors.color_componentBordercolor
|
|
823
848
|
justifyContent: 'flex-start',
|
|
824
849
|
alignItems: 'flex-start',
|
|
825
850
|
borderRadius: 7,
|
|
@@ -853,7 +878,7 @@ const layoutstyles = StyleSheet.create({
|
|
|
853
878
|
searchButtonText: {
|
|
854
879
|
fontSize: normalize(10),
|
|
855
880
|
fontWeight: 'bold',
|
|
856
|
-
color: colors.color_buttonText
|
|
881
|
+
color: '#fff', // colors.color_buttonText
|
|
857
882
|
padding: 1,
|
|
858
883
|
},
|
|
859
884
|
});
|
|
@@ -8,8 +8,7 @@ import {
|
|
|
8
8
|
Dimensions,
|
|
9
9
|
Platform,
|
|
10
10
|
} from 'react-native';
|
|
11
|
-
import
|
|
12
|
-
import { normalize } from '../CommonStyle/componentStyle';
|
|
11
|
+
import { normalize} from '../CommonStyle/ComponentFunctions';
|
|
13
12
|
import RNExitApp from 'react-native-exit-app';
|
|
14
13
|
import { Global, GlobalUserData } from '../../../../../src/Common/Global';
|
|
15
14
|
import { imageURL } from '../../../../../src/Common/apiConstants';
|
|
@@ -209,9 +208,21 @@ function CSliderMenu(props: CSliderMenuProps): React.ReactElement {
|
|
|
209
208
|
}
|
|
210
209
|
|
|
211
210
|
// ---------------------------------------------------------------------------
|
|
212
|
-
// Styles
|
|
211
|
+
// Styles (inlined from optionListStyles.ts)
|
|
213
212
|
// ---------------------------------------------------------------------------
|
|
214
213
|
|
|
214
|
+
const styles = StyleSheet.create({
|
|
215
|
+
usernameStyle: {
|
|
216
|
+
color: '#fff',
|
|
217
|
+
fontSize: 16,
|
|
218
|
+
fontWeight: 'bold',
|
|
219
|
+
},
|
|
220
|
+
departmeNameStyle: {
|
|
221
|
+
color: '#C1C6D0',
|
|
222
|
+
fontSize: 12,
|
|
223
|
+
},
|
|
224
|
+
});
|
|
225
|
+
|
|
215
226
|
const layoutstyles = StyleSheet.create({
|
|
216
227
|
option_text_container: {
|
|
217
228
|
justifyContent: 'center',
|
package/src/Custom/Loader.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
StyleProp,
|
|
13
13
|
TextStyle,
|
|
14
14
|
} from 'react-native';
|
|
15
|
-
import { normalize
|
|
15
|
+
import { normalize} from '../CommonStyle/ComponentFunctions';
|
|
16
16
|
import { APIURL } from '../../../../../src/Common/apiConstants';
|
|
17
17
|
|
|
18
18
|
// ---------------------------------------------------------------------------
|
package/src/Custom/OUserView.tsx
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from 'react-native';
|
|
14
14
|
import { Global } from '../../../../../src/Common/Global';
|
|
15
15
|
;
|
|
16
|
-
import { normalize
|
|
16
|
+
import { normalize} from '../CommonStyle/ComponentFunctions';
|
|
17
17
|
import { isPermitted, notifyMessage, ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
18
18
|
import Barcode from '@kichiyaki/react-native-barcode-generator';
|
|
19
19
|
import { useNavigation } from '../Navigation/useNavigation';
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from 'react-native';
|
|
13
13
|
import { Global } from '../../../../../src/Common/Global';
|
|
14
14
|
;
|
|
15
|
-
import { normalize
|
|
15
|
+
import { normalize} from '../CommonStyle/ComponentFunctions';
|
|
16
16
|
import Svg, { Rect, Defs, LinearGradient, Stop } from 'react-native-svg';
|
|
17
17
|
import HIcons from '../Hoc/HIcons';
|
|
18
18
|
import CModalOverlay from './CModalOverlay';
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from 'react-native';
|
|
12
12
|
import { Global } from '../../../../../src/Common/Global';
|
|
13
13
|
// import CSwipeCard from '../Components/CSwipeCard';
|
|
14
|
-
import { normalize } from '../CommonStyle/
|
|
14
|
+
import { normalize } from '../CommonStyle/ComponentFunctions';
|
|
15
15
|
import { useNavigation } from '../Navigation/useNavigation';
|
|
16
16
|
// ---------------------------------------------------------------------------
|
|
17
17
|
// Types
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { View, Text, StyleSheet } from 'react-native';
|
|
3
3
|
import NetInfo, { NetInfoState, NetInfoStateType } from '@react-native-community/netinfo';
|
|
4
|
-
import { normalize
|
|
4
|
+
import { normalize} from '../CommonStyle/ComponentFunctions';
|
|
5
5
|
import HIcons from '../Hoc/HIcons';
|
|
6
6
|
import ABlink from '../Alerts/ABlink';
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
StyleProp,
|
|
10
10
|
ViewStyle,
|
|
11
11
|
} from 'react-native';
|
|
12
|
-
import { normalize
|
|
12
|
+
import { normalize} from '../CommonStyle/ComponentFunctions';
|
|
13
13
|
import { Global } from '../../../../../src/Common/Global';
|
|
14
14
|
;
|
|
15
15
|
import HIcons from '../Hoc/HIcons';
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
DimensionValue,
|
|
19
19
|
} from 'react-native';
|
|
20
20
|
import CSliderMenu from '../Custom/CSliderMenu';
|
|
21
|
-
import { normalize
|
|
21
|
+
import { normalize} from '../CommonStyle/ComponentFunctions';
|
|
22
22
|
import { useNotifications } from '../Handlers/NotificationsContext';
|
|
23
23
|
import moment from 'moment';
|
|
24
24
|
import { ValueCheck } from '../CommonStyle/ComponentFunctions';
|
package/src/Hoc/HDashboard.tsx
CHANGED
|
@@ -30,7 +30,7 @@ import NetworkServiceCall from '../Common/NetworkServiceCall';
|
|
|
30
30
|
import { notifyMessage } from '../CommonStyle/ComponentFunctions';
|
|
31
31
|
import HShadowButton from './HShadowButton';
|
|
32
32
|
import HIcons from './HIcons';
|
|
33
|
-
import { normalize
|
|
33
|
+
import { normalize} from '../CommonStyle/ComponentFunctions';
|
|
34
34
|
import { Global } from '../../../../../src/Common/Global';
|
|
35
35
|
;
|
|
36
36
|
import SDateTimePicker from '../StaticComponents/SDateTimePicker';
|
|
@@ -13,7 +13,7 @@ import DateTimePicker, {
|
|
|
13
13
|
} from '@react-native-community/datetimepicker';
|
|
14
14
|
import HIcons from '../Hoc/HIcons';
|
|
15
15
|
import moment from 'moment';
|
|
16
|
-
import { normalize
|
|
16
|
+
import { normalize} from '../CommonStyle/ComponentFunctions';
|
|
17
17
|
import { isNU, ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
18
18
|
import { Global } from '../../../../../src/Common/Global';
|
|
19
19
|
;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ViewStyle,
|
|
10
10
|
Dimensions,
|
|
11
11
|
} from 'react-native';
|
|
12
|
-
import { normalize
|
|
12
|
+
import { normalize} from '../CommonStyle/ComponentFunctions';
|
|
13
13
|
import { ValueCheck } from '../CommonStyle/ComponentFunctions';
|
|
14
14
|
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { StyleSheet, ViewStyle, TextStyle } from 'react-native';
|
|
2
|
-
import ComponentStyles, { normalize } from '../CommonStyle/componentStyle';
|
|
3
|
-
import { colors } from '../CommonStyle/commonStyle';
|
|
4
|
-
|
|
5
|
-
// ---------------------------------------------------------------------------
|
|
6
|
-
// Helper factories
|
|
7
|
-
// ---------------------------------------------------------------------------
|
|
8
|
-
|
|
9
|
-
export function getSearchButtonStyle(backgroundcolor?: string): ViewStyle {
|
|
10
|
-
return {
|
|
11
|
-
...ComponentStyles.searchButton,
|
|
12
|
-
width: '100%',
|
|
13
|
-
backgroundColor: backgroundcolor,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function getListviewItem(selected?: boolean, borderbottomwidth?: boolean): ViewStyle {
|
|
18
|
-
return {
|
|
19
|
-
borderColor: '#DCDEDD',
|
|
20
|
-
borderWidth: borderbottomwidth ? 0 : 1,
|
|
21
|
-
borderBottomWidth: 1,
|
|
22
|
-
width: '100%',
|
|
23
|
-
borderRadius: 7,
|
|
24
|
-
backgroundColor: selected ? 'lightblue' : colors.color_DeselectBgCOlor,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function getListviewItemText(selected?: boolean): TextStyle {
|
|
29
|
-
return {
|
|
30
|
-
...ComponentStyles.select_TextStyle,
|
|
31
|
-
fontWeight: selected ? 'bold' : 'normal',
|
|
32
|
-
color: selected ? '#094485' : 'black',
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export function getListviewItemText2(selected?: boolean): ViewStyle {
|
|
37
|
-
return {
|
|
38
|
-
// ...ComponentStyles.select_TextStyle,
|
|
39
|
-
// fontWeight: selected ? 'bold' : 'normal',
|
|
40
|
-
// color: selected ? '#094485' : 'black',
|
|
41
|
-
backgroundColor: selected ? '#ccd9ff' : 'white',
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function getPopupHeadingOption(width: number): ViewStyle {
|
|
46
|
-
return {
|
|
47
|
-
paddingBottom: 5,
|
|
48
|
-
flexDirection: 'row',
|
|
49
|
-
justifyContent: 'space-around',
|
|
50
|
-
width: width * 0.9,
|
|
51
|
-
margin: 5,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* NOTE: `color` argument is not used by the current implementation — the
|
|
57
|
-
* returned `color` is hard-coded to `'darkblue'`. Signature kept for parity
|
|
58
|
-
* with callers; consider removing the parameter.
|
|
59
|
-
*/
|
|
60
|
-
export function getPopupHeadingOptionText(_color?: string): TextStyle {
|
|
61
|
-
return {
|
|
62
|
-
...ComponentStyles.popup_heading,
|
|
63
|
-
color: 'darkblue',
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function getPopupContainerStyle(height: number): ViewStyle {
|
|
68
|
-
return {
|
|
69
|
-
borderRadius: 20,
|
|
70
|
-
height: height * 0.6,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* NOTE: both `width` and `height` are unused in the current implementation.
|
|
76
|
-
* Signature kept for parity with callers; consider dropping parameters.
|
|
77
|
-
*/
|
|
78
|
-
export function getPopupTextAreaContainer(_width?: number, _height?: number): ViewStyle {
|
|
79
|
-
return {
|
|
80
|
-
justifyContent: 'center',
|
|
81
|
-
flex: 1,
|
|
82
|
-
alignItems: 'center',
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export function getPopupTextAreaChildContainer(
|
|
87
|
-
_width: number,
|
|
88
|
-
height: number,
|
|
89
|
-
bordercolor: string
|
|
90
|
-
): ViewStyle {
|
|
91
|
-
return {
|
|
92
|
-
flexDirection: 'row',
|
|
93
|
-
borderWidth: 1,
|
|
94
|
-
borderColor: bordercolor,
|
|
95
|
-
width: '80%',
|
|
96
|
-
justifyContent: 'flex-start',
|
|
97
|
-
alignItems: 'center',
|
|
98
|
-
borderRadius: 7,
|
|
99
|
-
margin: height * 0.003,
|
|
100
|
-
marginBottom: height * 0.003,
|
|
101
|
-
height: height * 0.3,
|
|
102
|
-
// ⚠️ Duplicate `backgroundColor` — the second (`'#fff'`) wins.
|
|
103
|
-
// Preserved to match runtime behavior; remove one.
|
|
104
|
-
backgroundColor: '#fff',
|
|
105
|
-
marginTop: 0,
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export function getPopupTextAreaStyle(_width: number, height: number): TextStyle {
|
|
110
|
-
return {
|
|
111
|
-
...ComponentStyles.input_Text,
|
|
112
|
-
textAlignVertical: 'top',
|
|
113
|
-
width: '98%',
|
|
114
|
-
marginLeft: '1%',
|
|
115
|
-
padding: 0,
|
|
116
|
-
height: '100%',
|
|
117
|
-
marginBottom: -(height * 0.003),
|
|
118
|
-
fontSize: normalize(14),
|
|
119
|
-
fontWeight: 'bold',
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// ---------------------------------------------------------------------------
|
|
124
|
-
// Static styles
|
|
125
|
-
// ---------------------------------------------------------------------------
|
|
126
|
-
|
|
127
|
-
const popupStyles = StyleSheet.create({
|
|
128
|
-
overlay_screen_listview_container: {
|
|
129
|
-
justifyContent: 'center',
|
|
130
|
-
marginBottom: 10,
|
|
131
|
-
},
|
|
132
|
-
overlay_screen_button_view: {
|
|
133
|
-
width: '99%',
|
|
134
|
-
marginTop: 20,
|
|
135
|
-
...ComponentStyles.View_row_center,
|
|
136
|
-
justifyContent: 'space-around',
|
|
137
|
-
},
|
|
138
|
-
overlay_screen_small_button_style: {
|
|
139
|
-
borderRadius: 7,
|
|
140
|
-
height: normalize(40),
|
|
141
|
-
backgroundColor: '#eae5e5',
|
|
142
|
-
width: normalize(60),
|
|
143
|
-
...ComponentStyles.View_col_center,
|
|
144
|
-
},
|
|
145
|
-
overlay_screen_big_button_style: {
|
|
146
|
-
backgroundColor: '#094485',
|
|
147
|
-
borderRadius: 7,
|
|
148
|
-
width: '100%',
|
|
149
|
-
marginBottom: 30,
|
|
150
|
-
height: 35,
|
|
151
|
-
alignItems: 'center',
|
|
152
|
-
justifyContent: 'center',
|
|
153
|
-
},
|
|
154
|
-
overlay_screen_button_text: {
|
|
155
|
-
fontSize: normalize(12),
|
|
156
|
-
fontWeight: '500',
|
|
157
|
-
color: 'black',
|
|
158
|
-
},
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
export default popupStyles;
|