@office-iss/react-native-win32 0.71.0 → 0.71.1

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 (79) hide show
  1. package/.flowconfig +1 -0
  2. package/CHANGELOG.json +16 -1
  3. package/CHANGELOG.md +12 -4
  4. package/Libraries/Components/Button/ButtonWin32.Props.d.ts +2 -2
  5. package/Libraries/Components/Button/ButtonWin32.d.ts +1 -1
  6. package/Libraries/Components/Button/ButtonWin32.js +6 -4
  7. package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
  8. package/Libraries/Components/Pressable/Pressable.win32.js +0 -1
  9. package/Libraries/Components/Text/TextWin32.Props.d.ts +3 -9
  10. package/Libraries/Components/Text/TextWin32.Props.js.map +1 -1
  11. package/Libraries/Components/Text/TextWin32.d.ts +1 -1
  12. package/Libraries/Components/Text/TextWin32.js.map +1 -1
  13. package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +9 -9
  14. package/Libraries/Components/TextInput/TextInput.win32.js +1150 -154
  15. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +4 -4
  16. package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
  17. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.d.ts +119 -16
  18. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +99 -24
  19. package/Libraries/Components/Touchable/TouchableWin32.Props.d.ts +2 -2
  20. package/Libraries/Components/Touchable/TouchableWin32.Props.js.map +1 -1
  21. package/Libraries/Components/Touchable/TouchableWin32.Types.d.ts +9 -9
  22. package/Libraries/Components/Touchable/TouchableWin32.js +5 -6
  23. package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
  24. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +29 -10
  25. package/Libraries/Components/View/Tests/ViewWin32Test.js +31 -51
  26. package/Libraries/Components/View/Tests/ViewWin32Test.js.map +1 -1
  27. package/Libraries/Components/View/ViewAccessibility.win32.d.ts +527 -0
  28. package/Libraries/Components/View/ViewAccessibility.win32.js +178 -0
  29. package/Libraries/Components/View/ViewPropTypes.win32.d.ts +372 -0
  30. package/Libraries/Components/View/ViewPropTypes.win32.js +23 -0
  31. package/Libraries/Components/View/ViewWin32.d.ts +30 -12
  32. package/Libraries/Components/View/ViewWin32.js +161 -71
  33. package/Libraries/Image/Image.win32.js +0 -1
  34. package/Libraries/Pressability/Pressability.win32.js +2 -2
  35. package/Libraries/Utilities/AcessibilityMapping.win32.js +156 -0
  36. package/Libraries/__tests__/ButtonWin32-test.js +1 -1
  37. package/Libraries/platform-types.d.ts +7 -13
  38. package/index.win32.js +1 -1
  39. package/jest.config.js +2 -4
  40. package/overrides.json +38 -8
  41. package/package.json +5 -5
  42. package/src/Libraries/Components/Button/ButtonWin32.tsx +8 -8
  43. package/src/Libraries/Components/Text/TextWin32.Props.ts +2 -15
  44. package/src/Libraries/Components/Text/TextWin32.tsx +6 -2
  45. package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +5 -5
  46. package/src/Libraries/Components/Touchable/TouchableNativeFeedback.win32.d.ts +119 -0
  47. package/src/Libraries/Components/Touchable/TouchableWin32.Props.tsx +1 -1
  48. package/src/Libraries/Components/Touchable/TouchableWin32.tsx +6 -7
  49. package/src/Libraries/Components/View/Tests/ViewWin32Test.tsx +28 -52
  50. package/src/Libraries/Components/View/ViewAccessibility.win32.d.ts +527 -0
  51. package/src/Libraries/Components/View/ViewPropTypes.win32.d.ts +372 -0
  52. package/src/Libraries/Components/View/ViewWin32.d.ts +30 -0
  53. package/src/Libraries/platform-types.d.ts +7 -13
  54. package/types/modules/BatchedBridge.d.ts +32 -0
  55. package/types/modules/Codegen.d.ts +74 -0
  56. package/types/modules/Devtools.d.ts +31 -0
  57. package/types/modules/LaunchScreen.d.ts +18 -0
  58. package/types/modules/globals.d.ts +577 -0
  59. package/types/private/TimerMixin.d.ts +19 -0
  60. package/types/private/Utilities.d.ts +10 -0
  61. package/types/public/DeprecatedPropertiesAlias.d.ts +205 -0
  62. package/types/public/Insets.d.ts +15 -0
  63. package/types/public/ReactNativeRenderer.d.ts +149 -0
  64. package/types/public/ReactNativeTypes.d.ts +143 -0
  65. package/Libraries/Components/TextInput/TextInput.win32.d.ts +0 -68
  66. package/Libraries/Components/TextInput/TextInput.win32.js.map +0 -1
  67. package/Libraries/Components/Touchable/TouchableNativeFeedback.Props.d.ts +0 -7
  68. package/Libraries/Components/Touchable/TouchableNativeFeedback.Props.js +0 -3
  69. package/Libraries/Components/Touchable/TouchableNativeFeedback.Props.js.map +0 -1
  70. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js.map +0 -1
  71. package/Libraries/Components/View/ViewWin32.Props.d.ts +0 -174
  72. package/Libraries/Components/View/ViewWin32.Props.js +0 -11
  73. package/Libraries/Components/View/ViewWin32.Props.js.map +0 -1
  74. package/Libraries/Components/View/ViewWin32.js.map +0 -1
  75. package/src/Libraries/Components/TextInput/TextInput.win32.tsx +0 -217
  76. package/src/Libraries/Components/Touchable/TouchableNativeFeedback.Props.ts +0 -9
  77. package/src/Libraries/Components/Touchable/TouchableNativeFeedback.win32.tsx +0 -27
  78. package/src/Libraries/Components/View/ViewWin32.Props.ts +0 -281
  79. package/src/Libraries/Components/View/ViewWin32.tsx +0 -119
