import type { DisplayFormOutputs } from "./DisplayForm"; import type { IActivityHandler, EmptyOutputs } from "../../IActivityHandler"; import type * as defs from "../../forms/FormDefinition"; export interface SetFormElementItemPropertyInputs { form: DisplayFormOutputs; /** The ID of the form element bearing the items. */ elementName?: string | defs.Element; itemKey: string | number; propertyName: "checked" | "default" | "enabled" | "index" | "label" | "styleName" | "tooltip" | "validates" | "value" | "visible" | string; propertyValue: any; markdown?: boolean; } export declare class SetFormElementItemProperty implements IActivityHandler { static readonly action = "gcx:wf:forms::SetFormElementItemProperty"; static readonly suite = "gcx:wf:builtin"; execute(inputs: SetFormElementItemPropertyInputs): EmptyOutputs; /** * This list is based on the data type of the property rather than how the content is rendered. * In order to support markdown, a property needs to support the `MarkdownRef` data type, * which is included in `Text`, defined in `FormDefinition`. If a Form Element subsequently * passed this to `renderText()`, it would still handle the markdown appropriately. Styling would be stripped out * and you would be left with readable text. For example "**hello** there" would become "hello there". * * On the other hand, properties that expect a `string` must not ever be set to a `MarkdownRef` * as the element is not expected to perform any conversion on them. * @param propertyName The name of the property to check * @returns True if this property could accept markdown, false otherwise. */ private propertyAllowsMarkdown; }