@office-iss/react-native-win32 0.66.4 → 0.67.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.
- package/.eslintignore +2 -0
- package/.flowconfig +1 -1
- package/CHANGELOG.json +228 -46
- package/CHANGELOG.md +102 -25
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +14 -1
- package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +2 -0
- package/Libraries/Animated/AnimatedEvent.js +23 -4
- package/Libraries/Animated/NativeAnimatedHelper.js +2 -2
- package/Libraries/Animated/components/AnimatedImage.js +3 -3
- package/Libraries/Animated/components/AnimatedScrollView.js +3 -3
- package/Libraries/Animated/components/AnimatedText.js +3 -3
- package/Libraries/Animated/components/AnimatedView.js +1 -3
- package/Libraries/Animated/createAnimatedComponent.js +3 -34
- package/Libraries/Components/Button/ButtonWin32.js +2 -2
- package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
- package/Libraries/Components/Button.js +3 -0
- package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +3 -6
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -7
- package/Libraries/Components/EnterString.win32.js +3 -3
- package/Libraries/Components/EnterString.win32.js.map +1 -1
- package/Libraries/Components/Keyboard/Keyboard.js +2 -2
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +1 -0
- package/Libraries/Components/ScrollView/ScrollView.js +17 -16
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +268 -252
- package/Libraries/Components/Text/Tests/TextWin32Test.d.ts +0 -1
- package/Libraries/Components/Text/TextWin32.Props.d.ts +2 -2
- package/Libraries/Components/Text/TextWin32.Props.js.map +1 -1
- package/Libraries/Components/Text/TextWin32.js +1 -1
- package/Libraries/Components/Text/TextWin32.js.map +1 -1
- package/Libraries/Components/TextInput/Tests/TextInputTest.d.ts +0 -1
- package/Libraries/Components/TextInput/TextInput.win32.js +6 -6
- package/Libraries/Components/TextInput/TextInput.win32.js.map +1 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.d.ts +0 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +1 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +2 -2
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js +2 -2
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/View/Tests/ViewWin32Test.d.ts +0 -1
- package/Libraries/Components/View/View.js +1 -1
- package/Libraries/Components/View/View.win32.js +1 -1
- package/Libraries/Components/View/ViewAccessibility.js +1 -1
- package/Libraries/Components/View/ViewWin32.Props.d.ts +3 -6
- package/Libraries/Components/View/ViewWin32.Props.js.map +1 -1
- package/Libraries/Components/View/ViewWin32.js +5 -5
- package/Libraries/Components/View/ViewWin32.js.map +1 -1
- package/Libraries/Core/ExceptionsManager.js +45 -80
- package/Libraries/Core/ExtendedError.js +0 -1
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/setUpBatchedBridge.js +1 -1
- package/Libraries/Core/setUpGlobals.js +2 -4
- package/Libraries/Core/setUpTimers.js +2 -2
- package/Libraries/Image/Image.ios.js +6 -0
- package/Libraries/Image/Image.win32.js +6 -0
- package/Libraries/Image/ImageBackground.js +10 -8
- package/Libraries/Image/ImageProps.js +28 -0
- package/Libraries/Image/Tests/ImageWin32Test.d.ts +0 -1
- package/Libraries/LogBox/Data/LogBoxData.js +18 -19
- package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
- package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
- package/Libraries/NewAppScreen/components/logo.png +0 -0
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +2 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +2 -0
- package/Libraries/PersonaCoin/PersonaCoin.js +3 -2
- package/Libraries/PersonaCoin/PersonaCoin.js.map +1 -1
- package/Libraries/Pressability/Pressability.js +13 -13
- package/Libraries/Pressability/Pressability.win32.js +13 -13
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
- package/Libraries/ReactNative/AppRegistry.js +4 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +1569 -875
- package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +529 -319
- package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +570 -362
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +1592 -891
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +521 -311
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +562 -354
- package/Libraries/Share/Share.js +1 -1
- package/Libraries/StyleSheet/normalizeColor.js +2 -2
- package/Libraries/Text/TextProps.js +1 -7
- package/Libraries/TurboModule/TurboModuleRegistry.js +1 -1
- package/Libraries/Utilities/HMRClient.js +1 -1
- package/flow/global.js +45 -0
- package/index.js +15 -10
- package/index.win32.js +15 -10
- package/jest/mockModal.js +31 -0
- package/jest/preprocessor.js +7 -75
- package/jest/setup.js +5 -3
- package/overrides.json +8 -14
- package/package.json +19 -17
- package/rntypes/BatchedBridge.d.ts +23 -0
- package/rntypes/Devtools.d.ts +20 -0
- package/rntypes/LaunchScreen.d.ts +9 -0
- package/rntypes/globals.d.ts +496 -0
- package/rntypes/index.d.ts +9966 -0
- package/rntypes/legacy-properties.d.ts +266 -0
- package/src/Libraries/Components/Text/TextWin32.Props.ts +2 -2
- package/src/Libraries/Components/View/ViewWin32.Props.ts +6 -12
- package/src/rntypes/BatchedBridge.d.ts +23 -0
- package/src/rntypes/Devtools.d.ts +20 -0
- package/src/rntypes/LaunchScreen.d.ts +9 -0
- package/src/rntypes/globals.d.ts +496 -0
- package/src/rntypes/index.d.ts +9966 -0
- package/src/rntypes/legacy-properties.d.ts +266 -0
- package/src/typings-index.ts +11 -4
- package/typings-index.d.ts +3 -1
- package/typings-index.js +7 -5
- package/typings-index.js.map +1 -1
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -87
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.win32.js +0 -30
- package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
- package/Libraries/Components/StaticContainer.react.js +0 -51
- package/Libraries/Components/Touchable/ensurePositiveDelayProps.js +0 -25
- package/Libraries/Interaction/InteractionMixin.js +0 -54
- package/Libraries/ReactNative/queryLayoutByID.js +0 -58
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewWin32.Props.js","sourceRoot":"","sources":["../../../src/Libraries/Components/View/ViewWin32.Props.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAeb,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2CAAI,CAAA;IACJ,qDAAS,CAAA;IACT,mDAAQ,CAAA;IACR,mDAAQ,CAAA;AACV,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB","sourcesContent":["'use strict';\nimport React from 'react'\nimport RN = require('react-native');\n\n// removes from interface T the members of interface K\ntype Omit<T, K> = Pick<T, Exclude<keyof T, keyof K>>;\n\n// All of T becomes optional except for Keys\ntype PartiallyRequired<T, Keys extends keyof T = keyof T> = Pick<Partial<T>, Exclude<keyof T, Keys>> & Pick<T, Keys>;\n\n/**\n * All of TOrigin except Key from TUse\n */\nexport type UseFrom<TOrigin, TUse, Key extends keyof TUse> = Pick<TOrigin, Exclude<keyof TOrigin, Key>> & Pick<TUse, Key>;\n\nexport enum EventPhase {\n None,\n Capturing,\n AtTarget,\n Bubbling\n}\n\nexport interface INativeKeyboardEvent {\n altKey: boolean;\n ctrlKey: boolean;\n metaKey: boolean;\n shiftKey: boolean;\n key: string;\n eventPhase: EventPhase;\n}\nexport type IKeyboardEvent = RN.NativeSyntheticEvent<INativeKeyboardEvent>;\nexport type IHandledKeyboardEvent = PartiallyRequired<INativeKeyboardEvent, 'key'>;\n\nexport interface IViewWin32 {\n focus: () => void;\n}\n\nexport type ARIARole =\n | 'alert'\n | 'alertdialog'\n | 'application'\n | 'button'\n | 'checkbox'\n | 'combobox'\n | 'dialog'\n | 'group'\n | 'link'\n | 'menu'\n | 'menubar'\n | 'menuitem'\n | 'none'\n | 'presentation'\n | 'progressbar'\n | 'radio'\n | 'radiogroup'\n | 'scrollbar'\n | 'search'\n | 'spinbutton'\n | 'switch'\n | 'tab'\n | 'tablist'\n | 'tabpanel'\n | 'textbox'\n | 'timer'\n | 'toolbar'\n | 'tree'\n | 'treeitem';\n\nexport type AnnotationType =\n | 'AdvanceProofingIssue'\n | 'Author'\n | 'CircularReferenceError'\n | 'Comment'\n | 'ConflictingChange'\n | 'DataValidationError'\n | 'DeletionChange'\n | 'EditingLockedChange'\n | 'Endnote'\n | 'ExternalChange'\n | 'Footer'\n | 'Footnote'\n | 'FormatChange'\n | 'FormulaError'\n | 'GrammarError'\n | 'Header'\n | 'Highlighted'\n | 'InsertionChange'\n | 'Mathematics'\n | 'MoveChange'\n | 'SpellingError'\n | 'TrackChanges'\n | 'Unknown'\n | 'UnsyncedChange';\n\nexport type AccessibilityAnnotationInfo = Readonly<{\n typeID: AnnotationType;\n typeName?: string;\n author?: string;\n dateTime?: string;\n target?: string;\n}>;\n\nexport type AccessibilityActionName =\n | RN.AccessibilityActionName\n | 'AddToSelection'\n | 'RemoveFromSelection'\n | 'Select'\n | 'Expand'\n | 'Collapse';\n\nexport type Cursor =\n | 'auto'\n | 'default'\n | 'pointer'\n | 'help'\n | 'not-allowed'\n | 'wait'\n | 'move'\n | 'nesw-resize'\n | 'ns-resize'\n | 'nwse-resize'\n | 'we-resize'\n | 'text'\n\nexport type AccessibilityActionInfo = Readonly<{\n name: AccessibilityActionName;\n label?: string;\n}>;\n\nexport type
|
|
1
|
+
{"version":3,"file":"ViewWin32.Props.js","sourceRoot":"","sources":["../../../src/Libraries/Components/View/ViewWin32.Props.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAeb,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2CAAI,CAAA;IACJ,qDAAS,CAAA;IACT,mDAAQ,CAAA;IACR,mDAAQ,CAAA;AACV,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB","sourcesContent":["'use strict';\nimport React from 'react'\nimport RN = require('react-native');\n\n// removes from interface T the members of interface K\ntype Omit<T, K> = Pick<T, Exclude<keyof T, keyof K>>;\n\n// All of T becomes optional except for Keys\ntype PartiallyRequired<T, Keys extends keyof T = keyof T> = Pick<Partial<T>, Exclude<keyof T, Keys>> & Pick<T, Keys>;\n\n/**\n * All of TOrigin except Key from TUse\n */\nexport type UseFrom<TOrigin, TUse, Key extends keyof TUse> = Pick<TOrigin, Exclude<keyof TOrigin, Key>> & Pick<TUse, Key>;\n\nexport enum EventPhase {\n None,\n Capturing,\n AtTarget,\n Bubbling\n}\n\nexport interface INativeKeyboardEvent {\n altKey: boolean;\n ctrlKey: boolean;\n metaKey: boolean;\n shiftKey: boolean;\n key: string;\n eventPhase: EventPhase;\n}\nexport type IKeyboardEvent = RN.NativeSyntheticEvent<INativeKeyboardEvent>;\nexport type IHandledKeyboardEvent = PartiallyRequired<INativeKeyboardEvent, 'key'>;\n\nexport interface IViewWin32 {\n focus: () => void;\n}\n\nexport type ARIARole =\n | 'alert'\n | 'alertdialog'\n | 'application'\n | 'button'\n | 'checkbox'\n | 'combobox'\n | 'dialog'\n | 'group'\n | 'link'\n | 'menu'\n | 'menubar'\n | 'menuitem'\n | 'none'\n | 'presentation'\n | 'progressbar'\n | 'radio'\n | 'radiogroup'\n | 'scrollbar'\n | 'search'\n | 'spinbutton'\n | 'switch'\n | 'tab'\n | 'tablist'\n | 'tabpanel'\n | 'textbox'\n | 'timer'\n | 'toolbar'\n | 'tree'\n | 'treeitem';\n\nexport type AnnotationType =\n | 'AdvanceProofingIssue'\n | 'Author'\n | 'CircularReferenceError'\n | 'Comment'\n | 'ConflictingChange'\n | 'DataValidationError'\n | 'DeletionChange'\n | 'EditingLockedChange'\n | 'Endnote'\n | 'ExternalChange'\n | 'Footer'\n | 'Footnote'\n | 'FormatChange'\n | 'FormulaError'\n | 'GrammarError'\n | 'Header'\n | 'Highlighted'\n | 'InsertionChange'\n | 'Mathematics'\n | 'MoveChange'\n | 'SpellingError'\n | 'TrackChanges'\n | 'Unknown'\n | 'UnsyncedChange';\n\nexport type AccessibilityAnnotationInfo = Readonly<{\n typeID: AnnotationType;\n typeName?: string;\n author?: string;\n dateTime?: string;\n target?: string;\n}>;\n\nexport type AccessibilityActionName =\n | RN.AccessibilityActionName\n | 'AddToSelection'\n | 'RemoveFromSelection'\n | 'Select'\n | 'Expand'\n | 'Collapse';\n\nexport type Cursor =\n | 'auto'\n | 'default'\n | 'pointer'\n | 'help'\n | 'not-allowed'\n | 'wait'\n | 'move'\n | 'nesw-resize'\n | 'ns-resize'\n | 'nwse-resize'\n | 'we-resize'\n | 'text'\n\nexport type AccessibilityActionInfo = Readonly<{\n name: AccessibilityActionName;\n label?: string;\n}>;\n\nexport type AccessibilityState = RN.AccessibilityState & { multiselectable?: boolean, required?: boolean };\n\nexport type SharedAccessibilityPropsIOSandWin32 = {\n onAccessibilityTap?: () => void;\n};\n\nexport type OmittedAccessibilityPropsWin32 = {\n accessibilityActions?: ReadonlyArray<RN.AccessibilityActionInfo>;\n accessibilityRole?: RN.AccessibilityRole;\n accessibilityState?: RN.AccessibilityState;\n};\n\nexport type BasePropsWin32 = {\n /**\n * Tells a person using a screen reader the type of element they are focused on.\n *\n * Overrides the `accessibilityRole` prop on React Native to accept a subset of ARIA roles.\n *\n * Possible values for ARIARole are: alert, alertdialog, application, button, checkbox,\n * comobox, dialog, group, link, menu, menubar, menuitem, none, presentation, progressbar,\n * radio, radiogroup, scrollbar, search, spinbutton, switch, tab, tablist, tabpanel, textbox,\n * timer, toolbar, tree, and treeitem.\n */\n accessibilityRole?: RN.AccessibilityRole | ARIARole;\n accessibilityState?: AccessibilityState;\n accessibilityActions?: ReadonlyArray<AccessibilityActionInfo>;\n\n /**\n * Windows Accessibility extensions for allowing other DOM elements to label or describe a given element.\n *\n * Defined as a reference to another DOM element inheriting from the primary base classes of React-Native elements.\n * The reference will be converted to a native reference (tag) before passing to the native platform.\n */\n accessibilityDescribedBy?: React.RefObject<any>;\n accessibilityLabeledBy?: React.RefObject<any>;\n\n /**\n * Identifies the element whose contents or presence are controlled by another element. \n * \n * This is mainly used for a Textbox with a Dropdown PeoplePicker-type list. This allows an \n * accessibility tool to query those other providers for properties and listen to their events.\n */\n accessibilityControls?: React.RefObject<any>; \n\n /**\n * Identifies the ItemType property, which is a text string describing the type of the automation element.\n * ItemType is used to obtain information about items in a list, tree view, or data grid. For example, an item in a file directory view might be a \"Document File\" or a \"Folder\".\n */\n accessibilityItemType?: string;\n};\n\nexport type ViewWin32OmitTypes = RN.ViewPropsAndroid &\n RN.ViewPropsIOS &\n RN.AccessibilityPropsAndroid &\n Omit<RN.AccessibilityPropsIOS, SharedAccessibilityPropsIOSandWin32> &\n OmittedAccessibilityPropsWin32;\n\n/**\n * Properties for ViewWin32 component\n */\nexport interface IViewWin32Props extends Omit<RN.ViewProps, ViewWin32OmitTypes>, BasePropsWin32 {\n type?: React.ElementType;\n children?: React.ReactNode;\n accessibilityActions?: ReadonlyArray<AccessibilityActionInfo>;\n /**\n * Tells a person using a screen reader what kind of annotation they\n * have selected. If available, it will also tell a person the author of the annotation and\n * the date and time the annotation was posted.\n *\n * Note: If typeID is 'Unknown', a typeName must be provided.\n */\n accessibilityAnnotation?: AccessibilityAnnotationInfo;\n /**\n * accessibilityDescription provides more detailed information specific to the element (i.e. last edit date, full location for a file)\n * while accessibilityHint provides infomation on what will happen when they perform an action.\n *\n */\n accessibilityDescription?: string;\n accessibilityLevel?: number;\n accessibilityPositionInSet?: number;\n\n accessibilitySetSize?: number;\n animationClass?: string;\n focusable?: boolean;\n enableFocusRing?: boolean;\n\n /**\n * The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React\n * Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onBlur?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n /**\n * The onBlur event occurs when an element loses focus. The opposite of onBlur is onFocus. Note that in React\n * Native, unlike in the web, the onBlur event bubbles (similar to onFocusOut in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onBlurCapture?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n /**\n * The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React\n * Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onFocus?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n /**\n * The onFocus event occurs when an element gets focus. The opposite of onFocus is onBlur. Note that in React\n * Native, unlike in the web, the onFocus event bubbles (similar to onFocusIn in the web).\n *\n * `ev.target === ev.currentTarget` when the focus is being lost from this component.\n * `ev.target !== ev.currentTarget` when the focus is being lost from a descendant.\n */\n onFocusCapture?: (ev: RN.NativeSyntheticEvent<{}>) => void;\n\n onKeyDown?: (args: IKeyboardEvent) => void;\n onKeyDownCapture?: (args: IKeyboardEvent) => void;\n onKeyUp?: (args: IKeyboardEvent) => void;\n onKeyUpCapture?: (args: IKeyboardEvent) => void;\n\n onMouseEnter?: () => void;\n onMouseLeave?: () => void;\n\n keyDownEvents?: IHandledKeyboardEvent[];\n keyUpEvents?: IHandledKeyboardEvent[];\n\n /**\n * Provides a screentip to be used on hover of the view\n */\n tooltip?: string;\n cursor?: Cursor;\n}\n"]}
|
|
@@ -35,17 +35,17 @@ exports.ViewWin32 = react_1.default.forwardRef((props, ref) => {
|
|
|
35
35
|
const { accessibilityLabeledBy, accessibilityDescribedBy, accessibilityControls, ...rest } = props;
|
|
36
36
|
react_1.default.useLayoutEffect(() => {
|
|
37
37
|
if (accessibilityLabeledBy !== undefined && accessibilityLabeledBy.current !== null) {
|
|
38
|
-
setLabeledByTarget(react_native_1.findNodeHandle(accessibilityLabeledBy.current));
|
|
38
|
+
setLabeledByTarget((0, react_native_1.findNodeHandle)(accessibilityLabeledBy.current));
|
|
39
39
|
}
|
|
40
40
|
}, [accessibilityLabeledBy]);
|
|
41
41
|
react_1.default.useLayoutEffect(() => {
|
|
42
42
|
if (accessibilityDescribedBy !== undefined && accessibilityDescribedBy.current !== null) {
|
|
43
|
-
setDescribedByTarget(react_native_1.findNodeHandle(accessibilityDescribedBy.current));
|
|
43
|
+
setDescribedByTarget((0, react_native_1.findNodeHandle)(accessibilityDescribedBy.current));
|
|
44
44
|
}
|
|
45
45
|
}, [accessibilityDescribedBy]);
|
|
46
46
|
react_1.default.useLayoutEffect(() => {
|
|
47
47
|
if (accessibilityControls !== undefined && accessibilityControls.current !== null) {
|
|
48
|
-
setControlsTarget(react_native_1.findNodeHandle(accessibilityControls.current));
|
|
48
|
+
setControlsTarget((0, react_native_1.findNodeHandle)(accessibilityControls.current));
|
|
49
49
|
}
|
|
50
50
|
}, [accessibilityControls]);
|
|
51
51
|
/**
|
|
@@ -61,11 +61,11 @@ exports.ViewWin32 = react_1.default.forwardRef((props, ref) => {
|
|
|
61
61
|
*/
|
|
62
62
|
if (localRef) {
|
|
63
63
|
localRef.focus = () => {
|
|
64
|
-
react_native_1.UIManager.dispatchViewManagerCommand(react_native_1.findNodeHandle(localRef), react_native_1.UIManager.getViewManagerConfig('RCTView').Commands.focus, null);
|
|
64
|
+
react_native_1.UIManager.dispatchViewManagerCommand((0, react_native_1.findNodeHandle)(localRef), react_native_1.UIManager.getViewManagerConfig('RCTView').Commands.focus, null);
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
});
|
|
69
|
-
return react_1.default.createElement(react_native_1.View,
|
|
69
|
+
return react_1.default.createElement(react_native_1.View, { ref: setNativeRef, ...rest, ...((controlsTarget !== null) ? { accessibilityControls: controlsTarget } : {}), ...((labeledByTarget !== null) ? { accessibilityLabeledBy: labeledByTarget } : {}), ...((describedByTarget !== null) ? { accessibilityDescribedBy: describedByTarget } : {}) });
|
|
70
70
|
});
|
|
71
71
|
//# sourceMappingURL=ViewWin32.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/View/ViewWin32.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,kDAAyB;AAEzB,+CAA+D;AAE/D,MAAM,gBAAgB,GAAG,OAAO,CAAC,kCAAkC,CAAC,CAAC;AAgBxD,QAAA,SAAS,GAAG,eAAK,CAAC,UAAU,CACvC,CAAC,KAAsB,EAAE,GAAmB,EAAE,EAAE;IAE9C;;OAEG;IACH,IAAI,OAAO,EAAE;QACX,IAAI,KAAK,EAAE;YACT,eAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBACpD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;oBAC5B,OAAO,CAAC,KAAK,CAAC,yBAAyB,IAAI,8CAA8C,CAAC,CAAC;iBAC5F;YACH,CAAC,CAAC,CAAC;SACJ;KACF;IAED;;;OAGG;IAEH,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACnE,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjE,MAAM,EAAC,sBAAsB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,GAAG,IAAI,EAAC,GAAG,KAAK,CAAC;IAEjG,eAAK,CAAC,eAAe,CAAC,GAAG,EAAE;QACzB,IAAI,sBAAsB,KAAK,SAAS,IAAI,sBAAsB,CAAC,OAAO,KAAK,IAAI,EACnF;YACE,kBAAkB,CAAC,6BAAc,
|
|
1
|
+
{"version":3,"file":"ViewWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/View/ViewWin32.tsx"],"names":[],"mappings":"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","sourcesContent":["/**\n * Copyright: Microsoft 2015\n *\n * RN-specific implementation of the cross-platform View abstraction.\n */\n\nimport React from 'react'\nimport RN = require('react-native');\nimport { View, findNodeHandle, UIManager } from 'react-native';\nimport { IViewWin32Props, UseFrom } from './ViewWin32.Props';\nconst setAndForwardRef = require('../../Utilities/setAndForwardRef');\n\n/**\n * Basic View component with additional Win32 specific functionality\n */\n\ntype InnerViewWin32Props = UseFrom<IViewWin32Props, RN.ViewProps, 'accessibilityRole'> &\n UseFrom<IViewWin32Props, RN.ViewProps, 'accessibilityState'> &\n UseFrom<IViewWin32Props, RN.ViewProps, 'accessibilityActions'> &\n UseFrom<IViewWin32Props, RN.ViewProps, 'onAccessibilityAction'>;\n\ntype ViewWin32Type = React.ForwardRefExoticComponent<\nIViewWin32Props & React.RefAttributes<View>\n> &\n View;\n\nexport const ViewWin32 = React.forwardRef(\n (props: IViewWin32Props, ref: React.Ref<any>) => {\n\n /**\n * Check for raw text in the DOM.\n */\n if (__DEV__) {\n if (props) {\n React.Children.toArray(props.children).forEach(item => {\n if (typeof item === 'string') {\n console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`);\n }\n });\n }\n }\n\n /**\n * Process accessibility refs into node handles after initial DOM render, before sent across the bridge.\n * useLayoutEffect will invalidate the render to assess the ref-based accessibility properties.\n */\n\n const [labeledByTarget, setLabeledByTarget] = React.useState(null);\n const [describedByTarget, setDescribedByTarget] = React.useState(null);\n const [controlsTarget, setControlsTarget] = React.useState(null);\n const {accessibilityLabeledBy, accessibilityDescribedBy, accessibilityControls, ...rest} = props;\n\n React.useLayoutEffect(() => {\n if (accessibilityLabeledBy !== undefined && accessibilityLabeledBy.current !== null)\n {\n setLabeledByTarget(findNodeHandle(accessibilityLabeledBy.current as\n | null\n | number\n | React.Component<any, any, any>\n | React.ComponentClass<any, any>));\n }\n }, [accessibilityLabeledBy]);\n\n React.useLayoutEffect(() => {\n if (accessibilityDescribedBy !== undefined && accessibilityDescribedBy.current !== null)\n {\n setDescribedByTarget(findNodeHandle(accessibilityDescribedBy.current as\n | null\n | number\n | React.Component<any, any, any>\n | React.ComponentClass<any, any>));\n }\n }, [accessibilityDescribedBy]);\n \n React.useLayoutEffect(() => {\n if(accessibilityControls !== undefined && accessibilityControls.current !== null)\n {\n setControlsTarget(findNodeHandle(accessibilityControls.current as\n | null\n | number\n | React.Component<any, any, any>\n | React.ComponentClass<any, any>));\n }\n }, [accessibilityControls]);\n\n /**\n * Set up the forwarding ref to enable adding the focus method.\n */\n const focusRef = React.useRef<ViewWin32>();\n const setNativeRef = setAndForwardRef({\n getForwardedRef: () => ref,\n setLocalRef: localRef => {\n focusRef.current = localRef; \n\n /**\n * Add focus() as a callable function to the forwarded reference.\n */\n if (localRef)\n {\n localRef.focus = () => {\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(localRef),\n UIManager.getViewManagerConfig('RCTView').Commands.focus,\n null\n );\n };\n }\n },\n });\n\n return <View ref={setNativeRef}\n {...(rest as InnerViewWin32Props)}\n {...((controlsTarget !== null) ? {accessibilityControls:controlsTarget} : {})}\n {...((labeledByTarget !== null) ? {accessibilityLabeledBy:labeledByTarget} : {})}\n {...((describedByTarget !== null) ? {accessibilityDescribedBy:describedByTarget} : {})}\n />;\n });\n\nexport type ViewWin32 = ViewWin32Type;\n"]}
|
|
@@ -56,92 +56,57 @@ function reportException(
|
|
|
56
56
|
isFatal: boolean,
|
|
57
57
|
reportToConsole: boolean, // only true when coming from handleException; the error has not yet been logged
|
|
58
58
|
) {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
const namePrefix = e.name == null || e.name === '' ? '' : `${e.name}: `;
|
|
70
|
-
|
|
71
|
-
if (!message.startsWith(namePrefix)) {
|
|
72
|
-
message = namePrefix + message;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
message =
|
|
76
|
-
e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;
|
|
59
|
+
const parseErrorStack = require('./Devtools/parseErrorStack');
|
|
60
|
+
const stack = parseErrorStack(e?.stack);
|
|
61
|
+
const currentExceptionID = ++exceptionID;
|
|
62
|
+
const originalMessage = e.message || '';
|
|
63
|
+
let message = originalMessage;
|
|
64
|
+
if (e.componentStack != null) {
|
|
65
|
+
message += `\n\nThis error is located at:${e.componentStack}`;
|
|
66
|
+
}
|
|
67
|
+
const namePrefix = e.name == null || e.name === '' ? '' : `${e.name}: `;
|
|
77
68
|
|
|
78
|
-
|
|
79
|
-
|
|
69
|
+
if (!message.startsWith(namePrefix)) {
|
|
70
|
+
message = namePrefix + message;
|
|
71
|
+
}
|
|
80
72
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
73
|
+
message =
|
|
74
|
+
e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;
|
|
75
|
+
|
|
76
|
+
const data = preprocessException({
|
|
77
|
+
message,
|
|
78
|
+
originalMessage: message === originalMessage ? null : originalMessage,
|
|
79
|
+
name: e.name == null || e.name === '' ? null : e.name,
|
|
80
|
+
componentStack:
|
|
81
|
+
typeof e.componentStack === 'string' ? e.componentStack : null,
|
|
82
|
+
stack,
|
|
83
|
+
id: currentExceptionID,
|
|
84
|
+
isFatal,
|
|
85
|
+
extraData: {
|
|
86
|
+
jsEngine: e.jsEngine,
|
|
87
|
+
rawStack: e.stack,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
if (reportToConsole) {
|
|
92
|
+
// we feed back into console.error, to make sure any methods that are
|
|
93
|
+
// monkey patched on top of console.error are called when coming from
|
|
94
|
+
// handleException
|
|
95
|
+
console.error(data.message);
|
|
96
|
+
}
|
|
93
97
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
if (__DEV__) {
|
|
99
|
+
const LogBox = require('../LogBox/LogBox');
|
|
100
|
+
LogBox.addException({
|
|
101
|
+
...data,
|
|
102
|
+
isComponentError: !!e.isComponentError,
|
|
98
103
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
// handleException
|
|
104
|
-
console.error(data.message);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (__DEV__ && isHandledByLogBox) {
|
|
108
|
-
const LogBox = require('../LogBox/LogBox');
|
|
109
|
-
LogBox.addException({
|
|
110
|
-
...data,
|
|
111
|
-
isComponentError: !!e.isComponentError,
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (isFatal || e.type !== 'warn') {
|
|
104
|
+
} else if (isFatal || e.type !== 'warn') {
|
|
105
|
+
const NativeExceptionsManager = require('./NativeExceptionsManager')
|
|
106
|
+
.default;
|
|
107
|
+
if (NativeExceptionsManager) {
|
|
116
108
|
NativeExceptionsManager.reportException(data);
|
|
117
|
-
|
|
118
|
-
if (__DEV__ && !global.RN$Express) {
|
|
119
|
-
if (e.preventSymbolication === true) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
const symbolicateStackTrace = require('./Devtools/symbolicateStackTrace');
|
|
123
|
-
symbolicateStackTrace(stack)
|
|
124
|
-
.then(({stack: prettyStack}) => {
|
|
125
|
-
if (prettyStack) {
|
|
126
|
-
NativeExceptionsManager.updateExceptionMessage(
|
|
127
|
-
data.message,
|
|
128
|
-
prettyStack,
|
|
129
|
-
currentExceptionID,
|
|
130
|
-
);
|
|
131
|
-
} else {
|
|
132
|
-
throw new Error('The stack is null');
|
|
133
|
-
}
|
|
134
|
-
})
|
|
135
|
-
.catch(error => {
|
|
136
|
-
console.log('Unable to symbolicate stack trace: ' + error.message);
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
109
|
}
|
|
140
|
-
} else if (reportToConsole) {
|
|
141
|
-
// we feed back into console.error, to make sure any methods that are
|
|
142
|
-
// monkey patched on top of console.error are called when coming from
|
|
143
|
-
// handleException
|
|
144
|
-
console.error(e);
|
|
145
110
|
}
|
|
146
111
|
}
|
|
147
112
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated by scripts/
|
|
2
|
+
* @generated by scripts/set-rn-version.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
exports.version = {
|
|
13
13
|
major: 0,
|
|
14
|
-
minor:
|
|
15
|
-
patch:
|
|
14
|
+
minor: 67,
|
|
15
|
+
patch: 1,
|
|
16
16
|
prerelease: null,
|
|
17
17
|
};
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
let registerModule;
|
|
14
|
-
if (global.RN$Bridgeless && global.RN$registerCallableModule) {
|
|
14
|
+
if (global.RN$Bridgeless === true && global.RN$registerCallableModule) {
|
|
15
15
|
registerModule = global.RN$registerCallableModule;
|
|
16
16
|
} else {
|
|
17
17
|
const BatchedBridge = require('../BatchedBridge/BatchedBridge');
|
|
@@ -14,15 +14,13 @@
|
|
|
14
14
|
* Sets up global variables for React Native.
|
|
15
15
|
* You can use this module directly, or just require InitializeCore.
|
|
16
16
|
*/
|
|
17
|
-
if (global.GLOBAL === undefined) {
|
|
18
|
-
global.GLOBAL = global;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
17
|
if (global.window === undefined) {
|
|
18
|
+
// $FlowFixMe[cannot-write]
|
|
22
19
|
global.window = global;
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
if (global.self === undefined) {
|
|
23
|
+
// $FlowFixMe[cannot-write]
|
|
26
24
|
global.self = global;
|
|
27
25
|
}
|
|
28
26
|
|
|
@@ -28,7 +28,7 @@ const hasNativePromise = isNativeFunction(Promise);
|
|
|
28
28
|
const hasPromiseQueuedToJSVM = hasNativePromise || hasHermesPromiseQueuedToJSVM;
|
|
29
29
|
|
|
30
30
|
// In bridgeless mode, timers are host functions installed from cpp.
|
|
31
|
-
if (
|
|
31
|
+
if (global.RN$Bridgeless !== true) {
|
|
32
32
|
/**
|
|
33
33
|
* Set up timers.
|
|
34
34
|
* You can use this module directly, or just require InitializeCore.
|
|
@@ -65,7 +65,7 @@ if (hasPromiseQueuedToJSVM) {
|
|
|
65
65
|
// When promise was polyfilled hence is queued to the RN microtask queue,
|
|
66
66
|
// we polyfill the immediate APIs as aliases to the ReactNativeMicrotask APIs.
|
|
67
67
|
// Note that in bridgeless mode, immediate APIs are installed from cpp.
|
|
68
|
-
if (
|
|
68
|
+
if (global.RN$Bridgeless !== true) {
|
|
69
69
|
polyfillGlobal(
|
|
70
70
|
'setImmediate',
|
|
71
71
|
() => require('./Timers/JSTimers').queueReactNativeMicrotask,
|
|
@@ -12,6 +12,7 @@ import DeprecatedImagePropType from '../DeprecatedPropTypes/DeprecatedImagePropT
|
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import StyleSheet from '../StyleSheet/StyleSheet';
|
|
14
14
|
|
|
15
|
+
import ImageInjection from './ImageInjection';
|
|
15
16
|
import ImageAnalyticsTagContext from './ImageAnalyticsTagContext';
|
|
16
17
|
import flattenStyle from '../StyleSheet/flattenStyle';
|
|
17
18
|
import resolveAssetSource from './resolveAssetSource';
|
|
@@ -168,6 +169,11 @@ Image = React.forwardRef<
|
|
|
168
169
|
ImagePropsType,
|
|
169
170
|
React.ElementRef<typeof ImageViewNativeComponent>,
|
|
170
171
|
>(Image);
|
|
172
|
+
|
|
173
|
+
if (ImageInjection.unstable_createImageComponent != null) {
|
|
174
|
+
Image = ImageInjection.unstable_createImageComponent(Image);
|
|
175
|
+
}
|
|
176
|
+
|
|
171
177
|
Image.displayName = 'Image';
|
|
172
178
|
|
|
173
179
|
/**
|
|
@@ -12,6 +12,7 @@ import DeprecatedImagePropType from '../DeprecatedPropTypes/DeprecatedImagePropT
|
|
|
12
12
|
import * as React from 'react';
|
|
13
13
|
import StyleSheet from '../StyleSheet/StyleSheet';
|
|
14
14
|
|
|
15
|
+
import ImageInjection from './ImageInjection';
|
|
15
16
|
import ImageAnalyticsTagContext from './ImageAnalyticsTagContext';
|
|
16
17
|
import flattenStyle from '../StyleSheet/flattenStyle';
|
|
17
18
|
import resolveAssetSource from './resolveAssetSource';
|
|
@@ -203,6 +204,11 @@ Image = React.forwardRef<
|
|
|
203
204
|
ImagePropsType,
|
|
204
205
|
React.ElementRef<typeof ImageViewNativeComponent>,
|
|
205
206
|
>(Image);
|
|
207
|
+
|
|
208
|
+
if (ImageInjection.unstable_createImageComponent != null) {
|
|
209
|
+
Image = ImageInjection.unstable_createImageComponent(Image);
|
|
210
|
+
}
|
|
211
|
+
|
|
206
212
|
Image.displayName = 'Image';
|
|
207
213
|
|
|
208
214
|
/**
|
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
import Image from './Image';
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import StyleSheet from '../StyleSheet/StyleSheet';
|
|
16
|
+
import flattenStyle from '../StyleSheet/flattenStyle';
|
|
17
|
+
import View from '../Components/View/View';
|
|
18
|
+
import type {ImageBackgroundProps} from './ImageProps';
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* Very simple drop-in replacement for <Image> which supports nesting views.
|
|
@@ -39,7 +41,7 @@ const View = require('../Components/View/View');
|
|
|
39
41
|
* AppRegistry.registerComponent('DisplayAnImageBackground', () => DisplayAnImageBackground);
|
|
40
42
|
* ```
|
|
41
43
|
*/
|
|
42
|
-
class ImageBackground extends React.Component
|
|
44
|
+
class ImageBackground extends React.Component<ImageBackgroundProps> {
|
|
43
45
|
setNativeProps(props: Object) {
|
|
44
46
|
// Work-around flow
|
|
45
47
|
const viewRef = this._viewRef;
|
|
@@ -56,7 +58,7 @@ class ImageBackground extends React.Component<$FlowFixMeProps> {
|
|
|
56
58
|
|
|
57
59
|
render(): React.Node {
|
|
58
60
|
const {children, style, imageStyle, imageRef, ...props} = this.props;
|
|
59
|
-
|
|
61
|
+
const flattenedStyle = flattenStyle(style);
|
|
60
62
|
return (
|
|
61
63
|
<View
|
|
62
64
|
accessibilityIgnoresInvertColors={true}
|
|
@@ -74,8 +76,8 @@ class ImageBackground extends React.Component<$FlowFixMeProps> {
|
|
|
74
76
|
// So, we have to proxy/reapply these styles explicitly for actual <Image> component.
|
|
75
77
|
// This workaround should be removed after implementing proper support of
|
|
76
78
|
// intrinsic content size of the <Image>.
|
|
77
|
-
width:
|
|
78
|
-
height:
|
|
79
|
+
width: flattenedStyle?.width,
|
|
80
|
+
height: flattenedStyle?.height,
|
|
79
81
|
},
|
|
80
82
|
imageStyle,
|
|
81
83
|
]}
|
|
@@ -15,6 +15,8 @@ import type {EdgeInsetsProp} from '../StyleSheet/EdgeInsetsPropType';
|
|
|
15
15
|
import type {ImageSource} from './ImageSource';
|
|
16
16
|
import type {ViewStyleProp, ImageStyleProp} from '../StyleSheet/StyleSheet';
|
|
17
17
|
import type {ViewProps} from '../Components/View/ViewPropTypes';
|
|
18
|
+
import type {Node, Ref} from 'react';
|
|
19
|
+
import typeof Image from './Image';
|
|
18
20
|
|
|
19
21
|
export type ImageLoadEvent = SyntheticEvent<
|
|
20
22
|
$ReadOnly<{|
|
|
@@ -171,3 +173,29 @@ export type ImageProps = {|
|
|
|
171
173
|
src?: empty,
|
|
172
174
|
children?: empty,
|
|
173
175
|
|};
|
|
176
|
+
|
|
177
|
+
export type ImageBackgroundProps = $ReadOnly<{|
|
|
178
|
+
...ImageProps,
|
|
179
|
+
children?: Node,
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Style applied to the outer View component
|
|
183
|
+
*
|
|
184
|
+
* See https://reactnative.dev/docs/imagebackground#style
|
|
185
|
+
*/
|
|
186
|
+
style?: ?ViewStyleProp,
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Style applied to the inner Image component
|
|
190
|
+
*
|
|
191
|
+
* See https://reactnative.dev/docs/imagebackground#imagestyle
|
|
192
|
+
*/
|
|
193
|
+
imageStyle?: ?ImageStyleProp,
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Allows to set a reference to the inner Image component
|
|
197
|
+
*
|
|
198
|
+
* See https://reactnative.dev/docs/imagebackground#imageref
|
|
199
|
+
*/
|
|
200
|
+
imageRef?: Ref<Image>,
|
|
201
|
+
|}>;
|
|
@@ -100,7 +100,6 @@ export function reportLogBoxError(
|
|
|
100
100
|
): void {
|
|
101
101
|
const ExceptionsManager = require('../../Core/ExceptionsManager');
|
|
102
102
|
|
|
103
|
-
error.forceRedbox = true;
|
|
104
103
|
error.message = `${LOGBOX_ERROR_MESSAGE}\n\n${error.message}`;
|
|
105
104
|
if (componentStack != null) {
|
|
106
105
|
error.componentStack = componentStack;
|
|
@@ -320,40 +319,40 @@ export function checkWarningFilter(format: string): WarningInfo {
|
|
|
320
319
|
return warningFilter(format);
|
|
321
320
|
}
|
|
322
321
|
|
|
322
|
+
export function getIgnorePatterns(): $ReadOnlyArray<IgnorePattern> {
|
|
323
|
+
return Array.from(ignorePatterns);
|
|
324
|
+
}
|
|
325
|
+
|
|
323
326
|
export function addIgnorePatterns(
|
|
324
327
|
patterns: $ReadOnlyArray<IgnorePattern>,
|
|
325
328
|
): void {
|
|
329
|
+
const existingSize = ignorePatterns.size;
|
|
326
330
|
// The same pattern may be added multiple times, but adding a new pattern
|
|
327
331
|
// can be expensive so let's find only the ones that are new.
|
|
328
|
-
|
|
332
|
+
patterns.forEach((pattern: IgnorePattern) => {
|
|
329
333
|
if (pattern instanceof RegExp) {
|
|
330
|
-
for (const existingPattern of ignorePatterns
|
|
334
|
+
for (const existingPattern of ignorePatterns) {
|
|
331
335
|
if (
|
|
332
336
|
existingPattern instanceof RegExp &&
|
|
333
337
|
existingPattern.toString() === pattern.toString()
|
|
334
338
|
) {
|
|
335
|
-
return
|
|
339
|
+
return;
|
|
336
340
|
}
|
|
337
341
|
}
|
|
338
|
-
|
|
342
|
+
ignorePatterns.add(pattern);
|
|
339
343
|
}
|
|
340
|
-
|
|
344
|
+
ignorePatterns.add(pattern);
|
|
341
345
|
});
|
|
342
|
-
|
|
343
|
-
if (newPatterns.length === 0) {
|
|
346
|
+
if (ignorePatterns.size === existingSize) {
|
|
344
347
|
return;
|
|
345
348
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
logs = new Set(
|
|
354
|
-
Array.from(logs).filter(log => !isMessageIgnored(log.message.content)),
|
|
355
|
-
);
|
|
356
|
-
}
|
|
349
|
+
// We need to recheck all of the existing logs.
|
|
350
|
+
// This allows adding an ignore pattern anywhere in the codebase.
|
|
351
|
+
// Without this, if you ignore a pattern after the a log is created,
|
|
352
|
+
// then we would keep showing the log.
|
|
353
|
+
logs = new Set(
|
|
354
|
+
Array.from(logs).filter(log => !isMessageIgnored(log.message.content)),
|
|
355
|
+
);
|
|
357
356
|
handleUpdate();
|
|
358
357
|
}
|
|
359
358
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -44,7 +44,8 @@ export type PermissionType =
|
|
|
44
44
|
| 'android.permission.WRITE_EXTERNAL_STORAGE'
|
|
45
45
|
| 'android.permission.BLUETOOTH_CONNECT'
|
|
46
46
|
| 'android.permission.BLUETOOTH_SCAN'
|
|
47
|
-
| 'android.permission.BLUETOOTH_ADVERTISE'
|
|
47
|
+
| 'android.permission.BLUETOOTH_ADVERTISE'
|
|
48
|
+
| 'android.permission.ACCESS_MEDIA_LOCATION';
|
|
48
49
|
*/
|
|
49
50
|
|
|
50
51
|
export interface Spec extends TurboModule {
|
|
@@ -62,6 +62,7 @@ const PERMISSIONS = Object.freeze({
|
|
|
62
62
|
BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',
|
|
63
63
|
BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',
|
|
64
64
|
BLUETOOTH_ADVERTISE: 'android.permission.BLUETOOTH_ADVERTISE',
|
|
65
|
+
ACCESS_MEDIA_LOCATION: 'android.permission.ACCESS_MEDIA_LOCATION',
|
|
65
66
|
});
|
|
66
67
|
|
|
67
68
|
/**
|
|
@@ -75,6 +76,7 @@ class PermissionsAndroid {
|
|
|
75
76
|
ACCESS_BACKGROUND_LOCATION: string,
|
|
76
77
|
ACCESS_COARSE_LOCATION: string,
|
|
77
78
|
ACCESS_FINE_LOCATION: string,
|
|
79
|
+
ACCESS_MEDIA_LOCATION: string,
|
|
78
80
|
ADD_VOICEMAIL: string,
|
|
79
81
|
BLUETOOTH_ADVERTISE: string,
|
|
80
82
|
BLUETOOTH_CONNECT: string,
|
|
@@ -7,8 +7,9 @@ exports.PersonaCoin = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const react_native_1 = require("react-native");
|
|
9
9
|
const PersonaCoinPropTypes_1 = require("./PersonaCoinPropTypes");
|
|
10
|
-
const RCTPersonaCoin = react_native_1.requireNativeComponent('RCTPersonaCoin');
|
|
11
|
-
|
|
10
|
+
const RCTPersonaCoin = (0, react_native_1.requireNativeComponent)('RCTPersonaCoin');
|
|
11
|
+
const PersonaCoin = (props) => react_1.default.createElement(RCTPersonaCoin, { ...props });
|
|
12
|
+
exports.PersonaCoin = PersonaCoin;
|
|
12
13
|
exports.PersonaCoin.defaultProps = PersonaCoinPropTypes_1.PersonaCoinDefaultProps;
|
|
13
14
|
exports.PersonaCoin.displayName = 'PersonaCoin';
|
|
14
15
|
//# sourceMappingURL=PersonaCoin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonaCoin.js","sourceRoot":"","sources":["../../src/Libraries/PersonaCoin/PersonaCoin.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,kDAAyB;AAEzB,+CAAsD;AAEtD,iEAAiE;AAEjE,MAAM,cAAc,GAAG,qCAAsB,
|
|
1
|
+
{"version":3,"file":"PersonaCoin.js","sourceRoot":"","sources":["../../src/Libraries/PersonaCoin/PersonaCoin.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;AACb,kDAAyB;AAEzB,+CAAsD;AAEtD,iEAAiE;AAEjE,MAAM,cAAc,GAAG,IAAA,qCAAsB,EAAC,gBAAgB,CAAC,CAAC;AAEzD,MAAM,WAAW,GAA+C,CAAC,KAAwB,EAAE,EAAE,CAAC,8BAAC,cAAc,OAAK,KAAK,GAAI,CAAC;AAAtH,QAAA,WAAW,eAA2G;AACnI,mBAAW,CAAC,YAAY,GAAG,8CAAuB,CAAC;AACnD,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["'use strict';\nimport React from 'react'\n\nimport { requireNativeComponent } from 'react-native';\nimport { IPersonaCoinProps } from './PersonaCoinTypes';\nimport { PersonaCoinDefaultProps } from './PersonaCoinPropTypes';\n\nconst RCTPersonaCoin = requireNativeComponent('RCTPersonaCoin');\n\nexport const PersonaCoin: React.FunctionComponent<IPersonaCoinProps> = (props: IPersonaCoinProps) => <RCTPersonaCoin {...props} />;\nPersonaCoin.defaultProps = PersonaCoinDefaultProps;\nPersonaCoin.displayName = 'PersonaCoin';\n"]}
|
|
@@ -608,6 +608,19 @@ export default class Pressability {
|
|
|
608
608
|
* and stores the new state. Validates the transition as well.
|
|
609
609
|
*/
|
|
610
610
|
_receiveSignal(signal: TouchSignal, event: PressEvent): void {
|
|
611
|
+
// Especially on iOS, not all events have timestamps associated.
|
|
612
|
+
// For telemetry purposes, this doesn't matter too much, as long as *some* do.
|
|
613
|
+
// Since the native timestamp is integral for logging telemetry, just skip
|
|
614
|
+
// events if they don't have a timestamp attached.
|
|
615
|
+
if (event.nativeEvent.timestamp != null) {
|
|
616
|
+
PressabilityPerformanceEventEmitter.emitEvent(() => {
|
|
617
|
+
return {
|
|
618
|
+
signal,
|
|
619
|
+
nativeTimestamp: event.nativeEvent.timestamp,
|
|
620
|
+
};
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
|
|
611
624
|
const prevState = this._touchState;
|
|
612
625
|
const nextState = Transitions[prevState]?.[signal];
|
|
613
626
|
if (this._responderID == null && signal === 'RESPONDER_RELEASE') {
|
|
@@ -623,19 +636,6 @@ export default class Pressability {
|
|
|
623
636
|
: '<<host component>>',
|
|
624
637
|
);
|
|
625
638
|
if (prevState !== nextState) {
|
|
626
|
-
// Especially on iOS, not all events have timestamps associated.
|
|
627
|
-
// For telemetry purposes, this doesn't matter too much, as long as *some* do.
|
|
628
|
-
// Since the native timestamp is integral for logging telemetry, just skip
|
|
629
|
-
// events if they don't have a timestamp attached.
|
|
630
|
-
if (event.nativeEvent.timestamp != null) {
|
|
631
|
-
PressabilityPerformanceEventEmitter.emitEvent(() => {
|
|
632
|
-
return {
|
|
633
|
-
signal,
|
|
634
|
-
touchDelayMs: Date.now() - event.nativeEvent.timestamp,
|
|
635
|
-
};
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
|
|
639
639
|
this._performTransitionSideEffects(prevState, nextState, signal, event);
|
|
640
640
|
this._touchState = nextState;
|
|
641
641
|
}
|