UNPKG

@arcgis/core

Version:

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

47 lines (45 loc) 2.21 kB
import type Input from "./Input.js"; import type { InputMethod } from "../../../../portal/jsonTypes.js"; /** @internal */ export interface ImageInputProperties extends Partial<Pick<ImageInput, "inputMethod" | "maxImageSize">> {} /** * The `ImageInput` class defines a user interface for an input to which image files can be attached. This [AttachmentElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#input) is used in [attachment elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate`. This is displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/) widget. * * > [!CAUTION] * > * > This class is not yet fully supported within the SDK and is not intended for use in development. Support will be added in an upcoming release. * * @internal * @since 4.31 * @see [ImageInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/ImageInput/) * @example * // Creates a new ImageInput for an attachment element within a form * const imageInput = new ImageInput({ * inputMethod: "upload", * maxImageSize: 800, * }); */ export default class ImageInput extends Input { /** @internal */ constructor(properties?: ImageInputProperties); /** * The supported input methods used to attach an image. * * @default "any" * @internal */ accessor inputMethod: InputMethod; /** * Number of pixels on the longest edge depending on orientation. Larger images will be resized and aspect ratio is maintained. If `maxImageSize` is not specified, images will not be resized. * * @internal */ accessor maxImageSize: number | null | undefined; /** * The input type identifier. Valid value of this property is "image" * * @internal * @since 5.0 */ get type(): "image"; }