Skip to content

Commit 251b719

Browse files
authored
move Constants file to commons folder (#1718)
* move Constants file to commons folder * Update generated types * Add missing semicolon * Fix useOrientation tests * Fix FeatureHighlight tests
1 parent 1ba99ad commit 251b719

File tree

74 files changed

+116
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+116
-113
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
export declare enum orientations {
2+
PORTRAIT = "portrait",
3+
LANDSCAPE = "landscape"
4+
}
5+
export declare function updateConstants(dimensions: any): void;
6+
declare const constants: {
7+
orientations: typeof orientations;
8+
isAndroid: boolean;
9+
isIOS: boolean;
10+
getAndroidVersion: () => number | undefined;
11+
readonly statusBarHeight: number;
12+
isRTL: boolean;
13+
readonly orientation: orientations;
14+
readonly isLandscape: boolean;
15+
readonly screenWidth: number;
16+
readonly screenHeight: number;
17+
readonly windowWidth: number;
18+
readonly windowHeight: number;
19+
readonly isSmallScreen: boolean;
20+
readonly isShortScreen: boolean;
21+
readonly screenAspectRatio: number;
22+
isTablet: boolean;
23+
getSafeAreaInsets: () => {
24+
left: number;
25+
right: number;
26+
bottom: number;
27+
top: number;
28+
};
29+
readonly isIphoneX: boolean;
30+
addDimensionsEventListener: (callback: any) => void;
31+
removeDimensionsEventListener: (callback: any) => void;
32+
readonly accessibility: {
33+
isScreenReaderEnabled: boolean;
34+
};
35+
backspaceKey: string;
36+
enterKey: string;
37+
};
38+
export default constants;

generatedTypes/src/commons/new.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export { default as asBaseComponent, BaseComponentInjectedProps } from './asBase
33
export { default as forwardRef, ForwardRefInjectedProps } from './forwardRef';
44
export { default as withScrollEnabler, WithScrollEnablerProps } from './withScrollEnabler';
55
export { default as withScrollReached, WithScrollReachedProps } from './withScrollReached';
6+
export { default as Constants } from './Constants';
67
export { ContainerModifiers, MarginModifiers, PaddingModifiers, TypographyModifiers, ColorsModifiers, BackgroundColorModifier } from './modifiers';

generatedTypes/src/helpers/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
import * as AvatarHelper from './AvatarHelper';
2-
export { default as Constants } from './Constants';
32
export { AvatarHelper };

generatedTypes/src/hooks/useOrientation/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ interface UseOrientationProps {
22
onOrientationChange?: Function;
33
}
44
declare const useOrientation: ({ onOrientationChange }?: UseOrientationProps) => {
5-
orientation: import("../../helpers/Constants").orientations;
5+
orientation: import("../../commons/Constants").orientations;
66
};
77
export default useOrientation;

generatedTypes/src/incubator/TextField/usePreset.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
127127
selectionState?: import("react-native").DocumentSelectionState | undefined;
128128
spellCheck?: boolean | undefined;
129129
textContentType?: "none" | "name" | "password" | "username" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "location" | "middleName" | "namePrefix" | "nameSuffix" | "nickname" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "newPassword" | "oneTimeCode" | undefined;
130-
autoCompleteType?: "name" | "password" | "username" | "email" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "postal-code" | "street-address" | "tel" | "off" | undefined;
130+
autoCompleteType?: "name" | "email" | "password" | "username" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "postal-code" | "street-address" | "tel" | "off" | undefined;
131131
importantForAutofill?: "auto" | "yes" | "no" | "noExcludeDescendants" | "yesExcludeDescendants" | undefined;
132132
disableFullscreenUI?: boolean | undefined;
133133
inlineImageLeft?: string | undefined;
@@ -457,7 +457,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
457457
selectionState?: import("react-native").DocumentSelectionState | undefined;
458458
spellCheck?: boolean | undefined;
459459
textContentType?: "none" | "name" | "password" | "username" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "location" | "middleName" | "namePrefix" | "nameSuffix" | "nickname" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "newPassword" | "oneTimeCode" | undefined;
460-
autoCompleteType?: "name" | "password" | "username" | "email" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "postal-code" | "street-address" | "tel" | "off" | undefined;
460+
autoCompleteType?: "name" | "email" | "password" | "username" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "postal-code" | "street-address" | "tel" | "off" | undefined;
461461
importantForAutofill?: "auto" | "yes" | "no" | "noExcludeDescendants" | "yesExcludeDescendants" | undefined;
462462
disableFullscreenUI?: boolean | undefined;
463463
inlineImageLeft?: string | undefined;
@@ -899,7 +899,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
899899
selectionState?: import("react-native").DocumentSelectionState | undefined;
900900
spellCheck?: boolean | undefined;
901901
textContentType?: "none" | "name" | "password" | "username" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "location" | "middleName" | "namePrefix" | "nameSuffix" | "nickname" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "newPassword" | "oneTimeCode" | undefined;
902-
autoCompleteType?: "name" | "password" | "username" | "email" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "postal-code" | "street-address" | "tel" | "off" | undefined;
902+
autoCompleteType?: "name" | "email" | "password" | "username" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "postal-code" | "street-address" | "tel" | "off" | undefined;
903903
importantForAutofill?: "auto" | "yes" | "no" | "noExcludeDescendants" | "yesExcludeDescendants" | undefined;
904904
disableFullscreenUI?: boolean | undefined;
905905
inlineImageLeft?: string | undefined;

lib/components/WheelPicker/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, {Component} from 'react';
33
import {DeviceEventEmitter, requireNativeComponent, StyleSheet, View, ViewStyle, TextStyle} from 'react-native';
44

55
import WheelPickerItem from './WheelPickerItem';
6-
import {Constants} from '../../../src/helpers';
6+
import {Constants} from '../../../src/commons/new';
77
import {Typography, Colors} from '../../../src/style';
88

99
import {PickerPackage, CommunityPickerPackage} from '../../../src/optionalDependencies';
File renamed without changes.

src/commons/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ module.exports = {
1313
get UIComponent() {
1414
return require('./UIComponent').default;
1515
},
16+
get Constants() {
17+
return require('./Constants').default;
18+
},
1619
get asBaseComponent() {
1720
return require('./asBaseComponent').default;
1821
},

src/commons/new.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export {default as asBaseComponent, BaseComponentInjectedProps} from './asBaseCo
44
export {default as forwardRef, ForwardRefInjectedProps} from './forwardRef';
55
export {default as withScrollEnabler, WithScrollEnablerProps} from './withScrollEnabler';
66
export {default as withScrollReached, WithScrollReachedProps} from './withScrollReached';
7+
export {default as Constants} from './Constants';
78

89
export {
910
ContainerModifiers,

src/commons/withScrollReached.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, {useState, useCallback} from 'react';
22
import {FlatListProps, ScrollViewProps, NativeSyntheticEvent, NativeScrollEvent} from 'react-native';
33
import forwardRef, {ForwardRefInjectedProps} from './forwardRef';
44
import hoistStatics from 'hoist-non-react-statics';
5-
import {Constants} from '../helpers';
5+
import Constants from './Constants';
66

77
type ScrollReachedProps = {
88
onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;

src/components/actionSheet/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import _ from 'lodash';
22
import React, {Component} from 'react';
33
import {ActionSheetIOS, StyleSheet, StyleProp, ViewStyle, ImageProps, ImageSourcePropType} from 'react-native';
4-
import {Constants} from '../../helpers';
54
import {Colors} from '../../style';
6-
import {asBaseComponent} from '../../commons/new';
5+
import {asBaseComponent, Constants} from '../../commons/new';
76
import Dialog, {DialogProps} from '../dialog';
87
import View from '../view';
98
import Text from '../text';

src/components/button/__tests__/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import renderer from 'react-test-renderer';
33
import Button from '../index';
44
import {Colors, ThemeManager} from '../../../style';
5-
import {Constants} from '../../../helpers';
5+
import {Constants} from '../../../commons';
66

77
describe('Button', () => {
88
beforeEach(() => {

src/components/button/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import _ from 'lodash';
22
import React, {PureComponent} from 'react';
33
import {Platform, StyleSheet, LayoutAnimation, LayoutChangeEvent, ImageStyle} from 'react-native';
4-
import {asBaseComponent, forwardRef} from '../../commons/new';
5-
import {Constants} from 'helpers';
4+
import {asBaseComponent, forwardRef, Constants} from '../../commons/new';
65
import {Colors, Typography, BorderRadiuses} from 'style';
76
// @ts-ignore need to migrate to commonsNew
87
import {modifiers} from 'commons';

src/components/card/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import _ from 'lodash';
22
import React, {PureComponent} from 'react';
33
import {StyleSheet, Animated, ViewStyle} from 'react-native';
4-
import {Constants} from '../../helpers';
54
import {Colors, BorderRadiuses} from '../../style';
65
// import {PureBaseComponent} from '../../commons';
7-
import {asBaseComponent, forwardRef, BaseComponentInjectedProps, ForwardRefInjectedProps} from '../../commons/new';
6+
import {Constants, asBaseComponent, forwardRef, BaseComponentInjectedProps, ForwardRefInjectedProps} from '../../commons/new';
87
import View, {ViewProps} from '../view';
98
import TouchableOpacity, {TouchableOpacityProps} from '../touchableOpacity';
109
import Image from '../image';

src/components/carousel/__tests__/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
import {render} from '@testing-library/react-native';
44
import {Text, View} from 'react-native';
55
import {fireOnScroll, fireOnMomentumScrollEnd} from '../../../uilib-test-renderer';
6-
import {Constants} from '../../../helpers';
6+
import {Constants} from '../../../commons';
77
import Carousel from '../index';
88

99
const numberOfPagesShown = 5;

src/components/carousel/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ import {
88
NativeSyntheticEvent,
99
NativeScrollEvent
1010
} from 'react-native';
11-
import {Constants} from '../../helpers';
1211
import {Colors} from '../../style';
13-
import {asBaseComponent} from '../../commons/new';
12+
import {asBaseComponent, Constants} from '../../commons/new';
1413
import View from '../view';
1514
import Text from '../text';
1615
import PageControl from '../pageControl';

src/components/chipsInput/__tests__/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import _ from 'lodash';
2-
import {Constants} from '../../../helpers';
2+
import {Constants} from '../../../commons';
33
import {ChipsInput} from '../index';
44

55
describe('ChipsInput', () => {

src/components/chipsInput/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import _ from 'lodash';
22
import React, {Component} from 'react';
33
import {NativeModules, StyleSheet, ViewStyle, Image, TextInput, NativeSyntheticEvent, TextInputKeyPressEventData, findNodeHandle, ScrollView, ScrollViewProps, TextInputProps as RNTextInputProps} from 'react-native';
4-
import {Constants} from '../../helpers';
54
import {Colors, BorderRadiuses, ThemeManager, Typography, Spacings} from '../../style';
65
import Assets from '../../assets';
76
import {LogService} from '../../services';
8-
import {asBaseComponent, BaseComponentInjectedProps, TypographyModifiers} from '../../commons/new';
7+
import {Constants, asBaseComponent, BaseComponentInjectedProps, TypographyModifiers} from '../../commons/new';
98
// @ts-expect-error
109
import {TextField} from '../inputs';
1110
import View from '../view';

src/components/colorPalette/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import _ from 'lodash';
22
import memoize from 'memoize-one';
33
import React, {PureComponent} from 'react';
44
import {StyleSheet, UIManager, findNodeHandle, StyleProp, ViewStyle} from 'react-native';
5-
import {Constants} from '../../helpers';
65
import {Colors} from '../../style';
7-
import {asBaseComponent} from '../../commons/new';
6+
import {Constants, asBaseComponent} from '../../commons/new';
87
import View from '../view';
98
import Carousel from '../carousel';
109
import ScrollBar from '../scrollBar';

src/components/colorPicker/ColorPickerDialog.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import {
1111
ViewStyle,
1212
EmitterSubscription
1313
} from 'react-native';
14-
import {Constants} from '../../helpers';
15-
import {asBaseComponent} from '../../commons/new';
14+
import {Constants, asBaseComponent} from '../../commons/new';
1615
import Assets from '../../assets';
1716
import {Colors, Typography} from '../../style';
1817
import View from '../view';

src/components/colorSwatch/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import React, {PureComponent} from 'react';
22
import {StyleSheet, Animated, Easing, LayoutChangeEvent, StyleProp, ViewStyle} from 'react-native';
33
import Assets from '../../assets';
4-
import {Constants} from '../../helpers';
54
import {Colors} from '../../style';
6-
import {asBaseComponent} from '../../commons/new';
5+
import {Constants, asBaseComponent} from '../../commons/new';
76
import View from '../view';
87
import TouchableOpacity from '../touchableOpacity';
98
import Image from '../image';

src/components/connectionStatusBar/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ import React, {PureComponent} from 'react';
22
import _ from 'lodash';
33
import {StyleSheet, Text} from 'react-native';
44
import {NetInfoPackage as NetInfo} from '../../optionalDependencies';
5-
import {Constants} from '../../helpers';
65
import {Colors, Typography} from '../../style';
76
import TouchableOpacity from '../touchableOpacity';
87
import View from '../view';
9-
import {asBaseComponent} from '../../commons/new';
8+
import {Constants, asBaseComponent} from '../../commons/new';
109
import {ConnectionStatusBarProps, ConnectionStatusBarState, DEFAULT_PROPS} from './Types';
1110
export {ConnectionStatusBarProps};
1211

src/components/dateTimePicker/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ import moment from 'moment';
33
import React, {Component} from 'react';
44
import {StyleProp, StyleSheet, ViewStyle} from 'react-native';
55
import {DateTimePickerPackage as RNDateTimePicker} from '../../optionalDependencies';
6-
import {Constants} from '../../helpers';
76
import {Colors} from '../../style';
87
import Assets from '../../assets';
9-
import {asBaseComponent, BaseComponentInjectedProps} from '../../commons/new';
8+
import {Constants, asBaseComponent, BaseComponentInjectedProps} from '../../commons/new';
109
import TextField from '../textField';
1110
import Dialog, {DialogProps} from '../dialog';
1211
import View from '../view';

src/components/dialog/DialogDismissibleView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import _ from 'lodash';
22
import React, {useEffect, useRef, useCallback, useContext} from 'react';
33
import {Animated, Easing, StyleSheet, StyleProp, ViewStyle, LayoutChangeEvent} from 'react-native';
4-
import {Constants} from '../../helpers';
4+
import {Constants} from '../../commons/new';
55
import View from '../view';
66
import PanningContext from '../panningViews/panningContext';
77
import PanningProvider, {

src/components/dialog/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import _ from 'lodash';
22
import React, {Component} from 'react';
33
import {StyleSheet, StyleProp, ViewStyle, ModalPropsIOS, AccessibilityProps} from 'react-native';
44
import {Colors} from '../../style';
5-
import Constants from '../../helpers/Constants';
65
import {AlignmentModifiers, extractAlignmentsValues} from '../../commons/modifiers';
7-
import {asBaseComponent} from '../../commons/new';
6+
import {Constants, asBaseComponent} from '../../commons/new';
87
import Modal from '../modal';
98
import View from '../view';
109
import PanListenerView from '../panningViews/panListenerView';

src/components/drawer/Swipeable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import React, {Component} from 'react';
1111
import {Animated, StyleSheet, View, I18nManager} from 'react-native';
1212
import {PanGestureHandler, TapGestureHandler, State} from 'react-native-gesture-handler';
13-
import {Constants} from '../../helpers';
13+
import {Constants} from '../../commons/new';
1414
import {HapticService, HapticType} from '../../services';
1515

1616

src/components/drawer/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import React, {PureComponent, ReactNode, RefObject} from 'react';
33
import memoize from 'memoize-one';
44
import {Animated, Easing, StyleSheet, ViewStyle, TextStyle, AccessibilityActionEvent} from 'react-native';
55
import {RectButton} from 'react-native-gesture-handler';
6-
import {asBaseComponent} from '../../commons/new';
6+
import {Constants, asBaseComponent} from '../../commons/new';
77
import {extractAccessibilityProps} from '../../commons/modifiers';
8-
import {Constants} from '../../helpers';
98
import {Colors} from '../../style';
109
import View from '../view';
1110
import Swipeable, {SwipeableProps} from './Swipeable';

src/components/featureHighlight/__tests__/index.spec.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import {updateConstants} from '../../../helpers/Constants';
1+
import {updateConstants} from '../../../commons/Constants';
22
import {testable as FeatureHighlight} from '../';
33

44
describe('FeatureHighlight', () => {
5-
65
beforeEach(() => {
76
mockScreenDimentions();
87
});
@@ -59,7 +58,7 @@ describe('FeatureHighlight', () => {
5958
expect(FeatureHighlight.findTargetNode).toHaveBeenCalledWith(mockTarget);
6059

6160
jest.runAllTimers();
62-
61+
6362
expect(setTimeout).toHaveBeenCalledTimes(1);
6463
expect(mockTarget.measureInWindow).toBeCalled();
6564
});

src/components/featureHighlight/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import {
1111
LayoutChangeEvent
1212
} from 'react-native';
1313
import {Colors, Typography} from '../../style';
14-
import {Constants} from '../../helpers';
15-
import {asBaseComponent} from '../../commons/new';
14+
import {Constants, asBaseComponent} from '../../commons/new';
1615
import View from '../view';
1716
import Text from '../text';
1817
import Button, {ButtonProps, ButtonSize} from '../button';

src/components/floatingButton/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, {PropsWithChildren, PureComponent} from 'react';
22
import {StyleSheet, Animated} from 'react-native';
3-
import {Constants} from '../../helpers';
4-
import {asBaseComponent} from '../../commons/new';
3+
import {Constants, asBaseComponent} from '../../commons/new';
54
import {Colors, Spacings} from '../../style';
65
import View from '../view';
76
import Button, {ButtonProps} from '../button';

src/components/gridView/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {Colors, Spacings} from 'style';
66
import UIComponent from '../../commons/UIComponent';
77
import View from '../view';
88
import Text from '../text';
9-
import {Constants} from 'helpers';
9+
import {Constants} from '../../commons/new';
1010
import GridListItem, {GridListItemProps} from '../gridListItem';
1111
import {formatLastItemLabel} from '../../helpers/FormattingPresenter';
1212

src/components/hint/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import {
1515
View as RNView
1616
} from 'react-native';
1717
import {Typography, Spacings, Colors, BorderRadiuses, Shadows} from '../../style';
18-
import {Constants} from '../../helpers';
19-
import {asBaseComponent} from '../../commons/new';
18+
import {Constants, asBaseComponent} from '../../commons/new';
2019
import View from '../view';
2120
import Text from '../text';
2221
import Image from '../image';

src/components/image/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ import {
1010
NativeSyntheticEvent,
1111
ImageErrorEventData
1212
} from 'react-native';
13-
import Constants from '../../helpers/Constants';
14-
import {asBaseComponent, ForwardRefInjectedProps, BaseComponentInjectedProps, MarginModifiers} from '../../commons/new';
13+
import {Constants, asBaseComponent, ForwardRefInjectedProps, BaseComponentInjectedProps, MarginModifiers} from '../../commons/new';
1514
// @ts-ignore
1615
import Assets from '../../assets';
1716
import Overlay, {OverlayTypeType, OverlayIntensityType} from '../overlay';

src/components/loaderScreen/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React, {Component} from 'react';
22
import {StyleSheet, ActivityIndicator} from 'react-native';
33
import {Colors, Typography} from '../../style';
4-
import {Constants} from '../../helpers';
5-
import {asBaseComponent} from '../../commons/new';
4+
import {Constants, asBaseComponent} from '../../commons/new';
65
import View from '../../components/view';
76
import Text from '../../components/text';
87
import {LoaderScreenProps} from './types';

src/components/modal/TopBar.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, {Component} from 'react';
22
import {StyleSheet, StyleProp, TextStyle, ImageSourcePropType} from 'react-native';
3-
import {asBaseComponent} from '../../commons/new';
4-
import {Constants} from '../../helpers';
3+
import {Constants, asBaseComponent} from '../../commons/new';
54
import Assets from '../../assets';
65
import {Colors, Typography} from '../../style';
76
import View, {ViewProps} from '../../components/view';

src/components/modal/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import {
99
GestureResponderEvent
1010
} from 'react-native';
1111
import {BlurViewPackage} from '../../optionalDependencies';
12-
import {Constants} from '../../helpers';
13-
import {asBaseComponent} from '../../commons/new';
12+
import {Constants, asBaseComponent} from '../../commons/new';
1413
import TopBar, {ModalTopBarProps} from './TopBar';
1514
import View from '../../components/view';
1615

0 commit comments

Comments
 (0)