@deephaven/iris-grid 1.22.1-alpha-pivot-builder.0 → 1.22.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.
Files changed (50) hide show
  1. package/README.md +1 -284
  2. package/dist/CommonTypes.d.ts +2 -62
  3. package/dist/CommonTypes.d.ts.map +1 -1
  4. package/dist/CommonTypes.js.map +1 -1
  5. package/dist/IrisGrid.d.ts +2 -85
  6. package/dist/IrisGrid.d.ts.map +1 -1
  7. package/dist/IrisGrid.js +66 -246
  8. package/dist/IrisGrid.js.map +1 -1
  9. package/dist/IrisGridModel.d.ts +1 -30
  10. package/dist/IrisGridModel.d.ts.map +1 -1
  11. package/dist/IrisGridModel.js +1 -36
  12. package/dist/IrisGridModel.js.map +1 -1
  13. package/dist/IrisGridProxyModel.d.ts.map +1 -1
  14. package/dist/IrisGridProxyModel.js +2 -34
  15. package/dist/IrisGridProxyModel.js.map +1 -1
  16. package/dist/IrisGridTextCellRenderer.d.ts.map +1 -1
  17. package/dist/IrisGridTextCellRenderer.js +1 -1
  18. package/dist/IrisGridTextCellRenderer.js.map +1 -1
  19. package/dist/IrisGridUtils.d.ts +2 -25
  20. package/dist/IrisGridUtils.d.ts.map +1 -1
  21. package/dist/IrisGridUtils.js +42 -99
  22. package/dist/IrisGridUtils.js.map +1 -1
  23. package/dist/LazyIrisGrid.d.ts +1 -1
  24. package/dist/index.d.ts +0 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +0 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/sidebar/OptionType.d.ts +0 -8
  29. package/dist/sidebar/OptionType.d.ts.map +1 -1
  30. package/dist/sidebar/OptionType.js +0 -7
  31. package/dist/sidebar/OptionType.js.map +1 -1
  32. package/dist/sidebar/aggregations/AggregationUtils.d.ts.map +1 -1
  33. package/dist/sidebar/aggregations/AggregationUtils.js +2 -1
  34. package/dist/sidebar/aggregations/AggregationUtils.js.map +1 -1
  35. package/dist/sidebar/index.d.ts +2 -3
  36. package/dist/sidebar/index.d.ts.map +1 -1
  37. package/dist/sidebar/index.js.map +1 -1
  38. package/package.json +16 -16
  39. package/dist/IrisGridModelWidgetProps.d.ts +0 -26
  40. package/dist/IrisGridModelWidgetProps.d.ts.map +0 -1
  41. package/dist/IrisGridModelWidgetProps.js +0 -2
  42. package/dist/IrisGridModelWidgetProps.js.map +0 -1
  43. package/dist/sidebar/IrisGridTableOptionsWidgetProps.d.ts +0 -22
  44. package/dist/sidebar/IrisGridTableOptionsWidgetProps.d.ts.map +0 -1
  45. package/dist/sidebar/IrisGridTableOptionsWidgetProps.js +0 -2
  46. package/dist/sidebar/IrisGridTableOptionsWidgetProps.js.map +0 -1
  47. package/dist/sidebar/PluginTableOptionsErrorBoundary.d.ts +0 -30
  48. package/dist/sidebar/PluginTableOptionsErrorBoundary.d.ts.map +0 -1
  49. package/dist/sidebar/PluginTableOptionsErrorBoundary.js +0 -60
  50. package/dist/sidebar/PluginTableOptionsErrorBoundary.js.map +0 -1
package/README.md CHANGED
@@ -20,287 +20,4 @@ const model = await IrisGridModelFactory.makeModel(dh, table);
20
20
 
21
21
  // In your render function
22
22
  <IrisGrid dh={dh} model={model} />
