apim-developer-portal1
Version:
API management developer portal
33 lines (27 loc) • 879 B
text/typescript
import * as ko from "knockout";
import template from "./widgetEditorView.html";
import { WidgetEditor } from "@paperbits/common/widgets";
import { Component, OnMounted, Param, Event, OnDestroyed } from "@paperbits/common/ko/decorators";
import { WidgetModel } from "../widgetModel";
import { widgetEditorSelector } from "..";
({
selector: widgetEditorSelector,
template: template
})
export class WidgetEditorViewModel implements WidgetEditor<WidgetModel> {
()
public model: WidgetModel;
()
public onChange: (model: WidgetModel) => void;
()
public async initialize(): Promise<void> {
// Your initialization logic
}
private applyChanges(): void {
this.onChange(this.model);
}
()
public async dispose(): Promise<void> {
// Your cleanup widget logic
}
}