@colixsystems/widget-sdk 0.41.0 → 0.42.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 +5 -1
- package/dist/index.d.ts +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,7 +48,11 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
|
|
|
48
48
|
|
|
49
49
|
## Status
|
|
50
50
|
|
|
51
|
-
`v0.
|
|
51
|
+
`v0.42.0` — pre-publish. The package surface (types, function names, export paths) is the v1 contract; runtime behaviour for some hooks is stubbed (each hook documents what's wired and what isn't). It is **not yet published to npm**.
|
|
52
|
+
|
|
53
|
+
### What's new in 0.42.0
|
|
54
|
+
|
|
55
|
+
**RELATION columns hydrate with a display label (sc-1181).** Record reads now return `{ id, label }` for ONE_TO_ONE / ONE_TO_MANY and `[{ id, label }, ...]` for MANY_TO_MANY (empty array when no links) — `label` is the value of the column pointed at by the new optional `display_column_id` on `DatastoreSchemaColumn`, or, when unset, the first STRING/TEXT column on the target table. Widgets should render `record.<rel>.label` (or `record.<rel>.map(r => r.label).join(", ")` for M:M) directly; `.id` is still there for the foreign-key case. The cell-formatting helpers in the built-in `DataList`, `TabbedDatalist`, and `FieldValue` widgets already walk arrays and prefer `label` over `name` / `id` — author widgets that need the same can copy that pattern. `CONTRACT.version` is unchanged.
|
|
52
56
|
|
|
53
57
|
### What's new in 0.41.0
|
|
54
58
|
|
package/dist/index.d.ts
CHANGED
|
@@ -662,6 +662,13 @@ export interface DatastoreSchemaColumn {
|
|
|
662
662
|
relation_type?: "ONE_TO_ONE" | "ONE_TO_MANY" | "MANY_TO_MANY" | null;
|
|
663
663
|
/** For RELATION columns only — the id of the table this column points at. */
|
|
664
664
|
target_table_id?: string | null;
|
|
665
|
+
/**
|
|
666
|
+
* For RELATION columns only — id of a column on `target_table_id` whose
|
|
667
|
+
* value supplies the `label` hydrated next to the related record id in
|
|
668
|
+
* record responses. `null` falls back to the first STRING/TEXT column on
|
|
669
|
+
* the target table.
|
|
670
|
+
*/
|
|
671
|
+
display_column_id?: string | null;
|
|
665
672
|
/** True when this column is the table's display/identification column. */
|
|
666
673
|
is_identification?: boolean;
|
|
667
674
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colixsystems/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Common widget interface for AppStudio. Implements WidgetManifest, WidgetContext, property schema, and helper hooks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|