react-native-ui-lib 8.2.2 → 8.3.0-snapshot.7730

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "8.2.2",
3
+ "version": "8.3.0-snapshot.7730",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -96,6 +96,7 @@
96
96
  "react-native-mmkv": "3.2.0",
97
97
  "react-native-navigation": "8.1.2",
98
98
  "react-native-reanimated": "3.18.0",
99
+ "react-native-safe-area-context": "5.6.2",
99
100
  "react-native-shimmer-placeholder": "^2.0.6",
100
101
  "react-native-svg": "15.11.2",
101
102
  "react-native-svg-transformer": "1.5.0",
@@ -111,6 +112,7 @@
111
112
  "react-native": ">=0.77.3",
112
113
  "react-native-gesture-handler": ">=2.24.0",
113
114
  "react-native-reanimated": ">=3.17.5",
115
+ "react-native-safe-area-context": ">=5.6.2",
114
116
  "uilib-native": "^5.0.1"
115
117
  },
116
118
  "jest": {
@@ -3,6 +3,16 @@ const _ = require('lodash');
3
3
  const chalk = require('chalk');
4
4
  const childProcess = require('child_process');
5
5
  const readline = require('readline');
6
+ const BRANCH_CATEGORIES = [
7
+ {name: 'features', branch: 'feat/', title: ':gift: Features'},
8
+ {name: 'web', branch: 'web/', title: ':spider_web: Web support'},
9
+ {name: 'fixes', branch: 'fix/', title: ':wrench: Fixes'},
10
+ {name: 'infra', branch: 'infra/', title: ':gear: Maintenance & Infra'}
11
+ ];
12
+
13
+ function getBranchPrefixes() {
14
+ return BRANCH_CATEGORIES.map(category => category.branch);
15
+ }
6
16
 
7
17
  function fetchLatestReleaseDate(tagPrefix, version) {
8
18
  const release = childProcess.execSync(`gh release view ${tagPrefix}${version}`).toString();
@@ -171,10 +181,7 @@ function generateReleaseNotesFromPRs(PRs, categories, header) {
171
181
  }
172
182
 
173
183
  const prCategories = [
174
- {name: 'features', branch: 'feat/', title: ':gift: Features'},
175
- {name: 'web', branch: 'web/', title: ':spider_web: Web support'},
176
- {name: 'fixes', branch: 'fix/', title: ':wrench: Fixes'},
177
- {name: 'infra', branch: 'infra/', title: ':gear: Maintenance & Infra'},
184
+ ...BRANCH_CATEGORIES,
178
185
  ...categories,
179
186
  {name: 'others', branch: '', title: 'OTHERS'},
180
187
  {
@@ -253,4 +260,4 @@ async function generateReleaseNotes(latestVersion,
253
260
  });
254
261
  }
255
262
 
256
- module.exports = {generateReleaseNotes, generateReleaseNotesFromPRs, parsePR};
263
+ module.exports = {generateReleaseNotes, generateReleaseNotesFromPRs, parsePR, getBranchPrefixes};
@@ -8,10 +8,8 @@ function withScrollEnabler(WrappedComponent) {
8
8
  const layoutSize = useRef(0);
9
9
  const checkScroll = useCallback(() => {
10
10
  const isScrollEnabled = Math.floor(contentSize.current) > layoutSize.current;
11
- if (isScrollEnabled !== scrollEnabled) {
12
- setScrollEnabled(isScrollEnabled);
13
- }
14
- }, [scrollEnabled]);
11
+ setScrollEnabled(isScrollEnabled);
12
+ }, []);
15
13
  const onContentSizeChange = useCallback((contentWidth, contentHeight) => {
16
14
  const size = props.horizontal ? contentWidth : contentHeight;
17
15
  if (size !== contentSize.current) {
@@ -113,7 +113,7 @@ class GridListItem extends Component {
113
113
  alignItems
114
114
  }, {
115
115
  width
116
- }, containerStyle]} {...otherContainerProps} onPress={onPress && this.onItemPress} accessible={renderCustomItem ? true : undefined} {...Modifiers.extractAccessibilityProps(this.props)}>
116
+ }, containerStyle]} accessible={renderCustomItem ? true : undefined} {...otherContainerProps} onPress={onPress && this.onItemPress} {...Modifiers.extractAccessibilityProps(this.props)}>
117
117
  {imageProps && <Image {...imageProps} style={[itemSize, imageProps?.style]} customOverlayContent={children} />}
