react-native-a11y-order 0.2.2 → 0.2.5

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 (174) hide show
  1. package/README.md +50 -70
  2. package/android/src/main/java/com/a11yorder/A11yOrderPackage.java +21 -45
  3. package/ios/A11yOrder.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  4. package/ios/A11yOrder.xcodeproj/project.xcworkspace/xcuserdata/Artur_Kalach.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  5. package/ios/A11yOrder.xcodeproj/xcuserdata/Artur_Kalach.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  6. package/lib/commonjs/components/A11yGroup/A11yGroup.android.js +4 -6
  7. package/lib/commonjs/components/A11yGroup/A11yGroup.android.js.map +1 -1
  8. package/lib/commonjs/components/A11yGroup/A11yGroup.ios.js +1 -1
  9. package/lib/commonjs/components/A11yGroup/A11yGroup.ios.js.map +1 -1
  10. package/lib/commonjs/components/A11yGroup/A11yGroup.js +1 -2
  11. package/lib/commonjs/components/A11yGroup/A11yGroup.js.map +1 -1
  12. package/lib/commonjs/components/A11yIndex/A11yIndex.js +9 -12
  13. package/lib/commonjs/components/A11yIndex/A11yIndex.js.map +1 -1
  14. package/lib/commonjs/components/A11yIndex/A11yIndex.web.js +5 -7
  15. package/lib/commonjs/components/A11yIndex/A11yIndex.web.js.map +1 -1
  16. package/lib/commonjs/components/A11ySequence/A11ySequence.js +3 -4
  17. package/lib/commonjs/components/A11ySequence/A11ySequence.js.map +1 -1
  18. package/lib/commonjs/context/A11ySequenceOrderContext.js +2 -3
  19. package/lib/commonjs/context/A11ySequenceOrderContext.js.map +1 -1
  20. package/lib/commonjs/index.js +1 -28
  21. package/lib/commonjs/index.js.map +1 -1
  22. package/lib/commonjs/index.web.js +2 -46
  23. package/lib/commonjs/index.web.js.map +1 -1
  24. package/lib/commonjs/nativeSpecs/A11yGroupNativeComponent.js +2 -3
  25. package/lib/commonjs/nativeSpecs/A11yGroupNativeComponent.js.map +1 -1
  26. package/lib/commonjs/nativeSpecs/A11yIndexNativeComponent.js +3 -5
  27. package/lib/commonjs/nativeSpecs/A11yIndexNativeComponent.js.map +1 -1
  28. package/lib/commonjs/nativeSpecs/A11yOrderNativeComponent.js +2 -3
  29. package/lib/commonjs/nativeSpecs/A11yOrderNativeComponent.js.map +1 -1
  30. package/lib/commonjs/types/A11yGroup.types.js.map +1 -1
  31. package/lib/commonjs/types/A11yIndex.types.js.map +1 -1
  32. package/lib/commonjs/types/A11yModule.types.js.map +1 -1
  33. package/lib/module/components/A11yGroup/A11yGroup.android.js +3 -4
  34. package/lib/module/components/A11yGroup/A11yGroup.android.js.map +1 -1
  35. package/lib/module/components/A11yGroup/A11yGroup.ios.js.map +1 -1
  36. package/lib/module/components/A11yGroup/A11yGroup.js.map +1 -1
  37. package/lib/module/components/A11yIndex/A11yIndex.js +8 -9
  38. package/lib/module/components/A11yIndex/A11yIndex.js.map +1 -1
  39. package/lib/module/components/A11yIndex/A11yIndex.web.js +3 -3
  40. package/lib/module/components/A11yIndex/A11yIndex.web.js.map +1 -1
  41. package/lib/module/components/A11ySequence/A11ySequence.js +1 -1
  42. package/lib/module/components/A11ySequence/A11ySequence.js.map +1 -1
  43. package/lib/module/context/A11ySequenceOrderContext.js.map +1 -1
  44. package/lib/module/index.js +0 -2
  45. package/lib/module/index.js.map +1 -1
  46. package/lib/module/index.web.js +0 -40
  47. package/lib/module/index.web.js.map +1 -1
  48. package/lib/module/nativeSpecs/A11yGroupNativeComponent.js.map +1 -1
  49. package/lib/module/nativeSpecs/A11yIndexNativeComponent.js.map +1 -1
  50. package/lib/module/nativeSpecs/A11yOrderNativeComponent.js.map +1 -1
  51. package/lib/module/types/A11yGroup.types.js.map +1 -1
  52. package/lib/module/types/A11yIndex.types.js.map +1 -1
  53. package/lib/module/types/A11yModule.types.js.map +1 -1
  54. package/lib/typescript/components/A11yGroup/A11yGroup.android.d.ts.map +1 -1
  55. package/lib/typescript/index.d.ts +0 -3
  56. package/lib/typescript/index.d.ts.map +1 -1
  57. package/lib/typescript/index.web.d.ts +1 -39
  58. package/lib/typescript/index.web.d.ts.map +1 -1
  59. package/package.json +12 -4
  60. package/src/components/A11yGroup/A11yGroup.android.tsx +2 -3
  61. package/src/components/A11yIndex/A11yIndex.tsx +2 -2
  62. package/src/components/A11yIndex/A11yIndex.web.tsx +2 -2
  63. package/src/index.ts +0 -8
  64. package/src/index.web.ts +0 -43
  65. package/android/src/main/java/com/a11yorder/A11yOrderModule.java +0 -84
  66. package/android/src/newarch/A11yOrderSpec.java +0 -9
  67. package/android/src/oldarch/A11yOrderSpec.java +0 -15
  68. package/ios/A11yOrder.h +0 -6
  69. package/ios/A11yOrder.mm +0 -72
  70. package/lib/commonjs/A11yModule/helper.js +0 -21
  71. package/lib/commonjs/A11yModule/helper.js.map +0 -1
  72. package/lib/commonjs/A11yModule/index.js +0 -20
  73. package/lib/commonjs/A11yModule/index.js.map +0 -1
  74. package/lib/commonjs/A11yModule/module.js +0 -24
  75. package/lib/commonjs/A11yModule/module.js.map +0 -1
  76. package/lib/commonjs/components/A11yOrder/A11yOrder.js +0 -40
  77. package/lib/commonjs/components/A11yOrder/A11yOrder.js.map +0 -1
  78. package/lib/commonjs/hooks/index.js +0 -27
  79. package/lib/commonjs/hooks/index.js.map +0 -1
  80. package/lib/commonjs/hooks/useA11yOrderManager/index.js +0 -13
  81. package/lib/commonjs/hooks/useA11yOrderManager/index.js.map +0 -1
  82. package/lib/commonjs/hooks/useA11yOrderManager/useA11yOrderManager.js +0 -74
  83. package/lib/commonjs/hooks/useA11yOrderManager/useA11yOrderManager.js.map +0 -1
  84. package/lib/commonjs/hooks/useDynamicFocusOrder/index.js +0 -20
  85. package/lib/commonjs/hooks/useDynamicFocusOrder/index.js.map +0 -1
  86. package/lib/commonjs/hooks/useDynamicFocusOrder/useDynamicFocusOrder.js +0 -36
  87. package/lib/commonjs/hooks/useDynamicFocusOrder/useDynamicFocusOrder.js.map +0 -1
  88. package/lib/commonjs/hooks/useDynamicFocusOrder/useDynamicFocusOrder.types.js +0 -6
  89. package/lib/commonjs/hooks/useDynamicFocusOrder/useDynamicFocusOrder.types.js.map +0 -1
  90. package/lib/commonjs/hooks/useFocusOrder/index.js +0 -13
  91. package/lib/commonjs/hooks/useFocusOrder/index.js.map +0 -1
  92. package/lib/commonjs/hooks/useFocusOrder/useFocusOrder.js +0 -32
  93. package/lib/commonjs/hooks/useFocusOrder/useFocusOrder.js.map +0 -1
  94. package/lib/commonjs/hooks/useFocusOrder/useFocusOrder.types.js +0 -6
  95. package/lib/commonjs/hooks/useFocusOrder/useFocusOrder.types.js.map +0 -1
  96. package/lib/commonjs/nativeSpecs/NativeA11yOrder.js +0 -10
  97. package/lib/commonjs/nativeSpecs/NativeA11yOrder.js.map +0 -1
  98. package/lib/commonjs/types/A11yOrder.types.js +0 -6
  99. package/lib/commonjs/types/A11yOrder.types.js.map +0 -1
  100. package/lib/module/A11yModule/helper.js +0 -14
  101. package/lib/module/A11yModule/helper.js.map +0 -1
  102. package/lib/module/A11yModule/index.js +0 -3
  103. package/lib/module/A11yModule/index.js.map +0 -1
  104. package/lib/module/A11yModule/module.js +0 -18
  105. package/lib/module/A11yModule/module.js.map +0 -1
  106. package/lib/module/components/A11yOrder/A11yOrder.js +0 -31
  107. package/lib/module/components/A11yOrder/A11yOrder.js.map +0 -1
  108. package/lib/module/hooks/index.js +0 -4
  109. package/lib/module/hooks/index.js.map +0 -1
  110. package/lib/module/hooks/useA11yOrderManager/index.js +0 -2
  111. package/lib/module/hooks/useA11yOrderManager/index.js.map +0 -1
  112. package/lib/module/hooks/useA11yOrderManager/useA11yOrderManager.js +0 -66
  113. package/lib/module/hooks/useA11yOrderManager/useA11yOrderManager.js.map +0 -1
  114. package/lib/module/hooks/useDynamicFocusOrder/index.js +0 -3
  115. package/lib/module/hooks/useDynamicFocusOrder/index.js.map +0 -1
  116. package/lib/module/hooks/useDynamicFocusOrder/useDynamicFocusOrder.js +0 -29
  117. package/lib/module/hooks/useDynamicFocusOrder/useDynamicFocusOrder.js.map +0 -1
  118. package/lib/module/hooks/useDynamicFocusOrder/useDynamicFocusOrder.types.js +0 -2
  119. package/lib/module/hooks/useDynamicFocusOrder/useDynamicFocusOrder.types.js.map +0 -1
  120. package/lib/module/hooks/useFocusOrder/index.js +0 -2
  121. package/lib/module/hooks/useFocusOrder/index.js.map +0 -1
  122. package/lib/module/hooks/useFocusOrder/useFocusOrder.js +0 -25
  123. package/lib/module/hooks/useFocusOrder/useFocusOrder.js.map +0 -1
  124. package/lib/module/hooks/useFocusOrder/useFocusOrder.types.js +0 -2
  125. package/lib/module/hooks/useFocusOrder/useFocusOrder.types.js.map +0 -1
  126. package/lib/module/nativeSpecs/NativeA11yOrder.js +0 -3
  127. package/lib/module/nativeSpecs/NativeA11yOrder.js.map +0 -1
  128. package/lib/module/types/A11yOrder.types.js +0 -2
  129. package/lib/module/types/A11yOrder.types.js.map +0 -1
  130. package/lib/typescript/A11yModule/helper.d.ts +0 -4
  131. package/lib/typescript/A11yModule/helper.d.ts.map +0 -1
  132. package/lib/typescript/A11yModule/index.d.ts +0 -3
  133. package/lib/typescript/A11yModule/index.d.ts.map +0 -1
  134. package/lib/typescript/A11yModule/module.d.ts +0 -2
  135. package/lib/typescript/A11yModule/module.d.ts.map +0 -1
  136. package/lib/typescript/components/A11yOrder/A11yOrder.d.ts +0 -8
  137. package/lib/typescript/components/A11yOrder/A11yOrder.d.ts.map +0 -1
  138. package/lib/typescript/hooks/index.d.ts +0 -4
  139. package/lib/typescript/hooks/index.d.ts.map +0 -1
  140. package/lib/typescript/hooks/useA11yOrderManager/index.d.ts +0 -2
  141. package/lib/typescript/hooks/useA11yOrderManager/index.d.ts.map +0 -1
  142. package/lib/typescript/hooks/useA11yOrderManager/useA11yOrderManager.d.ts +0 -15
  143. package/lib/typescript/hooks/useA11yOrderManager/useA11yOrderManager.d.ts.map +0 -1
  144. package/lib/typescript/hooks/useDynamicFocusOrder/index.d.ts +0 -3
  145. package/lib/typescript/hooks/useDynamicFocusOrder/index.d.ts.map +0 -1
  146. package/lib/typescript/hooks/useDynamicFocusOrder/useDynamicFocusOrder.d.ts +0 -9
  147. package/lib/typescript/hooks/useDynamicFocusOrder/useDynamicFocusOrder.d.ts.map +0 -1
  148. package/lib/typescript/hooks/useDynamicFocusOrder/useDynamicFocusOrder.types.d.ts +0 -12
  149. package/lib/typescript/hooks/useDynamicFocusOrder/useDynamicFocusOrder.types.d.ts.map +0 -1
  150. package/lib/typescript/hooks/useFocusOrder/index.d.ts +0 -2
  151. package/lib/typescript/hooks/useFocusOrder/index.d.ts.map +0 -1
  152. package/lib/typescript/hooks/useFocusOrder/useFocusOrder.d.ts +0 -9
  153. package/lib/typescript/hooks/useFocusOrder/useFocusOrder.d.ts.map +0 -1
  154. package/lib/typescript/hooks/useFocusOrder/useFocusOrder.types.d.ts +0 -6
  155. package/lib/typescript/hooks/useFocusOrder/useFocusOrder.types.d.ts.map +0 -1
  156. package/lib/typescript/nativeSpecs/NativeA11yOrder.d.ts +0 -7
  157. package/lib/typescript/nativeSpecs/NativeA11yOrder.d.ts.map +0 -1
  158. package/lib/typescript/types/A11yOrder.types.d.ts +0 -10
  159. package/lib/typescript/types/A11yOrder.types.d.ts.map +0 -1
  160. package/src/A11yModule/helper.ts +0 -20
  161. package/src/A11yModule/index.tsx +0 -2
  162. package/src/A11yModule/module.ts +0 -32
  163. package/src/components/A11yOrder/A11yOrder.tsx +0 -38
  164. package/src/hooks/index.ts +0 -3
  165. package/src/hooks/useA11yOrderManager/index.ts +0 -1
  166. package/src/hooks/useA11yOrderManager/useA11yOrderManager.ts +0 -88
  167. package/src/hooks/useDynamicFocusOrder/index.ts +0 -2
  168. package/src/hooks/useDynamicFocusOrder/useDynamicFocusOrder.ts +0 -41
  169. package/src/hooks/useDynamicFocusOrder/useDynamicFocusOrder.types.ts +0 -12
  170. package/src/hooks/useFocusOrder/index.ts +0 -1
  171. package/src/hooks/useFocusOrder/useFocusOrder.ts +0 -36
  172. package/src/hooks/useFocusOrder/useFocusOrder.types.ts +0 -9
  173. package/src/nativeSpecs/NativeA11yOrder.ts +0 -7
  174. package/src/types/A11yOrder.types.ts +0 -9
