@object-ui/plugin-list 17.5.0 → 17.7.0

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
@@ -4,7 +4,8 @@ ListView plugin for ObjectUI - A unified view component with view type switching
4
4
 
5
5
  ## Features
6
6
 
7
- - **View Type Switching**: Switch between Grid, List, Kanban, Calendar, and Chart views
7
+ - **View Type Switching**: Switch between Grid, Kanban, Gallery, Calendar,
8
+ Timeline, Gantt, Map, Chart and Tree views
8
9
  - **View Persistence**: Automatically saves user's view preference
9
10
  - **Integrated Search**: Full-text search across records
10
11
  - **Filtering**: Advanced filter UI (expandable filter panel)
@@ -66,8 +67,12 @@ function ContactsView() {
66
67
  Group rows in grid/gallery views by one or more fields. Two equivalent shapes
67
68
  are supported on the schema:
68
69
 
70
+ Spec-compliant: a structured `GroupingConfig` (multi-level, with per-field
71
+ options).
72
+
69
73
  ```tsx
70
- // Spec-compliant: structured GroupingConfig (multi-level + per-field options)
74
+ import { ListView } from '@object-ui/plugin-list';
75
+
71
76
  <ListView
72
77
  schema={{
73
78
  type: 'list-view',
@@ -82,9 +87,15 @@ are supported on the schema:
82
87
  },
83
88
  }}
84
89
  />
90
+ ```
91
+
92
+ Shorthand: a single field name, the shape the visual view-config UI emits. It is
93
+ normalized internally into the `GroupingConfig` above — an alternative to the
94
+ block before it, never a second view rendered beside it.
95
+
96
+ ```tsx
97
+ import { ListView } from '@object-ui/plugin-list';
85
98
 
86
- // Shorthand: a single field name (used by the visual view-config UI).
87
- // Internally normalized into the GroupingConfig above.
88
99
  <ListView
89
100
  schema={{
90
101
  type: 'list-view',
@@ -99,9 +110,28 @@ are supported on the schema:
99
110
  When both are present, `grouping` wins. End users can also add or remove
100
111
  grouping fields at runtime via the Group toolbar button.
101
112
 
113
+ A grouped **grid** is grouped on the server: over a data source that answers
114
+ the group header query (`dataSource.queryGroupHeaders`), `ListView` hands the
115
+ grid its own fetch, and the group set, every group count and each group's
116
+ rows come from the query (see *Grouping is server-side* in the
117
+ `@object-ui/plugin-grid` README). A toolbar search is handed to that grid too,
118
+ with the view's `searchableFields`: the grid puts the term on the group header
119
+ query and on every group's row query, so only the groups holding matches are
120
+ shown and each count is its matching rows (objectui#11021).
121
+
122
+ Over a data source that declares no `queryGroupHeaders`, `ListView` does not
123
+ fetch a window and group it — every count would be a page slice, and groups
124
+ past the window would be missing. It shows an error naming
125
+ `queryGroupHeaders` in place of the grid instead, fetches no rows, and keeps
126
+ the toolbar, so removing the grouping there lifts it (objectui#10881). Rows
127
+ handed in whole (`data` as an array, or `{ provider: 'value', items }`) are
128
+ still grouped in the browser, exactly.
129
+
102
130
  ### With Multiple View Types
103
131
 
104
132
  ```tsx
133
+ import { ListView } from '@object-ui/plugin-list';
134
+
105
135
  <ListView
106
136
  schema={{
107
137
  type: 'list-view',
@@ -130,6 +160,8 @@ grouping fields at runtime via the Group toolbar button.
130
160
  ### With Callbacks
131
161
 
132
162
  ```tsx
163
+ import { ListView } from '@object-ui/plugin-list';
164
+
133
165
  <ListView
134
166
  schema={{
135
167
  type: 'list-view',
@@ -145,41 +177,78 @@ grouping fields at runtime via the Group toolbar button.
145
177
 
146
178
  ## Schema
147
179
 
148
- The ListView component accepts a `ListViewSchema`:
180
+ The ListView component accepts a `ListViewSchema`, exported from
181
+ `@object-ui/types`. That type is derived from the package's zod schema — which
182
+ itself derives from `@objectstack/spec` — so it cannot drift from the protocol.
183
+ This page therefore annotates an example *against* the shipped type instead of
184
+ restating it as a second hand-written interface: every key below is re-checked
185
+ on every commit, and a shape the type stops accepting fails here rather than
186
+ misleading a reader.
149
187
 
150
188
  ```typescript
151
- interface ListViewSchema {
152
- type: 'list-view';
153
- objectName: string;
154
- viewType?: 'grid' | 'kanban' | 'calendar' | 'gantt' | 'map' | 'chart';
155
- /** Spec-canonical column list. The legacy `fields` alias is still accepted
156
- * on input (stored view metadata carries it) and folded into `columns` by
157
- * `normalizeListViewSchema` — but nothing reads it, so emit `columns`. */
158
- columns?: string[] | ListColumn[];
159
- filters?: Array<any[] | string>;
160
- sort?: Array<{ field: string; order: 'asc' | 'desc' }>;
161
- options?: {
162
- grid?: Record<string, any>;
163
- list?: Record<string, any>;
164
- kanban?: {
165
- groupField: string;
166
- titleField?: string;
167
- cardFields?: string[];
168
- };
169
- calendar?: {
170
- startDateField: string;
171
- endDateField?: string;
172
- titleField: string;
173
- };
174
- chart?: {
175
- chartType: 'bar' | 'line' | 'pie' | 'area';
176
- xAxisField: string;
177
- yAxisFields: string[];
178
- };
179
- };
180
- }
189
+ import type { ListViewSchema } from '@object-ui/types';
190
+
191
+ const view: ListViewSchema = {
192
+ type: 'list-view',
193
+ objectName: 'tasks',
194
+ viewType: 'grid',
195
+ // Spec-canonical column list. The legacy `fields` alias is still accepted on
196
+ // input (stored view metadata carries it) and folded into `columns` by
197
+ // `normalizeListViewSchema` — but nothing reads it, so emit `columns`.
198
+ columns: ['title', 'status', 'assignee'],
199
+ filters: [['status', '=', 'open']],
200
+ sort: [{ field: 'title', order: 'asc' }],
201
+ options: {
202
+ grid: {},
203
+ kanban: { groupField: 'status', titleField: 'title', cardFields: ['assignee'] },
204
+ calendar: { startDateField: 'due_date', titleField: 'title' },
205
+ chart: { chartType: 'bar', xAxisField: 'status', yAxisFields: ['amount'] },
206
+ },
207
+ };
208
+
209
+ // `columns` also accepts ListColumn objects in place of the field-name strings.
210
+ const richColumns: ListViewSchema['columns'] = [
211
+ { field: 'title', label: 'Title', width: 200 },
212
+ ];
213
+
214
+ // The view-type vocabulary, written as a record keyed by the shipped union so
215
+ // this list cannot go stale: a value added to or removed from
216
+ // ListViewSchema['viewType'] fails this block.
217
+ const viewTypes: Record<NonNullable<ListViewSchema['viewType']>, string> = {
218
+ grid: 'Rows and columns',
219
+ kanban: 'Cards grouped into columns',
220
+ gallery: 'Card grid',
221
+ calendar: 'Records on a month / week calendar',
222
+ timeline: 'Records bucketed on a date axis',
223
+ gantt: 'Bars over a project timeline',
224
+ map: 'Records at their geographic coordinates',
225
+ chart: 'Aggregated bar / line / pie / area chart',
226
+ tree: 'Hierarchical parent-child rows',
227
+ };
228
+
229
+ export { view, richColumns, viewTypes };
181
230
  ```
182
231
 
232
+ ## Page size and fetch batch
233
+
234
+ A list view asks the server for one window of records. When
235
+ `pagination.pageSize` is not declared, what that window is depends on whether
236
+ the view pages:
237
+
238
+ - **The grid view pages on the server.** The window is one page, and the
239
+ grid's pager turns it. Its size is the default `@objectstack/spec` declares
240
+ for `pagination.pageSize`; the list reads it from the spec rather than
241
+ keeping a number of its own.
242
+ - **Every other view does not page** — kanban, calendar, gallery and the rest,
243
+ and a grouped grid. The window is one fetch batch of **100** records, and
244
+ records past it are not reachable; the record-count bar says so when the
245
+ batch comes back full. It is a fetch size, not a page size, so it does not
246
+ follow the spec's display default.
247
+
248
+ A declared `pagination.pageSize` sizes the window on every view, as before.
249
+ With no declared size, switching between the grid view and another view
250
+ changes the window, so the list fetches again.
251
+
183
252
  ## Page binding — `dataSource` (referencing a saved view by name)
184
253
 
185
254
  On a metadata page, a `list-view` component can bind its data through the spec's
@@ -244,9 +313,17 @@ relational ones labelled `(by ID)` — so existing view metadata round-trips
244
313
  instead of silently losing its sort, and a sort the server would refuse can
245
314
  still be edited away in the picker that otherwise hides its field.
246
315
 
247
- Column-header sorting inside the grid is unaffected: it is client-side over the
248
- rows already loaded, where the label the cell shows IS available, so it orders by
249
- that label (see `getSortValue` in `@object-ui/core`).
316
+ Column-header sorting inside the grid follows the **same two rules**, because a
317
+ header click is a server `$orderby` as well whenever the grid is showing one
318
+ window of a larger collection (`objectui#3106`) — not a client-side reorder of
319
+ the loaded rows. So on that path a relational or formula column carries no
320
+ clickable header either (`objectui#3950`); offering one would have been the same
321
+ illusion through a different control.
322
+
323
+ Where the sort really does stay in the browser — inline `data` — both kinds of
324
+ header stay live and order by the value the cell shows: the resolved label for
325
+ a relational column, the server-hydrated result for a formula one (see
326
+ `getSortValue` in `@object-ui/core`).
250
327
 
251
328
  ## View Persistence
252
329
 
@@ -1,5 +1,5 @@
1
1
  import { SortItem, FilterGroup } from '@object-ui/components';
2
- import { ViewType } from './ViewSwitcher';
2
+ import { ViewType } from './ViewSwitcher.js';
3
3
  import { ListViewSchema } from '@object-ui/types';
4
4
  /**
5
5
  * ObjectUI
@@ -9,6 +9,64 @@ import { ListViewSchema } from '@object-ui/types';
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import * as React from 'react';
12
+ /**
13
+ * The `case 'map'` branch below builds an `object-map` schema by flattening
14
+ * `schema.options.map`'s CONTENTS to the top level — one entry per key
15
+ * `ObjectMapConfigSchema` declares, written under the name the FLAT form uses
16
+ * for that key. Whitelisted rather than a whole-bag spread: `style` is ALSO
17
+ * `BaseSchema.style` (inline CSS, legal on every node), and spreading the raw
18
+ * `map` block collapsed the two namespaces onto one key (objectui#5177). That
19
+ * reason is unchanged, and so is its consequence: a key the declaration does
20
+ * NOT carry never reaches the product.
21
+ *
22
+ * `style` IS delivered (objectui#9950) — under its flat spelling `mapStyle`,
23
+ * NOT by widening the whitelist to let `style` through unrenamed.
24
+ * `getMapConfig` in `ObjectMap.tsx` reads `schema.mapStyle || schema.map?.style`
25
+ * and deliberately does NOT read a top-level `style`, because that key is the
26
+ * base face's inline CSS (objectui#5017). `mapStyle` is itself a declared
27
+ * member of `ObjectMapSchema`, so the flat product stays inside the declaration
28
+ * at both ends. Before this, a view authoring `map: { style: '<url>' }` parsed
29
+ * green, was dropped here, and the map painted the PUBLIC DEMO TILES.
30
+ *
31
+ * HAND-LISTED, not derived at runtime — deliberately, and only here (`plugin-
32
+ * map`'s own `FLAT_MAP_CONFIG_KEYS` in `ObjectMap.tsx` DOES derive from
33
+ * `ObjectMapConfigSchema.shape`, and should stay that way): this file is
34
+ * reachable from `examples/console-starter`'s own `src/`, so it is part of the
35
+ * import graph `vite-alias-closure.test.ts` walks. That walker resolves a bare
36
+ * `@object-ui/*` specifier with plain `index.<ext>` conventions and cannot find
37
+ * `@object-ui/types/zod`'s actual barrel file (`zod/index.zod.ts` — a
38
+ * non-standard name) — a REAL runtime import of it here reproducibly fails
39
+ * that gate (measured on objectui#5177's first PR, PR #5231, CI run
40
+ * 32160288416), even though Vite's own alias table already resolves the
41
+ * specifier correctly (`examples/console-starter/vite.config.ts` has carried
42
+ * an explicit `@object-ui/types/zod` entry since PR #5156). `ObjectMap.tsx`
43
+ * gets away with the runtime import only because nothing in
44
+ * console-starter's graph reaches `@object-ui/plugin-map` today.
45
+ *
46
+ * Anti-drift is TWO mechanisms, neither of them this comment:
47
+ * - the type below is TOTAL — a `Record` over EVERY `keyof ObjectMapConfig`,
48
+ * not a list of some of them — so a key added to the declaration fails
49
+ * `tsc` here until it is given a flat spelling. A key can no longer be
50
+ * left out by simply not being written down, which is how `style` was.
51
+ * - `ListView.mapFlatten.test.tsx` pins this object's key set against
52
+ * `ObjectMapConfigSchema.shape` — imported only from that TEST file, which
53
+ * the alias-closure walker explicitly excludes from traversal — and asserts
54
+ * the RELATION (every declared key is delivered under its flat spelling).
55
+ * The pre-#9950 pin could not see the omission because it compared the hand
56
+ * list against `shape` MINUS `style`: the set it measured against was
57
+ * narrowed by the same subtraction the defect was made of, so it stayed
58
+ * green while an authored style was being discarded.
59
+ */
60
+ export declare const FLAT_MAP_CONFIG_SPELLING: {
61
+ readonly latitudeField: "latitudeField";
62
+ readonly longitudeField: "longitudeField";
63
+ readonly locationField: "locationField";
64
+ readonly titleField: "titleField";
65
+ readonly descriptionField: "descriptionField";
66
+ readonly zoom: "zoom";
67
+ readonly center: "center";
68
+ readonly style: "mapStyle";
69
+ };
12
70
  /**
13
71
  * The list view's props.
14
72
  *
@@ -50,8 +108,30 @@ export interface ListViewProps {
50
108
  */
51
109
  dataSource?: any;
52
110
  onViewChange?: (view: ViewType) => void;
53
- onFilterChange?: (filters: any) => void;
54
- onSortChange?: (sort: any) => void;
111
+ /**
112
+ * Fires with the advanced-filter group the toolbar's `FilterBuilder` emitted.
113
+ *
114
+ * `FilterGroup` because that is what the one call site actually passes: the
115
+ * builder's own `onChange` value, handed straight through beside
116
+ * `setCurrentFilters` — itself `React.useState<FilterGroup>`. Deliberately NOT
117
+ * the filter AST `normalizeFilters` / `buildEffectiveFilter` speak: those run
118
+ * later, on the query-building path, and nothing they produce reaches this
119
+ * callback. A host receives the BUILDER's group verbatim, which is what lets
120
+ * it round-trip back in through `initialFilters`.
121
+ */
122
+ onFilterChange?: (filters: FilterGroup) => void;
123
+ /**
124
+ * Fires with the view's sort after a builder edit, a header click or a
125
+ * "reset to the view's default".
126
+ *
127
+ * `SortItem[]` because every emit crosses exactly one boundary —
128
+ * `emitSortChange` — and both of its legs carry that element type: the array
129
+ * passed in, and `filterPlatformSortableSort`'s return, which is generic in
130
+ * the element (readonly T[] in, T[] out) and so preserves whatever it is
131
+ * given. Normalized-vs-raw therefore does not move the TYPE here; it only
132
+ * decides whether platform-unsortable entries are still present (#6455).
133
+ */
134
+ onSortChange?: (sort: SortItem[]) => void;
55
135
  onSearchChange?: (search: string) => void;
56
136
  /** Called when the user toggles fields via the Hide Fields popover. */
57
137
  onHiddenFieldsChange?: (hidden: string[]) => void;
@@ -62,8 +142,23 @@ export interface ListViewProps {
62
142
  order?: string[];
63
143
  widths?: Record<string, number>;
64
144
  }) => void;
65
- /** Callback when a row/item is clicked (overrides NavigationConfig) */
66
- onRowClick?: (record: Record<string, unknown>) => void;
145
+ /**
146
+ * Callback when a row/item is clicked (overrides NavigationConfig).
147
+ *
148
+ * TWO parameters since objectui#9357, and the second is not decoration: this
149
+ * prop reaches `useNavigationOverlay` as its `onRowClick`, and `handleClick`
150
+ * invokes it as `onRowClick(record, event)` — the modifier payload a host
151
+ * needs to implement Cmd/Ctrl/middle-click for itself. Declaring one
152
+ * parameter hid the second on the ONE line a host reads. Spelled `any` and
153
+ * not `HandleClickModifiers` for the reason objectui#9341 measured on
154
+ * `ObjectKanbanSchema.onCardClick`: that interface lives in
155
+ * `@object-ui/react`, the published twins in `@object-ui/types` may not name
156
+ * it, and a host that discovered the payload from the implementation
157
+ * annotated it `React.MouseEvent` — which a narrower declaration refuses
158
+ * contravariantly. `BaseSchema`'s own `onClick` / `onChange` / `onSubmit`
159
+ * already use this spelling for exactly this situation.
160
+ */
161
+ onRowClick?: (record: Record<string, unknown>, event?: any) => void;
67
162
  /** Show view type switcher (Grid/Kanban/etc). Default: false (view type is fixed) */
68
163
  showViewSwitcher?: boolean;
69
164
  /** Initial user-filter selections to restore (field → values; `_tab` for the active preset). */
@@ -107,6 +202,28 @@ export interface ListViewProps {
107
202
  * Exported for that test. @internal
108
203
  */
109
204
  export declare function mapOperator(op: string): string;
205
+ /**
206
+ * Opt-in `FilterBuilder` operators the list toolbar offers — deliberately NONE
207
+ * (objectui#4736).
208
+ *
209
+ * `OPT_IN_OPERATORS` in `@object-ui/components` withholds the operator ids that
210
+ * only the MongoDB-style criteria dialect can carry. This toolbar persists into
211
+ * the other two, and into BOTH of them at once:
212
+ *
213
+ * - the array/triplet filter AST, via `mapOperator` above, for the live grid;
214
+ * - `ViewFilterRule[]`, via app-shell's `foldFilterGroupToSpecRules`, when the
215
+ * user saves the panel's group as a view.
216
+ *
217
+ * Neither vocabulary has a case-insensitive contains or an existence operator,
218
+ * so this surface opts into nothing. Named and passed explicitly rather than
219
+ * omitted at the call site: this constant is the handle
220
+ * `list-offered-operator-expressible-parity.test.ts` reads to compute what the
221
+ * toolbar actually offers, and an inline `extraOperators` added later would
222
+ * otherwise widen the dropdown without the parity test noticing.
223
+ *
224
+ * @internal exported for that test
225
+ */
226
+ export declare const LIST_VIEW_EXTRA_OPERATORS: readonly string[];
110
227
  /**
111
228
  * Normalize a single filter condition: convert `in`/not-in operators
112
229
  * into backend-compatible `or`/`and` of equality conditions.
@@ -220,6 +337,24 @@ export declare function convertFilterGroupToAST(group: FilterGroup): any[];
220
337
  */
221
338
  export declare function evaluateConditionalFormatting(record: Record<string, unknown>, rules?: ListViewSchema['conditionalFormatting'], scope?: Record<string, unknown>, fields?: unknown): React.CSSProperties;
222
339
  export declare const LIST_DEFAULT_TRANSLATIONS: Record<string, string>;
340
+ /**
341
+ * The `$top` of the ONE unpaged fetch a list view makes when no usable page
342
+ * size is declared: every view this component does not page on the server
343
+ * (`paginate` is false), which is every kind but the flat grid, plus a grouped
344
+ * grid's window. Those views have no pager, so rows past this number are not
345
+ * reachable at all (`dataLimitReached` says so).
346
+ *
347
+ * A fetch batch, ⛔ not a page size (objectui#9853, ruling 5824040487,
348
+ * structure B): its value is kept, and it does not follow the display default,
349
+ * so no view silently loses reachable records when the protocol's page size
350
+ * moves. A DECLARED `pagination.pageSize` still sizes this fetch, as it always
351
+ * has; only the undeclared fallback is split by kind.
352
+ *
353
+ * Exported for pins that assert "the fetch batch" rather than its value
354
+ * (objectui#9853, ruling record 5909000462); the package index does not
355
+ * re-export it.
356
+ */
357
+ export declare const DEFAULT_LIST_FETCH_BATCH_SIZE = 100;
223
358
  /**
224
359
  * Imperative handle exposed by ListView via React.forwardRef.
225
360
  * Allows parent components to trigger a data refresh programmatically.
@@ -1 +1 @@
1
- {"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../src/ListView.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAwB,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAKhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOvD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,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,GAAG,GAAG;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAoBA;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,EAAE,CAKtD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,OAAO,EACnB,cAAc,EAAE,WAAW,EAC3B,oBAAoB,EAAE,GAAG,EAAE,GAC1B,GAAG,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CASzC;AAUD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,EAAE,CA4EjE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,KAAK,CAAC,EAAE,cAAc,CAAC,uBAAuB,CAAC,EAC/C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,MAAM,CAAC,EAAE,OAAO,GACf,KAAK,CAAC,aAAa,CAErB;AAcD,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkI5D,CAAC;AAsDF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAmFjD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,eAAO,MAAM,QAAQ,sFA2wInB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { ListViewHandle, ListViewProps } from './ListView';
2
+ import { ListViewHandle, ListViewProps } from './ListView.js';
3
3
  /**
4
4
  * Registry entry point for `<ListView>` — two bridges in one component.
5
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ListViewBlock.d.ts","sourceRoot":"","sources":["../src/ListViewBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAqB/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,QAAA,MAAM,aAAa,sFAwBjB,CAAC;AAGH,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"ListViewBlock.d.ts","sourceRoot":"","sources":["../src/ListViewBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAqB/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,QAAA,MAAM,aAAa,sFA0BhB,CAAC;AAGJ,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,29 +1,41 @@
1
1
  import { default as React } from 'react';
2
- import { GalleryConfig, ViewNavigationConfig, GroupingConfig } from '@object-ui/types';
2
+ import { DataSource, ObjectGallerySchema } from '@object-ui/types';
3
3
  export interface ObjectGalleryProps {
4
- schema: {
5
- objectName?: string;
6
- bind?: string;
7
- filter?: unknown;
8
- data?: Record<string, unknown>[];
9
- className?: string;
10
- gallery?: GalleryConfig;
11
- /** Navigation config for item click behavior */
12
- navigation?: ViewNavigationConfig;
13
- /** Grouping configuration for sectioned display */
14
- grouping?: GroupingConfig;
15
- /** @deprecated Use gallery.coverField instead */
16
- imageField?: string;
17
- /** @deprecated Use gallery.titleField instead */
18
- titleField?: string;
19
- };
4
+ /**
5
+ * The `object-gallery` node — anchored to the exported schema type
6
+ * (objectui#6576). Every `BaseSchema` member is writable, `bind` and
7
+ * `className` included; the widget's own keys are declared there.
8
+ */
9
+ schema: ObjectGallerySchema;
20
10
  data?: Record<string, unknown>[];
21
- dataSource?: {
22
- find: (name: string, query: unknown) => Promise<unknown>;
23
- };
24
- onCardClick?: (record: Record<string, unknown>) => void;
25
- /** Callback when a row/item is clicked (overrides NavigationConfig) */
26
- onRowClick?: (record: Record<string, unknown>) => void;
11
+ /**
12
+ * The host's adapter. Declared as the published `DataSource` contract
13
+ * (objectui#7912) — this used to be a hand-rolled `{ find(name, query:
14
+ * unknown): Promise<unknown> }` stand-in, which is a second, weaker
15
+ * spelling of a type this repo already publishes: it accepted any object
16
+ * with a `find`, and it erased `find`'s real parameter and return types at
17
+ * every call below.
18
+ */
19
+ dataSource?: DataSource;
20
+ /** The other arm of the same `??` that feeds the hook — see `onRowClick` below (objectui#9357). */
21
+ onCardClick?: (record: Record<string, unknown>, event?: any) => void;
22
+ /**
23
+ * Callback when a row/item is clicked (overrides NavigationConfig).
24
+ *
25
+ * TWO parameters since objectui#9357, and the second is not decoration: this
26
+ * prop reaches `useNavigationOverlay` as its `onRowClick`, and `handleClick`
27
+ * invokes it as `onRowClick(record, event)` — the modifier payload a host
28
+ * needs to implement Cmd/Ctrl/middle-click for itself. Declaring one
29
+ * parameter hid the second on the ONE line a host reads. Spelled `any` and
30
+ * not `HandleClickModifiers` for the reason objectui#9341 measured on
31
+ * `ObjectKanbanSchema.onCardClick`: that interface lives in
32
+ * `@object-ui/react`, the published twins in `@object-ui/types` may not name
33
+ * it, and a host that discovered the payload from the implementation
34
+ * annotated it `React.MouseEvent` — which a narrower declaration refuses
35
+ * contravariantly. `BaseSchema`'s own `onClick` / `onChange` / `onSubmit`
36
+ * already use this spelling for exactly this situation.
37
+ */
38
+ onRowClick?: (record: Record<string, unknown>, event?: any) => void;
27
39
  }
28
40
  export declare const ObjectGallery: React.FC<ObjectGalleryPro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AAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+XtD,CAAC"}
1
+ {"version":3,"file":"ObjectGallery.d.ts","sourceRoot":"","sources":["../src/ObjectGallery.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAgE,MAAM,OAAO,CAAC;AAKrF,OAAO,KAAK,EAAE,UAAU,EAAiB,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAIpG,MAAM,WAAW,kBAAkB;IAC/B;;;;OAIG;IACH,MAAM,EAAE,mBAAmB,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACjC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,mGAAmG;IACnG,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IACrE;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACvE;AA2LD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAslBtD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserFilters.d.ts","sourceRoot":"","sources":["../src/UserFilters.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAuCvD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,cAAc,GAAG,OAAO,GAAG,MAAM,CAMpG,CAAC;AAEF,MAAM,WAAW,gBAA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C;IACnD,wDAAwD;IACxD,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,wCAAwC;IACxC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,yCAAyC;IACzC,cAAc,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACzC,gGAAgG;IAChG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IACrE;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC;CAC7F;AA6ED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,SAAS,EACT,IAAS,EACT,cAAc,EACd,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,kBAAkB,GACnB,EAAE,gBAAgB,4BA+ClB"}
@@ -1,3 +1,4 @@
1
+ import { ListViewVisualization } from '@object-ui/core';
1
2
  /**
2
3
  * ObjectUI
3
4
  * Copyright (c) 2024-present ObjectStack Inc.
@@ -6,7 +7,28 @@
6
7
  * LICENSE file in the root directory of this source tree.
7
8
  */
8
9
  import * as React from 'react';
9
- export type ViewType = 'grid' | 'kanban' | 'gallery' | 'calendar' | 'timeline' | 'gantt' | 'map' | 'chart' | 'tree';
10
+ /**
11
+ * The visualizations this switcher offers.
12
+ *
13
+ * DERIVED from `@object-ui/core`'s {@link ListViewVisualization} (`ca3942729`),
14
+ * which derives from `@objectstack/spec/ui` through `@object-ui/types`' `ViewType`.
15
+ *
16
+ * This nine-arm union was written out by hand here, and that is a THIRD
17
+ * re-declaration of one vocabulary — the card behind `ca3942729` was filed against the two in
18
+ * `@object-ui/types`, and the maps below were described there as total over the
19
+ * shared union when they were in fact total over this private copy. A map that
20
+ * is total over a copy is exactly as incomplete as the copy, so the two
21
+ * `Record<ViewType, …>` below only became honest guards once this alias
22
+ * replaced the copy: the next visualization the spec adds now fails the build
23
+ * in both of them.
24
+ *
25
+ * Exported unchanged in membership — this is the same nine names it always
26
+ * carried. `page` is deliberately NOT among them: the spec models it as a list
27
+ * view that mounts a published page rather than a visualization a user switches
28
+ * into, and `AppearanceConfig.allowedVisualizations` excludes it for the same
29
+ * reason.
30
+ */
31
+ export type ViewType = ListViewVisualization;
10
32
  export interface ViewSwitcherProps {
11
33
  currentView: ViewType;
12
34
  availableViews?: ViewType[];
@@ -1 +1 @@
1
- {"version":3,"file":"ViewSwitcher.d.ts","sourceRoot":"","sources":["../src/ViewSwitcher.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,QAAQ,GACR,SAAS,GACT,UAAU,GACV,UAAU,GACV,OAAO,GACP,KAAK,GACL,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC5B,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuFD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA0G5D,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwDpD,CAAC"}
1
+ {"version":3,"file":"ViewSwitcher.d.ts","sourceRoot":"","sources":["../src/ViewSwitcher.tsx"],"names":[],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AAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA6DxC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAsE9C,CAAC"}
1
+ {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/components/TabBar.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAqDD;;;;GAIG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA6DxC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAsE9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ViewSettingsPopover.d.ts","sourceRoot":"","sources":["../../src/components/ViewSettingsPopover.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoB/B,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;IAC7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,uFAAuF;IACvF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AA8CD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,qBAwNlE"}
package/dist/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
- import { ListView } from './ListView';
2
- import { ListViewBlock } from './ListViewBlock';
3
- import { ViewSwitcher } from './ViewSwitcher';
4
- import { ObjectGallery } from './ObjectGallery';
1
+ import { ListView } from './ListView.js';
2
+ import { ListViewBlock } from './ListViewBlock.js';
3
+ import { ViewSwitcher } from './ViewSwitcher.js';
4
+ import { ObjectGallery } from './ObjectGallery.js';
5
5
  export { ListView, ListViewBlock, ViewSwitcher, ObjectGallery };
6
- export { ViewSwitcherDropdown } from './ViewSwitcher';
7
- export { TabBar, TabBarSelect } from './components/TabBar';
8
- export type { TabBarProps, ViewTab } from './components/TabBar';
9
- export { UserFilters } from './UserFilters';
10
- export type { UserFiltersProps } from './UserFilters';
11
- export { evaluateConditionalFormatting, normalizeFilterCondition, normalizeFilters } from './ListView';
12
- export { LIST_DEFAULT_TRANSLATIONS } from './ListView';
13
- export type { ListViewProps, ListViewHandle } from './ListView';
14
- export type { ObjectGalleryProps } from './ObjectGallery';
15
- export type { ViewSwitcherProps, ViewType } from './ViewSwitcher';
6
+ export { ViewSwitcherDropdown } from './ViewSwitcher.js';
7
+ export { TabBar, TabBarSelect } from './components/TabBar.js';
8
+ export type { TabBarProps, ViewTab } from './components/TabBar.js';
9
+ export { UserFilters } from './UserFilters.js';
10
+ export type { UserFiltersProps } from './UserFilters.js';
11
+ export { evaluateConditionalFormatting, normalizeFilterCondition, normalizeFilters } from './ListView.js';
12
+ export { LIST_DEFAULT_TRANSLATIONS } from './ListView.js';
13
+ export type { ListViewProps, ListViewHandle } from './ListView.js';
14
+ export type { ObjectGalleryProps } from './ObjectGallery.js';
15
+ export type { ViewSwitcherProps, ViewType } from './ViewSwitcher.js';
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGvG,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAChE,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAA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