@fluentui/priority-overflow 9.0.2 → 9.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +75 -1
- package/CHANGELOG.md +21 -2
- package/dist/index.d.ts +16 -0
- package/lib/consts.js +2 -0
- package/lib/consts.js.map +1 -0
- package/lib/debounce.js +13 -14
- package/lib/debounce.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/overflowManager.js +257 -207
- package/lib/overflowManager.js.map +1 -1
- package/lib/priorityQueue.js +85 -86
- package/lib/priorityQueue.js.map +1 -1
- package/lib/types.js +1 -2
- package/lib/types.js.map +1 -1
- package/lib-commonjs/consts.js +16 -0
- package/lib-commonjs/consts.js.map +1 -0
- package/lib-commonjs/debounce.js +1 -3
- package/lib-commonjs/debounce.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/overflowManager.js +111 -61
- package/lib-commonjs/overflowManager.js.map +1 -1
- package/lib-commonjs/priorityQueue.js +1 -3
- package/lib-commonjs/priorityQueue.js.map +1 -1
- package/lib-commonjs/types.js +0 -3
- package/lib-commonjs/types.js.map +1 -1
- package/package.json +3 -2
- package/.swcrc +0 -30
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,81 @@
|
|
2
2
|
"name": "@fluentui/priority-overflow",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "Tue,
|
5
|
+
"date": "Tue, 20 Jun 2023 12:34:38 GMT",
|
6
|
+
"tag": "@fluentui/priority-overflow_v9.1.0",
|
7
|
+
"version": "9.1.0",
|
8
|
+
"comments": {
|
9
|
+
"minor": [
|
10
|
+
{
|
11
|
+
"author": "vkozlova@microsoft.com",
|
12
|
+
"package": "@fluentui/priority-overflow",
|
13
|
+
"commit": "4dedf40597f3b5cfa63d8f2e28a79276eb816bda",
|
14
|
+
"comment": "feat: Added support for custom divider"
|
15
|
+
}
|
16
|
+
]
|
17
|
+
}
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"date": "Wed, 24 May 2023 20:45:22 GMT",
|
21
|
+
"tag": "@fluentui/priority-overflow_v9.0.3",
|
22
|
+
"version": "9.0.3",
|
23
|
+
"comments": {
|
24
|
+
"none": [
|
25
|
+
{
|
26
|
+
"author": "olfedias@microsoft.com",
|
27
|
+
"package": "@fluentui/priority-overflow",
|
28
|
+
"commit": "69e0617a93cb44ef42f3bd19284b7dc5fe27fed3",
|
29
|
+
"comment": "chore: update test-ssr script"
|
30
|
+
}
|
31
|
+
]
|
32
|
+
}
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"date": "Thu, 18 May 2023 00:39:01 GMT",
|
36
|
+
"tag": "@fluentui/priority-overflow_v9.0.3",
|
37
|
+
"version": "9.0.3",
|
38
|
+
"comments": {
|
39
|
+
"none": [
|
40
|
+
{
|
41
|
+
"author": "olfedias@microsoft.com",
|
42
|
+
"package": "@fluentui/priority-overflow",
|
43
|
+
"commit": "06cd515eda59a3078bfe32f9cc7c1f281cd20208",
|
44
|
+
"comment": "chore: add test-ssr script to v9 packages"
|
45
|
+
}
|
46
|
+
]
|
47
|
+
}
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"date": "Fri, 12 May 2023 20:28:09 GMT",
|
51
|
+
"tag": "@fluentui/priority-overflow_v9.0.3",
|
52
|
+
"version": "9.0.3",
|
53
|
+
"comments": {
|
54
|
+
"patch": [
|
55
|
+
{
|
56
|
+
"author": "lingfangao@hotmail.com",
|
57
|
+
"package": "@fluentui/priority-overflow",
|
58
|
+
"commit": "4e90c5c22a67d62d9da2a9a186ad01051dad7f46",
|
59
|
+
"comment": "fix: overflowManager should always dispatch initial state"
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"author": "olfedias@microsoft.com",
|
63
|
+
"package": "@fluentui/priority-overflow",
|
64
|
+
"commit": "c28decb23d191a0daaaf6d5d1832429715102129",
|
65
|
+
"comment": "chore: exclude .swcrc from being published"
|
66
|
+
}
|
67
|
+
],
|
68
|
+
"none": [
|
69
|
+
{
|
70
|
+
"author": "martinhochel@microsoft.com",
|
71
|
+
"package": "@fluentui/priority-overflow",
|
72
|
+
"commit": "dbda7fa69e3000aaf8dd4a061e254ebd35198b8e",
|
73
|
+
"comment": "fix: update npmignore files to fix npm8/node16 regression how npm publish works"
|
74
|
+
}
|
75
|
+
]
|
76
|
+
}
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"date": "Tue, 21 Mar 2023 21:23:19 GMT",
|
6
80
|
"tag": "@fluentui/priority-overflow_v9.0.2",
|
7
81
|
"version": "9.0.2",
|
8
82
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,31 @@
|
|
1
1
|
# Change Log - @fluentui/priority-overflow
|
2
2
|
|
3
|
-
This log was last generated on Tue,
|
3
|
+
This log was last generated on Tue, 20 Jun 2023 12:34:38 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.1.0)
|
8
|
+
|
9
|
+
Tue, 20 Jun 2023 12:34:38 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.0.3..@fluentui/priority-overflow_v9.1.0)
|
11
|
+
|
12
|
+
### Minor changes
|
13
|
+
|
14
|
+
- feat: Added support for custom divider ([PR #28011](https://github.com/microsoft/fluentui/pull/28011) by vkozlova@microsoft.com)
|
15
|
+
|
16
|
+
## [9.0.3](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.0.3)
|
17
|
+
|
18
|
+
Fri, 12 May 2023 20:28:09 GMT
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.0.2..@fluentui/priority-overflow_v9.0.3)
|
20
|
+
|
21
|
+
### Patches
|
22
|
+
|
23
|
+
- fix: overflowManager should always dispatch initial state ([PR #27756](https://github.com/microsoft/fluentui/pull/27756) by lingfangao@hotmail.com)
|
24
|
+
- chore: exclude .swcrc from being published ([PR #27740](https://github.com/microsoft/fluentui/pull/27740) by olfedias@microsoft.com)
|
25
|
+
|
7
26
|
## [9.0.2](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.0.2)
|
8
27
|
|
9
|
-
Tue, 21 Mar 2023 21:
|
28
|
+
Tue, 21 Mar 2023 21:23:19 GMT
|
10
29
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.0.1..@fluentui/priority-overflow_v9.0.2)
|
11
30
|
|
12
31
|
### Patches
|
package/dist/index.d.ts
CHANGED
@@ -52,6 +52,14 @@ export declare type OverflowAxis = 'horizontal' | 'vertical';
|
|
52
52
|
|
53
53
|
export declare type OverflowDirection = 'start' | 'end';
|
54
54
|
|
55
|
+
export declare interface OverflowDividerEntry {
|
56
|
+
/**
|
57
|
+
* HTML element that will be disappear when overflowed
|
58
|
+
*/
|
59
|
+
element: HTMLElement;
|
60
|
+
groupId: string;
|
61
|
+
}
|
62
|
+
|
55
63
|
/**
|
56
64
|
* Payload of the custom DOM event for overflow updates
|
57
65
|
*/
|
@@ -113,6 +121,14 @@ export declare interface OverflowManager {
|
|
113
121
|
* available space and check if additional items need to overflow
|
114
122
|
*/
|
115
123
|
addOverflowMenu: (element: HTMLElement) => void;
|
124
|
+
/**
|
125
|
+
* Add overflow divider
|
126
|
+
*/
|
127
|
+
addDivider: (divider: OverflowDividerEntry) => void;
|
128
|
+
/**
|
129
|
+
* Remove overflow divider
|
130
|
+
*/
|
131
|
+
removeDivider: (groupId: string) => void;
|
116
132
|
/**
|
117
133
|
* Unsets the overflow menu element
|
118
134
|
*/
|
package/lib/consts.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["consts.ts"],"sourcesContent":["export const DATA_OVERFLOWING = 'data-overflowing';\nexport const DATA_OVERFLOW_GROUP = 'data-overflow-group';\n"],"names":["DATA_OVERFLOWING","DATA_OVERFLOW_GROUP"],"mappings":"AAAA,OAAO,MAAMA,mBAAmB,mBAAmB;AACnD,OAAO,MAAMC,sBAAsB,sBAAsB"}
|
package/lib/debounce.js
CHANGED
@@ -3,18 +3,17 @@
|
|
3
3
|
* https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide
|
4
4
|
* @param fn - Function to debounce
|
5
5
|
* @returns debounced function
|
6
|
-
*/export function debounce(fn) {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
6
|
+
*/ export function debounce(fn) {
|
7
|
+
let pending;
|
8
|
+
return ()=>{
|
9
|
+
if (!pending) {
|
10
|
+
pending = true;
|
11
|
+
queueMicrotask(()=>{
|
12
|
+
// Need to set pending to `false` before the debounced function is run.
|
13
|
+
// React can actually interrupt the function while it's running!
|
14
|
+
pending = false;
|
15
|
+
fn();
|
16
|
+
});
|
17
|
+
}
|
18
|
+
};
|
19
19
|
}
|
20
|
-
//# sourceMappingURL=debounce.js.map
|
package/lib/debounce.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["debounce.ts"],"sourcesContent":["/**\n * Microtask debouncer\n * https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide\n * @param fn - Function to debounce\n * @returns debounced function\n */\nexport function debounce(fn: Function) {\n let pending: boolean;\n return () => {\n if (!pending) {\n pending = true;\n queueMicrotask(() => {\n // Need to set pending to `false` before the debounced function is run.\n // React can actually interrupt the function while it's running!\n pending = false;\n fn();\n });\n }\n };\n}\n"],"names":["debounce","fn","pending","queueMicrotask"],"mappings":"AAAA;;;;;CAKC,GACD,OAAO,SAASA,SAASC,EAAY,EAAE;IACrC,IAAIC;IACJ,OAAO,IAAM;QACX,IAAI,CAACA,SAAS;YACZA,UAAU,IAAI;YACdC,eAAe,IAAM;gBACnB,uEAAuE;gBACvE,gEAAgE;gBAChED,UAAU,KAAK;gBACfD;YACF;QACF,CAAC;IACH;AACF,CAAC"}
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { createOverflowManager } from './overflowManager';\nexport type {\n ObserveOptions,\n OnUpdateItemVisibility,\n OnUpdateItemVisibilityPayload,\n OnUpdateOverflow,\n OverflowAxis,\n OverflowDirection,\n OverflowEventPayload,\n OverflowGroupState,\n OverflowItemEntry,\n OverflowDividerEntry,\n OverflowManager,\n} from './types';\n"],"names":["createOverflowManager"],"mappings":"AAAA,SAASA,qBAAqB,QAAQ,oBAAoB"}
|