@@ -1,84 +0,0 @@
1
- package com.a11yorder;
2
-
3
- import static com.facebook.react.uimanager.common.UIManagerType.FABRIC;
4
-
5
- import android.app.Activity;
6
- import android.os.Build;
7
- import android.util.Log;
8
- import android.view.View;
9
-
10
- import androidx.annotation.NonNull;
11
-
12
- import com.facebook.react.bridge.ReactApplicationContext;
13
- import com.facebook.react.bridge.ReactMethod;
14
- import com.facebook.react.bridge.ReadableArray;
15
- import com.facebook.react.bridge.UIManager;
16
- import com.facebook.react.uimanager.IllegalViewOperationException;
17
- import com.facebook.react.uimanager.UIManagerHelper;
18
- import com.facebook.react.uimanager.UIManagerModule;
19
- import com.facebook.react.uimanager.common.ViewUtil;
20
-
21
- import java.util.ArrayList;
22
-
23
- public class A11yOrderModule extends com.a11yorder.A11yOrderSpec {
24
- public static final String NAME = "A11yOrder";
25
- private ReactApplicationContext context;
26
-
27
- A11yOrderModule(ReactApplicationContext context) {
28
- super(context);
29
- this.context = context;
30
- }
31
-
32
-
33
- @Override
34
- @NonNull
35
- public String getName() {
36
- return NAME;
37
- }
38
-
39
-
40
- @ReactMethod
41
- public void setA11yOrder(@NonNull ReadableArray reactTags, Double nativeTag) {
42
- final int length = reactTags.size();
43
- if (length < 2) return;
44
-
45
-
46
- final Activity activity = context.getCurrentActivity();
47
-
48
- if (activity == null) {
49
- return;
50
- }
51
-
52
- activity.runOnUiThread(() -> {
53
- UIManager manager = null;
54
- try {
55
- int uiManagerType = ViewUtil.getUIManagerType(reactTags.getInt(0));
56
- if (uiManagerType == FABRIC) {
57
- manager = UIManagerHelper.getUIManager(context, uiManagerType);
58
- } else {
59
- manager = context.getNativeModule(UIManagerModule.class);
60
- }
61
- final ArrayList<View> views = new ArrayList<>();
62
- for (int i = 0; i < length; i++) {
63
- try {
64
- views.add(manager.resolveView(reactTags.getInt(i)));
65
- } catch (IllegalViewOperationException error) {
66
- Log.e("ERROR", error.getMessage());
67
- }
68
- }
69
- for (int i = 0; i < views.size() - 1; i++) {
70
- final View currentView = views.get(i);
71
- final View nextView = views.get(i + 1);
72
- currentView.setNextFocusForwardId(nextView.getId());
73
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) {
74
- currentView.setAccessibilityTraversalBefore(nextView.getId());
75
- }
76
- }
77
- } catch (IllegalViewOperationException error) {
78
- Log.e("ORDER_FOCUS_ERROR", error.getMessage());
79
- }
80
- });
81
-
82
- }
83
-
84
- }
@@ -1,9 +0,0 @@
1
- package com.a11yorder;
2
-
3
- import com.facebook.react.bridge.ReactApplicationContext;
4
-
5
- abstract class A11yOrderSpec extends NativeA11yOrderSpec {
6
- A11yOrderSpec(ReactApplicationContext context) {
7
- super(context);
8
- }
9
- }
@@ -1,15 +0,0 @@
1
- package com.a11yorder;
2
-
3
- import androidx.annotation.NonNull;
4
-
5
- import com.facebook.react.bridge.ReactApplicationContext;
6
- import com.facebook.react.bridge.ReactContextBaseJavaModule;
7
- import com.facebook.react.bridge.ReadableArray;
8
-
9
- public abstract class A11yOrderSpec extends ReactContextBaseJavaModule {
10
- A11yOrderSpec(ReactApplicationContext context) {
11
- super(context);
12
- }
13
-
14
- public abstract void setA11yOrder(@NonNull ReadableArray reactTags, Double _tag);
15
- }
package/ios/A11yOrder.h DELETED
@@ -1,6 +0,0 @@
1
- #import <React/RCTBridgeModule.h>
2
- #import <React/RCTEventEmitter.h>
3
-
4
- @interface A11yOrder : RCTEventEmitter <RCTBridgeModule>
5
-
6
- @end
package/ios/A11yOrder.mm DELETED
@@ -1,72 +0,0 @@
1
- #import "A11yOrder.h"
2
- #import <React/RCTLog.h>
3
- #import <UIKit/UIKit.h>
4
- #import <React/RCTUIManager.h>
5
-
6
-
7
- #ifdef RCT_NEW_ARCH_ENABLED
8
- #import "RNA11yOrderSpec/RNA11yOrderSpec.h"
9
- using namespace facebook::react;
10
-
11
- #endif
12
-
13
- @implementation A11yOrder
14
- {
15
- bool hasListeners;
16
- }
17
-
18
- RCT_EXPORT_MODULE()
19
-
20
- -(void)startObserving {
21
- hasListeners = YES;
22
- }
23
-
24
- -(void)stopObserving {
25
- hasListeners = NO;
26
- }
27
-
28
- - (NSArray<NSString *> *)supportedEvents
29
- {
30
- return @[];
31
- }
32
-
33
-
34
- RCT_EXPORT_METHOD(
35
- setA11yOrder: (nonnull NSArray *)elements
36
- node:(nonnull NSNumber *)node
37
- ) {
38
- dispatch_async(dispatch_get_main_queue(), ^{
39
- UIView *field = [self.bridge.uiManager viewForReactTag:node];
40
- if(field != nil) {
41
- UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, field); // ToDo, make this optional
42
- }
43
- NSMutableArray *fields = [NSMutableArray arrayWithCapacity:[elements count]];
44
-
45
- [elements enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL * stop) {
46
- NSNumber *tag = (NSNumber *)obj;
47
- UIView *field = [self.bridge.uiManager viewForReactTag:tag];
48
- if (field != nil) {
49
- [fields addObject:field];
50
- }
51
- }];
52
- [field setAccessibilityElements: fields];
53
- });
54
- }
55
-
56
-
57
- + (BOOL)requiresMainQueueSetup
58
- {
59
- return YES;
60
- }
61
-
62
-
63
- // Don't compile this code when we build for the old architecture.
64
- #ifdef RCT_NEW_ARCH_ENABLED
65
- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
66
- (const facebook::react::ObjCTurboModule::InitParams &)params
67
- {
68
- return std::make_shared<facebook::react::NativeA11yOrderSpecJSI>(params);
69
- }
70
- #endif
71
-
72
- @end
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.setA11yElementsOrder = void 0;
7
- var _reactNative = require("react-native");
8
- var _module = require("./module");
9
- const setA11yElementsOrder = _ref => {
10
- let {
11
- tag,
12
- views
13
- } = _ref;
14
- if (!tag) return;
15
- const targetView = (0, _reactNative.findNodeHandle)(tag.current);
16
- if (!targetView) return;
17
- const tags = views.map(view => (0, _reactNative.findNodeHandle)(view)).filter(view => Boolean(view));
18
- _module.setA11yOrder === null || _module.setA11yOrder === void 0 ? void 0 : (0, _module.setA11yOrder)(tags, targetView);
19
- };
20
- exports.setA11yElementsOrder = setA11yElementsOrder;
21
- //# sourceMappingURL=helper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_module","setA11yElementsOrder","_ref","tag","views","targetView","findNodeHandle","current","tags","map","view","filter","Boolean","setA11yOrder","exports"],"sourceRoot":"../../../src","sources":["A11yModule/helper.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAGO,MAAME,oBAAoB,GAAGC,IAAA,IAGZ;EAAA,IAHwC;IAC9DC,GAAG;IACHC;EACgB,CAAC,GAAAF,IAAA;EACjB,IAAI,CAACC,GAAG,EAAE;EAEV,MAAME,UAAU,GAAG,IAAAC,2BAAc,EAACH,GAAG,CAACI,OAA0B,CAAC;EACjE,IAAI,CAACF,UAAU,EAAE;EAEjB,MAAMG,IAAI,GAAGJ,KAAK,CACfK,GAAG,CAAEC,IAAI,IAAK,IAAAJ,2BAAc,EAACI,IAAuB,CAAC,CAAC,CACtDC,MAAM,CAAED,IAAI,IAAKE,OAAO,CAACF,IAAI,CAAC,CAAa;EAE9CG,oBAAY,aAAZA,oBAAY,uBAAZ,IAAAA,oBAAY,EAAGL,IAAI,EAAEH,UAAU,CAAC;AAClC,CAAC;AAACS,OAAA,CAAAb,oBAAA,GAAAA,oBAAA"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "setA11yElementsOrder", {
7
- enumerable: true,
8
- get: function () {
9
- return _helper.setA11yElementsOrder;
10
- }
11
- });
12
- Object.defineProperty(exports, "setA11yOrder", {
13
- enumerable: true,
14
- get: function () {
15
- return _module.setA11yOrder;
16
- }
17
- });
18
- var _helper = require("./helper");
19
- var _module = require("./module");
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_helper","require","_module"],"sourceRoot":"../../../src","sources":["A11yModule/index.tsx"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.setA11yOrder = setA11yOrder;
7
- var _reactNative = require("react-native");
8
- const LINKING_ERROR = `The package 'react-native-a11y-order' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
9
- ios: "- You have run 'pod install'\n",
10
- default: ''
11
- }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
12
-
13
- // @ts-expect-error
14
- const isTurboModuleEnabled = global.__turboModuleProxy != null;
15
- const A11yOrderModule = isTurboModuleEnabled ? require('../nativeSpecs/NativeA11yOrder').default : _reactNative.NativeModules.A11yOrder;
16
- const A11yOrder = A11yOrderModule ? A11yOrderModule : new Proxy({}, {
17
- get() {
18
- throw new Error(LINKING_ERROR);
19
- }
20
- });
21
- function setA11yOrder(tags, targetView) {
22
- return A11yOrder.setA11yOrder(tags, targetView);
23
- }
24
- //# sourceMappingURL=module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","isTurboModuleEnabled","global","__turboModuleProxy","A11yOrderModule","NativeModules","A11yOrder","Proxy","get","Error","setA11yOrder","tags","targetView"],"sourceRoot":"../../../src","sources":["A11yModule/module.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,MAAMC,aAAa,GAChB,kFAAiF,GAClFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;;AAEjC;AACA,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,kBAAkB,IAAI,IAAI;AAE9D,MAAMC,eAAe,GAAGH,oBAAoB,GACxCN,OAAO,CAAC,gCAAgC,CAAC,CAACK,OAAO,GACjDK,0BAAa,CAACC,SAAS;AAE3B,MAAMA,SAAS,GAAGF,eAAe,GAC7BA,eAAe,GACf,IAAIG,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACb,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEE,SAASc,YAAYA,CAC1BC,IAAc,EACdC,UAAmB,EACF;EACjB,OAAON,SAAS,CAACI,YAAY,CAACC,IAAI,EAAEC,UAAU,CAAC;AACjD"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.A11yOrder = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
12
- /**
13
- * @deprecated The method should not be used
14
- * This API is going to be removed in future releases, you can find migration instruction here: https://github.com/ArturKalach/react-native-a11y-order?tab=readme-ov-file#migration
15
- */
16
- const A11yOrder = _ref => {
17
- let {
18
- a11yOrder,
19
- onLayout,
20
- ignoreWarn,
21
- ...props
22
- } = _ref;
23
- if (!ignoreWarn) {
24
- console.warn('A11yOrder: This API is going to be removed in future releases, you can find migration instruction here: https://github.com/ArturKalach/react-native-a11y-order?tab=readme-ov-file#migration');
25
- }
26
- const onLayoutHandler = (0, _react.useCallback)(e => {
27
- onLayout === null || onLayout === void 0 ? void 0 : onLayout(e);
28
- a11yOrder.onLayout();
29
- }, [a11yOrder, onLayout]);
30
- const id = (_react.useId === null || _react.useId === void 0 ? void 0 : (0, _react.useId)()) || 'mock_id'; // ToDo: use native component with tag to nativeTag
31
-
32
- return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
33
- nativeID: id
34
- }, props, {
35
- onLayout: onLayoutHandler,
36
- ref: a11yOrder.ref
37
- }));
38
- };
39
- exports.A11yOrder = A11yOrder;
40
- //# sourceMappingURL=A11yOrder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","A11yOrder","_ref","a11yOrder","onLayout","ignoreWarn","props","console","warn","onLayoutHandler","useCall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N,CAAC;AAACC,OAAA,CAAAjB,SAAA,GAAAA,SAAA"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "useA11yOrderManager", {
7
- enumerable: true,
8
- get: function () {
9
- return _useA11yOrderManager.useA11yOrderManager;
10
- }
11
- });
12
- Object.defineProperty(exports, "useDynamicFocusOrder", {
13
- enumerable: true,
14
- get: function () {
15
- return _useDynamicFocusOrder.useDynamicFocusOrder;
16
- }
17
- });
18
- Object.defineProperty(exports, "useFocusOrder", {
19
- enumerable: true,
20
- get: function () {
21
- return _useFocusOrder.useFocusOrder;
22
- }
23
- });
24
- var _useA11yOrderManager = require("./useA11yOrderManager");
25
- var _useFocusOrder = require("./useFocusOrder");
26
- var _useDynamicFocusOrder = require("./useDynamicFocusOrder");
27
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_useA11yOrderManager","require","_useFocusOrder","_useDynamicFocusOrder"],"sourceRoot":"../../../src","sources":["hooks/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAF,OAAA"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "useA11yOrderManager", {
7
- enumerable: true,
8
- get: function () {
9
- return _useA11yOrderManager.useA11yOrderManager;
10
- }
11
- });
12
- var _useA11yOrderManager = require("./useA11yOrderManager");
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_useA11yOrderManager","require"],"sourceRoot":"../../../../src","sources":["hooks/useA11yOrderManager/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useA11yOrderManager = exports.debounce = void 0;
7
- var _react = require("react");
8
- var _reactNative = require("react-native");
9
- var _A11yModule = require("../../A11yModule");
10
- const debounce = function (callback) {
11
- let timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
12
- let timer;
13
- return function () {
14
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
15
- args[_key] = arguments[_key];
16
- }
17
- if (timer) {
18
- clearTimeout(timer);
19
- timer = null;
20
- }
21
- timer = setTimeout(() => callback(args), timeout);
22
- };
23
- };
24
- exports.debounce = debounce;
25
- const SECONDS_PER_FRAME = 16;
26
- const COUNT_OF_FRAMES = 1;
27
- const DEBOUNCE_DELAY = SECONDS_PER_FRAME * COUNT_OF_FRAMES;
28
-
29
- /**
30
- * @deprecated The method should not be used
31
- * This API is going to be removed in future releases, you can find migration instruction here: https://github.com/ArturKalach/react-native-a11y-order?tab=readme-ov-file#migration
32
- */
33
- const useA11yOrderManager = (orderRef, onlyFor, ignoreWarn) => {
34
- if (!ignoreWarn) {
35
- console.warn('useA11yOrderManager: This API is going to be removed in future releases, you can find migration instruction here: https://github.com/ArturKalach/react-native-a11y-order?tab=readme-ov-file#migration');
36
- }
37
- const currentRef = (0, _react.useRef)([]);
38
- const registeredRefs = (0, _react.useRef)([]);
39
- const refWasUpdated = (0, _react.useRef)(false);
40
- const setOrder = (0, _react.useCallback)(() => {
41
- if (!onlyFor || onlyFor === _reactNative.Platform.OS) {
42
- (0, _A11yModule.setA11yElementsOrder)({
43
- tag: orderRef,
44
- views: registeredRefs.current
45
- });
46
- }
47
- }, [onlyFor, orderRef]);
48
- const debounceOrder = (0, _react.useMemo)(() => debounce(setOrder, DEBOUNCE_DELAY), [setOrder]);
49
- const registerOrderRef = (0, _react.useCallback)(order => ref => {
50
- refWasUpdated.current = true;
51
- registeredRefs.current[order] = ref;
52
- }, []);
53
- const updateRefList = (0, _react.useCallback)(() => {
54
- if (!refWasUpdated.current) {
55
- return;
56
- }
57
- refWasUpdated.current = false;
58
- currentRef.current = registeredRefs.current.filter(v => v);
59
- debounceOrder();
60
- }, [debounceOrder]);
61
- const reset = (0, _react.useCallback)(() => {
62
- currentRef.current = [];
63
- registeredRefs.current = [];
64
- refWasUpdated.current = false;
65
- }, []);
66
- return {
67
- registerOrderRef,
68
- updateRefList,
69
- reset,
70
- setOrder
71
- };
72
- };
73
- exports.useA11yOrderManager = useA11yOrderManager;
74
- //# sourceMappingURL=useA11yOrderManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNative","_A11yModule","debounce","callback","timeout","arguments","length","undefined","timer","_len","args","Array","_key","clearTimeout","setTimeout","exports","SECONDS_PER_FRAME","COUNT_OF_FRAMES","DEBOUNCE_DELAY","useA11yOrderManager","orderRef","onlyFor","ignoreWarn","console","warn","currentRef","useRef","registeredRefs","refWasUpdated","setOrder","useCallback","Platform","OS","setA11yElementsOrder","tag","views","current","debounceOrder","useMemo","registerOrderRef","order","ref","updateRefList","filter","v","reset"],"sourceRoot":"../../../../src","sources":["hooks/useA11yOrderManager/useA11yOrderManager.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAEO,MAAMG,QAAQ,GAAG,SAAAA,CAAqBC,QAAW,EAAoB;EAAA,IAAlBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,GAAG;EACrE,IAAIG,KAA4B;EAEhC,OAAO,YAAkB;IAAA,SAAAC,IAAA,GAAAJ,SAAA,CAAAC,MAAA,EAAdI,IAAI,OAAAC,KAAA,CAAAF,IAAA,GAAAG,IAAA,MAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA;MAAJF,IAAI,CAAAE,IAAA,IAAAP,SAAA,CAAAO,IAAA;IAAA;IACb,IA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AO,CAACI,KAAK,CAAC,GAAGC,GAAG;EACrC,CAAC,EACH,EACF,CAAC;EAED,MAAMC,aAAa,GAAG,IAAAZ,kBAAW,EAAC,MAAM;IACtC,IAAI,CAACF,aAAa,CAACQ,OAAO,EAAE;MAC1B;IACF;IAEAR,aAAa,CAACQ,OAAO,GAAG,KAAK;IAC7BX,UAAU,CAACW,OAAO,GAAGT,cAAc,CAACS,OAAO,CAACO,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAAC;IAE5DP,aAAa,CAAC,CAAC;EACjB,CAAC,EAAE,CAACA,aAAa,CAAC,CAAC;EAEnB,MAAMQ,KAAK,GAAG,IAAAf,kBAAW,EAAC,MAAM;IAC9BL,UAAU,CAACW,OAAO,GAAG,EAAE;IACvBT,cAAc,CAACS,OAAO,GAAG,EAAE;IAC3BR,aAAa,CAACQ,OAAO,GAAG,KAAK;EAC/B,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACLG,gBAAgB;IAChBG,aAAa;IACbG,KAAK;IACLhB;EACF,CAAC;AACH,CAAC;AAACd,OAAA,CAAAI,mBAAA,GAAAA,mBAAA"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "UseDynamicFocusOrder", {
7
- enumerable: true,
8
- get: function () {
9
- return _useDynamicFocusOrder2.UseDynamicFocusOrder;
10
- }
11
- });
12
- Object.defineProperty(exports, "useDynamicFocusOrder", {
13
- enumerable: true,
14
- get: function () {
15
- return _useDynamicFocusOrder.useDynamicFocusOrder;
16
- }
17
- });
18
- var _useDynamicFocusOrder = require("./useDynamicFocusOrder");
19
- var _useDynamicFocusOrder2 = require("./useDynamicFocusOrder.types");
20
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_useDynamicFocusOrder","require","_useDynamicFocusOrder2"],"sourceRoot":"../../../../src","sources":["hooks/useDynamicFocusOrder/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useDynamicFocusOrder = void 0;
7
- var _react = require("react");
8
- var _useA11yOrderManager = require("../useA11yOrderManager");
9
- /**
10
- * @deprecated The method should not be used
11
- * This API is going to be removed in future releases, you can find migration instruction here: https://github.com/ArturKalach/react-native-a11y-order?tab=readme-ov-file#migration
12
- */
13
- const useDynamicFocusOrder = (onlyFor, ignoreWarn) => {
14
- if (!ignoreWarn) {
15
- console.warn('useDynamicFocusOrder: This API is going to be removed in future releases, you can find migration instruction here: https://github.com/ArturKalach/react-native-a11y-order?tab=readme-ov-file#migration');
16
- }
17
- const a11yOrderRef = (0, _react.useRef)(null);
18
- const {
19
- registerOrderRef: registerOrder,
20
- updateRefList,
21
- reset,
22
- setOrder
23
- } = (0, _useA11yOrderManager.useA11yOrderManager)(a11yOrderRef, onlyFor);
24
- (0, _react.useLayoutEffect)(updateRefList);
25
- return {
26
- a11yOrder: {
27
- ref: a11yOrderRef,
28
- onLayout: updateRefList
29
- },
30
- registerOrder,
31
- reset,
32
- setOrder
33
- };
34
- };
35
- exports.useDynamicFocusOrder = useDynamicFocusOrder;
36
- //# sourceMappingURL=useDynamicFocusOrder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_useA11yOrderManager","useDynamicFocusOrder","onlyFor","ignoreWarn","console","warn","a11yOrderRef","useRef","registerOrderRef","registerOrder","updateRefList","reset","setOrder","useA11yOrderManager","useLayoutEffect","a11yOrder","ref","onLayout","exports"],"sourceRoot":"../../../../src","sources":["hooks/useDynamicFocusOrder/useDynamicFocusOrder.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,oBAAA,GAAAD,OAAA;AAGA;AACA;AACA;AACA;AACO,MAAME,oBAAoB,GAAGA,CAClCC,OAAwB,EACxBC,UAAoB,KACQ;EAC5B,IAAI,CAACA,UAAU,EAAE;IACfC,OAAO,CAACC,IAAI,CACV,wMACF,CAAC;EACH;EAEA,MAAMC,YAAY,GAAG,IAAAC,aAAM,EAAO,IAAI,CAAC;EAEvC,MAAM;IACJC,gBAAgB,EAAEC,aAAa;IAC/BC,aAAa;IACbC,KAAK;IACLC;EACF,CAAC,GAAG,IAAAC,wCAAmB,EAACP,YAAY,EAAEJ,OAAO,CAAC;EAE9C,IAAAY,sBAAe,EAACJ,aAAa,CAAC;EAE9B,OAAO;IACLK,SAAS,EAAE;MACTC,GAAG,EAAEV,YAAY;MACjBW,QAAQ,EAAEP;IACZ,CAAC;IACDD,aAAa;IACbE,KAAK;IACLC;EACF,CAAC;AACH,CAAC;AAACM,OAAA,CAAAjB,oBAAA,GAAAA,oBAAA"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=useDynamicFocusOrder.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["hooks/useDynamicFocusOrder/useDynamicFocusOrder.types.ts"],"mappings":""}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "useFocusOrder", {
7
- enumerable: true,
8
- get: function () {
9
- return _useFocusOrder.useFocusOrder;
10
- }
11
- });
12
- var _useFocusOrder = require("./useFocusOrder");
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_useFocusOrder","require"],"sourceRoot":"../../../../src","sources":["hooks/useFocusOrder/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useFocusOrder = void 0;
7
- var _react = require("react");
8
- var _useDynamicFocusOrder = require("../useDynamicFocusOrder");
9
- /**
10
- * @deprecated The method should not be used
11
- * This API is going to be removed in future releases, you can find migration instruction here: https://github.com/ArturKalach/react-native-a11y-order?tab=readme-ov-file#migration
12
- */
13
- const useFocusOrder = (size, onlyFor, ignoreWarn) => {
14
- if (!ignoreWarn) {
15
- console.warn('useFocusOrder: This API is going to be removed in future releases, you can find migration instruction here: https://github.com/ArturKalach/react-native-a11y-order?tab=readme-ov-file#migration');
16
- }
17
- const {
18
- a11yOrder,
19
- registerOrder,
20
- reset,
21
- setOrder
22
- } = (0, _useDynamicFocusOrder.useDynamicFocusOrder)(onlyFor);
23
- const refs = (0, _react.useRef)(Array(size).fill(null).map((_, i) => registerOrder(i))).current;
24
- return {
25
- a11yOrder,
26
- refs,
27
- reset,
28
- setOrder
29
- };
30
- };
31
- exports.useFocusOrder = useFocusOrder;
32
- //# sourceMappingURL=useFocusOrder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_useDynamicFocusOrder","useFocusOrder","size","onlyFor","ignoreWarn","console","warn","a11yOrder","registerOrder","reset","setOrder","useDynamicFocusOrder","refs","useRef","Array","fill","map","_","i","current","exports"],"sourceRoot":"../../../../src","sources":["hooks/useFocusOrder/useFocusOrder.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,qBAAA,GAAAD,OAAA;AAGA;AACA;AACA;AACA;AACO,MAAME,aAAa,GAAGA,CAC3BC,IAAY,EACZC,OAAwB,EACxBC,UAAoB,KACE;EACtB,IAAI,CAACA,UAAU,EAAE;IACfC,OAAO,CAACC,IAAI,CACV,iMACF,CAAC;EACH;EAEA,MAAM;IAAEC,SAAS;IAAEC,aAAa;IAAEC,KAAK;IAAEC;EAAS,CAAC,GACjD,IAAAC,0CAAoB,EAACR,OAAO,CAAC;EAE/B,MAAMS,IAAI,GAAG,IAAAC,aAAM,EACjBC,KAAK,CAACZ,IAAI,CAAC,CACRa,IAAI,CAAC,IAAI,CAAC,CACVC,GAAG,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKV,aAAa,CAACU,CAAC,CAAC,CACnC,CAAC,CAACC,OAAO;EAET,OAAO;IACLZ,SAAS;IACTK,IAAI;IACJH,KAAK;IACLC;EACF,CAAC;AACH,CAAC;AAACU,OAAA,CAAAnB,aAAA,GAAAA,aAAA"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=useFocusOrder.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["hooks/useFocusOrder/useFocusOrder.types.ts"],"mappings":""}
@@ -1,10 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _reactNative = require("react-native");
8
- var _default = _reactNative.TurboModuleRegistry.getEnforcing('A11yOrder');
9
- exports.default = _default;
10
- //# sourceMappingURL=NativeA11yOrder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_default","TurboModuleRegistry","getEnforcing","exports","default"],"sourceRoot":"../../../src","sources":["nativeSpecs/NativeA11yOrder.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAqE,IAAAC,QAAA,GAMtDC,gCAAmB,CAACC,YAAY,CAAO,WAAW,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAJ,QAAA"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=A11yOrder.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/A11yOrder.types.ts"],"mappings":""}
@@ -1,14 +0,0 @@
1
- import { findNodeHandle } from 'react-native';
2
- import { setA11yOrder } from './module';
3
- export const setA11yElementsOrder = _ref => {
4
- let {
5
- tag,
6
- views
7
- } = _ref;
8
- if (!tag) return;
9
- const targetView = findNodeHandle(tag.current);
10
- if (!targetView) return;
11
- const tags = views.map(view => findNodeHandle(view)).filter(view => Boolean(view));
12
- setA11yOrder === null || setA11yOrder === void 0 ? void 0 : setA11yOrder(tags, targetView);
13
- };
14
- //# sourceMappingURL=helper.js.map