23
- ```
24
-
25
- ## Customizing the Table Options menu
26
-
27
- The Table Options sidebar (the gear menu on the right edge of the grid) is
28
- extensible. Plugin authors can hide built-in items, relabel or reorder
29
- them, and add their own items that open a custom configuration page —
30
- without forking `IrisGrid`.
31
-
32
- There is a single entry point: the `transformTableOptions` prop on
33
- `<IrisGrid>`. It is **opt-in** — it lives on the iris-grid-specific
34
- `IrisGridTableOptionsWidgetProps`, not on the generic
35
- `WidgetComponentProps` / `WidgetPanelProps`, so widgets that don't care
36
- about the Table Options menu never see it.
37
-
38
- - **Own the render site?** Pass `transformTableOptions` straight to
39
- `<IrisGrid>`.
40
- - **A `WidgetMiddlewarePlugin` that doesn't render `<IrisGrid>`
41
- yourself?** Thread the prop down the middleware chain via the
42
- `Component` you wrap, composing your own transform on top of the one
43
- you received (see [Publishing from middleware](#publishing-from-middleware)).
44
- The panel hosts that ship with Deephaven (`IrisGridPanel`,
45
- `GridWidgetPlugin`) accept `transformTableOptions` as a prop and
46
- forward it to `<IrisGrid>`.
47
-
48
- ### Writing a transform
49
-
50
- `transformTableOptions(defaults)` is a pure function that receives the
51
- built-in items (already filtered by what the current model supports) and
52
- returns the items to actually render. Use it to add, hide, relabel,
53
- reorder, or replace entries.
54
-
55
- ```tsx
56
- import { OptionType, type OptionItem } from '@deephaven/iris-grid';
57
-
58
- const transformTableOptions = (defaults: readonly OptionItem[]) => [
59
- // hide a built-in
60
- ...defaults.filter(o => o.type !== OptionType.SELECT_DISTINCT),
61
- // add a plugin item with its own page
62
- {
63
- type: 'plugin:my-plugin:column-inspector',
64
- title: 'Column Inspector',
65
- configPage: ColumnInspectorPage,
66
- },
67
- ];
68
- ```
69
-
70
- Rules:
71
-
72
- - The transform should be referentially stable and side-effect-free
73
- (it's called inside memoization). Memoize it with `useMemo` /
74
- `useCallback` rather than rebuilding per render.
75
- - A throwing transform is logged once and treated as identity for that
76
- render, so the menu degrades gracefully.
77
- - Items **without** a `configPage` MUST have a `type` matching an
78
- existing `OptionType` enum value — those are rendered by the built-in
79
- page switch.
80
- - Items **with** a `configPage` SHOULD use a namespaced key,
81
- conventionally `plugin:<name>:<id>`, to avoid colliding with built-ins
82
- or other plugins.
83
-
84
- ### Implementing a `configPage`
85
-
86
- A `configPage` is a regular React component that receives
87
- `IrisGridTableOptionsPageProps`:
88
-
89
- ```tsx
90
- import { type IrisGridTableOptionsPageProps } from '@deephaven/iris-grid';
91
-
92
- export function ColumnInspectorPage({
93
- model,
94
- onBack,
95
- }: IrisGridTableOptionsPageProps): JSX.Element {
96
- return (
97
- <div>
98
- <button type="button" onClick={onBack}>Back</button>
99
- <pre>{model.columns.map(c => c.name).join('\n')}</pre>
100
- </div>
101
- );
102
- }
103
- ```
104
-
105
- `IrisGrid` wraps each `configPage` render in `PluginTableOptionsErrorBoundary`,
106
- so a throw inside your page shows a small inline fallback instead of
107
- unmounting the whole grid.
108
-
109
- ### Publishing from middleware
110
-
111
- When you're a `WidgetMiddlewarePlugin` and don't render `<IrisGrid>`
112
- yourself, you receive `transformTableOptions` as a prop and pass a
113
- composed transform down to the `Component` (or panel) you wrap. Run the
114
- upstream transform first so contributions compose, then layer your own
115
- changes on top.
116
-
117
- A `panelComponent` middleware should be built with `createPanelMiddleware`
118
- from `@deephaven/plugin`: you supply a body hook that may `inject` props onto
119
- the wrapped component and/or `wrap` the child in a wrapper element (both
120
- optional), and the factory owns the `React.forwardRef` ceremony and ref
121
- forwarding for you. That ref matters —
122
- golden-layout binds a ref to the registered panel to persist class-panel
123
- state (sorts, filters, column moves, etc.) into its `componentState`, and a
124
- middleware that swallowed it would silently break that persistence for every
125
- panel below it; the factory guarantees it can't be dropped. For the non-panel
126
- `component` path use `createWidgetMiddleware`, which is otherwise identical but
127
- takes no ref.
128
-
129
- ```tsx
130
- import { useMemo } from 'react';
131
- import { createPanelMiddleware, type WidgetPanelProps } from '@deephaven/plugin';
132
- import {
133
- type IrisGridTableOptionsWidgetProps,
134
- type TableOptionsTransform,
135
- } from '@deephaven/iris-grid';
136
-
137
- function makeMyTransform(
138
- upstream: TableOptionsTransform | undefined
139
- ): TableOptionsTransform {
140
- return defaults => {
141
- const base = upstream != null ? upstream(defaults) : defaults;
142
- return [...base, myPluginItem];
143
- };
144
- }
145
-
146
- const MyMiddleware = createPanelMiddleware<
147
- unknown,
148
- WidgetPanelProps & IrisGridTableOptionsWidgetProps
149
- >(({ transformTableOptions }) => {
150
- const composedTransform = useMemo(
151
- () => makeMyTransform(transformTableOptions),
152
- [transformTableOptions]
153
- );
154
- return { inject: { transformTableOptions: composedTransform } };
155
- }, 'MyMiddleware');
156
- ```
157
-
158
- The body hook receives the incoming props (minus `Component`) and returns an
159
- optional `{ inject?, wrap? }`. Every incoming prop is forwarded to the wrapped
160
- component automatically; `inject` only adds or overrides the few props you
161
- actually change (here `transformTableOptions`), and `wrap` optionally nests the
162
- child (e.g. in a context provider). Both fields are optional — a pass-through
163
- middleware can return `{}`. The factory adds the `ref` plumbing on top.
164
-
165
-
166
- Composition rule: each middleware layer reads the `transformTableOptions`
167
- it was handed, runs that transform first, then layers its own changes on
168
- top — last writer wins for any given `OptionItem.type`.
169
-
170
- #### Model-aware menus
171
-
172
- The transform must stay **pure** — it only sees `defaults`, never the
173
- `IrisGridModel`. To make a menu react to model state (e.g. relabel an
174
- item once a pivot is active), take a **snapshot of the value you care
175
- about** from model events and fold it into the transform's identity:
176
-
177
- ```tsx
178
- const [isPivot, setIsPivot] = useState(model.isPivot);
179
- useEffect(() => {
180
- const handler = () => setIsPivot(model.isPivot);
181
- model.addEventListener(SOME_MODEL_EVENT, handler);
182
- return () => model.removeEventListener(SOME_MODEL_EVENT, handler);
183
- }, [model]);
184
-
185
- const composedTransform = useMemo(
186
- () => makeMyTransform(transformTableOptions, isPivot),
187
- [transformTableOptions, isPivot]
188
- );
189
- ```
190
-
191
- Because `composedTransform`'s identity changes when the snapshot
192
- changes, `IrisGrid` re-runs it (its menu cache is keyed on
193
- `[defaults, transform]`). Keeping the snapshot in the dependency array —
194
- rather than reading `model.isPivot` inside the transform — is what keeps
195
- that memoization honest.
196
-
197
- To obtain the model when the host builds it for you, pass an
198
- `onModelChanged` callback to `IrisGridPanel` (called once the panel's
199
- model is ready).
200
-
201
- ### Full example
202
-
203
- See the [`@deephaven/js-plugin-pivot-builder`](https://github.com/deephaven/deephaven-plugins/tree/main/plugins/pivot-builder)
204
- plugin for a working `WidgetMiddlewarePlugin` that replaces the default
205
- widget renderer and adds a `configPage`-backed "Rollup, Aggregate and Pivot"
206
- item to the Table Options sidebar.
207
-
208
- ### Why the transform doesn't take the model
209
-
210
- The transform signature is `(defaults) => items` — it deliberately does
211
- **not** receive the `IrisGridModel` or grid state. State-aware menus
212
- (e.g. "relabel an item once a pivot is active", "show *Reset filters*
213
- only when filters exist") are implemented in the middleware: subscribe
214
- to model events, snapshot the value you need, and fold that snapshot
215
- into the transform's identity (see
216
- [Model-aware menus](#model-aware-menus)). The transform itself stays
217
- pure.
218
-
219
- This isn't just about keeping the public surface small — it's also
220
- what keeps menu memoization honest. `IrisGrid` caches the computed
221
- item list on `[defaults, transform]` (see `getCachedTransformedOptionItems`),
222
- both of which are stable values/refs. Adding a live `model` argument
223
- would break that: `IrisGridModel` is a long-lived mutable handle whose
224
- identity does not change when `isExpandable`, `filter`, `sorts`, or
225
- `isRollup` flip, so any plugin that read those fields would silently
226
- return stale items until something unrelated invalidated the cache.
227
-
228
- By passing a **curated snapshot of values** through the transform's
229
- closure instead, the memo key changes exactly when those values change
230
- and re-runs are driven by actual dependencies. Passing the model itself,
231
- or the full `IrisGrid` instance, is intentionally off the table: the
232
- surface is too large, too volatile, and (in the model's case)
233
- memoization-hostile.
234
-
235
- ## Transforming the model
236
-
237
- Some plugins need more than a custom menu — they need to change the
238
- **model** the grid renders (e.g. wrap it in a proxy that can swap its
239
- inner model in response to a config page). For that there is a second,
240
- symmetric opt-in seam: the `transformModel` prop.
241
-
242
- Like `transformTableOptions`, it lives on an iris-grid-specific
243
- interface (`IrisGridModelWidgetProps`), not on the generic
244
- `WidgetComponentProps` / `WidgetPanelProps`, and is threaded down the
245
- middleware chain by the hosts that build the model for you
246
- (`IrisGridPanel`, `GridWidgetPlugin` / `useIrisGridModel`).
247
-
248
- ```ts
249
- import { type IrisGridModelTransform } from '@deephaven/iris-grid';
250
-
251
- // (model: IrisGridModel) => IrisGridModel | Promise<IrisGridModel>
252
- const transformModel: IrisGridModelTransform = model =>
253
- wrapInMyProxy(model);
254
- ```
255
-
256
- The host builds the model from `fetch` as usual, then applies
257
- `transformModel` to whatever it built **before** handing it to
258
- `<IrisGrid>`. The returned model must be a drop-in for the input — the
259
- host owns its lifecycle and will `close()` whatever you return, so wrap
260
- rather than discard the model you were given. The transform may be async
261
- if it needs to await dependencies first.
262
-
263
- Rules:
264
-
265
- - `transformModel` must be **referentially stable**. It is applied when
266
- the model is (re)built; an unstable transform would rebuild the model.
267
- Memoize it with `useMemo` / `useCallback`.
268
- - It runs once per model build, not per render, so it is the right place
269
- for one-time wrapping — not for per-render state.
270
- - This is why model construction stays in the host: the host keeps
271
- ownership of `fetch`, error/loading state, and `close()`, while the
272
- plugin only augments the result. A middleware using `transformModel`
273
- can therefore render the wrapped `Component` and stay a **chained**
274
- layer instead of taking over model construction and becoming terminal.
275
-
276
- ### Publishing `transformModel` from middleware
277
-
278
- A middleware that needs both seams composes them the same way — run any
279
- upstream transform first, then layer your own — and returns both from its
280
- body hook's `inject`. Props you don't touch (here `transformTableOptions`)
281
- are forwarded automatically, so you only inject what you change:
282
-
283
- ```tsx
284
- import { useMemo } from 'react';
285
- import { createPanelMiddleware, type WidgetPanelProps } from '@deephaven/plugin';
286
- import {
287
- type IrisGridModelTransform,
288
- type IrisGridModelWidgetProps,
289
- type IrisGridTableOptionsWidgetProps,
290
- } from '@deephaven/iris-grid';
291
-
292
- const MyMiddleware = createPanelMiddleware<
293
- unknown,
294
- WidgetPanelProps & IrisGridModelWidgetProps & IrisGridTableOptionsWidgetProps
295
- >(({ transformModel }) => {
296
- const composedModel = useMemo<IrisGridModelTransform>(
297
- () => async model => {
298
- const base = transformModel != null ? await transformModel(model) : model;
299
- return wrapInMyProxy(base);
300
- },
301
- [transformModel]
302
- );
303
- return { inject: { transformModel: composedModel } };
304
- }, 'MyMiddleware');
305
- ```
306
-
23
+ ```
@@ -3,9 +3,8 @@ import { type GridRangeIndex, type ModelIndex } from '@deephaven/grid';
3
3
  import type { dh } from '@deephaven/jsapi-types';
