react-native-ui-lib 7.44.0-snapshot.7228 → 7.44.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.
Files changed (182) hide show
  1. package/babel.config.js +0 -12
  2. package/index.js +0 -1
  3. package/lib/android/build.gradle +5 -5
  4. package/lib/android/src/main/java/com/wix/reactnativeuilib/UiLibPackageList.java +2 -0
  5. package/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/HighlighterViewManager.java +23 -31
  6. package/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReactHacks.java +30 -0
  7. package/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReflectionUtils.java +34 -0
  8. package/lib/android/src/main/java/com/wix/reactnativeuilib/keyboardinput/utils/RuntimeUtils.java +1 -1
  9. package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/DefaultKeyListener.java +33 -0
  10. package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/KeyListenerProxy.java +53 -0
  11. package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerModule.java +54 -0
  12. package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerPackage.java +28 -0
  13. package/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/ViewUtils.java +36 -0
  14. package/lib/components/{HighlighterOverlayView/index.d.ts → HighlighterOverlayView.d.ts} +1 -1
  15. package/lib/components/HighlighterOverlayView.js +40 -0
  16. package/lib/components/{HighlighterOverlayView/index.web.d.ts → HighlighterOverlayView.web.d.ts} +1 -1
  17. package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/CustomKeyboardView/CustomKeyboardView.android.d.ts +2 -5
  18. package/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/CustomKeyboardView.android.js +28 -0
  19. package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/CustomKeyboardView/CustomKeyboardView.ios.d.ts +1 -1
  20. package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/CustomKeyboardView/CustomKeyboardView.ios.js +3 -3
  21. package/lib/components/Keyboard/{KeyboardAccessoryView/CustomKeyboardView → KeyboardInput}/CustomKeyboardViewBase.d.ts +0 -3
  22. package/lib/components/Keyboard/{KeyboardAccessoryView/CustomKeyboardView → KeyboardInput}/CustomKeyboardViewBase.js +1 -1
  23. package/lib/components/Keyboard/{KeyboardAccessoryView/index.d.ts → KeyboardInput/KeyboardAccessoryView.d.ts} +1 -11
  24. package/lib/components/Keyboard/{KeyboardAccessoryView/index.js → KeyboardInput/KeyboardAccessoryView.js} +5 -31
  25. package/lib/components/Keyboard/{KeyboardAccessoryView/KeyboardRegistry/index.d.ts → KeyboardInput/KeyboardRegistry.d.ts} +1 -1
  26. package/lib/components/Keyboard/{KeyboardAccessoryView/KeyboardRegistry/index.js → KeyboardInput/KeyboardRegistry.js} +1 -1
  27. package/lib/components/Keyboard/{KeyboardAccessoryView/KeyboardRegistry → KeyboardInput}/__tests__/KeyboardRegistry.spec.js +1 -1
  28. package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/keyboardAccessoryView.api.json +5 -5
  29. package/lib/components/Keyboard/{KeyboardAccessoryView/KeyboardRegistry → KeyboardInput}/keyboardRegistry.api.json +9 -9
  30. package/lib/components/Keyboard/KeyboardInput/utils/KeyboardUtils.d.ts +11 -0
  31. package/lib/components/Keyboard/KeyboardInput/utils/KeyboardUtils.js +17 -0
  32. package/lib/components/Keyboard/{KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager → KeyboardInput/utils}/__tests__/EventEmitterManager.spec.js +1 -1
  33. package/lib/components/Keyboard/{KeyboardAwareInsetsView/index.d.ts → KeyboardTracking/KeyboardAwareInsetsView.d.ts} +1 -1
  34. package/lib/components/Keyboard/{KeyboardAwareInsetsView/index.js → KeyboardTracking/KeyboardAwareInsetsView.js} +1 -1
  35. package/lib/components/Keyboard/{KeyboardTrackingView → KeyboardTracking/KeyboardTrackingView}/KeyboardTrackingView.ios.d.ts +4 -1
  36. package/lib/components/Keyboard/{KeyboardTrackingView → KeyboardTracking/KeyboardTrackingView}/KeyboardTrackingView.ios.js +8 -5
  37. package/lib/components/Keyboard/{KeyboardTrackingView → KeyboardTracking/KeyboardTrackingView}/index.d.ts +2 -2
  38. package/lib/components/Keyboard/{KeyboardTrackingView → KeyboardTracking/KeyboardTrackingView}/keyboardTrackingView.api.json +20 -11
  39. package/lib/components/Keyboard/index.d.ts +6 -6
  40. package/lib/components/Keyboard/index.js +6 -6
  41. package/lib/components/SafeArea/SafeAreaInsetsManager.d.ts +3 -8
  42. package/lib/components/SafeArea/SafeAreaInsetsManager.js +24 -87
  43. package/lib/components/SafeArea/SafeAreaSpacerView.d.ts +2 -2
  44. package/lib/components/SafeArea/SafeAreaSpacerView.js +9 -63
  45. package/lib/components/index.d.ts +1 -1
  46. package/lib/components/index.js +1 -1
  47. package/lib/package.json +1 -1
  48. package/lib/react-native.config.js +3 -1
  49. package/metro.config.js +2 -2
  50. package/package.json +23 -23
  51. package/panningViews.d.ts +2 -0
  52. package/panningViews.js +1 -0
  53. package/react-native.config.js +3 -1
  54. package/sharedTransition.d.ts +2 -0
  55. package/sharedTransition.js +1 -0
  56. package/src/commons/Constants.js +2 -7
  57. package/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +1 -5
  58. package/src/components/actionSheet/index.d.ts +12 -2
  59. package/src/components/actionSheet/index.js +42 -3
  60. package/src/components/badge/index.d.ts +47 -107
  61. package/src/components/button/button.api.json +1 -1
  62. package/src/components/button/index.d.ts +23 -53
  63. package/src/components/button/types.d.ts +1 -0
  64. package/src/components/colorPicker/ColorPickerDialog.d.ts +1 -1
  65. package/src/components/colorPicker/ColorPickerDialog.js +1 -1
  66. package/src/components/dateTimePicker/index.d.ts +5 -186
  67. package/src/components/dateTimePicker/index.js +2 -1
  68. package/src/components/dialog/DialogDismissibleView.d.ts +34 -0
  69. package/src/components/dialog/DialogDismissibleView.js +184 -0
  70. package/src/components/dialog/OverlayFadingBackground.d.ts +14 -0
  71. package/src/components/dialog/OverlayFadingBackground.js +45 -0
  72. package/src/components/dialog/dialog.api.json +37 -31
  73. package/src/components/dialog/index.d.ts +105 -13
  74. package/src/components/dialog/index.js +212 -204
  75. package/src/components/drawer/Swipeable.js +2 -1
  76. package/src/components/drawer/index.js +25 -31
  77. package/src/components/fadedScrollView/index.js +2 -7
  78. package/src/components/featureHighlight/index.d.ts +1 -1
  79. package/src/components/index.js +19 -0
  80. package/src/components/panningViews/asPanViewConsumer.d.ts +3 -0
  81. package/src/components/panningViews/asPanViewConsumer.js +16 -0
  82. package/src/components/panningViews/panDismissibleView.d.ts +51 -0
  83. package/src/components/panningViews/panDismissibleView.js +350 -0
  84. package/src/components/panningViews/panGestureView.d.ts +23 -0
  85. package/src/components/panningViews/panGestureView.js +156 -0
  86. package/src/components/panningViews/panListenerView.d.ts +66 -0
  87. package/src/components/panningViews/panListenerView.js +155 -0
  88. package/src/components/panningViews/panResponderView.d.ts +19 -0
  89. package/src/components/panningViews/panResponderView.js +79 -0
  90. package/src/components/panningViews/panningContext.d.ts +3 -0
  91. package/src/components/panningViews/panningContext.js +4 -0
  92. package/src/components/panningViews/panningProvider.d.ts +73 -0
  93. package/src/components/panningViews/panningProvider.js +101 -0
  94. package/src/components/picker/Picker.driver.new.js +1 -1
  95. package/src/components/picker/PickerItem.js +20 -6
  96. package/src/components/picker/PickerPresenter.d.ts +1 -0
  97. package/src/components/picker/PickerPresenter.js +23 -1
  98. package/src/components/picker/api/picker.api.json +1 -0
  99. package/src/components/picker/api/pickerItem.api.json +5 -0
  100. package/src/components/picker/helpers/useFieldType.d.ts +23 -53
  101. package/src/components/picker/helpers/usePickerLabel.d.ts +1 -1
  102. package/src/components/picker/helpers/usePickerLabel.js +3 -2
  103. package/src/components/picker/helpers/usePickerMigrationWarnings.d.ts +1 -1
  104. package/src/components/picker/helpers/usePickerMigrationWarnings.js +12 -0
  105. package/src/components/picker/helpers/usePickerSearch.d.ts +1 -1
  106. package/src/components/picker/helpers/usePickerSearch.js +8 -4
  107. package/src/components/picker/helpers/usePickerSelection.d.ts +1 -1
  108. package/src/components/picker/helpers/usePickerSelection.js +10 -2
  109. package/src/components/picker/index.js +22 -4
  110. package/src/components/picker/types.d.ts +24 -1
  111. package/src/components/sharedTransition/ShareTransitionContext.js +3 -0
  112. package/src/components/sharedTransition/SharedArea.js +153 -0
  113. package/src/components/sharedTransition/SourceElement.js +44 -0
  114. package/src/components/sharedTransition/TargetElement.js +38 -0
  115. package/src/components/sharedTransition/index.js +9 -0
  116. package/src/components/slider/GradientSlider.d.ts +1 -1
  117. package/src/components/sortableGridList/SortableItem.js +4 -13
  118. package/src/components/sortableList/SortableListItem.js +4 -13
  119. package/src/components/stackAggregator/index.js +11 -16
  120. package/src/components/textField/Input.js +1 -0
  121. package/src/components/textField/presets/outline.d.ts +46 -106
  122. package/src/components/textField/presets/underline.d.ts +46 -106
  123. package/src/components/textField/usePreset.d.ts +44 -72
  124. package/src/incubator/dialog/dialog.api.json +54 -0
  125. package/src/{components → incubator}/dialog/dialogHeader.api.json +2 -2
  126. package/src/incubator/dialog/index.d.ts +15 -0
  127. package/src/incubator/dialog/index.js +218 -0
  128. package/src/{components → incubator}/dialog/types.d.ts +19 -0
  129. package/src/{components → incubator}/dialog/types.js +3 -1
  130. package/src/{components → incubator}/dialog/useDialogContent.d.ts +1 -1
  131. package/src/incubator/expandableOverlay/ExpandableOverlay.driver.js +1 -1
  132. package/src/incubator/expandableOverlay/index.d.ts +3 -42
  133. package/src/incubator/expandableOverlay/index.js +4 -1
  134. package/src/{hooks/useHiddenLocation/index.d.ts → incubator/hooks/useHiddenLocation.d.ts} +1 -1
  135. package/src/{hooks/useHiddenLocation/index.web.d.ts → incubator/hooks/useHiddenLocation.web.d.ts} +1 -1
  136. package/src/incubator/index.d.ts +2 -0
  137. package/src/incubator/index.js +2 -0
  138. package/src/{components → incubator}/panView/index.d.ts +3 -3
  139. package/src/{components → incubator}/panView/index.js +4 -4
  140. package/src/{components → incubator}/panView/usePanGesture.d.ts +1 -1
  141. package/src/incubator/toast/index.js +1 -1
  142. package/src/index.d.ts +10 -3
  143. package/src/index.js +160 -41
  144. package/src/testkit/index.d.ts +1 -1
  145. package/src/testkit/index.js +1 -1
  146. package/lib/components/HighlighterOverlayView/index.js +0 -49
  147. package/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardView.android.js +0 -51
  148. package/lib/components/Keyboard/KeyboardAccessoryView/KeyboardUtils/index.d.ts +0 -26
  149. package/lib/components/Keyboard/KeyboardAccessoryView/KeyboardUtils/index.js +0 -91
  150. package/lib/components/SafeArea/index.d.ts +0 -10
  151. package/lib/components/SafeArea/index.js +0 -11
  152. package/panView.d.ts +0 -2
  153. package/panView.js +0 -1
  154. /package/lib/components/{HighlighterOverlayView/index.web.js → HighlighterOverlayView.web.js} +0 -0
  155. /package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/CustomKeyboardView/index.d.ts +0 -0
  156. /package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/CustomKeyboardView/index.js +0 -0
  157. /package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/CustomKeyboardView/index.web.d.ts +0 -0
  158. /package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/CustomKeyboardView/index.web.js +0 -0
  159. /package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/TextInputKeyboardManager/TextInputKeyboardManager.android.d.ts +0 -0
  160. /package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/TextInputKeyboardManager/TextInputKeyboardManager.android.js +0 -0
  161. /package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/TextInputKeyboardManager/TextInputKeyboardManager.ios.d.ts +0 -0
  162. /package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/TextInputKeyboardManager/TextInputKeyboardManager.ios.js +0 -0
  163. /package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/TextInputKeyboardManager/index.d.ts +0 -0
  164. /package/lib/components/Keyboard/{KeyboardAccessoryView → KeyboardInput}/TextInputKeyboardManager/index.js +0 -0
  165. /package/lib/components/Keyboard/{KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/index.d.ts → KeyboardInput/utils/EventEmitterManager.d.ts} +0 -0
  166. /package/lib/components/Keyboard/{KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/index.js → KeyboardInput/utils/EventEmitterManager.js} +0 -0
  167. /package/lib/components/Keyboard/{KeyboardTrackingView → KeyboardTracking/KeyboardTrackingView}/KeyboardTrackingView.android.d.ts +0 -0
  168. /package/lib/components/Keyboard/{KeyboardTrackingView → KeyboardTracking/KeyboardTrackingView}/KeyboardTrackingView.android.js +0 -0
  169. /package/lib/components/Keyboard/{KeyboardTrackingView → KeyboardTracking/KeyboardTrackingView}/index.js +0 -0
  170. /package/lib/components/Keyboard/{KeyboardTrackingView → KeyboardTracking/KeyboardTrackingView}/index.web.d.ts +0 -0
  171. /package/lib/components/Keyboard/{KeyboardTrackingView → KeyboardTracking/KeyboardTrackingView}/index.web.js +0 -0
  172. /package/lib/components/Keyboard/{KeyboardAwareInsetsView → KeyboardTracking}/keyboardAwareInsetsView.api.json +0 -0
  173. /package/src/{components → incubator}/dialog/Dialog.driver.new.d.ts +0 -0
  174. /package/src/{components → incubator}/dialog/Dialog.driver.new.js +0 -0
  175. /package/src/{components → incubator}/dialog/DialogHeader.d.ts +0 -0
  176. /package/src/{components → incubator}/dialog/DialogHeader.js +0 -0
  177. /package/src/{components → incubator}/dialog/useDialogContent.js +0 -0
  178. /package/src/{hooks/useHiddenLocation/index.js → incubator/hooks/useHiddenLocation.js} +0 -0
  179. /package/src/{hooks/useHiddenLocation/index.web.js → incubator/hooks/useHiddenLocation.web.js} +0 -0
  180. /package/src/{components → incubator}/panView/panningUtil.d.ts +0 -0
  181. /package/src/{components → incubator}/panView/panningUtil.js +0 -0
  182. /package/src/{components → incubator}/panView/usePanGesture.js +0 -0
