import { BarcodeScannerInput, ComboBoxInput, DatePickerInput, DateTimeOffsetPickerInput, DateTimePickerInput } from "@arcgis/core/form/elements/inputs.js";const { BarcodeScannerInput, ComboBoxInput, DatePickerInput, DateTimeOffsetPickerInput, DateTimePickerInput } = await $arcgis.import("@arcgis/core/form/elements/inputs.js");- Since
- ArcGIS Maps SDK for JavaScript 4.16
A convenience module for importing Input classes when developing with TypeScript. For example, rather than importing form element inputs one at a time like this:
import BarcodeScannerInput from "@arcgis/core/form/elements/inputs/BarcodeScannerInput.js";import ComboBoxInput from "@arcgis/core/form/elements/inputs/ComboBoxInput.js";import DatePickerInput from "@arcgis/core/form/elements/inputs/DatePickerInput.js";import DateTimeOffsetPickerInput from "@arcgis/core/form/elements/inputs/DateTimeOffsetPickerInput.js";import DateTimePickerInput from "@arcgis/core/form/elements/inputs/DateTimePickerInput.js";import RadioButtonsInput from "@arcgis/core/form/elements/inputs/RadioButtonsInput.js";import SwitchInput from "@arcgis/core/form/elements/inputs/SwitchInput.js";import TextAreaInput from "@arcgis/core/form/elements/inputs/TextAreaInput.js";import TextBoxInput from "@arcgis/core/form/elements/inputs/TextBoxInput.js";import TimePickerInput from "@arcgis/core/form/elements/inputs/TimePickerInput.js";You can use this module to import them on a single line:
import { BarcodeScannerInput, ComboBoxInput, DatePickerInput, DateTimeOffsetPickerInput, DateTimePickerInput, RadioButtonsInput, SwitchInput, TextAreaInput, TextBoxInput, TimePickerInput } from "@arcgis/core/form/elements/inputs.js";This module also allows you to implement type guards on the form element inputs, making your code smarter.
import { Input } from "@arcgis/core/form/elements/inputs.js";
function logFormElementInput(input: Input): void { if (input.type === "text-area") { console.log("Form element input type is TextAreaInput"); } else { // The compiler knows the content element must be an input type such as `text-area` | `text-box` | `barcode-scanner` | `radio-buttons` | `combo-box`, etc. console.log("The value is not a valid form element input.") }}Type definitions
BarcodeScannerInput
The BarcodeScannerInput class defines the desired user interface is a barcode or QR code scanner. If this type is used in an ArcGIS Maps SDK for JavaScript web application, it will default to the TextBoxInput type as the API does not support bar code scanning as an input type.
- Supertypes
- default
ComboBoxInput
The ComboBoxInput class defines the desired user interface for a combo box group.
- Supertypes
- default
DatePickerInput
The DatePickerInput class defines the desired user interface for working with date-only types.
- Supertypes
- default
DateTimeOffsetPickerInput
The DateTimeOffsetPickerInput class defines the desired user interface for editing date and time fields in a form that also requires the option to include an offset from Coordinated Universal Time (UTC).
- Supertypes
- default
DateTimePickerInput
The DateTimePickerInput class defines the desired user interface for editing date (including time) fields in a form.
- Supertypes
- default
RadioButtonsInput
The RadioButtonsInput class defines the desired user interface for a radio button group.
- Supertypes
- default
SwitchInput
The SwitchInput class defines the desired user interface for a binary switch or toggle. This should be used when selecting between two options in a form.
- Supertypes
- default
TextAreaInput
TextAreaInput defines the desired user interface is a multi-line text area.
- Supertypes
- default
TextBoxInput
TextBoxInput defines the desired user interface is a single-line text box.
- Supertypes
- default
TimePickerInput
The TimePickerInput class defines the desired user interface for working with time-only types.
- Supertypes
- default
Variables
BarcodeScannerInput
The BarcodeScannerInput class defines the desired user interface is a barcode or QR code scanner. If this type is used in an ArcGIS Maps SDK for JavaScript web application, it will default to the TextBoxInput type as the API does not support bar code scanning as an input type.
- Type
- typeof BarcodeScannerInputClass
ComboBoxInput
The ComboBoxInput class defines the desired user interface for a combo box group.
- Type
- typeof ComboBoxInputClass
DatePickerInput
The DatePickerInput class defines the desired user interface for working with date-only types.
- Type
- typeof DatePickerInputClass
DateTimeOffsetPickerInput
The DateTimeOffsetPickerInput class defines the desired user interface for editing date and time fields in a form that also requires the option to include an offset from Coordinated Universal Time (UTC).
- Type
- typeof DateTimeOffsetPickerInputClass
DateTimePickerInput
The DateTimePickerInput class defines the desired user interface for editing date (including time) fields in a form.
- Type
- typeof DateTimePickerInputClass
RadioButtonsInput
The RadioButtonsInput class defines the desired user interface for a radio button group.
- Type
- typeof RadioButtonsInputClass
SwitchInput
The SwitchInput class defines the desired user interface for a binary switch or toggle. This should be used when selecting between two options in a form.
- Type
- typeof SwitchInputClass
TextAreaInput
TextAreaInput defines the desired user interface is a multi-line text area.
- Type
- typeof TextAreaInputClass
TextBoxInput
TextBoxInput defines the desired user interface is a single-line text box.
- Type
- typeof TextBoxInputClass
TimePickerInput
The TimePickerInput class defines the desired user interface for working with time-only types.
- Type
- typeof TimePickerInputClass