4
4
  import { type Shortcut } from '@deephaven/components';
5
5
  import { type IconDefinition } from '@deephaven/icons';
6
- import { type ComponentType } from 'react';
7
6
  import type AggregationOperation from './sidebar/aggregations/AggregationOperation';
8
- import { type UIRollupConfig, type OptionItemKey } from './sidebar';
7
+ import { type UIRollupConfig, type OptionType } from './sidebar';
9
8
  import type IrisGridModel from './IrisGridModel';
10
9
  import { type IrisGridThemeType } from './IrisGridTheme';
11
10
  export type RowIndex = ModelIndex;
@@ -30,72 +29,13 @@ export type Action = {
30
29
  action: () => void;
31
30
  shortcut: Shortcut;
32
31
  };
33
- /**
34
- * Options accepted by `IrisGrid.startLoading`. Mirrors the inline options bag
35
- * on that method so initiators (including plugins) can type their request.
36
- */
37
- export type StartLoadingOptions = {
38
- /** Reset selected ranges and scroll position when loading begins. */
39
- resetRanges?: boolean;
40
- /** Whether the loading scrim shows a cancel button. */
41
- loadingCancelShown?: boolean;
42
- /** Whether the loading scrim blocks interaction with the grid. */
43
- loadingBlocksGrid?: boolean;
44
- };
45
- /**
46
- * Detail payload for `IrisGridModel.EVENT.PENDING`. Self-describing so an
47
- * initiator (e.g. a plugin) can raise the loading scrim for an operation
48
- * IrisGrid has no built-in knowledge of.
49
- */
50
- export type PendingOperationDetail = {
51
- /**
52
- * Display text for the scrim. Omitted → IrisGrid uses a generic message.
53
- */
54
- text?: string;
55
- /** Scrim options the initiator wants applied while loading. */
56
- options?: StartLoadingOptions;
57
- };
58
- /**
59
- * Props passed to a plugin-supplied sidebar page (an item whose
60
- * `configPage` is set). Pages receive the current model and a
61
- * back-navigation callback; any additional state access should
62
- * flow through the model or through props the plugin threads in
63
- * itself.
64
- */
65
- export type IrisGridTableOptionsPageProps = {
66
- /** Current model the grid is rendering. */
67
- model: IrisGridModel;
68
- /** Pop the current page off the sidebar stack. */
69
- onBack: () => void;
70
- };
71
32
  export type OptionItem = {
72
- /**
73
- * Built-in items use the `OptionType` enum; plugin-contributed items
74
- * use a namespaced string key (convention `plugin:<name>:<id>`).
75
- */
76
- type: OptionItemKey;
33
+ type: OptionType;
77
34
  title: string;
78
35
  subtitle?: string;
79
36
  icon?: IconDefinition;
80
37
  isOn?: boolean;
81
38
  onChange?: () => void;
82
- /**
83
- * Optional sort weight for positioning the item within the menu. Items
84
- * are stably sorted by ascending `order`; an omitted `order` sinks the
85
- * item to the end of the menu. Built-in items are numbered with a stride
86
- * of 100 (Chart Builder `100` … Go to `1200`), so a plugin can slot an
87
- * item between two built-ins (e.g. `250`) or before all of them with a
88
- * smaller/negative value.
89
- */
90
- order?: number;
91
- /**
92
- * Renderer for plugin-supplied sidebar pages. Built-in items leave
93
- * this undefined — the `IrisGrid` page switch renders them via
94
- * its existing `case OptionType.*` arms; the `default` case renders
95
- * `configPage` when present and falls back to a programmer-error
96
- * throw otherwise.
97
- */
98
- configPage?: ComponentType<IrisGridTableOptionsPageProps>;
99
39
  };
