Skip to main content

@dialstack/sdk-dev / react/src/dial-plan / DialPlanProps

Interface: DialPlanProps

Defined in: sdk/react/src/react/DialPlan.tsx:76

Properties​

className?​

TypeScript
className?: string;

Defined in: sdk/react/src/react/DialPlan.tsx:100

Optional CSS class name for the container


dialPlanId?​

TypeScript
dialPlanId?: string;

Defined in: sdk/react/src/react/DialPlan.tsx:78

The ID of the dial plan to fetch and display


locale?​

TypeScript
locale?: DialPlanLocale;

Defined in: sdk/react/src/react/DialPlan.tsx:82

Locale strings for node labels and exits


mode?​

TypeScript
mode?: DialPlanMode;

Defined in: sdk/react/src/react/DialPlan.tsx:80

Display mode: 'view' (default), 'edit', or 'preview' (static thumbnail)


onCreateResource?​

TypeScript
onCreateResource?: (type, options?) => Promise<
| {
extension_number?: string;
id: string;
name: string;
}
| undefined>;

Defined in: sdk/react/src/react/DialPlan.tsx:109

Optional callback to create a new resource from a config panel select. Provided by the host app. options carries per-type hints (currently notifyEligible for voice apps) so the create dialog can skip choices incompatible with the current edit context.

Parameters​

type​

ResourceType

options?​

ListResourcesOptions

Returns​

Promise< | { extension_number?: string; id: string; name: string; } | undefined>


onDirtyChange?​

TypeScript
onDirtyChange?: (isDirty) => void;

Defined in: sdk/react/src/react/DialPlan.tsx:94

Callback fired when dirty state changes (edit mode)

Parameters​

isDirty​

boolean

Returns​

void


onError?​

TypeScript
onError?: (error) => void;

Defined in: sdk/react/src/react/DialPlan.tsx:96

Alias for onLoadError, used in edit mode

Parameters​

error​

Error

Returns​

void


onLoaderEnd?​

TypeScript
onLoaderEnd?: (dialPlan) => void;

Defined in: sdk/react/src/react/DialPlan.tsx:88

Callback fired when the dial plan finishes loading

Parameters​

dialPlan​

DialPlan

Returns​

void


onLoadError?​

TypeScript
onLoadError?: (error) => void;

Defined in: sdk/react/src/react/DialPlan.tsx:90

Callback fired when there's an error

Parameters​

error​

Error

Returns​

void


onLoaderStart?​

TypeScript
onLoaderStart?: () => void;

Defined in: sdk/react/src/react/DialPlan.tsx:86

Callback fired when the dial plan starts loading

Returns​

void


onNodeClick?​

TypeScript
onNodeClick?: (nodeId, node) => void;

Defined in: sdk/react/src/react/DialPlan.tsx:84

Callback fired when a node is clicked (view mode)

Parameters​

nodeId​

string

node​

DialPlanNode

Returns​

void


onOpenResource?​

TypeScript
onOpenResource?: (resourceId) => void;

Defined in: sdk/react/src/react/DialPlan.tsx:118

Optional callback to show a resource's details, e.g. in a modal or a new tab. Provided by the host app. After the resource may have been edited, call refreshResources() on the ref so the nodes show its new values.

Parameters​

resourceId​

string

Returns​

void


onSave?​

TypeScript
onSave?: (dialPlan) => void;

Defined in: sdk/react/src/react/DialPlan.tsx:92

Callback fired when the dial plan is saved (edit mode)

Parameters​

dialPlan​

DialPlan

Returns​

void


style?​

TypeScript
style?: CSSProperties;

Defined in: sdk/react/src/react/DialPlan.tsx:102

Optional inline styles for the container


theme?​

TypeScript
theme?: "light" | "dark";

Defined in: sdk/react/src/react/DialPlan.tsx:98

Color theme: 'light' (default) or 'dark'