secullum-react-native-ui 4.7.3 → 4.7.5

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.
@@ -84,9 +84,7 @@ class DatePicker extends React.Component {
84
84
  const theme = (0, theme_1.getTheme)();
85
85
  return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: this.handlePress },
86
86
  React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style] },
87
- React.createElement(react_native_1.View, { ref: ref => ref &&
88
- ref.setNativeProps &&
89
- ref.setNativeProps({ id: 'date-picker' }) },
87
+ React.createElement(react_native_1.View, null,
90
88
  React.createElement(react_native_1.Text, { style: styles.label }, label),
91
89
  React.createElement(react_native_1.Text, { style: styles.value }, value != undefined ? (0, format_1.formatDate)(value, dateFormat) : '')),
92
90
  React.createElement(ImageButton_1.ImageButton, { icon: value && clearable ? 'times' : 'calendar', style: styles.clearIcon, iconColor: value && clearable ? theme.textColor1 : theme.textColor2, onPress: value && clearable ? this.handleClear : this.handlePress, hitBoxSize: 30 }),
@@ -14,7 +14,8 @@ class DimensionsMonitor extends React.Component {
14
14
  }
15
15
  };
16
16
  this.isDesktop = (size) => {
17
- return size.width >= 1024;
17
+ const largura = react_native_1.Platform.OS === 'web' ? window.innerWidth : size.width;
18
+ return largura >= 1024;
18
19
  };
19
20
  this.state = {
20
21
  isDesktop: this.isDesktop(react_native_1.Dimensions.get('window'))
@@ -96,9 +96,7 @@ class RangeDatePicker extends React.Component {
96
96
  const styles = this.getStyles();
97
97
  return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: this.handleDatePickerPress },
98
98
  React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style] },
99
- React.createElement(react_native_1.View, { ref: ref => ref &&
100
- ref.setNativeProps &&
101
- ref.setNativeProps({ id: 'range-date-picker' }) },
99
+ React.createElement(react_native_1.View, null,
102
100
  React.createElement(react_native_1.Text, { style: styles.label }, label),
103
101
  React.createElement(react_native_1.Text, { style: styles.value }, displayText)),
104
102
  React.createElement(FontAwesome_1.default, { name: "calendar", style: styles.icon }),
@@ -88,13 +88,12 @@ class TextBox extends React.Component {
88
88
  this.props.onKeyPress(react_native_1.Platform.OS === 'web' ? event : event.nativeEvent);
89
89
  }
90
90
  };
91
- return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, onPress: () => (onPress ? onPress() : this.focus()), ref: react_native_1.Platform.OS === 'web'
92
- ? ref => ref &&
93
- //@ts-ignore
94
- ref.setNativeProps &&
95
- //@ts-ignore
96
- ref.setNativeProps({ tabIndex: -1 })
97
- : undefined },
91
+ return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, onPress: () => (onPress ? onPress() : this.focus()), ref: ref => {
92
+ if (react_native_1.Platform.OS === 'web' && ref != null) {
93
+ // @ts-ignore na web, a ref recebida é o próprio elemento DOM
94
+ ref.tabIndex = -1;
95
+ }
96
+ } },
98
97
  React.createElement(react_native_1.View, { style: [styles.container, style, editable ? null : styles.readonly] },
99
98
  icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.icon })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
100
99
  renderInput
@@ -45,9 +45,12 @@ class TimePicker extends React.Component {
45
45
  render() {
46
46
  const { label, style, disabled, value, nativeID } = this.props;
47
47
  const styles = this.getStyles();
48
- return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, disabled: disabled, ref: ref =>
49
- //@ts-ignore
50
- ref && ref.setNativeProps && ref.setNativeProps({ tabIndex: -1 }) },
48
+ return (React.createElement(react_native_1.TouchableWithoutFeedback, { accessible: false, disabled: disabled, ref: ref => {
49
+ if (ref != null) {
50
+ //@ts-ignore
51
+ ref.tabIndex = -1;
52
+ }
53
+ } },
51
54
  React.createElement(react_native_1.View, { style: [styles.container, style, !disabled ? null : styles.readonly] },
52
55
  React.createElement(react_native_1.Text, { style: styles.label }, label),
53
56
  React.createElement(react_native_1.TextInput, { nativeID: nativeID, value: value, style: styles.input, maxLength: 5, onKeyPress: (e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.7.3",
3
+ "version": "4.7.5",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [