@agility-workbench/react-grid 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -69,23 +69,37 @@ when a setup is cleaned up.
69
69
 
70
70
  `columnPanel.trigger` accepts `"rail"`, `"header"`, `"menu"`, `"footer"`, or `"toolbar"`. All
71
71
  five entry points open the same right-hand column-management drawer.
72
+ `columnPanel.availability` chooses when the panel exists at all: `"always"` (default), or
73
+ `"pivot"` to mount it only while pivot mode is on.
72
74
 
73
- `toolbar` independently enables the `views`, `grouping`, `sorting`, `quickFilter`, and `export`
74
- sections.
75
+ `toolbar` independently enables the `views`, `grouping`, `sorting`, `quickFilter`, `export`, and
76
+ `pivot` sections.
75
77
  Every section is off by default; enabling any one shows the toolbar. The quick-filter section reuses
76
78
  the existing filter and its behavioral `quickFilter` configuration, but supersedes its floating
77
79
  placement and close controls. Changing the object live adds/removes sections without remounting the
78
80
  grid. The toolbar-hosted Columns trigger also counts as content, so
79
81
  `columnPanel={{ trigger: "toolbar" }}` can display a Columns-only toolbar.
80
82
 
81
- Responsive toolbar breakpoints follow the grid container. Labels collapse first, then Export and
82
- Columns move into a More menu, so embedding the grid in a resizable panel does not require any
83
- application-level resize handling.
83
+ Both bars measure the grid container rather than the window, so embedding the grid in a resizable
84
+ panel needs no application-level resize handling. At a width their controls do not fit, nothing is
85
+ clipped, overlapped, or compressed: each control is laid out at its natural size in one of its
86
+ presentation stages, or it moves into that bar's overflow menu (`⋮`), and a bar out of stages
87
+ scrolls. `toolbar={{ responsive }}` and `paginationControls={{ responsive }}` choose the strategy
88
+ — `"collapse"` (default) walks the ladder, `"scroll"` keeps every control at full size and scrolls,
89
+ `false` lets the bar clip. See the core README for the ladder's order.
84
90
 
85
91
  `toolbar.views` adds the saved-view picker. Supply `savedViews={{ views, activeViewId, onChange,
86
92
  onActiveViewChange }}` to keep persistence controlled by React state, local storage, or a remote
87
93
  service. The grid reports complete updated arrays and does not write to storage itself.
88
94
 
95
+ Pivot mode and sheets pass through the same way: `pivotMode` / `pivotColumns` are live props
96
+ (synced through the imperative API, so values assigned in `onGridReady` are not overwritten),
97
+ `pivotColumnMoveMode` is live, `pivotResultColumnDef` / `maxPivotColumns` /
98
+ `pivotNoValuesMessage` / `pivotEmptyMessage` are creation-time, and `sheets={{ sheets,
99
+ activeSheetId, onChange, onActiveSheetChange }}` renders the footer tab strip with the same
100
+ app-owned persistence contract as `savedViews`. See the core README for what pivot mode and
101
+ sheets do.
102
+
89
103
  ## Styling
90
104
 
