Rename the files

This commit is contained in:
Panayot Cankov
2016-05-20 12:11:27 +03:00
parent ca3c2877c2
commit e135c20b14
803 changed files with 1077 additions and 648 deletions

View File

@@ -0,0 +1,5 @@
<tc:TemplateView id="template-view" xmlns:tc="xml-declaration/template-builder-tests/template-view">
<tc:TemplateView.template>
<tc:TemplateView text="Click!" test="test" />
</tc:TemplateView.template>
</tc:TemplateView>

View File

@@ -0,0 +1,2 @@
// Our unit test will set this function and expect it to be set as a handler on a View in the XML.
export var test: (args: any) => void;

View File

@@ -0,0 +1,4 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:fragment="xml-declaration/template-builder-tests">
<fragment:event-in-codeless-fragment-the-fragment />
</Page>

View File

@@ -0,0 +1,2 @@
// Our unit test will set this function and expect it to be set as a handler on a View in the XML.
export var test: (args: any) => void;

View File

@@ -0,0 +1,8 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:tc="xml-declaration/template-builder-tests/template-view">
<tc:TemplateView id="template-view">
<tc:TemplateView.template>
<tc:TemplateView text="Click!" test="test" />
</tc:TemplateView.template>
</tc:TemplateView>
</Page>

View File

@@ -0,0 +1,8 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:tc="xml-declaration/template-builder-tests/template-view">
<tc:TemplateView id="template-view">
<tc:TemplateView.template>
<Button text="Click!" />
</tc:TemplateView.template>
</tc:TemplateView>
</Page>

View File

@@ -0,0 +1,35 @@
import {Template} from "ui/core/view"
import {Property, PropertyMetadataSettings} from "ui/core/dependency-observable"
import * as proxy from "ui/core/proxy"
import { LayoutBase } from "ui/layouts/layout-base"
import { parse } from "ui/builder"
export module knownTemplates {
export var template = "template";
}
export class TemplateView extends LayoutBase {
public static templateProperty = new Property(
"template",
"TemplateView",
new proxy.PropertyMetadata(
undefined,
PropertyMetadataSettings.AffectsLayout,
null
)
);
public static testEvent: string = "test";
get template(): string | Template {
return this._getValue(TemplateView.templateProperty);
}
set template(value: string | Template) {
this._setValue(TemplateView.templateProperty, value);
}
public parseTemplate() {
this.addChild(parse(this.template));
}
}