secullum-react-native-ui 4.6.13 → 4.7.1-beta.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/lib/components/Button.d.ts +1 -0
- package/lib/components/Button.js +1 -1
- package/lib/components/CheckBox.js +1 -1
- package/lib/components/DatePicker.js +1 -1
- package/lib/components/DropDown.js +3 -3
- package/lib/components/ErrorMessage.js +1 -1
- package/lib/components/Header.js +1 -1
- package/lib/components/ImageButton.js +1 -1
- package/lib/components/Menu.js +1 -1
- package/lib/components/Message.js +1 -1
- package/lib/components/RangeDatePicker.js +1 -1
- package/lib/components/Text.js +1 -1
- package/lib/components/TextBox.js +1 -0
- package/package.json +3 -3
package/lib/components/Button.js
CHANGED
|
@@ -54,7 +54,7 @@ class Button extends React.Component {
|
|
|
54
54
|
primary && styles.touchablePrimary,
|
|
55
55
|
style,
|
|
56
56
|
disabled && styles.disabled
|
|
57
|
-
], onPress: onPress, disabled: disabled },
|
|
57
|
+
], onPress: onPress, disabled: disabled, testID: nativeID },
|
|
58
58
|
React.createElement(react_native_1.Text, { nativeID: nativeID, style: [
|
|
59
59
|
styles.text,
|
|
60
60
|
primary && styles.textPrimary,
|
|
@@ -41,7 +41,7 @@ class CheckBox extends React.Component {
|
|
|
41
41
|
onChange(!value);
|
|
42
42
|
}
|
|
43
43
|
} },
|
|
44
|
-
React.createElement(FontAwesome_1.default, { nativeID: nativeID, name: value ? 'check-square-o' : 'square-o', style: styles.icon }),
|
|
44
|
+
React.createElement(FontAwesome_1.default, { nativeID: nativeID, testID: nativeID, name: value ? 'check-square-o' : 'square-o', style: styles.icon }),
|
|
45
45
|
React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, renderLabel ? renderLabel() : label)));
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -89,7 +89,7 @@ class DatePicker extends React.Component {
|
|
|
89
89
|
const styles = this.getStyles();
|
|
90
90
|
const theme = (0, theme_1.getTheme)();
|
|
91
91
|
return (React.createElement(react_native_1.TouchableWithoutFeedback, { disabled: disabled, onPress: this.handlePress },
|
|
92
|
-
React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style, disabled ? styles.readonly : null] },
|
|
92
|
+
React.createElement(react_native_1.View, { nativeID: nativeID, testID: nativeID, style: [styles.container, style, disabled ? styles.readonly : null] },
|
|
93
93
|
React.createElement(react_native_1.View, null,
|
|
94
94
|
React.createElement(react_native_1.Text, { style: styles.label }, label),
|
|
95
95
|
React.createElement(react_native_1.Text, { style: styles.value }, value ? (0, format_1.formatDate)(value, 'cccc, dd/MM/yyyy') : '')),
|
|
@@ -73,9 +73,9 @@ class DropDownItem extends React.PureComponent {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
render() {
|
|
76
|
-
const { first, last, value, onPress } = this.props;
|
|
76
|
+
const { first, last, value, onPress, nativeID } = this.props;
|
|
77
77
|
const theme = (0, theme_1.getTheme)();
|
|
78
|
-
return (React.createElement(react_native_1.TouchableHighlight, { onPress: () => onPress(value), underlayColor: theme.backgroundColor2, style: {
|
|
78
|
+
return (React.createElement(react_native_1.TouchableHighlight, { onPress: () => onPress(value), testID: nativeID, underlayColor: theme.backgroundColor2, style: {
|
|
79
79
|
borderTopLeftRadius: first ? 5 : 0,
|
|
80
80
|
borderTopRightRadius: first ? 5 : 0,
|
|
81
81
|
borderBottomLeftRadius: last ? 5 : 0,
|
|
@@ -236,7 +236,7 @@ class DropDown extends React.Component {
|
|
|
236
236
|
const styles = this.getStyles();
|
|
237
237
|
const theme = (0, theme_1.getTheme)();
|
|
238
238
|
return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: () => this.setState({ modalOpen: true }), disabled: disabled },
|
|
239
|
-
React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style, disabled ? styles.readonly : null] },
|
|
239
|
+
React.createElement(react_native_1.View, { nativeID: nativeID, testID: nativeID, style: [styles.container, style, disabled ? styles.readonly : null] },
|
|
240
240
|
icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.iconOnLine })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
|
|
241
241
|
this.renderClosedDropDown(selectedItem, inputStyle),
|
|
242
242
|
React.createElement(Modal_1.Modal, { visible: modalOpen, onRequestClose: () => this.setState({ modalOpen: false }), overlayStyle: styles.modalOverlay },
|
|
@@ -24,7 +24,7 @@ class ErrorMessage extends React.Component {
|
|
|
24
24
|
if (!message) {
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
|
-
return (React.createElement(react_native_1.Text, { nativeID: nativeID, style: [styles.errorMessage, style] }, message));
|
|
27
|
+
return (React.createElement(react_native_1.Text, { nativeID: nativeID, testID: nativeID, style: [styles.errorMessage, style] }, message));
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.ErrorMessage = ErrorMessage;
|
package/lib/components/Header.js
CHANGED
|
@@ -49,7 +49,7 @@ class Header extends React.Component {
|
|
|
49
49
|
const styles = this.getStyles();
|
|
50
50
|
const theme = (0, theme_1.getTheme)();
|
|
51
51
|
const icon = (React.createElement(React.Fragment, null,
|
|
52
|
-
React.createElement(FontAwesome_1.default, { nativeID: button.nativeID, name: button.icon, size: (0, layout_1.isTablet)() ? 30 : 20, color: button.disabled ? theme.textColor1 : theme.textColor4,
|
|
52
|
+
React.createElement(FontAwesome_1.default, { nativeID: button.nativeID, testID: button.nativeID, name: button.icon, size: (0, layout_1.isTablet)() ? 30 : 20, color: button.disabled ? theme.textColor1 : theme.textColor4,
|
|
53
53
|
// @ts-ignore : The component uses a different version of typing
|
|
54
54
|
style: button.buttonStyle }),
|
|
55
55
|
button.counter ? (React.createElement(react_native_1.View, { style: styles.counterContainer },
|
|
@@ -16,7 +16,7 @@ class ImageButton extends React.Component {
|
|
|
16
16
|
right: hitBoxSize
|
|
17
17
|
}
|
|
18
18
|
: undefined },
|
|
19
|
-
React.createElement(FontAwesome_1.default, { nativeID: nativeID, name: icon, size: iconSize || 20, color: iconColor || theme.textColor1 })));
|
|
19
|
+
React.createElement(FontAwesome_1.default, { nativeID: nativeID, testID: nativeID, name: icon, size: iconSize || 20, color: iconColor || theme.textColor1 })));
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.ImageButton = ImageButton;
|
package/lib/components/Menu.js
CHANGED
|
@@ -42,7 +42,7 @@ function MenuItem(props) {
|
|
|
42
42
|
menuItem.path != undefined &&
|
|
43
43
|
isCurrentMenuPath(menuItem.path);
|
|
44
44
|
return (React.createElement(react_native_1.TouchableOpacity, { disabled: menuItem.disabled, style: styles.container, onPress: onPress },
|
|
45
|
-
React.createElement(react_native_1.Text, { nativeID: menuItem.nativeID, style: [
|
|
45
|
+
React.createElement(react_native_1.Text, { nativeID: menuItem.nativeID, testID: menuItem.nativeID, style: [
|
|
46
46
|
styles.text,
|
|
47
47
|
menuItem.disabled && styles.textDisabled,
|
|
48
48
|
selected && styles.textSelected,
|
|
@@ -42,7 +42,7 @@ class Message extends React.Component {
|
|
|
42
42
|
return (React.createElement(Modal_1.Modal, { visible: visible, onRequestClose: onRequestClose, overlayStyle: styles.overlay },
|
|
43
43
|
React.createElement(react_native_1.View, { nativeID: nativeID, style: styles.container },
|
|
44
44
|
React.createElement(FontAwesome_1.default, { name: type === 'warning' ? 'warning' : 'check-circle', color: type === 'warning' ? theme.warningColor : theme.successColor, size: (0, layout_1.isTablet)() ? 52 : 42 }),
|
|
45
|
-
React.createElement(react_native_1.Text, { style: [styles.text, textStyle] }, message))));
|
|
45
|
+
React.createElement(react_native_1.Text, { style: [styles.text, textStyle], testID: nativeID }, message))));
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
exports.Message = Message;
|
|
@@ -109,7 +109,7 @@ class RangeDatePicker extends React.Component {
|
|
|
109
109
|
(0, format_1.formatDate)(endDate, displayFormat);
|
|
110
110
|
const styles = this.getStyles();
|
|
111
111
|
return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: this.handleDatePickerPress },
|
|
112
|
-
React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style] },
|
|
112
|
+
React.createElement(react_native_1.View, { nativeID: nativeID, testID: nativeID, style: [styles.container, style] },
|
|
113
113
|
React.createElement(react_native_1.View, null,
|
|
114
114
|
React.createElement(react_native_1.Text, { style: styles.label }, label),
|
|
115
115
|
React.createElement(react_native_1.Text, { style: styles.value }, displayText)),
|
package/lib/components/Text.js
CHANGED
|
@@ -26,7 +26,7 @@ class Text extends React.Component {
|
|
|
26
26
|
render() {
|
|
27
27
|
const { style, children, nativeID } = this.props;
|
|
28
28
|
const textStyle = this.getStyles();
|
|
29
|
-
return (React.createElement(react_native_1.Text, { nativeID: nativeID, style: [textStyle.text, style] }, children));
|
|
29
|
+
return (React.createElement(react_native_1.Text, { nativeID: nativeID, testID: nativeID, style: [textStyle.text, style] }, children));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.Text = Text;
|
|
@@ -47,6 +47,7 @@ class TextBox extends React.Component {
|
|
|
47
47
|
const styles = this.getStyles();
|
|
48
48
|
const incomingProps = {
|
|
49
49
|
nativeID: this.props.nativeID,
|
|
50
|
+
testID: this.props.nativeID,
|
|
50
51
|
autoFocus: this.props.autoFocus,
|
|
51
52
|
value: this.props.value,
|
|
52
53
|
onChangeText: this.props.onChange,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "secullum-react-native-ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.1-beta.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"docs:publish": "docz build && gh-pages -d .docz/dist"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@react-native-community/datetimepicker": "
|
|
22
|
+
"@react-native-community/datetimepicker": "7.6.1",
|
|
23
23
|
"date-fns": "^2.29.3",
|
|
24
24
|
"react-date-range": "^1.4.0",
|
|
25
25
|
"react-native-drawer-layout": "^2.0.0",
|
|
26
26
|
"react-native-elevated-view": "^0.0.6",
|
|
27
27
|
"react-native-masked-text": "^1.7.2",
|
|
28
|
-
"react-native-modal-datetime-picker": "^
|
|
28
|
+
"react-native-modal-datetime-picker": "^17.1.0",
|
|
29
29
|
"react-native-status-bar-height": "^2.6.0",
|
|
30
30
|
"react-native-vector-icons": "^8.0.0"
|
|
31
31
|
},
|