@colixsystems/widget-sdk 0.31.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 +9 -1
- package/dist/contract.cjs +27 -1
- package/dist/contract.js +27 -1
- package/dist/index.d.ts +22 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,15 @@ 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.
|
|
54
|
+
|
|
55
|
+
### What's new in 0.32.0
|
|
56
|
+
|
|
57
|
+
**New `fieldList` propertySchema type (REQ-WBLT-03 / #139).** A per-field repeater that composes a form from author-picked columns of a sibling `tableRef` (default `tableId`, override via `ui.tableProp`). Each row stores `{ id, columnId, kind, label, required, optionsSource, inlineOptions, optionsTableId, optionsValueColumn, optionsLabelColumn }`; `kind` is one of `auto` / `singleChoice` / `multiChoice` and is gated by the column's `data_type` so an array column can't render as a scalar picker. The Studio renders the built-in **Form Builder** widget's editor through `SchemaForm` instead of the hand-rolled block it shipped with — removes the last data widget from `LEGACY_EDITOR_TYPES`. Persisted field shape is unchanged so existing pages keep rendering. **`CONTRACT.version` → `1.22.0`** (additive: one new propertySchema type). No existing export or type changed signature.
|
|
50
58
|
|
|
51
59
|
### What's new in 0.31.0
|
|
52
60
|
|
package/dist/contract.cjs
CHANGED
|
@@ -1323,7 +1323,33 @@ const CONTRACT = deepFreeze({
|
|
|
1323
1323
|
// new optional `existingSignatureId` arg on `useFileSignature` so an
|
|
1324
1324
|
// already-signed file shows its state + verify()s without re-signing.
|
|
1325
1325
|
// Backwards-compatible — the added arg is optional.
|
|
1326
|
-
|
|
1326
|
+
//
|
|
1327
|
+
// 1.22.0: additive (REQ-WBLT-03 / #139) — new `fieldList` propertySchema type.
|
|
1328
|
+
// A per-field repeater that composes a form from author-picked columns of
|
|
1329
|
+
// a sibling tableRef (default `tableId`, override via `ui.tableProp`). Each
|
|
1330
|
+
// row stores `{ id, columnId, kind, label, required, optionsSource,
|
|
1331
|
+
// inlineOptions, optionsTableId, optionsValueColumn, optionsLabelColumn }`;
|
|
1332
|
+
// `kind` is one of `auto` / `singleChoice` / `multiChoice` (gated by the
|
|
1333
|
+
// column's data_type so an array column can't be rendered as a scalar
|
|
1334
|
+
// picker). The Studio renders the Form Builder editor through SchemaForm
|
|
1335
|
+
// instead of the hand-rolled block it shipped with — removes the last data
|
|
1336
|
+
// widget from `LEGACY_EDITOR_TYPES`. No existing type changed shape, so
|
|
1337
|
+
// this is additive — minor bump on the pre-1.0 channel.
|
|
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",
|
|
1327
1353
|
hooks: HOOKS,
|
|
1328
1354
|
primitives: PRIMITIVES,
|
|
1329
1355
|
manifestSchema: MANIFEST_SCHEMA,
|
package/dist/contract.js
CHANGED
|
@@ -1323,7 +1323,33 @@ const CONTRACT = deepFreeze({
|
|
|
1323
1323
|
// new optional `existingSignatureId` arg on `useFileSignature` so an
|
|
1324
1324
|
// already-signed file shows its state + verify()s without re-signing.
|
|
1325
1325
|
// Backwards-compatible — the added arg is optional.
|
|
1326
|
-
|
|
1326
|
+
//
|
|
1327
|
+
// 1.22.0: additive (REQ-WBLT-03 / #139) — new `fieldList` propertySchema type.
|
|
1328
|
+
// A per-field repeater that composes a form from author-picked columns of
|
|
1329
|
+
// a sibling tableRef (default `tableId`, override via `ui.tableProp`). Each
|
|
1330
|
+
// row stores `{ id, columnId, kind, label, required, optionsSource,
|
|
1331
|
+
// inlineOptions, optionsTableId, optionsValueColumn, optionsLabelColumn }`;
|
|
1332
|
+
// `kind` is one of `auto` / `singleChoice` / `multiChoice` (gated by the
|
|
1333
|
+
// column's data_type so an array column can't be rendered as a scalar
|
|
1334
|
+
// picker). The Studio renders the Form Builder editor through SchemaForm
|
|
1335
|
+
// instead of the hand-rolled block it shipped with — removes the last data
|
|
1336
|
+
// widget from `LEGACY_EDITOR_TYPES`. No existing type changed shape, so
|
|
1337
|
+
// this is additive — minor bump on the pre-1.0 channel.
|
|
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",
|
|
1327
1353
|
hooks: HOOKS,
|
|
1328
1354
|
primitives: PRIMITIVES,
|
|
1329
1355
|
manifestSchema: MANIFEST_SCHEMA,
|
package/dist/index.d.ts
CHANGED
|
@@ -47,10 +47,22 @@ export type WidgetPropertyType =
|
|
|
47
47
|
| "assetList"
|
|
48
48
|
// REQ-WDG-FOLDERREF: Filestore folder picker → folder UUID (or null = root).
|
|
49
49
|
| "folderRef"
|
|
50
|
+
// REQ-WBLT-03 / #139: per-field repeater that composes a form from columns
|
|
51
|
+
// of a sibling tableRef (default `tableId`, override via `ui.tableProp`).
|
|
52
|
+
// Each row: { id, columnId, kind: "auto"|"singleChoice"|"multiChoice",
|
|
53
|
+
// label, required, optionsSource, inlineOptions, optionsTableId,
|
|
54
|
+
// optionsValueColumn, optionsLabelColumn }.
|
|
55
|
+
| "fieldList"
|
|
50
56
|
| "expression"
|
|
51
57
|
| "eventBinding"
|
|
52
58
|
| "object"
|
|
53
|
-
| "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";
|
|
54
66
|
|
|
55
67
|
export interface WidgetPropertyDef {
|
|
56
68
|
type: WidgetPropertyType;
|
|
@@ -65,6 +77,15 @@ export interface WidgetPropertyDef {
|
|
|
65
77
|
widget?: "textarea" | "slider" | "code";
|
|
66
78
|
group?: string;
|
|
67
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";
|
|
68
89
|
};
|
|
69
90
|
validation?: { min?: number; max?: number; pattern?: string };
|
|
70
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",
|