@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
81 lines (79 loc) • 4.15 kB
TypeScript
import type Element from "./Element.js";
import type UtilityNetworkAssociationType from "../../popup/support/UtilityNetworkAssociationType.js";
import type { ClonableMixin } from "../../core/Clonable.js";
import type { ElementProperties } from "./Element.js";
import type { UtilityNetworkAssociationTypeProperties } from "../../popup/support/UtilityNetworkAssociationType.js";
export interface UtilityNetworkAssociationsElementProperties extends ElementProperties, Partial<Pick<UtilityNetworkAssociationsElement, "editableExpression">> {
/** The association types. */
associationTypes?: UtilityNetworkAssociationTypeProperties[];
}
/**
* The `UtilityNetworkAssociationsElement` defines how utility network associations can participate in the form.
*
* @beta
* @since 4.32
* @see [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/)
* @see [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/)
* @see [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/)
* @see [Sample - Edit FeatureLayers with form elements ](https://developers.arcgis.com/javascript/latest/sample-code/widgets-editor-form-elements/)
* @example
* // Configure associations in forms
* const formTemplate = new FormTemplate({
* title:"My Associations",
* description: "Provide information for feature",
* elements: [{ // Autocasts to new UtilityNetworkAssociationsElement
* type: "utilityNetworkAssociations",
* label: "Inspector Information",
* description: "Field inspector information",
* associationTypes: [
* {
* type: "content",
* title: "myContents"
* },
* {
* type: "container",
* associatedAssetGroup: 2,
* associatedNetworkSourceId: 5,
* associatedAssetType: 3
* },
* {
* type: "connectivity",
* description: "Describe this associations"
* },
* {
* type: "attachment"
* },
* {
* type: "structure"
* }
* ],
* }]
* })
*/
export default class UtilityNetworkAssociationsElement extends UtilityNetworkAssociationsElementSuperclass {
constructor(properties?: UtilityNetworkAssociationsElementProperties);
/** The association types. */
get associationTypes(): UtilityNetworkAssociationType[];
set associationTypes(value: UtilityNetworkAssociationTypeProperties[]);
/**
* A reference to the [ExpressionInfo.name](https://developers.arcgis.com/javascript/latest/references/core/form/ExpressionInfo/#name) of an
* [Arcade](https://developers.arcgis.com/javascript/latest/arcade/) expression defined in the
* [FormTemplate.expressionInfos](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/#expressionInfos) of the FormTemplate.
* The expression must follow the specification
* defined in the [Form Constraint Profile](https://developers.arcgis.com/javascript/latest/arcade/#constraint). Expressions
* may reference field values using the `$feature` global input and must return either `true` or `false`.
*
* When this expression evaluates to `true`, it is possible to edit the field value, and vice-versa if `false`. If the referenced related table is not editable, the editable expression is ignored and the element is not editable.
*
* > [!WARNING]
* >
* > The referenced expression must be defined in the form template's [FormTemplate.expressionInfos](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/#expressionInfos).
* > It cannot be set inline within the element object.
*
* @see [Form Constraint Arcade Profile](https://developers.arcgis.com/javascript/latest/arcade/#constraint)
*/
accessor editableExpression: string | null | undefined;
/** Indicates the type of form [Element](https://developers.arcgis.com/javascript/latest/references/core/form/elements/Element/). */
get type(): "utilityNetworkAssociations";
}
declare const UtilityNetworkAssociationsElementSuperclass: typeof Element & typeof ClonableMixin