@plusscommunities/pluss-core-app 1.4.9 → 1.5.0
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/dist/module/actions/FollowerActions.js +34 -0
- package/dist/module/actions/FollowerActions.js.map +1 -0
- package/dist/module/actions/MediaActions.js +20 -0
- package/dist/module/actions/MediaActions.js.map +1 -0
- package/dist/module/actions/ResidentActions.js +26 -0
- package/dist/module/actions/ResidentActions.js.map +1 -0
- package/dist/module/actions/UserActions.js +214 -0
- package/dist/module/actions/UserActions.js.map +1 -0
- package/dist/module/actions/index.js +5 -0
- package/dist/module/actions/index.js.map +1 -0
- package/dist/module/actions/types.js +14 -0
- package/dist/module/actions/types.js.map +1 -0
- package/dist/module/apis/analyticsActions.js +20 -0
- package/dist/module/apis/analyticsActions.js.map +1 -0
- package/dist/module/apis/contactActions.js +27 -0
- package/dist/module/apis/contactActions.js.map +1 -0
- package/dist/module/apis/eventActions.js +163 -0
- package/dist/module/apis/eventActions.js.map +1 -0
- package/dist/module/apis/fileActions.js +96 -0
- package/dist/module/apis/fileActions.js.map +1 -0
- package/dist/module/apis/followerActions.js +38 -0
- package/dist/module/apis/followerActions.js.map +1 -0
- package/dist/module/apis/index.js +11 -0
- package/dist/module/apis/index.js.map +1 -0
- package/dist/module/apis/notificationActions.js +60 -0
- package/dist/module/apis/notificationActions.js.map +1 -0
- package/dist/module/apis/profileActions.js +14 -0
- package/dist/module/apis/profileActions.js.map +1 -0
- package/dist/module/apis/reactionActions.js +78 -0
- package/dist/module/apis/reactionActions.js.map +1 -0
- package/dist/module/apis/typeActions.js +15 -0
- package/dist/module/apis/typeActions.js.map +1 -0
- package/dist/module/apis/userActions.js +104 -0
- package/dist/module/apis/userActions.js.map +1 -0
- package/{assets → dist/module/assets}/icons/reactions/heart.png +0 -0
- package/{assets → dist/module/assets}/icons/reactions/party.png +0 -0
- package/{assets → dist/module/assets}/icons/reactions/sad.png +0 -0
- package/{assets → dist/module/assets}/icons/reactions/smile.png +0 -0
- package/dist/module/colours.js +149 -0
- package/dist/module/colours.js.map +1 -0
- package/dist/module/components/AddButton.js +45 -0
- package/dist/module/components/AddButton.js.map +1 -0
- package/dist/module/components/Attachment.js +59 -0
- package/dist/module/components/Attachment.js.map +1 -0
- package/dist/module/components/AudienceSelectorLauncher.js +70 -0
- package/dist/module/components/AudienceSelectorLauncher.js.map +1 -0
- package/dist/module/components/AudienceSelectorPage.js +376 -0
- package/dist/module/components/AudienceSelectorPage.js.map +1 -0
- package/dist/module/components/BackButton.js +62 -0
- package/dist/module/components/BackButton.js.map +1 -0
- package/dist/module/components/CategoryTabs.js +171 -0
- package/dist/module/components/CategoryTabs.js.map +1 -0
- package/dist/module/components/CommentReply.js +363 -0
- package/dist/module/components/CommentReply.js.map +1 -0
- package/dist/module/components/CommentSection.js +785 -0
- package/dist/module/components/CommentSection.js.map +1 -0
- package/dist/module/components/ConfirmPopup.js +85 -0
- package/dist/module/components/ConfirmPopup.js.map +1 -0
- package/dist/module/components/ConfirmationPopup.js +77 -0
- package/dist/module/components/ConfirmationPopup.js.map +1 -0
- package/dist/module/components/DropDownItem.js +82 -0
- package/dist/module/components/DropDownItem.js.map +1 -0
- package/dist/module/components/DropDownMenu.js +46 -0
- package/dist/module/components/DropDownMenu.js.map +1 -0
- package/dist/module/components/EmptyStateMain.js +50 -0
- package/dist/module/components/EmptyStateMain.js.map +1 -0
- package/dist/module/components/EmptyStateWidget.js +52 -0
- package/dist/module/components/EmptyStateWidget.js.map +1 -0
- package/dist/module/components/FontScaleButton.js +37 -0
- package/dist/module/components/FontScaleButton.js.map +1 -0
- package/dist/module/components/FontScalePopup.js +77 -0
- package/dist/module/components/FontScalePopup.js.map +1 -0
- package/dist/module/components/FormCard.js +28 -0
- package/dist/module/components/FormCard.js.map +1 -0
- package/dist/module/components/FormCardSection.js +240 -0
- package/dist/module/components/FormCardSection.js.map +1 -0
- package/dist/module/components/FormCardSectionOptionLauncher.js +77 -0
- package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -0
- package/dist/module/components/FormattedText.js +145 -0
- package/dist/module/components/FormattedText.js.map +1 -0
- package/dist/module/components/GenericInput.js +161 -0
- package/dist/module/components/GenericInput.js.map +1 -0
- package/dist/module/components/GenericInputSection.js +174 -0
- package/dist/module/components/GenericInputSection.js.map +1 -0
- package/dist/module/components/Header.js +491 -0
- package/dist/module/components/Header.js.map +1 -0
- package/dist/module/components/ImagePopup.js +257 -0
- package/dist/module/components/ImagePopup.js.map +1 -0
- package/dist/module/components/ImageUploadProgress.js +72 -0
- package/dist/module/components/ImageUploadProgress.js.map +1 -0
- package/dist/module/components/ImageUploader.js +850 -0
- package/dist/module/components/ImageUploader.js.map +1 -0
- package/dist/module/components/InlineButton.js +72 -0
- package/dist/module/components/InlineButton.js.map +1 -0
- package/dist/module/components/Input.js +164 -0
- package/dist/module/components/Input.js.map +1 -0
- package/dist/module/components/LoadingCircles.js +224 -0
- package/dist/module/components/LoadingCircles.js.map +1 -0
- package/dist/module/components/LoadingIndicator.js +95 -0
- package/dist/module/components/LoadingIndicator.js.map +1 -0
- package/dist/module/components/LoadingStateWidget.js +51 -0
- package/dist/module/components/LoadingStateWidget.js.map +1 -0
- package/dist/module/components/MediaPlayer.js +440 -0
- package/dist/module/components/MediaPlayer.js.map +1 -0
- package/dist/module/components/MiddlePopup.js +46 -0
- package/dist/module/components/MiddlePopup.js.map +1 -0
- package/dist/module/components/PDFPopup.js +188 -0
- package/dist/module/components/PDFPopup.js.map +1 -0
- package/dist/module/components/PlussChat.js +997 -0
- package/dist/module/components/PlussChat.js.map +1 -0
- package/dist/module/components/PlussChatMessage.js +204 -0
- package/dist/module/components/PlussChatMessage.js.map +1 -0
- package/dist/module/components/PlussChatTime.js +66 -0
- package/dist/module/components/PlussChatTime.js.map +1 -0
- package/dist/module/components/Popup.js +138 -0
- package/dist/module/components/Popup.js.map +1 -0
- package/dist/module/components/PopupMenu.js +128 -0
- package/dist/module/components/PopupMenu.js.map +1 -0
- package/dist/module/components/PositionedImage.js +333 -0
- package/dist/module/components/PositionedImage.js.map +1 -0
- package/dist/module/components/ProfilePic.js +119 -0
- package/dist/module/components/ProfilePic.js.map +1 -0
- package/dist/module/components/RadioButton.js +84 -0
- package/dist/module/components/RadioButton.js.map +1 -0
- package/dist/module/components/Reaction.js +129 -0
- package/dist/module/components/Reaction.js.map +1 -0
- package/dist/module/components/Reactions.js +84 -0
- package/dist/module/components/Reactions.js.map +1 -0
- package/dist/module/components/SharingTools.js +162 -0
- package/dist/module/components/SharingTools.js.map +1 -0
- package/dist/module/components/Spinner.js +25 -0
- package/dist/module/components/Spinner.js.map +1 -0
- package/dist/module/components/StickyFooter.js +37 -0
- package/dist/module/components/StickyFooter.js.map +1 -0
- package/dist/module/components/TextStyle.js +34 -0
- package/dist/module/components/TextStyle.js.map +1 -0
- package/dist/module/components/Toggle.js +70 -0
- package/dist/module/components/Toggle.js.map +1 -0
- package/dist/module/components/TouchableSearchBar.js +73 -0
- package/dist/module/components/TouchableSearchBar.js.map +1 -0
- package/dist/module/components/UserListPopup.js +146 -0
- package/dist/module/components/UserListPopup.js.map +1 -0
- package/dist/module/components/UserListing.js +291 -0
- package/dist/module/components/UserListing.js.map +1 -0
- package/dist/module/components/VideoPopup.js +123 -0
- package/dist/module/components/VideoPopup.js.map +1 -0
- package/dist/module/components/WarningPopup.js +87 -0
- package/dist/module/components/WarningPopup.js.map +1 -0
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +325 -0
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -0
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js +123 -0
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -0
- package/dist/module/components/index.js +53 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +416 -0
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -0
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +405 -0
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -0
- package/dist/module/config.js +27 -0
- package/dist/module/config.js.map +1 -0
- package/dist/module/constants.js +16 -0
- package/dist/module/constants.js.map +1 -0
- package/dist/module/fonts/index.js +2 -0
- package/dist/module/fonts/index.js.map +1 -0
- package/dist/module/fonts/pluss60-icons.js +5 -0
- package/dist/module/fonts/pluss60-icons.js.map +1 -0
- package/dist/module/fonts/pluss60-icons.json +1097 -0
- package/dist/module/helper.js +436 -0
- package/dist/module/helper.js.map +1 -0
- package/dist/module/index.js +13 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/session.js +54 -0
- package/dist/module/session.js.map +1 -0
- package/dist/module/styles.js +67 -0
- package/dist/module/styles.js.map +1 -0
- package/package.json +22 -5
- package/src/assets/icons/reactions/heart.png +0 -0
- package/src/assets/icons/reactions/party.png +0 -0
- package/src/assets/icons/reactions/sad.png +0 -0
- package/src/assets/icons/reactions/smile.png +0 -0
- package/src/components/CommentReply.js +0 -2
- package/src/constants.js +4 -4
- package/src/helper.js +4 -4
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { Animated, View, StatusBar, Image, Dimensions, TouchableOpacity, Text, Platform } from 'react-native';
|
|
3
|
+
import { Icon } from 'react-native-elements';
|
|
4
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
5
|
+
import { connect } from 'react-redux'; // import {
|
|
6
|
+
// StatusBarHeight,
|
|
7
|
+
// COLOUR_TRANSPARENT,
|
|
8
|
+
// TEXT_DARK,
|
|
9
|
+
// TEXT_LIGHT,
|
|
10
|
+
// LINEGREY,
|
|
11
|
+
// COLOUR_GREEN,
|
|
12
|
+
// getMainBrandingColourFromState,
|
|
13
|
+
// hexToRGBAstring,
|
|
14
|
+
// getSiteSettingFromState,
|
|
15
|
+
// } from '../../js';
|
|
16
|
+
|
|
17
|
+
import { StatusBarHeight, getSiteSettingFromState } from '../helper';
|
|
18
|
+
import { COLOUR_TRANSPARENT, TEXT_DARK, TEXT_LIGHT, LINEGREY, COLOUR_GREEN, getMainBrandingColourFromState, hexToRGBAstring } from '../colours';
|
|
19
|
+
import { Pl60Icon } from '../fonts';
|
|
20
|
+
import Config from '../config'; // import { HAS_GRADIENT_HEADER } from '../../config';
|
|
21
|
+
|
|
22
|
+
class Header extends Component {
|
|
23
|
+
constructor(props) {
|
|
24
|
+
super(props);
|
|
25
|
+
this.state = {};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
UNSAFE_componentWillMount() {
|
|
29
|
+
let barStyle = Platform.select({
|
|
30
|
+
ios: 'dark-content',
|
|
31
|
+
android: 'default'
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
if (this.props.barStyle) {
|
|
35
|
+
barStyle = this.props.barStyle;
|
|
36
|
+
} else if (this.props.headerType !== 'white' && !this.props.noGradient && !this.props.transparent) {
|
|
37
|
+
barStyle = 'light-content';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
this.setState({
|
|
41
|
+
windowWidth: Dimensions.get('window').width,
|
|
42
|
+
barStyle
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
getTextColourStyle() {
|
|
47
|
+
if (this.props.textColour) {
|
|
48
|
+
return {
|
|
49
|
+
color: this.props.textColour
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (this.props.headerType !== 'white' && !this.props.noGradient && !this.props.transparent) {
|
|
54
|
+
return {
|
|
55
|
+
color: '#fff'
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
renderBackground() {
|
|
63
|
+
if (this.props.headerBackground) return this.props.headerBackground;
|
|
64
|
+
|
|
65
|
+
if (this.props.headerImage) {
|
|
66
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
67
|
+
style: [styles.thumbnailStyle, {
|
|
68
|
+
width: this.state.windowWidth
|
|
69
|
+
}],
|
|
70
|
+
source: {
|
|
71
|
+
uri: this.props.headerImage
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (this.props.headerType === 'pattern' && !this.props.noGradient && !this.props.transparent) {
|
|
77
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
78
|
+
style: [styles.thumbnailStyle, this.props.contentContainerStyle, {
|
|
79
|
+
backgroundColor: this.props.colourBrandingMain,
|
|
80
|
+
width: this.state.windowWidth
|
|
81
|
+
}, this.props.popupHeader && styles.thumbnailPopupHeader]
|
|
82
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
83
|
+
style: [styles.headerPattern, this.props.patternColour && {
|
|
84
|
+
tintColor: this.props.patternColour
|
|
85
|
+
}],
|
|
86
|
+
source: {
|
|
87
|
+
uri: this.props.headerPattern
|
|
88
|
+
}
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (this.props.headerType === 'block' && !this.props.noGradient && !this.props.transparent) {
|
|
93
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
94
|
+
style: [styles.thumbnailStyle, this.props.contentContainerStyle, {
|
|
95
|
+
backgroundColor: this.props.colourBrandingMain,
|
|
96
|
+
width: this.state.windowWidth
|
|
97
|
+
}, this.props.popupHeader && styles.thumbnailPopupHeader]
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (this.props.headerType === 'gradient' && !this.props.noGradient && !this.props.transparent) {
|
|
102
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
103
|
+
style: [styles.thumbnailStyle, this.props.contentContainerStyle, {
|
|
104
|
+
width: this.state.windowWidth
|
|
105
|
+
}, this.props.popupHeader && styles.thumbnailPopupHeader]
|
|
106
|
+
}, /*#__PURE__*/React.createElement(LinearGradient, {
|
|
107
|
+
style: {
|
|
108
|
+
flex: 1
|
|
109
|
+
},
|
|
110
|
+
colors: [this.props.colourBrandingMain, hexToRGBAstring(this.props.colourBrandingMain, 0.7)],
|
|
111
|
+
start: {
|
|
112
|
+
x: 0,
|
|
113
|
+
y: 0
|
|
114
|
+
},
|
|
115
|
+
end: {
|
|
116
|
+
x: 1,
|
|
117
|
+
y: 1
|
|
118
|
+
},
|
|
119
|
+
locations: [0.4, 1]
|
|
120
|
+
}));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
renderLeftBubble() {
|
|
127
|
+
if (!this.props.hasLeftBubble) {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
132
|
+
style: [styles.counter, styles.smallCounter]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
renderLeftIcon() {
|
|
137
|
+
if (!this.props.leftIcon && !this.props.leftText || !this.props.onPressLeft) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (this.props.leftText) {
|
|
142
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
143
|
+
style: [styles.headerContentIcon, {
|
|
144
|
+
width: 'auto'
|
|
145
|
+
}]
|
|
146
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
147
|
+
onPress: this.props.onPressLeft,
|
|
148
|
+
activeOpacity: 0.6
|
|
149
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
150
|
+
style: [styles.buttonText, {
|
|
151
|
+
paddingRight: 5,
|
|
152
|
+
paddingLeft: 15,
|
|
153
|
+
color: this.props.colourBrandingMain
|
|
154
|
+
}, this.props.leftTextStyle, this.props.headerType !== 'white' && !this.props.noGradient && !this.props.transparent && {
|
|
155
|
+
color: '#fff'
|
|
156
|
+
}]
|
|
157
|
+
}, this.props.leftText)));
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (this.props.leftIconType && this.props.leftIconType === 'pluss') {
|
|
161
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
162
|
+
style: styles.headerContentIcon
|
|
163
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
164
|
+
onPress: this.props.onPressLeft,
|
|
165
|
+
activeOpacity: 0.6
|
|
166
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
167
|
+
style: styles.headerContentIcon
|
|
168
|
+
}, /*#__PURE__*/React.createElement(Pl60Icon, {
|
|
169
|
+
name: this.props.leftIcon,
|
|
170
|
+
style: [styles.leftIcon, this.props.leftIconStyle, this.getTextColourStyle()]
|
|
171
|
+
}), this.renderLeftBubble())));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
175
|
+
style: styles.headerContentIcon
|
|
176
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
177
|
+
onPress: this.props.onPressLeft,
|
|
178
|
+
activeOpacity: 0.6
|
|
179
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
180
|
+
name: this.props.leftIcon,
|
|
181
|
+
style: styles.headerContentIcon,
|
|
182
|
+
type: "font-awesome",
|
|
183
|
+
iconStyle: [styles.leftIcon, this.props.leftIconStyle, this.getTextColourStyle()]
|
|
184
|
+
}), this.renderLeftBubble()));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
renderHeaderText() {
|
|
188
|
+
if (!this.props.text) {
|
|
189
|
+
if (this.props.centerContent) {
|
|
190
|
+
return this.props.centerContent;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (this.props.onTextPress) {
|
|
197
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
198
|
+
onPress: this.props.onTextPress,
|
|
199
|
+
activeOpacity: 0.6,
|
|
200
|
+
style: [styles.headerTextContainer, this.props.leftIcon && (!this.props.rightIcon && !this.props.rightText || this.props.absoluteRight) && {
|
|
201
|
+
paddingRight: 55
|
|
202
|
+
}, this.props.textContainerStyle]
|
|
203
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
204
|
+
style: [styles.headerText, this.props.textStyle, this.getTextColourStyle()],
|
|
205
|
+
numberOfLines: 1,
|
|
206
|
+
ellipsizeMode: "tail"
|
|
207
|
+
}, this.props.text));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
211
|
+
style: [styles.headerTextContainer, this.props.leftIcon && (!this.props.rightIcon && !this.props.rightText || this.props.absoluteRight) && {
|
|
212
|
+
paddingRight: 55
|
|
213
|
+
}, this.props.rightIcon && (!this.props.leftIcon && !this.props.leftText || this.props.absoluteLeft) && {
|
|
214
|
+
paddingLeft: 55
|
|
215
|
+
}, this.props.textContainerStyle]
|
|
216
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
217
|
+
style: [styles.headerText, this.props.textStyle, this.getTextColourStyle()],
|
|
218
|
+
numberOfLines: 1,
|
|
219
|
+
ellipsizeMode: "tail"
|
|
220
|
+
}, this.props.text));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
renderRightIcon() {
|
|
224
|
+
if (this.props.rightContent) {
|
|
225
|
+
return this.props.rightContent;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (!this.props.onPressRight) {
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (this.props.rightText && this.props.onPressRight) {
|
|
233
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
234
|
+
style: [styles.headerContentIcon, {
|
|
235
|
+
width: 'auto'
|
|
236
|
+
}, this.props.absoluteRight && styles.absoluteRight, this.props.rightContainerStyle]
|
|
237
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
238
|
+
onPress: this.props.onPressRight,
|
|
239
|
+
activeOpacity: 0.6
|
|
240
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
241
|
+
style: [styles.buttonText, {
|
|
242
|
+
paddingRight: 15,
|
|
243
|
+
paddingLeft: 5,
|
|
244
|
+
textAlign: 'right',
|
|
245
|
+
fontFamily: 'sf-semibold',
|
|
246
|
+
color: this.props.colourBrandingMain
|
|
247
|
+
}, this.getTextColourStyle(), this.props.optionalRightStyle]
|
|
248
|
+
}, this.props.rightText)));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (!this.props.rightIcon) {
|
|
252
|
+
if (this.props.rightImage) {
|
|
253
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
254
|
+
onPress: this.props.onPressRight,
|
|
255
|
+
activeOpacity: 0.6
|
|
256
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
257
|
+
style: styles.headerContentIcon
|
|
258
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
259
|
+
source: {
|
|
260
|
+
uri: this.props.rightImage
|
|
261
|
+
},
|
|
262
|
+
style: styles.rightImage,
|
|
263
|
+
resizeMode: "contain"
|
|
264
|
+
})));
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return null;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
271
|
+
onPress: this.props.onPressRight,
|
|
272
|
+
activeOpacity: 0.6
|
|
273
|
+
}, this.props.rightIconType && this.props.rightIconType === 'pluss' ? /*#__PURE__*/React.createElement(View, {
|
|
274
|
+
style: styles.headerContentIcon
|
|
275
|
+
}, /*#__PURE__*/React.createElement(Pl60Icon, {
|
|
276
|
+
name: this.props.rightIcon,
|
|
277
|
+
style: [styles.rightIcon, this.getTextColourStyle(), this.props.rightIconStyle]
|
|
278
|
+
})) : /*#__PURE__*/React.createElement(Icon, {
|
|
279
|
+
name: this.props.rightIcon,
|
|
280
|
+
style: styles.headerContentIcon,
|
|
281
|
+
type: this.props.rightIconType ? this.props.rightIconType : 'font-awesome',
|
|
282
|
+
iconStyle: [styles.rightIcon, this.getTextColourStyle(), this.props.rightIconStyle]
|
|
283
|
+
}));
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
render() {
|
|
287
|
+
if (this.props.animatedHeader) {
|
|
288
|
+
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
289
|
+
style: [styles.container, !this.props.noShadow && styles.containerShadow, this.props.transparent && styles.transparentContainer, this.props.style, {
|
|
290
|
+
backgroundColor: this.props.headerColourOffset,
|
|
291
|
+
elevation: this.props.headerElev,
|
|
292
|
+
shadowColor: this.props.headerShadow
|
|
293
|
+
}]
|
|
294
|
+
}, this.renderBackground(), /*#__PURE__*/React.createElement(StatusBar, {
|
|
295
|
+
barStyle: this.state.barStyle,
|
|
296
|
+
translucent: true
|
|
297
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
298
|
+
style: styles.headerContent
|
|
299
|
+
}, this.renderLeftIcon(), this.renderHeaderText(), this.renderRightIcon(), this.props.children), this.props.extraHeaderContent);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
303
|
+
style: [styles.container, !this.props.noShadow && styles.containerShadow, this.props.transparent && styles.transparentContainer, this.props.lineSeparated && styles.lineSeparated, this.props.popupHeader && styles.popupHeader, this.props.style, this.props.colourBrandingHeader && {
|
|
304
|
+
backgroundColor: this.props.colourBrandingHeader
|
|
305
|
+
}]
|
|
306
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
307
|
+
style: [styles.contentContainer, this.props.popupHeader && styles.popupContentContainer, this.props.contentContainerStyle, this.props.colourBrandingHeader && {
|
|
308
|
+
backgroundColor: this.props.colourBrandingHeader
|
|
309
|
+
}]
|
|
310
|
+
}, this.renderBackground(), /*#__PURE__*/React.createElement(StatusBar, {
|
|
311
|
+
barStyle: this.state.barStyle,
|
|
312
|
+
translucent: true
|
|
313
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
314
|
+
style: [styles.headerContent, this.props.popupHeader && styles.headerContentPopup]
|
|
315
|
+
}, this.renderLeftIcon(), this.renderHeaderText(), this.renderRightIcon(), this.props.children)), this.props.extraHeaderContent);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
const styles = {
|
|
321
|
+
container: {
|
|
322
|
+
alignSelf: 'stretch',
|
|
323
|
+
backgroundColor: '#fff',
|
|
324
|
+
zIndex: 10
|
|
325
|
+
},
|
|
326
|
+
containerShadow: {
|
|
327
|
+
shadowColor: '#000',
|
|
328
|
+
shadowOffset: {
|
|
329
|
+
width: 0,
|
|
330
|
+
height: 1
|
|
331
|
+
},
|
|
332
|
+
shadowOpacity: 0.1,
|
|
333
|
+
shadowRadius: 6,
|
|
334
|
+
elevation: 3
|
|
335
|
+
},
|
|
336
|
+
lineSeparated: {
|
|
337
|
+
borderBottomWidth: 1,
|
|
338
|
+
borderColor: LINEGREY,
|
|
339
|
+
shadowOpacity: 0,
|
|
340
|
+
elevation: 0
|
|
341
|
+
},
|
|
342
|
+
popupHeader: {
|
|
343
|
+
borderBottomWidth: 1,
|
|
344
|
+
borderColor: LINEGREY,
|
|
345
|
+
shadowOpacity: 0,
|
|
346
|
+
elevation: 0,
|
|
347
|
+
borderTopLeftRadius: 12,
|
|
348
|
+
borderTopRightRadius: 12
|
|
349
|
+
},
|
|
350
|
+
contentContainer: {
|
|
351
|
+
height: StatusBarHeight(70),
|
|
352
|
+
alignSelf: 'stretch',
|
|
353
|
+
flexDirection: 'row'
|
|
354
|
+
},
|
|
355
|
+
popupContentContainer: {
|
|
356
|
+
height: 70,
|
|
357
|
+
borderTopLeftRadius: 12,
|
|
358
|
+
borderTopRightRadius: 12
|
|
359
|
+
},
|
|
360
|
+
transparentContainer: {
|
|
361
|
+
backgroundColor: COLOUR_TRANSPARENT,
|
|
362
|
+
shadowColor: COLOUR_TRANSPARENT,
|
|
363
|
+
elevation: 0
|
|
364
|
+
},
|
|
365
|
+
thumbnailStyle: {
|
|
366
|
+
height: StatusBarHeight(70),
|
|
367
|
+
width: null,
|
|
368
|
+
position: 'absolute',
|
|
369
|
+
top: 0,
|
|
370
|
+
left: 0,
|
|
371
|
+
resizeMode: 'cover'
|
|
372
|
+
},
|
|
373
|
+
thumbnailPopupHeader: {
|
|
374
|
+
height: 70,
|
|
375
|
+
width: '100%',
|
|
376
|
+
borderTopLeftRadius: 12,
|
|
377
|
+
borderTopRightRadius: 12,
|
|
378
|
+
overflow: 'hidden'
|
|
379
|
+
},
|
|
380
|
+
headerContent: {
|
|
381
|
+
alignSelf: 'stretch',
|
|
382
|
+
flexDirection: 'row',
|
|
383
|
+
flex: 1,
|
|
384
|
+
paddingTop: StatusBarHeight(0)
|
|
385
|
+
},
|
|
386
|
+
headerContentPopup: {
|
|
387
|
+
paddingTop: 0
|
|
388
|
+
},
|
|
389
|
+
headerContentIcon: {
|
|
390
|
+
height: 70,
|
|
391
|
+
width: 55,
|
|
392
|
+
alignItems: 'center',
|
|
393
|
+
flexDirection: 'row',
|
|
394
|
+
justifyContent: 'space-between'
|
|
395
|
+
},
|
|
396
|
+
absoluteRight: {
|
|
397
|
+
height: 70,
|
|
398
|
+
justifyContent: 'center',
|
|
399
|
+
position: 'absolute',
|
|
400
|
+
right: 0,
|
|
401
|
+
top: StatusBarHeight(0)
|
|
402
|
+
},
|
|
403
|
+
leftIcon: {
|
|
404
|
+
fontSize: 25,
|
|
405
|
+
padding: 15,
|
|
406
|
+
width: 55,
|
|
407
|
+
textAlign: 'center',
|
|
408
|
+
color: TEXT_LIGHT
|
|
409
|
+
},
|
|
410
|
+
headerTextContainer: {
|
|
411
|
+
height: 70,
|
|
412
|
+
flex: 1,
|
|
413
|
+
alignItems: 'center',
|
|
414
|
+
flexDirection: 'row',
|
|
415
|
+
justifyContent: 'space-between'
|
|
416
|
+
},
|
|
417
|
+
headerText: {
|
|
418
|
+
fontSize: 16,
|
|
419
|
+
flex: 1,
|
|
420
|
+
fontFamily: 'sf-semibold',
|
|
421
|
+
color: TEXT_DARK,
|
|
422
|
+
textAlign: 'center',
|
|
423
|
+
backgroundColor: 'rgba(255,255,255,0)'
|
|
424
|
+
},
|
|
425
|
+
buttonText: {
|
|
426
|
+
fontSize: 15,
|
|
427
|
+
fontFamily: 'sf-regular',
|
|
428
|
+
width: 80,
|
|
429
|
+
backgroundColor: 'rgba(255,255,255,0)'
|
|
430
|
+
},
|
|
431
|
+
rightIcon: {
|
|
432
|
+
fontSize: 25,
|
|
433
|
+
padding: 15,
|
|
434
|
+
width: 55,
|
|
435
|
+
textAlign: 'center',
|
|
436
|
+
color: TEXT_LIGHT
|
|
437
|
+
},
|
|
438
|
+
rightImage: {
|
|
439
|
+
width: 24,
|
|
440
|
+
height: 24,
|
|
441
|
+
marginRight: 15,
|
|
442
|
+
marginLeft: 13
|
|
443
|
+
},
|
|
444
|
+
counter: {
|
|
445
|
+
top: 15,
|
|
446
|
+
right: 5,
|
|
447
|
+
borderRadius: 10,
|
|
448
|
+
position: 'absolute',
|
|
449
|
+
height: 20,
|
|
450
|
+
minWidth: 20,
|
|
451
|
+
backgroundColor: COLOUR_GREEN,
|
|
452
|
+
justifyContent: 'center'
|
|
453
|
+
},
|
|
454
|
+
counterText: {
|
|
455
|
+
color: '#fff',
|
|
456
|
+
textAlign: 'center',
|
|
457
|
+
fontFamily: 'sf-bold',
|
|
458
|
+
fontSize: 10,
|
|
459
|
+
lineHeight: 12,
|
|
460
|
+
backgroundColor: 'transparent'
|
|
461
|
+
},
|
|
462
|
+
smallCounter: {
|
|
463
|
+
width: 5,
|
|
464
|
+
height: 5,
|
|
465
|
+
minWidth: 5,
|
|
466
|
+
top: 20,
|
|
467
|
+
right: 10
|
|
468
|
+
},
|
|
469
|
+
headerPattern: {
|
|
470
|
+
position: 'absolute',
|
|
471
|
+
top: 0,
|
|
472
|
+
left: 0,
|
|
473
|
+
right: 0,
|
|
474
|
+
bottom: 0,
|
|
475
|
+
width: '100%',
|
|
476
|
+
height: '100%',
|
|
477
|
+
resizeMode: 'cover'
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
const mapStateToProps = state => {
|
|
482
|
+
return {
|
|
483
|
+
colourBrandingMain: getMainBrandingColourFromState(state),
|
|
484
|
+
headerType: getSiteSettingFromState(state, 'HeaderType', getSiteSettingFromState(state, 'UseGradientHeader', Config.env.hasGradientHeader) ? 'gradient' : 'white'),
|
|
485
|
+
headerPattern: getSiteSettingFromState(state, 'HeaderPattern'),
|
|
486
|
+
patternColour: getSiteSettingFromState(state, 'PatternColour')
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
export default connect(mapStateToProps, {})(Header);
|
|
491
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Header.js"],"names":["React","Component","Animated","View","StatusBar","Image","Dimensions","TouchableOpacity","Text","Platform","Icon","LinearGradient","connect","StatusBarHeight","getSiteSettingFromState","COLOUR_TRANSPARENT","TEXT_DARK","TEXT_LIGHT","LINEGREY","COLOUR_GREEN","getMainBrandingColourFromState","hexToRGBAstring","Pl60Icon","Config","Header","constructor","props","state","UNSAFE_componentWillMount","barStyle","select","ios","android","headerType","noGradient","transparent","setState","windowWidth","get","width","getTextColourStyle","textColour","color","renderBackground","headerBackground","headerImage","styles","thumbnailStyle","uri","contentContainerStyle","backgroundColor","colourBrandingMain","popupHeader","thumbnailPopupHeader","headerPattern","patternColour","tintColor","flex","x","y","renderLeftBubble","hasLeftBubble","counter","smallCounter","renderLeftIcon","leftIcon","leftText","onPressLeft","headerContentIcon","buttonText","paddingRight","paddingLeft","leftTextStyle","leftIconType","leftIconStyle","renderHeaderText","text","centerContent","onTextPress","headerTextContainer","rightIcon","rightText","absoluteRight","textContainerStyle","headerText","textStyle","absoluteLeft","renderRightIcon","rightContent","onPressRight","rightContainerStyle","textAlign","fontFamily","optionalRightStyle","rightImage","rightIconType","rightIconStyle","render","animatedHeader","container","noShadow","containerShadow","transparentContainer","style","headerColourOffset","elevation","headerElev","shadowColor","headerShadow","headerContent","children","extraHeaderContent","lineSeparated","colourBrandingHeader","contentContainer","popupContentContainer","headerContentPopup","alignSelf","zIndex","shadowOffset","height","shadowOpacity","shadowRadius","borderBottomWidth","borderColor","borderTopLeftRadius","borderTopRightRadius","flexDirection","position","top","left","resizeMode","overflow","paddingTop","alignItems","justifyContent","right","fontSize","padding","marginRight","marginLeft","borderRadius","minWidth","counterText","lineHeight","bottom","mapStateToProps","env","hasGradientHeader"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,QAAT,EAAmBC,IAAnB,EAAyBC,SAAzB,EAAoCC,KAApC,EAA2CC,UAA3C,EAAuDC,gBAAvD,EAAyEC,IAAzE,EAA+EC,QAA/E,QAA+F,cAA/F;AACA,SAASC,IAAT,QAAqB,uBAArB;AACA,SAASC,cAAT,QAA+B,sBAA/B;AACA,SAASC,OAAT,QAAwB,aAAxB,C,CACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,eAAT,EAA0BC,uBAA1B,QAAyD,WAAzD;AACA,SACEC,kBADF,EAEEC,SAFF,EAGEC,UAHF,EAIEC,QAJF,EAKEC,YALF,EAMEC,8BANF,EAOEC,eAPF,QAQO,YARP;AASA,SAASC,QAAT,QAAyB,UAAzB;AACA,OAAOC,MAAP,MAAmB,WAAnB,C,CACA;;AAEA,MAAMC,MAAN,SAAqBvB,SAArB,CAA+B;AAC7BwB,EAAAA,WAAW,CAACC,KAAD,EAAQ;AACjB,UAAMA,KAAN;AAEA,SAAKC,KAAL,GAAa,EAAb;AACD;;AAEDC,EAAAA,yBAAyB,GAAG;AAC1B,QAAIC,QAAQ,GAAGpB,QAAQ,CAACqB,MAAT,CAAgB;AAAEC,MAAAA,GAAG,EAAE,cAAP;AAAuBC,MAAAA,OAAO,EAAE;AAAhC,KAAhB,CAAf;;AACA,QAAI,KAAKN,KAAL,CAAWG,QAAf,EAAyB;AACvBA,MAAAA,QAAQ,GAAG,KAAKH,KAA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qJblF,EAAAA,aAAa,EAAE;AACb0E,IAAAA,QAAQ,EAAE,UADG;AAEbC,IAAAA,GAAG,EAAE,CAFQ;AAGbC,IAAAA,IAAI,EAAE,CAHO;AAIbM,IAAAA,KAAK,EAAE,CAJM;AAKbS,IAAAA,MAAM,EAAE,CALK;AAMb1G,IAAAA,KAAK,EAAE,MANM;AAObiF,IAAAA,MAAM,EAAE,MAPK;AAQbW,IAAAA,UAAU,EAAE;AARC;AArJF,CAAf;;AAiKA,MAAMe,eAAe,GAAGvH,KAAK,IAAI;AAC/B,SAAO;AACLwB,IAAAA,kBAAkB,EAAE/B,8BAA8B,CAACO,KAAD,CAD7C;AAELM,IAAAA,UAAU,EAAEnB,uBAAuB,CACjCa,KADiC,EAEjC,YAFiC,EAGjCb,uBAAuB,CAACa,KAAD,EAAQ,mBAAR,EAA6BJ,MAAM,CAAC4H,GAAP,CAAWC,iBAAxC,CAAvB,GAAoF,UAApF,GAAiG,OAHhE,CAF9B;AAOL9F,IAAAA,aAAa,EAAExC,uBAAuB,CAACa,KAAD,EAAQ,eAAR,CAPjC;AAQL4B,IAAAA,aAAa,EAAEzC,uBAAuB,CAACa,KAAD,EAAQ,eAAR;AARjC,GAAP;AAUD,CAXD;;AAaA,eAAef,OAAO,CAACsI,eAAD,EAAkB,EAAlB,CAAP,CAA6B1H,MAA7B,CAAf","sourcesContent":["import React, { Component } from 'react';\nimport { Animated, View, StatusBar, Image, Dimensions, TouchableOpacity, Text, Platform } from 'react-native';\nimport { Icon } from 'react-native-elements';\nimport { LinearGradient } from 'expo-linear-gradient';\nimport { connect } from 'react-redux';\n// import {\n// StatusBarHeight,\n// COLOUR_TRANSPARENT,\n// TEXT_DARK,\n// TEXT_LIGHT,\n// LINEGREY,\n// COLOUR_GREEN,\n// getMainBrandingColourFromState,\n// hexToRGBAstring,\n// getSiteSettingFromState,\n// } from '../../js';\nimport { StatusBarHeight, getSiteSettingFromState } from '../helper';\nimport {\n COLOUR_TRANSPARENT,\n TEXT_DARK,\n TEXT_LIGHT,\n LINEGREY,\n COLOUR_GREEN,\n getMainBrandingColourFromState,\n hexToRGBAstring,\n} from '../colours';\nimport { Pl60Icon } from '../fonts';\nimport Config from '../config';\n// import { HAS_GRADIENT_HEADER } from '../../config';\n\nclass Header extends Component {\n constructor(props) {\n super(props);\n\n this.state = {};\n }\n\n UNSAFE_componentWillMount() {\n let barStyle = Platform.select({ ios: 'dark-content', android: 'default' });\n if (this.props.barStyle) {\n barStyle = this.props.barStyle;\n } else if (this.props.headerType !== 'white' && !this.props.noGradient && !this.props.transparent) {\n barStyle = 'light-content';\n }\n this.setState({ windowWidth: Dimensions.get('window').width, barStyle });\n }\n\n getTextColourStyle() {\n if (this.props.textColour) {\n return { color: this.props.textColour };\n }\n if (this.props.headerType !== 'white' && !this.props.noGradient && !this.props.transparent) {\n return { color: '#fff' };\n }\n return null;\n }\n\n renderBackground() {\n if (this.props.headerBackground) return this.props.headerBackground;\n if (this.props.headerImage) {\n return <Image style={[styles.thumbnailStyle, { width: this.state.windowWidth }]} source={{ uri: this.props.headerImage }} />;\n }\n if (this.props.headerType === 'pattern' && !this.props.noGradient && !this.props.transparent) {\n return (\n <View\n style={[\n styles.thumbnailStyle,\n this.props.contentContainerStyle,\n { backgroundColor: this.props.colourBrandingMain, width: this.state.windowWidth },\n this.props.popupHeader && styles.thumbnailPopupHeader,\n ]}\n >\n <Image\n style={[styles.headerPattern, this.props.patternColour && { tintColor: this.props.patternColour }]}\n source={{ uri: this.props.headerPattern }}\n />\n </View>\n );\n }\n if (this.props.headerType === 'block' && !this.props.noGradient && !this.props.transparent) {\n return (\n <View\n style={[\n styles.thumbnailStyle,\n this.props.contentContainerStyle,\n { backgroundColor: this.props.colourBrandingMain, width: this.state.windowWidth },\n this.props.popupHeader && styles.thumbnailPopupHeader,\n ]}\n />\n );\n }\n if (this.props.headerType === 'gradient' && !this.props.noGradient && !this.props.transparent) {\n return (\n <View\n style={[\n styles.thumbnailStyle,\n this.props.contentContainerStyle,\n { width: this.state.windowWidth },\n this.props.popupHeader && styles.thumbnailPopupHeader,\n ]}\n >\n <LinearGradient\n style={{ flex: 1 }}\n colors={[this.props.colourBrandingMain, hexToRGBAstring(this.props.colourBrandingMain, 0.7)]}\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 1 }}\n locations={[0.4, 1]}\n />\n </View>\n );\n }\n return null;\n }\n\n renderLeftBubble() {\n if (!this.props.hasLeftBubble) {\n return null;\n }\n return <View style={[styles.counter, styles.smallCounter]} />;\n }\n\n renderLeftIcon() {\n if ((!this.props.leftIcon && !this.props.leftText) || !this.props.onPressLeft) {\n return null;\n }\n if (this.props.leftText) {\n return (\n <View style={[styles.headerContentIcon, { width: 'auto' }]}>\n <TouchableOpacity onPress={this.props.onPressLeft} activeOpacity={0.6}>\n <Text\n style={[\n styles.buttonText,\n { paddingRight: 5, paddingLeft: 15, color: this.props.colourBrandingMain },\n this.props.leftTextStyle,\n this.props.headerType !== 'white' && !this.props.noGradient && !this.props.transparent && { color: '#fff' },\n ]}\n >\n {this.props.leftText}\n </Text>\n </TouchableOpacity>\n </View>\n );\n }\n if (this.props.leftIconType && this.props.leftIconType === 'pluss') {\n return (\n <View style={styles.headerContentIcon}>\n <TouchableOpacity onPress={this.props.onPressLeft} activeOpacity={0.6}>\n <View style={styles.headerContentIcon}>\n <Pl60Icon name={this.props.leftIcon} style={[styles.leftIcon, this.props.leftIconStyle, this.getTextColourStyle()]} />\n {this.renderLeftBubble()}\n </View>\n </TouchableOpacity>\n </View>\n );\n }\n return (\n <View style={styles.headerContentIcon}>\n <TouchableOpacity onPress={this.props.onPressLeft} activeOpacity={0.6}>\n <Icon\n name={this.props.leftIcon}\n style={styles.headerContentIcon}\n type=\"font-awesome\"\n iconStyle={[styles.leftIcon, this.props.leftIconStyle, this.getTextColourStyle()]}\n />\n {this.renderLeftBubble()}\n </TouchableOpacity>\n </View>\n );\n }\n\n renderHeaderText() {\n if (!this.props.text) {\n if (this.props.centerContent) {\n return this.props.centerContent;\n }\n return null;\n }\n if (this.props.onTextPress) {\n return (\n <TouchableOpacity\n onPress={this.props.onTextPress}\n activeOpacity={0.6}\n style={[\n styles.headerTextContainer,\n this.props.leftIcon && ((!this.props.rightIcon && !this.props.rightText) || this.props.absoluteRight) && { paddingRight: 55 },\n this.props.textContainerStyle,\n ]}\n >\n <Text style={[styles.headerText, this.props.textStyle, this.getTextColourStyle()]} numberOfLines={1} ellipsizeMode=\"tail\">\n {this.props.text}\n </Text>\n </TouchableOpacity>\n );\n }\n return (\n <View\n style={[\n styles.headerTextContainer,\n this.props.leftIcon && ((!this.props.rightIcon && !this.props.rightText) || this.props.absoluteRight) && { paddingRight: 55 },\n this.props.rightIcon && ((!this.props.leftIcon && !this.props.leftText) || this.props.absoluteLeft) && { paddingLeft: 55 },\n this.props.textContainerStyle,\n ]}\n >\n <Text style={[styles.headerText, this.props.textStyle, this.getTextColourStyle()]} numberOfLines={1} ellipsizeMode=\"tail\">\n {this.props.text}\n </Text>\n </View>\n );\n }\n\n renderRightIcon() {\n if (this.props.rightContent) {\n return this.props.rightContent;\n }\n if (!this.props.onPressRight) {\n return null;\n }\n if (this.props.rightText && this.props.onPressRight) {\n return (\n <View\n style={[\n styles.headerContentIcon,\n { width: 'auto' },\n this.props.absoluteRight && styles.absoluteRight,\n this.props.rightContainerStyle,\n ]}\n >\n <TouchableOpacity onPress={this.props.onPressRight} activeOpacity={0.6}>\n <Text\n style={[\n styles.buttonText,\n { paddingRight: 15, paddingLeft: 5, textAlign: 'right', fontFamily: 'sf-semibold', color: this.props.colourBrandingMain },\n this.getTextColourStyle(),\n this.props.optionalRightStyle,\n ]}\n >\n {this.props.rightText}\n </Text>\n </TouchableOpacity>\n </View>\n );\n }\n if (!this.props.rightIcon) {\n if (this.props.rightImage) {\n return (\n <TouchableOpacity onPress={this.props.onPressRight} activeOpacity={0.6}>\n <View style={styles.headerContentIcon}>\n <Image source={{ uri: this.props.rightImage }} style={styles.rightImage} resizeMode=\"contain\" />\n </View>\n </TouchableOpacity>\n );\n }\n return null;\n }\n return (\n <TouchableOpacity onPress={this.props.onPressRight} activeOpacity={0.6}>\n {this.props.rightIconType && this.props.rightIconType === 'pluss' ? (\n <View style={styles.headerContentIcon}>\n <Pl60Icon name={this.props.rightIcon} style={[styles.rightIcon, this.getTextColourStyle(), this.props.rightIconStyle]} />\n </View>\n ) : (\n <Icon\n name={this.props.rightIcon}\n style={styles.headerContentIcon}\n type={this.props.rightIconType ? this.props.rightIconType : 'font-awesome'}\n iconStyle={[styles.rightIcon, this.getTextColourStyle(), this.props.rightIconStyle]}\n />\n )}\n </TouchableOpacity>\n );\n }\n\n render() {\n if (this.props.animatedHeader) {\n return (\n <Animated.View\n style={[\n styles.container,\n !this.props.noShadow && styles.containerShadow,\n this.props.transparent && styles.transparentContainer,\n this.props.style,\n { backgroundColor: this.props.headerColourOffset, elevation: this.props.headerElev, shadowColor: this.props.headerShadow },\n ]}\n >\n {this.renderBackground()}\n <StatusBar barStyle={this.state.barStyle} translucent />\n <View style={styles.headerContent}>\n {this.renderLeftIcon()}\n {this.renderHeaderText()}\n {this.renderRightIcon()}\n {this.props.children}\n </View>\n {this.props.extraHeaderContent}\n </Animated.View>\n );\n }\n return (\n <View\n style={[\n styles.container,\n !this.props.noShadow && styles.containerShadow,\n this.props.transparent && styles.transparentContainer,\n this.props.lineSeparated && styles.lineSeparated,\n this.props.popupHeader && styles.popupHeader,\n this.props.style,\n this.props.colourBrandingHeader && { backgroundColor: this.props.colourBrandingHeader },\n ]}\n >\n <View\n style={[\n styles.contentContainer,\n this.props.popupHeader && styles.popupContentContainer,\n this.props.contentContainerStyle,\n this.props.colourBrandingHeader && { backgroundColor: this.props.colourBrandingHeader },\n ]}\n >\n {this.renderBackground()}\n <StatusBar barStyle={this.state.barStyle} translucent />\n <View style={[styles.headerContent, this.props.popupHeader && styles.headerContentPopup]}>\n {this.renderLeftIcon()}\n {this.renderHeaderText()}\n {this.renderRightIcon()}\n {this.props.children}\n </View>\n </View>\n {this.props.extraHeaderContent}\n </View>\n );\n }\n}\n\nconst styles = {\n container: {\n alignSelf: 'stretch',\n backgroundColor: '#fff',\n zIndex: 10,\n },\n containerShadow: {\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 1,\n },\n shadowOpacity: 0.1,\n shadowRadius: 6,\n elevation: 3,\n },\n lineSeparated: {\n borderBottomWidth: 1,\n borderColor: LINEGREY,\n shadowOpacity: 0,\n elevation: 0,\n },\n popupHeader: {\n borderBottomWidth: 1,\n borderColor: LINEGREY,\n shadowOpacity: 0,\n elevation: 0,\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n },\n contentContainer: {\n height: StatusBarHeight(70),\n alignSelf: 'stretch',\n flexDirection: 'row',\n },\n popupContentContainer: {\n height: 70,\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n },\n transparentContainer: {\n backgroundColor: COLOUR_TRANSPARENT,\n shadowColor: COLOUR_TRANSPARENT,\n elevation: 0,\n },\n thumbnailStyle: {\n height: StatusBarHeight(70),\n width: null,\n position: 'absolute',\n top: 0,\n left: 0,\n resizeMode: 'cover',\n },\n thumbnailPopupHeader: {\n height: 70,\n width: '100%',\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n overflow: 'hidden',\n },\n headerContent: {\n alignSelf: 'stretch',\n flexDirection: 'row',\n flex: 1,\n paddingTop: StatusBarHeight(0),\n },\n headerContentPopup: {\n paddingTop: 0,\n },\n headerContentIcon: {\n height: 70,\n width: 55,\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n absoluteRight: {\n height: 70,\n justifyContent: 'center',\n position: 'absolute',\n right: 0,\n top: StatusBarHeight(0),\n },\n leftIcon: {\n fontSize: 25,\n padding: 15,\n width: 55,\n textAlign: 'center',\n color: TEXT_LIGHT,\n },\n headerTextContainer: {\n height: 70,\n flex: 1,\n alignItems: 'center',\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n headerText: {\n fontSize: 16,\n flex: 1,\n fontFamily: 'sf-semibold',\n color: TEXT_DARK,\n textAlign: 'center',\n backgroundColor: 'rgba(255,255,255,0)',\n },\n buttonText: {\n fontSize: 15,\n fontFamily: 'sf-regular',\n width: 80,\n backgroundColor: 'rgba(255,255,255,0)',\n },\n rightIcon: {\n fontSize: 25,\n padding: 15,\n width: 55,\n textAlign: 'center',\n color: TEXT_LIGHT,\n },\n rightImage: {\n width: 24,\n height: 24,\n marginRight: 15,\n marginLeft: 13,\n },\n counter: {\n top: 15,\n right: 5,\n borderRadius: 10,\n position: 'absolute',\n height: 20,\n minWidth: 20,\n backgroundColor: COLOUR_GREEN,\n justifyContent: 'center',\n },\n counterText: {\n color: '#fff',\n textAlign: 'center',\n fontFamily: 'sf-bold',\n fontSize: 10,\n lineHeight: 12,\n backgroundColor: 'transparent',\n },\n smallCounter: {\n width: 5,\n height: 5,\n minWidth: 5,\n top: 20,\n right: 10,\n },\n headerPattern: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: '100%',\n height: '100%',\n resizeMode: 'cover',\n },\n};\n\nconst mapStateToProps = state => {\n return {\n colourBrandingMain: getMainBrandingColourFromState(state),\n headerType: getSiteSettingFromState(\n state,\n 'HeaderType',\n getSiteSettingFromState(state, 'UseGradientHeader', Config.env.hasGradientHeader) ? 'gradient' : 'white',\n ),\n headerPattern: getSiteSettingFromState(state, 'HeaderPattern'),\n patternColour: getSiteSettingFromState(state, 'PatternColour'),\n };\n};\n\nexport default connect(mapStateToProps, {})(Header);\n"]}
|