100
40
  export interface UITotalsTableConfig extends dh.TotalsTableConfig {
101
41
  operationOrder: AggregationOperation[];
@@ -1 +1 @@
1
- {"version":3,"file":"CommonTypes.d.ts","sourceRoot":"","sources":["../src/CommonTypes.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,oBAAoB,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC;AAElC,YAAY,EAAE,qBAAqB,EAAE,CAAC;AACtC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC,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,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC;CACpB,CAAC;AACF,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAE/E,uDAAuD;AACvD,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,IAAI,WAAW,CACpE,QAAQ,EACR,SAAS,CAAC,EAAE,CACb,CAAC;AAEF,MAAM,WAAW,qBAAsB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACpE,KAAK,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,iBAAiB,CAAC;IACzB,iBAAiB,EAAE,cAAc,CAAC;IAClC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,eAAe,EAAE,yBAAyB,CAAC;IAC3C,YAAY,EAAE,sBAAsB,CAAC;IACrC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,cAAc,GAAG,SAAS,CAAC;CAC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"CommonTypes.js","names":[],"sources":["../src/CommonTypes.tsx"],"sourcesContent":["import {\n type AdvancedFilterOptions,\n type SortDescriptor,\n} from '@deephaven/jsapi-utils';\nimport { type GridRangeIndex, type ModelIndex } from '@deephaven/grid';\nimport type { dh } from '@deephaven/jsapi-types';\nimport { type Shortcut } from '@deephaven/components';\nimport { type IconDefinition } from '@deephaven/icons';\nimport { type ComponentType } from 'react';\nimport type AggregationOperation from './sidebar/aggregations/AggregationOperation';\nimport { type UIRollupConfig, type OptionItemKey } from './sidebar';\nimport type IrisGridModel from './IrisGridModel';\nimport { type IrisGridThemeType } from './IrisGridTheme';\n\nexport type RowIndex = ModelIndex;\n\nexport type { AdvancedFilterOptions };\nexport type ColumnName = string;\nexport type AdvancedFilterMap = Map<ModelIndex, AdvancedFilter>;\nexport type QuickFilterMap = Map<ModelIndex, QuickFilter>;\nexport type ReadonlyAdvancedFilterMap = ReadonlyMap<ModelIndex, AdvancedFilter>;\nexport type ReadonlyQuickFilterMap = ReadonlyMap<ModelIndex, QuickFilter>;\nexport type ReadonlyAggregationMap = Readonly<\n Record<AggregationOperation, readonly ColumnName[]>\n>;\nexport type OperationMap = Record<ColumnName, readonly AggregationOperation[]>;\nexport type ReadonlyOperationMap = Readonly<\n Record<ColumnName, readonly AggregationOperation[]>\n>;\n\nexport type QuickFilter = {\n text: string;\n filter: dh.FilterCondition | null;\n};\n\nexport type AdvancedFilter = {\n filter: dh.FilterCondition | null;\n options: AdvancedFilterOptions;\n};\n\nexport type Action = {\n action: () => void;\n shortcut: Shortcut;\n};\n\n/**\n * Options accepted by `IrisGrid.startLoading`. Mirrors the inline options bag\n * on that method so initiators (including plugins) can type their request.\n */\nexport type StartLoadingOptions = {\n /** Reset selected ranges and scroll position when loading begins. */\n resetRanges?: boolean;\n /** Whether the loading scrim shows a cancel button. */\n loadingCancelShown?: boolean;\n /** Whether the loading scrim blocks interaction with the grid. */\n loadingBlocksGrid?: boolean;\n};\n\n/**\n * Detail payload for `IrisGridModel.EVENT.PENDING`. Self-describing so an\n * initiator (e.g. a plugin) can raise the loading scrim for an operation\n * IrisGrid has no built-in knowledge of.\n */\nexport type PendingOperationDetail = {\n /**\n * Display text for the scrim. Omitted → IrisGrid uses a generic message.\n */\n text?: string;\n /** Scrim options the initiator wants applied while loading. */\n options?: StartLoadingOptions;\n};\n\n/**\n * Props passed to a plugin-supplied sidebar page (an item whose\n * `configPage` is set). Pages receive the current model and a\n * back-navigation callback; any additional state access should\n * flow through the model or through props the plugin threads in\n * itself.\n */\nexport type IrisGridTableOptionsPageProps = {\n /** Current model the grid is rendering. */\n model: IrisGridModel;\n /** Pop the current page off the sidebar stack. */\n onBack: () => void;\n};\n\nexport type OptionItem = {\n /**\n * Built-in items use the `OptionType` enum; plugin-contributed items\n * use a namespaced string key (convention `plugin:<name>:<id>`).\n */\n type: OptionItemKey;\n title: string;\n subtitle?: string;\n icon?: IconDefinition;\n isOn?: boolean;\n onChange?: () => void;\n /**\n * Optional sort weight for positioning the item within the menu. Items\n * are stably sorted by ascending `order`; an omitted `order` sinks the\n * item to the end of the menu. Built-in items are numbered with a stride\n * of 100 (Chart Builder `100` … Go to `1200`), so a plugin can slot an\n * item between two built-ins (e.g. `250`) or before all of them with a\n * smaller/negative value.\n */\n order?: number;\n /**\n * Renderer for plugin-supplied sidebar pages. Built-in items leave\n * this undefined — the `IrisGrid` page switch renders them via\n * its existing `case OptionType.*` arms; the `default` case renders\n * `configPage` when present and falls back to a programmer-error\n * throw otherwise.\n */\n configPage?: ComponentType<IrisGridTableOptionsPageProps>;\n};\n\nexport interface UITotalsTableConfig extends dh.TotalsTableConfig {\n operationOrder: AggregationOperation[];\n showOnTop: boolean;\n}\n\nexport type InputFilter = {\n name: string;\n type: string;\n value: string;\n excludePanelIds?: (string | string[])[];\n};\n\nexport interface UIRow {\n /**\n * The data in the row indexed by column number.\n * If a column is not part of the columns array (i.e. it's hidden by the model/table),\n * then it will be included by its name instead of index.\n */\n data: Map<ModelIndex | ColumnName, CellData>;\n}\n\nexport type UIViewportData<R extends UIRow = UIRow> = {\n offset: number;\n rows: R[];\n};\nexport type RowData<T = unknown> = Map<number, { value: T }>;\n\nexport type CellData = {\n value: unknown;\n format?: dh.Format;\n};\nexport type PendingDataMap<R extends UIRow = UIRow> = ReadonlyMap<RowIndex, R>;\n\n/** Maps from a row index to the errors for that row */\nexport type PendingDataErrorMap<T extends Error = Error> = ReadonlyMap<\n RowIndex,\n readonly T[]\n>;\n\nexport interface IrisGridStateOverride extends Record<string, unknown> {\n model: IrisGridModel;\n theme: IrisGridThemeType;\n hoverSelectColumn: GridRangeIndex;\n isFilterBarShown: boolean;\n isMenuShown: boolean;\n isSelectingColumn: boolean;\n loadingScrimProgress: number | null;\n advancedFilters: ReadonlyAdvancedFilterMap;\n quickFilters: ReadonlyQuickFilterMap;\n sorts: readonly SortDescriptor[];\n reverse: boolean;\n rollupConfig: UIRollupConfig | undefined;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"CommonTypes.js","names":[],"sources":["../src/CommonTypes.tsx"],"sourcesContent":["import {\n type AdvancedFilterOptions,\n type SortDescriptor,\n} from '@deephaven/jsapi-utils';\nimport { type GridRangeIndex, type ModelIndex } from '@deephaven/grid';\nimport type { dh } from '@deephaven/jsapi-types';\nimport { type Shortcut } from '@deephaven/components';\nimport { type IconDefinition } from '@deephaven/icons';\nimport type AggregationOperation from './sidebar/aggregations/AggregationOperation';\nimport { type UIRollupConfig, type OptionType } from './sidebar';\nimport type IrisGridModel from './IrisGridModel';\nimport { type IrisGridThemeType } from './IrisGridTheme';\n\nexport type RowIndex = ModelIndex;\n\nexport type { AdvancedFilterOptions };\nexport type ColumnName = string;\nexport type AdvancedFilterMap = Map<ModelIndex, AdvancedFilter>;\nexport type QuickFilterMap = Map<ModelIndex, QuickFilter>;\nexport type ReadonlyAdvancedFilterMap = ReadonlyMap<ModelIndex, AdvancedFilter>;\nexport type ReadonlyQuickFilterMap = ReadonlyMap<ModelIndex, QuickFilter>;\nexport type ReadonlyAggregationMap = Readonly<\n Record<AggregationOperation, readonly ColumnName[]>\n>;\nexport type OperationMap = Record<ColumnName, readonly AggregationOperation[]>;\nexport type ReadonlyOperationMap = Readonly<\n Record<ColumnName, readonly AggregationOperation[]>\n>;\n\nexport type QuickFilter = {\n text: string;\n filter: dh.FilterCondition | null;\n};\n\nexport type AdvancedFilter = {\n filter: dh.FilterCondition | null;\n options: AdvancedFilterOptions;\n};\n\nexport type Action = {\n action: () => void;\n shortcut: Shortcut;\n};\n\nexport type OptionItem = {\n type: OptionType;\n title: string;\n subtitle?: string;\n icon?: IconDefinition;\n isOn?: boolean;\n onChange?: () => void;\n};\n\nexport interface UITotalsTableConfig extends dh.TotalsTableConfig {\n operationOrder: AggregationOperation[];\n showOnTop: boolean;\n}\n\nexport type InputFilter = {\n name: string;\n type: string;\n value: string;\n excludePanelIds?: (string | string[])[];\n};\n\nexport interface UIRow {\n /**\n * The data in the row indexed by column number.\n * If a column is not part of the columns array (i.e. it's hidden by the model/table),\n * then it will be included by its name instead of index.\n */\n data: Map<ModelIndex | ColumnName, CellData>;\n}\n\nexport type UIViewportData<R extends UIRow = UIRow> = {\n offset: number;\n rows: R[];\n};\nexport type RowData<T = unknown> = Map<number, { value: T }>;\n\nexport type CellData = {\n value: unknown;\n format?: dh.Format;\n};\nexport type PendingDataMap<R extends UIRow = UIRow> = ReadonlyMap<RowIndex, R>;\n\n/** Maps from a row index to the errors for that row */\nexport type PendingDataErrorMap<T extends Error = Error> = ReadonlyMap<\n RowIndex,\n readonly T[]\n>;\n\nexport interface IrisGridStateOverride extends Record<string, unknown> {\n model: IrisGridModel;\n theme: IrisGridThemeType;\n hoverSelectColumn: GridRangeIndex;\n isFilterBarShown: boolean;\n isMenuShown: boolean;\n isSelectingColumn: boolean;\n loadingScrimProgress: number | null;\n advancedFilters: ReadonlyAdvancedFilterMap;\n quickFilters: ReadonlyQuickFilterMap;\n sorts: readonly SortDescriptor[];\n reverse: boolean;\n rollupConfig: UIRollupConfig | undefined;\n}\n"],"mappings":"","ignoreList":[]}
@@ -22,7 +22,7 @@ import { type AdvancedSettingsMenuCallback } from './sidebar/AdvancedSettingsMen
22
22
  import { type GotoRowElement } from './GotoRow';
23
23
  import { type Aggregation, type AggregationSettings } from './sidebar/aggregations/Aggregations';
24
24
  import { type ChartBuilderSettings } from './sidebar/ChartBuilder';
25
- import type AggregationOperation from './sidebar/aggregations/AggregationOperation';
25
+ import AggregationOperation from './sidebar/aggregations/AggregationOperation';
26
26
  import { type UIRollupConfig } from './sidebar/RollupRows';
27
27
  import { type Action, type AdvancedFilterOptions, type ColumnName, type InputFilter, type IrisGridStateOverride, type OperationMap, type OptionItem, type PendingDataErrorMap, type PendingDataMap, type QuickFilterMap, type ReadonlyAdvancedFilterMap, type ReadonlyAggregationMap, type ReadonlyQuickFilterMap, type UITotalsTableConfig } from './CommonTypes';
28
28
  import type ColumnHeaderGroup from './ColumnHeaderGroup';
@@ -70,23 +70,6 @@ export interface IrisGridProps {
70
70
  onDataSelected: (index: ModelIndex, map: RowDataMap) => void;
71
71
  onStateChange: (irisGridState: IrisGridState, gridState: GridState) => void;
72
72
  onAdvancedSettingsChange: AdvancedSettingsMenuCallback;
73
- /**
74
- * Pure transform over the default Table Options menu list. Receives
75
- * the built-in items (already filtered by model availability) and
76
- * returns the items to actually render. Use it to add, hide,
77
- * relabel, reorder, or replace entries.
78
- *
79
- * Items returned with a `configPage` are rendered by the
80
- * `default` case of the page switch and isolated inside a small
81
- * error boundary; items without a `configPage` MUST have a `type`
82
- * matching an existing `OptionType` enum value, otherwise the
83
- * existing case arms can't render them.
84
- *
85
- * Called inside memoization; the function should be referentially
86
- * stable and side-effect-free. A throwing transform is logged once
87
- * and treated as identity for that render.
88
- */
89
- transformTableOptions?: (defaults: readonly OptionItem[]) => readonly OptionItem[];
90
73
  /** @deprecated use `partitionConfig` instead */
91
74
  partitions?: (string | null)[];
92
75
  partitionConfig?: PartitionConfig;
@@ -145,16 +128,6 @@ export interface IrisGridProps {
145
128
  density?: 'compact' | 'regular' | 'spacious';
146
129
  getMetricCalculator: GetMetricCalculatorType;
147
130
  }
148
- /**
149
- * The subset of `IrisGridProps` that overrides how the grid presents its
150
- * model: theme, canvas renderer, extra mouse handlers, and the metric
151
- * calculator factory. Hosts that render `<IrisGrid>` on behalf of a plugin
152
- * (e.g. `GridWidgetPlugin`) accept this as a single passthrough bag so they
153
- * don't need to know each view concern by name, and plugins build it from
154
- * their own hooks. Kept as a `Pick` (not `Partial<IrisGridProps>`) so it can
155
- * never clobber structural props like `model` or `ref`.
156
- */
157
- export type IrisGridViewProps = Pick<IrisGridProps, 'theme' | 'renderer' | 'mouseHandlers' | 'getMetricCalculator'>;
158
131
  export interface IrisGridState {
159
132
  isFilterBarShown: boolean;
160
133
  isSelectingPartition: boolean;
@@ -349,13 +322,6 @@ declare class IrisGrid extends Component<IrisGridProps, IrisGridState> {
349
322
  tableUtils: TableUtils;
350
323
  keyHandlers: readonly KeyHandler[];
351
324
  mouseHandlers: MouseHandlersProp;
352
- /**
353
- * The metric calculator factory most recently used to instantiate the
354
- * calculator currently stored in state. Used by `maybeRebuildMetricCalculator`
355
- * (called from `componentDidUpdate` when the `getMetricCalculator` prop
356
- * changes) to detect when a different factory is supplied and rebuild.
357
- */
358
- lastMetricCalculatorFactory?: GetMetricCalculatorType;
359
325
  slideTransitionRef: React.RefObject<HTMLDivElement>;
360
326
  bottomTransitionRef: React.RefObject<HTMLDivElement>;
361
327
  get gridWrapper(): HTMLDivElement | null;
@@ -363,13 +329,6 @@ declare class IrisGrid extends Component<IrisGridProps, IrisGridState> {
363
329
  getAdvancedMenuToggleMaximizeHandler: ((column: ModelIndex) => () => void) & memoize.Memoized<(column: ModelIndex) => () => void>;
364
330
  getCachedAdvancedFilterMenuActions: ((model: IrisGridModel, column: DhType.Column, advancedFilterOptions: AdvancedFilterOptions | undefined, sortDirection: SortDirection | undefined, formatter: Formatter, isMaximized: boolean, onToggleMaximize: () => void) => import("react/jsx-runtime").JSX.Element) & memoize.Memoized<(model: IrisGridModel, column: DhType.Column, advancedFilterOptions: AdvancedFilterOptions | undefined, sortDirection: SortDirection | undefined, formatter: Formatter, isMaximized: boolean, onToggleMaximize: () => void) => import("react/jsx-runtime").JSX.Element>;
365
331
  getCachedOptionItems: ((isChartBuilderAvailable: boolean, isCustomColumnsAvailable: boolean, isFormatColumnsAvailable: boolean, isOrganizeColumnsAvailable: boolean, isRollupAvailable: boolean, isTotalsAvailable: boolean, isSelectDistinctAvailable: boolean, isExportAvailable: boolean, toggleFilterBarAction: Action, toggleSearchBarAction: Action, toggleGotoRowAction: Action, isFilterBarShown: boolean, showSearchBar: boolean, canDownloadCsv: boolean, canToggleSearch: boolean, showGotoRow: boolean, hasAdvancedSettings: boolean) => readonly OptionItem[]) & memoize.Memoized<(isChartBuilderAvailable: boolean, isCustomColumnsAvailable: boolean, isFormatColumnsAvailable: boolean, isOrganizeColumnsAvailable: boolean, isRollupAvailable: boolean, isTotalsAvailable: boolean, isSelectDistinctAvailable: boolean, isExportAvailable: boolean, toggleFilterBarAction: Action, toggleSearchBarAction: Action, toggleGotoRowAction: Action, isFilterBarShown: boolean, showSearchBar: boolean, canDownloadCsv: boolean, canToggleSearch: boolean, showGotoRow: boolean, hasAdvancedSettings: boolean) => readonly OptionItem[]>;
366
- /**
367
- * Apply the `transformTableOptions` transform (if any) to the
368
- * default option list.
369
- * Catches exceptions so a buggy plugin can't break the grid,
370
- * and warns about duplicate `type` collisions.
371
- */
372
- getCachedTransformedOptionItems: ((items: readonly OptionItem[], transformTableOptions: IrisGridProps["transformTableOptions"]) => readonly OptionItem[]) & memoize.Memoized<(items: readonly OptionItem[], transformTableOptions: IrisGridProps["transformTableOptions"]) => readonly OptionItem[]>;
373
332
  getCachedHiddenColumns: ((metricCalculator: IrisGridMetricCalculator, userColumnWidths: ModelSizeMap) => readonly ModelIndex[]) & memoize.Memoized<(metricCalculator: IrisGridMetricCalculator, userColumnWidths: ModelSizeMap) => readonly ModelIndex[]>;
374
333
  getAggregationMap: ((columns: readonly DhType.Column[], aggregations: readonly Aggregation[]) => ReadonlyAggregationMap) & memoize.Memoized<(columns: readonly DhType.Column[], aggregations: readonly Aggregation[]) => ReadonlyAggregationMap>;
375
334
  getOperationMap: ((columns: readonly DhType.Column[], aggregations: readonly Aggregation[]) => OperationMap) & memoize.Memoized<(columns: readonly DhType.Column[], aggregations: readonly Aggregation[]) => OperationMap>;
@@ -392,7 +351,7 @@ declare class IrisGrid extends Component<IrisGridProps, IrisGridState> {
392
351
  getCachedKeyHandlers: ((keyHandlers: readonly KeyHandler[]) => KeyHandler[]) & memoize.Memoized<(keyHandlers: readonly KeyHandler[]) => KeyHandler[]>;
393
352
  getKeyHandlers(): readonly KeyHandler[];
394
353
  getMetricState(): IrisGridMetricState | undefined;
395
- getCachedMouseHandlers: ((mouseHandlersProp: MouseHandlersProp) => readonly GridMouseHandler[]) & memoize.Memoized<(mouseHandlersProp: MouseHandlersProp) => readonly GridMouseHandler[]>;
354
+ getCachedMouseHandlers: ((mouseHandlers: MouseHandlersProp) => readonly GridMouseHandler[]) & memoize.Memoized<(mouseHandlers: MouseHandlersProp) => readonly GridMouseHandler[]>;
396
355
  getCachedRenderer: ((rendererProp?: IrisGridRenderer) => IrisGridRenderer) & memoize.Memoized<(rendererProp?: IrisGridRenderer) => IrisGridRenderer>;
397
356
  get renderer(): IrisGridRenderer;
398
357
  getMouseHandlers(): readonly GridMouseHandler[];
@@ -574,32 +533,8 @@ declare class IrisGrid extends Component<IrisGridProps, IrisGridState> {
574
533
  handleMenuBack(): void;
575
534
  handleMenuSelect(option: OptionItem): void;
576
535
  handleRequestFailed(event: EventT): void;
577
- /**
578
- * Raise the loading scrim in response to a model-driven `PENDING` event. The
579
- * model is the start signal, mirroring how `UPDATED`/`COLUMNS_CHANGED` are
580
- * already the model-driven stop signal. Idempotent: the first message within
581
- * a commit wins (the `loadingScrimStartTime == null` guard collapses multiple
582
- * pending operations into a single scrim).
583
- */
584
- handlePending(event: EventT): void;
585
- /**
586
- * Clear the loading scrim in response to a model-driven `PENDING_CLEARED`
587
- * event. Only needed for operations that do not naturally end in
588
- * `UPDATED`/`COLUMNS_CHANGED`/`REQUEST_FAILED`.
589
- */
590
- handlePendingCleared(): void;
591
536
  handleUpdate(): void;
592
537
  handleTableChanged(): void;
593
- /**
594
- * Handle an inner-model swap on a proxy model (`MODEL_CHANGED`). The previous
595
- * model's `movedColumns` reference indices that may not exist in the new
596
- * model (e.g. a pivot exposes a different column set), so reset them to the
597
- * new model's initial order. The metric calculator is rebuilt separately when
598
- * the `getMetricCalculator` prop changes (see `componentDidUpdate`); a calc
599
- * whose seed `movedColumns` are now stale self-heals because `getMetrics`
600
- * reconciles against the grid's current `movedColumns` at draw time.
601
- */
602
- handleModelChanged(): void;
603
538
  handleViewChanged(metrics?: GridMetrics): void;
604
539
  handleSelectionChanged(selectedRanges?: readonly GridRange[]): void;
605
540
  handleMovedColumnsChanged(movedColumns: readonly MoveOperation[], onChangeApplied?: () => void): void;
@@ -613,24 +548,6 @@ declare class IrisGrid extends Component<IrisGridProps, IrisGridState> {
613
548
  handleConditionalFormatEditorCancel(): void;
614
549
  handleUpdateCustomColumns(customColumns: readonly string[]): void;
615
550
  handleCustomColumnsChanged(): void;
616
- /**
617
- * Rebuild the metric calculator when the `getMetricCalculator` prop swaps for
618
- * a different factory (e.g. entering or leaving a pivot, where the
619
- * pivot-builder middleware flips the prop). The renderer and mouse handlers
620
- * are recomputed via their memoized getters on the next render and do not
621
- * need explicit handling here.
622
- *
623
- * User column-widths / row-heights from the previous calculator are not
624
- * carried over: a factory swap means the column set has effectively changed,
625
- * so the stored sizes wouldn't map to anything meaningful.
626
- *
627
- * Moved columns are NOT reset here — that is owned by `handleModelChanged`
628
- * (the `MODEL_CHANGED` event) so that a plain prop swap against the same
629
- * model preserves the user's layout. The new calculator is seeded with the
630
- * current moved columns; `getMetrics` reconciles against the grid's live
631
- * `movedColumns` at draw time, so a later reset stays consistent.
632
- */
633
- maybeRebuildMetricCalculator(): void;
634
551
  handlePendingCommitClicked(): Promise<void>;
635
552
  handlePendingDiscardClicked(): Promise<void>;
636
553
  handlePendingDataUpdated(): void;