import type Input from "./Input.js"; /** @since 5.1 */ export interface DocumentInputProperties extends Partial> {} /** * The `DocumentInput` class defines a user interface for an input to which document 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 on the [Editor's `layerInfo.formTemplate`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/#layerInfos/) or a [feature layer's `formTemplate`](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) and displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-editor/). * * > [!CAUTION] * > * When using specific input types, such as `DocumentInput`, existing attachments are displayed only if they match the element's [keyword](https://developers.arcgis.com/javascript/latest/references/core/form/elements/AttachmentElement/#attachmentKeyword). Existing attachments without a matching keyword are not shown. To display attachments that do not have a corresponding keyword, use the general [AttachmentInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AttachmentInput/) instead. This input type provides a more general approach to displaying attachments and does not require a keyword to be specified by setting the [attachmentAssociationType](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/AttachmentInput/#attachmentAssociationType) accordingly. * * @since 5.1 * @see [DocumentInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/attachments/DocumentInput/) * @example * // Creates a new DocumentInput for an attachment element within a form * const documentInput = new DocumentInput({ * maxFileSize: 500 * }); */ export default class DocumentInput extends Input { /** @since 5.1 */ constructor(properties?: DocumentInputProperties); /** * Defines the maximum length of an attachment for this element in megabytes. If not specified, there is no maximum file size. * * @since 5.1 */ accessor maxFileSize: number | null | undefined; /** * The input type identifier. * * @since 5.1 */ get type(): "document"; }