@@ -1,68 +1,14 @@
1
- import React, { useState, useCallback, useEffect, useMemo } from 'react';
2
- import { View, Dimensions } from 'react-native';
3
- import SafeAreaInsetsManager from "./SafeAreaInsetsManager";
1
+ import React from 'react';
2
+ import { View, requireNativeComponent, Platform } from 'react-native';
3
+ const NativeSafeAreaSpacerView = requireNativeComponent('SafeAreaSpacerView');
4
+ const isIOS = Platform.OS === 'ios';
4
5
  const SafeAreaSpacerView = ({
5
6
  style
6
7
  }) => {
7
- const [safeAreaInsets, setSafeAreaInsets] = useState({
8
- top: 0,
9
- left: 0,
10
- bottom: 0,
11
- right: 0
12
- });
13
- const [componentHeight, setComponentHeight] = useState(0);
14
- const [spacerHeight, setSpacerHeight] = useState(0);
15
- useEffect(() => {
16
- const getSafeAreaInsets = async () => {
17
- try {
18
- const insets = await SafeAreaInsetsManager.getSafeAreaInsets();
19
- if (insets) {
20
- setSafeAreaInsets(insets);
21
- }
22
- } catch (error) {
23
- console.warn('SafeAreaSpacerView: Failed to get initial safe area insets:', error);
24
- }
25
- };
26
- getSafeAreaInsets();
27
-
28
- // Add delegate to listen for safe area changes from native component
29
- const delegate = {
30
- onSafeAreaInsetsDidChangeEvent: insets => {
31
- if (insets) {
32
- setSafeAreaInsets(insets);
33
- }
34
- }
35
- };
36
- SafeAreaInsetsManager.addSafeAreaChangedDelegate(delegate);
37
- return () => {
38
- SafeAreaInsetsManager.removeSafeAreaChangedDelegate(delegate);
39
- };
40
- }, []);
41
-
42
- // Position detection with useCallback
43
- const handleLayout = useCallback(event => {
44
- const {
45
- y
46
- } = event.nativeEvent.layout;
47
- setComponentHeight(y);
48
- }, []);
49
- useEffect(() => {
50
- const screenHeight = Dimensions.get('window').height;
51
- let height = 0;
52
- // Check if positioned within safe area bounds
53
- if (componentHeight < safeAreaInsets.top) {
54
- height = safeAreaInsets.top;
55
- } else if (componentHeight > screenHeight - safeAreaInsets.bottom) {
56
- height = safeAreaInsets.bottom;
57
- }
58
- if (height !== spacerHeight) {
59
- setSpacerHeight(height);
60
- }
61
- }, [componentHeight, safeAreaInsets, spacerHeight]);
62
- const spacerStyle = useMemo(() => [{
63
- height: spacerHeight
64
- }, style], [spacerHeight, style]);
65
- return <View style={spacerStyle} onLayout={handleLayout} />;
8
+ return (
9
+ // @ts-ignore
10
+ isIOS ? <NativeSafeAreaSpacerView style={style} /> : <View style={style} />
11
+ );
66
12
  };
