// tslint:disable import { AtomXFControl } from "web-atoms-core/dist/xf/controls/AtomXFControl"; import { AtomBridge } from "web-atoms-core/dist/core/AtomBridge"; import SearchPageViewModel from "./view-models/SearchPageViewModel"; export default class Root extends AtomXFControl { constructor(app: any, e?: any) { super(app, e || AtomBridge.instance.create("Rg.Plugins.Popup.Pages.PopupPage")); } protected create(): void { super.create(); this.loadXaml(` `); const e1 = this.find("e1"); this.bind(e1, "Text", [["viewModel","comboBox","searchText"]], true ); this.runAfterInit( () => this.setLocalValue(e1, "IsVisible", (((this.viewModel) ? this.viewModel.comboBox : undefined) ? this.viewModel.comboBox.searchEnabled : undefined) ) ); const e2 = this.find("e2"); this.setLocalValue(e2, "ItemTemplate", () => new (Root_e2_Creator(this))(this.app)); this.runAfterInit( () => this.setLocalValue(e2, "ItemsSource", (((this.viewModel) ? this.viewModel.comboBox : undefined) ? this.viewModel.comboBox.items : undefined)) ); const e3 = this.find("e3"); this.setLocalValue(e3, "viewModel", this.resolve(SearchPageViewModel) ); this.bind(e3, "Title", [["viewModel","title"]], false , null ); } } function Root_e2_Creator(__creator: any): any { return class Root_e2 extends AtomXFControl { constructor(app: any, e?: any) { super(app, e || AtomBridge.instance.create("WebAtoms.AtomView")); } protected create(): void { super.create(); this.loadXaml(` `); const e1 = this.find("e1"); this.runAfterInit( () => this.setLocalValue(e1, "DataTemplate", (((this.viewModel) ? this.viewModel.comboBox : undefined) ? this.viewModel.comboBox.itemTemplate : undefined) ) ); this.runAfterInit( () => this.setLocalValue(e1, "eventTapGesture", () => (this.viewModel).close((this.data)) ) ); } } ; }