@fluentui-react-native/focus-zone 0.21.0 → 0.21.2
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/CHANGELOG.json +66 -1
- package/CHANGELOG.md +18 -2
- package/eslint.config.js +3 -0
- package/lib/FocusZone.js +14 -31
- package/lib/FocusZone.js.map +1 -1
- package/lib/FocusZone.types.js +1 -1
- package/lib/FocusZone.types.js.map +1 -1
- package/lib/__tests__/FocusZone.test.js +23 -23
- package/lib/__tests__/FocusZone.test.js.map +1 -1
- package/lib-commonjs/FocusZone.js +19 -36
- package/lib-commonjs/FocusZone.js.map +1 -1
- package/lib-commonjs/FocusZoneNativeComponent.js +1 -13
- package/lib-commonjs/FocusZoneNativeComponent.js.map +1 -1
- package/lib-commonjs/__tests__/FocusZone.test.js +27 -27
- package/lib-commonjs/__tests__/FocusZone.test.js.map +1 -1
- package/package.json +35 -16
- package/.eslintrc.js +0 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,72 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/focus-zone",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 10 Jul 2025 20:30:38 GMT",
|
|
6
|
+
"version": "0.21.2",
|
|
7
|
+
"tag": "@fluentui-react-native/focus-zone_v0.21.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"author": "jasonmo@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
13
|
+
"commit": "54087dca787180bbf34630470cd0d06e88366b30",
|
|
14
|
+
"comment": "update eslint to 9.x and use new flat config format with security rules"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "ruaraki@microsoft.com",
|
|
18
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
19
|
+
"commit": "a245202877ef7f2be9ab5f0e1356b2270957e693",
|
|
20
|
+
"comment": "Run bump-versions"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "4123478+tido64@users.noreply.github.com",
|
|
24
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
25
|
+
"commit": "79bb06f6bbfd0a36f9d2ef371f4857be9660f027",
|
|
26
|
+
"comment": "Fixed `align-deps` warnings"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"patch": [
|
|
30
|
+
{
|
|
31
|
+
"author": "jasonmo@microsoft.com",
|
|
32
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
33
|
+
"commit": "479b93cea460a26df70c55b5d3335927ed374713",
|
|
34
|
+
"comment": "update builds to use node16 settings and modern export maps"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"date": "Thu, 10 Jul 2025 19:20:22 GMT",
|
|
41
|
+
"version": "0.21.1",
|
|
42
|
+
"tag": "@fluentui-react-native/focus-zone_v0.21.1",
|
|
43
|
+
"comments": {
|
|
44
|
+
"patch": [
|
|
45
|
+
{
|
|
46
|
+
"author": "4123478+tido64@users.noreply.github.com",
|
|
47
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
48
|
+
"commit": "24b9abab3370f008afd2dbb304751fc9af6bec4a",
|
|
49
|
+
"comment": "Add support for React Native 0.74"
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"date": "Wed, 11 Jun 2025 19:34:54 GMT",
|
|
56
|
+
"version": "0.21.0",
|
|
57
|
+
"tag": "@fluentui-react-native/focus-zone_v0.21.0",
|
|
58
|
+
"comments": {
|
|
59
|
+
"none": [
|
|
60
|
+
{
|
|
61
|
+
"author": "4123478+tido64@users.noreply.github.com",
|
|
62
|
+
"package": "@fluentui-react-native/focus-zone",
|
|
63
|
+
"commit": "2342b87a20e5a584bd2073c8c5a266f0aa48c8bb",
|
|
64
|
+
"comment": "Added missing dev dependencies"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"date": "Mon, 10 Mar 2025 18:14:09 GMT",
|
|
6
71
|
"version": "0.21.0",
|
|
7
72
|
"tag": "@fluentui-react-native/focus-zone_v0.21.0",
|
|
8
73
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/focus-zone
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Thu, 10 Jul 2025 20:30:38 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.21.2
|
|
8
|
+
|
|
9
|
+
Thu, 10 Jul 2025 20:30:38 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- update builds to use node16 settings and modern export maps (jasonmo@microsoft.com)
|
|
14
|
+
|
|
15
|
+
## 0.21.1
|
|
16
|
+
|
|
17
|
+
Thu, 10 Jul 2025 19:20:22 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Add support for React Native 0.74 (4123478+tido64@users.noreply.github.com)
|
|
22
|
+
|
|
7
23
|
## 0.21.0
|
|
8
24
|
|
|
9
|
-
Mon, 10 Mar 2025 18:
|
|
25
|
+
Mon, 10 Mar 2025 18:14:09 GMT
|
|
10
26
|
|
|
11
27
|
### Minor changes
|
|
12
28
|
|
package/eslint.config.js
ADDED
package/lib/FocusZone.js
CHANGED
|
@@ -3,45 +3,23 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
* @format
|
|
5
5
|
*/
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
18
|
-
var t = {};
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
22
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
23
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
24
|
-
t[p[i]] = s[p[i]];
|
|
25
|
-
}
|
|
26
|
-
return t;
|
|
27
|
-
};
|
|
28
6
|
import * as React from 'react';
|
|
29
7
|
import { findNodeHandle } from 'react-native';
|
|
30
8
|
import { useViewCommandFocus } from '@fluentui-react-native/interactive-hooks';
|
|
31
9
|
import { composable } from '@uifabricshared/foundation-composable';
|
|
32
10
|
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
33
11
|
import RCTFocusZone from './FocusZoneNativeComponent';
|
|
34
|
-
|
|
35
|
-
export
|
|
36
|
-
usePrepareProps:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
React.useLayoutEffect(
|
|
12
|
+
const filterOutComponentRef = (propName) => propName !== 'componentRef';
|
|
13
|
+
export const FocusZone = composable({
|
|
14
|
+
usePrepareProps: (userProps, useStyling) => {
|
|
15
|
+
const { componentRef, defaultTabbableElement, isCircularNavigation, ...rest } = userProps;
|
|
16
|
+
const ftzRef = useViewCommandFocus(componentRef);
|
|
17
|
+
const [targetFirstFocus, setTargetFirstFocus] = React.useState(undefined);
|
|
18
|
+
React.useLayoutEffect(() => {
|
|
41
19
|
if (typeof defaultTabbableElement === 'string') {
|
|
42
20
|
setTargetFirstFocus(defaultTabbableElement);
|
|
43
21
|
}
|
|
44
|
-
else if (defaultTabbableElement
|
|
22
|
+
else if (defaultTabbableElement?.current) {
|
|
45
23
|
setTargetFirstFocus(findNodeHandle(defaultTabbableElement.current));
|
|
46
24
|
}
|
|
47
25
|
else {
|
|
@@ -50,7 +28,12 @@ export var FocusZone = composable({
|
|
|
50
28
|
}, [defaultTabbableElement]);
|
|
51
29
|
return {
|
|
52
30
|
slotProps: mergeSettings(useStyling(userProps), {
|
|
53
|
-
root:
|
|
31
|
+
root: {
|
|
32
|
+
navigateAtEnd: isCircularNavigation ? 'NavigateWrap' : 'NavigateStopAtEnds',
|
|
33
|
+
...rest,
|
|
34
|
+
defaultTabbableElement: targetFirstFocus,
|
|
35
|
+
ref: ftzRef,
|
|
36
|
+
},
|
|
54
37
|
}),
|
|
55
38
|
};
|
|
56
39
|
},
|
package/lib/FocusZone.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusZone.js","sourceRoot":"","sources":["../src/FocusZone.ts"],"names":[],"mappings":"AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"FocusZone.js","sourceRoot":"","sources":["../src/FocusZone.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAGpE,OAAO,YAAY,MAAM,4BAA4B,CAAC;AAEtD,MAAM,qBAAqB,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,cAAc,CAAC;AAExE,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAgB;IACjD,eAAe,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{"version":3,"file":"FocusZone.types.js","sourceRoot":"","sources":["../src/FocusZone.types.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"FocusZone.types.js","sourceRoot":"","sources":["../src/FocusZone.types.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC"}
|
|
@@ -2,31 +2,31 @@ import * as React from 'react';
|
|
|
2
2
|
import { Button } from 'react-native';
|
|
3
3
|
import * as renderer from 'react-test-renderer';
|
|
4
4
|
import { FocusZone } from '..';
|
|
5
|
-
|
|
5
|
+
const onPress = () => {
|
|
6
6
|
return;
|
|
7
7
|
};
|
|
8
|
-
describe('FocusZone No Props',
|
|
9
|
-
it('No children',
|
|
10
|
-
|
|
8
|
+
describe('FocusZone No Props', () => {
|
|
9
|
+
it('No children', () => {
|
|
10
|
+
const tree = renderer.create(React.createElement(FocusZone, null)).toJSON();
|
|
11
11
|
expect(tree).toMatchSnapshot();
|
|
12
12
|
});
|
|
13
|
-
it('One child',
|
|
14
|
-
|
|
13
|
+
it('One child', () => {
|
|
14
|
+
const tree = renderer
|
|
15
15
|
.create(React.createElement(FocusZone, null,
|
|
16
16
|
React.createElement(Button, { title: "button", onPress: onPress })))
|
|
17
17
|
.toJSON();
|
|
18
18
|
expect(tree).toMatchSnapshot();
|
|
19
19
|
});
|
|
20
|
-
it('Two children',
|
|
21
|
-
|
|
20
|
+
it('Two children', () => {
|
|
21
|
+
const tree = renderer
|
|
22
22
|
.create(React.createElement(FocusZone, null,
|
|
23
23
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
24
24
|
React.createElement(Button, { title: "button", onPress: onPress })))
|
|
25
25
|
.toJSON();
|
|
26
26
|
expect(tree).toMatchSnapshot();
|
|
27
27
|
});
|
|
28
|
-
it('Three children',
|
|
29
|
-
|
|
28
|
+
it('Three children', () => {
|
|
29
|
+
const tree = renderer
|
|
30
30
|
.create(React.createElement(FocusZone, null,
|
|
31
31
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
32
32
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
@@ -35,9 +35,9 @@ describe('FocusZone No Props', function () {
|
|
|
35
35
|
expect(tree).toMatchSnapshot();
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
|
-
describe('FocusZone With Props',
|
|
39
|
-
it('defaultTabbableElement Prop',
|
|
40
|
-
|
|
38
|
+
describe('FocusZone With Props', () => {
|
|
39
|
+
it('defaultTabbableElement Prop', () => {
|
|
40
|
+
const tree = renderer
|
|
41
41
|
.create(React.createElement(FocusZone, { defaultTabbableElement: null },
|
|
42
42
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
43
43
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
@@ -45,8 +45,8 @@ describe('FocusZone With Props', function () {
|
|
|
45
45
|
.toJSON();
|
|
46
46
|
expect(tree).toMatchSnapshot();
|
|
47
47
|
});
|
|
48
|
-
it('focusZoneDirection Prop',
|
|
49
|
-
|
|
48
|
+
it('focusZoneDirection Prop', () => {
|
|
49
|
+
const tree = renderer
|
|
50
50
|
.create(React.createElement(FocusZone, { focusZoneDirection: "bidirectional" },
|
|
51
51
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
52
52
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
@@ -54,8 +54,8 @@ describe('FocusZone With Props', function () {
|
|
|
54
54
|
.toJSON();
|
|
55
55
|
expect(tree).toMatchSnapshot();
|
|
56
56
|
});
|
|
57
|
-
it('disabled Prop',
|
|
58
|
-
|
|
57
|
+
it('disabled Prop', () => {
|
|
58
|
+
const tree = renderer
|
|
59
59
|
.create(React.createElement(FocusZone, { disabled: true },
|
|
60
60
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
61
61
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
@@ -63,8 +63,8 @@ describe('FocusZone With Props', function () {
|
|
|
63
63
|
.toJSON();
|
|
64
64
|
expect(tree).toMatchSnapshot();
|
|
65
65
|
});
|
|
66
|
-
it('isCircularNavigation Prop',
|
|
67
|
-
|
|
66
|
+
it('isCircularNavigation Prop', () => {
|
|
67
|
+
const tree = renderer
|
|
68
68
|
.create(React.createElement(FocusZone, { isCircularNavigation: true },
|
|
69
69
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
70
70
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
@@ -72,8 +72,8 @@ describe('FocusZone With Props', function () {
|
|
|
72
72
|
.toJSON();
|
|
73
73
|
expect(tree).toMatchSnapshot();
|
|
74
74
|
});
|
|
75
|
-
it('use2DNavigation Prop',
|
|
76
|
-
|
|
75
|
+
it('use2DNavigation Prop', () => {
|
|
76
|
+
const tree = renderer
|
|
77
77
|
.create(React.createElement(FocusZone, { use2DNavigation: true },
|
|
78
78
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
79
79
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
@@ -81,8 +81,8 @@ describe('FocusZone With Props', function () {
|
|
|
81
81
|
.toJSON();
|
|
82
82
|
expect(tree).toMatchSnapshot();
|
|
83
83
|
});
|
|
84
|
-
it('All Props',
|
|
85
|
-
|
|
84
|
+
it('All Props', () => {
|
|
85
|
+
const tree = renderer
|
|
86
86
|
.create(React.createElement(FocusZone, { disabled: false, use2DNavigation: true, defaultTabbableElement: null, isCircularNavigation: false, focusZoneDirection: "vertical" },
|
|
87
87
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
88
88
|
React.createElement(Button, { title: "button", onPress: onPress }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusZone.test.js","sourceRoot":"","sources":["../../src/__tests__/FocusZone.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,SAA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AAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAC9B,MAAM,IAAI,GAAG,QAAQ;aAClB,MAAM,CACL,oBAAC,SAAS,IAAC,eAAe,EAAE,IAAI;YAC9B,oBAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI;YAC3C,oBAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI;YAC3C,oBAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI,CACjC,CACb;aACA,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;QACnB,MAAM,IAAI,GAAG,QAAQ;aAClB,MAAM,CACL,oBAAC,SAAS,IACR,QAAQ,EAAE,KAAK,EACf,eAAe,EAAE,IAAI,EACrB,sBAAsB,EAAE,IAAI,EAC5B,oBAAoB,EAAE,KAAK,EAC3B,kBAAkB,EAAC,UAAU;YAE7B,oBAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI;YAC3C,oBAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI;YAC3C,oBAAC,MAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI,CACjC,CACb;aACA,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -4,17 +4,6 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
* @format
|
|
6
6
|
*/
|
|
7
|
-
var __assign = (this && this.__assign) || function () {
|
|
8
|
-
__assign = Object.assign || function(t) {
|
|
9
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
10
|
-
s = arguments[i];
|
|
11
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
12
|
-
t[p] = s[p];
|
|
13
|
-
}
|
|
14
|
-
return t;
|
|
15
|
-
};
|
|
16
|
-
return __assign.apply(this, arguments);
|
|
17
|
-
};
|
|
18
7
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
19
8
|
if (k2 === undefined) k2 = k;
|
|
20
9
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -38,39 +27,28 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
38
27
|
__setModuleDefault(result, mod);
|
|
39
28
|
return result;
|
|
40
29
|
};
|
|
41
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
42
|
-
var t = {};
|
|
43
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
44
|
-
t[p] = s[p];
|
|
45
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
46
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
47
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
48
|
-
t[p[i]] = s[p[i]];
|
|
49
|
-
}
|
|
50
|
-
return t;
|
|
51
|
-
};
|
|
52
30
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
53
31
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
54
32
|
};
|
|
55
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56
34
|
exports.FocusZone = void 0;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
35
|
+
const React = __importStar(require("react"));
|
|
36
|
+
const react_native_1 = require("react-native");
|
|
37
|
+
const interactive_hooks_1 = require("@fluentui-react-native/interactive-hooks");
|
|
38
|
+
const foundation_composable_1 = require("@uifabricshared/foundation-composable");
|
|
39
|
+
const foundation_settings_1 = require("@uifabricshared/foundation-settings");
|
|
40
|
+
const FocusZoneNativeComponent_1 = __importDefault(require("./FocusZoneNativeComponent"));
|
|
41
|
+
const filterOutComponentRef = (propName) => propName !== 'componentRef';
|
|
64
42
|
exports.FocusZone = (0, foundation_composable_1.composable)({
|
|
65
|
-
usePrepareProps:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
React.useLayoutEffect(
|
|
43
|
+
usePrepareProps: (userProps, useStyling) => {
|
|
44
|
+
const { componentRef, defaultTabbableElement, isCircularNavigation, ...rest } = userProps;
|
|
45
|
+
const ftzRef = (0, interactive_hooks_1.useViewCommandFocus)(componentRef);
|
|
46
|
+
const [targetFirstFocus, setTargetFirstFocus] = React.useState(undefined);
|
|
47
|
+
React.useLayoutEffect(() => {
|
|
70
48
|
if (typeof defaultTabbableElement === 'string') {
|
|
71
49
|
setTargetFirstFocus(defaultTabbableElement);
|
|
72
50
|
}
|
|
73
|
-
else if (defaultTabbableElement
|
|
51
|
+
else if (defaultTabbableElement?.current) {
|
|
74
52
|
setTargetFirstFocus((0, react_native_1.findNodeHandle)(defaultTabbableElement.current));
|
|
75
53
|
}
|
|
76
54
|
else {
|
|
@@ -79,7 +57,12 @@ exports.FocusZone = (0, foundation_composable_1.composable)({
|
|
|
79
57
|
}, [defaultTabbableElement]);
|
|
80
58
|
return {
|
|
81
59
|
slotProps: (0, foundation_settings_1.mergeSettings)(useStyling(userProps), {
|
|
82
|
-
root:
|
|
60
|
+
root: {
|
|
61
|
+
navigateAtEnd: isCircularNavigation ? 'NavigateWrap' : 'NavigateStopAtEnds',
|
|
62
|
+
...rest,
|
|
63
|
+
defaultTabbableElement: targetFirstFocus,
|
|
64
|
+
ref: ftzRef,
|
|
65
|
+
},
|
|
83
66
|
}),
|
|
84
67
|
};
|
|
85
68
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusZone.js","sourceRoot":"","sources":["../src/FocusZone.ts"],"names":[],"mappings":";AAAA;;;;GAIG
|
|
1
|
+
{"version":3,"file":"FocusZone.js","sourceRoot":"","sources":["../src/FocusZone.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA+B;AAC/B,+CAA8C;AAE9C,gFAA+E;AAE/E,iFAAmE;AACnE,6EAAoE;AAGpE,0FAAsD;AAEtD,MAAM,qBAAqB,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,cAAc,CAAC;AAE3D,QAAA,SAAS,GAAG,IAAA,kCAAU,EAAgB;IACjD,eAAe,EAAE,CAAC,SAAyB,EAAE,UAAsC,EAAE,EAAE;QACrF,MAAM,EAAE,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,GAAG,IAAI,EAAE,GAAG,SAAS,CAAC;QAE1F,MAAM,MAAM,GAAG,IAAA,uCAAmB,EAAC,YAAY,CAAC,CAAC;QAEjD,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAkB,SAAS,CAAC,CAAC;QAC3F,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE;YACzB,IAAI,OAAO,sBAAsB,KAAK,QAAQ,EAAE;gBAC9C,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;aAC7C;iBAAM,IAAI,sBAAsB,EAAE,OAAO,EAAE;gBAC1C,mBAAmB,CAAC,IAAA,6BAAc,EAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;aACrE;iBAAM;gBACL,mBAAmB,CAAC,SAAS,CAAC,CAAC;aAChC;QACH,CAAC,EAAE,CAAC,sBAAsB,CAAC,CAAC,CAAC;QAE7B,OAAO;YACL,SAAS,EAAE,IAAA,mCAAa,EAAqB,UAAU,CAAC,SAAS,CAAC,EAAE;gBAClE,IAAI,EAAE;oBACJ,aAAa,EAAE,oBAAoB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,oBAAoB;oBAC3E,GAAG,IAAI;oBACP,sBAAsB,EAAE,gBAAgB;oBACxC,GAAG,EAAE,MAAM;iBACZ;aACF,CAAC;SACH,CAAC;IACJ,CAAC;IACD,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,QAAQ,EAAE,kCAAY,EAAE,MAAM,EAAE,qBAAqB,EAAE;KAChE;CACF,CAAC,CAAC"}
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
"
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) Microsoft Corporation.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
* @format
|
|
6
|
-
*/
|
|
7
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
-
};
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
var codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
|
|
12
|
-
exports.default = (0, codegenNativeComponent_1.default)('RCTFocusZone');
|
|
13
|
-
//# sourceMappingURL=FocusZoneNativeComponent.js.map
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.__INTERNAL_VIEW_CONFIG=void 0;var _codegenNativeComponent=_interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));var NativeComponentRegistry=require('react-native/Libraries/NativeComponent/NativeComponentRegistry');var nativeComponentName='RCTFocusZone';var __INTERNAL_VIEW_CONFIG=exports.__INTERNAL_VIEW_CONFIG={uiViewClassName:'RCTFocusZone',validAttributes:{navigateAtEnd:true,defaultTabbableElement:true,focusZoneDirection:true,use2DNavigation:true,tabKeyNavigation:true,disabled:true,isTabNavigation:true}};var _default=exports.default=NativeComponentRegistry.get(nativeComponentName,function(){return __INTERNAL_VIEW_CONFIG;});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusZoneNativeComponent.js","sourceRoot":"","sources":["../src/FocusZoneNativeComponent.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAKH,
|
|
1
|
+
{"version":3,"file":"FocusZoneNativeComponent.js","sourceRoot":"","sources":["../src/FocusZoneNativeComponent.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAKH,qHAA6F;AAgB7F,kBAAe,IAAA,gCAAsB,EAAc,cAAc,CAA+B,CAAC"}
|
|
@@ -23,35 +23,35 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
const React = __importStar(require("react"));
|
|
27
|
+
const react_native_1 = require("react-native");
|
|
28
|
+
const renderer = __importStar(require("react-test-renderer"));
|
|
29
|
+
const __1 = require("..");
|
|
30
|
+
const onPress = () => {
|
|
31
31
|
return;
|
|
32
32
|
};
|
|
33
|
-
describe('FocusZone No Props',
|
|
34
|
-
it('No children',
|
|
35
|
-
|
|
33
|
+
describe('FocusZone No Props', () => {
|
|
34
|
+
it('No children', () => {
|
|
35
|
+
const tree = renderer.create(React.createElement(__1.FocusZone, null)).toJSON();
|
|
36
36
|
expect(tree).toMatchSnapshot();
|
|
37
37
|
});
|
|
38
|
-
it('One child',
|
|
39
|
-
|
|
38
|
+
it('One child', () => {
|
|
39
|
+
const tree = renderer
|
|
40
40
|
.create(React.createElement(__1.FocusZone, null,
|
|
41
41
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
|
|
42
42
|
.toJSON();
|
|
43
43
|
expect(tree).toMatchSnapshot();
|
|
44
44
|
});
|
|
45
|
-
it('Two children',
|
|
46
|
-
|
|
45
|
+
it('Two children', () => {
|
|
46
|
+
const tree = renderer
|
|
47
47
|
.create(React.createElement(__1.FocusZone, null,
|
|
48
48
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
49
49
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
|
|
50
50
|
.toJSON();
|
|
51
51
|
expect(tree).toMatchSnapshot();
|
|
52
52
|
});
|
|
53
|
-
it('Three children',
|
|
54
|
-
|
|
53
|
+
it('Three children', () => {
|
|
54
|
+
const tree = renderer
|
|
55
55
|
.create(React.createElement(__1.FocusZone, null,
|
|
56
56
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
57
57
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
@@ -60,9 +60,9 @@ describe('FocusZone No Props', function () {
|
|
|
60
60
|
expect(tree).toMatchSnapshot();
|
|
61
61
|
});
|
|
62
62
|
});
|
|
63
|
-
describe('FocusZone With Props',
|
|
64
|
-
it('defaultTabbableElement Prop',
|
|
65
|
-
|
|
63
|
+
describe('FocusZone With Props', () => {
|
|
64
|
+
it('defaultTabbableElement Prop', () => {
|
|
65
|
+
const tree = renderer
|
|
66
66
|
.create(React.createElement(__1.FocusZone, { defaultTabbableElement: null },
|
|
67
67
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
68
68
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
@@ -70,8 +70,8 @@ describe('FocusZone With Props', function () {
|
|
|
70
70
|
.toJSON();
|
|
71
71
|
expect(tree).toMatchSnapshot();
|
|
72
72
|
});
|
|
73
|
-
it('focusZoneDirection Prop',
|
|
74
|
-
|
|
73
|
+
it('focusZoneDirection Prop', () => {
|
|
74
|
+
const tree = renderer
|
|
75
75
|
.create(React.createElement(__1.FocusZone, { focusZoneDirection: "bidirectional" },
|
|
76
76
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
77
77
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
@@ -79,8 +79,8 @@ describe('FocusZone With Props', function () {
|
|
|
79
79
|
.toJSON();
|
|
80
80
|
expect(tree).toMatchSnapshot();
|
|
81
81
|
});
|
|
82
|
-
it('disabled Prop',
|
|
83
|
-
|
|
82
|
+
it('disabled Prop', () => {
|
|
83
|
+
const tree = renderer
|
|
84
84
|
.create(React.createElement(__1.FocusZone, { disabled: true },
|
|
85
85
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
86
86
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
@@ -88,8 +88,8 @@ describe('FocusZone With Props', function () {
|
|
|
88
88
|
.toJSON();
|
|
89
89
|
expect(tree).toMatchSnapshot();
|
|
90
90
|
});
|
|
91
|
-
it('isCircularNavigation Prop',
|
|
92
|
-
|
|
91
|
+
it('isCircularNavigation Prop', () => {
|
|
92
|
+
const tree = renderer
|
|
93
93
|
.create(React.createElement(__1.FocusZone, { isCircularNavigation: true },
|
|
94
94
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
95
95
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
@@ -97,8 +97,8 @@ describe('FocusZone With Props', function () {
|
|
|
97
97
|
.toJSON();
|
|
98
98
|
expect(tree).toMatchSnapshot();
|
|
99
99
|
});
|
|
100
|
-
it('use2DNavigation Prop',
|
|
101
|
-
|
|
100
|
+
it('use2DNavigation Prop', () => {
|
|
101
|
+
const tree = renderer
|
|
102
102
|
.create(React.createElement(__1.FocusZone, { use2DNavigation: true },
|
|
103
103
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
104
104
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
@@ -106,8 +106,8 @@ describe('FocusZone With Props', function () {
|
|
|
106
106
|
.toJSON();
|
|
107
107
|
expect(tree).toMatchSnapshot();
|
|
108
108
|
});
|
|
109
|
-
it('All Props',
|
|
110
|
-
|
|
109
|
+
it('All Props', () => {
|
|
110
|
+
const tree = renderer
|
|
111
111
|
.create(React.createElement(__1.FocusZone, { disabled: false, use2DNavigation: true, defaultTabbableElement: null, isCircularNavigation: false, focusZoneDirection: "vertical" },
|
|
112
112
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
113
113
|
React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusZone.test.js","sourceRoot":"","sources":["../../src/__tests__/FocusZone.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"FocusZone.test.js","sourceRoot":"","sources":["../../src/__tests__/FocusZone.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,+CAAsC;AAEtC,8DAAgD;AAEhD,0BAA+B;AAE/B,MAAM,OAAO,GAAG,GAAG,EAAE;IACnB,OAAO;AACT,CAAC,CAAC;AAEF,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE;QACrB,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,aAAS,OAAG,CAAC,CAAC,MAAM,EAAE,CAAC;QACrD,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;QACnB,MAAM,IAAI,GAAG,QAAQ;aAClB,MAAM,CACL,oBAAC,aAAS;YACR,oBAAC,qBAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI,CACjC,CACb;aACA,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE;QACtB,MAAM,IAAI,GAAG,QAAQ;aAClB,MAAM,CACL,oBAAC,aAAS;YACR,oBAAC,qB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AAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/focus-zone",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"description": "A cross-platform FocusZone component using the Fluent Design System",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./lib/index.js",
|
|
10
|
+
"require": "./lib-commonjs/index.js",
|
|
11
|
+
"types": "./lib/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
7
14
|
"typings": "lib/index.d.ts",
|
|
8
15
|
"scripts": {
|
|
9
16
|
"build": "fluentui-scripts build",
|
|
@@ -22,26 +29,30 @@
|
|
|
22
29
|
"directory": "packages/components/FocusZone"
|
|
23
30
|
},
|
|
24
31
|
"dependencies": {
|
|
25
|
-
"@fluentui-react-native/adapters": "0.13.
|
|
26
|
-
"@fluentui-react-native/interactive-hooks": "0.27.
|
|
27
|
-
"@uifabricshared/foundation-composable": "0.13.
|
|
28
|
-
"@uifabricshared/foundation-settings": "0.15.
|
|
32
|
+
"@fluentui-react-native/adapters": "0.13.2",
|
|
33
|
+
"@fluentui-react-native/interactive-hooks": "0.27.6",
|
|
34
|
+
"@uifabricshared/foundation-composable": "0.13.3",
|
|
35
|
+
"@uifabricshared/foundation-settings": "0.15.3"
|
|
29
36
|
},
|
|
30
37
|
"devDependencies": {
|
|
38
|
+
"@babel/core": "^7.20.0",
|
|
31
39
|
"@fluentui-react-native/eslint-config-rules": "0.1.1",
|
|
32
40
|
"@fluentui-react-native/scripts": "0.1.1",
|
|
33
|
-
"@office-iss/react-native-win32": "^0.
|
|
34
|
-
"@react-native/babel-preset": "^0.
|
|
35
|
-
"@react-native/metro-config": "^0.
|
|
41
|
+
"@office-iss/react-native-win32": "^0.74.0",
|
|
42
|
+
"@react-native/babel-preset": "^0.74.0",
|
|
43
|
+
"@react-native/metro-config": "^0.74.0",
|
|
44
|
+
"@types/react": "~18.2.0",
|
|
36
45
|
"react": "18.2.0",
|
|
37
|
-
"react-native": "^0.
|
|
46
|
+
"react-native": "^0.74.0",
|
|
47
|
+
"react-native-macos": "^0.74.0",
|
|
48
|
+
"react-native-windows": "^0.74.0"
|
|
38
49
|
},
|
|
39
50
|
"peerDependencies": {
|
|
40
|
-
"@office-iss/react-native-win32": "^0.
|
|
51
|
+
"@office-iss/react-native-win32": "^0.74.0",
|
|
41
52
|
"react": "18.2.0",
|
|
42
|
-
"react-native": "^0.73.0",
|
|
43
|
-
"react-native-macos": "^0.73.0",
|
|
44
|
-
"react-native-windows": "^0.73.0"
|
|
53
|
+
"react-native": "^0.73.0 || ^0.74.0",
|
|
54
|
+
"react-native-macos": "^0.73.0 || ^0.74.0",
|
|
55
|
+
"react-native-windows": "^0.73.0 || ^0.74.0"
|
|
45
56
|
},
|
|
46
57
|
"author": "",
|
|
47
58
|
"license": "MIT",
|
|
@@ -51,13 +62,21 @@
|
|
|
51
62
|
"presets": [
|
|
52
63
|
"microsoft/react-native"
|
|
53
64
|
],
|
|
54
|
-
"requirements":
|
|
55
|
-
"
|
|
56
|
-
|
|
65
|
+
"requirements": {
|
|
66
|
+
"development": [
|
|
67
|
+
"react-native@0.74"
|
|
68
|
+
],
|
|
69
|
+
"production": [
|
|
70
|
+
"react-native@0.73 || 0.74"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
57
73
|
"capabilities": [
|
|
74
|
+
"babel-preset-react-native",
|
|
58
75
|
"core",
|
|
59
76
|
"core-android",
|
|
60
77
|
"core-ios",
|
|
78
|
+
"core-macos",
|
|
79
|
+
"core-windows",
|
|
61
80
|
"react"
|
|
62
81
|
]
|
|
63
82
|
}
|
package/.eslintrc.js
DELETED