react-native-ui-lib 7.46.3-snapshot.7403 → 7.46.3-snapshot.7414

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.
@@ -173,11 +173,14 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
173
173
  CGFloat bottomSafeArea = [self getBottomSafeArea];
174
174
  CGFloat tabBarHeight = [self getTabBarHeight];
175
175
  CGFloat yOffset = MIN(-bottomSafeArea, -_ObservingInputAccessoryViewTemp.keyboardHeight + tabBarHeight);
176
+
176
177
  if (self.frame.origin.y != yOffset) {
178
+ [self removeObserver:self forKeyPath:@"frame"];
177
179
  self.frame = CGRectMake(self.frame.origin.x,
178
180
  yOffset,
179
181
  self.frame.size.width,
180
182
  self.frame.size.height);
183
+ [self addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionNew context:NULL];
181
184
  }
182
185
 
183
186
  [self updateBottomViewFrame];
@@ -431,7 +434,9 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
431
434
 
432
435
  - (void)_updateScrollViewInsets
433
436
  {
434
- if(self.scrollViewToManage != nil)
437
+ // Because our view is now being transformed inside it's superview (from RN77 it inherited a RCTLegacyViewManagerInteropComponentView as superview) we no longer need the scrollview to also update because it's inside our view
438
+ return;
439
+ /*if(self.scrollViewToManage != nil)
435
440
  {
436
441
  UIEdgeInsets insets = self.scrollViewToManage.contentInset;
437
442
  CGFloat bottomSafeArea = [self getBottomSafeArea];
@@ -441,6 +446,7 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
441
446
  CGPoint originalOffset = self.scrollViewToManage.contentOffset;
442
447
 
443
448
  bottomInset += (_ObservingInputAccessoryViewTemp.keyboardHeight == 0 ? bottomSafeArea : 0);
449
+
444
450
  if(self.scrollIsInverted)
445
451
  {
446
452
  insets.top = bottomInset;
@@ -477,7 +483,7 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
477
483
  insets.bottom = bottomInset;
478
484
  }
479
485
  self.scrollViewToManage.scrollIndicatorInsets = insets;
480
- }
486
+ }*/
481
487
  }
482
488
 
483
489
  #pragma mark - bottom view
@@ -590,7 +596,11 @@ typedef NS_ENUM(NSUInteger, KeyboardTrackingScrollBehavior) {
590
596
  }
591
597
  [self updateBottomViewFrame];
592
598
 
593
- self.transform = CGAffineTransformMakeTranslation(0, accessoryTranslation);
599
+ CGAffineTransform oldTransform = self.transform;
600
+ CGAffineTransform newTransform = CGAffineTransformMakeTranslation(0, accessoryTranslation);
601
+ if (oldTransform.tx != newTransform.tx || oldTransform.ty != newTransform.ty) {
602
+ self.transform = CGAffineTransformMakeTranslation(0, accessoryTranslation);
603
+ }
594
604
 
595
605
  [self _updateScrollViewInsets];
596
606
  }
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uilib-native",
3
- "version": "5.0.0-snapshot.7403",
3
+ "version": "5.0.0-snapshot.7414",
4
4
  "homepage": "https://github.com/wix/react-native-ui-lib",
5
5
  "description": "uilib native components (separated from js components)",
6
6
  "main": "components/index",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "7.46.3-snapshot.7403",
3
+ "version": "7.46.3-snapshot.7414",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -3,20 +3,12 @@ import { HintPositions, HintProps } from './types';
3
3
  declare const Hint: {
4
4
  (props: HintProps): string | number | true | React.JSX.Element | Iterable<React.ReactNode> | null;
5
5
  displayName: string;
6
- defaultProps: {
7
- position: HintPositions;
8
- useModal: boolean;
9
- };
10
6
  positions: typeof HintPositions;
11
7
  };
12
8
  export { HintProps, Hint };
13
9
  declare const _default: React.ForwardRefExoticComponent<HintProps & React.RefAttributes<any>> & {
14
10
  (props: HintProps): string | number | true | React.JSX.Element | Iterable<React.ReactNode> | null;
15
11
  displayName: string;
16
- defaultProps: {
17
- position: HintPositions;
18
- useModal: boolean;
19
- };
20
12
  positions: typeof HintPositions;
21
13
  };
22
14
  export default _default;
@@ -22,8 +22,8 @@ const HINT_MIN_WIDTH = 68;
22
22
  const Hint = props => {
23
23
  const {
24
24
  visible,
25
- useModal,
26
- position,
25
+ useModal = true,
26
+ position = HintPositions.BOTTOM,
27
27
  children,
28
28
  message,
29
29
  containerWidth = Constants.windowWidth,
@@ -69,6 +69,7 @@ const Hint = props => {
69
69
  if (targetRef.current && hintRef.current) {
70
70
  focusAccessibilityOnHint(targetRef.current, hintRef.current);
71
71
  }
72
+ // eslint-disable-next-line react-hooks/exhaustive-deps
72
73
  }, []);
73
74
  const targetLayout = useMemo(() => {
74
75
  return isUsingModal ? targetLayoutInWindowState : targetLayoutState;
@@ -78,6 +79,7 @@ const Hint = props => {
78
79
  if (hintRef.current) {
79
80
  focusAccessibilityOnHint(targetRef.current, hintRef.current);
80
81
  }
82
+ // eslint-disable-next-line react-hooks/exhaustive-deps
81
83
  }, []);
82
84
  const showHint = !!targetLayout;
83
85
  const {
@@ -240,10 +242,6 @@ const styles = StyleSheet.create({
240
242
  }
241
243
  });
242
244
  Hint.displayName = 'Hint';
243
- Hint.defaultProps = {
244
- position: HintPositions.BOTTOM,
245
- useModal: true
246
- };
247
245
  Hint.positions = HintPositions;
248
246
  export { HintProps, Hint };
249
247
 
@@ -24,7 +24,7 @@ export default function TabPage({
24
24
  } = useContext(TabBarContext);
25
25
  const [shouldLoad, setLoaded] = useState(!lazy);
26
26
 
27
- // TODO: RN 77 hack - remove the state in future RN\reanimated release (ticket 4838 \ https://github.com/software-mansion/react-native-reanimated/issues/8517)
27
+ // TODO: RN 77 hack - remove the state in future RN\reanimated release (ticket 4838 \ https://github.com/software-mansion/react-native-reanimated/issues/8517) when fixed we should revert to the original logic (see this PR: https://github.com/wix/react-native-ui-lib/pull/3829)
28
28
  const [isActive, setIsActive] = useState(currentPage.value === index);
29
29
  // const [focused, setFocused] = useState(false);
30
30