What every component of a resource package's UI is given, as its ctx
assign: who is looking, in which tenant, at what, and where.
tenant_id: the tenant.actor: who is looking. Opaque: pass it to Ash asactor:(Alternera.Resource.UI.opts/1) and never match on it; it is the proxy's user, an API key's owner, or a test's stand-in.can_write?: whether the viewer may change records here. It hides write controls; the resource's policies still decide at the write.available?: whether the host serves resources now. The host mounts nothing without it, so a component seestrue.package_id: the package the component belongs to.resource:%{name, module, label, lookup_key}of the resource the component belongs to; nil on a package's page or Workbench item.timezone: the viewer's time zone, for showing times.path: the page's own path, for links back to it.place: where the component is mounted::page(the Resources page or a package page),:workbench(a Workbench tab) or:test(the contract kit's harness).key: the host's name for this mount. The functions inAlternera.Resource.UIput it on what they ask the host, so the host knows which component asked; a component never reads it.
The host builds it from the session; nothing in it comes from a client's parameters.
Summary
Functions
The fields every host passes, in order; a test keeps the host's in step.
The resource field for a resource module.