secullum-react-native-ui 4.7.1-beta.1 → 4.7.1-beta.2

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.
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Button = void 0;
4
4
  const React = require("react");
5
5
  const theme_1 = require("../modules/theme");
6
- const getTestId_1 = require("../modules/getTestId");
7
6
  const react_native_1 = require("react-native");
8
7
  const layout_1 = require("../modules/layout");
9
8
  class Button extends React.Component {
@@ -55,7 +54,7 @@ class Button extends React.Component {
55
54
  primary && styles.touchablePrimary,
56
55
  style,
57
56
  disabled && styles.disabled
58
- ], onPress: onPress, disabled: disabled, testID: (0, getTestId_1.getTestID)(nativeID) },
57
+ ], onPress: onPress, disabled: disabled, testID: nativeID },
59
58
  React.createElement(react_native_1.Text, { nativeID: nativeID, style: [
60
59
  styles.text,
61
60
  primary && styles.textPrimary,
@@ -5,7 +5,6 @@ const React = require("react");
5
5
  const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
6
6
  const layout_1 = require("../modules/layout");
7
7
  const theme_1 = require("../modules/theme");
8
- const getTestId_1 = require("../modules/getTestId");
9
8
  const react_native_1 = require("react-native");
10
9
  class CheckBox extends React.Component {
11
10
  constructor() {
@@ -42,7 +41,7 @@ class CheckBox extends React.Component {
42
41
  onChange(!value);
43
42
  }
44
43
  } },
45
- React.createElement(FontAwesome_1.default, { nativeID: nativeID, testID: (0, getTestId_1.getTestID)(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 }),
46
45
  React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, renderLabel ? renderLabel() : label)));
47
46
  }
48
47
  }
@@ -7,7 +7,6 @@ const format_1 = require("../modules/format");
7
7
  const layout_1 = require("../modules/layout");
8
8
  const theme_1 = require("../modules/theme");
9
9
  const ImageButton_1 = require("./ImageButton");
10
- const getTestId_1 = require("../modules/getTestId");
11
10
  const react_native_1 = require("react-native");
