Home > @datashaper/app-framework > AppProfile
Classes implementing this interface are used to represent the Profile within the app framework. This largely includes user interface elements that build upon the underlying Profile functionality.
Signature:
export interface AppProfile<Res extends Resource = Resource, Schema extends ResourceSchema = ResourceSchema, Context = unknown> extends ProfileHandler<Res, Schema, AppProfileInitializationContext<Context>> Extends: ProfileHandler<Res, Schema, AppProfileInitializationContext<Context>>
| Property | Modifiers | Type | Description |
|---|---|---|---|
| getCommandBarCommands? | (section: CommandBarSection) => IContextualMenuItem[] | undefined | (Optional) Gets commands for the profile | |
| getFieldWells? | (resource: Res) => FieldWellItem[] | (Optional) Profiles can indicate interactive field wells to display directly in the resource tree. These field wells can be populated by the resources, and will be rendered as a dropdown. Each field well can also dictate an onChange that updates the resource (e.g., sets an input binding). | |
| getHelp? | () => Record<string, string> | (Optional) Profiles may supply a map of help content to be displayed in the global panel when open. Each help record should have a unique key, and the value is the markdown content. | |
| getMenuItems? | (resource: Res) => IContextualMenuItem[] | (Optional) Create contextual menu items for a resource | |
| getSettingsConfig? | () => SettingsConfig | (Optional) Profiles may supply a settings configuration to be used by resources. This is a template describing the settings properties and UX. The default values will be set on new resource instances, and the template will be used to populate the global settings UX panel controls for each instance. | |
| group? | ResourceGroupType | (Optional) The grouping for this resource type. The default is 'app'. This grouping determines what resources this is rendered with in the tree-view. | |
| iconName | string | The icon name to use in the file-tree | |
| renderer | React.ComponentType<{ href: string; resource: Res; api: AppServices; }> | Render the profile | |
| title | string | A friendly title for the profile, used for resource creation. (e.g. "New <title>") |