Appearance
ExternalDisplayConditionsLibrary
Core class for integrating external display condition systems with the Stripo Email Editor.
typescript
class ExternalDisplayConditionsLibrary
Description
ExternalDisplayConditionsLibrary
enables integration of third-party conditional display systems that control when and to whom email content is shown. This interface allows users to set sophisticated display rules based on recipient attributes, behaviors, segments, or any custom logic. Display conditions enable personalized email experiences by showing or hiding content blocks dynamically based on defined criteria.
Import
typescript
import { ExternalDisplayConditionsLibrary } from '@stripoinc/ui-editor-extensions';
Methods
getCategoryName()
Returns the name of the display condition category.
typescript
getCategoryName(): string
Returns
string
- The name of the category
openExternalDisplayConditionsDialog()
Opens the display conditions configuration dialog.
typescript
openExternalDisplayConditionsDialog(
currentCondition: DisplayCondition,
successCallback: ExternalDisplayConditionSelectedCB,
cancelCallback: () => void
): void
Parameters
Name | Type | Description |
---|---|---|
currentCondition | DisplayCondition | Current display condition to edit |
successCallback | ExternalDisplayConditionSelectedCB | Called with updated condition |
cancelCallback | () => void | Called when dialog is cancelled |
getIsContextActionEnabled()
Determines if the context action for this library is enabled.
typescript
getIsContextActionEnabled(): boolean
Returns
boolean
- True if the context action should be shown
getContextActionIndex()
Gets the display position for the context action.
typescript
getContextActionIndex(): number
Returns
number
- Index position for the context action in the menu
Type Definitions
DisplayCondition
Represents a display condition configuration.
typescript
interface DisplayCondition {
id: number; // ID of the condition
name: string; // name of the condition
description: string; // description of the condition
beforeScript: string; // script to run before the condition
afterScript: string; // script to run after the condition
extraData?: string; // extra custom data, can be set by user
}
ExternalDisplayConditionSelectedCB
Callback for when a condition is selected.
typescript
type ExternalDisplayConditionSelectedCB = (condition: DisplayCondition) => void