@fluentui/react-utilities 0.0.0-nightly-20231005-0415.1 → 0.0.0-nightly-20231009-0416.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.
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-utilities",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-utilities_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Mon, 09 Oct 2023 04:23:40 GMT",
|
6
|
+
"tag": "@fluentui/react-utilities_v0.0.0-nightly-20231009-0416.1",
|
7
|
+
"version": "0.0.0-nightly-20231009-0416.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,8 +16,23 @@
|
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-utilities",
|
19
|
-
"comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-20231009-0416.1",
|
20
|
+
"commit": "dd86ca3946ae2a93aa48e41b2fefdeec22634d37"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"date": "Thu, 05 Oct 2023 15:25:34 GMT",
|
27
|
+
"tag": "@fluentui/react-utilities_v9.14.1",
|
28
|
+
"version": "9.14.1",
|
29
|
+
"comments": {
|
30
|
+
"patch": [
|
31
|
+
{
|
32
|
+
"author": "yuanboxue@microsoft.com",
|
33
|
+
"package": "@fluentui/react-utilities",
|
34
|
+
"commit": "690590449dc3d65cd40b2b06a990fd920180919d",
|
35
|
+
"comment": "Revert fix: useOnScrollOutside should invoke callback on dragging scrollbar"
|
21
36
|
}
|
22
37
|
]
|
23
38
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,18 +1,27 @@
|
|
1
1
|
# Change Log - @fluentui/react-utilities
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 09 Oct 2023 04:23:40 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20231009-0416.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.0.0-nightly-20231009-0416.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.14.
|
9
|
+
Mon, 09 Oct 2023 04:23:40 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.14.1..@fluentui/react-utilities_v0.0.0-nightly-20231009-0416.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
15
|
-
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-20231009-0416.1 ([commit](https://github.com/microsoft/fluentui/commit/dd86ca3946ae2a93aa48e41b2fefdeec22634d37) by beachball)
|
16
|
+
|
17
|
+
## [9.14.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.14.1)
|
18
|
+
|
19
|
+
Thu, 05 Oct 2023 15:25:34 GMT
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.14.0..@fluentui/react-utilities_v9.14.1)
|
21
|
+
|
22
|
+
### Patches
|
23
|
+
|
24
|
+
- Revert fix: useOnScrollOutside should invoke callback on dragging scrollbar ([PR #29412](https://github.com/microsoft/fluentui/pull/29412) by yuanboxue@microsoft.com)
|
16
25
|
|
17
26
|
## [9.14.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.14.0)
|
18
27
|
|
@@ -19,12 +19,9 @@ import { useEventCallback } from './useEventCallback';
|
|
19
19
|
}
|
20
20
|
element === null || element === void 0 ? void 0 : element.addEventListener('wheel', listener);
|
21
21
|
element === null || element === void 0 ? void 0 : element.addEventListener('touchmove', listener);
|
22
|
-
// use capture phase because scroll does not bubble
|
23
|
-
element === null || element === void 0 ? void 0 : element.addEventListener('scroll', listener, true);
|
24
22
|
return ()=>{
|
25
23
|
element === null || element === void 0 ? void 0 : element.removeEventListener('wheel', listener);
|
26
24
|
element === null || element === void 0 ? void 0 : element.removeEventListener('touchmove', listener);
|
27
|
-
element === null || element === void 0 ? void 0 : element.removeEventListener('scroll', listener, true);
|
28
25
|
};
|
29
26
|
}, [
|
30
27
|
listener,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useOnScrollOutside.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from './useEventCallback';\nimport type { UseOnClickOrScrollOutsideOptions } from './useOnClickOutside';\n\n/**\n * @internal\n * Utility to perform checks where a click/touch event was made outside a component\n */\nexport const useOnScrollOutside = (options: UseOnClickOrScrollOutsideOptions) => {\n const { refs, callback, element, disabled, contains: containsProp } = options;\n\n const listener = useEventCallback((ev:
|
1
|
+
{"version":3,"sources":["useOnScrollOutside.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from './useEventCallback';\nimport type { UseOnClickOrScrollOutsideOptions } from './useOnClickOutside';\n\n/**\n * @internal\n * Utility to perform checks where a click/touch event was made outside a component\n */\nexport const useOnScrollOutside = (options: UseOnClickOrScrollOutsideOptions) => {\n const { refs, callback, element, disabled, contains: containsProp } = options;\n\n const listener = useEventCallback((ev: MouseEvent | TouchEvent) => {\n const contains: UseOnClickOrScrollOutsideOptions['contains'] =\n containsProp || ((parent, child) => !!parent?.contains(child));\n\n const target = ev.composedPath()[0] as HTMLElement;\n const isOutside = refs.every(ref => !contains(ref.current || null, target));\n\n if (isOutside && !disabled) {\n callback(ev);\n }\n });\n\n React.useEffect(() => {\n if (disabled) {\n return;\n }\n\n element?.addEventListener('wheel', listener);\n element?.addEventListener('touchmove', listener);\n\n return () => {\n element?.removeEventListener('wheel', listener);\n element?.removeEventListener('touchmove', listener);\n };\n }, [listener, element, disabled]);\n};\n"],"names":["React","useEventCallback","useOnScrollOutside","options","refs","callback","element","disabled","contains","containsProp","listener","ev","parent","child","target","composedPath","isOutside","every","ref","current","useEffect","addEventListener","removeEventListener"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gBAAgB,QAAQ,qBAAqB;AAGtD;;;CAGC,GACD,OAAO,MAAMC,qBAAqB,CAACC;IACjC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,UAAUC,YAAY,EAAE,GAAGN;IAEtE,MAAMO,WAAWT,iBAAiB,CAACU;QACjC,MAAMH,WACJC,gBAAiB,CAAA,CAACG,QAAQC,QAAU,CAAC,EAACD,mBAAAA,6BAAAA,OAAQJ,QAAQ,CAACK,OAAK;QAE9D,MAAMC,SAASH,GAAGI,YAAY,EAAE,CAAC,EAAE;QACnC,MAAMC,YAAYZ,KAAKa,KAAK,CAACC,CAAAA,MAAO,CAACV,SAASU,IAAIC,OAAO,IAAI,MAAML;QAEnE,IAAIE,aAAa,CAACT,UAAU;YAC1BF,SAASM;QACX;IACF;IAEAX,MAAMoB,SAAS,CAAC;QACd,IAAIb,UAAU;YACZ;QACF;QAEAD,oBAAAA,8BAAAA,QAASe,gBAAgB,CAAC,SAASX;QACnCJ,oBAAAA,8BAAAA,QAASe,gBAAgB,CAAC,aAAaX;QAEvC,OAAO;YACLJ,oBAAAA,8BAAAA,QAASgB,mBAAmB,CAAC,SAASZ;YACtCJ,oBAAAA,8BAAAA,QAASgB,mBAAmB,CAAC,aAAaZ;QAC5C;IACF,GAAG;QAACA;QAAUJ;QAASC;KAAS;AAClC,EAAE"}
|
@@ -27,12 +27,9 @@ const useOnScrollOutside = (options)=>{
|
|
27
27
|
}
|
28
28
|
element === null || element === void 0 ? void 0 : element.addEventListener('wheel', listener);
|
29
29
|
element === null || element === void 0 ? void 0 : element.addEventListener('touchmove', listener);
|
30
|
-
// use capture phase because scroll does not bubble
|
31
|
-
element === null || element === void 0 ? void 0 : element.addEventListener('scroll', listener, true);
|
32
30
|
return ()=>{
|
33
31
|
element === null || element === void 0 ? void 0 : element.removeEventListener('wheel', listener);
|
34
32
|
element === null || element === void 0 ? void 0 : element.removeEventListener('touchmove', listener);
|
35
|
-
element === null || element === void 0 ? void 0 : element.removeEventListener('scroll', listener, true);
|
36
33
|
};
|
37
34
|
}, [
|
38
35
|
listener,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useOnScrollOutside.js"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from './useEventCallback';\n/**\n * @internal\n * Utility to perform checks where a click/touch event was made outside a component\n */ export const useOnScrollOutside = (options)=>{\n const { refs, callback, element, disabled, contains: containsProp } = options;\n const listener = useEventCallback((ev)=>{\n const contains = containsProp || ((parent, child)=>!!(parent === null || parent === void 0 ? void 0 : parent.contains(child)));\n const target = ev.composedPath()[0];\n const isOutside = refs.every((ref)=>!contains(ref.current || null, target));\n if (isOutside && !disabled) {\n callback(ev);\n }\n });\n React.useEffect(()=>{\n if (disabled) {\n return;\n }\n element === null || element === void 0 ? void 0 : element.addEventListener('wheel', listener);\n element === null || element === void 0 ? void 0 : element.addEventListener('touchmove', listener);\n
|
1
|
+
{"version":3,"sources":["useOnScrollOutside.js"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from './useEventCallback';\n/**\n * @internal\n * Utility to perform checks where a click/touch event was made outside a component\n */ export const useOnScrollOutside = (options)=>{\n const { refs, callback, element, disabled, contains: containsProp } = options;\n const listener = useEventCallback((ev)=>{\n const contains = containsProp || ((parent, child)=>!!(parent === null || parent === void 0 ? void 0 : parent.contains(child)));\n const target = ev.composedPath()[0];\n const isOutside = refs.every((ref)=>!contains(ref.current || null, target));\n if (isOutside && !disabled) {\n callback(ev);\n }\n });\n React.useEffect(()=>{\n if (disabled) {\n return;\n }\n element === null || element === void 0 ? void 0 : element.addEventListener('wheel', listener);\n element === null || element === void 0 ? void 0 : element.addEventListener('touchmove', listener);\n return ()=>{\n element === null || element === void 0 ? void 0 : element.removeEventListener('wheel', listener);\n element === null || element === void 0 ? void 0 : element.removeEventListener('touchmove', listener);\n };\n }, [\n listener,\n element,\n disabled\n ]);\n};\n"],"names":["useOnScrollOutside","options","refs","callback","element","disabled","contains","containsProp","listener","useEventCallback","ev","parent","child","target","composedPath","isOutside","every","ref","current","React","useEffect","addEventListener","removeEventListener"],"mappings":";;;;+BAKiBA;;;eAAAA;;;;iEALM;kCACU;AAItB,MAAMA,qBAAqB,CAACC;IACnC,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,UAAUC,YAAY,EAAE,GAAGN;IACtE,MAAMO,WAAWC,IAAAA,kCAAgB,EAAC,CAACC;QAC/B,MAAMJ,WAAWC,gBAAiB,CAAA,CAACI,QAAQC,QAAQ,CAAC,CAAED,CAAAA,WAAW,QAAQA,WAAW,KAAK,IAAI,KAAK,IAAIA,OAAOL,QAAQ,CAACM,MAAK,CAAC;QAC5H,MAAMC,SAASH,GAAGI,YAAY,EAAE,CAAC,EAAE;QACnC,MAAMC,YAAYb,KAAKc,KAAK,CAAC,CAACC,MAAM,CAACX,SAASW,IAAIC,OAAO,IAAI,MAAML;QACnE,IAAIE,aAAa,CAACV,UAAU;YACxBF,SAASO;QACb;IACJ;IACAS,OAAMC,SAAS,CAAC;QACZ,IAAIf,UAAU;YACV;QACJ;QACAD,YAAY,QAAQA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQiB,gBAAgB,CAAC,SAASb;QACpFJ,YAAY,QAAQA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQiB,gBAAgB,CAAC,aAAab;QACxF,OAAO;YACHJ,YAAY,QAAQA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQkB,mBAAmB,CAAC,SAASd;YACvFJ,YAAY,QAAQA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQkB,mBAAmB,CAAC,aAAad;QAC/F;IACJ,GAAG;QACCA;QACAJ;QACAC;KACH;AACL"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-utilities",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20231009-0416.1",
|
4
4
|
"description": "A set of general React-specific utilities.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -31,7 +31,7 @@
|
|
31
31
|
"@fluentui/scripts-tasks": "*"
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
|
-
"@fluentui/keyboard-keys": "0.0.0-nightly-
|
34
|
+
"@fluentui/keyboard-keys": "0.0.0-nightly-20231009-0416.1",
|
35
35
|
"@swc/helpers": "^0.5.1"
|
36
36
|
},
|
37
37
|
"peerDependencies": {
|