118
118
  {!_isNil(renderCustomItem) && <View style={{
119
119
  width
@@ -1,4 +1,5 @@
1
1
  import React, { forwardRef, useEffect } from 'react';
2
+ import { useThemeProps } from "../../hooks";
2
3
  // @ts-expect-error
3
4
  import MaskedInputOld from "./old";
4
5
  import MaskedInputNew, { MaskedInputProps } from "./new";
@@ -7,7 +8,7 @@ function MaskedInputMigrator(props, refToForward) {
7
8
  const {
8
9
  migrate,
9
10
  ...others
10
- } = props;
11
+ } = useThemeProps(props, 'MaskedInput');
11
12
  useEffect(() => {
12
13
  if (!migrate) {
13
14
  LogService.warn(`UILib MaskedInput implementation has been updated and now requires manual migration. To proceed, pass the "migrate" prop and check if the functionality works as expected.`);
@@ -2,7 +2,7 @@ import _isFunction from "lodash/isFunction";
2
2
  import React, { Component } from 'react';
3
3
  import { GestureHandlerRootView } from 'react-native-gesture-handler';
4
4
  import { StyleSheet, Modal as RNModal, TouchableWithoutFeedback, KeyboardAvoidingView } from 'react-native';
5
- import { BlurViewPackage } from "../../optionalDependencies";
5
+ import { BlurViewPackage, SafeAreaContextPackage } from "../../optionalDependencies";
6
6
  import { Constants, asBaseComponent } from "../../commons/new";
7
7
  import TopBar, { ModalTopBarProps } from "./TopBar";
8
8
  import View from "../../components/view";
@@ -65,6 +65,7 @@ class Modal extends Component {
65
65
  ...others
66
66
  } = this.props;
67
67
  const defaultContainer = enableModalBlur && Constants.isIOS && BlurView ? BlurView : View;
68
+ const SafeAreaContainer = SafeAreaContextPackage?.SafeAreaProvider ?? React.Fragment;
68
69
  const GestureContainer = useGestureHandlerRootView ? GestureHandlerRootView : React.Fragment;
69
70
  const gestureContainerProps = useGestureHandlerRootView ? {
70
71
  style: styles.fill
@@ -80,14 +81,16 @@ class Modal extends Component {
80
81
  const HackContainer = fixReanimatedInteraction && Constants.isAndroid ? View : React.Fragment;
81
82
  return <HackContainer>
82
83
  <RNModal visible={Boolean(visible)} {...others}>
83
- <GestureContainer {...gestureContainerProps}>
84
- <KeyboardAvoidingContainer {...keyboardAvoidingContainerProps}>
85
- <Container style={styles.fill} blurType="light">
86
- {this.renderTouchableOverlay()}
87
- {this.props.children}
88
- </Container>
89
- </KeyboardAvoidingContainer>
90
- </GestureContainer>
84
+ <SafeAreaContainer>
85
+ <GestureContainer {...gestureContainerProps}>
86
+ <KeyboardAvoidingContainer {...keyboardAvoidingContainerProps}>
87
+ <Container style={styles.fill} blurType="light">
88
+ {this.renderTouchableOverlay()}
89
+ {this.props.children}
90
+ </Container>
91
+ </KeyboardAvoidingContainer>
92
+ </GestureContainer>
93
+ </SafeAreaContainer>
91
94
  </RNModal>
92
95
  </HackContainer>;
93
96
  }
@@ -0,0 +1,2 @@
1
+ declare let SafeAreaContextPackage: any;
2
+ export default SafeAreaContextPackage;
@@ -0,0 +1,5 @@
1
+ let SafeAreaContextPackage;
2
+ try {
3
+ SafeAreaContextPackage = require('react-native-safe-area-context');
4
+ } catch (error) {}
5
+ export default SafeAreaContextPackage;
@@ -7,3 +7,4 @@ export { default as HapticFeedbackPackage } from './HapticFeedbackPackage';
7
7
  export { default as SvgPackage, SvgCssUri } from './SvgPackage';
8
8
  export { createShimmerPlaceholder } from './ShimmerPackage';
9
9
  export { default as LinearGradientPackage } from './LinearGradientPackage';
10
+ export { default as SafeAreaContextPackage } from './SafeAreaContextPackage';
@@ -6,4 +6,5 @@ export { default as NetInfoPackage } from "./NetInfoPackage";
6
6
  export { default as HapticFeedbackPackage } from "./HapticFeedbackPackage";
7
7
  export { default as SvgPackage, SvgCssUri } from "./SvgPackage";
8
8
  export { createShimmerPlaceholder } from "./ShimmerPackage";
9
- export { default as LinearGradientPackage } from "./LinearGradientPackage";
9
+ export { default as LinearGradientPackage } from "./LinearGradientPackage";
10
+ export { default as SafeAreaContextPackage } from "./SafeAreaContextPackage";