import { ClipboardConfig, ColumnVirtualizationConfig, ContextMenuConfig, FilterConfig as CoreFilterConfig, GroupingColumnsConfig as CoreGroupingColumnsConfig, GroupingRowsConfig as CoreGroupingRowsConfig, MasterDetailConfig as CoreMasterDetailConfig, PinnedRowsConfig as CorePinnedRowsConfig, ResponsivePluginConfig as CoreResponsivePluginConfig, ExportConfig, MultiSortConfig, PivotConfig, PrintConfig, ReorderConfig, RowDragDropConfig, SelectionConfig, ServerSideConfig, StickyRowsConfig, TooltipConfig, TreeConfig, UndoRedoConfig, VisibilityConfig } from '@toolbox-web/grid/all'; import { EditingConfig } from '@toolbox-web/grid/plugins/editing'; import { FilterPanelParams } from '@toolbox-web/grid/plugins/filtering'; import { ColumnGroupDefinition as CoreColumnGroupDefinition, GroupHeaderRenderParams } from '@toolbox-web/grid/plugins/grouping-columns'; import { GroupRowRenderParams } from '@toolbox-web/grid/plugins/grouping-rows'; import { AggregationSlot, PanelZone, PinnedRowsContext } from '@toolbox-web/grid/plugins/pinned-rows'; import { ShellConfig } from '@toolbox-web/grid/plugins/shell'; import { VNode } from 'vue'; /** * Filter configuration widened to accept Vue render functions as * `filterPanelRenderer`. * * The `filterPanelRenderer` property accepts either: * - The core imperative signature: `(container: HTMLElement, params: FilterPanelParams) => void` * - A Vue render function: `(params: FilterPanelParams) => VNode` * * @template TRow - The row data type */ export type FilterConfig = Omit, 'filterPanelRenderer'> & { filterPanelRenderer?: CoreFilterConfig['filterPanelRenderer'] | ((params: FilterPanelParams) => VNode); }; /** * Column group definition widened to accept Vue render functions as the * per-group `renderer`. * * @since 1.9.0 */ export type ColumnGroupDefinition = Omit & { renderer?: CoreColumnGroupDefinition['renderer'] | ((params: GroupHeaderRenderParams) => VNode); }; /** * Grouping-columns config widened to accept Vue render functions for * `groupHeaderRenderer` and the per-group `renderer` inside `columnGroups`. * * @since 1.9.0 */ export type GroupingColumnsConfig = Omit & { columnGroups?: ColumnGroupDefinition[]; groupHeaderRenderer?: CoreGroupingColumnsConfig['groupHeaderRenderer'] | ((params: GroupHeaderRenderParams) => VNode); }; /** * Grouping-rows config widened to accept Vue render functions for * `groupRowRenderer`. * * @since 1.9.0 */ export type GroupingRowsConfig = Omit & { groupRowRenderer?: CoreGroupingRowsConfig['groupRowRenderer'] | ((params: GroupRowRenderParams) => VNode); }; /** * Vue-typed render function for a pinned-row panel slot. * * Returning a real `HTMLElement` (e.g. built-in renderers from * `@toolbox-web/grid/plugins/pinned-rows`) is supported as a pass-through. * * @since 1.9.1 */ export type PanelRender = (ctx: PinnedRowsContext) => VNode | HTMLElement | null | undefined; /** * Vue-typed zoned panel render entry. * * @since 1.9.1 */ export interface ZonedPanelRender { zone?: PanelZone; render: PanelRender; } /** * Vue-typed panel slot — same shape as the vanilla `PanelSlot` but with * `VNode` render returns. * * @since 1.9.1 */ export interface PanelSlot { id?: string; position?: 'top' | 'bottom'; render: PanelRender | ZonedPanelRender[]; } /** * Vue-typed pinned-rows slot — either a panel slot (with Vue renderers) or a * passthrough aggregation slot. * * @since 1.9.1 */ export type PinnedRowSlot = PanelSlot | AggregationSlot; /** * Pinned-rows config widened to accept Vue components as panel `render` * functions inside `slots[]`. * * @since 1.9.1 */ export type PinnedRowsConfig = Omit & { slots?: PinnedRowSlot[]; }; /** * Master-detail config widened to accept a Vue render function as * `detailRenderer` `(row, rowIndex) => VNode` in addition to the vanilla * `(row, rowIndex) => HTMLElement | string` signature. * * Re-exported under the same name as the core type so Vue users see a single * canonical `MasterDetailConfig` from `@toolbox-web/grid-vue`. * * @since 1.9.1 */ export type MasterDetailConfig = Omit & { detailRenderer?: CoreMasterDetailConfig['detailRenderer'] | ((row: Record, rowIndex: number) => VNode | null | undefined); }; /** * Responsive config widened to accept a Vue render function as `cardRenderer` * `(row, rowIndex, column?) => VNode` in addition to the vanilla * `(row, rowIndex, column?) => HTMLElement` signature. * * Re-exported under the same name as the core type so Vue users see a single * canonical `ResponsivePluginConfig` from `@toolbox-web/grid-vue`. * * @since 1.9.1 */ export type ResponsivePluginConfig = Omit, 'cardRenderer'> & { cardRenderer?: CoreResponsivePluginConfig['cardRenderer'] | ((row: TRow, rowIndex: number, column?: Parameters['cardRenderer']>>[2]) => VNode | null | undefined); }; /** * Feature props for declarative plugin configuration. * Each prop lazily loads its corresponding plugin when used. * * @template TRow - The row data type * @since 0.1.0 */ export interface FeatureProps { /** * Enable cell/row/range selection. * * @requires `import '@toolbox-web/grid-vue/features/selection';` * * @example * ```vue * * * * * * ``` */ selection?: 'cell' | 'row' | 'range' | SelectionConfig; /** * Enable inline cell editing. * * @requires `import '@toolbox-web/grid-vue/features/editing';` * * @example * ```vue * * * * * * * * * // Full config with callbacks * * ``` */ editing?: boolean | 'click' | 'dblclick' | 'manual' | EditingConfig; /** * Enable clipboard copy/paste. * Requires selection to be enabled (will be auto-added). * * @requires `import '@toolbox-web/grid-vue/features/clipboard';` * * @example * ```vue * * ``` */ clipboard?: boolean | ClipboardConfig; /** * Enable right-click context menu. * * @requires `import '@toolbox-web/grid-vue/features/context-menu';` * * @example * ```vue * * * ``` */ contextMenu?: boolean | ContextMenuConfig; /** * Enable multi-column sorting. * * Multi-sort allows users to sort by multiple columns simultaneously. * For basic single-column sorting, columns with `sortable: true` work without this plugin. * * @requires `import '@toolbox-web/grid-vue/features/multi-sort';` * * @example * ```vue * * * * * * * * * ``` */ multiSort?: boolean | 'single' | 'multi' | MultiSortConfig; /** * Enable column filtering. * * The `filterPanelRenderer` property accepts either the core imperative signature * `(container, params) => void` or a Vue render function `(params) => VNode`. * * @requires `import '@toolbox-web/grid-vue/features/filtering';` * * @example * ```vue * * * ``` */ filtering?: boolean | FilterConfig; /** * Enable column drag-to-reorder. * * @requires `import '@toolbox-web/grid-vue/features/reorder-columns';` * * @example * ```vue * * ``` */ reorderColumns?: boolean | ReorderConfig; /** * Enable column visibility toggle panel. * * @requires `import '@toolbox-web/grid-vue/features/visibility';` * * @example * ```vue * * ``` */ visibility?: boolean | VisibilityConfig; /** * Enable pinned/sticky columns. * Columns are pinned via the `sticky` column property. * * @requires `import '@toolbox-web/grid-vue/features/pinned-columns';` * * @example * ```vue * * ``` */ pinnedColumns?: boolean; /** * Enable multi-level column headers (column groups). * * @requires `import '@toolbox-web/grid-vue/features/grouping-columns';` * * @example * ```vue * * ``` * * @example Custom group header renderer (Vue VNode) * ```vue * * ``` */ groupingColumns?: boolean | GroupingColumnsConfig; /** * Enable horizontal column virtualization for wide grids. * * @requires `import '@toolbox-web/grid-vue/features/column-virtualization';` * * @example * ```vue * * ``` */ columnVirtualization?: boolean | ColumnVirtualizationConfig; /** * Enable row drag-and-drop, both within a single grid (reorder) and * across grids that share a `dropZone`. * * @requires `import '@toolbox-web/grid-vue/features/row-drag-drop';` * * @example * ```vue * * ``` */ rowDragDrop?: boolean | RowDragDropConfig; /** * Enable row grouping by field values. * * @requires `import '@toolbox-web/grid-vue/features/grouping-rows';` * * @example * ```vue * * ``` * * @example Custom group row renderer (Vue VNode) * * To keep mouse-toggle behavior, either add the `group-toggle` class to a * clickable element (the plugin delegates clicks via `closest('.group-toggle')`) * or call `params.toggleExpand()` from your own handler. * * ```vue * * ``` */ groupingRows?: GroupingRowsConfig; /** * Enable pinned rows (aggregation/status bar). * * @requires `import '@toolbox-web/grid-vue/features/pinned-rows';` * * @example * ```vue * * ``` * * @example Vue VNodes in panel slots * ```vue * * ``` */ pinnedRows?: boolean | PinnedRowsConfig; /** * Pin selected data rows below the header as the user scrolls past them. * * @requires `import '@toolbox-web/grid-vue/features/sticky-rows';` * * @example * ```vue * * * * * * ``` */ stickyRows?: StickyRowsConfig; /** * Enable hierarchical tree view. * * @requires `import '@toolbox-web/grid-vue/features/tree';` * * @example * ```vue * * ``` */ tree?: boolean | TreeConfig; /** * Enable master-detail expandable rows. * * @requires `import '@toolbox-web/grid-vue/features/master-detail';` * * @example * ```vue * * ``` */ masterDetail?: MasterDetailConfig; /** * Enable responsive card layout for narrow viewports. * * @requires `import '@toolbox-web/grid-vue/features/responsive';` * * @example * ```vue * * ``` */ responsive?: boolean | ResponsivePluginConfig; /** * Enable undo/redo for cell edits. * Requires editing to be enabled (will be auto-added). * * @requires `import '@toolbox-web/grid-vue/features/undo-redo';` * * @example * ```vue * * ``` */ undoRedo?: boolean | UndoRedoConfig; /** * Enable CSV/JSON export functionality. * * @requires `import '@toolbox-web/grid-vue/features/export';` * * @example * ```vue * * * ``` */ export?: boolean | ExportConfig; /** * Enable print functionality. * * @requires `import '@toolbox-web/grid-vue/features/print';` * * @example * ```vue * * ``` */ print?: boolean | PrintConfig; /** * Enable pivot table functionality. * * @requires `import '@toolbox-web/grid-vue/features/pivot';` * * @example * ```vue * * ``` */ pivot?: PivotConfig; /** * Enable server-side data operations. * * @requires `import '@toolbox-web/grid-vue/features/server-side';` * * @example * ```vue * * ``` */ serverSide?: ServerSideConfig; /** * Enable tooltip display for header and cell content. * * @requires `import '@toolbox-web/grid-vue/features/tooltip';` * * @example * ```vue * * * ``` */ tooltip?: boolean | TooltipConfig; /** * Enable the grid shell (header bar + collapsible tool panels). * * Config-driven: set shape via `gridConfig.features.shell` or use the * `` / `` / `` * wrappers. The shell also auto-registers in v2.x; this opt-in import makes * it explicit and tree-shakeable for v3. * * @requires `import '@toolbox-web/grid-vue/features/shell';` */ shell?: boolean | ShellConfig; } /** * All feature-related props combined. * @since 0.1.0 */ export type AllFeatureProps = FeatureProps; //# sourceMappingURL=feature-props.d.ts.map