@colixsystems/widget-sdk 0.123.0 → 0.124.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 +16 -1
- package/dist/contract.cjs +17 -1
- package/dist/contract.js +17 -1
- package/dist/index.d.ts +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,7 +70,22 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
|
|
|
70
70
|
|
|
71
71
|
## Status
|
|
72
72
|
|
|
73
|
-
`v0.
|
|
73
|
+
`v0.124.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**.
|
|
74
|
+
|
|
75
|
+
### What's new in 0.124.0 (contract 1.96.0)
|
|
76
|
+
|
|
77
|
+
**A `filterList` condition can scope itself to the signed-in app-user (sc-6282).** `valueMode` used to be `literal` or `relativeDate`, so every filter value was a constant chosen at build time. "Show only my rows" was therefore not something a no-code author could express — it needed a custom widget reading `ctx.user` and filtering client-side, which put the scoping decision in code the server does not enforce.
|
|
78
|
+
|
|
79
|
+
Two actor-scoped modes join the vocabulary:
|
|
80
|
+
|
|
81
|
+
- **`currentUser`** on a `USER` column — the rows whose user column is the caller.
|
|
82
|
+
- **`currentUserGroup`** on a `USER_GROUP` column — the rows assigned to any group the caller belongs to (live groups only; a tombstoned group surfaces nothing).
|
|
83
|
+
|
|
84
|
+
Both **carry no value**. The condition sends the `me` sentinel and the backend resolves the identity from the request actor, so a tampered widget config cannot redirect the sentinel at another user, and a caller with no session matches **nothing** rather than every row. Valid with `eq` / `neq` only — any other operator is rejected as `INVALID_FILTER`, rather than quietly answering "mine".
|
|
85
|
+
|
|
86
|
+
To be precise about what this is: it scopes what the widget **displays**. It is not an access-control boundary — a signed-in user can always ask for the unfiltered list, so row privacy has to come from the table's record ACL (a creator-only template). Use the two together. `eq` reads as "mine", `neq` as "not mine". In the Studio the author gets a signed-in-user checkbox on the row, offered only for the column type that can carry an identity.
|
|
87
|
+
|
|
88
|
+
Additive — `literal` and `relativeDate` conditions are unchanged, and an author-supplied `value` is simply ignored by the new modes. `CONTRACT.version` → `1.96.0`.
|
|
74
89
|
|
|
75
90
|
### What's new in 0.123.0 (contract unchanged at 1.95.0)
|
|
76
91
|
|
package/dist/contract.cjs
CHANGED
|
@@ -3655,7 +3655,23 @@ const CONTRACT = deepFreeze({
|
|
|
3655
3655
|
// be opened rejects UNSUPPORTED rather than falling back to a file dialog:
|
|
3656
3656
|
// the gesture is already spent on the permission prompt, and a file input
|
|
3657
3657
|
// clicked outside it would never open.
|
|
3658
|
-
|
|
3658
|
+
// 1.96.0: additive (sc-6282) -- the `filterList` propertySchema type gains
|
|
3659
|
+
// two actor-scoped `valueMode`s beside `literal` / `relativeDate`:
|
|
3660
|
+
// `currentUser` (a USER column) and `currentUserGroup` (a USER_GROUP
|
|
3661
|
+
// column) scope a condition to the signed-in app-user, so an author can
|
|
3662
|
+
// build "only my rows" / "only my organization's rows" without a custom
|
|
3663
|
+
// widget reading `ctx.user`. Both DISCARD the condition's `value` and
|
|
3664
|
+
// send the `me` sentinel; the backend resolves the identity from the
|
|
3665
|
+
// request actor, so the sentinel cannot be redirected at another user, and
|
|
3666
|
+
// wherever it cannot be resolved -- no signed-in app-user, a renamed or
|
|
3667
|
+
// encrypted column -- it matches NOTHING rather than falling back to every
|
|
3668
|
+
// row. Valid with `eq` ("mine") and `neq` ("carries none of my
|
|
3669
|
+
// identities", which includes an unassigned row) only; any other operator
|
|
3670
|
+
// is rejected as INVALID_FILTER. It scopes what a widget DISPLAYS -- row
|
|
3671
|
+
// privacy remains the record ACL's job. Existing `literal` and
|
|
3672
|
+
// `relativeDate` conditions are untouched -- minor bump on the pre-1.0
|
|
3673
|
+
// channel.
|
|
3674
|
+
version: "1.96.0",
|
|
3659
3675
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
3660
3676
|
hooks: HOOKS,
|
|
3661
3677
|
primitives: PRIMITIVES,
|
package/dist/contract.js
CHANGED
|
@@ -3655,7 +3655,23 @@ const CONTRACT = deepFreeze({
|
|
|
3655
3655
|
// be opened rejects UNSUPPORTED rather than falling back to a file dialog:
|
|
3656
3656
|
// the gesture is already spent on the permission prompt, and a file input
|
|
3657
3657
|
// clicked outside it would never open.
|
|
3658
|
-
|
|
3658
|
+
// 1.96.0: additive (sc-6282) -- the `filterList` propertySchema type gains
|
|
3659
|
+
// two actor-scoped `valueMode`s beside `literal` / `relativeDate`:
|
|
3660
|
+
// `currentUser` (a USER column) and `currentUserGroup` (a USER_GROUP
|
|
3661
|
+
// column) scope a condition to the signed-in app-user, so an author can
|
|
3662
|
+
// build "only my rows" / "only my organization's rows" without a custom
|
|
3663
|
+
// widget reading `ctx.user`. Both DISCARD the condition's `value` and
|
|
3664
|
+
// send the `me` sentinel; the backend resolves the identity from the
|
|
3665
|
+
// request actor, so the sentinel cannot be redirected at another user, and
|
|
3666
|
+
// wherever it cannot be resolved -- no signed-in app-user, a renamed or
|
|
3667
|
+
// encrypted column -- it matches NOTHING rather than falling back to every
|
|
3668
|
+
// row. Valid with `eq` ("mine") and `neq` ("carries none of my
|
|
3669
|
+
// identities", which includes an unassigned row) only; any other operator
|
|
3670
|
+
// is rejected as INVALID_FILTER. It scopes what a widget DISPLAYS -- row
|
|
3671
|
+
// privacy remains the record ACL's job. Existing `literal` and
|
|
3672
|
+
// `relativeDate` conditions are untouched -- minor bump on the pre-1.0
|
|
3673
|
+
// channel.
|
|
3674
|
+
version: "1.96.0",
|
|
3659
3675
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
3660
3676
|
hooks: HOOKS,
|
|
3661
3677
|
primitives: PRIMITIVES,
|
package/dist/index.d.ts
CHANGED
|
@@ -65,7 +65,11 @@ export type WidgetPropertyType =
|
|
|
65
65
|
// builder. Persisted value is `Array<{ column, operator, value, valueMode }>`
|
|
66
66
|
// matching the ?filter[col]=op:value contract; columns resolve from a
|
|
67
67
|
// sibling tableRef (defaults to the form-root `tableId`, override via
|
|
68
|
-
// `ui.tableProp`).
|
|
68
|
+
// `ui.tableProp`). `valueMode` is `literal` (the default), `relativeDate`
|
|
69
|
+
// (ordering operators on a DATE column — `value` is "N days ago"), or the
|
|
70
|
+
// sc-6282 actor-scoped pair `currentUser` (USER column) / `currentUserGroup`
|
|
71
|
+
// (USER_GROUP column), which drop `value` and let the SERVER scope the
|
|
72
|
+
// condition to the signed-in app-user.
|
|
69
73
|
| "filterList";
|
|
70
74
|
|
|
71
75
|
export interface WidgetPropertyDef {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colixsystems/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.124.0",
|
|
4
4
|
"description": "Common widget interface for AppStudio. Implements WidgetManifest, WidgetContext, property schema, and helper hooks.",
|
|
5
5
|
"homepage": "https://github.com/Colix-AB/AppStudio",
|
|
6
6
|
"type": "module",
|