package/.flowconfig CHANGED
@@ -16,6 +16,7 @@
16
16
  <PROJECT_ROOT>/Libraries/Components/TextInput/TextInputState.js
17
17
  <PROJECT_ROOT>/Libraries/Components/Touchable/Touchable.js
18
18
  <PROJECT_ROOT>/Libraries/Components/Touchable/TouchableNativeFeedback.js
19
+ <PROJECT_ROOT>/Libraries/Components/View/ViewAccessibility.js
19
20
  <PROJECT_ROOT>/Libraries/Components/View/ReactNativeViewAttributes.js
20
21
  <PROJECT_ROOT>/Libraries/Components/View/View.js
21
22
  <PROJECT_ROOT>/Libraries/Components/View/ViewPropTypes.js
package/CHANGELOG.json CHANGED
@@ -2,7 +2,22 @@
2
2
  "name": "@office-iss/react-native-win32",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 23 Jan 2023 16:16:17 GMT",
5
+ "date": "Mon, 13 Feb 2023 16:15:12 GMT",
6
+ "tag": "@office-iss/react-native-win32_v0.71.1",
7
+ "version": "0.71.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "30809111+acoates-ms@users.noreply.github.com",
12
+ "package": "@office-iss/react-native-win32",
13
+ "commit": "b887e15ce901cc1fc026cf3a878e6b0d0a3f5873",
14
+ "comment": "Fix react-native-win32 typescript definitions"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Mon, 23 Jan 2023 16:16:57 GMT",
6
21
  "tag": "@office-iss/react-native-win32_v0.71.0",
7
22
  "version": "0.71.0",
8
23
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,17 +1,25 @@
1
1
  # Change Log - @office-iss/react-native-win32
2
2
 
3
- This log was last generated on Mon, 23 Jan 2023 16:16:17 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 13 Feb 2023 16:15:12 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.71.0
7
+ ## 0.71.1
8
8
 
9
- Mon, 23 Jan 2023 16:16:17 GMT
9
+ Mon, 13 Feb 2023 16:15:12 GMT
10
10
 
11
11
  ### Patches
12
12
 
13
- - Promote 0.71 to latest (34109996+chiaramooney@users.noreply.github.com)
13
+ - Fix react-native-win32 typescript definitions (30809111+acoates-ms@users.noreply.github.com)
14
14
 
