Skip to content

Interface: PanelModel ​

Defined in: panel/model.ts:48

A model of the settings panel that has no dependency on a UI library.

Properties ​

PropertyModifierTypeDescriptionDefined in
groupsreadonlyreadonly PanelGroup[]The groups with the current values. Each read makes a new snapshot.panel/model.ts:50

Methods ​

exportJson() ​

ts
exportJson(): string;

Defined in: panel/model.ts:56

Return the configuration document as formatted JSON.

Returns ​

string


importJson() ​

ts
importJson(text): boolean;

Defined in: panel/model.ts:58

Import a configuration document from JSON text. Returns false if the text is not valid JSON.

Parameters ​

ParameterType
textstring

Returns ​

boolean


reset() ​

ts
reset(): void;

Defined in: panel/model.ts:54

Remove all changes.

Returns ​

void


set() ​

ts
set(path, value): boolean;

Defined in: panel/model.ts:52

Set the value at the path section.field. Returns false if the value is not valid.

Parameters ​

ParameterType
pathstring
valueunknown

Returns ​

boolean


subscribe() ​

ts
subscribe(listener): () => void;

Defined in: panel/model.ts:60

Call the listener after each configuration change. Returns a function that removes the listener.

Parameters ​

ParameterType
listener() => void

Returns ​

() => void