67
- SafeAreaSpacerView.displayName = 'SafeAreaSpacerView';
13
+ SafeAreaSpacerView.displayName = 'IGNORE';
68
14
  export default SafeAreaSpacerView;
@@ -1,6 +1,6 @@
1
1
  import DynamicFonts, { FontExtension } from './DynamicFonts';
2
2
  import HighlighterOverlayView from './HighlighterOverlayView';
3
- import SafeAreaSpacerView from './SafeArea';
3
+ import SafeAreaSpacerView from './SafeArea/SafeAreaSpacerView';
4
4
  import SafeAreaInsetsManager from './SafeArea/SafeAreaInsetsManager';
5
5
  import Keyboard, { KeyboardTrackingViewProps, KeyboardAccessoryViewProps } from './Keyboard';
6
6
  export { DynamicFonts, FontExtension, HighlighterOverlayView, SafeAreaSpacerView, SafeAreaInsetsManager, Keyboard, KeyboardTrackingViewProps, KeyboardAccessoryViewProps };
@@ -1,6 +1,6 @@
1
1
  import DynamicFonts, { FontExtension } from "./DynamicFonts";
2
2
  import HighlighterOverlayView from "./HighlighterOverlayView";
3
- import SafeAreaSpacerView from "./SafeArea";
3
+ import SafeAreaSpacerView from "./SafeArea/SafeAreaSpacerView";
4
4
  import SafeAreaInsetsManager from "./SafeArea/SafeAreaInsetsManager";
