Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DataGrid", {
enumerable: true,
get: function() {
return DataGrid;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDataGrid = require("./useDataGrid");
const _renderDataGrid = require("./renderDataGrid");
const _useDataGridStylesstyles = require("./useDataGridStyles.styles");
const _useDataGridContextValues = require("./useDataGridContextValues");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DataGrid = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDataGrid.useDataGrid_unstable)(props, ref);
(0, _useDataGridStylesstyles.useDataGridStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDataGridStyles_unstable')(state);
return (0, _renderDataGrid.renderDataGrid_unstable)(state, (0, _useDataGridContextValues.useDataGridContextValues_unstable)(state));
});
DataGrid.displayName = 'DataGrid';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGrid/DataGrid.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGrid_unstable } from './useDataGrid';\nimport { renderDataGrid_unstable } from './renderDataGrid';\nimport { useDataGridStyles_unstable } from './useDataGridStyles.styles';\nimport type { DataGridProps } from './DataGrid.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDataGridContextValues_unstable } from './useDataGridContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGrid component\n */\nexport const DataGrid: ForwardRefComponent<DataGridProps> = React.forwardRef((props, ref) => {\n const state = useDataGrid_unstable(props, ref);\n\n useDataGridStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridStyles_unstable')(state);\n\n return renderDataGrid_unstable(state, useDataGridContextValues_unstable(state));\n});\n\nDataGrid.displayName = 'DataGrid';\n"],"names":["DataGrid","React","forwardRef","props","ref","state","useDataGrid_unstable","useDataGridStyles_unstable","useCustomStyleHook_unstable","renderDataGrid_unstable","useDataGridContextValues_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;6BACc;gCACG;yCACG;0CAGO;qCACN;AAKrC,MAAMA,WAAAA,WAAAA,GAA+CC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQC,IAAAA,iCAAAA,EAAqBH,OAAOC;IAE1CG,IAAAA,mDAAAA,EAA2BF;IAE3BG,IAAAA,gDAAAA,EAA4B,8BAA8BH;IAE1D,OAAOI,IAAAA,uCAAAA,EAAwBJ,OAAOK,IAAAA,2DAAAA,EAAkCL;AAC1E;AAEAL,SAASW,WAAW,GAAG"}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGrid/DataGrid.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { SelectionHookParams, SelectionMode } from '@fluentui/react-utilities';\nimport { TabsterDOMAttribute } from '@fluentui/react-tabster';\nimport type { TableContextValues, TableProps, TableSlots, TableState } from '../Table/Table.types';\nimport type {\n SortState,\n TableFeaturesState,\n UseTableSortOptions,\n OnSelectionChangeData,\n TableColumnSizingOptions,\n TableColumnId,\n} from '../../hooks';\nimport { TableRowProps } from '../TableRow/TableRow.types';\n\nexport type DataGridSlots = TableSlots;\n\nexport type DataGridFocusMode = 'none' | 'cell' | 'row_unstable' | 'composite';\n\nexport type DataGridContextValues = TableContextValues & {\n dataGrid: DataGridContextValue;\n};\n\n// Use any here since we can't know the user types\n// The user is responsible for narrowing the type downstream\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type DataGridContextValue = TableFeaturesState<any> & {\n /**\n * How focus navigation will work in the datagrid\n * @default cell\n */\n focusMode: DataGridFocusMode;\n\n /**\n * Lets child components know if rows selection is enabled\n * @see selectionMode prop enables row selection on the component\n */\n selectableRows: boolean;\n\n /**\n * Enables subtle selection style\n * @default false\n */\n subtleSelection: boolean;\n\n /**\n * Row appearance when selected\n * @default brand\n */\n selectionAppearance: TableRowProps['appearance'];\n\n /**\n * Enables column resizing\n */\n resizableColumns?: boolean;\n\n compositeRowTabsterAttribute: TabsterDOMAttribute;\n};\n\n/**\n * DataGrid Props\n */\nexport type DataGridProps = TableProps &\n Pick<DataGridContextValue, 'items' | 'columns' | 'getRowId'> &\n Pick<Partial<DataGridContextValue>, 'focusMode' | 'subtleSelection' | 'selectionAppearance' | 'resizableColumns'> &\n Pick<UseTableSortOptions, 'sortState' | 'defaultSortState'> &\n Pick<SelectionHookParams, 'defaultSelectedItems' | 'selectedItems'> & {\n /* eslint-disable @nx/workspace-consistent-callback-type -- can't change type of existing callback */\n onSortChange?: (e: React.MouseEvent, sortState: SortState) => void;\n onSelectionChange?: (e: React.MouseEvent | React.KeyboardEvent, data: OnSelectionChangeData) => void;\n /* eslint-enable @nx/workspace-consistent-callback-type */\n\n /**\n * Enables row selection and sets the selection mode\n * @default false\n */\n selectionMode?: SelectionMode;\n /**\n * Options for column resizing, specific for each column\n */\n columnSizingOptions?: TableColumnSizingOptions;\n /**\n * A callback triggered when a column is resized.\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onColumnResize?: (\n e: KeyboardEvent | TouchEvent | MouseEvent | undefined,\n data: { columnId: TableColumnId; width: number },\n ) => void;\n /**\n * For column resizing. Allows for a container size to be adjusted by a number of pixels, to make\n * sure the columns don't overflow the table.\n * By default, this value is calculated internally based on other props, but can be overriden.\n */\n containerWidthOffset?: number;\n\n /**\n * Custom options for column resizing.\n */\n resizableColumnsOptions?: {\n /**\n * If true, columns will be auto-fitted to the container width.\n * @default true\n * */\n autoFitColumns?: boolean;\n };\n };\n\n/**\n * State used in rendering DataGrid\n */\nexport type DataGridState = TableState & { tableState: TableFeaturesState<unknown> } & Pick<\n DataGridContextValue,\n | 'focusMode'\n | 'selectableRows'\n | 'subtleSelection'\n | 'selectionAppearance'\n | 'getRowId'\n | 'resizableColumns'\n | 'compositeRowTabsterAttribute'\n >;\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DataGrid: function() {
return _DataGrid.DataGrid;
},
dataGridClassNames: function() {
return _useDataGridStylesstyles.dataGridClassNames;
},
renderDataGrid_unstable: function() {
return _renderDataGrid.renderDataGrid_unstable;
},
useDataGridContextValues_unstable: function() {
return _useDataGridContextValues.useDataGridContextValues_unstable;
},
useDataGridStyles_unstable: function() {
return _useDataGridStylesstyles.useDataGridStyles_unstable;
},
useDataGrid_unstable: function() {
return _useDataGrid.useDataGrid_unstable;
}
});
const _DataGrid = require("./DataGrid");
const _renderDataGrid = require("./renderDataGrid");
const _useDataGrid = require("./useDataGrid");
const _useDataGridStylesstyles = require("./useDataGridStyles.styles");
const _useDataGridContextValues = require("./useDataGridContextValues");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGrid/index.ts"],"sourcesContent":["export { DataGrid } from './DataGrid';\nexport type {\n DataGridContextValue,\n DataGridContextValues,\n DataGridFocusMode,\n DataGridProps,\n DataGridSlots,\n DataGridState,\n} from './DataGrid.types';\nexport { renderDataGrid_unstable } from './renderDataGrid';\nexport { useDataGrid_unstable } from './useDataGrid';\nexport { dataGridClassNames, useDataGridStyles_unstable } from './useDataGridStyles.styles';\nexport { useDataGridContextValues_unstable } from './useDataGridContextValues';\n"],"names":["DataGrid","dataGridClassNames","renderDataGrid_unstable","useDataGridContextValues_unstable","useDataGridStyles_unstable","useDataGrid_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,QAAQ;eAARA,kBAAQ;;IAWRC,kBAAkB;eAAlBA,2CAAkB;;IAFlBC,uBAAuB;eAAvBA,uCAAuB;;IAGvBC,iCAAiC;eAAjCA,2DAAiC;;IADbC,0BAA0B;eAA1BA,mDAA0B;;IAD9CC,oBAAoB;eAApBA,iCAAoB;;;0BAVJ;gCASe;6BACH;yCAC0B;0CACb"}
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDataGrid_unstable", {
enumerable: true,
get: function() {
return renderDataGrid_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _renderTable = require("../Table/renderTable");
const _dataGridContext = require("../../contexts/dataGridContext");
const renderDataGrid_unstable = (state, contextValues)=>{
return /*#__PURE__*/ _react.createElement(_dataGridContext.DataGridContextProvider, {
value: contextValues.dataGrid
}, (0, _renderTable.renderTable_unstable)(state, contextValues));
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGrid/renderDataGrid.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridContextValues, DataGridState } from './DataGrid.types';\nimport { renderTable_unstable } from '../Table/renderTable';\nimport { DataGridContextProvider } from '../../contexts/dataGridContext';\n\n/**\n * Render the final JSX of DataGrid\n */\nexport const renderDataGrid_unstable = (state: DataGridState, contextValues: DataGridContextValues) => {\n return (\n <DataGridContextProvider value={contextValues.dataGrid}>\n {renderTable_unstable(state, contextValues)}\n </DataGridContextProvider>\n );\n};\n"],"names":["renderDataGrid_unstable","state","contextValues","React","createElement","DataGridContextProvider","value","dataGrid","renderTable_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;6BAEc;iCACG;AAKjC,MAAMA,0BAA0B,CAACC,OAAsBC;IAC5D,OAAA,WAAA,GACEC,OAAAC,aAAA,CAACC,wCAAAA,EAAAA;QAAwBC,OAAOJ,cAAcK,QAAQ;OACnDC,IAAAA,iCAAAA,EAAqBP,OAAOC;AAGnC"}
@@ -0,0 +1,100 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDataGrid_unstable", {
enumerable: true,
get: function() {
return useDataGrid_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reacttabster = require("@fluentui/react-tabster");
const _useTable = require("../Table/useTable");
const _reactutilities = require("@fluentui/react-utilities");
const _keyboardkeys = require("@fluentui/keyboard-keys");
const _hooks = require("../../hooks");
const _TableSelectionCell = require("../TableSelectionCell");
const useDataGrid_unstable = (props, ref)=>{
const { items, columns, focusMode = 'cell', selectionMode, onSortChange, onSelectionChange, defaultSortState, sortState, selectedItems, defaultSelectedItems, subtleSelection = false, selectionAppearance = 'brand', getRowId, resizableColumns, columnSizingOptions, onColumnResize, containerWidthOffset, resizableColumnsOptions = {} } = props;
const widthOffset = containerWidthOffset !== null && containerWidthOffset !== void 0 ? containerWidthOffset : selectionMode ? -_TableSelectionCell.CELL_WIDTH : 0;
const gridTabsterAttribute = (0, _reacttabster.useArrowNavigationGroup)({
axis: 'grid'
});
const { onTableKeyDown: onCompositeKeyDown, tableTabsterAttribute: compositeTabsterAttribute, tableRowTabsterAttribute: compositeRowTabsterAttribute } = (0, _hooks.useTableCompositeNavigation)();
var _resizableColumnsOptions_autoFitColumns;
const tableState = (0, _hooks.useTableFeatures)({
items,
columns,
getRowId
}, [
(0, _hooks.useTableSort)({
defaultSortState,
sortState,
onSortChange
}),
(0, _hooks.useTableSelection)({
defaultSelectedItems,
selectedItems,
onSelectionChange,
selectionMode: selectionMode !== null && selectionMode !== void 0 ? selectionMode : 'multiselect'
}),
(0, _hooks.useTableColumnSizing_unstable)({
onColumnResize,
columnSizingOptions,
// The selection cell is not part of the columns, therefore its width needs to be subtracted
// from the container to make sure the columns don't overflow the table.
containerWidthOffset: widthOffset,
// Disables automatic resizing of columns when the container overflows.
// This allows the sum of the columns to be larger than the container.
autoFitColumns: (_resizableColumnsOptions_autoFitColumns = resizableColumnsOptions.autoFitColumns) !== null && _resizableColumnsOptions_autoFitColumns !== void 0 ? _resizableColumnsOptions_autoFitColumns : true
})
]);
const innerRef = _react.useRef(null);
const { findFirstFocusable, findLastFocusable } = (0, _reacttabster.useFocusFinders)();
const onKeyDown = (0, _reactutilities.useEventCallback)((e)=>{
var _props_onKeyDown;
(_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, e);
focusMode === 'composite' && onCompositeKeyDown(e);
// handle ctrl+home and ctrl+end
if (!innerRef.current || !e.ctrlKey || e.defaultPrevented) {
return;
}
if (e.key === _keyboardkeys.Home) {
const firstRow = innerRef.current.querySelector('[role="row"]');
if (firstRow) {
var _findFirstFocusable;
(_findFirstFocusable = findFirstFocusable(firstRow)) === null || _findFirstFocusable === void 0 ? void 0 : _findFirstFocusable.focus();
}
}
if (e.key === _keyboardkeys.End) {
const rows = innerRef.current.querySelectorAll('[role="row"]');
if (rows.length) {
var _findLastFocusable;
const lastRow = rows.item(rows.length - 1);
(_findLastFocusable = findLastFocusable(lastRow)) === null || _findLastFocusable === void 0 ? void 0 : _findLastFocusable.focus();
}
}
});
const baseTableState = (0, _useTable.useTable_unstable)({
role: 'grid',
as: 'div',
noNativeElements: true,
...focusMode === 'cell' && gridTabsterAttribute,
...focusMode === 'composite' && compositeTabsterAttribute,
...props,
onKeyDown,
...resizableColumns ? tableState.columnSizing_unstable.getTableProps(props) : {}
}, (0, _reactutilities.useMergedRefs)(ref, tableState.tableRef, innerRef));
return {
...baseTableState,
focusMode,
tableState,
selectableRows: !!selectionMode,
subtleSelection,
selectionAppearance,
resizableColumns,
compositeRowTabsterAttribute
};
};
File diff suppressed because one or more lines are too long
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDataGridContextValues_unstable", {
enumerable: true,
get: function() {
return useDataGridContextValues_unstable;
}
});
const _useTableContextValues = require("../Table/useTableContextValues");
function useDataGridContextValues_unstable(state) {
const tableContextValues = (0, _useTableContextValues.useTableContextValues_unstable)(state);
const { tableState, focusMode, selectableRows, subtleSelection, selectionAppearance, resizableColumns, compositeRowTabsterAttribute } = state;
return {
...tableContextValues,
dataGrid: {
...tableState,
focusMode,
selectableRows,
subtleSelection,
selectionAppearance,
resizableColumns,
compositeRowTabsterAttribute
}
};
}
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGrid/useDataGridContextValues.ts"],"sourcesContent":["import { useTableContextValues_unstable } from '../Table/useTableContextValues';\nimport { DataGridContextValues, DataGridState } from './DataGrid.types';\n\nexport function useDataGridContextValues_unstable(state: DataGridState): DataGridContextValues {\n const tableContextValues = useTableContextValues_unstable(state);\n const {\n tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n } = state;\n return {\n ...tableContextValues,\n dataGrid: {\n ...tableState,\n focusMode,\n selectableRows,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n compositeRowTabsterAttribute,\n },\n };\n}\n"],"names":["useDataGridContextValues_unstable","state","tableContextValues","useTableContextValues_unstable","tableState","focusMode","selectableRows","subtleSelection","selectionAppearance","resizableColumns","compositeRowTabsterAttribute","dataGrid"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;uCAH+B;AAGxC,SAASA,kCAAkCC,KAAoB;IACpE,MAAMC,qBAAqBC,IAAAA,qDAAAA,EAA+BF;IAC1D,MAAM,EACJG,UAAU,EACVC,SAAS,EACTC,cAAc,EACdC,eAAe,EACfC,mBAAmB,EACnBC,gBAAgB,EAChBC,4BAA4B,EAC7B,GAAGT;IACJ,OAAO;QACL,GAAGC,kBAAkB;QACrBS,UAAU;YACR,GAAGP,UAAU;YACbC;YACAC;YACAC;YACAC;YACAC;YACAC;QACF;IACF;AACF"}
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dataGridClassNames: function() {
return dataGridClassNames;
},
useDataGridStyles_unstable: function() {
return useDataGridStyles_unstable;
}
});
const _react = require("@griffel/react");
const _useTableStylesstyles = require("../Table/useTableStyles.styles");
const dataGridClassNames = {
root: 'fui-DataGrid'
};
const useDataGridStyles_unstable = (state)=>{
'use no memo';
(0, _useTableStylesstyles.useTableStyles_unstable)(state);
state.root.className = (0, _react.mergeClasses)(dataGridClassNames.root, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDataGridStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableStyles_unstable } from '../Table/useTableStyles.styles';\nexport const dataGridClassNames = {\n root: 'fui-DataGrid'\n};\n/**\n * Apply styling to the DataGrid slots based on the state\n */ export const useDataGridStyles_unstable = (state)=>{\n 'use no memo';\n useTableStyles_unstable(state);\n state.root.className = mergeClasses(dataGridClassNames.root, state.root.className);\n return state;\n};\n"],"names":["dataGridClassNames","useDataGridStyles_unstable","root","state","useTableStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,kBAAkB;eAAlBA;;IAKIC,0BAA0B;eAA1BA;;;uBAPY;sCACW;AACjC,MAAMD,qBAAqB;IAC9BE,MAAM;AACV;AAGW,MAAMD,6BAA8BE,CAAAA;IAC3C;IACAC,IAAAA,6CAAuB,EAACD;IACxBA,MAAMD,IAAI,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACN,mBAAmBE,IAAI,EAAEC,MAAMD,IAAI,CAACG,SAAS;IACjF,OAAOF;AACX"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DataGridBody", {
enumerable: true,
get: function() {
return DataGridBody;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDataGridBody = require("./useDataGridBody");
const _renderDataGridBody = require("./renderDataGridBody");
const _useDataGridBodyStylesstyles = require("./useDataGridBodyStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DataGridBody = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDataGridBody.useDataGridBody_unstable)(props, ref);
(0, _useDataGridBodyStylesstyles.useDataGridBodyStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDataGridBodyStyles_unstable')(state);
return (0, _renderDataGridBody.renderDataGridBody_unstable)(state);
});
DataGridBody.displayName = 'DataGridBody';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridBody/DataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridBody_unstable } from './useDataGridBody';\nimport { renderDataGridBody_unstable } from './renderDataGridBody';\nimport { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridBody component\n */\nexport const DataGridBody: ForwardRefComponent<DataGridBodyProps> &\n (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridBody_unstable(props, ref);\n\n useDataGridBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);\n\n return renderDataGridBody_unstable(state);\n}) as ForwardRefComponent<DataGridBodyProps> & (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element);\n\nDataGridBody.displayName = 'DataGridBody';\n"],"names":["DataGridBody","React","forwardRef","props","ref","state","useDataGridBody_unstable","useDataGridBodyStyles_unstable","useCustomStyleHook_unstable","renderDataGridBody_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;iCACkB;oCACG;6CACG;qCAGH;AAKrC,MAAMA,eAAAA,WAAAA,GACiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAE9CG,IAAAA,2DAAAA,EAA+BF;IAE/BG,IAAAA,gDAAAA,EAA4B,kCAAkCH;IAE9D,OAAOI,IAAAA,+CAAAA,EAA4BJ;AACrC;AAEAL,aAAaU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridBody/DataGridBody.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableRowData } from '../../hooks';\nimport type { TableBodySlots, TableBodyProps, TableBodyState } from '../TableBody/TableBody.types';\n\nexport type DataGridBodySlots = TableBodySlots;\n\nexport type RowRenderFunction<TItem = unknown> = (row: TableRowData<TItem>, ...rest: unknown[]) => React.ReactNode;\n\n/**\n * DataGridBody Props\n */\nexport type DataGridBodyProps<TItem = unknown> = Omit<TableBodyProps, 'children'> & {\n /**\n * Render function for rows\n */\n children: RowRenderFunction<TItem>;\n};\n\n/**\n * State used in rendering DataGridBody\n */\nexport type DataGridBodyState = TableBodyState & {\n rows: TableRowData<unknown>[];\n\n renderRow: RowRenderFunction;\n};\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DataGridBody: function() {
return _DataGridBody.DataGridBody;
},
dataGridBodyClassNames: function() {
return _useDataGridBodyStylesstyles.dataGridBodyClassNames;
},
renderDataGridBody_unstable: function() {
return _renderDataGridBody.renderDataGridBody_unstable;
},
useDataGridBodyStyles_unstable: function() {
return _useDataGridBodyStylesstyles.useDataGridBodyStyles_unstable;
},
useDataGridBody_unstable: function() {
return _useDataGridBody.useDataGridBody_unstable;
}
});
const _DataGridBody = require("./DataGridBody");
const _renderDataGridBody = require("./renderDataGridBody");
const _useDataGridBody = require("./useDataGridBody");
const _useDataGridBodyStylesstyles = require("./useDataGridBodyStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridBody/index.ts"],"sourcesContent":["export { DataGridBody } from './DataGridBody';\nexport type { DataGridBodyProps, DataGridBodySlots, DataGridBodyState, RowRenderFunction } from './DataGridBody.types';\nexport { renderDataGridBody_unstable } from './renderDataGridBody';\nexport { useDataGridBody_unstable } from './useDataGridBody';\nexport { dataGridBodyClassNames, useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';\n"],"names":["DataGridBody","dataGridBodyClassNames","renderDataGridBody_unstable","useDataGridBodyStyles_unstable","useDataGridBody_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,YAAY;eAAZA,0BAAY;;IAIZC,sBAAsB;eAAtBA,mDAAsB;;IAFtBC,2BAA2B;eAA3BA,+CAA2B;;IAEHC,8BAA8B;eAA9BA,2DAA8B;;IADtDC,wBAAwB;eAAxBA,yCAAwB;;;8BAHJ;oCAEe;iCACH;6CAC8B"}
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDataGridBody_unstable", {
enumerable: true,
get: function() {
return renderDataGridBody_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const _rowIdContext = require("../../contexts/rowIdContext");
const renderDataGridBody_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {
children: state.rows.map((row)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_rowIdContext.TableRowIdContextProvider, {
value: row.rowId,
children: state.renderRow(row)
}, row.rowId))
});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridBody/renderDataGridBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { TableRowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n assertSlots<DataGridBodySlots>(state);\n\n return (\n <state.root>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["renderDataGridBody_unstable","state","assertSlots","_jsx","root","rows","map","row","TableRowIdContextProvider","value","rowId","renderRow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;8BAEc;AAKnC,MAAMA,8BAA8B,CAACC;IAC1CC,IAAAA,2BAAAA,EAA+BD;IAE/B,OAAA,WAAA,GACEE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA;kBACRH,MAAMI,IAAI,CAACC,GAAG,CAACC,CAAAA,MAAAA,WAAAA,GACdJ,IAAAA,eAAA,EAACK,uCAAAA,EAAAA;gBAA0CC,OAAOF,IAAIG,KAAK;0BACxDT,MAAMU,SAAS,CAACJ;eADaA,IAAIG,KAAK;;AAMjD"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDataGridBody_unstable", {
enumerable: true,
get: function() {
return useDataGridBody_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useTableBody = require("../TableBody/useTableBody");
const _dataGridContext = require("../../contexts/dataGridContext");
const _tableContext = require("../../contexts/tableContext");
const useDataGridBody_unstable = (props, ref)=>{
const { sortable } = (0, _tableContext.useTableContext)();
const getRows = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.getRows);
const sort = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.sort.sort);
const rows = sortable ? sort(getRows()) : getRows();
const baseState = (0, _useTableBody.useTableBody_unstable)({
...props,
children: null,
as: 'div'
}, ref);
return {
...baseState,
rows,
renderRow: props.children
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridBody/useDataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridBodyProps, DataGridBodyState } from './DataGridBody.types';\nimport { useTableBody_unstable } from '../TableBody/useTableBody';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridBody.\n *\n * The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,\n * before being passed to renderDataGridBody_unstable.\n *\n * @param props - props from this instance of DataGridBody\n * @param ref - reference to root HTMLElement of DataGridBody\n */\nexport const useDataGridBody_unstable = (props: DataGridBodyProps, ref: React.Ref<HTMLElement>): DataGridBodyState => {\n const { sortable } = useTableContext();\n const getRows = useDataGridContext_unstable(ctx => ctx.getRows);\n const sort = useDataGridContext_unstable(ctx => ctx.sort.sort);\n const rows = sortable ? sort(getRows()) : getRows();\n\n const baseState = useTableBody_unstable({ ...props, children: null, as: 'div' }, ref);\n return {\n ...baseState,\n rows,\n renderRow: props.children,\n };\n};\n"],"names":["useDataGridBody_unstable","props","ref","sortable","useTableContext","getRows","useDataGridContext_unstable","ctx","sort","rows","baseState","useTableBody_unstable","children","as","renderRow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;;iEAfU;8BAEe;iCACM;8BACZ;AAWzB,MAAMA,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,QAAQ,EAAE,GAAGC,IAAAA,6BAAAA;IACrB,MAAMC,UAAUC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIF,OAAO;IAC9D,MAAMG,OAAOF,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,IAAI,CAACA,IAAI;IAC7D,MAAMC,OAAON,WAAWK,KAAKH,aAAaA;IAE1C,MAAMK,YAAYC,IAAAA,mCAAAA,EAAsB;QAAE,GAAGV,KAAK;QAAEW,UAAU;QAAMC,IAAI;IAAM,GAAGX;IACjF,OAAO;QACL,GAAGQ,SAAS;QACZD;QACAK,WAAWb,MAAMW,QAAQ;IAC3B;AACF"}
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dataGridBodyClassNames: function() {
return dataGridBodyClassNames;
},
useDataGridBodyStyles_unstable: function() {
return useDataGridBodyStyles_unstable;
}
});
const _react = require("@griffel/react");
const _useTableBodyStylesstyles = require("../TableBody/useTableBodyStyles.styles");
const dataGridBodyClassNames = {
root: 'fui-DataGridBody'
};
const useDataGridBodyStyles_unstable = (state)=>{
'use no memo';
(0, _useTableBodyStylesstyles.useTableBodyStyles_unstable)(state);
state.root.className = (0, _react.mergeClasses)(dataGridBodyClassNames.root, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDataGridBodyStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableBodyStyles_unstable } from '../TableBody/useTableBodyStyles.styles';\nexport const dataGridBodyClassNames = {\n root: 'fui-DataGridBody'\n};\n/**\n * Apply styling to the DataGridBody slots based on the state\n */ export const useDataGridBodyStyles_unstable = (state)=>{\n 'use no memo';\n useTableBodyStyles_unstable(state);\n state.root.className = mergeClasses(dataGridBodyClassNames.root, state.root.className);\n return state;\n};\n"],"names":["dataGridBodyClassNames","useDataGridBodyStyles_unstable","root","state","useTableBodyStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,sBAAsB;eAAtBA;;IAKIC,8BAA8B;eAA9BA;;;uBAPY;0CACe;AACrC,MAAMD,yBAAyB;IAClCE,MAAM;AACV;AAGW,MAAMD,iCAAkCE,CAAAA;IAC/C;IACAC,IAAAA,qDAA2B,EAACD;IAC5BA,MAAMD,IAAI,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACN,uBAAuBE,IAAI,EAAEC,MAAMD,IAAI,CAACG,SAAS;IACrF,OAAOF;AACX"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DataGridCell", {
enumerable: true,
get: function() {
return DataGridCell;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDataGridCell = require("./useDataGridCell");
const _renderDataGridCell = require("./renderDataGridCell");
const _useDataGridCellStylesstyles = require("./useDataGridCellStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DataGridCell = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDataGridCell.useDataGridCell_unstable)(props, ref);
(0, _useDataGridCellStylesstyles.useDataGridCellStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDataGridCellStyles_unstable')(state);
return (0, _renderDataGridCell.renderDataGridCell_unstable)(state);
});
DataGridCell.displayName = 'DataGridCell';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridCell/DataGridCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridCell_unstable } from './useDataGridCell';\nimport { renderDataGridCell_unstable } from './renderDataGridCell';\nimport { useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';\nimport type { DataGridCellProps } from './DataGridCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridCell component\n */\nexport const DataGridCell: ForwardRefComponent<DataGridCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridCell_unstable(props, ref);\n\n useDataGridCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);\n\n return renderDataGridCell_unstable(state);\n});\n\nDataGridCell.displayName = 'DataGridCell';\n"],"names":["DataGridCell","React","forwardRef","props","ref","state","useDataGridCell_unstable","useDataGridCellStyles_unstable","useCustomStyleHook_unstable","renderDataGridCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;iCACkB;oCACG;6CACG;qCAGH;AAKrC,MAAMA,eAAAA,WAAAA,GAAuDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3F,MAAMC,QAAQC,IAAAA,yCAAAA,EAAyBH,OAAOC;IAE9CG,IAAAA,2DAAAA,EAA+BF;IAE/BG,IAAAA,gDAAAA,EAA4B,kCAAkCH;IAE9D,OAAOI,IAAAA,+CAAAA,EAA4BJ;AACrC;AAEAL,aAAaU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering DataGridCell
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridCell/DataGridCell.types.ts"],"sourcesContent":["import { TableCellProps, TableCellSlots, TableCellState } from '../TableCell/TableCell.types';\n\nexport type DataGridCellSlots = TableCellSlots;\n\n/**\n * Used when there are nested focusble elements inside a focusable cell\n * - `group`: Enter keypress moves focus inside the cell, focus is trapped inside the cell until Escape keypress\n * - `cell`: The cell is focusable - if there are focusable elements in the cell use `group`\n * - `none`: The cell is not focusable\n */\nexport type DataGridCellFocusMode = 'group' | 'none' | 'cell';\n\n/**\n * DataGridCell Props\n */\nexport type DataGridCellProps = TableCellProps & {\n /**\n * Used when there are nested focusble elements inside a focusable cell\n * - `group`: Enter keypress moves focus inside the cell, focus is trapped inside the cell until Escape keypress\n * - `cell`: The cell is focusable - if there are focusable elements in the cell use `group`\n * - `none`: The cell is not focusable\n * @default cell\n */\n focusMode?: DataGridCellFocusMode;\n};\n\n/**\n * State used in rendering DataGridCell\n */\nexport type DataGridCellState = TableCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AA0BA;;CAEC"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DataGridCell: function() {
return _DataGridCell.DataGridCell;
},
dataGridCellClassNames: function() {
return _useDataGridCellStylesstyles.dataGridCellClassNames;
},
renderDataGridCell_unstable: function() {
return _renderDataGridCell.renderDataGridCell_unstable;
},
useDataGridCellStyles_unstable: function() {
return _useDataGridCellStylesstyles.useDataGridCellStyles_unstable;
},
useDataGridCell_unstable: function() {
return _useDataGridCell.useDataGridCell_unstable;
}
});
const _DataGridCell = require("./DataGridCell");
const _renderDataGridCell = require("./renderDataGridCell");
const _useDataGridCell = require("./useDataGridCell");
const _useDataGridCellStylesstyles = require("./useDataGridCellStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridCell/index.ts"],"sourcesContent":["export { DataGridCell } from './DataGridCell';\nexport type {\n DataGridCellFocusMode,\n DataGridCellProps,\n DataGridCellSlots,\n DataGridCellState,\n} from './DataGridCell.types';\nexport { renderDataGridCell_unstable } from './renderDataGridCell';\nexport { useDataGridCell_unstable } from './useDataGridCell';\nexport { dataGridCellClassNames, useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';\n"],"names":["DataGridCell","dataGridCellClassNames","renderDataGridCell_unstable","useDataGridCellStyles_unstable","useDataGridCell_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,YAAY;eAAZA,0BAAY;;IASZC,sBAAsB;eAAtBA,mDAAsB;;IAFtBC,2BAA2B;eAA3BA,+CAA2B;;IAEHC,8BAA8B;eAA9BA,2DAA8B;;IADtDC,wBAAwB;eAAxBA,yCAAwB;;;8BARJ;oCAOe;iCACH;6CAC8B"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDataGridCell_unstable", {
enumerable: true,
get: function() {
return renderDataGridCell_unstable;
}
});
const _renderTableCell = require("../TableCell/renderTableCell");
const renderDataGridCell_unstable = (state)=>{
return (0, _renderTableCell.renderTableCell_unstable)(state);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridCell/renderDataGridCell.tsx"],"sourcesContent":["import type { DataGridCellState } from './DataGridCell.types';\nimport { renderTableCell_unstable } from '../TableCell/renderTableCell';\n\n/**\n * Render the final JSX of DataGridCell\n */\nexport const renderDataGridCell_unstable = (state: DataGridCellState) => {\n return renderTableCell_unstable(state);\n};\n"],"names":["renderDataGridCell_unstable","state","renderTableCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;iCAL4B;AAKlC,MAAMA,8BAA8B,CAACC;IAC1C,OAAOC,IAAAA,yCAAAA,EAAyBD;AAClC"}
@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDataGridCell_unstable", {
enumerable: true,
get: function() {
return useDataGridCell_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reacttabster = require("@fluentui/react-tabster");
const _useTableCell = require("../TableCell/useTableCell");
const _dataGridContext = require("../../contexts/dataGridContext");
const _columnIdContext = require("../../contexts/columnIdContext");
const useDataGridCell_unstable = (props, ref)=>{
const { focusMode = 'cell' } = props;
const columnId = (0, _columnIdContext.useColumnIdContext)();
const tabbable = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>(ctx.focusMode === 'cell' || ctx.focusMode === 'composite') && focusMode !== 'none');
const resizableColumns = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.resizableColumns);
const getTableCellProps = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>{
return ctx.columnSizing_unstable.getTableCellProps;
});
const focusableGroupAttr = (0, _reacttabster.useFocusableGroup)({
tabBehavior: 'limited-trap-focus'
});
return (0, _useTableCell.useTableCell_unstable)({
as: 'div',
role: 'gridcell',
...focusMode === 'group' && focusableGroupAttr,
tabIndex: tabbable ? 0 : undefined,
...resizableColumns ? getTableCellProps(columnId) : {},
...props
}, ref);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridCell/useDataGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport type { DataGridCellProps, DataGridCellState } from './DataGridCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\n\n/**\n * Create the state required to render DataGridCell.\n *\n * The returned state can be modified with hooks such as useDataGridCellStyles_unstable,\n * before being passed to renderDataGridCell_unstable.\n *\n * @param props - props from this instance of DataGridCell\n * @param ref - reference to root HTMLElement of DataGridCell\n */\nexport const useDataGridCell_unstable = (props: DataGridCellProps, ref: React.Ref<HTMLElement>): DataGridCellState => {\n const { focusMode = 'cell' } = props;\n const columnId = useColumnIdContext();\n const tabbable = useDataGridContext_unstable(\n ctx => (ctx.focusMode === 'cell' || ctx.focusMode === 'composite') && focusMode !== 'none',\n );\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const getTableCellProps = useDataGridContext_unstable(ctx => {\n return ctx.columnSizing_unstable.getTableCellProps;\n });\n const focusableGroupAttr = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n return useTableCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n ...(focusMode === 'group' && focusableGroupAttr),\n tabIndex: tabbable ? 0 : undefined,\n ...(resizableColumns ? getTableCellProps(columnId) : {}),\n ...props,\n },\n ref,\n );\n};\n"],"names":["useDataGridCell_unstable","props","ref","focusMode","columnId","useColumnIdContext","tabbable","useDataGridContext_unstable","ctx","resizableColumns","getTableCellProps","columnSizing_unstable","focusableGroupAttr","useFocusableGroup","tabBehavior","useTableCell_unstable","as","role","tabIndex","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;;iEAhBU;8BACW;8BAEI;iCACM;iCACT;AAW5B,MAAMA,2BAA2B,CAACC,OAA0BC;IACjE,MAAM,EAAEC,YAAY,MAAM,EAAE,GAAGF;IAC/B,MAAMG,WAAWC,IAAAA,mCAAAA;IACjB,MAAMC,WAAWC,IAAAA,4CAAAA,EACfC,CAAAA,MAAO,AAACA,CAAAA,IAAIL,SAAS,KAAK,UAAUK,IAAIL,SAAS,KAAK,WAAA,KAAgBA,cAAc;IAEtF,MAAMM,mBAAmBF,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,gBAAgB;IAChF,MAAMC,oBAAoBH,IAAAA,4CAAAA,EAA4BC,CAAAA;QACpD,OAAOA,IAAIG,qBAAqB,CAACD,iBAAiB;IACpD;IACA,MAAME,qBAAqBC,IAAAA,+BAAAA,EAAkB;QAAEC,aAAa;IAAqB;IACjF,OAAOC,IAAAA,mCAAAA,EACL;QACEC,IAAI;QACJC,MAAM;QACN,GAAId,cAAc,WAAWS,kBAAkB;QAC/CM,UAAUZ,WAAW,IAAIa;QACzB,GAAIV,mBAAmBC,kBAAkBN,YAAY,CAAC,CAAC;QACvD,GAAGH,KAAK;IACV,GACAC;AAEJ"}
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dataGridCellClassNames: function() {
return dataGridCellClassNames;
},
useDataGridCellStyles_unstable: function() {
return useDataGridCellStyles_unstable;
}
});
const _react = require("@griffel/react");
const _useTableCellStylesstyles = require("../TableCell/useTableCellStyles.styles");
const dataGridCellClassNames = {
root: 'fui-DataGridCell'
};
const useDataGridCellStyles_unstable = (state)=>{
'use no memo';
(0, _useTableCellStylesstyles.useTableCellStyles_unstable)(state);
state.root.className = (0, _react.mergeClasses)(dataGridCellClassNames.root, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDataGridCellStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableCellStyles_unstable } from '../TableCell/useTableCellStyles.styles';\nexport const dataGridCellClassNames = {\n root: 'fui-DataGridCell'\n};\n/**\n * Apply styling to the DataGridCell slots based on the state\n */ export const useDataGridCellStyles_unstable = (state)=>{\n 'use no memo';\n useTableCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridCellClassNames.root, state.root.className);\n return state;\n};\n"],"names":["dataGridCellClassNames","useDataGridCellStyles_unstable","root","state","useTableCellStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,sBAAsB;eAAtBA;;IAKIC,8BAA8B;eAA9BA;;;uBAPY;0CACe;AACrC,MAAMD,yBAAyB;IAClCE,MAAM;AACV;AAGW,MAAMD,iCAAkCE,CAAAA;IAC/C;IACAC,IAAAA,qDAA2B,EAACD;IAC5BA,MAAMD,IAAI,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACN,uBAAuBE,IAAI,EAAEC,MAAMD,IAAI,CAACG,SAAS;IACrF,OAAOF;AACX"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DataGridHeader", {
enumerable: true,
get: function() {
return DataGridHeader;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDataGridHeader = require("./useDataGridHeader");
const _renderDataGridHeader = require("./renderDataGridHeader");
const _useDataGridHeaderStylesstyles = require("./useDataGridHeaderStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DataGridHeader = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDataGridHeader.useDataGridHeader_unstable)(props, ref);
(0, _useDataGridHeaderStylesstyles.useDataGridHeaderStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDataGridHeaderStyles_unstable')(state);
return (0, _renderDataGridHeader.renderDataGridHeader_unstable)(state);
});
DataGridHeader.displayName = 'DataGridHeader';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeader/DataGridHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeader_unstable } from './useDataGridHeader';\nimport { renderDataGridHeader_unstable } from './renderDataGridHeader';\nimport { useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styles';\nimport type { DataGridHeaderProps } from './DataGridHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeader component\n */\nexport const DataGridHeader: ForwardRefComponent<DataGridHeaderProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeader_unstable(props, ref);\n\n useDataGridHeaderStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderStyles_unstable')(state);\n\n return renderDataGridHeader_unstable(state);\n});\n\nDataGridHeader.displayName = 'DataGridHeader';\n"],"names":["DataGridHeader","React","forwardRef","props","ref","state","useDataGridHeader_unstable","useDataGridHeaderStyles_unstable","useCustomStyleHook_unstable","renderDataGridHeader_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;mCACoB;sCACG;+CACG;qCAGL;AAKrC,MAAMA,iBAAAA,WAAAA,GAA2DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQC,IAAAA,6CAAAA,EAA2BH,OAAOC;IAEhDG,IAAAA,+DAAAA,EAAiCF;IAEjCG,IAAAA,gDAAAA,EAA4B,oCAAoCH;IAEhE,OAAOI,IAAAA,mDAAAA,EAA8BJ;AACvC;AAEAL,eAAeU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering DataGridHeader
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeader/DataGridHeader.types.ts"],"sourcesContent":["import { TableHeaderProps, TableHeaderSlots, TableHeaderState } from '../TableHeader/TableHeader.types';\n\nexport type DataGridHeaderSlots = TableHeaderSlots;\n\n/**\n * DataGridHeader Props\n */\nexport type DataGridHeaderProps = TableHeaderProps;\n\n/**\n * State used in rendering DataGridHeader\n */\nexport type DataGridHeaderState = TableHeaderState;\n"],"names":[],"rangeMappings":";;","mappings":"AASA;;CAEC"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DataGridHeader: function() {
return _DataGridHeader.DataGridHeader;
},
dataGridHeaderClassNames: function() {
return _useDataGridHeaderStylesstyles.dataGridHeaderClassNames;
},
renderDataGridHeader_unstable: function() {
return _renderDataGridHeader.renderDataGridHeader_unstable;
},
useDataGridHeaderStyles_unstable: function() {
return _useDataGridHeaderStylesstyles.useDataGridHeaderStyles_unstable;
},
useDataGridHeader_unstable: function() {
return _useDataGridHeader.useDataGridHeader_unstable;
}
});
const _DataGridHeader = require("./DataGridHeader");
const _renderDataGridHeader = require("./renderDataGridHeader");
const _useDataGridHeader = require("./useDataGridHeader");
const _useDataGridHeaderStylesstyles = require("./useDataGridHeaderStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeader/index.ts"],"sourcesContent":["export { DataGridHeader } from './DataGridHeader';\nexport type { DataGridHeaderProps, DataGridHeaderSlots, DataGridHeaderState } from './DataGridHeader.types';\nexport { renderDataGridHeader_unstable } from './renderDataGridHeader';\nexport { useDataGridHeader_unstable } from './useDataGridHeader';\nexport { dataGridHeaderClassNames, useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styles';\n"],"names":["DataGridHeader","dataGridHeaderClassNames","renderDataGridHeader_unstable","useDataGridHeaderStyles_unstable","useDataGridHeader_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,cAAc;eAAdA,8BAAc;;IAIdC,wBAAwB;eAAxBA,uDAAwB;;IAFxBC,6BAA6B;eAA7BA,mDAA6B;;IAEHC,gCAAgC;eAAhCA,+DAAgC;;IAD1DC,0BAA0B;eAA1BA,6CAA0B;;;gCAHJ;sCAEe;mCACH;+CACgC"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDataGridHeader_unstable", {
enumerable: true,
get: function() {
return renderDataGridHeader_unstable;
}
});
const _renderTableHeader = require("../TableHeader/renderTableHeader");
const renderDataGridHeader_unstable = (state)=>{
return (0, _renderTableHeader.renderTableHeader_unstable)(state);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeader/renderDataGridHeader.tsx"],"sourcesContent":["import { renderTableHeader_unstable } from '../TableHeader/renderTableHeader';\nimport type { DataGridHeaderState } from './DataGridHeader.types';\n\n/**\n * Render the final JSX of DataGridHeader\n */\nexport const renderDataGridHeader_unstable = (state: DataGridHeaderState) => {\n return renderTableHeader_unstable(state);\n};\n"],"names":["renderDataGridHeader_unstable","state","renderTableHeader_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;mCAN8B;AAMpC,MAAMA,gCAAgC,CAACC;IAC5C,OAAOC,IAAAA,6CAAAA,EAA2BD;AACpC"}
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDataGridHeader_unstable", {
enumerable: true,
get: function() {
return useDataGridHeader_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useTableHeader = require("../TableHeader/useTableHeader");
const useDataGridHeader_unstable = (props, ref)=>{
return (0, _useTableHeader.useTableHeader_unstable)({
...props,
as: 'div'
}, ref);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeader/useDataGridHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridHeaderProps, DataGridHeaderState } from './DataGridHeader.types';\nimport { useTableHeader_unstable } from '../TableHeader/useTableHeader';\n\n/**\n * Create the state required to render DataGridHeader.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderStyles_unstable,\n * before being passed to renderDataGridHeader_unstable.\n *\n * @param props - props from this instance of DataGridHeader\n * @param ref - reference to root HTMLElement of DataGridHeader\n */\nexport const useDataGridHeader_unstable = (\n props: DataGridHeaderProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderState => {\n return useTableHeader_unstable({ ...props, as: 'div' }, ref);\n};\n"],"names":["useDataGridHeader_unstable","props","ref","useTableHeader_unstable","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCAEiB;AAWjC,MAAMA,6BAA6B,CACxCC,OACAC;IAEA,OAAOC,IAAAA,uCAAAA,EAAwB;QAAE,GAAGF,KAAK;QAAEG,IAAI;IAAM,GAAGF;AAC1D"}
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dataGridHeaderClassNames: function() {
return dataGridHeaderClassNames;
},
useDataGridHeaderStyles_unstable: function() {
return useDataGridHeaderStyles_unstable;
}
});
const _react = require("@griffel/react");
const _useTableHeaderStylesstyles = require("../TableHeader/useTableHeaderStyles.styles");
const dataGridHeaderClassNames = {
root: 'fui-DataGridHeader'
};
const useDataGridHeaderStyles_unstable = (state)=>{
'use no memo';
(0, _useTableHeaderStylesstyles.useTableHeaderStyles_unstable)(state);
state.root.className = (0, _react.mergeClasses)(dataGridHeaderClassNames.root, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDataGridHeaderStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableHeaderStyles_unstable } from '../TableHeader/useTableHeaderStyles.styles';\nexport const dataGridHeaderClassNames = {\n root: 'fui-DataGridHeader'\n};\n/**\n * Apply styling to the DataGridHeader slots based on the state\n */ export const useDataGridHeaderStyles_unstable = (state)=>{\n 'use no memo';\n useTableHeaderStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderClassNames.root, state.root.className);\n return state;\n};\n"],"names":["dataGridHeaderClassNames","useDataGridHeaderStyles_unstable","root","state","useTableHeaderStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,wBAAwB;eAAxBA;;IAKIC,gCAAgC;eAAhCA;;;uBAPY;4CACiB;AACvC,MAAMD,2BAA2B;IACpCE,MAAM;AACV;AAGW,MAAMD,mCAAoCE,CAAAA;IACjD;IACAC,IAAAA,yDAA6B,EAACD;IAC9BA,MAAMD,IAAI,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACN,yBAAyBE,IAAI,EAAEC,MAAMD,IAAI,CAACG,SAAS;IACvF,OAAOF;AACX"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DataGridHeaderCell", {
enumerable: true,
get: function() {
return DataGridHeaderCell;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDataGridHeaderCell = require("./useDataGridHeaderCell");
const _renderDataGridHeaderCell = require("./renderDataGridHeaderCell");
const _useDataGridHeaderCellStylesstyles = require("./useDataGridHeaderCellStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DataGridHeaderCell = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDataGridHeaderCell.useDataGridHeaderCell_unstable)(props, ref);
(0, _useDataGridHeaderCellStylesstyles.useDataGridHeaderCellStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDataGridHeaderCellStyles_unstable')(state);
return (0, _renderDataGridHeaderCell.renderDataGridHeaderCell_unstable)(state);
});
DataGridHeaderCell.displayName = 'DataGridHeaderCell';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeaderCell/DataGridHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';\nimport { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';\nimport { useDataGridHeaderCellStyles_unstable } from './useDataGridHeaderCellStyles.styles';\nimport type { DataGridHeaderCellProps } from './DataGridHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridHeaderCell component\n */\nexport const DataGridHeaderCell: ForwardRefComponent<DataGridHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridHeaderCell_unstable(props, ref);\n\n useDataGridHeaderCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridHeaderCellStyles_unstable')(state);\n\n return renderDataGridHeaderCell_unstable(state);\n});\n\nDataGridHeaderCell.displayName = 'DataGridHeaderCell';\n"],"names":["DataGridHeaderCell","React","forwardRef","props","ref","state","useDataGridHeaderCell_unstable","useDataGridHeaderCellStyles_unstable","useCustomStyleHook_unstable","renderDataGridHeaderCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;uCACwB;0CACG;mDACG;qCAGT;AAKrC,MAAMA,qBAAAA,WAAAA,GAAmEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvG,MAAMC,QAAQC,IAAAA,qDAAAA,EAA+BH,OAAOC;IAEpDG,IAAAA,uEAAAA,EAAqCF;IAErCG,IAAAA,gDAAAA,EAA4B,wCAAwCH;IAEpE,OAAOI,IAAAA,2DAAAA,EAAkCJ;AAC3C;AAEAL,mBAAmBU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering DataGridHeaderCell
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeaderCell/DataGridHeaderCell.types.ts"],"sourcesContent":["import {\n TableHeaderCellProps,\n TableHeaderCellSlots,\n TableHeaderCellState,\n} from '../TableHeaderCell/TableHeaderCell.types';\n\nexport type DataGridHeaderCellSlots = TableHeaderCellSlots;\n\n/**\n * DataGridHeaderCell Props\n */\nexport type DataGridHeaderCellProps = Omit<TableHeaderCellProps, 'sortable'>;\n\n/**\n * State used in rendering DataGridHeaderCell\n */\nexport type DataGridHeaderCellState = TableHeaderCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AAaA;;CAEC"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DataGridHeaderCell: function() {
return _DataGridHeaderCell.DataGridHeaderCell;
},
dataGridHeaderCellClassNames: function() {
return _useDataGridHeaderCellStylesstyles.dataGridHeaderCellClassNames;
},
renderDataGridHeaderCell_unstable: function() {
return _renderDataGridHeaderCell.renderDataGridHeaderCell_unstable;
},
useDataGridHeaderCellStyles_unstable: function() {
return _useDataGridHeaderCellStylesstyles.useDataGridHeaderCellStyles_unstable;
},
useDataGridHeaderCell_unstable: function() {
return _useDataGridHeaderCell.useDataGridHeaderCell_unstable;
}
});
const _DataGridHeaderCell = require("./DataGridHeaderCell");
const _renderDataGridHeaderCell = require("./renderDataGridHeaderCell");
const _useDataGridHeaderCell = require("./useDataGridHeaderCell");
const _useDataGridHeaderCellStylesstyles = require("./useDataGridHeaderCellStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeaderCell/index.ts"],"sourcesContent":["export { DataGridHeaderCell } from './DataGridHeaderCell';\nexport type {\n DataGridHeaderCellProps,\n DataGridHeaderCellSlots,\n DataGridHeaderCellState,\n} from './DataGridHeaderCell.types';\nexport { renderDataGridHeaderCell_unstable } from './renderDataGridHeaderCell';\nexport { useDataGridHeaderCell_unstable } from './useDataGridHeaderCell';\nexport {\n dataGridHeaderCellClassNames,\n useDataGridHeaderCellStyles_unstable,\n} from './useDataGridHeaderCellStyles.styles';\n"],"names":["DataGridHeaderCell","dataGridHeaderCellClassNames","renderDataGridHeaderCell_unstable","useDataGridHeaderCellStyles_unstable","useDataGridHeaderCell_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,kBAAkB;eAAlBA,sCAAkB;;IASzBC,4BAA4B;eAA5BA,+DAA4B;;IAHrBC,iCAAiC;eAAjCA,2DAAiC;;IAIxCC,oCAAoC;eAApCA,uEAAoC;;IAH7BC,8BAA8B;eAA9BA,qDAA8B;;;oCAPJ;0CAMe;uCACH;mDAIxC"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDataGridHeaderCell_unstable", {
enumerable: true,
get: function() {
return renderDataGridHeaderCell_unstable;
}
});
const _renderTableHeaderCell = require("../TableHeaderCell/renderTableHeaderCell");
const renderDataGridHeaderCell_unstable = (state)=>{
return (0, _renderTableHeaderCell.renderTableHeaderCell_unstable)(state);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeaderCell/renderDataGridHeaderCell.tsx"],"sourcesContent":["import type { DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { renderTableHeaderCell_unstable } from '../TableHeaderCell/renderTableHeaderCell';\n\n/**\n * Render the final JSX of DataGridHeaderCell\n */\nexport const renderDataGridHeaderCell_unstable = (state: DataGridHeaderCellState) => {\n return renderTableHeaderCell_unstable(state);\n};\n"],"names":["renderDataGridHeaderCell_unstable","state","renderTableHeaderCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;uCALkC;AAKxC,MAAMA,oCAAoC,CAACC;IAChD,OAAOC,IAAAA,qDAAAA,EAA+BD;AACxC"}
@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDataGridHeaderCell_unstable", {
enumerable: true,
get: function() {
return useDataGridHeaderCell_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const _useTableHeaderCell = require("../TableHeaderCell/useTableHeaderCell");
const _dataGridContext = require("../../contexts/dataGridContext");
const _columnIdContext = require("../../contexts/columnIdContext");
const _tableContext = require("../../contexts/tableContext");
const _isColumnSortable = require("../../utils/isColumnSortable");
const useDataGridHeaderCell_unstable = (props, ref)=>{
const columnId = (0, _columnIdContext.useColumnIdContext)();
const { sortable: gridSortable } = (0, _tableContext.useTableContext)();
const toggleColumnSort = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.sort.toggleColumnSort);
const sortable = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>{
const columnSortable = !!ctx.columns.find((c)=>c.columnId === columnId && (0, _isColumnSortable.isColumnSortable)(c));
if (!gridSortable) {
// if the grid is not sortable - disable sorting on all columns
return false;
}
return columnSortable;
});
const sortDirection = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>sortable ? ctx.sort.getSortDirection(columnId) : undefined);
const resizableColumns = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.resizableColumns);
const getTableHeaderCellProps = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>{
return ctx.columnSizing_unstable.getTableHeaderCellProps;
});
// eslint-disable-next-line @typescript-eslint/no-deprecated -- prefer HTMLTableCellElement
const onClick = (0, _reactutilities.useEventCallback)((e)=>{
var _props_onClick;
if (sortable) {
toggleColumnSort(e, columnId);
}
(_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
});
return (0, _useTableHeaderCell.useTableHeaderCell_unstable)({
sortable,
sortDirection,
as: 'div',
tabIndex: sortable ? undefined : 0,
...resizableColumns ? getTableHeaderCellProps(columnId) : {},
...props,
onClick
}, ref);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridHeaderCell/useDataGridHeaderCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport type { DataGridHeaderCellProps, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { useTableHeaderCell_unstable } from '../TableHeaderCell/useTableHeaderCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { isColumnSortable } from '../../utils/isColumnSortable';\n\n/**\n * Create the state required to render DataGridHeaderCell.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,\n * before being passed to renderDataGridHeaderCell_unstable.\n *\n * @param props - props from this instance of DataGridHeaderCell\n * @param ref - reference to root HTMLElement of DataGridHeaderCell\n */\nexport const useDataGridHeaderCell_unstable = (\n props: DataGridHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderCellState => {\n const columnId = useColumnIdContext();\n const { sortable: gridSortable } = useTableContext();\n const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);\n\n const sortable = useDataGridContext_unstable(ctx => {\n const columnSortable = !!ctx.columns.find(c => c.columnId === columnId && isColumnSortable(c));\n if (!gridSortable) {\n // if the grid is not sortable - disable sorting on all columns\n return false;\n }\n\n return columnSortable;\n });\n\n const sortDirection = useDataGridContext_unstable(ctx =>\n sortable ? ctx.sort.getSortDirection(columnId) : undefined,\n );\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const getTableHeaderCellProps = useDataGridContext_unstable(ctx => {\n return ctx.columnSizing_unstable.getTableHeaderCellProps;\n });\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- prefer HTMLTableCellElement\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableHeaderCellElement>) => {\n if (sortable) {\n toggleColumnSort(e, columnId);\n }\n props.onClick?.(e);\n });\n\n return useTableHeaderCell_unstable(\n {\n sortable,\n sortDirection,\n as: 'div',\n tabIndex: sortable ? undefined : 0,\n ...(resizableColumns ? getTableHeaderCellProps(columnId) : {}),\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"names":["useDataGridHeaderCell_unstable","props","ref","columnId","useColumnIdContext","sortable","gridSortable","useTableContext","toggleColumnSort","useDataGridContext_unstable","ctx","sort","columnSortable","columns","find","c","isColumnSortable","sortDirection","getSortDirection","undefined","resizableColumns","getTableHeaderCellProps","columnSizing_unstable","onClick","useEventCallback","e","useTableHeaderCell_unstable","as","tabIndex"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBaA;;;eAAAA;;;;iEAlBU;gCACU;oCAEW;iCACA;iCACT;8BACH;kCACC;AAW1B,MAAMA,iCAAiC,CAC5CC,OACAC;IAEA,MAAMC,WAAWC,IAAAA,mCAAAA;IACjB,MAAM,EAAEC,UAAUC,YAAY,EAAE,GAAGC,IAAAA,6BAAAA;IACnC,MAAMC,mBAAmBC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,IAAI,CAACH,gBAAgB;IAErF,MAAMH,WAAWI,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC3C,MAAME,iBAAiB,CAAC,CAACF,IAAIG,OAAO,CAACC,IAAI,CAACC,CAAAA,IAAKA,EAAEZ,QAAQ,KAAKA,YAAYa,IAAAA,kCAAAA,EAAiBD;QAC3F,IAAI,CAACT,cAAc;YACjB,+DAA+D;YAC/D,OAAO;QACT;QAEA,OAAOM;IACT;IAEA,MAAMK,gBAAgBR,IAAAA,4CAAAA,EAA4BC,CAAAA,MAChDL,WAAWK,IAAIC,IAAI,CAACO,gBAAgB,CAACf,YAAYgB;IAEnD,MAAMC,mBAAmBX,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIU,gBAAgB;IAChF,MAAMC,0BAA0BZ,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1D,OAAOA,IAAIY,qBAAqB,CAACD,uBAAuB;IAC1D;IAEA,2FAA2F;IAC3F,MAAME,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAIhCxB;QAHA,IAAII,UAAU;YACZG,iBAAiBiB,GAAGtB;QACtB;QACAF,CAAAA,iBAAAA,MAAMsB,OAAO,AAAPA,MAAO,QAAbtB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBwB;IAClB;IAEA,OAAOC,IAAAA,+CAAAA,EACL;QACErB;QACAY;QACAU,IAAI;QACJC,UAAUvB,WAAWc,YAAY;QACjC,GAAIC,mBAAmBC,wBAAwBlB,YAAY,CAAC,CAAC;QAC7D,GAAGF,KAAK;QACRsB;IACF,GACArB;AAEJ"}
@@ -0,0 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dataGridHeaderCellClassNames: function() {
return dataGridHeaderCellClassNames;
},
useDataGridHeaderCellStyles_unstable: function() {
return useDataGridHeaderCellStyles_unstable;
}
});
const _react = require("@griffel/react");
const _useTableHeaderCellStylesstyles = require("../TableHeaderCell/useTableHeaderCellStyles.styles");
const dataGridHeaderCellClassNames = {
root: 'fui-DataGridHeaderCell',
button: 'fui-DataGridHeaderCell__button',
sortIcon: 'fui-DataGridHeaderCell__sortIcon',
aside: 'fui-DataGridHeaderCell__aside'
};
const useDataGridHeaderCellStyles_unstable = (state)=>{
'use no memo';
(0, _useTableHeaderCellStylesstyles.useTableHeaderCellStyles_unstable)(state);
state.root.className = (0, _react.mergeClasses)(dataGridHeaderCellClassNames.root, state.root.className);
if (state.button) {
state.button.className = (0, _react.mergeClasses)(dataGridHeaderCellClassNames.button, state.button.className);
}
if (state.sortIcon) {
state.sortIcon.className = (0, _react.mergeClasses)(dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);
}
if (state.aside) {
state.aside.className = (0, _react.mergeClasses)(dataGridHeaderCellClassNames.aside, state.aside.className);
}
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDataGridHeaderCellStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableHeaderCellStyles_unstable } from '../TableHeaderCell/useTableHeaderCellStyles.styles';\nexport const dataGridHeaderCellClassNames = {\n root: 'fui-DataGridHeaderCell',\n button: 'fui-DataGridHeaderCell__button',\n sortIcon: 'fui-DataGridHeaderCell__sortIcon',\n aside: 'fui-DataGridHeaderCell__aside'\n};\n/**\n * Apply styling to the DataGridHeaderCell slots based on the state\n */ export const useDataGridHeaderCellStyles_unstable = (state)=>{\n 'use no memo';\n useTableHeaderCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderCellClassNames.root, state.root.className);\n if (state.button) {\n state.button.className = mergeClasses(dataGridHeaderCellClassNames.button, state.button.className);\n }\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);\n }\n if (state.aside) {\n state.aside.className = mergeClasses(dataGridHeaderCellClassNames.aside, state.aside.className);\n }\n return state;\n};\n"],"names":["dataGridHeaderCellClassNames","useDataGridHeaderCellStyles_unstable","root","button","sortIcon","aside","state","useTableHeaderCellStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,4BAA4B;eAA5BA;;IAQIC,oCAAoC;eAApCA;;;uBAVY;gDACqB;AAC3C,MAAMD,+BAA+B;IACxCE,MAAM;IACNC,QAAQ;IACRC,UAAU;IACVC,OAAO;AACX;AAGW,MAAMJ,uCAAwCK,CAAAA;IACrD;IACAC,IAAAA,iEAAiC,EAACD;IAClCA,MAAMJ,IAAI,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACT,6BAA6BE,IAAI,EAAEI,MAAMJ,IAAI,CAACM,SAAS;IAC3F,IAAIF,MAAMH,MAAM,EAAE;QACdG,MAAMH,MAAM,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACT,6BAA6BG,MAAM,EAAEG,MAAMH,MAAM,CAACK,SAAS;IACrG;IACA,IAAIF,MAAMF,QAAQ,EAAE;QAChBE,MAAMF,QAAQ,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACT,6BAA6BI,QAAQ,EAAEE,MAAMF,QAAQ,CAACI,SAAS;IAC3G;IACA,IAAIF,MAAMD,KAAK,EAAE;QACbC,MAAMD,KAAK,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACT,6BAA6BK,KAAK,EAAEC,MAAMD,KAAK,CAACG,SAAS;IAClG;IACA,OAAOF;AACX"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DataGridRow", {
enumerable: true,
get: function() {
return DataGridRow;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDataGridRow = require("./useDataGridRow");
const _renderDataGridRow = require("./renderDataGridRow");
const _useDataGridRowStylesstyles = require("./useDataGridRowStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DataGridRow = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDataGridRow.useDataGridRow_unstable)(props, ref);
(0, _useDataGridRowStylesstyles.useDataGridRowStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDataGridRowStyles_unstable')(state);
return (0, _renderDataGridRow.renderDataGridRow_unstable)(state);
});
DataGridRow.displayName = 'DataGridRow';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridRow/DataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridRow_unstable } from './useDataGridRow';\nimport { renderDataGridRow_unstable } from './renderDataGridRow';\nimport { useDataGridRowStyles_unstable } from './useDataGridRowStyles.styles';\nimport type { DataGridRowProps } from './DataGridRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridRow component\n */\nexport const DataGridRow: ForwardRefComponent<DataGridRowProps> &\n (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridRow_unstable(props, ref);\n\n useDataGridRowStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridRowStyles_unstable')(state);\n\n return renderDataGridRow_unstable(state);\n}) as ForwardRefComponent<DataGridRowProps> & (<TItem>(props: DataGridRowProps<TItem>) => JSX.Element);\n\nDataGridRow.displayName = 'DataGridRow';\n"],"names":["DataGridRow","React","forwardRef","props","ref","state","useDataGridRow_unstable","useDataGridRowStyles_unstable","useCustomStyleHook_unstable","renderDataGridRow_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;gCACiB;mCACG;4CACG;qCAGF;AAKrC,MAAMA,cAAAA,WAAAA,GACgDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACpF,MAAMC,QAAQC,IAAAA,uCAAAA,EAAwBH,OAAOC;IAE7CG,IAAAA,yDAAAA,EAA8BF;IAE9BG,IAAAA,gDAAAA,EAA4B,iCAAiCH;IAE7D,OAAOI,IAAAA,6CAAAA,EAA2BJ;AACpC;AAEAL,YAAYU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridRow/DataGridRow.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { TableColumnDefinition } from '../../hooks';\nimport { DataGridContextValue } from '../DataGrid/DataGrid.types';\nimport type { TableRowProps, TableRowSlots, TableRowState } from '../TableRow/TableRow.types';\nimport type { TableSelectionCell } from '../TableSelectionCell/TableSelectionCell';\n\nexport type DataGridRowSlots = TableRowSlots & {\n /**\n * When selection is enabled on the @see DataGrid, all rows\n * will render the selection cell.\n */\n selectionCell?: Slot<typeof TableSelectionCell>;\n};\n\nexport type CellRenderFunction<TItem = unknown> = (\n column: TableColumnDefinition<TItem>,\n dataGridContextValue: DataGridContextValue,\n) => React.ReactNode;\n\n/**\n * DataGridRow Props\n */\nexport type DataGridRowProps<TItem = unknown> = Omit<TableRowProps, 'children'> &\n Omit<ComponentProps<DataGridRowSlots>, 'children'> & {\n children: CellRenderFunction<TItem>;\n };\n\n/**\n * State used in rendering DataGridRow\n */\nexport type DataGridRowState = TableRowState &\n ComponentState<DataGridRowSlots> & {\n renderCell: CellRenderFunction;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n columnDefs: TableColumnDefinition<any>[];\n dataGridContextValue: DataGridContextValue;\n };\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DataGridRow: function() {
return _DataGridRow.DataGridRow;
},
dataGridRowClassNames: function() {
return _useDataGridRowStylesstyles.dataGridRowClassNames;
},
renderDataGridRow_unstable: function() {
return _renderDataGridRow.renderDataGridRow_unstable;
},
useDataGridRowStyles_unstable: function() {
return _useDataGridRowStylesstyles.useDataGridRowStyles_unstable;
},
useDataGridRow_unstable: function() {
return _useDataGridRow.useDataGridRow_unstable;
}
});
const _DataGridRow = require("./DataGridRow");
const _renderDataGridRow = require("./renderDataGridRow");
const _useDataGridRow = require("./useDataGridRow");
const _useDataGridRowStylesstyles = require("./useDataGridRowStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridRow/index.ts"],"sourcesContent":["export { DataGridRow } from './DataGridRow';\nexport type { CellRenderFunction, DataGridRowProps, DataGridRowSlots, DataGridRowState } from './DataGridRow.types';\nexport { renderDataGridRow_unstable } from './renderDataGridRow';\nexport { useDataGridRow_unstable } from './useDataGridRow';\nexport { dataGridRowClassNames, useDataGridRowStyles_unstable } from './useDataGridRowStyles.styles';\n"],"names":["DataGridRow","dataGridRowClassNames","renderDataGridRow_unstable","useDataGridRowStyles_unstable","useDataGridRow_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,WAAW;eAAXA,wBAAW;;IAIXC,qBAAqB;eAArBA,iDAAqB;;IAFrBC,0BAA0B;eAA1BA,6CAA0B;;IAEHC,6BAA6B;eAA7BA,yDAA6B;;IADpDC,uBAAuB;eAAvBA,uCAAuB;;;6BAHJ;mCAEe;gCACH;4CAC6B"}
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDataGridRow_unstable", {
enumerable: true,
get: function() {
return renderDataGridRow_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const _columnIdContext = require("../../contexts/columnIdContext");
const renderDataGridRow_unstable = (state)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
children: [
state.selectionCell && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.selectionCell, {}),
state.columnDefs.map((columnDef)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_columnIdContext.ColumnIdContextProvider, {
value: columnDef.columnId,
children: state.renderCell(columnDef, state.dataGridContextValue)
}, columnDef.columnId))
]
});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridRow/renderDataGridRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridRowState, DataGridRowSlots } from './DataGridRow.types';\nimport { ColumnIdContextProvider } from '../../contexts/columnIdContext';\n\n/**\n * Render the final JSX of DataGridRow\n */\nexport const renderDataGridRow_unstable = (state: DataGridRowState) => {\n assertSlots<DataGridRowSlots>(state);\n\n return (\n <state.root>\n {state.selectionCell && <state.selectionCell />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef, state.dataGridContextValue)}\n </ColumnIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["renderDataGridRow_unstable","state","assertSlots","_jsxs","root","selectionCell","_jsx","columnDefs","map","columnDef","ColumnIdContextProvider","value","columnId","renderCell","dataGridContextValue"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;iCAEY;AAKjC,MAAMA,6BAA6B,CAACC;IACzCC,IAAAA,2BAAAA,EAA8BD;IAE9B,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,aAAa,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,aAAa,EAAA,CAAA;YAC3CJ,MAAMM,UAAU,CAACC,GAAG,CAACC,CAAAA,YAAAA,WAAAA,GACpBH,IAAAA,eAAA,EAACI,wCAAAA,EAAAA;oBAAwBC,OAAOF,UAAUG,QAAQ;8BAC/CX,MAAMY,UAAU,CAACJ,WAAWR,MAAMa,oBAAoB;mBADAL,UAAUG,QAAQ;;;AAMnF"}
@@ -0,0 +1,94 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDataGridRow_unstable", {
enumerable: true,
get: function() {
return useDataGridRow_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const _keyboardkeys = require("@fluentui/keyboard-keys");
const _useTableRow = require("../TableRow/useTableRow");
const _dataGridContext = require("../../contexts/dataGridContext");
const _DataGridSelectionCell = require("../DataGridSelectionCell/DataGridSelectionCell");
const _rowIdContext = require("../../contexts/rowIdContext");
const _tableHeaderContext = require("../../contexts/tableHeaderContext");
const useDataGridRow_unstable = (props, ref)=>{
const rowId = (0, _rowIdContext.useTableRowIdContext)();
const isHeader = (0, _tableHeaderContext.useIsInTableHeader)();
const columnDefs = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.columns);
const selectable = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.selectableRows);
const selected = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.selection.isRowSelected(rowId));
const focusMode = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.focusMode);
const compositeRowTabsterAttribute = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.compositeRowTabsterAttribute);
const tabbable = focusMode === 'row_unstable' || focusMode === 'composite';
const appearance = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>{
if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {
return ctx.selectionAppearance;
}
return 'none';
});
const toggleRow = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.selection.toggleRow);
const onClick = (0, _reactutilities.useEventCallback)((e)=>{
var _props_onClick;
if (selectable && !isHeader) {
toggleRow(e, rowId);
}
(_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
});
const onKeyDown = (0, _reactutilities.useEventCallback)((e)=>{
var _props_onKeyDown;
if (selectable && !isHeader && e.key === _keyboardkeys.Space && !(0, _reactutilities.isInteractiveHTMLElement)(e.target)) {
// stop scrolling
e.preventDefault();
toggleRow(e, rowId);
}
(_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, e);
});
const baseState = (0, _useTableRow.useTableRow_unstable)({
appearance,
'aria-selected': selectable ? selected : undefined,
tabIndex: tabbable && !isHeader ? 0 : undefined,
...focusMode === 'composite' && !isHeader && compositeRowTabsterAttribute,
...props,
onClick,
onKeyDown,
children: null,
as: 'div'
}, ref);
return {
...baseState,
components: {
...baseState.components,
selectionCell: _DataGridSelectionCell.DataGridSelectionCell
},
selectionCell: _reactutilities.slot.optional(props.selectionCell, {
renderByDefault: selectable,
elementType: _DataGridSelectionCell.DataGridSelectionCell
}),
renderCell: props.children,
columnDefs,
// This context value should not be used internally
// It's intended to help power user render functions
dataGridContextValue: useStableDataGridContextValue()
};
};
function useStableDataGridContextValue() {
const ref = _react.useRef(_dataGridContext.dataGridContextDefaultValue);
// Heads up!
// We will not re-render when the context value changes, but we will have the latest value of the context when we do
// render for other reasons.
//
// This relies on a context selector that always returns the same value:
// - we will not re-render when the context value changes
// - we will store the context value in a ref
(0, _dataGridContext.useDataGridContext_unstable)((ctx)=>{
ref.current = ctx;
return null;
});
return ref.current;
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dataGridRowClassNames: function() {
return dataGridRowClassNames;
},
useDataGridRowStyles_unstable: function() {
return useDataGridRowStyles_unstable;
}
});
const _react = require("@griffel/react");
const _useTableRowStylesstyles = require("../TableRow/useTableRowStyles.styles");
const dataGridRowClassNames = {
root: 'fui-DataGridRow',
selectionCell: 'fui-DataGridRow__selectionCell'
};
const useDataGridRowStyles_unstable = (state)=>{
'use no memo';
(0, _useTableRowStylesstyles.useTableRowStyles_unstable)(state);
state.root.className = (0, _react.mergeClasses)(dataGridRowClassNames.root, state.root.className);
if (state.selectionCell) {
state.selectionCell.className = (0, _react.mergeClasses)(dataGridRowClassNames.selectionCell, state.selectionCell.className);
}
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDataGridRowStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableRowStyles_unstable } from '../TableRow/useTableRowStyles.styles';\nexport const dataGridRowClassNames = {\n root: 'fui-DataGridRow',\n selectionCell: 'fui-DataGridRow__selectionCell'\n};\n/**\n * Apply styling to the DataGridRow slots based on the state\n */ export const useDataGridRowStyles_unstable = (state)=>{\n 'use no memo';\n useTableRowStyles_unstable(state);\n state.root.className = mergeClasses(dataGridRowClassNames.root, state.root.className);\n if (state.selectionCell) {\n state.selectionCell.className = mergeClasses(dataGridRowClassNames.selectionCell, state.selectionCell.className);\n }\n return state;\n};\n"],"names":["dataGridRowClassNames","useDataGridRowStyles_unstable","root","selectionCell","state","useTableRowStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,qBAAqB;eAArBA;;IAMIC,6BAA6B;eAA7BA;;;uBARY;yCACc;AACpC,MAAMD,wBAAwB;IACjCE,MAAM;IACNC,eAAe;AACnB;AAGW,MAAMF,gCAAiCG,CAAAA;IAC9C;IACAC,IAAAA,mDAA0B,EAACD;IAC3BA,MAAMF,IAAI,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACP,sBAAsBE,IAAI,EAAEE,MAAMF,IAAI,CAACI,SAAS;IACpF,IAAIF,MAAMD,aAAa,EAAE;QACrBC,MAAMD,aAAa,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACP,sBAAsBG,aAAa,EAAEC,MAAMD,aAAa,CAACG,SAAS;IACnH;IACA,OAAOF;AACX"}
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "DataGridSelectionCell", {
enumerable: true,
get: function() {
return DataGridSelectionCell;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useDataGridSelectionCell = require("./useDataGridSelectionCell");
const _renderDataGridSelectionCell = require("./renderDataGridSelectionCell");
const _useDataGridSelectionCellStylesstyles = require("./useDataGridSelectionCellStyles.styles");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const DataGridSelectionCell = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useDataGridSelectionCell.useDataGridSelectionCell_unstable)(props, ref);
(0, _useDataGridSelectionCellStylesstyles.useDataGridSelectionCellStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useDataGridSelectionCellStyles_unstable')(state);
return (0, _renderDataGridSelectionCell.renderDataGridSelectionCell_unstable)(state);
});
DataGridSelectionCell.displayName = 'DataGridSelectionCell';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridSelectionCell/DataGridSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridSelectionCell_unstable } from './useDataGridSelectionCell';\nimport { renderDataGridSelectionCell_unstable } from './renderDataGridSelectionCell';\nimport { useDataGridSelectionCellStyles_unstable } from './useDataGridSelectionCellStyles.styles';\nimport type { DataGridSelectionCellProps } from './DataGridSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridSelectionCell component\n */\nexport const DataGridSelectionCell: ForwardRefComponent<DataGridSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridSelectionCell_unstable(props, ref);\n\n useDataGridSelectionCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridSelectionCellStyles_unstable')(state);\n\n return renderDataGridSelectionCell_unstable(state);\n});\n\nDataGridSelectionCell.displayName = 'DataGridSelectionCell';\n"],"names":["DataGridSelectionCell","React","forwardRef","props","ref","state","useDataGridSelectionCell_unstable","useDataGridSelectionCellStyles_unstable","useCustomStyleHook_unstable","renderDataGridSelectionCell_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;0CAC2B;6CACG;sDACG;qCAGZ;AAKrC,MAAMA,wBAAAA,WAAAA,GAAyEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7G,MAAMC,QAAQC,IAAAA,2DAAAA,EAAkCH,OAAOC;IAEvDG,IAAAA,6EAAAA,EAAwCF;IAExCG,IAAAA,gDAAAA,EAA4B,2CAA2CH;IAEvE,OAAOI,IAAAA,iEAAAA,EAAqCJ;AAC9C;AAEAL,sBAAsBU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering DataGridSelectionCell
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridSelectionCell/DataGridSelectionCell.types.ts"],"sourcesContent":["import {\n TableSelectionCellProps,\n TableSelectionCellSlots,\n TableSelectionCellState,\n} from '../TableSelectionCell/TableSelectionCell.types';\n\nexport type DataGridSelectionCellSlots = TableSelectionCellSlots;\n\n/**\n * DataGridSelectionCell Props\n */\nexport type DataGridSelectionCellProps = TableSelectionCellProps;\n\n/**\n * State used in rendering DataGridSelectionCell\n */\nexport type DataGridSelectionCellState = TableSelectionCellState;\n"],"names":[],"rangeMappings":";;","mappings":"AAaA;;CAEC"}
@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DataGridSelectionCell: function() {
return _DataGridSelectionCell.DataGridSelectionCell;
},
dataGridSelectionCellClassNames: function() {
return _useDataGridSelectionCellStylesstyles.dataGridSelectionCellClassNames;
},
renderDataGridSelectionCell_unstable: function() {
return _renderDataGridSelectionCell.renderDataGridSelectionCell_unstable;
},
useDataGridSelectionCellStyles_unstable: function() {
return _useDataGridSelectionCellStylesstyles.useDataGridSelectionCellStyles_unstable;
},
useDataGridSelectionCell_unstable: function() {
return _useDataGridSelectionCell.useDataGridSelectionCell_unstable;
}
});
const _DataGridSelectionCell = require("./DataGridSelectionCell");
const _renderDataGridSelectionCell = require("./renderDataGridSelectionCell");
const _useDataGridSelectionCell = require("./useDataGridSelectionCell");
const _useDataGridSelectionCellStylesstyles = require("./useDataGridSelectionCellStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridSelectionCell/index.ts"],"sourcesContent":["export { DataGridSelectionCell } from './DataGridSelectionCell';\nexport type {\n DataGridSelectionCellProps,\n DataGridSelectionCellSlots,\n DataGridSelectionCellState,\n} from './DataGridSelectionCell.types';\nexport { renderDataGridSelectionCell_unstable } from './renderDataGridSelectionCell';\nexport { useDataGridSelectionCell_unstable } from './useDataGridSelectionCell';\nexport {\n dataGridSelectionCellClassNames,\n useDataGridSelectionCellStyles_unstable,\n} from './useDataGridSelectionCellStyles.styles';\n"],"names":["DataGridSelectionCell","dataGridSelectionCellClassNames","renderDataGridSelectionCell_unstable","useDataGridSelectionCellStyles_unstable","useDataGridSelectionCell_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,qBAAqB;eAArBA,4CAAqB;;IAS5BC,+BAA+B;eAA/BA,qEAA+B;;IAHxBC,oCAAoC;eAApCA,iEAAoC;;IAI3CC,uCAAuC;eAAvCA,6EAAuC;;IAHhCC,iCAAiC;eAAjCA,2DAAiC;;;uCAPJ;6CAMe;0CACH;sDAI3C"}
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderDataGridSelectionCell_unstable", {
enumerable: true,
get: function() {
return renderDataGridSelectionCell_unstable;
}
});
const _renderTableSelectionCell = require("../TableSelectionCell/renderTableSelectionCell");
const renderDataGridSelectionCell_unstable = (state)=>{
return (0, _renderTableSelectionCell.renderTableSelectionCell_unstable)(state);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridSelectionCell/renderDataGridSelectionCell.tsx"],"sourcesContent":["import type { DataGridSelectionCellState } from './DataGridSelectionCell.types';\nimport { renderTableSelectionCell_unstable } from '../TableSelectionCell/renderTableSelectionCell';\n\n/**\n * Render the final JSX of DataGridSelectionCell\n */\nexport const renderDataGridSelectionCell_unstable = (state: DataGridSelectionCellState) => {\n return renderTableSelectionCell_unstable(state);\n};\n"],"names":["renderDataGridSelectionCell_unstable","state","renderTableSelectionCell_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;0CALqC;AAK3C,MAAMA,uCAAuC,CAACC;IACnD,OAAOC,IAAAA,2DAAAA,EAAkCD;AAC3C"}
@@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useDataGridSelectionCell_unstable", {
enumerable: true,
get: function() {
return useDataGridSelectionCell_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const _dataGridContext = require("../../contexts/dataGridContext");
const _rowIdContext = require("../../contexts/rowIdContext");
const _tableHeaderContext = require("../../contexts/tableHeaderContext");
const _useTableSelectionCell = require("../TableSelectionCell/useTableSelectionCell");
const useDataGridSelectionCell_unstable = (props, ref)=>{
const isHeader = (0, _tableHeaderContext.useIsInTableHeader)();
const rowId = (0, _rowIdContext.useTableRowIdContext)();
const subtle = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.subtleSelection);
const checked = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>{
if (isHeader && ctx.selection.selectionMode === 'multiselect') {
return ctx.selection.allRowsSelected ? true : ctx.selection.someRowsSelected ? 'mixed' : false;
}
return ctx.selection.isRowSelected(rowId);
});
const toggleAllRows = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.selection.toggleAllRows);
const type = (0, _dataGridContext.useDataGridContext_unstable)((ctx)=>ctx.selection.selectionMode === 'multiselect' ? 'checkbox' : 'radio');
const onClick = (0, _reactutilities.useEventCallback)((e)=>{
var _props_onClick;
if (isHeader) {
toggleAllRows(e);
}
(_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, e);
});
return (0, _useTableSelectionCell.useTableSelectionCell_unstable)({
as: 'div',
role: 'gridcell',
checked,
type,
invisible: isHeader && type === 'radio',
'aria-checked': isHeader && type !== 'radio' ? checked : undefined,
'aria-selected': isHeader || checked === 'mixed' ? undefined : checked,
subtle,
...props,
onClick
}, ref);
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/DataGridSelectionCell/useDataGridSelectionCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\nimport { useTableSelectionCell_unstable } from '../TableSelectionCell/useTableSelectionCell';\nimport type { DataGridSelectionCellProps, DataGridSelectionCellState } from './DataGridSelectionCell.types';\n\n/**\n * Create the state required to render DataGridSelectionCell.\n *\n * The returned state can be modified with hooks such as useDataGridSelectionCellStyles_unstable,\n * before being passed to renderDataGridSelectionCell_unstable.\n *\n * @param props - props from this instance of DataGridSelectionCell\n * @param ref - reference to root HTMLElement of DataGridSelectionCell\n */\nexport const useDataGridSelectionCell_unstable = (\n props: DataGridSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridSelectionCellState => {\n const isHeader = useIsInTableHeader();\n const rowId = useTableRowIdContext();\n const subtle = useDataGridContext_unstable(ctx => ctx.subtleSelection);\n const checked = useDataGridContext_unstable(ctx => {\n if (isHeader && ctx.selection.selectionMode === 'multiselect') {\n return ctx.selection.allRowsSelected ? true : ctx.selection.someRowsSelected ? 'mixed' : false;\n }\n\n return ctx.selection.isRowSelected(rowId);\n });\n\n const toggleAllRows = useDataGridContext_unstable(ctx => ctx.selection.toggleAllRows);\n const type = useDataGridContext_unstable(ctx =>\n ctx.selection.selectionMode === 'multiselect' ? 'checkbox' : 'radio',\n );\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableCellElement>) => {\n if (isHeader) {\n toggleAllRows(e);\n }\n\n props.onClick?.(e);\n });\n\n return useTableSelectionCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n checked,\n type,\n invisible: isHeader && type === 'radio',\n 'aria-checked': isHeader && type !== 'radio' ? checked : undefined,\n 'aria-selected': isHeader || checked === 'mixed' ? undefined : checked,\n subtle,\n ...props,\n onClick,\n },\n ref,\n );\n};\n"],"names":["useDataGridSelectionCell_unstable","props","ref","isHeader","useIsInTableHeader","rowId","useTableRowIdContext","subtle","useDataGridContext_unstable","ctx","subtleSelection","checked","selection","selectionMode","allRowsSelected","someRowsSelected","isRowSelected","toggleAllRows","type","onClick","useEventCallback","e","useTableSelectionCell_unstable","as","role","invisible","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBaA;;;eAAAA;;;;iEAjBU;gCACU;iCACW;8BACP;oCACF;uCACY;AAYxC,MAAMA,oCAAoC,CAC/CC,OACAC;IAEA,MAAMC,WAAWC,IAAAA,sCAAAA;IACjB,MAAMC,QAAQC,IAAAA,kCAAAA;IACd,MAAMC,SAASC,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIC,eAAe;IACrE,MAAMC,UAAUH,IAAAA,4CAAAA,EAA4BC,CAAAA;QAC1C,IAAIN,YAAYM,IAAIG,SAAS,CAACC,aAAa,KAAK,eAAe;YAC7D,OAAOJ,IAAIG,SAAS,CAACE,eAAe,GAAG,OAAOL,IAAIG,SAAS,CAACG,gBAAgB,GAAG,UAAU;QAC3F;QAEA,OAAON,IAAIG,SAAS,CAACI,aAAa,CAACX;IACrC;IAEA,MAAMY,gBAAgBT,IAAAA,4CAAAA,EAA4BC,CAAAA,MAAOA,IAAIG,SAAS,CAACK,aAAa;IACpF,MAAMC,OAAOV,IAAAA,4CAAAA,EAA4BC,CAAAA,MACvCA,IAAIG,SAAS,CAACC,aAAa,KAAK,gBAAgB,aAAa;IAG/D,MAAMM,UAAUC,IAAAA,gCAAAA,EAAiB,CAACC;YAKhCpB;QAJA,IAAIE,UAAU;YACZc,cAAcI;QAChB;QAEApB,CAAAA,iBAAAA,MAAMkB,OAAO,AAAPA,MAAO,QAAblB,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAAA,IAAAA,CAAAA,OAAgBoB;IAClB;IAEA,OAAOC,IAAAA,qDAAAA,EACL;QACEC,IAAI;QACJC,MAAM;QACNb;QACAO;QACAO,WAAWtB,YAAYe,SAAS;QAChC,gBAAgBf,YAAYe,SAAS,UAAUP,UAAUe;QACzD,iBAAiBvB,YAAYQ,YAAY,UAAUe,YAAYf;QAC/DJ;QACA,GAAGN,KAAK;QACRkB;IACF,GACAjB;AAEJ"}
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
dataGridSelectionCellClassNames: function() {
return dataGridSelectionCellClassNames;
},
useDataGridSelectionCellStyles_unstable: function() {
return useDataGridSelectionCellStyles_unstable;
}
});
const _react = require("@griffel/react");
const _useTableSelectionCellStylesstyles = require("../TableSelectionCell/useTableSelectionCellStyles.styles");
const dataGridSelectionCellClassNames = {
root: 'fui-DataGridSelectionCell',
checkboxIndicator: 'fui-DataGridSelectionCell__checkboxIndicator',
radioIndicator: 'fui-DataGridSelectionCell__radioIndicator'
};
const useDataGridSelectionCellStyles_unstable = (state)=>{
'use no memo';
(0, _useTableSelectionCellStylesstyles.useTableSelectionCellStyles_unstable)(state);
state.root.className = (0, _react.mergeClasses)(dataGridSelectionCellClassNames.root, state.root.className);
if (state.checkboxIndicator) {
state.checkboxIndicator.className = (0, _react.mergeClasses)(dataGridSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);
}
if (state.radioIndicator) {
state.radioIndicator.className = (0, _react.mergeClasses)(dataGridSelectionCellClassNames.radioIndicator, state.radioIndicator.className);
}
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useDataGridSelectionCellStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableSelectionCellStyles_unstable } from '../TableSelectionCell/useTableSelectionCellStyles.styles';\nexport const dataGridSelectionCellClassNames = {\n root: 'fui-DataGridSelectionCell',\n checkboxIndicator: 'fui-DataGridSelectionCell__checkboxIndicator',\n radioIndicator: 'fui-DataGridSelectionCell__radioIndicator'\n};\n/**\n * Apply styling to the DataGridSelectionCell slots based on the state\n */ export const useDataGridSelectionCellStyles_unstable = (state)=>{\n 'use no memo';\n useTableSelectionCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridSelectionCellClassNames.root, state.root.className);\n if (state.checkboxIndicator) {\n state.checkboxIndicator.className = mergeClasses(dataGridSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);\n }\n if (state.radioIndicator) {\n state.radioIndicator.className = mergeClasses(dataGridSelectionCellClassNames.radioIndicator, state.radioIndicator.className);\n }\n return state;\n};\n"],"names":["dataGridSelectionCellClassNames","useDataGridSelectionCellStyles_unstable","root","checkboxIndicator","radioIndicator","state","useTableSelectionCellStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,+BAA+B;eAA/BA;;IAOIC,uCAAuC;eAAvCA;;;uBATY;mDACwB;AAC9C,MAAMD,kCAAkC;IAC3CE,MAAM;IACNC,mBAAmB;IACnBC,gBAAgB;AACpB;AAGW,MAAMH,0CAA2CI,CAAAA;IACxD;IACAC,IAAAA,uEAAoC,EAACD;IACrCA,MAAMH,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACR,gCAAgCE,IAAI,EAAEG,MAAMH,IAAI,CAACK,SAAS;IAC9F,IAAIF,MAAMF,iBAAiB,EAAE;QACzBE,MAAMF,iBAAiB,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACR,gCAAgCG,iBAAiB,EAAEE,MAAMF,iBAAiB,CAACI,SAAS;IACzI;IACA,IAAIF,MAAMD,cAAc,EAAE;QACtBC,MAAMD,cAAc,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACR,gCAAgCI,cAAc,EAAEC,MAAMD,cAAc,CAACG,SAAS;IAChI;IACA,OAAOF;AACX"}
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "Table", {
enumerable: true,
get: function() {
return Table;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _useTable = require("./useTable");
const _renderTable = require("./renderTable");
const _useTableStylesstyles = require("./useTableStyles.styles");
const _useTableContextValues = require("./useTableContextValues");
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
const Table = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
const state = (0, _useTable.useTable_unstable)(props, ref);
(0, _useTableStylesstyles.useTableStyles_unstable)(state);
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useTableStyles_unstable')(state);
return (0, _renderTable.renderTable_unstable)(state, (0, _useTableContextValues.useTableContextValues_unstable)(state));
});
Table.displayName = 'Table';
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Table/Table.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTable_unstable } from './useTable';\nimport { renderTable_unstable } from './renderTable';\nimport { useTableStyles_unstable } from './useTableStyles.styles';\nimport type { TableProps } from './Table.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTableContextValues_unstable } from './useTableContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Table component\n */\nexport const Table: ForwardRefComponent<TableProps> = React.forwardRef((props, ref) => {\n const state = useTable_unstable(props, ref);\n\n useTableStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableStyles_unstable')(state);\n\n return renderTable_unstable(state, useTableContextValues_unstable(state));\n});\n\nTable.displayName = 'Table';\n"],"names":["Table","React","forwardRef","props","ref","state","useTable_unstable","useTableStyles_unstable","useCustomStyleHook_unstable","renderTable_unstable","useTableContextValues_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;0BACW;6BACG;sCACG;uCAGO;qCACH;AAKrC,MAAMA,QAAAA,WAAAA,GAAyCC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQC,IAAAA,2BAAAA,EAAkBH,OAAOC;IAEvCG,IAAAA,6CAAAA,EAAwBF;IAExBG,IAAAA,gDAAAA,EAA4B,2BAA2BH;IAEvD,OAAOI,IAAAA,iCAAAA,EAAqBJ,OAAOK,IAAAA,qDAAAA,EAA+BL;AACpE;AAEAL,MAAMW,WAAW,GAAG"}
@@ -0,0 +1,6 @@
/**
* State used in rendering Table
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Table/Table.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableSlots = {\n root: Slot<'table', 'div'>;\n};\n\nexport type TableContextValue = {\n /**\n * Affects the sizes of all table subcomponents\n * @default medium\n */\n size: 'extra-small' | 'small' | 'medium';\n\n /**\n * Render all table elements as divs instead of semantic table elements\n * Using divs no longer uses `display: table` layout but `display: flex`\n * @default false\n */\n noNativeElements: boolean;\n\n /**\n * Whether the table is sortable\n * @default false\n */\n sortable: boolean;\n};\n\nexport type SortDirection = 'ascending' | 'descending';\n\nexport type TableContextValues = {\n table: TableContextValue;\n};\n\n/**\n * Table Props\n */\nexport type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;\n\n/**\n * State used in rendering Table\n */\nexport type TableState = ComponentState<TableSlots> &\n Pick<Required<TableProps>, 'size' | 'noNativeElements'> &\n TableContextValue;\n"],"names":[],"rangeMappings":";;","mappings":"AAsCA;;CAEC"}
@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
Table: function() {
return _Table.Table;
},
renderTable_unstable: function() {
return _renderTable.renderTable_unstable;
},
tableClassName: function() {
return _useTableStylesstyles.tableClassName;
},
tableClassNames: function() {
return _useTableStylesstyles.tableClassNames;
},
useTableStyles_unstable: function() {
return _useTableStylesstyles.useTableStyles_unstable;
},
useTable_unstable: function() {
return _useTable.useTable_unstable;
}
});
const _Table = require("./Table");
const _renderTable = require("./renderTable");
const _useTable = require("./useTable");
const _useTableStylesstyles = require("./useTableStyles.styles");
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Table/index.ts"],"sourcesContent":["export { Table } from './Table';\nexport type {\n SortDirection,\n TableContextValue,\n TableContextValues,\n TableProps,\n TableSlots,\n TableState,\n} from './Table.types';\nexport { renderTable_unstable } from './renderTable';\nexport { useTable_unstable } from './useTable';\nexport { tableClassName, tableClassNames, useTableStyles_unstable } from './useTableStyles.styles';\n"],"names":["Table","renderTable_unstable","tableClassName","tableClassNames","useTableStyles_unstable","useTable_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,KAAK;eAALA,YAAK;;IASLC,oBAAoB;eAApBA,iCAAoB;;IAEpBC,cAAc;eAAdA,oCAAc;;IAAEC,eAAe;eAAfA,qCAAe;;IAAEC,uBAAuB;eAAvBA,6CAAuB;;IADxDC,iBAAiB;eAAjBA,2BAAiB;;;uBAVJ;6BASe;0BACH;sCACuC"}
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "renderTable_unstable", {
enumerable: true,
get: function() {
return renderTable_unstable;
}
});
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
const _reactutilities = require("@fluentui/react-utilities");
const _tableContext = require("../../contexts/tableContext");
const renderTable_unstable = (state, contextValues)=>{
(0, _reactutilities.assertSlots)(state);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_tableContext.TableContextProvider, {
value: contextValues.table,
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
});
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Table/renderTable.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableState, TableSlots, TableContextValues } from './Table.types';\nimport { TableContextProvider } from '../../contexts/tableContext';\n\n/**\n * Render the final JSX of Table\n */\nexport const renderTable_unstable = (state: TableState, contextValues: TableContextValues) => {\n assertSlots<TableSlots>(state);\n\n return (\n <TableContextProvider value={contextValues.table}>\n <state.root />\n </TableContextProvider>\n );\n};\n"],"names":["renderTable_unstable","state","contextValues","assertSlots","_jsx","TableContextProvider","value","table","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAC4B;8BAES;AAK9B,MAAMA,uBAAuB,CAACC,OAAmBC;IACtDC,IAAAA,2BAAAA,EAAwBF;IAExB,OAAA,WAAA,GACEG,IAAAA,eAAA,EAACC,kCAAAA,EAAAA;QAAqBC,OAAOJ,cAAcK,KAAK;kBAC9C,WAAA,GAAAH,IAAAA,eAAA,EAACH,MAAMO,IAAI,EAAA,CAAA;;AAGjB"}
@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useTable_unstable", {
enumerable: true,
get: function() {
return useTable_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _reactutilities = require("@fluentui/react-utilities");
const useTable_unstable = (props, ref)=>{
var _props_as;
const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : props.noNativeElements) ? 'div' : 'table';
var _props_size, _props_noNativeElements, _props_sortable;
return {
components: {
root: rootComponent
},
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(rootComponent, {
// FIXME:
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref,
role: rootComponent === 'div' ? 'table' : undefined,
...props
}), {
elementType: rootComponent
}),
size: (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : 'medium',
noNativeElements: (_props_noNativeElements = props.noNativeElements) !== null && _props_noNativeElements !== void 0 ? _props_noNativeElements : false,
sortable: (_props_sortable = props.sortable) !== null && _props_sortable !== void 0 ? _props_sortable : false
};
};
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Table/useTable.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableProps, TableState } from './Table.types';\n\n/**\n * Create the state required to render Table.\n *\n * The returned state can be modified with hooks such as useTableStyles_unstable,\n * before being passed to renderTable_unstable.\n *\n * @param props - props from this instance of Table\n * @param ref - reference to root HTMLElement of Table\n */\nexport const useTable_unstable = (props: TableProps, ref: React.Ref<HTMLElement>): TableState => {\n const rootComponent = props.as ?? props.noNativeElements ? 'div' : 'table';\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"],"names":["useTable_unstable","props","ref","rootComponent","as","noNativeElements","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType","size","sortable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;gCACwB;AAYxC,MAAMA,oBAAoB,CAACC,OAAmBC;QAC7BD;IAAtB,MAAME,gBAAgBF,CAAAA,CAAAA,YAAAA,MAAMG,EAAE,AAAFA,MAAE,QAARH,cAAAA,KAAAA,IAAAA,YAAYA,MAAMI,gBAAgB,AAAhBA,IAAmB,QAAQ;QAiB3DJ,aACYA,yBACRA;IAjBZ,OAAO;QACLK,YAAY;YACVC,MAAMJ;QACR;QACAI,MAAMC,oBAAAA,CAAKC,MAAM,CACfC,IAAAA,wCAAAA,EAAyBP,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FD,KAAKA;YACLS,MAAMR,kBAAkB,QAAQ,UAAUS;YAC1C,GAAGX,KAAK;QACV,IACA;YAAEY,aAAaV;QAAc;QAE/BW,MAAMb,CAAAA,cAAAA,MAAMa,IAAI,AAAJA,MAAI,QAAVb,gBAAAA,KAAAA,IAAAA,cAAc;QACpBI,kBAAkBJ,CAAAA,0BAAAA,MAAMI,gBAAgB,AAAhBA,MAAgB,QAAtBJ,4BAAAA,KAAAA,IAAAA,0BAA0B;QAC5Cc,UAAUd,CAAAA,kBAAAA,MAAMc,QAAQ,AAARA,MAAQ,QAAdd,oBAAAA,KAAAA,IAAAA,kBAAkB;IAC9B;AACF"}
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "useTableContextValues_unstable", {
enumerable: true,
get: function() {
return useTableContextValues_unstable;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
function useTableContextValues_unstable(state) {
const { size, noNativeElements, sortable } = state;
const tableContext = _react.useMemo(()=>({
noNativeElements,
size,
sortable
}), [
noNativeElements,
size,
sortable
]);
return {
table: tableContext
};
}
@@ -0,0 +1 @@
{"version":3,"sources":["../src/components/Table/useTableContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableContextValues, TableState } from './Table.types';\n\nexport function useTableContextValues_unstable(state: TableState): TableContextValues {\n const { size, noNativeElements, sortable } = state;\n\n const tableContext = React.useMemo(\n () => ({\n noNativeElements,\n size,\n sortable,\n }),\n [noNativeElements, size, sortable],\n );\n\n return {\n table: tableContext,\n };\n}\n"],"names":["useTableContextValues_unstable","state","size","noNativeElements","sortable","tableContext","React","useMemo","table"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;;iEAHO;AAGhB,SAASA,+BAA+BC,KAAiB;IAC9D,MAAM,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,QAAQ,EAAE,GAAGH;IAE7C,MAAMI,eAAeC,OAAMC,OAAO,CAChC,IAAO,CAAA;YACLJ;YACAD;YACAE;QACF,CAAA,GACA;QAACD;QAAkBD;QAAME;KAAS;IAGpC,OAAO;QACLI,OAAOH;IACT;AACF"}
@@ -0,0 +1,73 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
tableClassName: function() {
return tableClassName;
},
tableClassNames: function() {
return tableClassNames;
},
useTableStyles_unstable: function() {
return useTableStyles_unstable;
}
});
const _react = require("@griffel/react");
const tableClassName = 'fui-Table';
const tableClassNames = {
root: 'fui-Table'
};
const useTableLayoutStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
mc9l5x: "f1w4nmp0",
ha4doy: "fmrv4ls",
a9b677: "fly5x3f",
B73mfa3: "f14m3nip"
}
}, {
d: [
".f1w4nmp0{display:table;}",
".fmrv4ls{vertical-align:middle;}",
".fly5x3f{width:100%;}",
".f14m3nip{table-layout:fixed;}"
]
});
const useFlexLayoutStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
mc9l5x: "ftgm304"
}
}, {
d: [
".ftgm304{display:block;}"
]
});
/**
* Styles for the root slot
*/ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
root: {
po53p8: "fgkb47j",
De3pzq: "fhovq9v"
}
}, {
d: [
".fgkb47j{border-collapse:collapse;}",
".fhovq9v{background-color:var(--colorSubtleBackground);}"
]
});
const useTableStyles_unstable = (state)=>{
'use no memo';
const styles = useStyles();
const layoutStyles = {
table: useTableLayoutStyles(),
flex: useFlexLayoutStyles()
};
state.root.className = (0, _react.mergeClasses)(tableClassName, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
return state;
};
@@ -0,0 +1 @@
{"version":3,"sources":["useTableStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const tableClassName = 'fui-Table';\nexport const tableClassNames = {\n root: 'fui-Table'\n};\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table',\n verticalAlign: 'middle',\n width: '100%',\n tableLayout: 'fixed'\n }\n});\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block'\n }\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n borderCollapse: 'collapse',\n backgroundColor: tokens.colorSubtleBackground\n }\n});\n/**\n * Apply styling to the Table slots based on the state\n */ export const useTableStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableClassName, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);\n return state;\n};\n"],"names":["tableClassName","tableClassNames","useTableStyles_unstable","root","useTableLayoutStyles","__styles","mc9l5x","ha4doy","a9b677","B73mfa3","d","useFlexLayoutStyles","useStyles","po53p8","De3pzq","state","styles","layoutStyles","table","flex","className","mergeClasses","noNativeElements"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,cAAc;eAAdA;;IACAC,eAAe;eAAfA;;IA0BIC,uBAAuB;eAAvBA;;;uBA7BwB;AAElC,MAAMF,iBAAiB;AACvB,MAAMC,kBAAkB;IAC3BE,MAAM;AACV;AACA,MAAMC,uBAAoB,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAQ7B,MAAMC,sBAAmB,WAAA,GAAGN,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;IAAA;AAAA,GAAA;IAAAI,GAAA;QAAA;KAAA;AAAA;AAK5B;;CAEA,GAAI,MAAME,YAAS,WAAA,GAAGP,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAU,QAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAJ,GAAA;QAAA;QAAA;KAAA;AAAA;AAQX,MAAMR,0BAA2Ba,CAAAA;IACxC;IACA,MAAMC,SAASJ;IACf,MAAMK,eAAe;QACjBC,OAAOd;QACPe,MAAMR;IACV;IACAI,MAAMZ,IAAI,CAACiB,SAAS,GAAGC,IAAAA,mBAAY,EAACrB,gBAAgBgB,OAAOb,IAAI,EAAEY,MAAMO,gBAAgB,GAAGL,aAAaE,IAAI,CAAChB,IAAI,GAAGc,aAAaC,KAAK,CAACf,IAAI,EAAEY,MAAMZ,IAAI,CAACiB,SAAS;IAChK,OAAOL;AACX"}

Some files were not shown because too many files have changed in this diff Show More