@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
110 lines (101 loc) • 6.94 kB
TypeScript
/**
* A convenience module for importing [AttributeTableElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableElement/) classes
* when developing with [TypeScript](https://developers.arcgis.com/javascript/latest/get-started/#typescript).
* For example, rather than importing table elements one at a time like this:
*
* ```js
* import TableAttachmentElement from "@arcgis/core/tables/elements/AttributeTableAttachmentElement.js";
* import TableFieldElement from "@arcgis/core/tables/elements/AttributeTableFieldElement.js";
* import TableGroupElement from "@arcgis/core/tables/elements/AttributeTableGroupElement.js";
* import TableRelationshipElement from "@arcgis/core/tables/elements/AttributeTableRelationshipElement.js";
* ```
*
* You can use this module to import them on a single line:
*
* ```js
* import { AttributeTableAttachmentElement, AttributeTableFieldElement, AttributeTableGroupElement, AttributeTableRelationshipElement } from "@arcgis/core/tables/elements.js";
* ```
*
* This module also allows you to implement [type guards](https://basarat.gitbook.io/typescript/type-system/typeguard)
* on the attribute table elements, making your code smarter.
*
* ```js
* import { AttributeTableElement } from "@arcgis/core/tables/elements.js";
*
* function logTableElement(element: AttributeTableElement): void {
* if (element.type === "field") {
* console.log("Attribute table element type is field");
* }
* else {
* console.log("The value is not a table field element.")
* }
* }
* ```
*
* @since 4.31
* @see [AttributeTableTemplate](https://developers.arcgis.com/javascript/latest/references/core/tables/AttributeTableTemplate/)
* @see [AttributeTableAttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableAttachmentElement/)
* @see [AttributeTableFieldElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableFieldElement/)
* @see [AttributeTableGroupElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableGroupElement/)
* @see [AttributeTableRelationshipElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableRelationshipElement/)
*/
import type AttributeTableAttachmentElementClass from "./elements/AttributeTableAttachmentElement.js";
import type AttributeTableFieldElementClass from "./elements/AttributeTableFieldElement.js";
import type AttributeTableGroupElementClass from "./elements/AttributeTableGroupElement.js";
import type AttributeTableRelationshipElementClass from "./elements/AttributeTableRelationshipElement.js";
/**
* Attribute table element types.
*
* @deprecated since version 4.34. Import individual element modules directly instead.
*/
export type AttributeTableElement = AttributeTableAttachmentElementClass | AttributeTableFieldElementClass | AttributeTableGroupElementClass | AttributeTableRelationshipElementClass;
/**
* `AttributeTableFieldElement` defines how a feature layer's field participates in the attribute table.
*
* @deprecated since version 4.34. Import [AttributeTableFieldElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableFieldElement/) directly instead.
*/
export const AttributeTableFieldElement: typeof AttributeTableFieldElementClass;
/**
* `AttributeTableFieldElement` defines how a feature layer's field participates in the attribute table.
*
* @deprecated since version 4.34. Import [AttributeTableFieldElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableFieldElement/) directly instead.
*/
export type AttributeTableFieldElement = AttributeTableFieldElementClass;
/**
* `AttributeTableGroupElement` defines a container that holds a set of attribute table elements
* that can be displayed together.
*
* @deprecated since version 4.34. Import [AttributeTableGroupElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableGroupElement/) directly instead.
*/
export const AttributeTableGroupElement: typeof AttributeTableGroupElementClass;
/**
* `AttributeTableGroupElement` defines a container that holds a set of attribute table elements
* that can be displayed together.
*
* @deprecated since version 4.34. Import [AttributeTableGroupElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableGroupElement/) directly instead.
*/
export type AttributeTableGroupElement = AttributeTableGroupElementClass;
/**
* `AttributeTableRelationshipElement` defines how a relationship between [feature layers](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) and [Map.tables](https://developers.arcgis.com/javascript/latest/references/core/Map/#tables) participates in the [FeatureTable](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/).
*
* @deprecated since version 4.34. Import [AttributeTableRelationshipElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableRelationshipElement/) directly instead.
*/
export const AttributeTableRelationshipElement: typeof AttributeTableRelationshipElementClass;
/**
* `AttributeTableRelationshipElement` defines how a relationship between [feature layers](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) and [Map.tables](https://developers.arcgis.com/javascript/latest/references/core/Map/#tables) participates in the [FeatureTable](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureTable/).
*
* @deprecated since version 4.34. Import [AttributeTableRelationshipElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableRelationshipElement/) directly instead.
*/
export type AttributeTableRelationshipElement = AttributeTableRelationshipElementClass;
/**
* `AttributeTableAttachmentElement` defines how one or more attachments can participate in the attribute table.
*
* @deprecated since version 4.34. Import [AttributeTableAttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableAttachmentElement/) directly instead.
*/
export const AttributeTableAttachmentElement: typeof AttributeTableAttachmentElementClass;
/**
* `AttributeTableAttachmentElement` defines how one or more attachments can participate in the attribute table.
*
* @deprecated since version 4.34. Import [AttributeTableAttachmentElement](https://developers.arcgis.com/javascript/latest/references/core/tables/elements/AttributeTableAttachmentElement/) directly instead.
*/
export type AttributeTableAttachmentElement = AttributeTableAttachmentElementClass;