pointer
setPointer writes a value into an object at a JSON Pointer path. The dashboard uses it to put binding results into widget state.
setPointer writes a value into an object at a JSON Pointer path such as "/a/b". The dashboard
uses it to put the data each binding fetches into the state of a widget's spec. You can also use it
in a plugin whenever you need to update a nested object by path.
Source: packages/sdk/src/pointer.ts.
/** Minimal JSON-pointer write ("/a/b") used to place binding results into widget state. */
function setPointer(target: Record<string, unknown>, pointer: string, value: unknown): Record<string, unknown>;It behaves as follows:
- It returns a new object and leaves
targetunchanged. Every object along the path is copied. - A missing value, or a value that is not an object, on the way is replaced with
{}. - In keys,
~1decodes to/and~0decodes to~. - An empty pointer (
"") returnstargetunchanged.
setPointer({ form: { amount: '50' } }, '/card/balance', 12.5);
// → { form: { amount: '50' }, card: { balance: 12.5 } }format
Functions that format dates and times for the app's language, plus defineStrings for defining per-language string tables.
PKU harness Cloud
PKU harness Cloud is an optional backend standard for plugins, covering storage, relay channels, push, files and server functions. The official instance, a self-hosted server or any conforming server can provide it. Data is end-to-end encrypted by default, and the cloud holds no campus identity.