UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

42 lines (39 loc) 2 kB
import type GroupElement from "../../form/elements/GroupElement.js"; import type InputBase from "./InputBase.js"; import type { FeatureFormSupportedInput } from "./types.js"; export interface GroupInputProperties extends Partial<Pick<GroupInput, "inputs" | "open">> {} export type NestedInput = Exclude<FeatureFormSupportedInput, GroupInput>; /** * This is a support class that represents a group of field inputs. * * @since 4.27 * @see [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/) * @see [FeatureFormViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/FeatureFormViewModel/) * @see [FieldInput](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/FieldInput/) * @see [GroupElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/GroupElement/) */ export default class GroupInput extends InputBase<GroupElement> { constructor(properties?: GroupInputProperties); /** * Defines if the group should be expanded or collapsed when the form is initially displayed. * * Possible Value | Description * ---------------|------------- * collapsed | The grouped elements appear collapsed. * expanded | The grouped elements appear expanded. * * @default "expanded" * @since 4.28 */ get initialState(): "collapsed" | "expanded"; /** The field inputs contained within the group. */ accessor inputs: NestedInput[]; /** The group's label. */ get label(): string | null | undefined; /** Indicates whether or not the group is open, ie. expanded. */ accessor open: boolean; /** The type of input. */ get type(): "group"; /** The group's visibility. Note that the grouped input's visibility must be `true` if any fields within the group are [required](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/#requiredExpression). */ get visible(): boolean; }