@fluentui/react-table 9.10.1 → 9.10.3
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 +145 -1
- package/CHANGELOG.md +39 -2
- package/lib/components/Table/useTable.js +6 -3
- package/lib/components/Table/useTable.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js +6 -3
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js +6 -3
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCell/useTableCellStyles.styles.js +1 -2
- package/lib/components/TableCell/useTableCellStyles.styles.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActions.js +6 -3
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayout.js +6 -3
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib/components/TableHeader/useTableHeader.js +6 -3
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +5 -2
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableResizeHandle/useTableResizeHandle.js +6 -3
- package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js +5 -2
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/components/TableRow/useTableRowStyles.styles.js +2 -5
- package/lib/components/TableRow/useTableRowStyles.styles.js.map +1 -1
- package/lib/hooks/useMeasureElement.js +3 -4
- package/lib/hooks/useMeasureElement.js.map +1 -1
- package/lib-commonjs/components/Table/useTable.js +5 -2
- package/lib-commonjs/components/Table/useTable.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js +5 -2
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js +5 -2
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js +0 -2
- package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js +5 -2
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +5 -2
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeader.js +5 -2
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +4 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +5 -2
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js +4 -1
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js +1 -5
- package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
- package/lib-commonjs/hooks/useMeasureElement.js +3 -4
- package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMeasureElement.js"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\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 */ export function useMeasureElement() {\n const [width, setWidth] = React.useState(0);\n const container = React.useRef(undefined);\n const { targetDocument } = useFluent();\n // the handler for resize observer\n const handleResize = React.useCallback(()=>{\n var _container_current;\n const containerWidth = (_container_current = container.current) === null || _container_current === void 0 ? void 0 : _container_current.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver] = React.useState(canUseDOM() ? new ResizeObserver(handleResize) : undefined);\n const measureElementRef = React.useCallback((el)=>{\n if (!targetDocument || !resizeObserver) {\n return;\n }\n // cleanup previous container\n if (container.current) {\n resizeObserver.unobserve(container.current);\n
|
|
1
|
+
{"version":3,"sources":["useMeasureElement.js"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\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 */ export function useMeasureElement() {\n const [width, setWidth] = React.useState(0);\n const container = React.useRef(undefined);\n const { targetDocument } = useFluent();\n // the handler for resize observer\n const handleResize = React.useCallback(()=>{\n var _container_current;\n const containerWidth = (_container_current = container.current) === null || _container_current === void 0 ? void 0 : _container_current.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver] = React.useState(canUseDOM() ? new ResizeObserver(handleResize) : undefined);\n const measureElementRef = React.useCallback((el)=>{\n if (!targetDocument || !resizeObserver) {\n return;\n }\n // cleanup previous container\n if (container.current) {\n resizeObserver.unobserve(container.current);\n }\n container.current = undefined;\n if (el === null || el === void 0 ? void 0 : el.parentElement) {\n container.current = el.parentElement;\n resizeObserver.observe(container.current);\n handleResize();\n }\n }, [\n targetDocument,\n resizeObserver,\n handleResize\n ]);\n React.useEffect(()=>{\n return ()=>resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();\n }, [\n resizeObserver\n ]);\n return {\n width,\n measureElementRef\n };\n}\n"],"names":["useMeasureElement","width","setWidth","React","useState","container","useRef","undefined","targetDocument","useFluent","handleResize","useCallback","_container_current","containerWidth","current","getBoundingClientRect","resizeObserver","canUseDOM","ResizeObserver","measureElementRef","el","unobserve","parentElement","observe","useEffect","disconnect"],"mappings":";;;;+BAQoBA;;;eAAAA;;;;gCARM;iEACH;qCACyB;AAMrC,SAASA;IAChB,MAAM,CAACC,OAAOC,SAAS,GAAGC,OAAMC,QAAQ,CAAC;IACzC,MAAMC,YAAYF,OAAMG,MAAM,CAACC;IAC/B,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,uCAAS;IACpC,kCAAkC;IAClC,MAAMC,eAAeP,OAAMQ,WAAW,CAAC;QACnC,IAAIC;QACJ,MAAMC,iBAAiB,AAACD,CAAAA,qBAAqBP,UAAUS,OAAO,AAAD,MAAO,QAAQF,uBAAuB,KAAK,IAAI,KAAK,IAAIA,mBAAmBG,qBAAqB,GAAGd,KAAK;QACrKC,SAASW,kBAAkB;IAC/B,GAAG,EAAE;IACL,uFAAuF;IACvF,MAAM,CAACG,eAAe,GAAGb,OAAMC,QAAQ,CAACa,IAAAA,yBAAS,MAAK,IAAIC,eAAeR,gBAAgBH;IACzF,MAAMY,oBAAoBhB,OAAMQ,WAAW,CAAC,CAACS;QACzC,IAAI,CAACZ,kBAAkB,CAACQ,gBAAgB;YACpC;QACJ;QACA,6BAA6B;QAC7B,IAAIX,UAAUS,OAAO,EAAE;YACnBE,eAAeK,SAAS,CAAChB,UAAUS,OAAO;QAC9C;QACAT,UAAUS,OAAO,GAAGP;QACpB,IAAIa,OAAO,QAAQA,OAAO,KAAK,IAAI,KAAK,IAAIA,GAAGE,aAAa,EAAE;YAC1DjB,UAAUS,OAAO,GAAGM,GAAGE,aAAa;YACpCN,eAAeO,OAAO,CAAClB,UAAUS,OAAO;YACxCJ;QACJ;IACJ,GAAG;QACCF;QACAQ;QACAN;KACH;IACDP,OAAMqB,SAAS,CAAC;QACZ,OAAO,IAAIR,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeS,UAAU;IACxG,GAAG;QACCT;KACH;IACD,OAAO;QACHf;QACAkB;IACJ;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-table",
|
|
3
|
-
"version": "9.10.
|
|
3
|
+
"version": "9.10.3",
|
|
4
4
|
"description": "React components for building web experiences",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fluentui/keyboard-keys": "^9.0.6",
|
|
39
|
-
"@fluentui/react-aria": "^9.3.
|
|
40
|
-
"@fluentui/react-avatar": "^9.5.
|
|
41
|
-
"@fluentui/react-checkbox": "^9.1.
|
|
42
|
-
"@fluentui/react-context-selector": "^9.1.
|
|
39
|
+
"@fluentui/react-aria": "^9.3.41",
|
|
40
|
+
"@fluentui/react-avatar": "^9.5.38",
|
|
41
|
+
"@fluentui/react-checkbox": "^9.1.48",
|
|
42
|
+
"@fluentui/react-context-selector": "^9.1.39",
|
|
43
43
|
"@fluentui/react-icons": "^2.0.217",
|
|
44
|
-
"@fluentui/react-radio": "^9.1.
|
|
45
|
-
"@fluentui/react-shared-contexts": "^9.
|
|
46
|
-
"@fluentui/react-tabster": "^9.13.
|
|
44
|
+
"@fluentui/react-radio": "^9.1.48",
|
|
45
|
+
"@fluentui/react-shared-contexts": "^9.10.0",
|
|
46
|
+
"@fluentui/react-tabster": "^9.13.5",
|
|
47
47
|
"@fluentui/react-theme": "^9.1.14",
|
|
48
|
-
"@fluentui/react-utilities": "^9.14.
|
|
49
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
48
|
+
"@fluentui/react-utilities": "^9.14.2",
|
|
49
|
+
"@fluentui/react-jsx-runtime": "^9.0.15",
|
|
50
50
|
"@griffel/react": "^1.5.14",
|
|
51
51
|
"@swc/helpers": "^0.5.1"
|
|
52
52
|
},
|