5
5
  import Keyboard, { KeyboardTrackingViewProps, KeyboardAccessoryViewProps } from "./Keyboard";
6
6
  export { DynamicFonts, FontExtension, HighlighterOverlayView, SafeAreaSpacerView, SafeAreaInsetsManager, Keyboard, KeyboardTrackingViewProps, KeyboardAccessoryViewProps };
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uilib-native",
3
- "version": "5.0.0-snapshot.7228",
3
+ "version": "4.5.2",
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",
@@ -10,9 +10,11 @@ module.exports = {
10
10
  sourceDir: './android/',
11
11
  packageImportPath: `import com.wix.reactnativeuilib.dynamicfont.DynamicFontPackage;
12
12
  import com.wix.reactnativeuilib.highlighterview.HighlighterViewPackage;
13
- import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage;`,
13
+ import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage;
14
+ import com.wix.reactnativeuilib.textinput.TextInputDelKeyHandlerPackage;`,
14
15
  packageInstance: `new DynamicFontPackage(),
15
16
  new HighlighterViewPackage(),
17
+ new TextInputDelKeyHandlerPackage(),
16
18
  new KeyboardInputPackage(getApplication())`
17
19
  }
18
20
  }
package/metro.config.js CHANGED
@@ -5,9 +5,9 @@ const {assetExts, sourceExts} = defaultConfig.resolver;
5
5
 
6
6
  /**
7
7
  * Metro configuration
8
- * https://reactnative.dev/docs/metro
8
+ * https://facebook.github.io/metro/docs/configuration
9
9
  *
10
- * @type {import('@react-native/metro-config').MetroConfig}
10
+ * @type {import('metro-config').MetroConfig}
11
11
  */
12
12
 
13
13
  const config = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "7.44.0-snapshot.7228",
3
+ "version": "7.44.0",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -56,15 +56,15 @@
56
56
  "react-native-redash": "^12.0.3",
57
57
  "semver": "^5.5.0",
58
58
  "tinycolor2": "^1.4.2",
59
- "uilib-native": "5.0.0-snapshot.7216",
59
+ "uilib-native": "4.5.1",
60
60
  "url-parse": "^1.2.0",
61
61
  "wix-react-native-text-size": "1.0.9"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@babel/cli": "^7.16.8",
65
- "@babel/core": "^7.25.2",
65
+ "@babel/core": "^7.24.4",
66
66
  "@babel/plugin-transform-modules-commonjs": "^7.17.9",
67
- "@babel/preset-env": "^7.25.3",
67
+ "@babel/preset-env": "^7.20.0",
68
68
  "@babel/preset-react": "^7.10.1",
69
69
  "@babel/runtime": "^7.26.10",
70
70
  "@formatjs/intl-datetimeformat": "^6.0.3",
@@ -73,29 +73,28 @@
73
73
  "@formatjs/intl-numberformat": "^8.0.4",
74
74
  "@formatjs/intl-pluralrules": "^5.0.3",
75
75
  "@react-native-community/blur": "4.4.1",
76
- "@react-native-community/cli": "15.0.1",
77
- "@react-native-community/cli-platform-android": "15.0.1",
78
- "@react-native-community/cli-platform-ios": "15.0.1",
79
76
  "@react-native-community/datetimepicker": "^3.4.6",
80
- "@react-native-community/netinfo": "11.3.3",
81
- "@react-native/babel-preset": "0.77.2",
82
- "@react-native/eslint-config": "0.77.2",
83
- "@react-native/metro-config": "0.77.2",
84
- "@react-native/typescript-config": "0.77.2",
77
+ "@react-native-community/netinfo": "^5.6.2",
78
+ "@react-native/babel-preset": "0.73.21",
79
+ "@react-native/eslint-config": "0.73.2",
80
+ "@react-native/metro-config": "0.73.5",
81
+ "@react-native/typescript-config": "0.73.1",
85
82
  "@shopify/flash-list": "1.7.6",
86
83
  "@testing-library/react-hooks": "^8.0.1",
87
84
  "@testing-library/react-native": "^11.5.1",
88
85
  "@types/hoist-non-react-statics": "^3.3.1",
89
- "@types/jest": "^29.5.13",
86
+ "@types/jest": "^29.2.1",
90
87
  "@types/lodash": "^4.0.0",
91
88
  "@types/prop-types": "^15.5.3",
92
89
  "@types/react": "18.3.7",
90
+ "@types/react-native": "0.73.0",
93
91
  "@types/react-test-renderer": "^18.3.0",
94
92
  "@types/tinycolor2": "^1.4.2",
95
93
  "@types/url-parse": "^1.4.3",
96
94
  "@typescript-eslint/eslint-plugin": "^5.3.1",
97
95
  "@typescript-eslint/parser": "^5.3.1",
98
96
  "@welldone-software/why-did-you-render": "^3.2.1",
97
+ "babel-jest": "^29.6.3",
99
98
  "babel-plugin-lodash": "^3.3.4",
100
99
  "babel-plugin-module-resolver": "^5.0.0",
101
100
  "eslint": "8.19.0",
@@ -105,6 +104,7 @@
105
104
  "eslint-plugin-react-native": "^4.0.0",
106
105
  "jest": "^29.6.3",
107
106
  "light-date": "^1.2.0",
107
+ "metro-react-native-babel-preset": "0.73.10",
108
108
  "moment": "^2.24.0",
109
109
  "object-hash": "^3.0.0",
110
110
  "postcss": "^8.4.21",
@@ -114,28 +114,27 @@
114
114
  "react": "18.2.0",
115
115
  "react-autobind": "^1.0.6",
116
116
  "react-dom": "^18.2.0",
117
- "react-native": "0.77.2",
117
+ "react-native": "0.73.9",
118
118
  "react-native-fs": "^2.20.0",
119
- "react-native-gesture-handler": "2.22.1",
119
+ "react-native-gesture-handler": "2.14.1",
120
120
  "react-native-haptic-feedback": "^1.11.0",
121
121
  "react-native-linear-gradient": "2.6.2",
122
- "react-native-mmkv": "3.2.0",
123
- "react-native-navigation": "8.1.0-rc01-snapshot.1710",
122
+ "react-native-mmkv": "2.11.0",
123
+ "react-native-navigation": "7.40.1",
124
124
  "react-native-reanimated": "3.16.7",
125
125
  "react-native-shimmer-placeholder": "^2.0.6",
126
- "react-native-svg": "15.11.2",
126
+ "react-native-svg": "15.2.0",
127
127
  "react-native-svg-transformer": "1.5.0",
128
- "react-test-renderer": "18.3.1",
128
+ "react-test-renderer": "18.2.0",
129
129
  "reassure": "^0.4.1",
130
- "setimmediate": "^1.0.5",
131
130
  "shell-utils": "^1.0.10",
132
131
  "typescript": "5.0.4"
133
132
  },
134
133
  "peerDependencies": {
135
134
  "react": ">=17.0.1",
136
- "react-native": ">=0.76.0",
137
- "react-native-gesture-handler": ">=2.22.0",
138
- "react-native-reanimated": ">=3.16.7",
135
+ "react-native": ">=0.64.1",
136
+ "react-native-gesture-handler": ">=2.5.0",
137
+ "react-native-reanimated": ">=2.0.0",
139
138
  "react-native-ui-lib": "*"
140
139
  },
141
140
  "jest": {
@@ -163,6 +162,7 @@
163
162
  "engines": {
164
163
  "node": ">=18"
165
164
  },
165
+ "packageManager": "yarn@3.4.1",
166
166
  "files": [
167
167
  "*.js",
168
168
  "*.d.ts",
@@ -0,0 +1,2 @@
1
+ import {PanningViews} from './src';
2
+ export default PanningViews;
@@ -0,0 +1 @@
1
+ module.exports = require('./src/components/panningViews').default;
@@ -10,9 +10,11 @@ module.exports = {
10
10
  sourceDir: '../uilib-native/android/',
11
11
  packageImportPath: `import com.wix.reactnativeuilib.dynamicfont.DynamicFontPackage;
12
12
  import com.wix.reactnativeuilib.highlighterview.HighlighterViewPackage;
13
- import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage;`,
13
+ import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage;
14
+ import com.wix.reactnativeuilib.textinput.TextInputDelKeyHandlerPackage;`,
14
15
  packageInstance: `new DynamicFontPackage(),
15
16
  new HighlighterViewPackage(),
17
+ new TextInputDelKeyHandlerPackage(),
16
18
  new KeyboardInputPackage(getApplication())`
17
19
  }
18
20
  }
@@ -0,0 +1,2 @@
1
+ import {SharedTransition} from './src';
2
+ export default SharedTransition;
@@ -0,0 +1 @@
1
+ module.exports = require('./src/components/sharedTransition').default;
@@ -26,13 +26,8 @@ function setStatusBarHeight() {
26
26
  } = NativeModules;
27
27
  statusBarHeight = (StatusBar.currentHeight ?? StatusBarManager?.HEIGHT) || 0;
28
28
  if (isIOS && StatusBarManager) {
29
- try {
30
- // override guesstimate height with the actual height from StatusBarManager
31
- StatusBarManager.getHeight(data => statusBarHeight = data.height);
32
- } catch (error) {
33
- console.warn('Constants: StatusBarManager.getHeight not available in new architecture, using fallback');
34
- // Keep the fallback height we already set above
35
- }
29
+ // override guesstimate height with the actual height from StatusBarManager
30
+ StatusBarManager.getHeight(data => statusBarHeight = data.height);
36
31
  }
37
32
  }
38
33
  function getAspectRatio() {
@@ -107,7 +107,7 @@ export default class KeyboardAwareBase extends Component {
107
107
  setTimeout(() => {
108
108
  this._keyboardAwareView
109
109
  .getScrollResponder()
110
- .scrollResponderScrollNativeHandleToKeyboard(this.findNodeHandle(textInputRef),
110
+ .scrollResponderScrollNativeHandleToKeyboard(ReactNative.findNodeHandle(textInputRef),
111
111
  this.props.scrollToInputAdditionalOffset,
112
112
  true);
113
113
  }, 0);
@@ -117,10 +117,6 @@ export default class KeyboardAwareBase extends Component {
117
117
  }
118
118
  }
119
119
 
120
- findNodeHandle(ref) {
121
- return ref.current?.getNodeHandle?.() || ref?.getNodeHandle?.() || ReactNative.findNodeHandle(ref.current || ref);
122
- }
123
-
124
120
  _onKeyboardWillShow(event) {
125
121
  this._scrollToFocusedTextInput();
126
122
 
@@ -1,9 +1,14 @@
1
1
  import React from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
+ import { DialogProps } from '../dialog';
3
4
  import { ButtonProps } from '../button';
4
- import { type DialogProps } from '../dialog';
5
+ import { DialogProps as IncubatorDialogProps } from '../../incubator';
5
6
  type ActionSheetOnOptionPress = (index: number) => void;
6
7
  type ActionSheetProps = {
8
+ /**
9
+ * Migrate to the Incubator.Dialog component
10
+ */
11
+ migrateDialog?: boolean;
7
12
  /**
8
13
  * Whether to show the action sheet or not
9
14
  */
@@ -63,6 +68,11 @@ type ActionSheetProps = {
63
68
  * Note: you will need to call onOptionPress so the option's onPress will be called
64
69
  */
65
70
  renderAction?: (option: ButtonProps, index: number, onOptionPress: ActionSheetOnOptionPress) => JSX.Element;
71
+ /**
72
+ * @deprecated
73
+ * Called once the modal has been dismissed completely
74
+ */
75
+ onModalDismissed?: DialogProps['onDialogDismissed'];
66
76
  /**
67
77
  * Whether or not to handle SafeArea
68
78
  */
@@ -70,7 +80,7 @@ type ActionSheetProps = {
70
80
  /**
71
81
  * Additional props to send to the Dialog
72
82
  */
73
- dialogProps?: Omit<DialogProps, 'useSafeArea' | 'testID' | 'containerStyle' | 'visible' | 'onDismiss' | 'onDialogDismissed'> | DialogProps;
83
+ dialogProps?: Omit<DialogProps, 'useSafeArea' | 'testID' | 'containerStyle' | 'visible' | 'onDismiss' | 'onDialogDismissed'> | IncubatorDialogProps;
74
84
  /**
75
85
  * testID for e2e tests
76
86
  */
@@ -6,12 +6,15 @@ import React, { Component } from 'react';
6
6
  import { ActionSheetIOS, StyleSheet } from 'react-native';
7
7
  import { Colors } from "../../style";
8
8
  import { asBaseComponent, Constants } from "../../commons/new";
9
+ import Dialog from "../dialog";
9
10
  import View from "../view";
10
11
  import Text from "../text";
11
12
  import Image from "../image";
12
13
  //@ts-ignore
13
14
  import ListItem from "../listItem";
14
- import Dialog from "../dialog";
15
+ import PanningProvider from "../panningViews/panningProvider";
16
+ import { Dialog as IncubatorDialog } from "../../incubator";
17
+ import { LogService } from "../../services";
15
18
  const VERTICAL_PADDING = 8;
16
19
  /**
17
20
  * @description: Cross platform Action Sheet, with a support for native iOS solution
@@ -127,19 +130,55 @@ class ActionSheet extends Component {
127
130
  {this.renderActions()}
128
131
  </View>;
129
132
  }
130
- render() {
133
+ renderOldDialog() {
131
134
  const {
135
+ useNativeIOS,
132
136
  visible,
133
137
  onDismiss,
134
138
  dialogStyle,
139
+ onModalDismissed,
135
140
  testID,
136
141
  useSafeArea,
137
142
  dialogProps
138
143
  } = this.props;
139
- return <Dialog bottom centerH width="100%" direction={Dialog.directions.DOWN} {...dialogProps} useSafeArea={useSafeArea} testID={testID} containerStyle={[styles.incubatorDialog, dialogStyle]} visible={visible} onDismiss={onDismiss}>
144
+ if (Constants.isIOS && useNativeIOS) {
145
+ return null;
146
+ }
147
+ return <Dialog bottom centerH width="100%" panDirection={PanningProvider.Directions.DOWN} {...dialogProps} useSafeArea={useSafeArea} testID={testID} containerStyle={[styles.dialog, dialogStyle]} visible={visible} onDismiss={onDismiss} onDialogDismissed={onModalDismissed}>
140
148
  {this.renderSheet()}
141
149
  </Dialog>;
142
150
  }
151
+ renderNewDialog() {
152
+ const {
153
+ visible,
154
+ onDismiss,
155
+ dialogStyle,
156
+ onModalDismissed,
157
+ testID,
158
+ useSafeArea,
159
+ dialogProps
160
+ } = this.props;
161
+ if (onModalDismissed) {
162
+ LogService.deprecationWarn({
163
+ component: 'ActionSheet',
164
+ oldProp: 'onModalDismissed',
165
+ newProp: 'onDismiss'
166
+ });
167
+ }
168
+ return <IncubatorDialog bottom centerH width="100%" direction={PanningProvider.Directions.DOWN} {...dialogProps} useSafeArea={useSafeArea} testID={testID} containerStyle={[styles.incubatorDialog, dialogStyle]} visible={visible} onDismiss={onDismiss}>
169
+ {this.renderSheet()}
170
+ </IncubatorDialog>;
171
+ }
172
+ render() {
173
+ const {
174
+ migrateDialog
175
+ } = this.props;
176
+ if (migrateDialog) {
177
+ return this.renderNewDialog();
178
+ } else {
179
+ return this.renderOldDialog();
180
+ }
181
+ }
143
182
  }
144
183
  export default asBaseComponent(ActionSheet);
145
184
  const styles = StyleSheet.create({