@object-ui/plugin-list 17.1.0 → 17.2.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 +170 -0
- package/dist/ListView.d.ts.map +1 -1
- package/dist/components/TabBar.d.ts +24 -11
- package/dist/components/TabBar.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1045 -1038
- package/dist/index.umd.cjs +3 -3
- package/package.json +19 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,175 @@
|
|
|
1
1
|
# @object-ui/plugin-list
|
|
2
2
|
|
|
3
|
+
## 17.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c5ccbd5: Stop declaring 12 `@object-ui/data-objectstack` / `@object-ui/plugin-chatbot` /
|
|
8
|
+
`@object-ui/plugin-list` symbols under names `@objectstack/spec` owns
|
|
9
|
+
(objectui#3160, objectstack#4115 batch 6). All three packages leave the ledger.
|
|
10
|
+
|
|
11
|
+
**Breaking for importers of `@object-ui/data-objectstack`** — four exported
|
|
12
|
+
names changed, because the spec exports the same name for a _different_ thing:
|
|
13
|
+
|
|
14
|
+
| was | now | what the spec's same-named export actually is |
|
|
15
|
+
| :-------------------- | :-------------------------- | :--------------------------------------------------------------------------------------- |
|
|
16
|
+
| `CacheStats` | `MetadataCacheStats` | the platform `ICacheService` counters (`keyCount`, `memoryUsage`) |
|
|
17
|
+
| `MetadataSaveOptions` | `MetadataClientSaveOptions` | options for writing a metadata item to a **file** (`format`, `path`, `indent`, `atomic`) |
|
|
18
|
+
| `SecurityPolicy` | `SecurityManagerPolicy` | the package supply-chain policy (`autoScan`, licences, code signing, sandbox) |
|
|
19
|
+
| `ValidationError` | `DataApiValidationError` | a plain `{ field, message, code? }` entry in a validation report |
|
|
20
|
+
|
|
21
|
+
Each pair is disjoint or nearly so — `MetadataSaveOptions` and `SecurityPolicy`
|
|
22
|
+
share not one key with the spec type whose name they wore — so none of them was
|
|
23
|
+
a dialect to reconcile; they were four unrelated concepts squatting on spec
|
|
24
|
+
names. `DataApiValidationError` follows the `<what was validated>Validation<Error|Result>`
|
|
25
|
+
convention registered on objectstack#4115 (`@object-ui/core` took
|
|
26
|
+
`SchemaNodeValidationError` in batch 4). Its **runtime** `name` deliberately
|
|
27
|
+
stays `'ValidationError'`: `normaliseClientError` and `@object-ui/react`'s
|
|
28
|
+
error-message helper both sniff `err.name`, so that string is a wire contract,
|
|
29
|
+
not a symbol.
|
|
30
|
+
|
|
31
|
+
**Breaking for importers of `@object-ui/plugin-chatbot`** — `PendingActionRow`
|
|
32
|
+
and `PendingActionStatus` are now re-exported from `@objectstack/spec/contracts`
|
|
33
|
+
instead of hand-transcribed, which narrows them. The copies had drifted three
|
|
34
|
+
ways, and each drift had **disabled a compile-time check** rather than merely
|
|
35
|
+
differed from one:
|
|
36
|
+
|
|
37
|
+
- `status: PendingActionStatus | string` — a union with `string` absorbs the
|
|
38
|
+
literals, so that annotation carried no information at all;
|
|
39
|
+
- `[key: string]: unknown` — the objectstack#4075 mechanism: an index signature
|
|
40
|
+
makes every structural comparison against the spec answer "identical", however
|
|
41
|
+
far the copy has drifted;
|
|
42
|
+
- `created_at` / `updated_at`, which the service contract does not carry and no
|
|
43
|
+
consumer in this repo reads.
|
|
44
|
+
|
|
45
|
+
**Breaking for importers of `@object-ui/plugin-list`** — `ViewTab` is derived from the spec's `ViewTabSchema`
|
|
46
|
+
— from its **input** side, because `pinned` / `isDefault` / `visible` carry
|
|
47
|
+
`.default()`s and this component is handed authored metadata, not parsed output.
|
|
48
|
+
That removes a renderer-side tolerance the copy carried: `visible` accepted
|
|
49
|
+
`string | boolean` and the tab bar compared it against the literal `'false'`, a
|
|
50
|
+
spelling no producer emits. `label` also stops being required (the spec makes it
|
|
51
|
+
optional; `name` is the identifier) and `filter` stops being `any`.
|
|
52
|
+
|
|
53
|
+
`ListView` and `UserFilters` keep their names as declared dialects: both are the
|
|
54
|
+
React **renderers** of the spec types whose names they share, and each takes that
|
|
55
|
+
spec type as a prop (`ListViewProps.schema`, `UserFiltersProps.config`) rather
|
|
56
|
+
than restating its shape. `Tool` and `MessageContent` in `plugin-chatbot` are
|
|
57
|
+
vendored Vercel AI Elements / Shadcn primitives — upstream's component API, not
|
|
58
|
+
objectui's authored surface — so the guard now skips that directory the same way
|
|
59
|
+
it already skips `components/src/ui/`, with a test that fails if any file there
|
|
60
|
+
stops carrying its vendor banner.
|
|
61
|
+
|
|
62
|
+
Scored `minor`, not `major`, per this repo's fixed-group rule — objectui's major
|
|
63
|
+
tracks `@objectstack`, so breaking changes of our own ship as minor with the
|
|
64
|
+
semantics spelled out above (see AGENTS.md §版本号策略). A `major` here would carry
|
|
65
|
+
all 39 packages of the fixed group to `18.0.0` and off objectstack's 17.x line.
|
|
66
|
+
|
|
67
|
+
- 5cb75b3: fix(timeline,list): the timeline honours `timeline.dateField`, not just `timeline.startDateField` (#3129)
|
|
68
|
+
|
|
69
|
+
`dateField` is the pre-#2231 alias for `startDateField`. `@object-ui/types`
|
|
70
|
+
declares it on the nested config (`ListViewTimelineConfig`), and both
|
|
71
|
+
`ObjectView` read-sites (app-shell and plugin-view) resolve it — but the two
|
|
72
|
+
read-sites that actually drive the axis did not:
|
|
73
|
+
|
|
74
|
+
- `ObjectTimeline` consulted the alias only on the FLAT prop (`schema.dateField`),
|
|
75
|
+
never on the nested `schema.timeline`.
|
|
76
|
+
- `ListView` resolved it out of `options.timeline` but not out of the
|
|
77
|
+
spec-canonical `schema.timeline` — including in the capability gate, so such a
|
|
78
|
+
view could fail to offer the Timeline option at all.
|
|
79
|
+
|
|
80
|
+
So a view authored as `timeline: { dateField: 'start_date' }` — the spec nesting
|
|
81
|
+
with the legacy key — fell through to the caller's default (`created_at` /
|
|
82
|
+
`due_date`). That field is normally absent from the `$select` projection, so
|
|
83
|
+
every record came back without it and the timeline rendered all of them under
|
|
84
|
+
**No date** — while the configured date was sitting in the row untouched. That
|
|
85
|
+
also explains why widening the view's projection changed nothing: the projection
|
|
86
|
+
already carried the right field; the renderer was reading a different one.
|
|
87
|
+
|
|
88
|
+
Both read-sites now resolve the alias in the same precedence position they
|
|
89
|
+
already use for `options.timeline.dateField`. The spec key still wins wherever
|
|
90
|
+
both appear. Observable rendering change (records move out of "No date" into
|
|
91
|
+
real date buckets), hence `minor`.
|
|
92
|
+
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- 335041c: Stop declaring 13 `@object-ui/core` symbols under names `@objectstack/spec` owns
|
|
96
|
+
(objectui#3158, objectstack#4115 batch 4).
|
|
97
|
+
|
|
98
|
+
**Breaking for importers of `@object-ui/core`** — seven exported names changed,
|
|
99
|
+
because the spec exports the same name for a _different_ thing:
|
|
100
|
+
|
|
101
|
+
| was | now | what the spec's same-named export actually is |
|
|
102
|
+
| :----------------------- | :-------------------------------- | :--------------------------------------------------------------------------- |
|
|
103
|
+
| `ChartSeries` | `ChartSeriesBinding` | the authored dataset-binding descriptor (a measure `name`, no `data`) |
|
|
104
|
+
| `ActionHandler` | `ActionRunnerHandler` | the SERVER-side objectql handler, `(ctx) => unknown` |
|
|
105
|
+
| `PluginDefinition` | `RegistryPluginDefinition` | the platform PACKAGE manifest (`id`/`slug`/`staticPath`/install hooks) |
|
|
106
|
+
| `ValidationError` | `SchemaNodeValidationError` | plugin-manifest validation, keyed by `field`, no severity |
|
|
107
|
+
| `ValidationResult` | `SchemaNodeValidationResult` | ditto, with both arrays optional |
|
|
108
|
+
| `defineView` | `defineSystemView` | the VIEW-DOCUMENT factory: parses a `ViewSchema`, returns a validated `View` |
|
|
109
|
+
| `resolveCrudAffordances` | `resolveEffectiveCrudAffordances` | the object-level affordance matrix, with no notion of server API operations |
|
|
110
|
+
|
|
111
|
+
The other six keep their names and are now **imported from the spec** instead of
|
|
112
|
+
re-declared: `StyleMap`, `ResponsiveStyles` (ADR-0065), `RowHeight`,
|
|
113
|
+
`CONTEXT_TOKENS`, `CrudAffordances`, `RowCrudPredicates`.
|
|
114
|
+
|
|
115
|
+
**The copies were live misdescriptions, not just duplicates.** Three said so in
|
|
116
|
+
their own comments:
|
|
117
|
+
|
|
118
|
+
- `CONTEXT_TOKENS` carried a note that the duplication was "temporary until the
|
|
119
|
+
next coordinated release… because the installed `@objectstack/spec` predates
|
|
120
|
+
that export". The installed spec (17.0.0-rc.0) exports it, and the copy was
|
|
121
|
+
byte-identical — so it passed every value comparison and every behavioural
|
|
122
|
+
test for the whole interval in which its stated reason was false.
|
|
123
|
+
- `RowHeight` advertised itself as "the spec's `RowHeightSchema` vocabulary"
|
|
124
|
+
while being a hand-written union. It happened to be correct; nothing would
|
|
125
|
+
have caught the day it stopped being.
|
|
126
|
+
- `managedBy.ts` described itself as a "UI-side mirror of the framework's
|
|
127
|
+
`resolveCrudAffordances()`" and carried its own `DEFAULTS` table — a
|
|
128
|
+
line-for-line copy of the spec's `CRUD_AFFORDANCE_DEFAULTS`, plus a copy of
|
|
129
|
+
its override parser.
|
|
130
|
+
|
|
131
|
+
`resolveEffectiveCrudAffordances` now **delegates** the bucket/`userActions` half
|
|
132
|
+
to the spec's `resolveCrudAffordances()`, so the bucket table has exactly one
|
|
133
|
+
definition on the platform. What stays objectui's is the part the spec has no
|
|
134
|
+
notion of: intersecting that matrix with the server-resolved effective API
|
|
135
|
+
operation set (#3391), so the UI never offers a button the server would 405 —
|
|
136
|
+
and the name now says that instead of claiming to be the spec's function.
|
|
137
|
+
|
|
138
|
+
Deriving `RowCrudPredicates` also **tightens** it: the local copy typed
|
|
139
|
+
`visibleWhen`/`disabledWhen` as `unknown`, where the spec types them as
|
|
140
|
+
`Expression | ExpressionInput`. That was imprecision, not a deliberate dialect.
|
|
141
|
+
|
|
142
|
+
- 5eaa861: `list-view` and `embeddable-form` get a data source on the registry path — their required `objectName` was binding to nothing (#3144).
|
|
143
|
+
|
|
144
|
+
`SchemaRenderer` puts the data source on `SchemaRendererContext` and **never** injects it into
|
|
145
|
+
component props. A component that reads `props.dataSource` therefore needs its registration to
|
|
146
|
+
bridge the two. `object-form`, `object-kanban` and `object-calendar` each register a small
|
|
147
|
+
renderer that does exactly that. These two did not:
|
|
148
|
+
|
|
149
|
+
- `list-view` (and its `view:list` alias) registered the bare `ListView`, which reads
|
|
150
|
+
`props.dataSource` — so its `getObjectSchema` effect returned immediately, nothing was ever
|
|
151
|
+
fetched, and it rendered the `empty-state` "Nothing here".
|
|
152
|
+
- `embeddable-form`'s renderer was `({ schema }) => <EmbeddableForm config={schema} />`, dropping
|
|
153
|
+
the context entirely — so the read-only source it derives for its inner `ObjectForm` was never
|
|
154
|
+
built, and its submit path (`if (dataSource) await dataSource.create(...)`) had nothing to call.
|
|
155
|
+
|
|
156
|
+
Both declare `objectName` **required** in their registry `inputs`. A binding the protocol obliges
|
|
157
|
+
an author to supply, that nothing on that path can consume, is objectstack#4413's shape one layer
|
|
158
|
+
up — and the reason it went unnoticed is that the console never takes this path: it reaches
|
|
159
|
+
ListView through `ObjectView`'s `renderListView` render-prop, which passes a data source itself.
|
|
160
|
+
Broken on the registry/SDUI path, which is the path `sdui.manifest.json` describes and a
|
|
161
|
+
`kind:'react'` page walks.
|
|
162
|
+
|
|
163
|
+
Found by `apps/console/src/__tests__/public-block-binding-reach.test.tsx` (objectstack#4472), not
|
|
164
|
+
by hand — that suite mounts every public block declaring an `objectName` under a recording
|
|
165
|
+
`dataSource` and asserts the binding arrives. Its ledger carried these two as named debt; with the
|
|
166
|
+
bridge in place the ledger's both-directions assertion **failed until the entries were deleted**,
|
|
167
|
+
which is the mechanism working as designed. Only `record:related_list` remains, and legitimately
|
|
168
|
+
(it needs a parent record id from `RecordContext` before it may fetch).
|
|
169
|
+
|
|
170
|
+
An explicit `dataSource` prop still wins, so hosts passing their own are unaffected, and
|
|
171
|
+
`ListViewRenderer` forwards refs so `ListViewHandle` still works through the registry.
|
|
172
|
+
|
|
3
173
|
## 17.1.0
|
|
4
174
|
|
|
5
175
|
### Minor Changes
|
package/dist/ListView.d.ts.map
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C,QAAQ,EAAE,OAAO,GAAG;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAU9F;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;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,EAAE,CA0BjE;AAED;;;;;;;;;;;;;;;GAeG;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,GAC9B,KAAK,CAAC,aAAa,CAErB;AAmID;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,eAAO,MAAM,QAAQ,mGAk3EnB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ViewTabSchema } from '@objectstack/spec/ui';
|
|
1
2
|
/**
|
|
2
3
|
* ObjectUI
|
|
3
4
|
* Copyright (c) 2024-present ObjectStack Inc.
|
|
@@ -6,17 +7,29 @@
|
|
|
6
7
|
* LICENSE file in the root directory of this source tree.
|
|
7
8
|
*/
|
|
8
9
|
import * as React from 'react';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
/**
|
|
11
|
+
* One tab in a multi-tab list view — derived from the spec's `ViewTabSchema`
|
|
12
|
+
* (objectui#3160, objectstack#4115 ledger batch 6).
|
|
13
|
+
*
|
|
14
|
+
* Until then this was a hand copy wearing the spec's own name, drifted in three
|
|
15
|
+
* places: `label` was REQUIRED (the spec makes it optional — `name` is the
|
|
16
|
+
* identifier), `filter` was `any` (the spec models `ViewFilterRule[]`, so a
|
|
17
|
+
* mistyped operator was unreportable), and `visible` accepted `string | boolean`
|
|
18
|
+
* — a renderer-side tolerance for a shape the spec never emits, which is the
|
|
19
|
+
* lenient fallback AGENTS.md #12 bans. `@object-ui/types` has re-exported the
|
|
20
|
+
* spec's `ViewTab` under that name all along, so the fork and the real thing
|
|
21
|
+
* were already importable side by side.
|
|
22
|
+
*
|
|
23
|
+
* Bound to the AUTHORING (`input`) side, not `z.infer`: `pinned` / `isDefault` /
|
|
24
|
+
* `visible` all carry `.default()`s, so the PARSED type makes three keys
|
|
25
|
+
* required and a host handing this component stored view metadata
|
|
26
|
+
* (`{ name: 'open' }`) could not express it. The rule recorded on
|
|
27
|
+
* objectstack#4115 — writing this metadata → input, reading what has already
|
|
28
|
+
* been parsed → `z.infer`. Reached through the schema's own `_zod` carrier
|
|
29
|
+
* rather than `z.input` so this package takes no zod dependency; same technique
|
|
30
|
+
* and fuller rationale in `packages/react/src/spec-input.ts`.
|
|
31
|
+
*/
|
|
32
|
+
export type ViewTab = (typeof ViewTabSchema)['_zod']['input'];
|
|
20
33
|
export interface TabBarProps {
|
|
21
34
|
tabs: ViewTab[];
|
|
22
35
|
activeTab?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/components/TabBar.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,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;AAU/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;AA+BD;;;;GAIG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA4DxC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAqE9C,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,EAAE,QAAQ,EAA2C,MAAM,YAAY,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;AACjD,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;AACvG,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"}
|