15
+ ## 0.71.0
16
+
17
+ Mon, 23 Jan 2023 16:16:57 GMT
18
+
19
+ ### Patches
20
+
21
+ - Promote 0.71 to latest (34109996+chiaramooney@users.noreply.github.com)
22
+
15
23
  ## 0.71.0-preview.2
16
24
 
17
25
  Mon, 19 Dec 2022 16:14:52 GMT
@@ -1,6 +1,6 @@
1
1
  import RN = require('react-native');
2
- declare type Omit<T, K> = Pick<T, Exclude<keyof T, keyof K>>;
3
- export declare type ButtonWin32OmitStyles = RN.TextStyleIOS & RN.TextStyleAndroid;
2
+ type Omit<T, K> = Pick<T, Exclude<keyof T, keyof K>>;
3
+ export type ButtonWin32OmitStyles = RN.TextStyleIOS & RN.TextStyleAndroid;
4
4
  export interface IButtonWin32Style extends Omit<RN.TextStyle, ButtonWin32OmitStyles> {
5
5
  }
6
6
  export interface IButtonWin32Props extends RN.ButtonProps {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import RN = require('react-native');
3
- import { IButtonWin32Props } from './ButtonWin32.Props';
3
+ import type { IButtonWin32Props } from './ButtonWin32.Props';
4
4
  interface IButtonWin32State {
5
5
  accessibilityState: RN.AccessibilityState;
6
6
  }
@@ -5,8 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ButtonWin32 = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
- const ViewWin32_1 = require("../View/ViewWin32");
9
- const TextWin32_1 = require("../Text/TextWin32");
8
+ const RN = require("react-native");
10
9
  var SelectState;
11
10
  (function (SelectState) {
12
11
  SelectState[SelectState["NotSelected"] = 0] = "NotSelected";
@@ -65,6 +64,7 @@ class ButtonWin32 extends react_1.default.Component {
65
64
  onBlur: this._onBlur,
66
65
  onMouseEnter: this.props.onMouseEnter,
67
66
  onMouseLeave: this.props.onMouseLeave,
67
+ // @ts-ignore
68
68
  onTouchStart: this.props.onTouchStart,
69
69
  onTouchEnd: this._onTouchEnd,
70
70
  testID: this.props.testID,
@@ -76,8 +76,10 @@ class ButtonWin32 extends react_1.default.Component {
76
76
  if (this.props.color) {
77
77
  textProps.style = { color: this.props.color };
78
78
  }
79
- return (react_1.default.createElement(ViewWin32_1.ViewWin32, { ...viewProps },
80
- react_1.default.createElement(TextWin32_1.TextWin32, { ...textProps }, this.props.title)));
79
+ return (
80
+ // @ts-ignore
81
+ react_1.default.createElement(RN.ViewWin32, { ...viewProps },
82
+ react_1.default.createElement(RN.TextWin32, { ...textProps }, this.props.title)));
81
83
  }
82
84
  }
83
85
  exports.ButtonWin32 = ButtonWin32;
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Button/ButtonWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,iDAA8C;AAE9C,iDAA8C;AAI9C,IAAW,WAGV;AAHD,WAAW,WAAW;IACpB,2DAAW,CAAA;IACX,qDAAQ,CAAA;AACV,CAAC,EAHU,WAAW,KAAX,WAAW,QAGrB;AAMD;;GAEG;AACH,MAAa,WAAY,SAAQ,eAAK,CAAC,SAA+C;IACpF,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAmCE,eAAU,GAAG,CAAC,MAAmB,EAAqB,EAAE;YACvE,OAAO;gBACL,kBAAkB,EAAE;oBAClB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;oBAC7B,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC,QAAQ;iBAC1C;aACF,CAAC;QACJ,CAAC,CAAC;QAEe,cAAS,GAAG,CAAC,MAAmB,EAAQ,EAAE;YACzD,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC;QAEe,aAAQ,GAAG,GAAS,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;YACrC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;gBACtB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;aACtB;QACH,CAAC,CAAC;QAEe,YAAO,GAAG,GAAS,EAAE;YACpC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;YACxC,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACrB,IAAI,CAAC,KAAK,CAAC,MAAM,EA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KAAK,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;SAC/C;QAED,OAAO,CACL,8BAAC,qBAAS,OAAK,SAAS;YACtB,8BAAC,qBAAS,OAAK,SAAS,IAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAa,CAC9C,CACb,CAAC;IACJ,CAAC;CAwCF;AA3ED,kCA2EC","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport { ViewWin32 } from '../View/ViewWin32';\nimport { IViewWin32Props } from '../View/ViewWin32.Props';\nimport { TextWin32 } from '../Text/TextWin32';\nimport { ITextWin32Props } from '../Text/TextWin32.Props';\nimport { IButtonWin32Props } from './ButtonWin32.Props';\n\nconst enum SelectState {\n NotSelected,\n Selected\n}\n\ninterface IButtonWin32State {\n accessibilityState: RN.AccessibilityState;\n}\n\n/**\n * React-native <Button> control with additional Win32-specific functionality.\n */\nexport class ButtonWin32 extends React.Component<IButtonWin32Props, IButtonWin32State> {\n constructor(props: IButtonWin32Props) {\n super(props);\n this.state = this._makeState(SelectState.NotSelected);\n }\n\n public render() {\n const viewProps: IViewWin32Props = {\n accessible: true,\n accessibilityLabel: this.props.accessibilityLabel || this.props.title,\n accessibilityRole: 'button',\n accessibilityState: this.state.accessibilityState,\n focusable: true,\n onFocus: this._onFocus,\n onBlur: this._onBlur,\n onMouseEnter: this.props.onMouseEnter,\n onMouseLeave: this.props.onMouseLeave,\n onTouchStart: this.props.onTouchStart,\n onTouchEnd: this._onTouchEnd,\n testID: this.props.testID,\n style: this.props.style as RN.StyleProp<RN.ViewStyle>,\n };\n\n const textProps: ITextWin32Props = {\n textStyle: 'None',\n };\n if (this.props.color) {\n textProps.style = { color: this.props.color };\n }\n\n return (\n <ViewWin32 {...viewProps}>\n <TextWin32 {...textProps}>{this.props.title}</TextWin32>\n </ViewWin32>\n );\n }\n\n private readonly _makeState = (select: SelectState): IButtonWin32State => {\n return {\n accessibilityState: {\n disabled: this.props.disabled,\n selected: select === SelectState.Selected,\n },\n };\n };\n\n private readonly _setState = (select: SelectState): void => {\n const state = this._makeState(select);\n this.setState(state);\n };\n\n private readonly _onFocus = (): void => {\n this._setState(SelectState.Selected);\n if (this.props.onFocus) {\n this.props.onFocus();\n }\n };\n\n private readonly _onBlur = (): void => {\n this._setState(SelectState.NotSelected);\n if (this.props.onBlur) {\n this.props.onBlur();\n }\n };\n\n private readonly _onTouchEnd = (event: RN.GestureResponderEvent): void => {\n if (!this.props.disabled) {\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n if (this.props.onTouchEnd) {\n this.props.onTouchEnd(event);\n }\n };\n}\n"]}
1
+ {"version":3,"file":"ButtonWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Button/ButtonWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAAoC;AAKpC,IAAW,WAGV;AAHD,WAAW,WAAW;IACpB,2DAAW,CAAA;IACX,qDAAQ,CAAA;AACV,CAAC,EAHU,WAAW,KAAX,WAAW,QAGrB;AAMD;;GAEG;AACH,MAAa,WAAY,SAAQ,eAAK,CAAC,SAA+C;IACpF,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QAqCE,eAAU,GAAG,CAAC,MAAmB,EAAqB,EAAE;YACvE,OAAO;gBACL,kBAAkB,EAAE;oBAClB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;oBAC7B,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC,QAAQ;iBAC1C;aACF,CAAC;QACJ,CAAC,CAAC;QAEe,cAAS,GAAG,CAAC,MAAmB,EAAQ,EAAE;YACzD,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC;QAEe,aAAQ,GAAG,GAAS,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ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a;YACb,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY;YACrC,UAAU,EAAE,IAAI,CAAC,WAAW;YAC5B,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;YACzB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAmC;SACtD,CAAC;QAEF,MAAM,SAAS,GAAoB;YACjC,SAAS,EAAE,MAAM;SAClB,CAAC;QACF,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;YACpB,SAAS,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;SAC/C;QAED,OAAO;QACL,aAAa;QACb,8BAAC,EAAE,CAAC,SAAS,OAAK,SAAS;YACzB,8BAAC,EAAE,CAAC,SAAS,OAAK,SAAS,IAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAgB,CACjD,CAChB,CAAC;IACJ,CAAC;CAwCF;AA7ED,kCA6EC","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport type { IViewWin32Props } from '../View/ViewPropTypes.win32';\nimport type { ITextWin32Props } from '../Text/TextWin32.Props';\nimport type { IButtonWin32Props } from './ButtonWin32.Props';\n\nconst enum SelectState {\n NotSelected,\n Selected\n}\n\ninterface IButtonWin32State {\n accessibilityState: RN.AccessibilityState;\n}\n\n/**\n * React-native <Button> control with additional Win32-specific functionality.\n */\nexport class ButtonWin32 extends React.Component<IButtonWin32Props, IButtonWin32State> {\n constructor(props: IButtonWin32Props) {\n super(props);\n this.state = this._makeState(SelectState.NotSelected);\n }\n\n public render() {\n const viewProps: IViewWin32Props = {\n accessible: true,\n accessibilityLabel: this.props.accessibilityLabel || this.props.title,\n accessibilityRole: 'button',\n accessibilityState: this.state.accessibilityState,\n focusable: true,\n onFocus: this._onFocus,\n onBlur: this._onBlur,\n onMouseEnter: this.props.onMouseEnter,\n onMouseLeave: this.props.onMouseLeave,\n // @ts-ignore\n onTouchStart: this.props.onTouchStart,\n onTouchEnd: this._onTouchEnd,\n testID: this.props.testID,\n style: this.props.style as RN.StyleProp<RN.ViewStyle>,\n };\n\n const textProps: ITextWin32Props = {\n textStyle: 'None',\n };\n if (this.props.color) {\n textProps.style = { color: this.props.color };\n }\n\n return (\n // @ts-ignore\n <RN.ViewWin32 {...viewProps}>\n <RN.TextWin32 {...textProps}>{this.props.title}</RN.TextWin32>\n </RN.ViewWin32>\n );\n }\n\n private readonly _makeState = (select: SelectState): IButtonWin32State => {\n return {\n accessibilityState: {\n disabled: this.props.disabled,\n selected: select === SelectState.Selected,\n },\n };\n };\n\n private readonly _setState = (select: SelectState): void => {\n const state = this._makeState(select);\n this.setState(state);\n };\n\n private readonly _onFocus = (): void => {\n this._setState(SelectState.Selected);\n if (this.props.onFocus) {\n this.props.onFocus();\n }\n };\n\n private readonly _onBlur = (): void => {\n this._setState(SelectState.NotSelected);\n if (this.props.onBlur) {\n this.props.onBlur();\n }\n };\n\n private readonly _onTouchEnd = (event: RN.GestureResponderEvent): void => {\n if (!this.props.disabled) {\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n if (this.props.onTouchEnd) {\n this.props.onTouchEnd(event);\n }\n };\n}\n"]}
@@ -35,7 +35,6 @@ import * as React from 'react';
35
35
  import {useImperativeHandle, useMemo, useRef, useState} from 'react';
36
36
  import type {HandledKeyboardEvent} from '../../Components/View/ViewPropTypes';
37
37
  import View from '../View/View';
38
- import TextInputState from '../TextInput/TextInputState';
39
38
 
40
39
  type ViewStyleProp = $ElementType<React.ElementConfig<typeof View>, 'style'>;
41
40
 
@@ -1,15 +1,10 @@
1
1
  import RN = require('react-native');
2
- import { SharedAccessibilityPropsIOSandWin32, OmittedAccessibilityPropsWin32, BasePropsWin32, IKeyboardEvent, IHandledKeyboardEvent } from '../View/ViewWin32.Props';
3
- declare type Omit<T, K> = Pick<T, Exclude<keyof T, keyof K>>;
4
- export declare type TextWin32OmitTypes = Omit<RN.TextPropsAndroid, SharedTextPropsAndroidandWin32> & RN.TextPropsIOS & RN.AccessibilityPropsAndroid & Omit<RN.AccessibilityPropsIOS, SharedAccessibilityPropsIOSandWin32> & OmittedAccessibilityPropsWin32;
5
- export declare type SharedTextPropsAndroidandWin32 = {
6
- selectable?: boolean;
7
- };
2
+ import type { IKeyboardEvent, IHandledKeyboardEvent } from '../View/ViewPropTypes.win32';
8
3
  /**
9
4
  * Role-based text style names.
10
5
  */
11
- export declare type TextWin32TextStyle = 'None' | 'SmallStandard' | 'SmallSecondary' | 'MediumStandard' | 'MediumSecondary' | 'MediumApp' | 'MediumBold' | 'MediumBoldApp' | 'LargeStandard' | 'LargePlusStandard' | 'ExtraLargeStandard' | 'HugeStandard';
12
- export interface ITextWin32Props extends Omit<RN.TextProps, TextWin32OmitTypes>, BasePropsWin32 {
6
+ export type TextWin32TextStyle = 'None' | 'SmallStandard' | 'SmallSecondary' | 'MediumStandard' | 'MediumSecondary' | 'MediumApp' | 'MediumBold' | 'MediumBoldApp' | 'LargeStandard' | 'LargePlusStandard' | 'ExtraLargeStandard' | 'HugeStandard';
7
+ export interface ITextWin32Props extends RN.TextProps {
13
8
  onKeyDown?: (args: IKeyboardEvent) => void;
14
9
  onKeyDownCapture?: (args: IKeyboardEvent) => void;
15
10
  onKeyUp?: (args: IKeyboardEvent) => void;
@@ -66,4 +61,3 @@ export interface ITextWin32Props extends Omit<RN.TextProps, TextWin32OmitTypes>,
66
61
  /** Tooltip displayed on mouse hover of this element */
67
62
  tooltip?: string;
68
63
  }
69
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TextWin32.Props.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.Props.ts"],"names":[],"mappings":"","sourcesContent":["import RN = require('react-native');\nimport { SharedAccessibilityPropsIOSandWin32, OmittedAccessibilityPropsWin32, BasePropsWin32, IKeyboardEvent, IHandledKeyboardEvent } from '../View/ViewWin32.Props';\n\n// removes from interface T the members of interface K\ntype Omit<T, K> = Pick<T, Exclude<keyof T, keyof K>>;\n\nexport type TextWin32OmitTypes = Omit<RN.TextPropsAndroid, SharedTextPropsAndroidandWin32> &\n RN.TextPropsIOS &\n RN.AccessibilityPropsAndroid &\n Omit<RN.AccessibilityPropsIOS, SharedAccessibilityPropsIOSandWin32> &\n OmittedAccessibilityPropsWin32;\n\nexport type SharedTextPropsAndroidandWin32 = {\n selectable?: boolean;\n};\n\n/**\n * Role-based text style names.\n */\nexport type TextWin32TextStyle =\n | 'None'\n | 'SmallStandard'\n | 'SmallSecondary'\n | 'MediumStandard'\n | 'MediumSecondary'\n | 'MediumApp'\n | 'MediumBold'\n | 'MediumBoldApp'\n | 'LargeStandard'\n | 'LargePlusStandard'\n | 'ExtraLargeStandard'\n | 'HugeStandard';\n\nexport interface ITextWin32Props extends Omit<RN.TextProps, TextWin32OmitTypes>, BasePropsWin32 {\n onKeyDown?: (args: IKeyboardEvent) => void;\n onKeyDownCapture?: (args: IKeyboardEvent) => void;\n onKeyUp?: (args: IKeyboardEvent) => void;\n onKeyUpCapture?: (args: IKeyboardEvent) => void;\n\n keyDownEvents?: IHandledKeyboardEvent[];\n keyUpEvents?: IHandledKeyboardEvent[];\n\n /** Enables a focusable label with copyability but without character selectability (property:selectable) */\n focusable?: 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 /**\n * Role-based styling of the text control. The styles applied include\n * font face, size, weight and color. These styles take precedence over\n * the `style` property.\n *\n * @remarks\n * The default value is `MediumStandard`.\n *\n * When set to `None`, role-based styling is disabled.\n *\n * @deprecated Use `style` instead.\n */\n textStyle?: TextWin32TextStyle;\n\n /** Tooltip displayed on mouse hover of this element */\n tooltip?: string;\n}\n"]}
1
+ {"version":3,"file":"TextWin32.Props.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.Props.ts"],"names":[],"mappings":"","sourcesContent":["import RN = require('react-native');\nimport type { IKeyboardEvent, IHandledKeyboardEvent } from '../View/ViewPropTypes.win32';\n\n/**\n * Role-based text style names.\n */\nexport type TextWin32TextStyle =\n | 'None'\n | 'SmallStandard'\n | 'SmallSecondary'\n | 'MediumStandard'\n | 'MediumSecondary'\n | 'MediumApp'\n | 'MediumBold'\n | 'MediumBoldApp'\n | 'LargeStandard'\n | 'LargePlusStandard'\n | 'ExtraLargeStandard'\n | 'HugeStandard';\n\nexport interface ITextWin32Props extends RN.TextProps {\n onKeyDown?: (args: IKeyboardEvent) => void;\n onKeyDownCapture?: (args: IKeyboardEvent) => void;\n onKeyUp?: (args: IKeyboardEvent) => void;\n onKeyUpCapture?: (args: IKeyboardEvent) => void;\n\n keyDownEvents?: IHandledKeyboardEvent[];\n keyUpEvents?: IHandledKeyboardEvent[];\n\n /** Enables a focusable label with copyability but without character selectability (property:selectable) */\n focusable?: 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 /**\n * Role-based styling of the text control. The styles applied include\n * font face, size, weight and color. These styles take precedence over\n * the `style` property.\n *\n * @remarks\n * The default value is `MediumStandard`.\n *\n * When set to `None`, role-based styling is disabled.\n *\n * @deprecated Use `style` instead.\n */\n textStyle?: TextWin32TextStyle;\n\n /** Tooltip displayed on mouse hover of this element */\n tooltip?: string;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ITextWin32Props } from './TextWin32.Props';
2
+ import type { ITextWin32Props } from './TextWin32.Props';
3
3
  export declare class TextWin32 extends React.Component<ITextWin32Props, {}> {
4
4
  constructor(props: ITextWin32Props);
5
5
  render(): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"TextWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAAoC;AAWpC,MAAa,SAAU,SAAQ,eAAK,CAAC,SAA8B;IACjE,YAAY,KAAsB;QAChC,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEM,MAAM;QACX,OAAO,8BAAC,EAAE,CAAC,IAAI,OAAM,IAAI,CAAC,KAAwB,GAAI,CAAC;IACzD,CAAC;CACF;AARD,8BAQC","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport { ITextWin32Props } from './TextWin32.Props';\nimport { UseFrom } from '../View/ViewWin32.Props';\n\n/**\n * React-native <Text> control with additional Win32-specific functionality.\n */\n\ntype InnerViewProps = UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityRole'> &\n UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityState'> &\n UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityActions'>;\nexport class TextWin32 extends React.Component<ITextWin32Props, {}> {\n constructor(props: ITextWin32Props) {\n super(props);\n }\n\n public render() {\n return <RN.Text {...(this.props as InnerViewProps)} />;\n }\n}\n"]}
1
+ {"version":3,"file":"TextWin32.js","sourceRoot":"","sources":["../../../src/Libraries/Components/Text/TextWin32.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAAoC;AAepC,MAAa,SAAU,SAAQ,eAAK,CAAC,SAA8B;IACjE,YAAY,KAAsB;QAChC,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEM,MAAM;QACX,OAAO,8BAAC,EAAE,CAAC,IAAI,OAAM,IAAI,CAAC,KAAwB,GAAI,CAAC;IACzD,CAAC;CACF;AARD,8BAQC","sourcesContent":["import React from 'react'\nimport RN = require('react-native');\nimport type { ITextWin32Props } from './TextWin32.Props';\n\n/**\n * All of TOrigin except Key from TUse\n */\ntype UseFrom<TOrigin, TUse, Key extends keyof TUse> = Pick<TOrigin, Exclude<keyof TOrigin, Key>> & Pick<TUse, Key>;\n\n/**\n * React-native <Text> control with additional Win32-specific functionality.\n */\n\ntype InnerViewProps = UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityRole'> &\n UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityState'> &\n UseFrom<ITextWin32Props, RN.TextProps, 'accessibilityActions'>;\nexport class TextWin32 extends React.Component<ITextWin32Props, {}> {\n constructor(props: ITextWin32Props) {\n super(props);\n }\n\n public render() {\n return <RN.Text {...(this.props as InnerViewProps)} />;\n }\n}\n"]}
@@ -4,7 +4,7 @@ interface IChangePayload {
4
4
  target: number;
5
5
  text: string;
6
6
  }
7
- export declare type IChangeEvent = NativeSyntheticEvent<Readonly<IChangePayload>>;
7
+ export type IChangeEvent = NativeSyntheticEvent<Readonly<IChangePayload>>;
8
8
  interface IRange {
9
9
  start: number;
10
10
  end: number;
@@ -16,7 +16,7 @@ interface ITextInputPayload {
16
16
  target: number;
17
17
  text: number;
18
18
  }
19
- export declare type ITextInputevent = NativeSyntheticEvent<Readonly<ITextInputPayload>>;
19
+ export type ITextInputevent = NativeSyntheticEvent<Readonly<ITextInputPayload>>;
20
20
  interface IContentSize {
21
21
  width: number;
22
22
  height: number;
@@ -25,27 +25,27 @@ interface IContentSizeChangePayload {
25
25
  target: number;
26
26
  contentSize: Readonly<IContentSize>;
27
27
  }
28
- export declare type IContentSizeChangeEvent = NativeSyntheticEvent<Readonly<IContentSizeChangePayload>>;
29
- export declare type IBlurEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
30
- export declare type IFocusEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
28
+ export type IContentSizeChangeEvent = NativeSyntheticEvent<Readonly<IContentSizeChangePayload>>;
29
+ export type IBlurEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
30
+ export type IFocusEvent = NativeSyntheticEvent<Readonly<TextInputFocusEventData>>;
31
31
  export interface ISelection extends IRange {
32
32
  }
33
33
  interface ISelectionPayload {
34
34
  selection: ISelection;
35
35
  target: number;
36
36
  }
37
- export declare type ISelectionChangeEvent = NativeSyntheticEvent<Readonly<ISelectionPayload>>;
37
+ export type ISelectionChangeEvent = NativeSyntheticEvent<Readonly<ISelectionPayload>>;
38
38
  interface IKeyPressPayload {
39
39
  key: string;
40
40
  target?: number;
41
41
  eventCount?: number;
42
42
  }
43
- export declare type IKeyPressEvent = NativeSyntheticEvent<Readonly<IKeyPressPayload>>;
43
+ export type IKeyPressEvent = NativeSyntheticEvent<Readonly<IKeyPressPayload>>;
44
44
  interface IEditingPayload {
45
45
  eventCount: number;
46
46
  text: string;
47
47
  target: number;
48
48
  }
49
- export declare type IEditingEvent = NativeSyntheticEvent<Readonly<IEditingPayload>>;
50
- export declare type IPasswordRules = string;
49
+ export type IEditingEvent = NativeSyntheticEvent<Readonly<IEditingPayload>>;
50
+ export type IPasswordRules = string;
51
51
  export {};