secullum-react-native-ui 4.17.5 → 4.17.7

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.
@@ -10,6 +10,7 @@ export interface ButtonProperties {
10
10
  disabledBackgroundColor?: string;
11
11
  disabledLabelColor?: string;
12
12
  nativeID?: string;
13
+ loading?: boolean;
13
14
  }
14
15
  export declare class Button extends React.Component<ButtonProperties> {
15
16
  static defaultProps: {
@@ -17,6 +18,7 @@ export declare class Button extends React.Component<ButtonProperties> {
17
18
  };
18
19
  getStyles: () => {
19
20
  touchable: {
21
+ flexDirection: "row";
20
22
  backgroundColor: string;
21
23
  borderColor: string;
22
24
  borderWidth: number;
@@ -14,6 +14,7 @@ class Button extends React.Component {
14
14
  const theme = (0, theme_1.getTheme)();
15
15
  const styles = react_native_1.StyleSheet.create({
16
16
  touchable: {
17
+ flexDirection: 'row',
17
18
  backgroundColor: theme.backgroundColor1,
18
19
  borderColor: theme.borderColor1,
19
20
  borderWidth: 1,
@@ -48,14 +49,16 @@ class Button extends React.Component {
48
49
  };
49
50
  }
50
51
  render() {
51
- const { text, primary, style, textStyle, onPress, disabled, nativeID } = this.props;
52
+ const { text, primary, style, textStyle, onPress, disabled, nativeID, loading } = this.props;
52
53
  const styles = this.getStyles();
54
+ const theme = (0, theme_1.getTheme)();
53
55
  return (React.createElement(react_native_1.TouchableOpacity, { activeOpacity: 0.7, style: [
54
56
  styles.touchable,
55
57
  primary && styles.touchablePrimary,
56
58
  style,
57
59
  disabled && styles.disabled
58
60
  ], onPress: onPress, disabled: disabled, testID: (0, test_1.getTestID)(nativeID) },
61
+ loading && React.createElement(react_native_1.ActivityIndicator, { color: theme.borderColor1 }),
59
62
  React.createElement(react_native_1.Text, { nativeID: nativeID, style: [
60
63
  styles.text,
61
64
  primary && styles.textPrimary,
@@ -26,7 +26,6 @@ export interface DropDownProperties {
26
26
  searchable?: SearchableProps;
27
27
  virtualized?: true | VirtualizedProps;
28
28
  useKeyboardAvoidingView?: boolean;
29
- animation?: 'none' | 'fade' | 'slide';
30
29
  }
31
30
  export interface SearchableProps {
32
31
  placeHolder: string;
@@ -305,7 +305,7 @@ class DropDown extends React.Component {
305
305
  }
306
306
  render() {
307
307
  const { modalOpen, searchText } = this.state;
308
- const { label, items, value, emptyMessage, style, disabledStyle, disabled, labelStyle, inputStyle, nativeID, onPress, icon, searchable, useKeyboardAvoidingView, animation } = this.props;
308
+ const { label, items, value, emptyMessage, style, disabledStyle, disabled, labelStyle, inputStyle, nativeID, onPress, icon, searchable, useKeyboardAvoidingView } = this.props;
309
309
  const selectedItem = items.find(x => x.value === value);
310
310
  const styles = this.getStyles();
311
311
  const theme = (0, theme_1.getTheme)();
@@ -345,7 +345,7 @@ class DropDown extends React.Component {
345
345
  ] },
346
346
  icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.iconOnLine })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
347
347
  this.renderClosedDropDown(selectedItem, inputStyle),
348
- React.createElement(Modal_1.Modal, { visible: modalOpen, onRequestClose: () => this.setState({ modalOpen: false }), overlayStyle: styles.modalOverlay, animation: animation || 'fade' }, useKeyboardAvoidingView ? (React.createElement(react_native_1.KeyboardAvoidingView, { behavior: react_native_1.Platform.OS === 'ios' ? 'padding' : 'height' }, conteudoModal)) : (conteudoModal)))));
348
+ React.createElement(Modal_1.Modal, { visible: modalOpen, onRequestClose: () => this.setState({ modalOpen: false }), overlayStyle: styles.modalOverlay }, useKeyboardAvoidingView ? (React.createElement(react_native_1.KeyboardAvoidingView, { behavior: react_native_1.Platform.OS === 'ios' ? 'padding' : 'height' }, conteudoModal)) : (conteudoModal)))));
349
349
  }
350
350
  }
351
351
  exports.DropDown = DropDown;
@@ -74,6 +74,9 @@ class MenuMobile extends React.Component {
74
74
  };
75
75
  }
76
76
  componentDidMount() {
77
+ if (react_native_1.Platform.OS === 'web') {
78
+ return;
79
+ }
77
80
  this.backButtonHandlerSubscription = react_native_1.BackHandler.addEventListener('hardwareBackPress', this.handleBackButton);
78
81
  }
79
82
  componentWillUnmount() {
@@ -7,7 +7,6 @@ export interface MessageProperties {
7
7
  onRequestClose?: () => void;
8
8
  nativeID?: string;
9
9
  textStyle?: StyleProp<TextStyle>;
10
- animation?: 'none' | 'fade' | 'slide';
11
10
  }
12
11
  export declare class Message extends React.Component<MessageProperties> {
13
12
  static defaultProps: {
@@ -37,10 +37,10 @@ class Message extends React.Component {
37
37
  };
38
38
  }
39
39
  render() {
40
- const { message, visible, type, onRequestClose, nativeID, textStyle, animation } = this.props;
40
+ const { message, visible, type, onRequestClose, nativeID, textStyle } = this.props;
41
41
  const styles = this.getStyles();
42
42
  const theme = (0, theme_1.getTheme)();
43
- return (React.createElement(Modal_1.Modal, { visible: visible, onRequestClose: onRequestClose, overlayStyle: styles.overlay, animation: animation || 'fade' },
43
+ return (React.createElement(Modal_1.Modal, { visible: visible, onRequestClose: onRequestClose, overlayStyle: styles.overlay },
44
44
  React.createElement(react_native_1.View, { nativeID: nativeID, style: styles.container },
45
45
  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 }),
46
46
  React.createElement(react_native_1.Text, { style: [styles.text, textStyle], testID: (0, test_1.getTestID)(nativeID) }, message))));
@@ -5,7 +5,6 @@ export interface ModalProperties {
5
5
  visible: boolean;
6
6
  overlayStyle?: StyleProp<ViewStyle>;
7
7
  onRequestClose?: () => void;
8
- animation?: 'none' | 'fade' | 'slide';
9
8
  }
10
9
  interface ModalState {
11
10
  isMounted: boolean;
@@ -19,9 +19,9 @@ class Modal extends React.Component {
19
19
  }
20
20
  }
21
21
  render() {
22
- const { children, visible, overlayStyle, onRequestClose, animation } = this.props;
22
+ const { children, visible, overlayStyle, onRequestClose } = this.props;
23
23
  const { isMounted } = this.state;
24
- return (React.createElement(react_native_1.Modal, { animationType: animation || 'fade', transparent: true, visible: visible, supportedOrientations: ['landscape', 'portrait'], onRequestClose: onRequestClose, onShow: this.handleShow },
24
+ return (React.createElement(react_native_1.Modal, { animationType: react_native_1.Platform.OS === 'ios' ? 'none' : 'fade', transparent: true, visible: visible, supportedOrientations: ['landscape', 'portrait'], onRequestClose: onRequestClose, onShow: this.handleShow },
25
25
  React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: onRequestClose },
26
26
  React.createElement(react_native_1.View, { style: [styles.overlay, overlayStyle] }, react_native_1.Platform.OS !== 'android' || isMounted ? children : React.createElement(react_native_1.View, null)))));
27
27
  }
@@ -56,7 +56,7 @@ class Question extends React.Component {
56
56
  const [leftButtonProps, rightButtonProps] = buttonOrder === 'ok,cancel'
57
57
  ? [okButton, cancelButton]
58
58
  : [cancelButton, okButton];
59
- return (React.createElement(react_native_1.Modal, { animationType: "fade", transparent: true, visible: visible },
59
+ return (React.createElement(react_native_1.Modal, { animationType: react_native_1.Platform.OS === 'ios' ? 'none' : 'fade', transparent: true, visible: visible },
60
60
  React.createElement(react_native_1.View, { style: [styles.overlay], nativeID: nativeID },
61
61
  React.createElement(react_native_1.View, { style: styles.container },
62
62
  React.createElement(FontAwesome_1.default, { name: 'question-circle', style: styles.icon }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.17.5",
3
+ "version": "4.17.7",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [