@object-ui/plugin-list 16.1.0 → 17.1.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/CHANGELOG.md +688 -0
- package/README.md +29 -6
- package/dist/ListView.d.ts +53 -1
- package/dist/ListView.d.ts.map +1 -1
- package/dist/ObjectGallery.d.ts +0 -1
- package/dist/ObjectGallery.d.ts.map +1 -1
- package/dist/UserFilters.d.ts +17 -0
- package/dist/UserFilters.d.ts.map +1 -1
- package/dist/index.js +1349 -1142
- package/dist/index.umd.cjs +3 -3
- package/package.json +18 -17
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ function ContactsView() {
|
|
|
53
53
|
type: 'list-view',
|
|
54
54
|
objectName: 'contacts',
|
|
55
55
|
viewType: 'grid',
|
|
56
|
-
|
|
56
|
+
columns: ['name', 'email', 'phone', 'company'],
|
|
57
57
|
sort: [{ field: 'name', order: 'asc' }],
|
|
58
58
|
}}
|
|
59
59
|
/>
|
|
@@ -73,7 +73,7 @@ are supported on the schema:
|
|
|
73
73
|
type: 'list-view',
|
|
74
74
|
objectName: 'tasks',
|
|
75
75
|
viewType: 'grid',
|
|
76
|
-
|
|
76
|
+
columns: ['title', 'status', 'assignee'],
|
|
77
77
|
grouping: {
|
|
78
78
|
fields: [
|
|
79
79
|
{ field: 'status', order: 'asc', collapsed: false },
|
|
@@ -90,7 +90,7 @@ are supported on the schema:
|
|
|
90
90
|
type: 'list-view',
|
|
91
91
|
objectName: 'tasks',
|
|
92
92
|
viewType: 'grid',
|
|
93
|
-
|
|
93
|
+
columns: ['title', 'status'],
|
|
94
94
|
groupBy: 'status',
|
|
95
95
|
}}
|
|
96
96
|
/>
|
|
@@ -107,7 +107,7 @@ grouping fields at runtime via the Group toolbar button.
|
|
|
107
107
|
type: 'list-view',
|
|
108
108
|
objectName: 'deals',
|
|
109
109
|
viewType: 'kanban',
|
|
110
|
-
|
|
110
|
+
columns: ['name', 'amount', 'stage', 'close_date'],
|
|
111
111
|
options: {
|
|
112
112
|
kanban: {
|
|
113
113
|
groupField: 'stage',
|
|
@@ -134,7 +134,7 @@ grouping fields at runtime via the Group toolbar button.
|
|
|
134
134
|
schema={{
|
|
135
135
|
type: 'list-view',
|
|
136
136
|
objectName: 'tasks',
|
|
137
|
-
|
|
137
|
+
columns: ['title', 'status', 'priority'],
|
|
138
138
|
}}
|
|
139
139
|
onViewChange={(view) => console.log('View changed to:', view)}
|
|
140
140
|
onSearchChange={(search) => console.log('Search:', search)}
|
|
@@ -152,7 +152,10 @@ interface ListViewSchema {
|
|
|
152
152
|
type: 'list-view';
|
|
153
153
|
objectName: string;
|
|
154
154
|
viewType?: 'grid' | 'kanban' | 'calendar' | 'gantt' | 'map' | 'chart';
|
|
155
|
-
fields
|
|
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[];
|
|
156
159
|
filters?: Array<any[] | string>;
|
|
157
160
|
sort?: Array<{ field: string; order: 'asc' | 'desc' }>;
|
|
158
161
|
options?: {
|
|
@@ -177,6 +180,26 @@ interface ListViewSchema {
|
|
|
177
180
|
}
|
|
178
181
|
```
|
|
179
182
|
|
|
183
|
+
## Sorting (and why relational columns are not offered)
|
|
184
|
+
|
|
185
|
+
The toolbar sort becomes a server `$orderby` on the **flat field name**, so the
|
|
186
|
+
sort key is whatever that field stores. For a relational field
|
|
187
|
+
(`lookup` / `master_detail` / `user` / `tree`) that is the foreign-key **id**,
|
|
188
|
+
while the column shows the related record's name — the rows would come back in
|
|
189
|
+
an order with no visible relation to the column ("sorting is broken", from the
|
|
190
|
+
user's side). The server cannot order by the related name without a join, and
|
|
191
|
+
`objectstack#4256` settled that it will not add one.
|
|
192
|
+
|
|
193
|
+
So the sort picker withholds relational fields and says so. To sort by a related
|
|
194
|
+
record's name, denormalize it onto this object with a **formula field** and sort
|
|
195
|
+
that column like any other text column. A relational field that the view's
|
|
196
|
+
CURRENT sort already uses stays listed, labelled `(by ID)`, so existing view
|
|
197
|
+
metadata round-trips instead of silently losing its sort.
|
|
198
|
+
|
|
199
|
+
Column-header sorting inside the grid is unaffected: it is client-side over the
|
|
200
|
+
rows already loaded, where the label the cell shows IS available, so it orders by
|
|
201
|
+
that label (see `getSortValue` in `@object-ui/core`).
|
|
202
|
+
|
|
180
203
|
## View Persistence
|
|
181
204
|
|
|
182
205
|
The ListView automatically persists the user's view type preference in localStorage using the key `listview-{objectName}-view`.
|
package/dist/ListView.d.ts
CHANGED
|
@@ -45,7 +45,19 @@ export interface ListViewProps {
|
|
|
45
45
|
[key: string]: any;
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Filter-builder / view operator → filter-AST operator.
|
|
49
|
+
*
|
|
50
|
+
* Every value returned must be a member of the spec's `VALID_AST_OPERATORS`
|
|
51
|
+
* (`@objectstack/spec/data`). That set gates `isFilterAST()`, and a filter it
|
|
52
|
+
* rejects is passed through unconverted and then silently DROPPED by driver-sql
|
|
53
|
+
* — an unfiltered result set with no error (objectstack#3948). Pinned by
|
|
54
|
+
* `filter-operator-ast-parity.test.ts`.
|
|
55
|
+
*
|
|
56
|
+
* Exported for that test. @internal
|
|
57
|
+
*/
|
|
58
|
+
export declare function mapOperator(op: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* Normalize a single filter condition: convert `in`/not-in operators
|
|
49
61
|
* into backend-compatible `or`/`and` of equality conditions.
|
|
50
62
|
* E.g., ['status', 'in', ['a','b']] → ['or', ['status','=','a'], ['status','=','b']]
|
|
51
63
|
*/
|
|
@@ -63,11 +75,51 @@ export declare function normalizeFilterCondition(condition: any[]): any[];
|
|
|
63
75
|
* list (spec/renderer shape-mismatch audit, objectui#2578 follow-up).
|
|
64
76
|
*/
|
|
65
77
|
export declare function parseSortConfig(sort: unknown): SortItem[];
|
|
78
|
+
/**
|
|
79
|
+
* Resolve the spec `AddRecordConfigSchema.position` (`ui/view.zod.ts`:
|
|
80
|
+
* `top | bottom | both`) to the two render slots. A binary ternary used to
|
|
81
|
+
* collapse `both` to `top`, so the bottom button never rendered (#2941).
|
|
82
|
+
*
|
|
83
|
+
* An absent or unrecognized value keeps this renderer's historical `top`
|
|
84
|
+
* placement. (The spec's own default is `bottom`; spec-parsed metadata
|
|
85
|
+
* arrives with it materialized, but raw stored JSON predating the spec
|
|
86
|
+
* default relied on `top` — moving it is a UX change out of scope here.)
|
|
87
|
+
*
|
|
88
|
+
* Exported for the spec-parity test, which fails the moment the spec's
|
|
89
|
+
* position vocabulary and this mapping drift in either direction.
|
|
90
|
+
*/
|
|
91
|
+
export declare function resolveAddRecordPlacement(position: unknown): {
|
|
92
|
+
top: boolean;
|
|
93
|
+
bottom: boolean;
|
|
94
|
+
};
|
|
66
95
|
/**
|
|
67
96
|
* Normalize an array of filter conditions, expanding `in`/`not in` operators
|
|
68
97
|
* and ensuring consistent AST structure.
|
|
69
98
|
*/
|
|
70
99
|
export declare function normalizeFilters(filters: any[]): any[];
|
|
100
|
+
/**
|
|
101
|
+
* Merge the three filter sources a list can have — the view's own `filter`, the
|
|
102
|
+
* filter-panel group, and the per-field user filters — into one AST node.
|
|
103
|
+
*
|
|
104
|
+
* ONE definition on purpose. The data fetch and the export used to carry
|
|
105
|
+
* verbatim copies of this, and those two decide, respectively, **what the user
|
|
106
|
+
* sees** and **what they download**. Two copies that must agree, where a
|
|
107
|
+
* divergence is a file that silently disagrees with the screen — the same shape
|
|
108
|
+
* of bug that had already bitten the adapter, whose duplicated filter-shape
|
|
109
|
+
* check drifted apart unnoticed (#3072).
|
|
110
|
+
*
|
|
111
|
+
* Returns `undefined` when nothing is active, so callers can skip `$filter`
|
|
112
|
+
* entirely rather than sending an empty array.
|
|
113
|
+
*
|
|
114
|
+
* A MongoDB-style object `schema.filter` used to be dropped here (`.length` is
|
|
115
|
+
* `undefined` on an object, so the guard read false) and the list returned every
|
|
116
|
+
* record. An earlier version of this comment called that unreachable, on the
|
|
117
|
+
* grounds that nothing in the repo hands a list view an object filter. That was
|
|
118
|
+
* wrong: `ObjectView` passes `mergedFilters` straight into this schema's
|
|
119
|
+
* `filter`, and its last fallback is `table.defaultFilters`, declared
|
|
120
|
+
* `Record<string, any>`. `toFilterNode` now converts it instead.
|
|
121
|
+
*/
|
|
122
|
+
export declare function buildEffectiveFilter(baseFilter: unknown, currentFilters: FilterGroup, userFilterConditions: any[]): any[] | Record<string, any> | undefined;
|
|
71
123
|
export declare function convertFilterGroupToAST(group: FilterGroup): any[];
|
|
72
124
|
/**
|
|
73
125
|
* Evaluate conditional formatting rules against a record.
|
package/dist/ListView.d.ts.map
CHANGED
|
@@ -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,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACxC,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,uEAAuE;IACvE,oBA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AAa,CAErB;AAmID;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,eAAO,MAAM,QAAQ,mGA82EnB,CAAC"}
|
package/dist/ObjectGallery.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectGallery.d.ts","sourceRoot":"","sources":["../src/ObjectGallery.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAgE,MAAM,OAAO,CAAC;AAIrF,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAI5F,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;QACjC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,aAAa,CAAC;QACxB,gDAAgD;QAChD,UAAU,CAAC,EAAE,oBAAoB,CAAC;QAClC,mDAAmD;QACnD,QAAQ,CAAC,EAAE,cAAc,CAAC;QAC1B,iDAAiD;QACjD,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,iDAAiD;QACjD,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ObjectGallery.d.ts","sourceRoot":"","sources":["../src/ObjectGallery.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAgE,MAAM,OAAO,CAAC;AAIrF,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAI5F,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;QACjC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,aAAa,CAAC;QACxB,gDAAgD;QAChD,UAAU,CAAC,EAAE,oBAAoB,CAAC;QAClC,mDAAmD;QACnD,QAAQ,CAAC,EAAE,cAAc,CAAC;QAC1B,iDAAiD;QACjD,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,iDAAiD;QACjD,UAAU,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,CAAC;IAC1E,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACxD,uEAAuE;IACvE,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAC1D;AAuJD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2XtD,CAAC"}
|
package/dist/UserFilters.d.ts
CHANGED
|
@@ -7,6 +7,23 @@ import { ListViewSchema } from '@object-ui/types';
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Control kind for every filter control type the spec's
|
|
12
|
+
* `UserFilterFieldSchema.type` (`ui/view.zod.ts`) publishes:
|
|
13
|
+
*
|
|
14
|
+
* - the enum names BOTH `select` and `multi-select`, so `select` necessarily
|
|
15
|
+
* means single-choice — rendering it as accumulating checkboxes made a
|
|
16
|
+
* single-choice filter silently accept many values (#2941);
|
|
17
|
+
* - `date-range` and `text` used to be dead controls — the chip rendered and
|
|
18
|
+
* the popover said the literal "No options" (#2942). They now render a
|
|
19
|
+
* from/to date pair and a search input.
|
|
20
|
+
*
|
|
21
|
+
* Applies to the AUTHORED `type` only: when the author omits it, the control
|
|
22
|
+
* is inferred from the field definition and keeps the historical multi-check
|
|
23
|
+
* UX. Exported for the spec-parity test, which fails the moment the spec's
|
|
24
|
+
* vocabulary and this table drift in either direction.
|
|
25
|
+
*/
|
|
26
|
+
export declare const FILTER_CONTROL_KINDS: Record<string, 'single-choice' | 'multi-choice' | 'range' | 'text'>;
|
|
10
27
|
export interface UserFiltersProps {
|
|
11
28
|
config: NonNullable<ListViewSchema['userFilters']>;
|
|
12
29
|
/** Object definition for auto-deriving field options */
|
|
@@ -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;AAsCvD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,WAAW,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC;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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