@fluentui/react-breadcrumb 9.0.2 → 9.0.4
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.md
CHANGED
|
@@ -1,21 +1,52 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-breadcrumb
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 18 Dec 2023 14:36:10 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-breadcrumb_v9.0.4)
|
|
8
|
+
|
|
9
|
+
Mon, 18 Dec 2023 14:36:10 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-breadcrumb_v9.0.3..@fluentui/react-breadcrumb_v9.0.4)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- partitionBreadcrumbItems miscalculated endDisplayedItems when endDisplayedItems is incorrect when numberOfItemsToHide <= 0 ([PR #30005](https://github.com/microsoft/fluentui/pull/30005) by GordonJSmith@gmail.com)
|
|
15
|
+
- Bump @fluentui/react-aria to v9.6.0 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
16
|
+
- Bump @fluentui/react-button to v9.3.59 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
17
|
+
- Bump @fluentui/react-link to v9.2.2 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
18
|
+
- Bump @fluentui/react-shared-contexts to v9.13.2 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
19
|
+
- Bump @fluentui/react-tabster to v9.16.0 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
20
|
+
- Bump @fluentui/react-utilities to v9.15.4 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
21
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.22 ([PR #30099](https://github.com/microsoft/fluentui/pull/30099) by beachball)
|
|
22
|
+
|
|
23
|
+
## [9.0.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-breadcrumb_v9.0.3)
|
|
24
|
+
|
|
25
|
+
Thu, 14 Dec 2023 09:58:46 GMT
|
|
26
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-breadcrumb_v9.0.2..@fluentui/react-breadcrumb_v9.0.3)
|
|
27
|
+
|
|
28
|
+
### Patches
|
|
29
|
+
|
|
30
|
+
- Bump @fluentui/react-aria to v9.5.0 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
31
|
+
- Bump @fluentui/react-button to v9.3.58 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
32
|
+
- Bump @fluentui/react-link to v9.2.1 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
33
|
+
- Bump @fluentui/react-shared-contexts to v9.13.1 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
34
|
+
- Bump @fluentui/react-tabster to v9.15.1 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
35
|
+
- Bump @fluentui/react-utilities to v9.15.3 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
36
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.21 ([PR #30056](https://github.com/microsoft/fluentui/pull/30056) by beachball)
|
|
37
|
+
|
|
7
38
|
## [9.0.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-breadcrumb_v9.0.2)
|
|
8
39
|
|
|
9
|
-
Thu, 30 Nov 2023 13:
|
|
40
|
+
Thu, 30 Nov 2023 13:42:08 GMT
|
|
10
41
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-breadcrumb_v9.0.1..@fluentui/react-breadcrumb_v9.0.2)
|
|
11
42
|
|
|
12
43
|
### Patches
|
|
13
44
|
|
|
14
|
-
- Bump @fluentui/react-aria to v9.4.0 ([PR #
|
|
15
|
-
- Bump @fluentui/react-button to v9.3.57 ([PR #
|
|
16
|
-
- Bump @fluentui/react-link to v9.2.0 ([PR #
|
|
17
|
-
- Bump @fluentui/react-tabster to v9.15.0 ([PR #
|
|
18
|
-
- Bump @fluentui/react-jsx-runtime to v9.0.20 ([PR #
|
|
45
|
+
- Bump @fluentui/react-aria to v9.4.0 ([PR #29929](https://github.com/microsoft/fluentui/pull/29929) by beachball)
|
|
46
|
+
- Bump @fluentui/react-button to v9.3.57 ([PR #29929](https://github.com/microsoft/fluentui/pull/29929) by beachball)
|
|
47
|
+
- Bump @fluentui/react-link to v9.2.0 ([PR #29929](https://github.com/microsoft/fluentui/pull/29929) by beachball)
|
|
48
|
+
- Bump @fluentui/react-tabster to v9.15.0 ([PR #29929](https://github.com/microsoft/fluentui/pull/29929) by beachball)
|
|
49
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.20 ([PR #29929](https://github.com/microsoft/fluentui/pull/29929) by beachball)
|
|
19
50
|
|
|
20
51
|
## [9.0.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-breadcrumb_v9.0.1)
|
|
21
52
|
|
|
@@ -18,11 +18,15 @@ const DEFAULT_MAX_DISPLAYED_ITEMS = 6;
|
|
|
18
18
|
startDisplayedItems = items.slice(0, overflowIndex);
|
|
19
19
|
const numberItemsToHide = itemsCount - maxDisplayedItems;
|
|
20
20
|
if (numberItemsToHide > 0) {
|
|
21
|
-
overflowIndex = overflowIndex
|
|
21
|
+
overflowIndex = overflowIndex >= maxDisplayedItems ? maxDisplayedItems - 1 : overflowIndex;
|
|
22
22
|
const menuLastItemIdx = overflowIndex + numberItemsToHide;
|
|
23
23
|
startDisplayedItems = startDisplayedItems.slice(0, overflowIndex);
|
|
24
24
|
overflowItems = items.slice(overflowIndex, menuLastItemIdx);
|
|
25
|
-
|
|
25
|
+
if (menuLastItemIdx < itemsCount) {
|
|
26
|
+
endDisplayedItems = items.slice(menuLastItemIdx, itemsCount);
|
|
27
|
+
}
|
|
28
|
+
} else if (overflowIndex < itemsCount) {
|
|
29
|
+
endDisplayedItems = items.slice(overflowIndex, itemsCount);
|
|
26
30
|
}
|
|
27
31
|
return {
|
|
28
32
|
startDisplayedItems,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["partitionBreadcrumbItems.ts"],"sourcesContent":["const DEFAULT_OVERFLOW_INDEX = 1;\nconst DEFAULT_MAX_DISPLAYED_ITEMS = 6;\n\nexport type PartitionBreadcrumbItemsOptions<T> = {\n items: readonly T[];\n maxDisplayedItems?: number;\n overflowIndex?: number;\n};\n\nexport type PartitionBreadcrumbItems<T> = {\n startDisplayedItems: readonly T[];\n overflowItems?: readonly T[];\n endDisplayedItems?: readonly T[];\n};\n\n/**\n * Get the displayed items and overflowing items based on the array of BreadcrumbItems needed for Breadcrumb.\n *\n * @param options - Configure the partition options\n *\n * @returns Three arrays split into displayed items and overflow items based on maxDisplayedItems.\n */\nexport const partitionBreadcrumbItems = <T>(\n options: PartitionBreadcrumbItemsOptions<T>,\n): PartitionBreadcrumbItems<T> => {\n let startDisplayedItems;\n let overflowItems;\n let endDisplayedItems;\n\n const { items = [] } = options;\n const itemsCount = items.length;\n const maxDisplayedItems = getMaxDisplayedItems(options.maxDisplayedItems);\n let overflowIndex = options.overflowIndex ?? DEFAULT_OVERFLOW_INDEX;\n startDisplayedItems = items.slice(0, overflowIndex);\n\n const numberItemsToHide = itemsCount - maxDisplayedItems;\n\n if (numberItemsToHide > 0) {\n overflowIndex = overflowIndex
|
|
1
|
+
{"version":3,"sources":["partitionBreadcrumbItems.ts"],"sourcesContent":["const DEFAULT_OVERFLOW_INDEX = 1;\nconst DEFAULT_MAX_DISPLAYED_ITEMS = 6;\n\nexport type PartitionBreadcrumbItemsOptions<T> = {\n items: readonly T[];\n maxDisplayedItems?: number;\n overflowIndex?: number;\n};\n\nexport type PartitionBreadcrumbItems<T> = {\n startDisplayedItems: readonly T[];\n overflowItems?: readonly T[];\n endDisplayedItems?: readonly T[];\n};\n\n/**\n * Get the displayed items and overflowing items based on the array of BreadcrumbItems needed for Breadcrumb.\n *\n * @param options - Configure the partition options\n *\n * @returns Three arrays split into displayed items and overflow items based on maxDisplayedItems.\n */\nexport const partitionBreadcrumbItems = <T>(\n options: PartitionBreadcrumbItemsOptions<T>,\n): PartitionBreadcrumbItems<T> => {\n let startDisplayedItems;\n let overflowItems;\n let endDisplayedItems;\n\n const { items = [] } = options;\n const itemsCount = items.length;\n const maxDisplayedItems = getMaxDisplayedItems(options.maxDisplayedItems);\n let overflowIndex = options.overflowIndex ?? DEFAULT_OVERFLOW_INDEX;\n startDisplayedItems = items.slice(0, overflowIndex);\n\n const numberItemsToHide = itemsCount - maxDisplayedItems;\n\n if (numberItemsToHide > 0) {\n overflowIndex = overflowIndex >= maxDisplayedItems ? maxDisplayedItems - 1 : overflowIndex;\n const menuLastItemIdx = overflowIndex + numberItemsToHide;\n\n startDisplayedItems = startDisplayedItems.slice(0, overflowIndex);\n overflowItems = items.slice(overflowIndex, menuLastItemIdx);\n if (menuLastItemIdx < itemsCount) {\n endDisplayedItems = items.slice(menuLastItemIdx, itemsCount);\n }\n } else if (overflowIndex < itemsCount) {\n endDisplayedItems = items.slice(overflowIndex, itemsCount);\n }\n\n return {\n startDisplayedItems,\n overflowItems,\n endDisplayedItems,\n };\n};\n\nfunction getMaxDisplayedItems(maxDisplayedItems: number | undefined) {\n return maxDisplayedItems && maxDisplayedItems >= 0 ? maxDisplayedItems : DEFAULT_MAX_DISPLAYED_ITEMS;\n}\n"],"names":["DEFAULT_OVERFLOW_INDEX","DEFAULT_MAX_DISPLAYED_ITEMS","partitionBreadcrumbItems","options","startDisplayedItems","overflowItems","endDisplayedItems","items","itemsCount","length","maxDisplayedItems","getMaxDisplayedItems","overflowIndex","slice","numberItemsToHide","menuLastItemIdx"],"mappings":"AAAA,MAAMA,yBAAyB;AAC/B,MAAMC,8BAA8B;AAcpC;;;;;;CAMC,GACD,OAAO,MAAMC,2BAA2B,CACtCC;IAEA,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IAEJ,MAAM,EAAEC,QAAQ,EAAE,EAAE,GAAGJ;IACvB,MAAMK,aAAaD,MAAME,MAAM;IAC/B,MAAMC,oBAAoBC,qBAAqBR,QAAQO,iBAAiB;QACpDP;IAApB,IAAIS,gBAAgBT,CAAAA,yBAAAA,QAAQS,aAAa,cAArBT,oCAAAA,yBAAyBH;IAC7CI,sBAAsBG,MAAMM,KAAK,CAAC,GAAGD;IAErC,MAAME,oBAAoBN,aAAaE;IAEvC,IAAII,oBAAoB,GAAG;QACzBF,gBAAgBA,iBAAiBF,oBAAoBA,oBAAoB,IAAIE;QAC7E,MAAMG,kBAAkBH,gBAAgBE;QAExCV,sBAAsBA,oBAAoBS,KAAK,CAAC,GAAGD;QACnDP,gBAAgBE,MAAMM,KAAK,CAACD,eAAeG;QAC3C,IAAIA,kBAAkBP,YAAY;YAChCF,oBAAoBC,MAAMM,KAAK,CAACE,iBAAiBP;QACnD;IACF,OAAO,IAAII,gBAAgBJ,YAAY;QACrCF,oBAAoBC,MAAMM,KAAK,CAACD,eAAeJ;IACjD;IAEA,OAAO;QACLJ;QACAC;QACAC;IACF;AACF,EAAE;AAEF,SAASK,qBAAqBD,iBAAqC;IACjE,OAAOA,qBAAqBA,qBAAqB,IAAIA,oBAAoBT;AAC3E"}
|
|
@@ -22,11 +22,15 @@ const partitionBreadcrumbItems = (options)=>{
|
|
|
22
22
|
startDisplayedItems = items.slice(0, overflowIndex);
|
|
23
23
|
const numberItemsToHide = itemsCount - maxDisplayedItems;
|
|
24
24
|
if (numberItemsToHide > 0) {
|
|
25
|
-
overflowIndex = overflowIndex
|
|
25
|
+
overflowIndex = overflowIndex >= maxDisplayedItems ? maxDisplayedItems - 1 : overflowIndex;
|
|
26
26
|
const menuLastItemIdx = overflowIndex + numberItemsToHide;
|
|
27
27
|
startDisplayedItems = startDisplayedItems.slice(0, overflowIndex);
|
|
28
28
|
overflowItems = items.slice(overflowIndex, menuLastItemIdx);
|
|
29
|
-
|
|
29
|
+
if (menuLastItemIdx < itemsCount) {
|
|
30
|
+
endDisplayedItems = items.slice(menuLastItemIdx, itemsCount);
|
|
31
|
+
}
|
|
32
|
+
} else if (overflowIndex < itemsCount) {
|
|
33
|
+
endDisplayedItems = items.slice(overflowIndex, itemsCount);
|
|
30
34
|
}
|
|
31
35
|
return {
|
|
32
36
|
startDisplayedItems,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["partitionBreadcrumbItems.js"],"sourcesContent":["const DEFAULT_OVERFLOW_INDEX = 1;\nconst DEFAULT_MAX_DISPLAYED_ITEMS = 6;\n/**\n * Get the displayed items and overflowing items based on the array of BreadcrumbItems needed for Breadcrumb.\n *\n * @param options - Configure the partition options\n *\n * @returns Three arrays split into displayed items and overflow items based on maxDisplayedItems.\n */ export const partitionBreadcrumbItems = (options)=>{\n let startDisplayedItems;\n let overflowItems;\n let endDisplayedItems;\n const { items = [] } = options;\n const itemsCount = items.length;\n const maxDisplayedItems = getMaxDisplayedItems(options.maxDisplayedItems);\n var _options_overflowIndex;\n let overflowIndex = (_options_overflowIndex = options.overflowIndex) !== null && _options_overflowIndex !== void 0 ? _options_overflowIndex : DEFAULT_OVERFLOW_INDEX;\n startDisplayedItems = items.slice(0, overflowIndex);\n const numberItemsToHide = itemsCount - maxDisplayedItems;\n if (numberItemsToHide > 0) {\n overflowIndex = overflowIndex
|
|
1
|
+
{"version":3,"sources":["partitionBreadcrumbItems.js"],"sourcesContent":["const DEFAULT_OVERFLOW_INDEX = 1;\nconst DEFAULT_MAX_DISPLAYED_ITEMS = 6;\n/**\n * Get the displayed items and overflowing items based on the array of BreadcrumbItems needed for Breadcrumb.\n *\n * @param options - Configure the partition options\n *\n * @returns Three arrays split into displayed items and overflow items based on maxDisplayedItems.\n */ export const partitionBreadcrumbItems = (options)=>{\n let startDisplayedItems;\n let overflowItems;\n let endDisplayedItems;\n const { items = [] } = options;\n const itemsCount = items.length;\n const maxDisplayedItems = getMaxDisplayedItems(options.maxDisplayedItems);\n var _options_overflowIndex;\n let overflowIndex = (_options_overflowIndex = options.overflowIndex) !== null && _options_overflowIndex !== void 0 ? _options_overflowIndex : DEFAULT_OVERFLOW_INDEX;\n startDisplayedItems = items.slice(0, overflowIndex);\n const numberItemsToHide = itemsCount - maxDisplayedItems;\n if (numberItemsToHide > 0) {\n overflowIndex = overflowIndex >= maxDisplayedItems ? maxDisplayedItems - 1 : overflowIndex;\n const menuLastItemIdx = overflowIndex + numberItemsToHide;\n startDisplayedItems = startDisplayedItems.slice(0, overflowIndex);\n overflowItems = items.slice(overflowIndex, menuLastItemIdx);\n if (menuLastItemIdx < itemsCount) {\n endDisplayedItems = items.slice(menuLastItemIdx, itemsCount);\n }\n } else if (overflowIndex < itemsCount) {\n endDisplayedItems = items.slice(overflowIndex, itemsCount);\n }\n return {\n startDisplayedItems,\n overflowItems,\n endDisplayedItems\n };\n};\nfunction getMaxDisplayedItems(maxDisplayedItems) {\n return maxDisplayedItems && maxDisplayedItems >= 0 ? maxDisplayedItems : DEFAULT_MAX_DISPLAYED_ITEMS;\n}\n"],"names":["partitionBreadcrumbItems","DEFAULT_OVERFLOW_INDEX","DEFAULT_MAX_DISPLAYED_ITEMS","options","startDisplayedItems","overflowItems","endDisplayedItems","items","itemsCount","length","maxDisplayedItems","getMaxDisplayedItems","_options_overflowIndex","overflowIndex","slice","numberItemsToHide","menuLastItemIdx"],"mappings":";;;;+BAQiBA;;;eAAAA;;;AARjB,MAAMC,yBAAyB;AAC/B,MAAMC,8BAA8B;AAOzB,MAAMF,2BAA2B,CAACG;IACzC,IAAIC;IACJ,IAAIC;IACJ,IAAIC;IACJ,MAAM,EAAEC,QAAQ,EAAE,EAAE,GAAGJ;IACvB,MAAMK,aAAaD,MAAME,MAAM;IAC/B,MAAMC,oBAAoBC,qBAAqBR,QAAQO,iBAAiB;IACxE,IAAIE;IACJ,IAAIC,gBAAgB,AAACD,CAAAA,yBAAyBT,QAAQU,aAAa,AAAD,MAAO,QAAQD,2BAA2B,KAAK,IAAIA,yBAAyBX;IAC9IG,sBAAsBG,MAAMO,KAAK,CAAC,GAAGD;IACrC,MAAME,oBAAoBP,aAAaE;IACvC,IAAIK,oBAAoB,GAAG;QACvBF,gBAAgBA,iBAAiBH,oBAAoBA,oBAAoB,IAAIG;QAC7E,MAAMG,kBAAkBH,gBAAgBE;QACxCX,sBAAsBA,oBAAoBU,KAAK,CAAC,GAAGD;QACnDR,gBAAgBE,MAAMO,KAAK,CAACD,eAAeG;QAC3C,IAAIA,kBAAkBR,YAAY;YAC9BF,oBAAoBC,MAAMO,KAAK,CAACE,iBAAiBR;QACrD;IACJ,OAAO,IAAIK,gBAAgBL,YAAY;QACnCF,oBAAoBC,MAAMO,KAAK,CAACD,eAAeL;IACnD;IACA,OAAO;QACHJ;QACAC;QACAC;IACJ;AACJ;AACA,SAASK,qBAAqBD,iBAAiB;IAC3C,OAAOA,qBAAqBA,qBAAqB,IAAIA,oBAAoBR;AAC7E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-breadcrumb",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.4",
|
|
4
4
|
"description": "Breadcrumb component for Fluent UI React.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"@fluentui/scripts-tasks": "*"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@fluentui/react-aria": "^9.
|
|
39
|
-
"@fluentui/react-button": "^9.3.
|
|
38
|
+
"@fluentui/react-aria": "^9.6.0",
|
|
39
|
+
"@fluentui/react-button": "^9.3.59",
|
|
40
40
|
"@fluentui/react-icons": "^2.0.217",
|
|
41
|
-
"@fluentui/react-link": "^9.2.
|
|
42
|
-
"@fluentui/react-shared-contexts": "^9.13.
|
|
43
|
-
"@fluentui/react-tabster": "^9.
|
|
41
|
+
"@fluentui/react-link": "^9.2.2",
|
|
42
|
+
"@fluentui/react-shared-contexts": "^9.13.2",
|
|
43
|
+
"@fluentui/react-tabster": "^9.16.0",
|
|
44
44
|
"@fluentui/react-theme": "^9.1.16",
|
|
45
|
-
"@fluentui/react-utilities": "^9.15.
|
|
46
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
45
|
+
"@fluentui/react-utilities": "^9.15.4",
|
|
46
|
+
"@fluentui/react-jsx-runtime": "^9.0.22",
|
|
47
47
|
"@griffel/react": "^1.5.14",
|
|
48
48
|
"@swc/helpers": "^0.5.1"
|
|
49
49
|
},
|