import { AttachmentsContent, CustomContent, ExpressionContent, FieldsContent, MediaContent } from "@arcgis/core/popup/content.js";
Since
ArcGIS Maps SDK for JavaScript 4.11

A convenience module for importing Content classes when developing with TypeScript. For example, rather than importing content elements one at a time like this:

import TextContent from "@arcgis/core/popup/content/TextContent.js";
import MediaContent from "@arcgis/core/popup/content/MediaContent.js";
import FieldsContent from "@arcgis/core/popup/content/FieldsContent.js";
import AttachmentsContent from "@arcgis/core/popup/content/AttachmentsContent.js";
import CustomContent from "@arcgis/core/popup/content/CustomContent.js";
import ExpressionContent from "@arcgis/core/popup/content/ExpressionContent.js";
import RelationshipContent from "@arcgis/core/popup/content/RelationshipContent.js";

You can use this module to import them on a single line:

import { TextContent, MediaContent, FieldsContent, AttachmentsContent, CustomContent, ExpressionContent, RelationshipContent } from "@arcgis/core/popup/content.js";

This module also allows you to implement type guards on the content elements, making your code smarter.

import { Content } from "@arcgis/core/popup/content.js";
function logContentElement(content: Content): void {
if (content.type === "media") {
console.log("Content type is media");
}
else {
// The compiler knows the content element must be `text | fields | media | attachment | custom`
console.log("The value is not a valid popup content element.")
}
}
See also

Type definitions

AttachmentsContent

deprecated Type definition

AttachmentsContent represents an attachment element associated with a feature.

Supertypes
default

CustomContent

deprecated Type definition

CustomContent represents a custom content element associated with a feature.

Supertypes
default

ExpressionContent

deprecated Type definition

ExpressionContent represents an expression element associated with a feature.

Supertypes
default

FieldsContent

deprecated Type definition

FieldsContent represents the FieldInfo associated with a feature.

Supertypes
default

MediaContent

deprecated Type definition

MediaContent contains an individual or array of chart and/or image media elements to display within a popup's content.

Supertypes
default

RelationshipContent

deprecated Type definition

RelationshipContent represents a relationship element associated with a feature.

Supertypes
default

TextContent

deprecated Type definition

TextContent defines descriptive text as an element within the PopupTemplate's content.

Supertypes
default

UtilityNetworkAssociationsContent

deprecated Type definition

UtilityNetworkAssociationsContent represents an utility network associations element associated with a feature.

Supertypes
default

Content

deprecated Type definition

Popup content element types.

Variables

AttachmentsContent

deprecated Variable

AttachmentsContent represents an attachment element associated with a feature.

Type
typeof AttachmentsContentClass

CustomContent

deprecated Variable

CustomContent represents a custom content element associated with a feature.

Type
typeof CustomContentClass

ExpressionContent

deprecated Variable

ExpressionContent represents an expression element associated with a feature.

Type
typeof ExpressionContentClass

FieldsContent

deprecated Variable

FieldsContent represents the FieldInfo associated with a feature.

Type
typeof FieldsContentClass

MediaContent

deprecated Variable

MediaContent contains an individual or array of chart and/or image media elements to display within a popup's content.

Type
typeof MediaContentClass

RelationshipContent

deprecated Variable

RelationshipContent represents a relationship element associated with a feature.

Type
typeof RelationshipContentClass

TextContent

deprecated Variable

TextContent defines descriptive text as an element within the PopupTemplate's content.

Type
typeof TextContentClass

UtilityNetworkAssociationsContent

deprecated Variable

UtilityNetworkAssociationsContent represents an utility network associations element associated with a feature.

Type
typeof UtilityNetworkAssociationsContentClass