@colixsystems/widget-sdk 0.32.0 → 0.33.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/contract.cjs +15 -1
- package/dist/contract.js +15 -1
- package/dist/index.d.ts +16 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,11 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
|
|
|
46
46
|
|
|
47
47
|
## Status
|
|
48
48
|
|
|
49
|
-
`v0.
|
|
49
|
+
`v0.33.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**.
|
|
50
|
+
|
|
51
|
+
### What's new in 0.33.0
|
|
52
|
+
|
|
53
|
+
**New `filterList` propertySchema type + `ui.resetOnFieldChange` / `ui.defaultFactory` hints (REQ-WBLT-03, Tab Layout migration / #140).** `filterList` is a multi-condition record-filter builder — per-row column + operator + value with a "Relative date (N days ago)" toggle for DATE + ordering operators. The persisted value is `Array<{ column, operator, value, valueMode }>` matching the records-filter contract (`?filter[col]=op:value`). Columns resolve from a sibling tableRef (defaults to `tableId`; override with `ui.tableProp`). Pair with `ui.resetOnFieldChange: "tableId"` so the chain wipes when the source table changes. `ui.resetOnFieldChange: "<sibling>"` resets a property to its default when the named sibling changes — used to clear stale `columnRef`/`filterList` values nested inside an `array<object>` when the form-root tableId switches. `ui.defaultFactory: "tabId"` seeds a unique stable id when a new array item is added (Tab Layout's `tabs[*].id`). The Tab Layout built-in widget moved fully onto the manifest-driven Properties Panel; its hand-rolled per-tab editor is gone. `CONTRACT.version` → `1.23.0`. Additive — no existing export or type changed.
|
|
50
54
|
|
|
51
55
|
### What's new in 0.32.0
|
|
52
56
|
|
package/dist/contract.cjs
CHANGED
|
@@ -1335,7 +1335,21 @@ const CONTRACT = deepFreeze({
|
|
|
1335
1335
|
// instead of the hand-rolled block it shipped with — removes the last data
|
|
1336
1336
|
// widget from `LEGACY_EDITOR_TYPES`. No existing type changed shape, so
|
|
1337
1337
|
// this is additive — minor bump on the pre-1.0 channel.
|
|
1338
|
-
|
|
1338
|
+
//
|
|
1339
|
+
// 1.23.0: additive (REQ-WBLT-03, Tab Layout migration / #140) — new
|
|
1340
|
+
// `filterList` propertySchema type. A multi-condition record-filter
|
|
1341
|
+
// builder whose persisted value is `Array<{ column, operator, value,
|
|
1342
|
+
// valueMode }>` matching the records-filter contract
|
|
1343
|
+
// (`?filter[col]=op:value`). Columns resolve from a sibling tableRef
|
|
1344
|
+
// (default `tableId`; override via `ui.tableProp`). Plus two free-form
|
|
1345
|
+
// `ui.*` hints used by the Tab Layout manifest and available to any
|
|
1346
|
+
// widget: `ui.resetOnFieldChange: "<sibling>"` (reset this property to
|
|
1347
|
+
// its default when the named sibling changes — wipes stale
|
|
1348
|
+
// columnRef/filterList values inside an array<object> when the
|
|
1349
|
+
// form-root tableId switches) and `ui.defaultFactory: "tabId"`
|
|
1350
|
+
// (per-instance dynamic default). No existing field, hook, primitive,
|
|
1351
|
+
// or token changed shape — minor bump on the pre-1.0 channel.
|
|
1352
|
+
version: "1.23.0",
|
|
1339
1353
|
hooks: HOOKS,
|
|
1340
1354
|
primitives: PRIMITIVES,
|
|
1341
1355
|
manifestSchema: MANIFEST_SCHEMA,
|
package/dist/contract.js
CHANGED
|
@@ -1335,7 +1335,21 @@ const CONTRACT = deepFreeze({
|
|
|
1335
1335
|
// instead of the hand-rolled block it shipped with — removes the last data
|
|
1336
1336
|
// widget from `LEGACY_EDITOR_TYPES`. No existing type changed shape, so
|
|
1337
1337
|
// this is additive — minor bump on the pre-1.0 channel.
|
|
1338
|
-
|
|
1338
|
+
//
|
|
1339
|
+
// 1.23.0: additive (REQ-WBLT-03, Tab Layout migration / #140) — new
|
|
1340
|
+
// `filterList` propertySchema type. A multi-condition record-filter
|
|
1341
|
+
// builder whose persisted value is `Array<{ column, operator, value,
|
|
1342
|
+
// valueMode }>` matching the records-filter contract
|
|
1343
|
+
// (`?filter[col]=op:value`). Columns resolve from a sibling tableRef
|
|
1344
|
+
// (default `tableId`; override via `ui.tableProp`). Plus two free-form
|
|
1345
|
+
// `ui.*` hints used by the Tab Layout manifest and available to any
|
|
1346
|
+
// widget: `ui.resetOnFieldChange: "<sibling>"` (reset this property to
|
|
1347
|
+
// its default when the named sibling changes — wipes stale
|
|
1348
|
+
// columnRef/filterList values inside an array<object> when the
|
|
1349
|
+
// form-root tableId switches) and `ui.defaultFactory: "tabId"`
|
|
1350
|
+
// (per-instance dynamic default). No existing field, hook, primitive,
|
|
1351
|
+
// or token changed shape — minor bump on the pre-1.0 channel.
|
|
1352
|
+
version: "1.23.0",
|
|
1339
1353
|
hooks: HOOKS,
|
|
1340
1354
|
primitives: PRIMITIVES,
|
|
1341
1355
|
manifestSchema: MANIFEST_SCHEMA,
|
package/dist/index.d.ts
CHANGED
|
@@ -56,7 +56,13 @@ export type WidgetPropertyType =
|
|
|
56
56
|
| "expression"
|
|
57
57
|
| "eventBinding"
|
|
58
58
|
| "object"
|
|
59
|
-
| "array"
|
|
59
|
+
| "array"
|
|
60
|
+
// REQ-WBLT-03 (Tab Layout migration): multi-condition record filter
|
|
61
|
+
// builder. Persisted value is `Array<{ column, operator, value, valueMode }>`
|
|
62
|
+
// matching the ?filter[col]=op:value contract; columns resolve from a
|
|
63
|
+
// sibling tableRef (defaults to the form-root `tableId`, override via
|
|
64
|
+
// `ui.tableProp`).
|
|
65
|
+
| "filterList";
|
|
60
66
|
|
|
61
67
|
export interface WidgetPropertyDef {
|
|
62
68
|
type: WidgetPropertyType;
|
|
@@ -71,6 +77,15 @@ export interface WidgetPropertyDef {
|
|
|
71
77
|
widget?: "textarea" | "slider" | "code";
|
|
72
78
|
group?: string;
|
|
73
79
|
order?: number;
|
|
80
|
+
// REQ-WBLT-03: when the named sibling field changes, reset this
|
|
81
|
+
// property to its schema default. Used to wipe stale columnRef /
|
|
82
|
+
// filterList bindings nested inside array<object> when the form-root
|
|
83
|
+
// tableId switches.
|
|
84
|
+
resetOnFieldChange?: string;
|
|
85
|
+
// REQ-WBLT-03: per-instance dynamic default (can't be expressed as
|
|
86
|
+
// a static `default`). Today: `"tabId"` → seed a unique stable id
|
|
87
|
+
// for newly added Tab Layout tabs.
|
|
88
|
+
defaultFactory?: "tabId";
|
|
74
89
|
};
|
|
75
90
|
validation?: { min?: number; max?: number; pattern?: string };
|
|
76
91
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colixsystems/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.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",
|