secullum-react-native-ui 4.3.13-beta.0 → 4.4.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.
@@ -3,6 +3,7 @@ export interface FilePickerProperties {
3
3
  label: string;
4
4
  onPress: () => void;
5
5
  icon: string;
6
+ nativeID?: string;
6
7
  }
7
8
  export declare class FilePicker extends React.Component<FilePickerProperties> {
8
9
  static defaultProps: {
@@ -30,12 +30,12 @@ class FilePicker extends React.Component {
30
30
  };
31
31
  }
32
32
  render() {
33
- const { label, onPress, icon } = this.props;
33
+ const { label, onPress, icon, nativeID } = this.props;
34
34
  const theme = theme_1.getTheme();
35
35
  const styles = this.getStyles();
36
36
  return (React.createElement(react_native_1.TouchableOpacity, { activeOpacity: 0.5, style: styles.container, onPress: onPress },
37
37
  React.createElement(FontAwesome_1.default, { name: icon, color: theme.textColor3, size: 30 }),
38
- React.createElement(react_native_1.Text, { style: styles.text }, label)));
38
+ React.createElement(react_native_1.Text, { nativeID: nativeID, style: styles.text }, label)));
39
39
  }
40
40
  }
41
41
  FilePicker.defaultProps = {
@@ -1,4 +1,8 @@
1
1
  import * as React from 'react';
2
2
  export declare class Loading extends React.Component {
3
+ getWidthAndHeight: () => {
4
+ width: number;
5
+ height: number;
6
+ };
3
7
  render(): JSX.Element;
4
8
  }
@@ -3,10 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const React = require("react");
4
4
  const react_native_1 = require("react-native");
5
5
  class Loading extends React.Component {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.getWidthAndHeight = () => {
9
+ const dim = react_native_1.Platform.OS === 'web' ? 'window' : 'screen';
10
+ return {
11
+ width: react_native_1.Dimensions.get(dim).width,
12
+ height: react_native_1.Dimensions.get(dim).height
13
+ };
14
+ };
15
+ }
6
16
  render() {
7
- return (React.createElement(React.Fragment, null,
8
- React.createElement(react_native_1.View, { style: styles.backgroundView }),
9
- React.createElement(react_native_1.ActivityIndicator, { style: styles.indicator, size: "large", color: "#aaa" })));
17
+ const { width, height } = this.getWidthAndHeight();
18
+ return (React.createElement(react_native_1.View, { style: [styles.backgroundView, { width, height }] },
19
+ React.createElement(react_native_1.ActivityIndicator, { size: "large", color: "#aaa", style: [styles.indicator, { width, height }] })));
10
20
  }
11
21
  }
12
22
  exports.Loading = Loading;
@@ -14,8 +24,6 @@ const styles = react_native_1.StyleSheet.create({
14
24
  backgroundView: {
15
25
  zIndex: 9998,
16
26
  position: 'absolute',
17
- width: react_native_1.Dimensions.get('screen').width,
18
- height: react_native_1.Dimensions.get('screen').height,
19
27
  opacity: 0.6,
20
28
  backgroundColor: '#ccc',
21
29
  top: 0,
@@ -26,8 +34,6 @@ const styles = react_native_1.StyleSheet.create({
26
34
  indicator: {
27
35
  zIndex: 9999,
28
36
  position: 'absolute',
29
- width: react_native_1.Dimensions.get('screen').width,
30
- height: react_native_1.Dimensions.get('screen').height,
31
37
  justifyContent: 'space-around',
32
38
  top: 0,
33
39
  bottom: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.3.13-beta.0",
3
+ "version": "4.4.0",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [