react-native-navigation 7.22.2 → 7.22.3-snapshot.1669

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.
@@ -13,7 +13,10 @@ import android.widget.ImageButton
13
13
  import android.widget.TextView
14
14
  import androidx.appcompat.widget.ActionMenuView
15
15
  import androidx.appcompat.widget.Toolbar
16
+ import androidx.core.view.AccessibilityDelegateCompat
16
17
  import androidx.core.view.MenuItemCompat
18
+ import androidx.core.view.ViewCompat
19
+ import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
17
20
  import androidx.core.view.doOnPreDraw
18
21
  import com.reactnativenavigation.options.ButtonOptions
19
22
  import com.reactnativenavigation.options.params.ThemeColour
@@ -182,6 +185,26 @@ open class ButtonPresenter(private val context: Context, private val button: But
182
185
  toolbar.post {
183
186
  ViewUtils.findChildByClass(toolbar, ImageButton::class.java)?.let {
184
187
  it.tag = button.testId.get()
188
+
189
+ class WixAccessibilityDelegateCompat: AccessibilityDelegateCompat(){
190
+ override fun onInitializeAccessibilityNodeInfo(
191
+ host: View?,
192
+ info: AccessibilityNodeInfoCompat?
193
+ ) {
194
+ super.onInitializeAccessibilityNodeInfo(host, info)
195
+
196
+ // Expose the testID prop as the resource-id name of the view. Black-box E2E/UI testing
197
+ // frameworks, which interact with the UI through the accessibility framework, do not have
198
+ // access to view tags. This allows developers/testers to avoid polluting the
199
+ // content-description with test identifiers.
200
+ val testId = host?.tag as String?
201
+ if(testId != null){
202
+ info!!.viewIdResourceName = testId
203
+ }
204
+ }
205
+ }
206
+
207
+ ViewCompat.setAccessibilityDelegate(it, WixAccessibilityDelegateCompat())
185
208
  }
186
209
  }
187
210
  }
@@ -12,7 +12,7 @@ class Store {
12
12
  this.mergeNewPropsForId(componentId, props);
13
13
  const component = this.componentsInstancesById[componentId];
14
14
  if (component) {
15
- this.componentsInstancesById[componentId].setProps(props, callback);
15
+ component.setProps(props, callback);
16
16
  }
17
17
  }
18
18
  getPropsForId(componentId) {
@@ -12,8 +12,9 @@ export class Store {
12
12
  updateProps(componentId: string, props: any, callback?: () => void) {
13
13
  this.mergeNewPropsForId(componentId, props);
14
14
  const component = this.componentsInstancesById[componentId];
15
+
15
16
  if (component) {
16
- this.componentsInstancesById[componentId].setProps(props, callback);
17
+ component.setProps(props, callback);
17
18
  }
18
19
  }
19
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation",
3
- "version": "7.22.2",
3
+ "version": "7.22.3-snapshot.1669",
4
4
  "description": "React Native Navigation - truly native navigation for iOS and Android",
5
5
  "license": "MIT",
6
6
  "nativePackage": true,
@@ -46,7 +46,6 @@
46
46
  "test-all": "node ./scripts/test-all",
47
47
  "prerelease": "npm run build",
48
48
  "release": "node ./scripts/release",
49
- "docusaurus": "npm start --prefix website",
50
49
  "lint": "eslint --ext .js,.jsx,.ts,.tsx ./"
51
50
  },
52
51
  "peerDependencies": {