91
105
  Nothing to do — the grid delivers its own stylesheet when it attaches, once per
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var Me=Object.create;var S=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Ee=Object.getPrototypeOf,Te=Object.prototype.hasOwnProperty;var be=(t,e)=>{for(var n in e)S(t,n,{get:e[n],enumerable:!0})},w=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ve(e))!Te.call(t,r)&&r!==n&&S(t,r,{get:()=>e[r],enumerable:!(a=Pe(e,r))||a.enumerable});return t},p=(t,e,n)=>(w(t,e,"default"),n&&w(n,e,"default")),f=(t,e,n)=>(n=t!=null?Me(Ee(t)):{},w(e||!t||!t.__esModule?S(n,"default",{value:t,enumerable:!0}):n,t)),Fe=t=>w(S({},"__esModule",{value:!0}),t);var g={};be(g,{Grid:()=>fe});module.exports=Fe(g);p(g,require("@agility-workbench/grid"),module.exports);var i=f(require("react"),1),Ce=require("@agility-workbench/grid");var R=f(require("react"),1);var X=require("react-dom"),Z=require("react-dom/client"),A=new Set,x=!1;function Ie(){x=!1;let t=Array.from(A);A.clear();for(let e of t)e.unmount()}function Ae(t){A.add(t),!x&&(x=!0,queueMicrotask(Ie))}var u=class{root;constructor(e){this.root=(0,Z.createRoot)(e)}render(e){this.root?.render(e)}renderSync(e){let n=this.root;n&&(0,X.flushSync)(()=>n.render(e))}destroy(){let e=this.root;e&&(this.root=null,Ae(e))}};var M=require("@agility-workbench/grid"),ie=require("@agility-workbench/grid"),re=require("@agility-workbench/grid");var G=f(require("react"),1);var $=new WeakMap;function xe(t){let e=t?.prototype;return typeof t=="function"&&!!e&&typeof e.init=="function"&&typeof e.getGui=="function"}function Ge(t){return class{el=document.createElement("div");root=null;handle=G.default.createRef();init(n){this.el.style.width="100%",this.el.style.height="100%",this.root=new u(this.el);let a=G.default.createElement(t,{...n,ref:this.handle});this.root.renderSync(a)}getGui(){return this.el}getValue(){return this.handle.current?.getValue()}isParsed(){return this.handle.current?.isParsed?.()??!1}focus(){this.handle.current?.focus?.()}isCancelBeforeStart(){return this.handle.current?.isCancelBeforeStart?.()??!1}destroy(){let n=this.root;this.root=null,n?.destroy()}}}function O(t){if(t==null)return;if(typeof t=="string"||xe(t))return t;let e=$.get(t);if(e)return e;let n=Ge(t);return $.set(t,n),n}var ee=new WeakMap,te=new WeakMap,ne=new WeakMap,oe=new WeakMap;function P(t){return(typeof t=="function"||typeof t=="object")&&t!==null}function Oe(t){let e=t.colDef.cellRendererParams;return e==null||typeof e!="object"?t:{...t,...e}}function De(t){return class{el=document.createElement("span");root=null;init(n){this.el.style.display="inline-flex",this.el.style.alignItems="center",this.el.style.width="100%",this.el.style.height="100%",this.el.style.overflow="hidden",this.root=new u(this.el),this.render(n)}getGui(){return this.el}refresh(n){return this.render(n),!0}destroy(){this.root?.destroy(),this.root=null}render(n){this.root?.render(R.default.createElement(t,Oe(n)))}}}function v(t){if(!t)return;if(typeof t=="function"&&(0,M.isClassRenderer)(t)||!P(t))return t;let e=ee.get(t);if(e)return e;let n=De(t);return ee.set(t,n),n}function ke(t){let e=t.colDef?.tooltipComponentParams;return e==null||typeof e!="object"?t:{...t,...e}}function He(t){return class{el=document.createElement("div");root=null;init(n){this.root=new u(this.el),this.render(n)}getGui(){return this.el}refresh(n){return this.render(n),!0}destroy(){this.root?.destroy(),this.root=null}render(n){this.root?.renderSync(R.default.createElement(t,ke(n)))}}}function E(t){if(!t)return;if(typeof t=="function"&&(0,ie.isClassTooltipComponent)(t)||!P(t))return t;let e=te.get(t);if(e)return e;let n=He(t);return te.set(t,n),n}function T(t){if(t)return e=>{let n=t(e);return!n||typeof n.tooltip!="object"||n.tooltip==null?n:{...n,tooltip:{...n.tooltip,component:E(n.tooltip.component)}}}}function ae(t){return t==null||typeof t=="string"?t:E(t)}function Be(t){let e=t.colDef?.actionFrameComponentParams;return e==null||typeof e!="object"?t:{...t,...e}}function Ve(t){return class{el=document.createElement("div");root=null;init(n){this.root=new u(this.el),this.render(n)}getGui(){return this.el}refresh(n){return this.render(n),!0}destroy(){this.root?.destroy(),this.root=null}render(n){this.root?.render(R.default.createElement(t,Be(n)))}}}function le(t){if(!t)return;if(typeof t=="function"&&(0,re.isClassActionFrameComponent)(t)||!P(t))return t;let e=ne.get(t);if(e)return e;let n=Ve(t);return ne.set(t,n),n}function Le(t){return class{el=document.createElement("span");root=null;init(n){this.root=new u(this.el),this.render(n)}getGui(){return this.el}refresh(n){return this.render(n),!0}destroy(){this.root?.destroy(),this.root=null}render(n){this.root?.render(R.default.createElement(t,n))}}}function D(t){if(!t)return;if(typeof t=="function"&&(0,M.isClassSetFilterComponent)(t)||!P(t))return t;let e=oe.get(t);if(e)return e;let n=Le(t);return oe.set(t,n),n}function ce(t){if(t)return{...t,valueComponent:D(t.valueComponent),selectAllComponent:D(t.selectAllComponent),blanksComponent:D(t.blanksComponent)}}function Ne(t){return{...t,cellRenderer:v(t.cellRenderer),cellEditor:O(t.cellEditor),tooltipComponent:E(t.tooltipComponent),headerTooltip:ae(t.headerTooltip),actionFrameComponent:le(t.actionFrameComponent),filterParams:ce(t.filterParams),children:t.children?k(t.children)??void 0:void 0}}function k(t){return t==null?t:t.map(e=>Ne(e))}function ue(t){if(t==null)return;let e={...t};return"cellRenderer"in t&&(e.cellRenderer=v(t.cellRenderer)),"cellEditor"in t&&(e.cellEditor=O(t.cellEditor)),"tooltipComponent"in t&&(e.tooltipComponent=E(t.tooltipComponent)),"headerTooltip"in t&&(e.headerTooltip=ae(t.headerTooltip)),"actionFrameComponent"in t&&(e.actionFrameComponent=le(t.actionFrameComponent)),"filterParams"in t&&(e.filterParams=ce(t.filterParams)),e}function o(t,e,n){n!=null&&(t[e]=n)}function de(t){let e={};return o(e,"headerHeight",t.headerHeight),o(e,"leafHeaderHeight",t.leafHeaderHeight),o(e,"parentHeaderHeight",t.parentHeaderHeight),o(e,"rowHeight",t.rowHeight),o(e,"pinnedTopRowData",t.pinnedTopRowData),o(e,"pinnedBottomRowData",t.pinnedBottomRowData),o(e,"getRowId",t.getRowId),o(e,"rowIdKey",t.rowIdKey),o(e,"rowDataMode",t.rowDataMode),o(e,"asyncTransactionWaitMs",t.asyncTransactionWaitMs),o(e,"overscanRowCount",t.overscanRowCount),o(e,"minResizeWidth",t.minResizeWidth),o(e,"maxColumnWidth",t.maxColumnWidth),o(e,"autosizeColumnsOnDataChange",t.autosizeColumnsOnDataChange),o(e,"allowExportAsCSV",t.allowExportAsCSV),o(e,"allowExportAsExcel",t.allowExportAsExcel),o(e,"pagination",t.pagination),o(e,"paginationControls",t.paginationControls),o(e,"rowNumbers",t.rowNumbers),o(e,"rowHover",t.rowHover),o(e,"columnHover",t.columnHover),o(e,"zebraRows",t.zebraRows),o(e,"getRowClass",t.getRowClass),o(e,"getRowStyle",t.getRowStyle),o(e,"getRowPresentation",T(t.getRowPresentation)),o(e,"onCellClicked",t.onCellClicked),o(e,"onRowClicked",t.onRowClicked),o(e,"onCellValueChanged",t.onCellValueChanged),o(e,"onSelectionChanged",t.onSelectionChanged),o(e,"onSortChanged",t.onSortChanged),o(e,"onFilterChanged",t.onFilterChanged),o(e,"onHistoryChanged",t.onHistoryChanged),o(e,"ariaLabel",t.ariaLabel),o(e,"ariaLabelledBy",t.ariaLabelledBy),o(e,"highlightActiveCell",t.highlightActiveCell),o(e,"rowSelection",t.rowSelection),o(e,"cellSelection",t.cellSelection),o(e,"rangeSelection",t.rangeSelection),o(e,"columnSelection",t.columnSelection),o(e,"headerKeyboardNavigation",t.headerKeyboardNavigation),o(e,"showColumnButtonsOnHover",t.showColumnButtonsOnHover),o(e,"selectAllRowsOnHeaderClick",t.selectAllRowsOnHeaderClick),o(e,"selectAllScope",t.selectAllScope),o(e,"selectionPersistence",t.selectionPersistence),o(e,"clearSelectionOnBodyClick",t.clearSelectionOnBodyClick),o(e,"resetPageOn",t.resetPageOn),o(e,"pageSize",t.pageSize),o(e,"pageSizes",t.pageSizes),o(e,"serverSideBlockSize",t.serverSideBlockSize),o(e,"rowModelType",t.rowModelType),o(e,"getGroupChildCount",t.getGroupChildCount),o(e,"paginationUnknownTotalTooltip",t.paginationUnknownTotalTooltip),o(e,"undoLimit",t.undoLimit),o(e,"editTrigger",t.editTrigger),o(e,"readOnlyEdit",t.readOnlyEdit),o(e,"initialSort",t.initialSort),o(e,"showSortPriority",t.showSortPriority),o(e,"pinnedRowsEditable",t.pinnedRowsEditable),o(e,"rowPinningMenu",t.rowPinningMenu),o(e,"rowInsertionMenu",t.rowInsertionMenu),o(e,"suppressKeyboardEdit",t.suppressKeyboardEdit),o(e,"suppressTypeToEdit",t.suppressTypeToEdit),o(e,"moveAfterEdit",t.moveAfterEdit),o(e,"commitOnBlur",t.commitOnBlur),o(e,"reevaluateOnEdit",t.reevaluateOnEdit),o(e,"groupDisplayType",t.groupDisplayType),o(e,"groupColumnDef",t.groupColumnDef),o(e,"groupDefaultExpanded",t.groupDefaultExpanded),o(e,"groupSortMode",t.groupSortMode),o(e,"treeData",t.treeData),o(e,"groupRowsSelectable",t.groupRowsSelectable),o(e,"isRowSelectable",t.isRowSelectable),o(e,"isRowPinned",t.isRowPinned),o(e,"groupRowsSticky",t.groupRowsSticky),o(e,"isFullWidthRow",t.isFullWidthRow),o(e,"tooltip",t.tooltip),o(e,"quickFilter",t.quickFilter),o(e,"columnPanel",t.columnPanel),o(e,"toolbar",t.toolbar),o(e,"savedViews",t.savedViews),o(e,"loadingMessage",t.loadingMessage),o(e,"noRowsMessage",t.noRowsMessage),o(e,"filterDebounceMs",t.filterDebounceMs),o(e,"cellFlashDuration",t.cellFlashDuration),o(e,"cellFadeDuration",t.cellFadeDuration),o(e,"icons",t.icons),o(e,"theme",t.theme),t.fullWidthCellRenderer!=null&&(e.fullWidthCellRenderer=v(t.fullWidthCellRenderer)),t.defaultColDef!=null&&(e.defaultColDef=ue(t.defaultColDef)),t.bodyContextMenu===!1&&(e.bodyContextMenu=!1),t.rowModelType==="serverSide"&&(o(e,"serverSideDataSource",t.serverSideDataSource),o(e,"serverSideAggregationSource",t.serverSideAggregationSource)),o(e,"suppressStyleInjection",t.suppressStyleInjection),o(e,"styleNonce",t.styleNonce),e}var se=f(require("react"),1);var b=class{constructor(e){this.opts=e}resolveMenuItems(e,n){let a=[],r=n,d=this.opts.getBodyMenuItems?this.opts.getBodyMenuItems({ctx:e,items:r}):r;return{items:this.normalizeItems(d,a),cleanup:()=>{for(let C of a)C()}}}normalizeItems(e,n){return e.map(a=>{if(a.isSeparator)return{isSeparator:!0};let r=this.normalizeSlot(a.left,n),d=this.normalizeSlot(a.right,n);return{...a,left:r,right:d,subMenu:a.subMenu?this.normalizeItems(a.subMenu,n):void 0}})}normalizeSlot(e,n){if(e){if(typeof e=="string"||e instanceof HTMLElement)return e;if(se.default.isValidElement(e)){let{el:a,unmount:r}=this.mountReact(e);return n.push(r),a}}}mountReact(e){let n=document.createElement("span");n.style.display="inline-flex",n.style.alignItems="center";let a=new u(n);return a.render(e),{el:n,unmount:()=>a.destroy()}}};var me=f(require("react"),1);var F=class{constructor(e){this.opts=e}resolveMenuItems(e,n){let a=[],r=n,d=this.opts.getColumnMenuItems?this.opts.getColumnMenuItems({ctx:e,items:r}):r;return{items:this.normalizeItems(d,a),cleanup:()=>{for(let C of a)C()}}}normalizeItems(e,n){return e.map(a=>{if(a.isSeparator)return{isSeparator:!0};let r=this.normalizeSlot(a.left,n),d=this.normalizeSlot(a.right,n);return{...a,left:r,right:d,subMenu:a.subMenu?this.normalizeItems(a.subMenu,n):void 0}})}normalizeSlot(e,n){if(e){if(typeof e=="string"||e instanceof HTMLElement)return e;if(me.default.isValidElement(e)){let{el:a,unmount:r}=this.mountReact(e);return n.push(r),a}}}mountReact(e){let n=document.createElement("span");n.style.display="inline-flex",n.style.alignItems="center";let a=new u(n);return a.render(e),{el:n,unmount:()=>a.destroy()}}};var Re=require("react/jsx-runtime");function m(t,e){if(t){if(typeof t=="function"){t(e);return}t.current=e}}function ze(t){if(!t.destroyed){t.destroyed=!0;try{t.api.destroy()}catch{}}}var fe=i.default.forwardRef(function(e,n){let a=(0,i.useRef)(null),r=(0,i.useRef)(null),d=(0,i.useRef)(e.onGridReady),y=(0,i.useRef)(e.getColumnMenuItems),C=(0,i.useRef)(e.bodyContextMenu),H=(0,i.useRef)(e.onCellClicked),B=(0,i.useRef)(e.onRowClicked),V=(0,i.useRef)(e.onCellValueChanged),L=(0,i.useRef)(e.onSelectionChanged),N=(0,i.useRef)(e.onSortChanged),z=(0,i.useRef)(e.onFilterChanged),K=(0,i.useRef)(e.onHistoryChanged),W=(0,i.useRef)(e.onBeforeCellCommit);d.current=e.onGridReady,y.current=e.getColumnMenuItems,C.current=e.bodyContextMenu,H.current=e.onCellClicked,B.current=e.onRowClicked,V.current=e.onCellValueChanged,L.current=e.onSelectionChanged,N.current=e.onSortChanged,z.current=e.onFilterChanged,K.current=e.onHistoryChanged,W.current=e.onBeforeCellCommit,(0,i.useLayoutEffect)(()=>{let c=a.current;if(!c)return;let s=de(e);s.onCellClicked=l=>H.current?.(l),s.onRowClicked=l=>B.current?.(l),s.onCellValueChanged=l=>V.current?.(l),s.onSelectionChanged=l=>L.current?.(l),s.onSortChanged=l=>N.current?.(l),s.onFilterChanged=l=>z.current?.(l),s.onHistoryChanged=l=>K.current?.(l),s.onBeforeCellCommit=l=>W.current?.(l);let h=(0,Ce.createGrid)(c,{...s,menuAdapter:new F({getColumnMenuItems:l=>y.current?.(l)??l.items}),bodyMenuAdapter:new b({getBodyMenuItems:l=>{let Q=C.current;return typeof Q=="function"?Q(l):l.items}})}),I={api:h,destroyed:!1};return r.current=I,m(n,h),m(e.apiRef,h),d.current?.(h),()=>{r.current===I&&(r.current=null),m(n,null),m(e.apiRef,null),ze(I)}},[]),(0,i.useLayoutEffect)(()=>{let c=r.current?.api??null;return m(n,c),m(e.apiRef,c),()=>{m(n,null),m(e.apiRef,null)}},[n,e.apiRef]),(0,i.useLayoutEffect)(()=>{let c=r.current?.api;c&&c.updateGridOptions({columnDefs:k(e.columnDefs)})},[e.columnDefs]),(0,i.useLayoutEffect)(()=>{let c=r.current?.api;c&&e.rowModelType!=="serverSide"&&c.setRowData(e.rowData??e.data??[])},[e.data,e.rowData,e.rowModelType]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({groupDisplayType:e.groupDisplayType})},[e.groupDisplayType]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({groupSortMode:e.groupSortMode})},[e.groupSortMode]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({groupRowsSelectable:e.groupRowsSelectable})},[e.groupRowsSelectable]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({isRowSelectable:e.isRowSelectable})},[e.isRowSelectable]);let ge=JSON.stringify(e.rowSelection??null),j=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!j.current){j.current=!0;return}r.current?.api.updateGridOptions({rowSelection:e.rowSelection})},[ge]),(0,i.useLayoutEffect)(()=>{r.current?.api.setTreeDataKeyboardNavigationOptions({keyboardNavigationMode:e.treeData?.keyboardNavigationMode,enableKeyboardNavigationModeSwitch:e.treeData?.enableKeyboardNavigationModeSwitch??!1})},[e.treeData?.keyboardNavigationMode,e.treeData?.enableKeyboardNavigationModeSwitch]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({pinnedTopRowData:e.pinnedTopRowData,pinnedBottomRowData:e.pinnedBottomRowData,isRowPinned:e.isRowPinned,groupRowsSticky:e.groupRowsSticky})},[e.pinnedTopRowData,e.pinnedBottomRowData,e.isRowPinned,e.groupRowsSticky]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({rowHover:e.rowHover??!0,columnHover:e.columnHover??!1,zebraRows:e.zebraRows??!1,getRowClass:e.getRowClass,getRowStyle:e.getRowStyle,getRowPresentation:T(e.getRowPresentation),ariaLabel:e.ariaLabel,ariaLabelledBy:e.ariaLabelledBy,highlightActiveCell:e.highlightActiveCell??!1,cellSelection:e.cellSelection??!0,rangeSelection:e.rangeSelection??!0,columnSelection:e.columnSelection??!0,headerKeyboardNavigation:e.headerKeyboardNavigation??!0,showColumnButtonsOnHover:e.showColumnButtonsOnHover??!1,bodyContextMenu:e.bodyContextMenu!==!1,editTrigger:e.editTrigger??"doubleClick",readOnlyEdit:e.readOnlyEdit??!1,pinnedRowsEditable:e.pinnedRowsEditable??!1,rowPinningMenu:e.rowPinningMenu??!1,rowInsertionMenu:e.rowInsertionMenu,suppressKeyboardEdit:e.suppressKeyboardEdit??!1,suppressTypeToEdit:e.suppressTypeToEdit??!1,moveAfterEdit:e.moveAfterEdit??!0,commitOnBlur:e.commitOnBlur??!0,asyncTransactionWaitMs:e.asyncTransactionWaitMs??16})},[e.rowHover,e.columnHover,e.zebraRows,e.getRowClass,e.getRowStyle,e.getRowPresentation,e.ariaLabel,e.ariaLabelledBy,e.highlightActiveCell,e.cellSelection,e.rangeSelection,e.columnSelection,e.headerKeyboardNavigation,e.showColumnButtonsOnHover,e.bodyContextMenu,e.editTrigger,e.readOnlyEdit,e.pinnedRowsEditable,e.rowPinningMenu,e.rowInsertionMenu,e.suppressKeyboardEdit,e.suppressTypeToEdit,e.moveAfterEdit,e.commitOnBlur,e.asyncTransactionWaitMs]),(0,i.useLayoutEffect)(()=>{let c=r.current;!c||e.rowModelType!=="serverSide"||e.serverSideDataSource&&c.api.updateGridOptions({serverSideDataSource:e.serverSideDataSource})},[e.rowModelType,e.serverSideDataSource]),(0,i.useLayoutEffect)(()=>{let c=r.current;!c||e.rowModelType!=="serverSide"||e.serverSideAggregationSource&&c.api.updateGridOptions({serverSideAggregationSource:e.serverSideAggregationSource})},[e.rowModelType,e.serverSideAggregationSource]),(0,i.useLayoutEffect)(()=>{let c=r.current?.api;c&&c.dispatch({type:"overlayShow",overlayType:e.loading?"loading":"none"})},[e.loading]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({pagination:e.pagination})},[e.pagination]);let ye=JSON.stringify(e.paginationControls??null),q=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!q.current){q.current=!0;return}r.current?.api.updateGridOptions({paginationControls:e.paginationControls})},[ye]);let he=JSON.stringify(e.quickFilter??null),U=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!U.current){U.current=!0;return}r.current?.api.updateGridOptions({quickFilter:e.quickFilter})},[he]);let we=JSON.stringify(e.tooltip??null),J=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!J.current){J.current=!0;return}r.current?.api.updateGridOptions({tooltip:e.tooltip})},[we]);let Se=JSON.stringify(e.columnPanel??null),_=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!_.current){_.current=!0;return}r.current?.api.updateGridOptions({columnPanel:e.columnPanel})},[Se]);let pe=JSON.stringify(e.toolbar??null),Y=(0,i.useRef)(!1);return(0,i.useLayoutEffect)(()=>{if(!Y.current){Y.current=!0;return}r.current?.api.updateGridOptions({toolbar:e.toolbar})},[pe]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({savedViews:e.savedViews})},[e.savedViews]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({theme:e.theme,icons:{...e.theme?.getIcons(),...e.icons}})},[e.theme,e.icons]),(0,Re.jsx)("div",{ref:a,className:e.className,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",...e.style}})});0&&(module.exports={Grid,...require("@agility-workbench/grid")});
1
+ "use strict";var Te=Object.create;var w=Object.defineProperty;var be=Object.getOwnPropertyDescriptor;var Fe=Object.getOwnPropertyNames;var Ie=Object.getPrototypeOf,Ae=Object.prototype.hasOwnProperty;var xe=(t,e)=>{for(var n in e)w(t,n,{get:e[n],enumerable:!0})},h=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Fe(e))!Ae.call(t,r)&&r!==n&&w(t,r,{get:()=>e[r],enumerable:!(a=be(e,r))||a.enumerable});return t},S=(t,e,n)=>(h(t,e,"default"),n&&h(n,e,"default")),f=(t,e,n)=>(n=t!=null?Te(Ie(t)):{},h(e||!t||!t.__esModule?w(n,"default",{value:t,enumerable:!0}):n,t)),Ge=t=>h(w({},"__esModule",{value:!0}),t);var g={};xe(g,{Grid:()=>ye});module.exports=Ge(g);S(g,require("@agility-workbench/grid"),module.exports);var i=f(require("react"),1),ge=require("@agility-workbench/grid");var R=f(require("react"),1);var ee=require("react-dom"),te=require("react-dom/client"),x=new Set,G=!1;function Oe(){G=!1;let t=Array.from(x);x.clear();for(let e of t)e.unmount()}function De(t){x.add(t),!G&&(G=!0,queueMicrotask(Oe))}var c=class{root;constructor(e){this.root=(0,te.createRoot)(e)}render(e){this.root?.render(e)}renderSync(e){let n=this.root;n&&(0,ee.flushSync)(()=>n.render(e))}destroy(){let e=this.root;e&&(this.root=null,De(e))}};var p=require("@agility-workbench/grid"),le=require("@agility-workbench/grid"),ue=require("@agility-workbench/grid");var O=f(require("react"),1);var ne=new WeakMap;function ke(t){let e=t?.prototype;return typeof t=="function"&&!!e&&typeof e.init=="function"&&typeof e.getGui=="function"}function He(t){return class{el=document.createElement("div");root=null;handle=O.default.createRef();init(n){this.el.style.width="100%",this.el.style.height="100%",this.root=new c(this.el);let a=O.default.createElement(t,{...n,ref:this.handle});this.root.renderSync(a)}getGui(){return this.el}getValue(){return this.handle.current?.getValue()}isParsed(){return this.handle.current?.isParsed?.()??!1}focus(){this.handle.current?.focus?.()}isCancelBeforeStart(){return this.handle.current?.isCancelBeforeStart?.()??!1}destroy(){let n=this.root;this.root=null,n?.destroy()}}}function D(t){if(t==null)return;if(typeof t=="string"||ke(t))return t;let e=ne.get(t);if(e)return e;let n=He(t);return ne.set(t,n),n}var oe=new WeakMap,ie=new WeakMap,re=new WeakMap,ae=new WeakMap;function v(t){return(typeof t=="function"||typeof t=="object")&&t!==null}function Be(t){let e=t.colDef.cellRendererParams;return e==null||typeof e!="object"?t:{...t,...e}}function Ve(t){return class{el=document.createElement("span");root=null;init(n){this.el.style.display="inline-flex",this.el.style.alignItems="center",this.el.style.width="100%",this.el.style.height="100%",this.el.style.overflow="hidden",this.root=new c(this.el),this.render(n)}getGui(){return this.el}refresh(n){return this.render(n),!0}destroy(){this.root?.destroy(),this.root=null}render(n){this.root?.render(R.default.createElement(t,Be(n)))}}}function M(t){if(!t)return;if(typeof t=="function"&&(0,p.isClassRenderer)(t)||!v(t))return t;let e=oe.get(t);if(e)return e;let n=Ve(t);return oe.set(t,n),n}function Ne(t){let e=t.colDef?.tooltipComponentParams;return e==null||typeof e!="object"?t:{...t,...e}}function Le(t){return class{el=document.createElement("div");root=null;init(n){this.root=new c(this.el),this.render(n)}getGui(){return this.el}refresh(n){return this.render(n),!0}destroy(){this.root?.destroy(),this.root=null}render(n){this.root?.renderSync(R.default.createElement(t,Ne(n)))}}}function P(t){if(!t)return;if(typeof t=="function"&&(0,le.isClassTooltipComponent)(t)||!v(t))return t;let e=ie.get(t);if(e)return e;let n=Le(t);return ie.set(t,n),n}function E(t){if(t)return e=>{let n=t(e);return!n||typeof n.tooltip!="object"||n.tooltip==null?n:{...n,tooltip:{...n.tooltip,component:P(n.tooltip.component)}}}}function ce(t){return t==null||typeof t=="string"?t:P(t)}function ze(t){let e=t.colDef?.actionFrameComponentParams;return e==null||typeof e!="object"?t:{...t,...e}}function Ke(t){return class{el=document.createElement("div");root=null;init(n){this.root=new c(this.el),this.render(n)}getGui(){return this.el}refresh(n){return this.render(n),!0}destroy(){this.root?.destroy(),this.root=null}render(n){this.root?.render(R.default.createElement(t,ze(n)))}}}function de(t){if(!t)return;if(typeof t=="function"&&(0,ue.isClassActionFrameComponent)(t)||!v(t))return t;let e=re.get(t);if(e)return e;let n=Ke(t);return re.set(t,n),n}function We(t){return class{el=document.createElement("span");root=null;init(n){this.root=new c(this.el),this.render(n)}getGui(){return this.el}refresh(n){return this.render(n),!0}destroy(){this.root?.destroy(),this.root=null}render(n){this.root?.render(R.default.createElement(t,n))}}}function k(t){if(!t)return;if(typeof t=="function"&&(0,p.isClassSetFilterComponent)(t)||!v(t))return t;let e=ae.get(t);if(e)return e;let n=We(t);return ae.set(t,n),n}function se(t){if(t)return{...t,valueComponent:k(t.valueComponent),selectAllComponent:k(t.selectAllComponent),blanksComponent:k(t.blanksComponent)}}function je(t){return{...t,cellRenderer:M(t.cellRenderer),cellEditor:D(t.cellEditor),tooltipComponent:P(t.tooltipComponent),headerTooltip:ce(t.headerTooltip),actionFrameComponent:de(t.actionFrameComponent),filterParams:se(t.filterParams),children:t.children?H(t.children)??void 0:void 0}}function H(t){return t==null?t:t.map(e=>je(e))}function me(t){if(t==null)return;let e={...t};return"cellRenderer"in t&&(e.cellRenderer=M(t.cellRenderer)),"cellEditor"in t&&(e.cellEditor=D(t.cellEditor)),"tooltipComponent"in t&&(e.tooltipComponent=P(t.tooltipComponent)),"headerTooltip"in t&&(e.headerTooltip=ce(t.headerTooltip)),"actionFrameComponent"in t&&(e.actionFrameComponent=de(t.actionFrameComponent)),"filterParams"in t&&(e.filterParams=se(t.filterParams)),e}function o(t,e,n){n!=null&&(t[e]=n)}function Ce(t){let e={};return o(e,"headerHeight",t.headerHeight),o(e,"leafHeaderHeight",t.leafHeaderHeight),o(e,"parentHeaderHeight",t.parentHeaderHeight),o(e,"rowHeight",t.rowHeight),o(e,"pinnedTopRowData",t.pinnedTopRowData),o(e,"pinnedBottomRowData",t.pinnedBottomRowData),o(e,"getRowId",t.getRowId),o(e,"rowIdKey",t.rowIdKey),o(e,"rowDataMode",t.rowDataMode),o(e,"asyncTransactionWaitMs",t.asyncTransactionWaitMs),o(e,"overscanRowCount",t.overscanRowCount),o(e,"minResizeWidth",t.minResizeWidth),o(e,"maxColumnWidth",t.maxColumnWidth),o(e,"pivotMode",t.pivotMode),o(e,"pivotColumns",t.pivotColumns),o(e,"pivotResultColumnDef",t.pivotResultColumnDef),o(e,"maxPivotColumns",t.maxPivotColumns),o(e,"pivotColumnMoveMode",t.pivotColumnMoveMode),o(e,"autosizeColumnsOnDataChange",t.autosizeColumnsOnDataChange),o(e,"allowExportAsCSV",t.allowExportAsCSV),o(e,"allowExportAsExcel",t.allowExportAsExcel),o(e,"pagination",t.pagination),o(e,"paginationControls",t.paginationControls),o(e,"rowNumbers",t.rowNumbers),o(e,"rowHover",t.rowHover),o(e,"columnHover",t.columnHover),o(e,"zebraRows",t.zebraRows),o(e,"getRowClass",t.getRowClass),o(e,"getRowStyle",t.getRowStyle),o(e,"getRowPresentation",E(t.getRowPresentation)),o(e,"onCellClicked",t.onCellClicked),o(e,"onRowClicked",t.onRowClicked),o(e,"onCellValueChanged",t.onCellValueChanged),o(e,"onSelectionChanged",t.onSelectionChanged),o(e,"onSortChanged",t.onSortChanged),o(e,"onFilterChanged",t.onFilterChanged),o(e,"onHistoryChanged",t.onHistoryChanged),o(e,"ariaLabel",t.ariaLabel),o(e,"ariaLabelledBy",t.ariaLabelledBy),o(e,"highlightActiveCell",t.highlightActiveCell),o(e,"rowSelection",t.rowSelection),o(e,"cellSelection",t.cellSelection),o(e,"rangeSelection",t.rangeSelection),o(e,"columnSelection",t.columnSelection),o(e,"headerKeyboardNavigation",t.headerKeyboardNavigation),o(e,"showColumnButtonsOnHover",t.showColumnButtonsOnHover),o(e,"selectAllRowsOnHeaderClick",t.selectAllRowsOnHeaderClick),o(e,"selectAllScope",t.selectAllScope),o(e,"selectionPersistence",t.selectionPersistence),o(e,"clearSelectionOnBodyClick",t.clearSelectionOnBodyClick),o(e,"resetPageOn",t.resetPageOn),o(e,"pageSize",t.pageSize),o(e,"pageSizes",t.pageSizes),o(e,"serverSideBlockSize",t.serverSideBlockSize),o(e,"rowModelType",t.rowModelType),o(e,"getGroupChildCount",t.getGroupChildCount),o(e,"paginationUnknownTotalTooltip",t.paginationUnknownTotalTooltip),o(e,"undoLimit",t.undoLimit),o(e,"editTrigger",t.editTrigger),o(e,"readOnlyEdit",t.readOnlyEdit),o(e,"initialSort",t.initialSort),o(e,"showSortPriority",t.showSortPriority),o(e,"pinnedRowsEditable",t.pinnedRowsEditable),o(e,"rowPinningMenu",t.rowPinningMenu),o(e,"rowInsertionMenu",t.rowInsertionMenu),o(e,"suppressKeyboardEdit",t.suppressKeyboardEdit),o(e,"suppressTypeToEdit",t.suppressTypeToEdit),o(e,"moveAfterEdit",t.moveAfterEdit),o(e,"commitOnBlur",t.commitOnBlur),o(e,"reevaluateOnEdit",t.reevaluateOnEdit),o(e,"groupDisplayType",t.groupDisplayType),o(e,"groupColumnDef",t.groupColumnDef),o(e,"groupDefaultExpanded",t.groupDefaultExpanded),o(e,"groupSortMode",t.groupSortMode),o(e,"treeData",t.treeData),o(e,"groupRowsSelectable",t.groupRowsSelectable),o(e,"isRowSelectable",t.isRowSelectable),o(e,"isRowPinned",t.isRowPinned),o(e,"groupRowsSticky",t.groupRowsSticky),o(e,"isFullWidthRow",t.isFullWidthRow),o(e,"tooltip",t.tooltip),o(e,"quickFilter",t.quickFilter),o(e,"columnPanel",t.columnPanel),o(e,"toolbar",t.toolbar),o(e,"savedViews",t.savedViews),o(e,"sheets",t.sheets),o(e,"loadingMessage",t.loadingMessage),o(e,"noRowsMessage",t.noRowsMessage),o(e,"pivotNoValuesMessage",t.pivotNoValuesMessage),o(e,"pivotEmptyMessage",t.pivotEmptyMessage),o(e,"filterDebounceMs",t.filterDebounceMs),o(e,"cellFlashDuration",t.cellFlashDuration),o(e,"cellFadeDuration",t.cellFadeDuration),o(e,"icons",t.icons),o(e,"theme",t.theme),t.fullWidthCellRenderer!=null&&(e.fullWidthCellRenderer=M(t.fullWidthCellRenderer)),t.defaultColDef!=null&&(e.defaultColDef=me(t.defaultColDef)),t.bodyContextMenu===!1&&(e.bodyContextMenu=!1),t.rowModelType==="serverSide"&&(o(e,"serverSideDataSource",t.serverSideDataSource),o(e,"serverSideAggregationSource",t.serverSideAggregationSource)),o(e,"suppressStyleInjection",t.suppressStyleInjection),o(e,"styleNonce",t.styleNonce),e}var fe=f(require("react"),1);var T=class{constructor(e){this.opts=e}resolveMenuItems(e,n){let a=[],r=n,d=this.opts.getBodyMenuItems?this.opts.getBodyMenuItems({ctx:e,items:r}):r;return{items:this.normalizeItems(d,a),cleanup:()=>{for(let C of a)C()}}}normalizeItems(e,n){return e.map(a=>{if(a.isSeparator)return{isSeparator:!0};let r=this.normalizeSlot(a.left,n),d=this.normalizeSlot(a.right,n);return{...a,left:r,right:d,subMenu:a.subMenu?this.normalizeItems(a.subMenu,n):void 0}})}normalizeSlot(e,n){if(e){if(typeof e=="string"||e instanceof HTMLElement)return e;if(fe.default.isValidElement(e)){let{el:a,unmount:r}=this.mountReact(e);return n.push(r),a}}}mountReact(e){let n=document.createElement("span");n.style.display="inline-flex",n.style.alignItems="center";let a=new c(n);return a.render(e),{el:n,unmount:()=>a.destroy()}}};var Re=f(require("react"),1);var b=class{constructor(e){this.opts=e}resolveMenuItems(e,n){let a=[],r=n,d=this.opts.getColumnMenuItems?this.opts.getColumnMenuItems({ctx:e,items:r}):r;return{items:this.normalizeItems(d,a),cleanup:()=>{for(let C of a)C()}}}normalizeItems(e,n){return e.map(a=>{if(a.isSeparator)return{isSeparator:!0};let r=this.normalizeSlot(a.left,n),d=this.normalizeSlot(a.right,n);return{...a,left:r,right:d,subMenu:a.subMenu?this.normalizeItems(a.subMenu,n):void 0}})}normalizeSlot(e,n){if(e){if(typeof e=="string"||e instanceof HTMLElement)return e;if(Re.default.isValidElement(e)){let{el:a,unmount:r}=this.mountReact(e);return n.push(r),a}}}mountReact(e){let n=document.createElement("span");n.style.display="inline-flex",n.style.alignItems="center";let a=new c(n);return a.render(e),{el:n,unmount:()=>a.destroy()}}};var he=require("react/jsx-runtime");function m(t,e){if(t){if(typeof t=="function"){t(e);return}t.current=e}}function qe(t){if(!t.destroyed){t.destroyed=!0;try{t.api.destroy()}catch{}}}var ye=i.default.forwardRef(function(e,n){let a=(0,i.useRef)(null),r=(0,i.useRef)(null),d=(0,i.useRef)(e.onGridReady),y=(0,i.useRef)(e.getColumnMenuItems),C=(0,i.useRef)(e.bodyContextMenu),B=(0,i.useRef)(e.onCellClicked),V=(0,i.useRef)(e.onRowClicked),N=(0,i.useRef)(e.onCellValueChanged),L=(0,i.useRef)(e.onSelectionChanged),z=(0,i.useRef)(e.onSortChanged),K=(0,i.useRef)(e.onFilterChanged),W=(0,i.useRef)(e.onHistoryChanged),j=(0,i.useRef)(e.onBeforeCellCommit);d.current=e.onGridReady,y.current=e.getColumnMenuItems,C.current=e.bodyContextMenu,B.current=e.onCellClicked,V.current=e.onRowClicked,N.current=e.onCellValueChanged,L.current=e.onSelectionChanged,z.current=e.onSortChanged,K.current=e.onFilterChanged,W.current=e.onHistoryChanged,j.current=e.onBeforeCellCommit,(0,i.useLayoutEffect)(()=>{let l=a.current;if(!l)return;let s=Ce(e);s.onCellClicked=u=>B.current?.(u),s.onRowClicked=u=>V.current?.(u),s.onCellValueChanged=u=>N.current?.(u),s.onSelectionChanged=u=>L.current?.(u),s.onSortChanged=u=>z.current?.(u),s.onFilterChanged=u=>K.current?.(u),s.onHistoryChanged=u=>W.current?.(u),s.onBeforeCellCommit=u=>j.current?.(u);let I=(0,ge.createGrid)(l,{...s,menuAdapter:new b({getColumnMenuItems:u=>y.current?.(u)??u.items}),bodyMenuAdapter:new T({getBodyMenuItems:u=>{let $=C.current;return typeof $=="function"?$(u):u.items}})}),A={api:I,destroyed:!1};return r.current=A,m(n,I),m(e.apiRef,I),()=>{r.current===A&&(r.current=null),m(n,null),m(e.apiRef,null),qe(A)}},[]),(0,i.useLayoutEffect)(()=>{let l=r.current?.api??null;return m(n,l),m(e.apiRef,l),()=>{m(n,null),m(e.apiRef,null)}},[n,e.apiRef]),(0,i.useLayoutEffect)(()=>{let l=r.current?.api;l&&l.updateGridOptions({columnDefs:H(e.columnDefs)})},[e.columnDefs]),(0,i.useLayoutEffect)(()=>{let l=r.current?.api;l&&e.rowModelType!=="serverSide"&&l.setRowData(e.rowData??e.data??[])},[e.data,e.rowData,e.rowModelType]);let F=(0,i.useRef)(null);(0,i.useLayoutEffect)(()=>{let l=r.current;if(!(!l||F.current===l))return F.current=l,d.current?.(l.api),()=>{F.current=null}},[]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({groupDisplayType:e.groupDisplayType})},[e.groupDisplayType]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({groupSortMode:e.groupSortMode})},[e.groupSortMode]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({groupRowsSelectable:e.groupRowsSelectable})},[e.groupRowsSelectable]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({pivotColumnMoveMode:e.pivotColumnMoveMode})},[e.pivotColumnMoveMode]);let q=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!q.current){q.current=!0;return}e.pivotMode!=null&&r.current?.api.setPivotMode(e.pivotMode)},[e.pivotMode]);let we=JSON.stringify(e.pivotColumns??null),U=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!U.current){U.current=!0;return}e.pivotColumns!=null&&r.current?.api.setPivotColumns(e.pivotColumns)},[we]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({isRowSelectable:e.isRowSelectable})},[e.isRowSelectable]);let Se=JSON.stringify(e.rowSelection??null),J=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!J.current){J.current=!0;return}r.current?.api.updateGridOptions({rowSelection:e.rowSelection})},[Se]),(0,i.useLayoutEffect)(()=>{r.current?.api.setTreeDataKeyboardNavigationOptions({keyboardNavigationMode:e.treeData?.keyboardNavigationMode,enableKeyboardNavigationModeSwitch:e.treeData?.enableKeyboardNavigationModeSwitch??!1})},[e.treeData?.keyboardNavigationMode,e.treeData?.enableKeyboardNavigationModeSwitch]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({pinnedTopRowData:e.pinnedTopRowData,pinnedBottomRowData:e.pinnedBottomRowData,isRowPinned:e.isRowPinned,groupRowsSticky:e.groupRowsSticky})},[e.pinnedTopRowData,e.pinnedBottomRowData,e.isRowPinned,e.groupRowsSticky]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({rowHover:e.rowHover??!0,columnHover:e.columnHover??!1,zebraRows:e.zebraRows??!1,getRowClass:e.getRowClass,getRowStyle:e.getRowStyle,getRowPresentation:E(e.getRowPresentation),ariaLabel:e.ariaLabel,ariaLabelledBy:e.ariaLabelledBy,highlightActiveCell:e.highlightActiveCell??!1,cellSelection:e.cellSelection??!0,rangeSelection:e.rangeSelection??!0,columnSelection:e.columnSelection??!0,headerKeyboardNavigation:e.headerKeyboardNavigation??!0,showColumnButtonsOnHover:e.showColumnButtonsOnHover??!1,bodyContextMenu:e.bodyContextMenu!==!1,editTrigger:e.editTrigger??"doubleClick",readOnlyEdit:e.readOnlyEdit??!1,pinnedRowsEditable:e.pinnedRowsEditable??!1,rowPinningMenu:e.rowPinningMenu??!1,rowInsertionMenu:e.rowInsertionMenu,suppressKeyboardEdit:e.suppressKeyboardEdit??!1,suppressTypeToEdit:e.suppressTypeToEdit??!1,moveAfterEdit:e.moveAfterEdit??!0,commitOnBlur:e.commitOnBlur??!0,asyncTransactionWaitMs:e.asyncTransactionWaitMs??16})},[e.rowHover,e.columnHover,e.zebraRows,e.getRowClass,e.getRowStyle,e.getRowPresentation,e.ariaLabel,e.ariaLabelledBy,e.highlightActiveCell,e.cellSelection,e.rangeSelection,e.columnSelection,e.headerKeyboardNavigation,e.showColumnButtonsOnHover,e.bodyContextMenu,e.editTrigger,e.readOnlyEdit,e.pinnedRowsEditable,e.rowPinningMenu,e.rowInsertionMenu,e.suppressKeyboardEdit,e.suppressTypeToEdit,e.moveAfterEdit,e.commitOnBlur,e.asyncTransactionWaitMs]),(0,i.useLayoutEffect)(()=>{let l=r.current;!l||e.rowModelType!=="serverSide"||e.serverSideDataSource&&l.api.updateGridOptions({serverSideDataSource:e.serverSideDataSource})},[e.rowModelType,e.serverSideDataSource]),(0,i.useLayoutEffect)(()=>{let l=r.current;!l||e.rowModelType!=="serverSide"||e.serverSideAggregationSource&&l.api.updateGridOptions({serverSideAggregationSource:e.serverSideAggregationSource})},[e.rowModelType,e.serverSideAggregationSource]),(0,i.useLayoutEffect)(()=>{let l=r.current?.api;l&&l.dispatch({type:"overlayShow",overlayType:e.loading?"loading":"none"})},[e.loading]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({pagination:e.pagination})},[e.pagination]);let pe=JSON.stringify(e.paginationControls??null),_=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!_.current){_.current=!0;return}r.current?.api.updateGridOptions({paginationControls:e.paginationControls})},[pe]);let ve=JSON.stringify(e.quickFilter??null),Y=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!Y.current){Y.current=!0;return}r.current?.api.updateGridOptions({quickFilter:e.quickFilter})},[ve]);let Me=JSON.stringify(e.tooltip??null),Q=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!Q.current){Q.current=!0;return}r.current?.api.updateGridOptions({tooltip:e.tooltip})},[Me]);let Pe=JSON.stringify(e.columnPanel??null),X=(0,i.useRef)(!1);(0,i.useLayoutEffect)(()=>{if(!X.current){X.current=!0;return}r.current?.api.updateGridOptions({columnPanel:e.columnPanel})},[Pe]);let Ee=JSON.stringify(e.toolbar??null),Z=(0,i.useRef)(!1);return(0,i.useLayoutEffect)(()=>{if(!Z.current){Z.current=!0;return}r.current?.api.updateGridOptions({toolbar:e.toolbar})},[Ee]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({savedViews:e.savedViews})},[e.savedViews]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({sheets:e.sheets})},[e.sheets]),(0,i.useLayoutEffect)(()=>{r.current?.api.updateGridOptions({theme:e.theme,icons:{...e.theme?.getIcons(),...e.icons}})},[e.theme,e.icons]),(0,he.jsx)("div",{ref:a,className:e.className,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",...e.style}})});0&&(module.exports={Grid,...require("@agility-workbench/grid")});
package/dist/index.d.cts CHANGED
@@ -76,6 +76,11 @@ interface GridProps extends Omit<GridOptions, "bodyContextMenu" | "fullWidthCell
76
76
  columnDefs?: ReactColDef[] | ColDef[] | null;
77
77
  /** Expose API (AG Grid style) */
78
78
  apiRef?: React.Ref<IGridAPI | null>;
79
+ /**
80
+ * Called once per grid instance, in the mounting commit (synchronously, before paint), with the
81
+ * `columnDefs` and row data already applied — so colId- and rowId-addressed API calls made here
82
+ * resolve. Prop-driven option syncing still runs after it.
83
+ */
79
84
  onGridReady?: (api: IGridAPI) => void;
80
85
  loading?: boolean;
81
86
  /** Hook to customize column menu items */
package/dist/index.d.ts CHANGED
@@ -76,6 +76,11 @@ interface GridProps extends Omit<GridOptions, "bodyContextMenu" | "fullWidthCell
76
76
  columnDefs?: ReactColDef[] | ColDef[] | null;
77
77
  /** Expose API (AG Grid style) */
78
78
  apiRef?: React.Ref<IGridAPI | null>;
79
+ /**
80
+ * Called once per grid instance, in the mounting commit (synchronously, before paint), with the
81
+ * `columnDefs` and row data already applied — so colId- and rowId-addressed API calls made here
82
+ * resolve. Prop-driven option syncing still runs after it.
83
+ */
79
84
  onGridReady?: (api: IGridAPI) => void;
80
85
  loading?: boolean;
81
86
  /** Hook to customize column menu items */
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export*from"@agility-workbench/grid";import Fe,{useLayoutEffect as a,useRef as u}from"react";import{createGrid as Ie}from"@agility-workbench/grid";import y from"react";import{flushSync as ce}from"react-dom";import{createRoot as ue}from"react-dom/client";var E=new Set,T=!1;function de(){T=!1;let t=Array.from(E);E.clear();for(let e of t)e.unmount()}function se(t){E.add(t),!T&&(T=!0,queueMicrotask(de))}var d=class{root;constructor(e){this.root=ue(e)}render(e){this.root?.render(e)}renderSync(e){let o=this.root;o&&ce(()=>o.render(e))}destroy(){let e=this.root;e&&(this.root=null,se(e))}};import{isClassRenderer as fe,isClassSetFilterComponent as Re}from"@agility-workbench/grid";import{isClassTooltipComponent as ge}from"@agility-workbench/grid";import{isClassActionFrameComponent as ye}from"@agility-workbench/grid";import q from"react";var U=new WeakMap;function me(t){let e=t?.prototype;return typeof t=="function"&&!!e&&typeof e.init=="function"&&typeof e.getGui=="function"}function Ce(t){return class{el=document.createElement("div");root=null;handle=q.createRef();init(o){this.el.style.width="100%",this.el.style.height="100%",this.root=new d(this.el);let r=q.createElement(t,{...o,ref:this.handle});this.root.renderSync(r)}getGui(){return this.el}getValue(){return this.handle.current?.getValue()}isParsed(){return this.handle.current?.isParsed?.()??!1}focus(){this.handle.current?.focus?.()}isCancelBeforeStart(){return this.handle.current?.isCancelBeforeStart?.()??!1}destroy(){let o=this.root;this.root=null,o?.destroy()}}}function b(t){if(t==null)return;if(typeof t=="string"||me(t))return t;let e=U.get(t);if(e)return e;let o=Ce(t);return U.set(t,o),o}var J=new WeakMap,_=new WeakMap,Y=new WeakMap,Q=new WeakMap;function h(t){return(typeof t=="function"||typeof t=="object")&&t!==null}function he(t){let e=t.colDef.cellRendererParams;return e==null||typeof e!="object"?t:{...t,...e}}function we(t){return class{el=document.createElement("span");root=null;init(o){this.el.style.display="inline-flex",this.el.style.alignItems="center",this.el.style.width="100%",this.el.style.height="100%",this.el.style.overflow="hidden",this.root=new d(this.el),this.render(o)}getGui(){return this.el}refresh(o){return this.render(o),!0}destroy(){this.root?.destroy(),this.root=null}render(o){this.root?.render(y.createElement(t,he(o)))}}}function w(t){if(!t)return;if(typeof t=="function"&&fe(t)||!h(t))return t;let e=J.get(t);if(e)return e;let o=we(t);return J.set(t,o),o}function Se(t){let e=t.colDef?.tooltipComponentParams;return e==null||typeof e!="object"?t:{...t,...e}}function pe(t){return class{el=document.createElement("div");root=null;init(o){this.root=new d(this.el),this.render(o)}getGui(){return this.el}refresh(o){return this.render(o),!0}destroy(){this.root?.destroy(),this.root=null}render(o){this.root?.renderSync(y.createElement(t,Se(o)))}}}function S(t){if(!t)return;if(typeof t=="function"&&ge(t)||!h(t))return t;let e=_.get(t);if(e)return e;let o=pe(t);return _.set(t,o),o}function p(t){if(t)return e=>{let o=t(e);return!o||typeof o.tooltip!="object"||o.tooltip==null?o:{...o,tooltip:{...o.tooltip,component:S(o.tooltip.component)}}}}function X(t){return t==null||typeof t=="string"?t:S(t)}function Me(t){let e=t.colDef?.actionFrameComponentParams;return e==null||typeof e!="object"?t:{...t,...e}}function Pe(t){return class{el=document.createElement("div");root=null;init(o){this.root=new d(this.el),this.render(o)}getGui(){return this.el}refresh(o){return this.render(o),!0}destroy(){this.root?.destroy(),this.root=null}render(o){this.root?.render(y.createElement(t,Me(o)))}}}function Z(t){if(!t)return;if(typeof t=="function"&&ye(t)||!h(t))return t;let e=Y.get(t);if(e)return e;let o=Pe(t);return Y.set(t,o),o}function ve(t){return class{el=document.createElement("span");root=null;init(o){this.root=new d(this.el),this.render(o)}getGui(){return this.el}refresh(o){return this.render(o),!0}destroy(){this.root?.destroy(),this.root=null}render(o){this.root?.render(y.createElement(t,o))}}}function F(t){if(!t)return;if(typeof t=="function"&&Re(t)||!h(t))return t;let e=Q.get(t);if(e)return e;let o=ve(t);return Q.set(t,o),o}function $(t){if(t)return{...t,valueComponent:F(t.valueComponent),selectAllComponent:F(t.selectAllComponent),blanksComponent:F(t.blanksComponent)}}function Ee(t){return{...t,cellRenderer:w(t.cellRenderer),cellEditor:b(t.cellEditor),tooltipComponent:S(t.tooltipComponent),headerTooltip:X(t.headerTooltip),actionFrameComponent:Z(t.actionFrameComponent),filterParams:$(t.filterParams),children:t.children?I(t.children)??void 0:void 0}}function I(t){return t==null?t:t.map(e=>Ee(e))}function ee(t){if(t==null)return;let e={...t};return"cellRenderer"in t&&(e.cellRenderer=w(t.cellRenderer)),"cellEditor"in t&&(e.cellEditor=b(t.cellEditor)),"tooltipComponent"in t&&(e.tooltipComponent=S(t.tooltipComponent)),"headerTooltip"in t&&(e.headerTooltip=X(t.headerTooltip)),"actionFrameComponent"in t&&(e.actionFrameComponent=Z(t.actionFrameComponent)),"filterParams"in t&&(e.filterParams=$(t.filterParams)),e}function n(t,e,o){o!=null&&(t[e]=o)}function te(t){let e={};return n(e,"headerHeight",t.headerHeight),n(e,"leafHeaderHeight",t.leafHeaderHeight),n(e,"parentHeaderHeight",t.parentHeaderHeight),n(e,"rowHeight",t.rowHeight),n(e,"pinnedTopRowData",t.pinnedTopRowData),n(e,"pinnedBottomRowData",t.pinnedBottomRowData),n(e,"getRowId",t.getRowId),n(e,"rowIdKey",t.rowIdKey),n(e,"rowDataMode",t.rowDataMode),n(e,"asyncTransactionWaitMs",t.asyncTransactionWaitMs),n(e,"overscanRowCount",t.overscanRowCount),n(e,"minResizeWidth",t.minResizeWidth),n(e,"maxColumnWidth",t.maxColumnWidth),n(e,"autosizeColumnsOnDataChange",t.autosizeColumnsOnDataChange),n(e,"allowExportAsCSV",t.allowExportAsCSV),n(e,"allowExportAsExcel",t.allowExportAsExcel),n(e,"pagination",t.pagination),n(e,"paginationControls",t.paginationControls),n(e,"rowNumbers",t.rowNumbers),n(e,"rowHover",t.rowHover),n(e,"columnHover",t.columnHover),n(e,"zebraRows",t.zebraRows),n(e,"getRowClass",t.getRowClass),n(e,"getRowStyle",t.getRowStyle),n(e,"getRowPresentation",p(t.getRowPresentation)),n(e,"onCellClicked",t.onCellClicked),n(e,"onRowClicked",t.onRowClicked),n(e,"onCellValueChanged",t.onCellValueChanged),n(e,"onSelectionChanged",t.onSelectionChanged),n(e,"onSortChanged",t.onSortChanged),n(e,"onFilterChanged",t.onFilterChanged),n(e,"onHistoryChanged",t.onHistoryChanged),n(e,"ariaLabel",t.ariaLabel),n(e,"ariaLabelledBy",t.ariaLabelledBy),n(e,"highlightActiveCell",t.highlightActiveCell),n(e,"rowSelection",t.rowSelection),n(e,"cellSelection",t.cellSelection),n(e,"rangeSelection",t.rangeSelection),n(e,"columnSelection",t.columnSelection),n(e,"headerKeyboardNavigation",t.headerKeyboardNavigation),n(e,"showColumnButtonsOnHover",t.showColumnButtonsOnHover),n(e,"selectAllRowsOnHeaderClick",t.selectAllRowsOnHeaderClick),n(e,"selectAllScope",t.selectAllScope),n(e,"selectionPersistence",t.selectionPersistence),n(e,"clearSelectionOnBodyClick",t.clearSelectionOnBodyClick),n(e,"resetPageOn",t.resetPageOn),n(e,"pageSize",t.pageSize),n(e,"pageSizes",t.pageSizes),n(e,"serverSideBlockSize",t.serverSideBlockSize),n(e,"rowModelType",t.rowModelType),n(e,"getGroupChildCount",t.getGroupChildCount),n(e,"paginationUnknownTotalTooltip",t.paginationUnknownTotalTooltip),n(e,"undoLimit",t.undoLimit),n(e,"editTrigger",t.editTrigger),n(e,"readOnlyEdit",t.readOnlyEdit),n(e,"initialSort",t.initialSort),n(e,"showSortPriority",t.showSortPriority),n(e,"pinnedRowsEditable",t.pinnedRowsEditable),n(e,"rowPinningMenu",t.rowPinningMenu),n(e,"rowInsertionMenu",t.rowInsertionMenu),n(e,"suppressKeyboardEdit",t.suppressKeyboardEdit),n(e,"suppressTypeToEdit",t.suppressTypeToEdit),n(e,"moveAfterEdit",t.moveAfterEdit),n(e,"commitOnBlur",t.commitOnBlur),n(e,"reevaluateOnEdit",t.reevaluateOnEdit),n(e,"groupDisplayType",t.groupDisplayType),n(e,"groupColumnDef",t.groupColumnDef),n(e,"groupDefaultExpanded",t.groupDefaultExpanded),n(e,"groupSortMode",t.groupSortMode),n(e,"treeData",t.treeData),n(e,"groupRowsSelectable",t.groupRowsSelectable),n(e,"isRowSelectable",t.isRowSelectable),n(e,"isRowPinned",t.isRowPinned),n(e,"groupRowsSticky",t.groupRowsSticky),n(e,"isFullWidthRow",t.isFullWidthRow),n(e,"tooltip",t.tooltip),n(e,"quickFilter",t.quickFilter),n(e,"columnPanel",t.columnPanel),n(e,"toolbar",t.toolbar),n(e,"savedViews",t.savedViews),n(e,"loadingMessage",t.loadingMessage),n(e,"noRowsMessage",t.noRowsMessage),n(e,"filterDebounceMs",t.filterDebounceMs),n(e,"cellFlashDuration",t.cellFlashDuration),n(e,"cellFadeDuration",t.cellFadeDuration),n(e,"icons",t.icons),n(e,"theme",t.theme),t.fullWidthCellRenderer!=null&&(e.fullWidthCellRenderer=w(t.fullWidthCellRenderer)),t.defaultColDef!=null&&(e.defaultColDef=ee(t.defaultColDef)),t.bodyContextMenu===!1&&(e.bodyContextMenu=!1),t.rowModelType==="serverSide"&&(n(e,"serverSideDataSource",t.serverSideDataSource),n(e,"serverSideAggregationSource",t.serverSideAggregationSource)),n(e,"suppressStyleInjection",t.suppressStyleInjection),n(e,"styleNonce",t.styleNonce),e}import Te from"react";var M=class{constructor(e){this.opts=e}resolveMenuItems(e,o){let r=[],i=o,s=this.opts.getBodyMenuItems?this.opts.getBodyMenuItems({ctx:e,items:i}):i;return{items:this.normalizeItems(s,r),cleanup:()=>{for(let f of r)f()}}}normalizeItems(e,o){return e.map(r=>{if(r.isSeparator)return{isSeparator:!0};let i=this.normalizeSlot(r.left,o),s=this.normalizeSlot(r.right,o);return{...r,left:i,right:s,subMenu:r.subMenu?this.normalizeItems(r.subMenu,o):void 0}})}normalizeSlot(e,o){if(e){if(typeof e=="string"||e instanceof HTMLElement)return e;if(Te.isValidElement(e)){let{el:r,unmount:i}=this.mountReact(e);return o.push(i),r}}}mountReact(e){let o=document.createElement("span");o.style.display="inline-flex",o.style.alignItems="center";let r=new d(o);return r.render(e),{el:o,unmount:()=>r.destroy()}}};import be from"react";var P=class{constructor(e){this.opts=e}resolveMenuItems(e,o){let r=[],i=o,s=this.opts.getColumnMenuItems?this.opts.getColumnMenuItems({ctx:e,items:i}):i;return{items:this.normalizeItems(s,r),cleanup:()=>{for(let f of r)f()}}}normalizeItems(e,o){return e.map(r=>{if(r.isSeparator)return{isSeparator:!0};let i=this.normalizeSlot(r.left,o),s=this.normalizeSlot(r.right,o);return{...r,left:i,right:s,subMenu:r.subMenu?this.normalizeItems(r.subMenu,o):void 0}})}normalizeSlot(e,o){if(e){if(typeof e=="string"||e instanceof HTMLElement)return e;if(be.isValidElement(e)){let{el:r,unmount:i}=this.mountReact(e);return o.push(i),r}}}mountReact(e){let o=document.createElement("span");o.style.display="inline-flex",o.style.alignItems="center";let r=new d(o);return r.render(e),{el:o,unmount:()=>r.destroy()}}};import{jsx as Ge}from"react/jsx-runtime";function C(t,e){if(t){if(typeof t=="function"){t(e);return}t.current=e}}function Ae(t){if(!t.destroyed){t.destroyed=!0;try{t.api.destroy()}catch{}}}var xe=Fe.forwardRef(function(e,o){let r=u(null),i=u(null),s=u(e.onGridReady),R=u(e.getColumnMenuItems),f=u(e.bodyContextMenu),A=u(e.onCellClicked),x=u(e.onRowClicked),G=u(e.onCellValueChanged),O=u(e.onSelectionChanged),D=u(e.onSortChanged),k=u(e.onFilterChanged),H=u(e.onHistoryChanged),B=u(e.onBeforeCellCommit);s.current=e.onGridReady,R.current=e.getColumnMenuItems,f.current=e.bodyContextMenu,A.current=e.onCellClicked,x.current=e.onRowClicked,G.current=e.onCellValueChanged,O.current=e.onSelectionChanged,D.current=e.onSortChanged,k.current=e.onFilterChanged,H.current=e.onHistoryChanged,B.current=e.onBeforeCellCommit,a(()=>{let c=r.current;if(!c)return;let m=te(e);m.onCellClicked=l=>A.current?.(l),m.onRowClicked=l=>x.current?.(l),m.onCellValueChanged=l=>G.current?.(l),m.onSelectionChanged=l=>O.current?.(l),m.onSortChanged=l=>D.current?.(l),m.onFilterChanged=l=>k.current?.(l),m.onHistoryChanged=l=>H.current?.(l),m.onBeforeCellCommit=l=>B.current?.(l);let g=Ie(c,{...m,menuAdapter:new P({getColumnMenuItems:l=>R.current?.(l)??l.items}),bodyMenuAdapter:new M({getBodyMenuItems:l=>{let j=f.current;return typeof j=="function"?j(l):l.items}})}),v={api:g,destroyed:!1};return i.current=v,C(o,g),C(e.apiRef,g),s.current?.(g),()=>{i.current===v&&(i.current=null),C(o,null),C(e.apiRef,null),Ae(v)}},[]),a(()=>{let c=i.current?.api??null;return C(o,c),C(e.apiRef,c),()=>{C(o,null),C(e.apiRef,null)}},[o,e.apiRef]),a(()=>{let c=i.current?.api;c&&c.updateGridOptions({columnDefs:I(e.columnDefs)})},[e.columnDefs]),a(()=>{let c=i.current?.api;c&&e.rowModelType!=="serverSide"&&c.setRowData(e.rowData??e.data??[])},[e.data,e.rowData,e.rowModelType]),a(()=>{i.current?.api.updateGridOptions({groupDisplayType:e.groupDisplayType})},[e.groupDisplayType]),a(()=>{i.current?.api.updateGridOptions({groupSortMode:e.groupSortMode})},[e.groupSortMode]),a(()=>{i.current?.api.updateGridOptions({groupRowsSelectable:e.groupRowsSelectable})},[e.groupRowsSelectable]),a(()=>{i.current?.api.updateGridOptions({isRowSelectable:e.isRowSelectable})},[e.isRowSelectable]);let ne=JSON.stringify(e.rowSelection??null),V=u(!1);a(()=>{if(!V.current){V.current=!0;return}i.current?.api.updateGridOptions({rowSelection:e.rowSelection})},[ne]),a(()=>{i.current?.api.setTreeDataKeyboardNavigationOptions({keyboardNavigationMode:e.treeData?.keyboardNavigationMode,enableKeyboardNavigationModeSwitch:e.treeData?.enableKeyboardNavigationModeSwitch??!1})},[e.treeData?.keyboardNavigationMode,e.treeData?.enableKeyboardNavigationModeSwitch]),a(()=>{i.current?.api.updateGridOptions({pinnedTopRowData:e.pinnedTopRowData,pinnedBottomRowData:e.pinnedBottomRowData,isRowPinned:e.isRowPinned,groupRowsSticky:e.groupRowsSticky})},[e.pinnedTopRowData,e.pinnedBottomRowData,e.isRowPinned,e.groupRowsSticky]),a(()=>{i.current?.api.updateGridOptions({rowHover:e.rowHover??!0,columnHover:e.columnHover??!1,zebraRows:e.zebraRows??!1,getRowClass:e.getRowClass,getRowStyle:e.getRowStyle,getRowPresentation:p(e.getRowPresentation),ariaLabel:e.ariaLabel,ariaLabelledBy:e.ariaLabelledBy,highlightActiveCell:e.highlightActiveCell??!1,cellSelection:e.cellSelection??!0,rangeSelection:e.rangeSelection??!0,columnSelection:e.columnSelection??!0,headerKeyboardNavigation:e.headerKeyboardNavigation??!0,showColumnButtonsOnHover:e.showColumnButtonsOnHover??!1,bodyContextMenu:e.bodyContextMenu!==!1,editTrigger:e.editTrigger??"doubleClick",readOnlyEdit:e.readOnlyEdit??!1,pinnedRowsEditable:e.pinnedRowsEditable??!1,rowPinningMenu:e.rowPinningMenu??!1,rowInsertionMenu:e.rowInsertionMenu,suppressKeyboardEdit:e.suppressKeyboardEdit??!1,suppressTypeToEdit:e.suppressTypeToEdit??!1,moveAfterEdit:e.moveAfterEdit??!0,commitOnBlur:e.commitOnBlur??!0,asyncTransactionWaitMs:e.asyncTransactionWaitMs??16})},[e.rowHover,e.columnHover,e.zebraRows,e.getRowClass,e.getRowStyle,e.getRowPresentation,e.ariaLabel,e.ariaLabelledBy,e.highlightActiveCell,e.cellSelection,e.rangeSelection,e.columnSelection,e.headerKeyboardNavigation,e.showColumnButtonsOnHover,e.bodyContextMenu,e.editTrigger,e.readOnlyEdit,e.pinnedRowsEditable,e.rowPinningMenu,e.rowInsertionMenu,e.suppressKeyboardEdit,e.suppressTypeToEdit,e.moveAfterEdit,e.commitOnBlur,e.asyncTransactionWaitMs]),a(()=>{let c=i.current;!c||e.rowModelType!=="serverSide"||e.serverSideDataSource&&c.api.updateGridOptions({serverSideDataSource:e.serverSideDataSource})},[e.rowModelType,e.serverSideDataSource]),a(()=>{let c=i.current;!c||e.rowModelType!=="serverSide"||e.serverSideAggregationSource&&c.api.updateGridOptions({serverSideAggregationSource:e.serverSideAggregationSource})},[e.rowModelType,e.serverSideAggregationSource]),a(()=>{let c=i.current?.api;c&&c.dispatch({type:"overlayShow",overlayType:e.loading?"loading":"none"})},[e.loading]),a(()=>{i.current?.api.updateGridOptions({pagination:e.pagination})},[e.pagination]);let oe=JSON.stringify(e.paginationControls??null),L=u(!1);a(()=>{if(!L.current){L.current=!0;return}i.current?.api.updateGridOptions({paginationControls:e.paginationControls})},[oe]);let ie=JSON.stringify(e.quickFilter??null),N=u(!1);a(()=>{if(!N.current){N.current=!0;return}i.current?.api.updateGridOptions({quickFilter:e.quickFilter})},[ie]);let re=JSON.stringify(e.tooltip??null),z=u(!1);a(()=>{if(!z.current){z.current=!0;return}i.current?.api.updateGridOptions({tooltip:e.tooltip})},[re]);let ae=JSON.stringify(e.columnPanel??null),K=u(!1);a(()=>{if(!K.current){K.current=!0;return}i.current?.api.updateGridOptions({columnPanel:e.columnPanel})},[ae]);let le=JSON.stringify(e.toolbar??null),W=u(!1);return a(()=>{if(!W.current){W.current=!0;return}i.current?.api.updateGridOptions({toolbar:e.toolbar})},[le]),a(()=>{i.current?.api.updateGridOptions({savedViews:e.savedViews})},[e.savedViews]),a(()=>{i.current?.api.updateGridOptions({theme:e.theme,icons:{...e.theme?.getIcons(),...e.icons}})},[e.theme,e.icons]),Ge("div",{ref:r,className:e.className,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",...e.style}})});export{xe as Grid};
1
+ export*from"@agility-workbench/grid";import Ge,{useLayoutEffect as a,useRef as u}from"react";import{createGrid as Oe}from"@agility-workbench/grid";import g from"react";import{flushSync as me}from"react-dom";import{createRoot as Ce}from"react-dom/client";var T=new Set,b=!1;function fe(){b=!1;let t=Array.from(T);T.clear();for(let e of t)e.unmount()}function Re(t){T.add(t),!b&&(b=!0,queueMicrotask(fe))}var d=class{root;constructor(e){this.root=Ce(e)}render(e){this.root?.render(e)}renderSync(e){let o=this.root;o&&me(()=>o.render(e))}destroy(){let e=this.root;e&&(this.root=null,Re(e))}};import{isClassRenderer as he,isClassSetFilterComponent as we}from"@agility-workbench/grid";import{isClassTooltipComponent as Se}from"@agility-workbench/grid";import{isClassActionFrameComponent as pe}from"@agility-workbench/grid";import _ from"react";var Y=new WeakMap;function ge(t){let e=t?.prototype;return typeof t=="function"&&!!e&&typeof e.init=="function"&&typeof e.getGui=="function"}function ye(t){return class{el=document.createElement("div");root=null;handle=_.createRef();init(o){this.el.style.width="100%",this.el.style.height="100%",this.root=new d(this.el);let r=_.createElement(t,{...o,ref:this.handle});this.root.renderSync(r)}getGui(){return this.el}getValue(){return this.handle.current?.getValue()}isParsed(){return this.handle.current?.isParsed?.()??!1}focus(){this.handle.current?.focus?.()}isCancelBeforeStart(){return this.handle.current?.isCancelBeforeStart?.()??!1}destroy(){let o=this.root;this.root=null,o?.destroy()}}}function F(t){if(t==null)return;if(typeof t=="string"||ge(t))return t;let e=Y.get(t);if(e)return e;let o=ye(t);return Y.set(t,o),o}var Q=new WeakMap,X=new WeakMap,Z=new WeakMap,$=new WeakMap;function y(t){return(typeof t=="function"||typeof t=="object")&&t!==null}function ve(t){let e=t.colDef.cellRendererParams;return e==null||typeof e!="object"?t:{...t,...e}}function Me(t){return class{el=document.createElement("span");root=null;init(o){this.el.style.display="inline-flex",this.el.style.alignItems="center",this.el.style.width="100%",this.el.style.height="100%",this.el.style.overflow="hidden",this.root=new d(this.el),this.render(o)}getGui(){return this.el}refresh(o){return this.render(o),!0}destroy(){this.root?.destroy(),this.root=null}render(o){this.root?.render(g.createElement(t,ve(o)))}}}function h(t){if(!t)return;if(typeof t=="function"&&he(t)||!y(t))return t;let e=Q.get(t);if(e)return e;let o=Me(t);return Q.set(t,o),o}function Pe(t){let e=t.colDef?.tooltipComponentParams;return e==null||typeof e!="object"?t:{...t,...e}}function Ee(t){return class{el=document.createElement("div");root=null;init(o){this.root=new d(this.el),this.render(o)}getGui(){return this.el}refresh(o){return this.render(o),!0}destroy(){this.root?.destroy(),this.root=null}render(o){this.root?.renderSync(g.createElement(t,Pe(o)))}}}function w(t){if(!t)return;if(typeof t=="function"&&Se(t)||!y(t))return t;let e=X.get(t);if(e)return e;let o=Ee(t);return X.set(t,o),o}function S(t){if(t)return e=>{let o=t(e);return!o||typeof o.tooltip!="object"||o.tooltip==null?o:{...o,tooltip:{...o.tooltip,component:w(o.tooltip.component)}}}}function ee(t){return t==null||typeof t=="string"?t:w(t)}function Te(t){let e=t.colDef?.actionFrameComponentParams;return e==null||typeof e!="object"?t:{...t,...e}}function be(t){return class{el=document.createElement("div");root=null;init(o){this.root=new d(this.el),this.render(o)}getGui(){return this.el}refresh(o){return this.render(o),!0}destroy(){this.root?.destroy(),this.root=null}render(o){this.root?.render(g.createElement(t,Te(o)))}}}function te(t){if(!t)return;if(typeof t=="function"&&pe(t)||!y(t))return t;let e=Z.get(t);if(e)return e;let o=be(t);return Z.set(t,o),o}function Fe(t){return class{el=document.createElement("span");root=null;init(o){this.root=new d(this.el),this.render(o)}getGui(){return this.el}refresh(o){return this.render(o),!0}destroy(){this.root?.destroy(),this.root=null}render(o){this.root?.render(g.createElement(t,o))}}}function I(t){if(!t)return;if(typeof t=="function"&&we(t)||!y(t))return t;let e=$.get(t);if(e)return e;let o=Fe(t);return $.set(t,o),o}function ne(t){if(t)return{...t,valueComponent:I(t.valueComponent),selectAllComponent:I(t.selectAllComponent),blanksComponent:I(t.blanksComponent)}}function Ie(t){return{...t,cellRenderer:h(t.cellRenderer),cellEditor:F(t.cellEditor),tooltipComponent:w(t.tooltipComponent),headerTooltip:ee(t.headerTooltip),actionFrameComponent:te(t.actionFrameComponent),filterParams:ne(t.filterParams),children:t.children?A(t.children)??void 0:void 0}}function A(t){return t==null?t:t.map(e=>Ie(e))}function oe(t){if(t==null)return;let e={...t};return"cellRenderer"in t&&(e.cellRenderer=h(t.cellRenderer)),"cellEditor"in t&&(e.cellEditor=F(t.cellEditor)),"tooltipComponent"in t&&(e.tooltipComponent=w(t.tooltipComponent)),"headerTooltip"in t&&(e.headerTooltip=ee(t.headerTooltip)),"actionFrameComponent"in t&&(e.actionFrameComponent=te(t.actionFrameComponent)),"filterParams"in t&&(e.filterParams=ne(t.filterParams)),e}function n(t,e,o){o!=null&&(t[e]=o)}function ie(t){let e={};return n(e,"headerHeight",t.headerHeight),n(e,"leafHeaderHeight",t.leafHeaderHeight),n(e,"parentHeaderHeight",t.parentHeaderHeight),n(e,"rowHeight",t.rowHeight),n(e,"pinnedTopRowData",t.pinnedTopRowData),n(e,"pinnedBottomRowData",t.pinnedBottomRowData),n(e,"getRowId",t.getRowId),n(e,"rowIdKey",t.rowIdKey),n(e,"rowDataMode",t.rowDataMode),n(e,"asyncTransactionWaitMs",t.asyncTransactionWaitMs),n(e,"overscanRowCount",t.overscanRowCount),n(e,"minResizeWidth",t.minResizeWidth),n(e,"maxColumnWidth",t.maxColumnWidth),n(e,"pivotMode",t.pivotMode),n(e,"pivotColumns",t.pivotColumns),n(e,"pivotResultColumnDef",t.pivotResultColumnDef),n(e,"maxPivotColumns",t.maxPivotColumns),n(e,"pivotColumnMoveMode",t.pivotColumnMoveMode),n(e,"autosizeColumnsOnDataChange",t.autosizeColumnsOnDataChange),n(e,"allowExportAsCSV",t.allowExportAsCSV),n(e,"allowExportAsExcel",t.allowExportAsExcel),n(e,"pagination",t.pagination),n(e,"paginationControls",t.paginationControls),n(e,"rowNumbers",t.rowNumbers),n(e,"rowHover",t.rowHover),n(e,"columnHover",t.columnHover),n(e,"zebraRows",t.zebraRows),n(e,"getRowClass",t.getRowClass),n(e,"getRowStyle",t.getRowStyle),n(e,"getRowPresentation",S(t.getRowPresentation)),n(e,"onCellClicked",t.onCellClicked),n(e,"onRowClicked",t.onRowClicked),n(e,"onCellValueChanged",t.onCellValueChanged),n(e,"onSelectionChanged",t.onSelectionChanged),n(e,"onSortChanged",t.onSortChanged),n(e,"onFilterChanged",t.onFilterChanged),n(e,"onHistoryChanged",t.onHistoryChanged),n(e,"ariaLabel",t.ariaLabel),n(e,"ariaLabelledBy",t.ariaLabelledBy),n(e,"highlightActiveCell",t.highlightActiveCell),n(e,"rowSelection",t.rowSelection),n(e,"cellSelection",t.cellSelection),n(e,"rangeSelection",t.rangeSelection),n(e,"columnSelection",t.columnSelection),n(e,"headerKeyboardNavigation",t.headerKeyboardNavigation),n(e,"showColumnButtonsOnHover",t.showColumnButtonsOnHover),n(e,"selectAllRowsOnHeaderClick",t.selectAllRowsOnHeaderClick),n(e,"selectAllScope",t.selectAllScope),n(e,"selectionPersistence",t.selectionPersistence),n(e,"clearSelectionOnBodyClick",t.clearSelectionOnBodyClick),n(e,"resetPageOn",t.resetPageOn),n(e,"pageSize",t.pageSize),n(e,"pageSizes",t.pageSizes),n(e,"serverSideBlockSize",t.serverSideBlockSize),n(e,"rowModelType",t.rowModelType),n(e,"getGroupChildCount",t.getGroupChildCount),n(e,"paginationUnknownTotalTooltip",t.paginationUnknownTotalTooltip),n(e,"undoLimit",t.undoLimit),n(e,"editTrigger",t.editTrigger),n(e,"readOnlyEdit",t.readOnlyEdit),n(e,"initialSort",t.initialSort),n(e,"showSortPriority",t.showSortPriority),n(e,"pinnedRowsEditable",t.pinnedRowsEditable),n(e,"rowPinningMenu",t.rowPinningMenu),n(e,"rowInsertionMenu",t.rowInsertionMenu),n(e,"suppressKeyboardEdit",t.suppressKeyboardEdit),n(e,"suppressTypeToEdit",t.suppressTypeToEdit),n(e,"moveAfterEdit",t.moveAfterEdit),n(e,"commitOnBlur",t.commitOnBlur),n(e,"reevaluateOnEdit",t.reevaluateOnEdit),n(e,"groupDisplayType",t.groupDisplayType),n(e,"groupColumnDef",t.groupColumnDef),n(e,"groupDefaultExpanded",t.groupDefaultExpanded),n(e,"groupSortMode",t.groupSortMode),n(e,"treeData",t.treeData),n(e,"groupRowsSelectable",t.groupRowsSelectable),n(e,"isRowSelectable",t.isRowSelectable),n(e,"isRowPinned",t.isRowPinned),n(e,"groupRowsSticky",t.groupRowsSticky),n(e,"isFullWidthRow",t.isFullWidthRow),n(e,"tooltip",t.tooltip),n(e,"quickFilter",t.quickFilter),n(e,"columnPanel",t.columnPanel),n(e,"toolbar",t.toolbar),n(e,"savedViews",t.savedViews),n(e,"sheets",t.sheets),n(e,"loadingMessage",t.loadingMessage),n(e,"noRowsMessage",t.noRowsMessage),n(e,"pivotNoValuesMessage",t.pivotNoValuesMessage),n(e,"pivotEmptyMessage",t.pivotEmptyMessage),n(e,"filterDebounceMs",t.filterDebounceMs),n(e,"cellFlashDuration",t.cellFlashDuration),n(e,"cellFadeDuration",t.cellFadeDuration),n(e,"icons",t.icons),n(e,"theme",t.theme),t.fullWidthCellRenderer!=null&&(e.fullWidthCellRenderer=h(t.fullWidthCellRenderer)),t.defaultColDef!=null&&(e.defaultColDef=oe(t.defaultColDef)),t.bodyContextMenu===!1&&(e.bodyContextMenu=!1),t.rowModelType==="serverSide"&&(n(e,"serverSideDataSource",t.serverSideDataSource),n(e,"serverSideAggregationSource",t.serverSideAggregationSource)),n(e,"suppressStyleInjection",t.suppressStyleInjection),n(e,"styleNonce",t.styleNonce),e}import Ae from"react";var p=class{constructor(e){this.opts=e}resolveMenuItems(e,o){let r=[],i=o,s=this.opts.getBodyMenuItems?this.opts.getBodyMenuItems({ctx:e,items:i}):i;return{items:this.normalizeItems(s,r),cleanup:()=>{for(let f of r)f()}}}normalizeItems(e,o){return e.map(r=>{if(r.isSeparator)return{isSeparator:!0};let i=this.normalizeSlot(r.left,o),s=this.normalizeSlot(r.right,o);return{...r,left:i,right:s,subMenu:r.subMenu?this.normalizeItems(r.subMenu,o):void 0}})}normalizeSlot(e,o){if(e){if(typeof e=="string"||e instanceof HTMLElement)return e;if(Ae.isValidElement(e)){let{el:r,unmount:i}=this.mountReact(e);return o.push(i),r}}}mountReact(e){let o=document.createElement("span");o.style.display="inline-flex",o.style.alignItems="center";let r=new d(o);return r.render(e),{el:o,unmount:()=>r.destroy()}}};import xe from"react";var v=class{constructor(e){this.opts=e}resolveMenuItems(e,o){let r=[],i=o,s=this.opts.getColumnMenuItems?this.opts.getColumnMenuItems({ctx:e,items:i}):i;return{items:this.normalizeItems(s,r),cleanup:()=>{for(let f of r)f()}}}normalizeItems(e,o){return e.map(r=>{if(r.isSeparator)return{isSeparator:!0};let i=this.normalizeSlot(r.left,o),s=this.normalizeSlot(r.right,o);return{...r,left:i,right:s,subMenu:r.subMenu?this.normalizeItems(r.subMenu,o):void 0}})}normalizeSlot(e,o){if(e){if(typeof e=="string"||e instanceof HTMLElement)return e;if(xe.isValidElement(e)){let{el:r,unmount:i}=this.mountReact(e);return o.push(i),r}}}mountReact(e){let o=document.createElement("span");o.style.display="inline-flex",o.style.alignItems="center";let r=new d(o);return r.render(e),{el:o,unmount:()=>r.destroy()}}};import{jsx as He}from"react/jsx-runtime";function C(t,e){if(t){if(typeof t=="function"){t(e);return}t.current=e}}function De(t){if(!t.destroyed){t.destroyed=!0;try{t.api.destroy()}catch{}}}var ke=Ge.forwardRef(function(e,o){let r=u(null),i=u(null),s=u(e.onGridReady),R=u(e.getColumnMenuItems),f=u(e.bodyContextMenu),x=u(e.onCellClicked),G=u(e.onRowClicked),O=u(e.onCellValueChanged),D=u(e.onSelectionChanged),k=u(e.onSortChanged),H=u(e.onFilterChanged),B=u(e.onHistoryChanged),V=u(e.onBeforeCellCommit);s.current=e.onGridReady,R.current=e.getColumnMenuItems,f.current=e.bodyContextMenu,x.current=e.onCellClicked,G.current=e.onRowClicked,O.current=e.onCellValueChanged,D.current=e.onSelectionChanged,k.current=e.onSortChanged,H.current=e.onFilterChanged,B.current=e.onHistoryChanged,V.current=e.onBeforeCellCommit,a(()=>{let l=r.current;if(!l)return;let m=ie(e);m.onCellClicked=c=>x.current?.(c),m.onRowClicked=c=>G.current?.(c),m.onCellValueChanged=c=>O.current?.(c),m.onSelectionChanged=c=>D.current?.(c),m.onSortChanged=c=>k.current?.(c),m.onFilterChanged=c=>H.current?.(c),m.onHistoryChanged=c=>B.current?.(c),m.onBeforeCellCommit=c=>V.current?.(c);let P=Oe(l,{...m,menuAdapter:new v({getColumnMenuItems:c=>R.current?.(c)??c.items}),bodyMenuAdapter:new p({getBodyMenuItems:c=>{let J=f.current;return typeof J=="function"?J(c):c.items}})}),E={api:P,destroyed:!1};return i.current=E,C(o,P),C(e.apiRef,P),()=>{i.current===E&&(i.current=null),C(o,null),C(e.apiRef,null),De(E)}},[]),a(()=>{let l=i.current?.api??null;return C(o,l),C(e.apiRef,l),()=>{C(o,null),C(e.apiRef,null)}},[o,e.apiRef]),a(()=>{let l=i.current?.api;l&&l.updateGridOptions({columnDefs:A(e.columnDefs)})},[e.columnDefs]),a(()=>{let l=i.current?.api;l&&e.rowModelType!=="serverSide"&&l.setRowData(e.rowData??e.data??[])},[e.data,e.rowData,e.rowModelType]);let M=u(null);a(()=>{let l=i.current;if(!(!l||M.current===l))return M.current=l,s.current?.(l.api),()=>{M.current=null}},[]),a(()=>{i.current?.api.updateGridOptions({groupDisplayType:e.groupDisplayType})},[e.groupDisplayType]),a(()=>{i.current?.api.updateGridOptions({groupSortMode:e.groupSortMode})},[e.groupSortMode]),a(()=>{i.current?.api.updateGridOptions({groupRowsSelectable:e.groupRowsSelectable})},[e.groupRowsSelectable]),a(()=>{i.current?.api.updateGridOptions({pivotColumnMoveMode:e.pivotColumnMoveMode})},[e.pivotColumnMoveMode]);let N=u(!1);a(()=>{if(!N.current){N.current=!0;return}e.pivotMode!=null&&i.current?.api.setPivotMode(e.pivotMode)},[e.pivotMode]);let re=JSON.stringify(e.pivotColumns??null),L=u(!1);a(()=>{if(!L.current){L.current=!0;return}e.pivotColumns!=null&&i.current?.api.setPivotColumns(e.pivotColumns)},[re]),a(()=>{i.current?.api.updateGridOptions({isRowSelectable:e.isRowSelectable})},[e.isRowSelectable]);let ae=JSON.stringify(e.rowSelection??null),z=u(!1);a(()=>{if(!z.current){z.current=!0;return}i.current?.api.updateGridOptions({rowSelection:e.rowSelection})},[ae]),a(()=>{i.current?.api.setTreeDataKeyboardNavigationOptions({keyboardNavigationMode:e.treeData?.keyboardNavigationMode,enableKeyboardNavigationModeSwitch:e.treeData?.enableKeyboardNavigationModeSwitch??!1})},[e.treeData?.keyboardNavigationMode,e.treeData?.enableKeyboardNavigationModeSwitch]),a(()=>{i.current?.api.updateGridOptions({pinnedTopRowData:e.pinnedTopRowData,pinnedBottomRowData:e.pinnedBottomRowData,isRowPinned:e.isRowPinned,groupRowsSticky:e.groupRowsSticky})},[e.pinnedTopRowData,e.pinnedBottomRowData,e.isRowPinned,e.groupRowsSticky]),a(()=>{i.current?.api.updateGridOptions({rowHover:e.rowHover??!0,columnHover:e.columnHover??!1,zebraRows:e.zebraRows??!1,getRowClass:e.getRowClass,getRowStyle:e.getRowStyle,getRowPresentation:S(e.getRowPresentation),ariaLabel:e.ariaLabel,ariaLabelledBy:e.ariaLabelledBy,highlightActiveCell:e.highlightActiveCell??!1,cellSelection:e.cellSelection??!0,rangeSelection:e.rangeSelection??!0,columnSelection:e.columnSelection??!0,headerKeyboardNavigation:e.headerKeyboardNavigation??!0,showColumnButtonsOnHover:e.showColumnButtonsOnHover??!1,bodyContextMenu:e.bodyContextMenu!==!1,editTrigger:e.editTrigger??"doubleClick",readOnlyEdit:e.readOnlyEdit??!1,pinnedRowsEditable:e.pinnedRowsEditable??!1,rowPinningMenu:e.rowPinningMenu??!1,rowInsertionMenu:e.rowInsertionMenu,suppressKeyboardEdit:e.suppressKeyboardEdit??!1,suppressTypeToEdit:e.suppressTypeToEdit??!1,moveAfterEdit:e.moveAfterEdit??!0,commitOnBlur:e.commitOnBlur??!0,asyncTransactionWaitMs:e.asyncTransactionWaitMs??16})},[e.rowHover,e.columnHover,e.zebraRows,e.getRowClass,e.getRowStyle,e.getRowPresentation,e.ariaLabel,e.ariaLabelledBy,e.highlightActiveCell,e.cellSelection,e.rangeSelection,e.columnSelection,e.headerKeyboardNavigation,e.showColumnButtonsOnHover,e.bodyContextMenu,e.editTrigger,e.readOnlyEdit,e.pinnedRowsEditable,e.rowPinningMenu,e.rowInsertionMenu,e.suppressKeyboardEdit,e.suppressTypeToEdit,e.moveAfterEdit,e.commitOnBlur,e.asyncTransactionWaitMs]),a(()=>{let l=i.current;!l||e.rowModelType!=="serverSide"||e.serverSideDataSource&&l.api.updateGridOptions({serverSideDataSource:e.serverSideDataSource})},[e.rowModelType,e.serverSideDataSource]),a(()=>{let l=i.current;!l||e.rowModelType!=="serverSide"||e.serverSideAggregationSource&&l.api.updateGridOptions({serverSideAggregationSource:e.serverSideAggregationSource})},[e.rowModelType,e.serverSideAggregationSource]),a(()=>{let l=i.current?.api;l&&l.dispatch({type:"overlayShow",overlayType:e.loading?"loading":"none"})},[e.loading]),a(()=>{i.current?.api.updateGridOptions({pagination:e.pagination})},[e.pagination]);let le=JSON.stringify(e.paginationControls??null),K=u(!1);a(()=>{if(!K.current){K.current=!0;return}i.current?.api.updateGridOptions({paginationControls:e.paginationControls})},[le]);let ue=JSON.stringify(e.quickFilter??null),W=u(!1);a(()=>{if(!W.current){W.current=!0;return}i.current?.api.updateGridOptions({quickFilter:e.quickFilter})},[ue]);let ce=JSON.stringify(e.tooltip??null),j=u(!1);a(()=>{if(!j.current){j.current=!0;return}i.current?.api.updateGridOptions({tooltip:e.tooltip})},[ce]);let de=JSON.stringify(e.columnPanel??null),q=u(!1);a(()=>{if(!q.current){q.current=!0;return}i.current?.api.updateGridOptions({columnPanel:e.columnPanel})},[de]);let se=JSON.stringify(e.toolbar??null),U=u(!1);return a(()=>{if(!U.current){U.current=!0;return}i.current?.api.updateGridOptions({toolbar:e.toolbar})},[se]),a(()=>{i.current?.api.updateGridOptions({savedViews:e.savedViews})},[e.savedViews]),a(()=>{i.current?.api.updateGridOptions({sheets:e.sheets})},[e.sheets]),a(()=>{i.current?.api.updateGridOptions({theme:e.theme,icons:{...e.theme?.getIcons(),...e.icons}})},[e.theme,e.icons]),He("div",{ref:r,className:e.className,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",...e.style}})});export{ke as Grid};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agility-workbench/react-grid",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "React bindings for @agility-workbench/grid — a high-performance data grid.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -61,7 +61,7 @@
61
61
  "prepublishOnly": "npm run build"
62
62
  },
63
63
  "dependencies": {
64
- "@agility-workbench/grid": "^1.0.0"
64
+ "@agility-workbench/grid": "^1.1.0"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "react": ">=18.0.0",