12
11
  class DatePicker extends React.Component {
13
12
  constructor() {
@@ -90,7 +89,7 @@ class DatePicker extends React.Component {
90
89
  const styles = this.getStyles();
91
90
  const theme = (0, theme_1.getTheme)();
92
91
  return (React.createElement(react_native_1.TouchableWithoutFeedback, { disabled: disabled, onPress: this.handlePress },
93
- React.createElement(react_native_1.View, { nativeID: nativeID, testID: (0, getTestId_1.getTestID)(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] },
94
93
  React.createElement(react_native_1.View, null,
95
94
  React.createElement(react_native_1.Text, { style: styles.label }, label),
96
95
  React.createElement(react_native_1.Text, { style: styles.value }, value ? (0, format_1.formatDate)(value, 'cccc, dd/MM/yyyy') : '')),
@@ -8,7 +8,6 @@ const Card_1 = require("./Card");
8
8
  const Space_1 = require("./Space");
9
9
  const theme_1 = require("../modules/theme");
10
10
  const layout_1 = require("../modules/layout");
11
- const getTestId_1 = require("../modules/getTestId");
12
11
  class Details extends React.Component {
13
12
  constructor() {
14
13
  super(...arguments);
@@ -59,7 +58,7 @@ class Details extends React.Component {
59
58
  };
60
59
  this.renderIcon = (icon, index) => {
61
60
  const styles = this.getStyles();
62
- const fa = (React.createElement(FontAwesome_1.default, { key: index, testID: (0, getTestId_1.getTestID)(icon.name), name: icon.name, color: icon.color, size: icon.size, style: styles.lineValueIcon }));
61
+ const fa = (React.createElement(FontAwesome_1.default, { key: index, testID: icon.name, name: icon.name, color: icon.color, size: icon.size, style: styles.lineValueIcon }));
63
62
  if (icon.onPress) {
64
63
  return (React.createElement(react_native_1.TouchableOpacity, { key: index, onPress: icon.onPress }, fa));
65
64
  }
@@ -6,7 +6,6 @@ const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
6
6
  const Modal_1 = require("./Modal");
7
7
  const layout_1 = require("../modules/layout");
8
8
  const theme_1 = require("../modules/theme");
9
- const getTestId_1 = require("../modules/getTestId");
10
9
  const react_native_1 = require("react-native");
11
10
  class DropDownItem extends React.PureComponent {
12
11
  constructor() {
@@ -76,7 +75,7 @@ class DropDownItem extends React.PureComponent {
76
75
  render() {
77
76
  const { first, last, value, onPress, nativeID } = this.props;
78
77
  const theme = (0, theme_1.getTheme)();
79
- return (React.createElement(react_native_1.TouchableHighlight, { onPress: () => onPress(value), testID: (0, getTestId_1.getTestID)(nativeID), underlayColor: theme.backgroundColor2, style: {
78
+ return (React.createElement(react_native_1.TouchableHighlight, { onPress: () => onPress(value), testID: nativeID, underlayColor: theme.backgroundColor2, style: {
80
79
  borderTopLeftRadius: first ? 5 : 0,
81
80
  borderTopRightRadius: first ? 5 : 0,
82
81
  borderBottomLeftRadius: last ? 5 : 0,
@@ -237,7 +236,7 @@ class DropDown extends React.Component {
237
236
  const styles = this.getStyles();
238
237
  const theme = (0, theme_1.getTheme)();
239
238
  return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: () => this.setState({ modalOpen: true }), disabled: disabled },
240
- React.createElement(react_native_1.View, { nativeID: nativeID, testID: (0, getTestId_1.getTestID)(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] },
241
240
  icon ? (React.createElement(FontAwesome_1.default, { name: icon, style: styles.iconOnLine })) : (React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label)),
242
241
  this.renderClosedDropDown(selectedItem, inputStyle),
243
242
  React.createElement(Modal_1.Modal, { visible: modalOpen, onRequestClose: () => this.setState({ modalOpen: false }), overlayStyle: styles.modalOverlay },
@@ -4,7 +4,6 @@ exports.ErrorMessage = void 0;
4
4
  const React = require("react");
5
5
  const react_native_1 = require("react-native");
6
6
  const theme_1 = require("../modules/theme");
7
- const getTestId_1 = require("../modules/getTestId");
8
7
  class ErrorMessage extends React.Component {
9
8
  constructor() {
10
9
  super(...arguments);
@@ -25,7 +24,7 @@ class ErrorMessage extends React.Component {
25
24
  if (!message) {
26
25
  return null;
27
26
  }
28
- return (React.createElement(react_native_1.Text, { nativeID: nativeID, testID: (0, getTestId_1.getTestID)(nativeID), style: [styles.errorMessage, style] }, message));
27
+ return (React.createElement(react_native_1.Text, { nativeID: nativeID, testID: nativeID, style: [styles.errorMessage, style] }, message));
29
28
  }
30
29
  }
31
30
  exports.ErrorMessage = ErrorMessage;
@@ -6,7 +6,6 @@ const react_native_1 = require("react-native");
6
6
  const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
7
7
  const theme_1 = require("../modules/theme");
8
8
  const layout_1 = require("../modules/layout");
9
- const getTestId_1 = require("../modules/getTestId");
10
9
  class Header extends React.Component {
11
10
  constructor() {
12
11
  super(...arguments);
@@ -50,7 +49,7 @@ class Header extends React.Component {
50
49
  const styles = this.getStyles();
51
50
  const theme = (0, theme_1.getTheme)();
52
51
  const icon = (React.createElement(React.Fragment, null,
53
- React.createElement(FontAwesome_1.default, { nativeID: button.nativeID, testID: (0, getTestId_1.getTestID)(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,
54
53
  // @ts-ignore : The component uses a different version of typing
55
54
  style: button.buttonStyle }),
56
55
  button.counter ? (React.createElement(react_native_1.View, { style: styles.counterContainer },
@@ -4,7 +4,6 @@ exports.ImageButton = void 0;
4
4
  const React = require("react");
5
5
  const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
6
6
  const theme_1 = require("../modules/theme");
7
- const getTestId_1 = require("../modules/getTestId");
8
7
  const react_native_1 = require("react-native");
9
8
  class ImageButton extends React.Component {
10
9
  render() {
@@ -17,7 +16,7 @@ class ImageButton extends React.Component {
17
16
  right: hitBoxSize
18
17
  }
19
18
  : undefined },
20
- React.createElement(FontAwesome_1.default, { nativeID: nativeID, testID: (0, getTestId_1.getTestID)(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 })));
21
20
  }
22
21
  }
23
22
  exports.ImageButton = ImageButton;
@@ -5,7 +5,6 @@ const React = require("react");
5
5
  const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
6
6
  const theme_1 = require("../modules/theme");
7
7
  const layout_1 = require("../modules/layout");
8
- const getTestId_1 = require("../modules/getTestId");
9
8
  const react_native_1 = require("react-native");
10
9
  function MenuItem(props) {
11
10
  const theme = (0, theme_1.getTheme)();
@@ -43,7 +42,7 @@ function MenuItem(props) {
43
42
  menuItem.path != undefined &&
44
43
  isCurrentMenuPath(menuItem.path);
45
44
  return (React.createElement(react_native_1.TouchableOpacity, { disabled: menuItem.disabled, style: styles.container, onPress: onPress },
46
- React.createElement(react_native_1.Text, { nativeID: menuItem.nativeID, testID: (0, getTestId_1.getTestID)(menuItem.nativeID), style: [
45
+ React.createElement(react_native_1.Text, { nativeID: menuItem.nativeID, testID: menuItem.nativeID, style: [
47
46
  styles.text,
48
47
  menuItem.disabled && styles.textDisabled,
49
48
  selected && styles.textSelected,
@@ -7,7 +7,6 @@ const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
7
7
  const Modal_1 = require("./Modal");
8
8
  const theme_1 = require("../modules/theme");
9
9
  const layout_1 = require("../modules/layout");
10
- const getTestId_1 = require("../modules/getTestId");
11
10
  class Message extends React.Component {
12
11
  constructor() {
13
12
  super(...arguments);
@@ -43,7 +42,7 @@ class Message extends React.Component {
43
42
  return (React.createElement(Modal_1.Modal, { visible: visible, onRequestClose: onRequestClose, overlayStyle: styles.overlay },
44
43
  React.createElement(react_native_1.View, { nativeID: nativeID, style: styles.container },
45
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 }),
46
- React.createElement(react_native_1.Text, { style: [styles.text, textStyle], testID: (0, getTestId_1.getTestID)(nativeID) }, message))));
45
+ React.createElement(react_native_1.Text, { style: [styles.text, textStyle], testID: nativeID }, message))));
47
46
  }
48
47
  }
49
48
  exports.Message = Message;
@@ -7,7 +7,6 @@ const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
7
7
  const format_1 = require("../modules/format");
8
8
  const layout_1 = require("../modules/layout");
9
9
  const theme_1 = require("../modules/theme");
10
- const getTestId_1 = require("../modules/getTestId");
11
10
  const Delay_1 = require("./Delay");
12
11
  const react_native_1 = require("react-native");
13
12
  class RangeDatePicker extends React.Component {
@@ -110,7 +109,7 @@ class RangeDatePicker extends React.Component {
110
109
  (0, format_1.formatDate)(endDate, displayFormat);
111
110
  const styles = this.getStyles();
112
111
  return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: this.handleDatePickerPress },
113
- React.createElement(react_native_1.View, { nativeID: nativeID, testID: (0, getTestId_1.getTestID)(nativeID), style: [styles.container, style] },
112
+ React.createElement(react_native_1.View, { nativeID: nativeID, testID: nativeID, style: [styles.container, style] },
114
113
  React.createElement(react_native_1.View, null,
115
114
  React.createElement(react_native_1.Text, { style: styles.label }, label),
116
115
  React.createElement(react_native_1.Text, { style: styles.value }, displayText)),
@@ -4,7 +4,6 @@ exports.Text = void 0;
4
4
  const React = require("react");
5
5
  const react_native_1 = require("react-native");
6
6
  const theme_1 = require("../modules/theme");
7
- const getTestId_1 = require("../modules/getTestId");
8
7
  const theme = (0, theme_1.getTheme)();
9
8
  class Text extends React.Component {
10
9
  constructor() {
@@ -27,7 +26,7 @@ class Text extends React.Component {
27
26
  render() {
28
27
  const { style, children, nativeID } = this.props;
29
28
  const textStyle = this.getStyles();
30
- return (React.createElement(react_native_1.Text, { nativeID: nativeID, testID: (0, getTestId_1.getTestID)(nativeID), style: [textStyle.text, style] }, children));
29
+ return (React.createElement(react_native_1.Text, { nativeID: nativeID, testID: nativeID, style: [textStyle.text, style] }, children));
31
30
  }
32
31
  }
33
32
  exports.Text = Text;
@@ -5,7 +5,6 @@ const React = require("react");
5
5
  const theme_1 = require("../modules/theme");
6
6
  const layout_1 = require("../modules/layout");
7
7
  const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
8
- const getTestId_1 = require("../modules/getTestId");
9
8
  const react_native_1 = require("react-native");
10
9
  class TextBox extends React.Component {
11
10
  constructor() {
@@ -48,7 +47,7 @@ class TextBox extends React.Component {
48
47
  const styles = this.getStyles();
49
48
  const incomingProps = {
50
49
  nativeID: this.props.nativeID,
51
- testID: (0, getTestId_1.getTestID)(this.props.nativeID),
50
+ testID: this.props.nativeID,
52
51
  autoFocus: this.props.autoFocus,
53
52
  value: this.props.value,
54
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.7.1-beta.1",
3
+ "version": "4.7.1-beta.2",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [
@@ -1,2 +0,0 @@
1
- export declare function getTestID(testID?: string): string | undefined;
2
- export declare const testID: typeof getTestID;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.testID = exports.getTestID = void 0;
4
- const react_native_1 = require("react-native");
5
- const { RNDeviceInfo } = require('react-native').NativeModules;
6
- function getTestID(testID) {
7
- if (!testID) {
8
- return undefined;
9
- }
10
- const prefix = `${RNDeviceInfo.bundleId}:id/`;
11
- return react_native_1.Platform.select({
12
- android: `${prefix}${testID}`,
13
- ios: testID
14
- });
15
- }
16
- exports.getTestID = getTestID;
17
- exports.testID = getTestID;