import * as react_jsx_runtime from 'react/jsx-runtime'; import { FilterFieldRuntimeContext } from '../../lib/column-filter-context.js'; import * as React from 'react'; import { DataListViewType } from '../../lib/data-list-view.js'; import { RowHeight } from '../../lib/row-height.js'; import { DataListDisplayOptions } from '../../lib/data-list-display-options.js'; import { ActiveFilter, SortRule, ConditionalRule, FilterFieldDef } from '../../lib/table-properties-types.js'; import '../data-table/types.js'; import '../../lib/column-cell-kind.js'; import '../../lib/column-filter-person-options.js'; interface TablePropertiesDrawerProps { open: boolean; onOpenChange: (open: boolean) => void; /** * Optional deep-link target. When set (and `open` is true), the drawer * focuses this panel instead of "main" — e.g. the column header's * **Add Conditional Rule** menu item passes `"conditional-rules"` to jump * straight to the conditional-formatting panel. Drawer resets to "main" * automatically when it closes. */ initialPanel?: string | null; showGridlines?: boolean; onShowGridlinesChange?: (v: boolean) => void; rowHeight?: RowHeight; onRowHeightChange?: (v: RowHeight) => void; pagination?: boolean; onPaginationChange?: (v: boolean) => void; activeFilters?: ActiveFilter[]; onAddFilter?: (fieldKey: string) => void; onUpdateFilter?: (id: string, patch: Partial) => void; onRemoveFilter?: (id: string) => void; /** How the filter after `leftFilterId` combines with the one above (default "and"). */ getFilterConnector?: (leftFilterId: string) => "and" | "or"; onToggleFilterConnector?: (leftFilterId: string) => void; filterBarVisible?: boolean; onFilterBarVisibleChange?: (v: boolean) => void; drawerExpandedFilters?: Set; onDrawerExpandedFiltersChange?: React.Dispatch>>; totalRows?: number; filteredRows?: number; sortRules?: SortRule[]; onSortRulesChange?: (rules: SortRule[]) => void; onAddSortRule?: (fieldKey: string) => void; onRemoveSortRule?: (id: string) => void; onToggleSortDir?: (id: string) => void; colOrder?: string[]; onColOrderChange?: (order: string[]) => void; hiddenCols?: Set; onToggleColVisibility?: (key: string) => void; onMoveCol?: (key: string, dir: "up" | "down") => void; groupBy?: string | null; onGroupByChange?: (key: string | null) => void; primarySortKey?: string; conditionalRules?: ConditionalRule[]; onAddConditionalRule?: (rule: Omit, id?: string) => void; onRemoveConditionalRule?: (id: string) => void; onUpdateConditionalRule?: (id: string, patch: Partial) => void; /** * Filter field defs for drawer + conditional rules. Required — every list-hub * consumer derives this from its column definitions (`columnsToFilterFields`) * and passes it through `drawerToolbarProps` from `HubTable`. There is no * product-specific default in the package. */ filterFields?: FilterFieldDef[]; currentView?: DataListViewType; onViewChange?: (view: DataListViewType) => void; /** * Subset of view types this hub actually implements; when set, the view-type tile grid is * filtered so users cannot switch to an unsupported view from Properties. Defaults to all * registered view types (`DATA_LIST_VIEW_TILES`). */ supportedViewTypes?: readonly DataListViewType[]; /** Lifecycle context (e.g. tab filter) — shown in the drawer header */ lifecycleTabLabel?: string; /** * Column metadata for the Sort / Group / Columns panels. Required — every * list-hub consumer derives this from its column definitions * (`columnsToFieldDefinitions`) and passes it through `drawerToolbarProps` * from `HubTable`. The drawer never falls back to a default column list. */ fieldDefinitions?: { key: string; label: string; sortable?: boolean; }[]; resolveColumnLabel?: (key: string) => string; /** Shared display options (table + board); persisted at page level. */ displayOptions?: DataListDisplayOptions; onDisplayOptionsChange?: (patch: Partial) => void; /** * When the active view is Board and more than one entry is provided, shows a control to pick * which field defines swimlane columns (`displayOptions.boardGroupByColumnKey`). */ boardGroupByColumnOptions?: { key: string; label: string; }[]; /** Optional custom option renderer for filter values (e.g. status chips). */ renderFilterOptionValue?: (fieldKey: string, value: string) => React.ReactNode; /** Runtime filter bounds/options derived from hub rows (person lists, numeric ranges). */ filterFieldContext?: Record; /** Creation mode for the new 2-step "Add view" flow */ isCreatingNewView?: boolean; newViewName?: string; onNewViewNameChange?: (name: string) => void; onCreateNewView?: () => void; /** * Fired when the user dismisses the creation drawer (Cancel button, Esc). * In creation mode this is the cancellation channel — the drawer's * `onOpenChange(false)` also routes here so callers get a single hook for * "creation aborted". When omitted, dismissal falls back to * `onOpenChange(false)`. */ onCancelNewView?: () => void; creatingViewTypeLabel?: string; /** * Edit-mode rename support — when `onViewNameChange` is set and the drawer is * NOT in creation mode (`!isCreatingNewView`), the main panel renders the same * "Name" input shape as creation mode, bound to `(viewName, onViewNameChange)`. * The drawer just emits; the consumer decides whether to commit on every * keystroke or onBlur. Omit both props to keep the existing read-only header. */ viewName?: string; onViewNameChange?: (name: string) => void; /** Hub-level counts toggle (global) */ showViewCounts?: boolean; onShowViewCountsChange?: (show: boolean) => void; } declare function TablePropertiesDrawer({ open, onOpenChange, initialPanel, showGridlines, onShowGridlinesChange, pagination, onPaginationChange, activeFilters, onAddFilter, onUpdateFilter, onRemoveFilter, getFilterConnector, onToggleFilterConnector, filterBarVisible, onFilterBarVisibleChange, drawerExpandedFilters, onDrawerExpandedFiltersChange, totalRows, filteredRows, sortRules, onSortRulesChange, onAddSortRule, onRemoveSortRule, onToggleSortDir, colOrder, onColOrderChange, hiddenCols, onToggleColVisibility, onMoveCol, groupBy, onGroupByChange, primarySortKey, conditionalRules, onAddConditionalRule, onRemoveConditionalRule, onUpdateConditionalRule, filterFields, currentView, onViewChange, supportedViewTypes, lifecycleTabLabel, fieldDefinitions, resolveColumnLabel: resolveColumnLabelProp, displayOptions, onDisplayOptionsChange, boardGroupByColumnOptions, renderFilterOptionValue, filterFieldContext, rowHeight, onRowHeightChange, isCreatingNewView, newViewName, onNewViewNameChange, onCreateNewView, onCancelNewView, creatingViewTypeLabel, viewName, onViewNameChange, showViewCounts, onShowViewCountsChange, }: TablePropertiesDrawerProps): react_jsx_runtime.JSX.Element; export { TablePropertiesDrawer, type TablePropertiesDrawerProps };