secullum-react-native-ui 4.16.2-beta.7 → 4.16.2-beta.8
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/package.json +1 -1
- package/lib/components/AppShell.d.ts +0 -52
- package/lib/components/AppShell.js +0 -82
- package/lib/components/Button.d.ts +0 -49
- package/lib/components/Button.js +0 -70
- package/lib/components/Card.d.ts +0 -66
- package/lib/components/Card.js +0 -131
- package/lib/components/CheckBox.d.ts +0 -36
- package/lib/components/CheckBox.js +0 -50
- package/lib/components/DatePicker.d.ts +0 -67
- package/lib/components/DatePicker.js +0 -106
- package/lib/components/DatePicker.web.d.ts +0 -64
- package/lib/components/DatePicker.web.js +0 -106
- package/lib/components/Delay.d.ts +0 -12
- package/lib/components/Delay.js +0 -22
- package/lib/components/Details.d.ts +0 -67
- package/lib/components/Details.js +0 -96
- package/lib/components/DetailsHeader.d.ts +0 -41
- package/lib/components/DetailsHeader.js +0 -65
- package/lib/components/DimensionsMonitor.d.ts +0 -21
- package/lib/components/DimensionsMonitor.js +0 -37
- package/lib/components/DropDown.d.ts +0 -52
- package/lib/components/DropDown.js +0 -351
- package/lib/components/ErrorMessage.d.ts +0 -16
- package/lib/components/ErrorMessage.js +0 -31
- package/lib/components/FilePicker.d.ts +0 -29
- package/lib/components/FilePicker.js +0 -46
- package/lib/components/Header.d.ts +0 -58
- package/lib/components/Header.js +0 -94
- package/lib/components/HeaderDesktop.d.ts +0 -59
- package/lib/components/HeaderDesktop.js +0 -83
- package/lib/components/ImageButton.d.ts +0 -14
- package/lib/components/ImageButton.js +0 -34
- package/lib/components/KeyboardAvoidingView.d.ts +0 -34
- package/lib/components/KeyboardAvoidingView.js +0 -106
- package/lib/components/Link.d.ts +0 -18
- package/lib/components/Link.js +0 -30
- package/lib/components/Loading.d.ts +0 -13
- package/lib/components/Loading.js +0 -45
- package/lib/components/Menu.d.ts +0 -42
- package/lib/components/Menu.js +0 -114
- package/lib/components/MenuDesktop.d.ts +0 -24
- package/lib/components/MenuDesktop.js +0 -39
- package/lib/components/MenuMobile.d.ts +0 -49
- package/lib/components/MenuMobile.js +0 -94
- package/lib/components/Message.d.ts +0 -37
- package/lib/components/Message.js +0 -52
- package/lib/components/Modal.d.ts +0 -18
- package/lib/components/Modal.js +0 -35
- package/lib/components/MultiSelect.d.ts +0 -51
- package/lib/components/MultiSelect.js +0 -377
- package/lib/components/NoRecordMessage.d.ts +0 -23
- package/lib/components/NoRecordMessage.js +0 -36
- package/lib/components/Question.d.ts +0 -57
- package/lib/components/Question.js +0 -79
- package/lib/components/RadioButton.d.ts +0 -43
- package/lib/components/RadioButton.js +0 -55
- package/lib/components/RadioGroup.d.ts +0 -45
- package/lib/components/RadioGroup.js +0 -71
- package/lib/components/RangeDatePicker.d.ts +0 -57
- package/lib/components/RangeDatePicker.js +0 -127
- package/lib/components/RangeDatePicker.web.d.ts +0 -61
- package/lib/components/RangeDatePicker.web.js +0 -120
- package/lib/components/Space.d.ts +0 -11
- package/lib/components/Space.js +0 -15
- package/lib/components/StatusBar.d.ts +0 -18
- package/lib/components/StatusBar.js +0 -33
- package/lib/components/Switch.d.ts +0 -34
- package/lib/components/Switch.js +0 -50
- package/lib/components/Table.d.ts +0 -30
- package/lib/components/Table.js +0 -79
- package/lib/components/Table.web.d.ts +0 -18
- package/lib/components/Table.web.js +0 -111
- package/lib/components/Text.d.ts +0 -29
- package/lib/components/Text.js +0 -38
- package/lib/components/TextBox.d.ts +0 -84
- package/lib/components/TextBox.js +0 -126
- package/lib/components/TextBoxMask.d.ts +0 -12
- package/lib/components/TextBoxMask.js +0 -34
- package/lib/components/TimePicker.d.ts +0 -63
- package/lib/components/TimePicker.js +0 -112
- package/lib/components/TimePicker.web.d.ts +0 -48
- package/lib/components/TimePicker.web.js +0 -88
- package/lib/index.d.ts +0 -40
- package/lib/index.js +0 -56
- package/lib/modules/browser.d.ts +0 -2
- package/lib/modules/browser.js +0 -51
- package/lib/modules/format.d.ts +0 -6
- package/lib/modules/format.js +0 -127
- package/lib/modules/layout.d.ts +0 -1
- package/lib/modules/layout.js +0 -12
- package/lib/modules/test.d.ts +0 -2
- package/lib/modules/test.js +0 -18
- package/lib/modules/theme.d.ts +0 -41
- package/lib/modules/theme.js +0 -52
- package/lib/modules/validation.d.ts +0 -3
- package/lib/modules/validation.js +0 -16
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface RadioGroupProperties {
|
|
3
|
-
items: Array<{
|
|
4
|
-
label: string;
|
|
5
|
-
value: string;
|
|
6
|
-
}>;
|
|
7
|
-
value: string;
|
|
8
|
-
onChange: (value: string) => void;
|
|
9
|
-
disabled?: Array<string>;
|
|
10
|
-
nativeID?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare class RadioGroup extends React.Component<RadioGroupProperties> {
|
|
13
|
-
getStyles: () => {
|
|
14
|
-
container: {
|
|
15
|
-
borderColor: string;
|
|
16
|
-
borderWidth: number;
|
|
17
|
-
borderRadius: number;
|
|
18
|
-
backgroundColor: string;
|
|
19
|
-
flexDirection: "row";
|
|
20
|
-
justifyContent: "space-around";
|
|
21
|
-
};
|
|
22
|
-
item: {
|
|
23
|
-
paddingVertical: number;
|
|
24
|
-
borderColor: string;
|
|
25
|
-
flex: number;
|
|
26
|
-
alignItems: "center";
|
|
27
|
-
};
|
|
28
|
-
itemText: {
|
|
29
|
-
fontFamily: string;
|
|
30
|
-
fontSize: number;
|
|
31
|
-
lineHeight: number;
|
|
32
|
-
color: string;
|
|
33
|
-
};
|
|
34
|
-
selectedItem: {
|
|
35
|
-
backgroundColor: string;
|
|
36
|
-
};
|
|
37
|
-
selectedItemText: {
|
|
38
|
-
color: string;
|
|
39
|
-
};
|
|
40
|
-
readonly: {
|
|
41
|
-
backgroundColor: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
render(): JSX.Element;
|
|
45
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RadioGroup = void 0;
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const react_native_1 = require("react-native");
|
|
6
|
-
const theme_1 = require("../modules/theme");
|
|
7
|
-
const layout_1 = require("../modules/layout");
|
|
8
|
-
const test_1 = require("../modules/test");
|
|
9
|
-
class RadioGroup extends React.Component {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.getStyles = () => {
|
|
13
|
-
const theme = (0, theme_1.getTheme)();
|
|
14
|
-
const styles = react_native_1.StyleSheet.create({
|
|
15
|
-
container: {
|
|
16
|
-
borderColor: theme.borderColor1,
|
|
17
|
-
borderWidth: 1,
|
|
18
|
-
borderRadius: 3,
|
|
19
|
-
backgroundColor: theme.backgroundColor2,
|
|
20
|
-
flexDirection: 'row',
|
|
21
|
-
justifyContent: 'space-around'
|
|
22
|
-
},
|
|
23
|
-
item: {
|
|
24
|
-
paddingVertical: (0, layout_1.isTablet)() ? 10 : 5,
|
|
25
|
-
borderColor: theme.borderColor1,
|
|
26
|
-
flex: 1,
|
|
27
|
-
alignItems: 'center'
|
|
28
|
-
},
|
|
29
|
-
itemText: {
|
|
30
|
-
fontFamily: theme.fontFamily1,
|
|
31
|
-
fontSize: (0, layout_1.isTablet)() ? 16 : 12,
|
|
32
|
-
lineHeight: (0, layout_1.isTablet)() ? 20 : 16,
|
|
33
|
-
color: theme.textColor3
|
|
34
|
-
},
|
|
35
|
-
selectedItem: {
|
|
36
|
-
backgroundColor: theme.backgroundColor3
|
|
37
|
-
},
|
|
38
|
-
selectedItemText: {
|
|
39
|
-
color: theme.textColor4
|
|
40
|
-
},
|
|
41
|
-
readonly: {
|
|
42
|
-
backgroundColor: theme.disabledColor
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
return styles;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
render() {
|
|
49
|
-
const { items, value, onChange, disabled, nativeID } = this.props;
|
|
50
|
-
const styles = this.getStyles();
|
|
51
|
-
return (React.createElement(react_native_1.View, { style: styles.container }, items.map((item, index) => {
|
|
52
|
-
const itemNativeID = nativeID
|
|
53
|
-
? nativeID + '-' + item.value
|
|
54
|
-
: undefined;
|
|
55
|
-
return (React.createElement(react_native_1.TouchableWithoutFeedback, { key: index, disabled: disabled && disabled.includes(item.value), onPress: () => onChange(item.value) },
|
|
56
|
-
React.createElement(react_native_1.View, { style: [
|
|
57
|
-
styles.item,
|
|
58
|
-
{ borderRightWidth: index === items.length - 1 ? 0 : 1 },
|
|
59
|
-
item.value === value ? styles.selectedItem : null,
|
|
60
|
-
disabled && disabled.includes(item.value)
|
|
61
|
-
? styles.readonly
|
|
62
|
-
: null
|
|
63
|
-
], testID: (0, test_1.getTestID)(itemNativeID), nativeID: itemNativeID },
|
|
64
|
-
React.createElement(react_native_1.Text, { style: [
|
|
65
|
-
styles.itemText,
|
|
66
|
-
item.value === value ? styles.selectedItemText : null
|
|
67
|
-
] }, item.label))));
|
|
68
|
-
})));
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exports.RadioGroup = RadioGroup;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
export interface RangeDatePickerProperties {
|
|
4
|
-
label: string;
|
|
5
|
-
startDate: Date;
|
|
6
|
-
endDate: Date;
|
|
7
|
-
onStartDateChange: (date: Date) => void;
|
|
8
|
-
onEndDateChange: (date: Date) => void;
|
|
9
|
-
onEndDateCancel?: () => void;
|
|
10
|
-
style?: StyleProp<ViewStyle>;
|
|
11
|
-
nativeID?: string;
|
|
12
|
-
}
|
|
13
|
-
export interface RangeDatePickerState {
|
|
14
|
-
showStartDateModal: boolean;
|
|
15
|
-
showEndDateModal: boolean;
|
|
16
|
-
isDarkModeEnabled: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare class RangeDatePicker extends React.Component<RangeDatePickerProperties, RangeDatePickerState> {
|
|
19
|
-
state: RangeDatePickerState;
|
|
20
|
-
appearanceSubscription: any;
|
|
21
|
-
componentDidMount(): void;
|
|
22
|
-
UNSAFE_componentWillUnmount(): void;
|
|
23
|
-
handleDatePickerPress: () => void;
|
|
24
|
-
handleStartDateConfirm: (date: Date) => void;
|
|
25
|
-
handleStartDateCancel: () => void;
|
|
26
|
-
handleEndDateConfirm: (date: Date) => void;
|
|
27
|
-
handleEndDateCancel: () => void;
|
|
28
|
-
getStyles: () => {
|
|
29
|
-
container: {
|
|
30
|
-
paddingHorizontal: number;
|
|
31
|
-
paddingVertical: number;
|
|
32
|
-
borderWidth: number;
|
|
33
|
-
borderColor: string;
|
|
34
|
-
borderRadius: number;
|
|
35
|
-
flexDirection: "row";
|
|
36
|
-
alignItems: "center";
|
|
37
|
-
};
|
|
38
|
-
label: {
|
|
39
|
-
color: string;
|
|
40
|
-
fontFamily: string;
|
|
41
|
-
fontSize: number;
|
|
42
|
-
lineHeight: number;
|
|
43
|
-
};
|
|
44
|
-
value: {
|
|
45
|
-
color: string;
|
|
46
|
-
fontFamily: string;
|
|
47
|
-
fontSize: number;
|
|
48
|
-
lineHeight: number;
|
|
49
|
-
};
|
|
50
|
-
icon: {
|
|
51
|
-
marginLeft: string;
|
|
52
|
-
color: string;
|
|
53
|
-
fontSize: number;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
render(): JSX.Element;
|
|
57
|
-
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RangeDatePicker = void 0;
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const react_native_modal_datetime_picker_1 = require("react-native-modal-datetime-picker");
|
|
6
|
-
const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
|
|
7
|
-
const format_1 = require("../modules/format");
|
|
8
|
-
const layout_1 = require("../modules/layout");
|
|
9
|
-
const theme_1 = require("../modules/theme");
|
|
10
|
-
const Delay_1 = require("./Delay");
|
|
11
|
-
const test_1 = require("../modules/test");
|
|
12
|
-
const react_native_1 = require("react-native");
|
|
13
|
-
class RangeDatePicker extends React.Component {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
this.state = {
|
|
17
|
-
showStartDateModal: false,
|
|
18
|
-
showEndDateModal: false,
|
|
19
|
-
isDarkModeEnabled: react_native_1.Appearance.getColorScheme() === 'dark'
|
|
20
|
-
};
|
|
21
|
-
this.handleDatePickerPress = () => {
|
|
22
|
-
this.setState({
|
|
23
|
-
showStartDateModal: true
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
this.handleStartDateConfirm = (date) => {
|
|
27
|
-
this.setState({
|
|
28
|
-
showStartDateModal: false,
|
|
29
|
-
showEndDateModal: true
|
|
30
|
-
}, () => {
|
|
31
|
-
// When using RangeDatePicker on Android devices the end date modal were not being displayed, in order to avoid it,
|
|
32
|
-
// the setTimeOut was implemented so as it will set a little delay (enough time to update the state) before execute other functions.
|
|
33
|
-
// Related issue on gitlab: 3487
|
|
34
|
-
setTimeout(() => {
|
|
35
|
-
if (date > this.props.endDate) {
|
|
36
|
-
this.props.onEndDateChange(date);
|
|
37
|
-
}
|
|
38
|
-
this.props.onStartDateChange(date);
|
|
39
|
-
}, 1);
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
this.handleStartDateCancel = () => {
|
|
43
|
-
this.setState({
|
|
44
|
-
showStartDateModal: false,
|
|
45
|
-
showEndDateModal: true
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
this.handleEndDateConfirm = (date) => {
|
|
49
|
-
this.setState({
|
|
50
|
-
showEndDateModal: false
|
|
51
|
-
}, () => {
|
|
52
|
-
this.props.onEndDateChange(date);
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
this.handleEndDateCancel = () => {
|
|
56
|
-
if (this.props.onEndDateCancel) {
|
|
57
|
-
this.props.onEndDateCancel();
|
|
58
|
-
}
|
|
59
|
-
this.setState({
|
|
60
|
-
showEndDateModal: false
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
this.getStyles = () => {
|
|
64
|
-
const theme = (0, theme_1.getTheme)();
|
|
65
|
-
const styles = react_native_1.StyleSheet.create({
|
|
66
|
-
container: {
|
|
67
|
-
paddingHorizontal: 16,
|
|
68
|
-
paddingVertical: 8,
|
|
69
|
-
borderWidth: 1,
|
|
70
|
-
borderColor: theme.borderColor1,
|
|
71
|
-
borderRadius: 3,
|
|
72
|
-
flexDirection: 'row',
|
|
73
|
-
alignItems: 'center'
|
|
74
|
-
},
|
|
75
|
-
label: {
|
|
76
|
-
color: theme.textColor2,
|
|
77
|
-
fontFamily: theme.fontFamily3,
|
|
78
|
-
fontSize: (0, layout_1.isTablet)() ? 15 : 12,
|
|
79
|
-
lineHeight: 16
|
|
80
|
-
},
|
|
81
|
-
value: {
|
|
82
|
-
color: theme.textColor1,
|
|
83
|
-
fontFamily: theme.fontFamily1,
|
|
84
|
-
fontSize: 16,
|
|
85
|
-
lineHeight: 22
|
|
86
|
-
},
|
|
87
|
-
icon: {
|
|
88
|
-
marginLeft: 'auto',
|
|
89
|
-
color: theme.textColor2,
|
|
90
|
-
fontSize: 22
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
return styles;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
componentDidMount() {
|
|
97
|
-
this.appearanceSubscription = react_native_1.Appearance.addChangeListener(({ colorScheme }) => {
|
|
98
|
-
this.setState({ isDarkModeEnabled: colorScheme === 'dark' });
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
UNSAFE_componentWillUnmount() {
|
|
102
|
-
this.appearanceSubscription.remove();
|
|
103
|
-
}
|
|
104
|
-
render() {
|
|
105
|
-
const { label, startDate, endDate, style, nativeID } = this.props;
|
|
106
|
-
const { showStartDateModal, showEndDateModal, isDarkModeEnabled } = this.state;
|
|
107
|
-
const displayFormat = 'MMM d, yyyy';
|
|
108
|
-
const displayText = (0, format_1.formatDate)(startDate, displayFormat) +
|
|
109
|
-
' - ' +
|
|
110
|
-
(0, format_1.formatDate)(endDate, displayFormat);
|
|
111
|
-
const styles = this.getStyles();
|
|
112
|
-
return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: this.handleDatePickerPress },
|
|
113
|
-
React.createElement(react_native_1.View, { nativeID: nativeID, testID: (0, test_1.getTestID)(nativeID), style: [styles.container, style] },
|
|
114
|
-
React.createElement(react_native_1.View, { style: { flex: 1 } },
|
|
115
|
-
React.createElement(react_native_1.Text, { style: styles.label }, label),
|
|
116
|
-
React.createElement(react_native_1.Text, { numberOfLines: 1, style: styles.value }, displayText)),
|
|
117
|
-
React.createElement(FontAwesome_1.default, { name: "calendar", style: styles.icon }),
|
|
118
|
-
react_native_1.Platform.OS !== 'web' &&
|
|
119
|
-
(showStartDateModal ? (React.createElement(react_native_modal_datetime_picker_1.default, { date: startDate, isVisible: true, onConfirm: this.handleStartDateConfirm, onCancel: this.handleStartDateCancel, isDarkModeEnabled: isDarkModeEnabled,
|
|
120
|
-
//@ts-ignore
|
|
121
|
-
display: react_native_1.Platform.OS == 'ios' ? 'inline' : 'default' })) : showEndDateModal ? (React.createElement(Delay_1.Delay, { wait: 5 },
|
|
122
|
-
React.createElement(react_native_modal_datetime_picker_1.default, { date: endDate, isVisible: true, onConfirm: this.handleEndDateConfirm, onCancel: this.handleEndDateCancel, isDarkModeEnabled: isDarkModeEnabled,
|
|
123
|
-
//@ts-ignore
|
|
124
|
-
display: react_native_1.Platform.OS == 'ios' ? 'inline' : 'default' }))) : null))));
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
exports.RangeDatePicker = RangeDatePicker;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SelectedRanges } from 'react-date-range';
|
|
3
|
-
import 'react-date-range/dist/styles.css';
|
|
4
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
5
|
-
import '../../styles/RangeDatePicker.css';
|
|
6
|
-
export interface RangeDatePickerProperties {
|
|
7
|
-
label: string;
|
|
8
|
-
startDate: Date;
|
|
9
|
-
endDate: Date;
|
|
10
|
-
onStartDateChange: (date: Date) => void;
|
|
11
|
-
onEndDateChange: (date: Date) => void;
|
|
12
|
-
onEndDateCancel?: () => void;
|
|
13
|
-
style?: StyleProp<ViewStyle>;
|
|
14
|
-
nativeID?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface RangeDatePickerState {
|
|
17
|
-
showStartDateModal: boolean;
|
|
18
|
-
count: number;
|
|
19
|
-
}
|
|
20
|
-
export declare class RangeDatePicker extends React.Component<RangeDatePickerProperties, RangeDatePickerState> {
|
|
21
|
-
state: RangeDatePickerState;
|
|
22
|
-
private calendarRef;
|
|
23
|
-
componentWillMount(): void;
|
|
24
|
-
componentWillUnmount(): void;
|
|
25
|
-
handleClick: (event: MouseEvent) => void;
|
|
26
|
-
handleDatePickerPress: () => void;
|
|
27
|
-
handleRangeDateConfirm: (ranges: SelectedRanges) => void;
|
|
28
|
-
getStyles: () => {
|
|
29
|
-
container: {
|
|
30
|
-
paddingHorizontal: number;
|
|
31
|
-
paddingVertical: number;
|
|
32
|
-
borderWidth: number;
|
|
33
|
-
borderColor: string;
|
|
34
|
-
borderRadius: number;
|
|
35
|
-
flexDirection: "row";
|
|
36
|
-
alignItems: "center";
|
|
37
|
-
};
|
|
38
|
-
modalOverlay: {
|
|
39
|
-
justifyContent: "center";
|
|
40
|
-
alignItems: "center";
|
|
41
|
-
};
|
|
42
|
-
label: {
|
|
43
|
-
color: string;
|
|
44
|
-
fontFamily: string;
|
|
45
|
-
fontSize: number;
|
|
46
|
-
lineHeight: number;
|
|
47
|
-
};
|
|
48
|
-
value: {
|
|
49
|
-
color: string;
|
|
50
|
-
fontFamily: string;
|
|
51
|
-
fontSize: number;
|
|
52
|
-
lineHeight: number;
|
|
53
|
-
};
|
|
54
|
-
icon: {
|
|
55
|
-
marginLeft: string;
|
|
56
|
-
color: string;
|
|
57
|
-
fontSize: number;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
render(): JSX.Element;
|
|
61
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RangeDatePicker = void 0;
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const FontAwesome_1 = require("react-native-vector-icons/FontAwesome");
|
|
6
|
-
const format_1 = require("../modules/format");
|
|
7
|
-
const theme_1 = require("../modules/theme");
|
|
8
|
-
const react_date_range_1 = require("react-date-range");
|
|
9
|
-
const Modal_1 = require("./Modal");
|
|
10
|
-
const layout_1 = require("../modules/layout");
|
|
11
|
-
require("react-date-range/dist/styles.css");
|
|
12
|
-
const react_native_1 = require("react-native");
|
|
13
|
-
require("../../styles/RangeDatePicker.css");
|
|
14
|
-
class RangeDatePicker extends React.Component {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.state = {
|
|
18
|
-
showStartDateModal: false,
|
|
19
|
-
count: 0
|
|
20
|
-
};
|
|
21
|
-
this.calendarRef = React.createRef();
|
|
22
|
-
this.handleClick = (event) => {
|
|
23
|
-
if (this.calendarRef.current &&
|
|
24
|
-
!this.calendarRef.current.contains(event.target)) {
|
|
25
|
-
this.setState({ showStartDateModal: false, count: 0 });
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
this.handleDatePickerPress = () => {
|
|
29
|
-
this.setState({
|
|
30
|
-
showStartDateModal: true
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
this.handleRangeDateConfirm = (ranges) => {
|
|
34
|
-
if (this.state.count == 1) {
|
|
35
|
-
this.props.onStartDateChange(ranges.selection.startDate);
|
|
36
|
-
// Sometimes the parent component is not ready because the setState method
|
|
37
|
-
// is async, so we wait a little.
|
|
38
|
-
setTimeout(() => this.props.onEndDateChange(ranges.selection.endDate), 1);
|
|
39
|
-
this.setState({ showStartDateModal: false, count: 0 });
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
this.props.onStartDateChange(ranges.selection.startDate);
|
|
43
|
-
this.setState({ count: 1 });
|
|
44
|
-
};
|
|
45
|
-
this.getStyles = () => {
|
|
46
|
-
const theme = (0, theme_1.getTheme)();
|
|
47
|
-
const styles = react_native_1.StyleSheet.create({
|
|
48
|
-
container: {
|
|
49
|
-
paddingHorizontal: 16,
|
|
50
|
-
paddingVertical: 8,
|
|
51
|
-
borderWidth: 1,
|
|
52
|
-
borderColor: theme.borderColor1,
|
|
53
|
-
borderRadius: 3,
|
|
54
|
-
flexDirection: 'row',
|
|
55
|
-
alignItems: 'center'
|
|
56
|
-
},
|
|
57
|
-
modalOverlay: {
|
|
58
|
-
justifyContent: 'center',
|
|
59
|
-
alignItems: 'center'
|
|
60
|
-
},
|
|
61
|
-
label: {
|
|
62
|
-
color: theme.textColor2,
|
|
63
|
-
fontFamily: theme.fontFamily3,
|
|
64
|
-
fontSize: (0, layout_1.isTablet)() ? 15 : 12,
|
|
65
|
-
lineHeight: 16
|
|
66
|
-
},
|
|
67
|
-
value: {
|
|
68
|
-
color: theme.textColor1,
|
|
69
|
-
fontFamily: theme.fontFamily1,
|
|
70
|
-
fontSize: 16,
|
|
71
|
-
lineHeight: 22
|
|
72
|
-
},
|
|
73
|
-
icon: {
|
|
74
|
-
marginLeft: 'auto',
|
|
75
|
-
color: theme.textColor2,
|
|
76
|
-
fontSize: 22
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
return styles;
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
componentWillMount() {
|
|
83
|
-
document.addEventListener('mousedown', this.handleClick, false);
|
|
84
|
-
}
|
|
85
|
-
componentWillUnmount() {
|
|
86
|
-
document.removeEventListener('mousedown', this.handleClick, false);
|
|
87
|
-
}
|
|
88
|
-
render() {
|
|
89
|
-
const { label, startDate, endDate, style, nativeID } = this.props;
|
|
90
|
-
const { showStartDateModal } = this.state;
|
|
91
|
-
const displayFormat = 'MMM d, yyyy';
|
|
92
|
-
const displayText = (0, format_1.formatDate)(startDate, displayFormat) +
|
|
93
|
-
' - ' +
|
|
94
|
-
(0, format_1.formatDate)(endDate, displayFormat);
|
|
95
|
-
const theme = (0, theme_1.getTheme)();
|
|
96
|
-
const styles = this.getStyles();
|
|
97
|
-
return (React.createElement(react_native_1.TouchableWithoutFeedback, { onPress: this.handleDatePickerPress },
|
|
98
|
-
React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style] },
|
|
99
|
-
React.createElement(react_native_1.View, null,
|
|
100
|
-
React.createElement(react_native_1.Text, { style: styles.label }, label),
|
|
101
|
-
React.createElement(react_native_1.Text, { style: styles.value }, displayText)),
|
|
102
|
-
React.createElement(FontAwesome_1.default, { name: "calendar", style: styles.icon }),
|
|
103
|
-
React.createElement(Modal_1.Modal, { visible: showStartDateModal, overlayStyle: styles.modalOverlay },
|
|
104
|
-
React.createElement("div", { ref: this.calendarRef, style: {
|
|
105
|
-
borderRadius: '5px',
|
|
106
|
-
position: 'absolute',
|
|
107
|
-
top: '50%',
|
|
108
|
-
marginTop: '-150px',
|
|
109
|
-
fontFamily: theme.fontFamily1
|
|
110
|
-
} },
|
|
111
|
-
React.createElement(react_date_range_1.DateRange, { locale: (0, format_1.getDateFnsLocale)(), showDateDisplay: false, ranges: [
|
|
112
|
-
{
|
|
113
|
-
startDate: startDate,
|
|
114
|
-
endDate: endDate,
|
|
115
|
-
key: 'selection'
|
|
116
|
-
}
|
|
117
|
-
], rangeColors: [theme.backgroundColor3], onChange: this.handleRangeDateConfirm, weekdayDisplayFormat: (0, format_1.getLocale)() === 'pt' ? 'EEEEEE' : 'E' }))))));
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
exports.RangeDatePicker = RangeDatePicker;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface SpaceProperties {
|
|
3
|
-
height?: number;
|
|
4
|
-
width?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare class Space extends React.Component<SpaceProperties> {
|
|
7
|
-
static defaultProps: {
|
|
8
|
-
height: number;
|
|
9
|
-
};
|
|
10
|
-
render(): JSX.Element;
|
|
11
|
-
}
|
package/lib/components/Space.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Space = void 0;
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const react_native_1 = require("react-native");
|
|
6
|
-
class Space extends React.Component {
|
|
7
|
-
render() {
|
|
8
|
-
const { height, width } = this.props;
|
|
9
|
-
return React.createElement(react_native_1.View, { style: { height, width } });
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.Space = Space;
|
|
13
|
-
Space.defaultProps = {
|
|
14
|
-
height: 16
|
|
15
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface Props {
|
|
3
|
-
extraHeight: number;
|
|
4
|
-
}
|
|
5
|
-
export declare class StatusBar extends React.Component<Props> {
|
|
6
|
-
static height: number;
|
|
7
|
-
getStyles: () => {
|
|
8
|
-
statusBar: {
|
|
9
|
-
backgroundColor: string;
|
|
10
|
-
height: number;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
static defaultProps: {
|
|
14
|
-
extraHeight: number;
|
|
15
|
-
};
|
|
16
|
-
render(): JSX.Element;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StatusBar = void 0;
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const react_native_1 = require("react-native");
|
|
6
|
-
const react_native_status_bar_height_1 = require("react-native-status-bar-height");
|
|
7
|
-
const theme_1 = require("../modules/theme");
|
|
8
|
-
class StatusBar extends React.Component {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.getStyles = () => {
|
|
12
|
-
const theme = (0, theme_1.getTheme)();
|
|
13
|
-
const { extraHeight } = this.props;
|
|
14
|
-
const styles = react_native_1.StyleSheet.create({
|
|
15
|
-
statusBar: {
|
|
16
|
-
backgroundColor: theme.statusBarColor,
|
|
17
|
-
height: (0, react_native_status_bar_height_1.getStatusBarHeight)() + extraHeight
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
return styles;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
const styles = this.getStyles();
|
|
25
|
-
return (React.createElement(react_native_1.View, { style: styles.statusBar },
|
|
26
|
-
React.createElement(react_native_1.StatusBar, { backgroundColor: "transparent", barStyle: "light-content", translucent: true })));
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.StatusBar = StatusBar;
|
|
30
|
-
StatusBar.height = (0, react_native_status_bar_height_1.getStatusBarHeight)();
|
|
31
|
-
StatusBar.defaultProps = {
|
|
32
|
-
extraHeight: 0
|
|
33
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
-
export interface SwitchProperties {
|
|
4
|
-
value: boolean;
|
|
5
|
-
label?: string;
|
|
6
|
-
onChange?: (value: boolean) => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
style?: StyleProp<ViewStyle>;
|
|
9
|
-
labelStyle?: StyleProp<TextStyle>;
|
|
10
|
-
}
|
|
11
|
-
export declare class Switch extends React.Component<SwitchProperties> {
|
|
12
|
-
getStyles: () => {
|
|
13
|
-
container: {
|
|
14
|
-
paddingHorizontal: number;
|
|
15
|
-
paddingVertical: number;
|
|
16
|
-
borderWidth: number;
|
|
17
|
-
borderColor: string;
|
|
18
|
-
borderRadius: number;
|
|
19
|
-
flexDirection: "row";
|
|
20
|
-
alignItems: "center";
|
|
21
|
-
justifyContent: "space-between";
|
|
22
|
-
};
|
|
23
|
-
label: {
|
|
24
|
-
color: string;
|
|
25
|
-
fontFamily: string;
|
|
26
|
-
fontSize: number;
|
|
27
|
-
lineHeight: number;
|
|
28
|
-
};
|
|
29
|
-
readonly: {
|
|
30
|
-
backgroundColor: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
render(): JSX.Element;
|
|
34
|
-
}
|
package/lib/components/Switch.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Switch = void 0;
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const react_native_1 = require("react-native");
|
|
6
|
-
const theme_1 = require("../modules/theme");
|
|
7
|
-
const layout_1 = require("../modules/layout");
|
|
8
|
-
class Switch extends React.Component {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.getStyles = () => {
|
|
12
|
-
const theme = (0, theme_1.getTheme)();
|
|
13
|
-
const styles = react_native_1.StyleSheet.create({
|
|
14
|
-
container: {
|
|
15
|
-
paddingHorizontal: 16,
|
|
16
|
-
paddingVertical: 8,
|
|
17
|
-
borderWidth: 1,
|
|
18
|
-
borderColor: theme.borderColor1,
|
|
19
|
-
borderRadius: 3,
|
|
20
|
-
flexDirection: 'row',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
justifyContent: 'space-between'
|
|
23
|
-
},
|
|
24
|
-
label: {
|
|
25
|
-
color: theme.textColor2,
|
|
26
|
-
fontFamily: theme.fontFamily2,
|
|
27
|
-
fontSize: (0, layout_1.isTablet)() ? 15 : 12,
|
|
28
|
-
lineHeight: 16
|
|
29
|
-
},
|
|
30
|
-
readonly: {
|
|
31
|
-
backgroundColor: theme.disabledColor
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
return styles;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
render() {
|
|
38
|
-
const { label, value, onChange, style, labelStyle, disabled } = this.props;
|
|
39
|
-
const styles = this.getStyles();
|
|
40
|
-
return (React.createElement(react_native_1.TouchableWithoutFeedback, { disabled: disabled, onPress: () => {
|
|
41
|
-
if (onChange) {
|
|
42
|
-
onChange(!value);
|
|
43
|
-
}
|
|
44
|
-
} },
|
|
45
|
-
React.createElement(react_native_1.View, { style: [styles.container, style, disabled ? styles.readonly : null] },
|
|
46
|
-
label && React.createElement(react_native_1.Text, { style: [styles.label, labelStyle] }, label),
|
|
47
|
-
React.createElement(react_native_1.Switch, { disabled: disabled, value: value, onValueChange: onChange }))));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
exports.Switch = Switch;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
-
export interface TableColumn {
|
|
4
|
-
key: string;
|
|
5
|
-
title: string;
|
|
6
|
-
headerStyle?: StyleProp<TextStyle>;
|
|
7
|
-
style?: StyleProp<TextStyle>;
|
|
8
|
-
type: 'text' | 'icon' | 'checkbox';
|
|
9
|
-
}
|
|
10
|
-
export interface TableCellStyle {
|
|
11
|
-
[id: string]: {
|
|
12
|
-
[column: string]: StyleProp<TextStyle>;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export interface TableProperties {
|
|
16
|
-
columns: Array<TableColumn>;
|
|
17
|
-
subHeaderData?: Array<TableColumn>;
|
|
18
|
-
data: Array<any>;
|
|
19
|
-
idAttribute: string;
|
|
20
|
-
style?: StyleProp<ViewStyle>;
|
|
21
|
-
cellStyle?: TableCellStyle;
|
|
22
|
-
nativeID?: string;
|
|
23
|
-
onSelect?: (name: string, value: boolean) => void;
|
|
24
|
-
onSelectAll?: (value: boolean) => void;
|
|
25
|
-
}
|
|
26
|
-
export declare class Table extends React.Component<TableProperties> {
|
|
27
|
-
renderHeaderColumn: (column: TableColumn) => JSX.Element;
|
|
28
|
-
renderDataTable: (row: any, rowIndex: number) => JSX.Element;
|
|
29
|
-
render(): JSX.Element;
|
|
30
|
-
}
|