@fluentui/react-table 9.15.19 → 9.15.20

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,12 +1,30 @@
1
1
  # Change Log - @fluentui/react-table
2
2
 
3
- This log was last generated on Tue, 08 Oct 2024 22:02:32 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 15 Oct 2024 17:13:30 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.15.20](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.15.20)
8
+
9
+ Tue, 15 Oct 2024 17:13:30 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.15.19..@fluentui/react-table_v9.15.20)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-aria to v9.13.8 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
15
+ - Bump @fluentui/react-avatar to v9.6.41 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
16
+ - Bump @fluentui/react-checkbox to v9.2.39 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
17
+ - Bump @fluentui/react-context-selector to v9.1.68 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
18
+ - Bump @fluentui/react-radio to v9.2.34 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
19
+ - Bump @fluentui/react-shared-contexts to v9.20.2 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
20
+ - Bump @fluentui/react-tabster to v9.22.9 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
21
+ - Bump @fluentui/react-theme to v9.1.21 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
22
+ - Bump @fluentui/react-utilities to v9.18.16 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
23
+ - Bump @fluentui/react-jsx-runtime to v9.0.45 ([PR #32999](https://github.com/microsoft/fluentui/pull/32999) by beachball)
24
+
7
25
  ## [9.15.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.15.19)
8
26
 
9
- Tue, 08 Oct 2024 22:02:32 GMT
27
+ Tue, 08 Oct 2024 22:05:59 GMT
10
28
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.15.18..@fluentui/react-table_v9.15.19)
11
29
 
12
30
  ### Patches
@@ -8,8 +8,6 @@ import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts
8
8
  */ export function useMeasureElement() {
9
9
  const [width, setWidth] = React.useState(0);
10
10
  const container = React.useRef(undefined);
11
- // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286
12
- // eslint-disable-next-line no-restricted-globals
13
11
  const resizeObserverRef = React.useRef(null);
14
12
  const { targetDocument } = useFluent();
15
13
  // the handler for resize observer
@@ -1 +1 @@
1
- {"version":3,"sources":["useMeasureElement.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureElement<TElement extends HTMLElement = HTMLElement>() {\n const [width, setWidth] = React.useState(0);\n\n const container = React.useRef<HTMLElement | undefined>(undefined);\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n\n const { targetDocument } = useFluent();\n\n // the handler for resize observer\n const handleResize = React.useCallback(() => {\n const containerWidth = container.current?.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n\n const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument) {\n return;\n }\n\n // if the element is removed, stop observing it\n if (!el && resizeObserverRef.current && container.current) {\n resizeObserverRef.current.unobserve(container.current);\n }\n\n container.current = undefined;\n\n if (el?.parentElement) {\n container.current = el.parentElement;\n handleResize();\n resizeObserverRef.current?.observe(container.current);\n }\n },\n [targetDocument, handleResize],\n );\n\n React.useEffect(() => {\n resizeObserverRef.current = createResizeObserverFromDocument(targetDocument, handleResize);\n\n if (!container.current || !resizeObserverRef.current) {\n return;\n }\n\n resizeObserverRef.current.observe(container.current);\n\n return () => {\n resizeObserverRef.current?.disconnect();\n };\n }, [handleResize, targetDocument]);\n\n return { width, measureElementRef };\n}\n\n/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */\nexport function createResizeObserverFromDocument(\n targetDocument: Document | null | undefined,\n callback: ResizeObserverCallback,\n) {\n if (!targetDocument?.defaultView?.ResizeObserver) {\n return null;\n }\n\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["React","useFluent_unstable","useFluent","useMeasureElement","width","setWidth","useState","container","useRef","undefined","resizeObserverRef","targetDocument","handleResize","useCallback","containerWidth","current","getBoundingClientRect","measureElementRef","el","unobserve","parentElement","observe","useEffect","createResizeObserverFromDocument","disconnect","callback","defaultView","ResizeObserver"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAElF;;;;;CAKC,GACD,OAAO,SAASC;IACd,MAAM,CAACC,OAAOC,SAAS,GAAGL,MAAMM,QAAQ,CAAC;IAEzC,MAAMC,YAAYP,MAAMQ,MAAM,CAA0BC;IACxD,8FAA8F;IAC9F,iDAAiD;IACjD,MAAMC,oBA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BAAAA,sCAAAA,8BAAAA,eAAgBe,WAAW,cAA3Bf,kDAAAA,4BAA6BgB,cAAc,GAAE;QAChD,OAAO;IACT;IAEA,OAAO,IAAIhB,eAAee,WAAW,CAACC,cAAc,CAACF;AACvD"}
1
+ {"version":3,"sources":["useMeasureElement.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureElement<TElement extends HTMLElement = HTMLElement>() {\n const [width, setWidth] = React.useState(0);\n\n const container = React.useRef<HTMLElement | undefined>(undefined);\n\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n\n const { targetDocument } = useFluent();\n\n // the handler for resize observer\n const handleResize = React.useCallback(() => {\n const containerWidth = container.current?.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n\n const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument) {\n return;\n }\n\n // if the element is removed, stop observing it\n if (!el && resizeObserverRef.current && container.current) {\n resizeObserverRef.current.unobserve(container.current);\n }\n\n container.current = undefined;\n\n if (el?.parentElement) {\n container.current = el.parentElement;\n handleResize();\n resizeObserverRef.current?.observe(container.current);\n }\n },\n [targetDocument, handleResize],\n );\n\n React.useEffect(() => {\n resizeObserverRef.current = createResizeObserverFromDocument(targetDocument, handleResize);\n\n if (!container.current || !resizeObserverRef.current) {\n return;\n }\n\n resizeObserverRef.current.observe(container.current);\n\n return () => {\n resizeObserverRef.current?.disconnect();\n };\n }, [handleResize, targetDocument]);\n\n return { width, measureElementRef };\n}\n\n/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */\nexport function createResizeObserverFromDocument(\n targetDocument: Document | null | undefined,\n callback: ResizeObserverCallback,\n) {\n if (!targetDocument?.defaultView?.ResizeObserver) {\n return null;\n }\n\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["React","useFluent_unstable","useFluent","useMeasureElement","width","setWidth","useState","container","useRef","undefined","resizeObserverRef","targetDocument","handleResize","useCallback","containerWidth","current","getBoundingClientRect","measureElementRef","el","unobserve","parentElement","observe","useEffect","createResizeObserverFromDocument","disconnect","callback","defaultView","ResizeObserver"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAElF;;;;;CAKC,GACD,OAAO,SAASC;IACd,MAAM,CAACC,OAAOC,SAAS,GAAGL,MAAMM,QAAQ,CAAC;IAEzC,MAAMC,YAAYP,MAAMQ,MAAM,CAA0BC;IAExD,MAAMC,oBAAoBV,MAAMQ,MAAM,CAAwB;IAE9D,MAAM,EAAEG,cAAc,EAAE,GAAGT;IAE3B,kCAAkC;IAClC,MAAMU,eAAeZ,MAAMa,WAAW,CAAC;YACdN;QAAvB,MAAMO,kBAAiBP,qBAAAA,UAAUQ,OAAO,cAAjBR,yCAAAA,mBAAmBS,qBAAqB,GAAGZ,KAAK;QACvEC,SAASS,kBAAkB;IAC7B,GAAG,EAAE;IAEL,MAAMG,oBAAoBjB,MAAMa,WAAW,CACzC,CAACK;QACC,IAAI,CAACP,gBAAgB;YACnB;QACF;QAEA,+CAA+C;QAC/C,IAAI,CAACO,MAAMR,kBAAkBK,OAAO,IAAIR,UAAUQ,OAAO,EAAE;YACzDL,kBAAkBK,OAAO,CAACI,SAAS,CAACZ,UAAUQ,OAAO;QACvD;QAEAR,UAAUQ,OAAO,GAAGN;QAEpB,IAAIS,eAAAA,yBAAAA,GAAIE,aAAa,EAAE;gBAGrBV;YAFAH,UAAUQ,OAAO,GAAGG,GAAGE,aAAa;YACpCR;aACAF,6BAAAA,kBAAkBK,OAAO,cAAzBL,iDAAAA,2BAA2BW,OAAO,CAACd,UAAUQ,OAAO;QACtD;IACF,GACA;QAACJ;QAAgBC;KAAa;IAGhCZ,MAAMsB,SAAS,CAAC;QACdZ,kBAAkBK,OAAO,GAAGQ,iCAAiCZ,gBAAgBC;QAE7E,IAAI,CAACL,UAAUQ,OAAO,IAAI,CAACL,kBAAkBK,OAAO,EAAE;YACpD;QACF;QAEAL,kBAAkBK,OAAO,CAACM,OAAO,CAACd,UAAUQ,OAAO;QAEnD,OAAO;gBACLL;aAAAA,6BAAAA,kBAAkBK,OAAO,cAAzBL,iDAAAA,2BAA2Bc,UAAU;QACvC;IACF,GAAG;QAACZ;QAAcD;KAAe;IAEjC,OAAO;QAAEP;QAAOa;IAAkB;AACpC;AAEA;;;;;;CAMC,GACD,OAAO,SAASM,iCACdZ,cAA2C,EAC3Cc,QAAgC;QAE3Bd;IAAL,IAAI,EAACA,2BAAAA,sCAAAA,8BAAAA,eAAgBe,WAAW,cAA3Bf,kDAAAA,4BAA6BgB,cAAc,GAAE;QAChD,OAAO;IACT;IAEA,OAAO,IAAIhB,eAAee,WAAW,CAACC,cAAc,CAACF;AACvD"}
@@ -22,8 +22,6 @@ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
22
22
  function useMeasureElement() {
23
23
  const [width, setWidth] = _react.useState(0);
24
24
  const container = _react.useRef(undefined);
25
- // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286
26
- // eslint-disable-next-line no-restricted-globals
27
25
  const resizeObserverRef = _react.useRef(null);
28
26
  const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)();
29
27
  // the handler for resize observer
@@ -1 +1 @@
1
- {"version":3,"sources":["useMeasureElement.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureElement<TElement extends HTMLElement = HTMLElement>() {\n const [width, setWidth] = React.useState(0);\n\n const container = React.useRef<HTMLElement | undefined>(undefined);\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n\n const { targetDocument } = useFluent();\n\n // the handler for resize observer\n const handleResize = React.useCallback(() => {\n const containerWidth = container.current?.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n\n const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument) {\n return;\n }\n\n // if the element is removed, stop observing it\n if (!el && resizeObserverRef.current && container.current) {\n resizeObserverRef.current.unobserve(container.current);\n }\n\n container.current = undefined;\n\n if (el?.parentElement) {\n container.current = el.parentElement;\n handleResize();\n resizeObserverRef.current?.observe(container.current);\n }\n },\n [targetDocument, handleResize],\n );\n\n React.useEffect(() => {\n resizeObserverRef.current = createResizeObserverFromDocument(targetDocument, handleResize);\n\n if (!container.current || !resizeObserverRef.current) {\n return;\n }\n\n resizeObserverRef.current.observe(container.current);\n\n return () => {\n resizeObserverRef.current?.disconnect();\n };\n }, [handleResize, targetDocument]);\n\n return { width, measureElementRef };\n}\n\n/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */\nexport function createResizeObserverFromDocument(\n targetDocument: Document | null | undefined,\n callback: ResizeObserverCallback,\n) {\n if (!targetDocument?.defaultView?.ResizeObserver) {\n return null;\n }\n\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["createResizeObserverFromDocument","useMeasureElement","width","setWidth","React","useState","container","useRef","undefined","resizeObserverRef","targetDocument","useFluent","handleResize","useCallback","containerWidth","current","getBoundingClientRect","measureElementRef","el","unobserve","parentElement","observe","useEffect","disconnect","callback","defaultView","ResizeObserver"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAuEgBA,gCAAAA;eAAAA;;IA9DAC,iBAAAA;eAAAA;;;;iEATO;qCACyB;AAQzC,SAASA;IACd,MAAM,CAACC,OAAOC,SAAS,GAAGC,OAAMC,QAAQ,CAAC;IAEzC,MAAMC,YAAYF,OAAMG,MAAM,CAA0BC;IACxD,8FAA8F;IAC9F,iDAAiD;IACjD,MAAMC,oBAAoBL,OAAMG,MAAM,CAAwB;IAE9D,MAAM,EAAEG,cAAc,EAAE,GAAGC,IAAAA,uCAAAA;IAE3B,kCAAkC;IAClC,MAAMC,eAAeR,OAAMS,WAAW,CAAC;YACdP;QAAvB,MAAMQ,iBAAAA,AAAiBR,CAAAA,qBAAAA,UAAUS,OAAO,AAAPA,MAAO,QAAjBT,uBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,mBAAmBU,qBAAqB,GAAGd,KAAK;QACvEC,SAASW,kBAAkB;IAC7B,GAAG,EAAE;IAEL,MAAMG,oBAAoBb,OAAMS,WAAW,CACzC,CAACK;QACC,IAAI,CAACR,gBAAgB;YACnB;QACF;QAEA,+CAA+C;QAC/C,IAAI,CAACQ,MAAMT,kBAAkBM,OAAO,IAAIT,UAAUS,OAAO,EAAE;YACzDN,kBAAkBM,OAAO,CAACI,SAAS,CAACb,UAAUS,OAAO;QACvD;QAEAT,UAAUS,OAAO,GAAGP;QAEpB,IAAIU,OAAAA,QAAAA,OAAAA,KAAAA,IAAAA,KAAAA,IAAAA,GAAIE,aAAa,EAAE;gBAGrBX;YAFAH,UAAUS,OAAO,GAAGG,GAAGE,aAAa;YACpCR;YACAH,CAAAA,6BAAAA,kBAAkBM,OAAO,AAAPA,MAAO,QAAzBN,+BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,2BAA2BY,OAAO,CAACf,UAAUS,OAAO;QACtD;IACF,GACA;QAACL;QAAgBE;KAAa;IAGhCR,OAAMkB,SAAS,CAAC;QACdb,kBAAkBM,OAAO,GAAGf,iCAAiCU,gBAAgBE;QAE7E,IAAI,CAACN,UAAUS,OAAO,IAAI,CAACN,kBAAkBM,OAAO,EAAE;YACpD;QACF;QAEAN,kBAAkBM,OAAO,CAACM,OAAO,CAACf,UAAUS,OAAO;QAEnD,OAAO;gBACLN;YAAAA,CAAAA,6BAAAA,kBAAkBM,OAAO,AAAPA,MAAO,QAAzBN,+BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,2BAA2Bc,UAAU;QACvC;IACF,GAAG;QAACX;QAAcF;KAAe;IAEjC,OAAO;QAAER;QAAOe;IAAkB;AACpC;AASO,SAASjB,iCACdU,cAA2C,EAC3Cc,QAAgC;QAE3Bd;IAAL,IAAI,CAACA,CAAAA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,8BAAAA,eAAgBe,WAAW,AAAXA,MAAW,QAA3Bf,gCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,4BAA6BgB,cAAc,AAAdA,GAAgB;QAChD,OAAO;IACT;IAEA,OAAO,IAAIhB,eAAee,WAAW,CAACC,cAAc,CAACF;AACvD"}
1
+ {"version":3,"sources":["useMeasureElement.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureElement<TElement extends HTMLElement = HTMLElement>() {\n const [width, setWidth] = React.useState(0);\n\n const container = React.useRef<HTMLElement | undefined>(undefined);\n\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n\n const { targetDocument } = useFluent();\n\n // the handler for resize observer\n const handleResize = React.useCallback(() => {\n const containerWidth = container.current?.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n\n const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument) {\n return;\n }\n\n // if the element is removed, stop observing it\n if (!el && resizeObserverRef.current && container.current) {\n resizeObserverRef.current.unobserve(container.current);\n }\n\n container.current = undefined;\n\n if (el?.parentElement) {\n container.current = el.parentElement;\n handleResize();\n resizeObserverRef.current?.observe(container.current);\n }\n },\n [targetDocument, handleResize],\n );\n\n React.useEffect(() => {\n resizeObserverRef.current = createResizeObserverFromDocument(targetDocument, handleResize);\n\n if (!container.current || !resizeObserverRef.current) {\n return;\n }\n\n resizeObserverRef.current.observe(container.current);\n\n return () => {\n resizeObserverRef.current?.disconnect();\n };\n }, [handleResize, targetDocument]);\n\n return { width, measureElementRef };\n}\n\n/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */\nexport function createResizeObserverFromDocument(\n targetDocument: Document | null | undefined,\n callback: ResizeObserverCallback,\n) {\n if (!targetDocument?.defaultView?.ResizeObserver) {\n return null;\n }\n\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["createResizeObserverFromDocument","useMeasureElement","width","setWidth","React","useState","container","useRef","undefined","resizeObserverRef","targetDocument","useFluent","handleResize","useCallback","containerWidth","current","getBoundingClientRect","measureElementRef","el","unobserve","parentElement","observe","useEffect","disconnect","callback","defaultView","ResizeObserver"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;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GAAGf,iCAAiCU,gBAAgBE;QAE7E,IAAI,CAACN,UAAUS,OAAO,IAAI,CAACN,kBAAkBM,OAAO,EAAE;YACpD;QACF;QAEAN,kBAAkBM,OAAO,CAACM,OAAO,CAACf,UAAUS,OAAO;QAEnD,OAAO;gBACLN;YAAAA,CAAAA,6BAAAA,kBAAkBM,OAAO,AAAPA,MAAO,QAAzBN,+BAAAA,KAAAA,IAAAA,KAAAA,IAAAA,2BAA2Bc,UAAU;QACvC;IACF,GAAG;QAACX;QAAcF;KAAe;IAEjC,OAAO;QAAER;QAAOe;IAAkB;AACpC;AASO,SAASjB,iCACdU,cAA2C,EAC3Cc,QAAgC;QAE3Bd;IAAL,IAAI,CAACA,CAAAA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,CAAAA,8BAAAA,eAAgBe,WAAW,AAAXA,MAAW,QAA3Bf,gCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,4BAA6BgB,cAAc,AAAdA,GAAgB;QAChD,OAAO;IACT;IAEA,OAAO,IAAIhB,eAAee,WAAW,CAACC,cAAc,CAACF;AACvD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-table",
3
- "version": "9.15.19",
3
+ "version": "9.15.20",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -37,17 +37,17 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@fluentui/keyboard-keys": "^9.0.7",
40
- "@fluentui/react-aria": "^9.13.7",
41
- "@fluentui/react-avatar": "^9.6.40",
42
- "@fluentui/react-checkbox": "^9.2.38",
43
- "@fluentui/react-context-selector": "^9.1.67",
40
+ "@fluentui/react-aria": "^9.13.8",
41
+ "@fluentui/react-avatar": "^9.6.41",
42
+ "@fluentui/react-checkbox": "^9.2.39",
43
+ "@fluentui/react-context-selector": "^9.1.68",
44
44
  "@fluentui/react-icons": "^2.0.245",
45
- "@fluentui/react-radio": "^9.2.33",
46
- "@fluentui/react-shared-contexts": "^9.20.1",
47
- "@fluentui/react-tabster": "^9.22.8",
48
- "@fluentui/react-theme": "^9.1.20",
49
- "@fluentui/react-utilities": "^9.18.15",
50
- "@fluentui/react-jsx-runtime": "^9.0.44",
45
+ "@fluentui/react-radio": "^9.2.34",
46
+ "@fluentui/react-shared-contexts": "^9.20.2",
47
+ "@fluentui/react-tabster": "^9.22.9",
48
+ "@fluentui/react-theme": "^9.1.21",
49
+ "@fluentui/react-utilities": "^9.18.16",
50
+ "@fluentui/react-jsx-runtime": "^9.0.45",
51
51
  "@griffel/react": "^1.5.22",
52
52
  "@swc/helpers": "^0.5.1"
53
53
  },