Skip to content

Commit 1b716e0

Browse files
chore(all): prepare release 0.15.0
1 parent 6ab627d commit 1b716e0

15 files changed

+2712
-1056
lines changed

bower.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-templating",
3-
"version": "0.14.4",
3+
"version": "0.15.0",
44
"description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.",
55
"keywords": [
66
"aurelia",
@@ -19,14 +19,14 @@
1919
"url": "http://github.com/aurelia/templating"
2020
},
2121
"dependencies": {
22-
"aurelia-binding": "^0.8.6",
23-
"aurelia-dependency-injection": "^0.9.2",
24-
"aurelia-html-template-element": "^0.2.0",
25-
"aurelia-loader": "^0.8.5",
26-
"aurelia-logging": "^0.6.4",
27-
"aurelia-metadata": "^0.7.3",
28-
"aurelia-path": "^0.8.1",
29-
"aurelia-task-queue": "^0.6.2",
22+
"aurelia-binding": "^0.9.0",
23+
"aurelia-dependency-injection": "^0.10.0",
24+
"aurelia-html-template-element": "^0.3.0",
25+
"aurelia-loader": "^0.9.0",
26+
"aurelia-logging": "^0.7.0",
27+
"aurelia-metadata": "^0.8.0",
28+
"aurelia-path": "^0.9.0",
29+
"aurelia-task-queue": "^0.7.0",
3030
"core-js": "zloirock/core-js"
3131
}
3232
}

build/tasks/prepare-release.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ gulp.task('changelog', function(callback) {
2727
gulp.task('prepare-release', function(callback){
2828
return runSequence(
2929
'build',
30-
'lint',
30+
//'lint',
3131
'bump-version',
3232
'doc',
3333
'changelog',

config.js

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,35 @@ System.config({
1414
},
1515

1616
map: {
17-
"aurelia-binding": "github:aurelia/binding@0.8.6",
18-
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.9.2",
19-
"aurelia-html-template-element": "github:aurelia/html-template-element@0.2.0",
20-
"aurelia-loader": "github:aurelia/loader@0.8.5",
21-
"aurelia-logging": "github:aurelia/logging@0.6.4",
22-
"aurelia-metadata": "github:aurelia/metadata@0.7.3",
23-
"aurelia-path": "github:aurelia/path@0.8.1",
24-
"aurelia-task-queue": "github:aurelia/task-queue@0.6.2",
17+
"aurelia-binding": "github:aurelia/binding@0.9.0",
18+
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.0",
19+
"aurelia-html-template-element": "github:aurelia/html-template-element@0.3.0",
20+
"aurelia-loader": "github:aurelia/loader@0.9.0",
21+
"aurelia-logging": "github:aurelia/logging@0.7.0",
22+
"aurelia-metadata": "github:aurelia/metadata@0.8.0",
23+
"aurelia-path": "github:aurelia/path@0.9.0",
24+
"aurelia-task-queue": "github:aurelia/task-queue@0.7.0",
2525
"babel": "npm:babel-core@5.2.2",
2626
"babel-runtime": "npm:babel-runtime@5.2.2",
27-
"core-js": "npm:core-js@1.1.3",
28-
"github:aurelia/binding@0.8.6": {
29-
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.9.2",
30-
"aurelia-metadata": "github:aurelia/metadata@0.7.3",
31-
"aurelia-task-queue": "github:aurelia/task-queue@0.6.2",
27+
"core-js": "npm:core-js@1.1.4",
28+
"github:aurelia/binding@0.9.0": {
29+
"aurelia-dependency-injection": "github:aurelia/dependency-injection@0.10.0",
30+
"aurelia-metadata": "github:aurelia/metadata@0.8.0",
31+
"aurelia-task-queue": "github:aurelia/task-queue@0.7.0",
3232
"core-js": "npm:core-js@0.9.18"
3333
},
34-
"github:aurelia/dependency-injection@0.9.2": {
35-
"aurelia-logging": "github:aurelia/logging@0.6.4",
36-
"aurelia-metadata": "github:aurelia/metadata@0.7.3",
34+
"github:aurelia/dependency-injection@0.10.0": {
35+
"aurelia-logging": "github:aurelia/logging@0.7.0",
36+
"aurelia-metadata": "github:aurelia/metadata@0.8.0",
3737
"core-js": "npm:core-js@0.9.18"
3838
},
39-
"github:aurelia/loader@0.8.5": {
40-
"aurelia-html-template-element": "github:aurelia/html-template-element@0.2.0",
41-
"aurelia-metadata": "github:aurelia/metadata@0.7.3",
42-
"aurelia-path": "github:aurelia/path@0.8.1",
43-
"core-js": "npm:core-js@0.9.18",
44-
"webcomponentsjs": "github:webcomponents/webcomponentsjs@0.6.3"
39+
"github:aurelia/loader@0.9.0": {
40+
"aurelia-html-template-element": "github:aurelia/html-template-element@0.3.0",
41+
"aurelia-metadata": "github:aurelia/metadata@0.8.0",
42+
"aurelia-path": "github:aurelia/path@0.9.0",
43+
"core-js": "github:zloirock/core-js@0.8.4"
4544
},
46-
"github:aurelia/metadata@0.7.3": {
45+
"github:aurelia/metadata@0.8.0": {
4746
"core-js": "npm:core-js@0.9.18"
4847
},
4948
"github:jspm/nodelibs-process@0.1.1": {
@@ -54,7 +53,7 @@ System.config({
5453
"process": "github:jspm/nodelibs-process@0.1.1",
5554
"systemjs-json": "github:systemjs/plugin-json@0.1.0"
5655
},
57-
"npm:core-js@1.1.3": {
56+
"npm:core-js@1.1.4": {
5857
"fs": "github:jspm/nodelibs-fs@0.1.2",
5958
"process": "github:jspm/nodelibs-process@0.1.1",
6059
"systemjs-json": "github:systemjs/plugin-json@0.1.0"

dist/amd/aurelia-templating.d.ts

Lines changed: 67 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,38 @@ declare module 'aurelia-templating' {
44
import { Metadata, Origin, Decorators } from 'aurelia-metadata';
55
import { relativeToFile } from 'aurelia-path';
66
import { TemplateRegistryEntry, Loader } from 'aurelia-loader';
7-
import { ValueConverter, bindingMode, ObserverLocator, BindingExpression, Binding, ValueConverterResource, EventManager } from 'aurelia-binding';
8-
import { Container } from 'aurelia-dependency-injection';
7+
import { ValueConverter, Binding, bindingMode, ObserverLocator, BindingExpression, ValueConverterResource, EventManager } from 'aurelia-binding';
8+
import { Container, inject } from 'aurelia-dependency-injection';
99
import { TaskQueue } from 'aurelia-task-queue';
10-
11-
// this will be replaced soon
1210
export interface ViewCreateInstruction {
1311
suppressBind?: boolean;
1412
systemControlled?: boolean;
1513
enhance?: boolean;
1614
partReplacements?: Object;
1715
initiatedByBehavior?: boolean;
1816
}
17+
export interface ViewEngineHooks {
18+
beforeCompile(content: DocumentFragment, resources: ViewResources, instruction: ViewCompileInstruction): void;
19+
afterCompile(viewFactory: ViewFactory): void;
20+
beforeCreate(viewFactory: ViewFactory, container: Container, content: DocumentFragment, instruction: ViewCreateInstruction, bindingContext?: Object): void;
21+
afterCreate(view: View): void;
22+
}
23+
24+
// NOTE: Adding a fragment to the document causes the nodes to be removed from the fragment.
25+
// NOTE: Adding to the fragment, causes the nodes to be removed from the document.
26+
export interface ViewNode {
27+
bind(bindingContext: Object, systemUpdate?: boolean): void;
28+
attached(): void;
29+
detached(): void;
30+
unbind(): void;
31+
}
1932
export let DOMBoundary: any;
2033
export let hasShadowDOM: any;
2134
export function nextElementSibling(element: Node): Element;
2235
export function createTemplateFromMarkup(markup: string): Element;
2336
export function replaceNode(newNode: Node, node: Node, parentNode: Node): void;
2437
export function removeNode(node: Node, parentNode: Node): void;
38+
export function injectStyles(styles: string, destination?: Element, prepend?: boolean): any;
2539
export const animationEvent: any;
2640
export class Animator {
2741
static configureDefault(container: any, animatorInstance: any): any;
@@ -112,14 +126,14 @@ declare module 'aurelia-templating' {
112126
}
113127
export class ViewCompileInstruction {
114128
static normal: any;
115-
constructor(targetShadowDOM?: boolean, compileSurrogate?: boolean, beforeCompile?: boolean);
129+
constructor(targetShadowDOM?: boolean, compileSurrogate?: boolean);
116130
}
117131
export class BehaviorInstruction {
118132
static normal: any;
119133
static contentSelector: any;
120134
static element(node: Node, type: HtmlBehaviorResource): BehaviorInstruction;
121135
static attribute(attrName: string, type?: HtmlBehaviorResource): BehaviorInstruction;
122-
static dynamic(host: any, executionContext: any, viewFactory: any): any;
136+
static dynamic(host: any, bindingContext: any, viewFactory: any): any;
123137
constructor(suppressBind?: boolean);
124138
}
125139
export class TargetInstruction {
@@ -165,7 +179,12 @@ declare module 'aurelia-templating' {
165179
}
166180
export class ViewResources {
167181
constructor(parent?: ViewResources, viewUrl?: string);
168-
getBindingLanguage(bindingLanguageFallback: any): any;
182+
onBeforeCompile(content: DocumentFragment, resources: ViewResources, instruction: ViewCompileInstruction): void;
183+
onAfterCompile(viewFactory: ViewFactory): void;
184+
onBeforeCreate(viewFactory: ViewFactory, container: Container, content: DocumentFragment, instruction: ViewCreateInstruction, bindingContext?: Object): void;
185+
onAfterCreate(view: View): void;
186+
registerViewEngineHooks(hooks: ViewEngineHooks): void;
187+
getBindingLanguage(bindingLanguageFallback: BindingLanguage): BindingLanguage;
169188
patchInParent(newParent: ViewResources): void;
170189
relativeToView(path: string): string;
171190
registerElement(tagName: string, behavior: HtmlBehaviorResource): void;
@@ -176,20 +195,18 @@ declare module 'aurelia-templating' {
176195
registerValueConverter(name: string, valueConverter: ValueConverter): void;
177196
getValueConverter(name: string): ValueConverter;
178197
}
179-
180-
// NOTE: Adding a fragment to the document causes the nodes to be removed from the fragment.
181-
// NOTE: Adding to the fragment, causes the nodes to be removed from the document.
182198
export class View {
183-
constructor(container: any, fragment: any, behaviors: any, bindings: any, children: any, systemControlled: any, contentSelectors: any);
184-
created(): any;
185-
bind(executionContext: any, systemUpdate: any): any;
186-
addBinding(binding: any): any;
187-
unbind(): any;
188-
insertNodesBefore(refNode: any): any;
189-
appendNodesTo(parent: any): any;
190-
removeNodes(): any;
191-
attached(): any;
192-
detached(): any;
199+
constructor(viewFactory: ViewFactory, container: Container, fragment: DocumentFragment, behaviors: BehaviorInstance[], bindings: Binding[], children: ViewNode[], systemControlled: boolean, contentSelectors: ContentSelector[]);
200+
returnToCache(): void;
201+
created(): void;
202+
bind(bindingContext: Object, systemUpdate?: boolean): void;
203+
addBinding(binding: Binding): void;
204+
unbind(): void;
205+
insertNodesBefore(refNode: Node): void;
206+
appendNodesTo(parent: Element): void;
207+
removeNodes(): void;
208+
attached(): void;
209+
detached(): void;
193210
}
194211
export class ContentSelector {
195212
static applySelectors(view: any, contentSelectors: any, callback: any): any;
@@ -201,35 +218,36 @@ declare module 'aurelia-templating' {
201218
removeAt(index: any, fragment: any): any;
202219
}
203220
export class ViewSlot {
204-
constructor(anchor: any, anchorIsContainer: any, executionContext: any, animator?: any);
205-
transformChildNodesIntoView(): any;
206-
bind(executionContext: any): any;
207-
unbind(): any;
208-
add(view: any): any;
209-
insert(index: any, view: any): any;
210-
remove(view: any): any;
211-
removeAt(index: any): any;
212-
removeAll(): any;
213-
swap(view: any): any;
214-
attached(): any;
215-
detached(): any;
216-
installContentSelectors(contentSelectors: any): any;
217-
contentSelectorAdd(view: any): any;
218-
contentSelectorInsert(index: any, view: any): any;
219-
contentSelectorRemove(view: any): any;
220-
contentSelectorRemoveAt(index: any): any;
221-
contentSelectorRemoveAll(): any;
221+
constructor(anchor: Node, anchorIsContainer: boolean, bindingContext?: Object, animator?: Animator);
222+
transformChildNodesIntoView(): void;
223+
bind(bindingContext: Object): void;
224+
unbind(): void;
225+
add(view: View): void;
226+
insert(index: number, view: View): void | Promise<any>;
227+
remove(view: View, returnToCache?: boolean, skipAnimation?: boolean): void | Promise<View>;
228+
removeAt(index: number, returnToCache?: boolean, skipAnimation?: boolean): void | Promise<View>;
229+
removeAll(returnToCache?: boolean, skipAnimation?: boolean): void | Promise<any>;
230+
swap(view: View, returnToCache?: boolean): void | Promise<any>;
231+
attached(): void;
232+
detached(): void;
233+
installContentSelectors(contentSelectors: ContentSelector[]): void;
222234
}
223235
export class BoundViewFactory {
224-
constructor(parentContainer: Container, viewFactory: ViewFactory, executionContext: Object, partReplacements?: Object);
225-
create(executionContext?: Object): View;
236+
constructor(parentContainer: Container, viewFactory: ViewFactory, bindingContext: Object, partReplacements?: Object);
237+
create(bindingContext?: Object): View;
238+
isCaching(): any;
239+
setCacheSize(size: number | string, doNotOverrideIfAlreadySet: boolean): void;
240+
getCachedView(): View;
241+
returnViewToCache(view: View): void;
226242
}
227243
export class ViewFactory {
228244
constructor(template: DocumentFragment, instructions: Object, resources: ViewResources);
229-
create(container: Container, executionContext?: Object, createInstruction?: ViewCreateInstruction, element?: Element): View;
245+
setCacheSize(size: number | string, doNotOverrideIfAlreadySet: boolean): void;
246+
getCachedView(): View;
247+
returnViewToCache(view: View): void;
248+
create(container: Container, bindingContext?: Object, createInstruction?: ViewCreateInstruction, element?: Element): View;
230249
}
231250
export class ViewCompiler {
232-
static inject(): any;
233251
constructor(bindingLanguage: BindingLanguage, resources: ViewResources);
234252
compile(source: Element | DocumentFragment | string, resources?: ViewResources, compileInstruction?: ViewCompileInstruction): ViewFactory;
235253
compileNode(node: any, resources: any, instructions: any, parentNode: any, parentInjectorId: any, targetLightDOM: any): any;
@@ -243,14 +261,15 @@ declare module 'aurelia-templating' {
243261
export class ViewEngine {
244262
static inject(): any;
245263
constructor(loader: Loader, container: Container, viewCompiler: ViewCompiler, moduleAnalyzer: ModuleAnalyzer, appResources: ViewResources);
264+
addResourcePlugin(extension: string, implementation: string): any;
246265
enhance(container: Container, element: Element, resources: ViewResources, bindingContext?: Object): View;
247266
loadViewFactory(urlOrRegistryEntry: string | TemplateRegistryEntry, compileInstruction?: ViewCompileInstruction, loadContext?: ResourceLoadContext): Promise<ViewFactory>;
248267
loadTemplateResources(viewRegistryEntry: TemplateRegistryEntry, compileInstruction?: ViewCompileInstruction, loadContext?: ResourceLoadContext): Promise<ViewResources>;
249268
importViewModelResource(moduleImport: string, moduleMember: string): Promise<ResourceDescription>;
250269
importViewResources(moduleIds: string[], names: string[], resources: ViewResources, compileInstruction?: ViewCompileInstruction, loadContext?: ResourceLoadContext): Promise<ViewResources>;
251270
}
252271
export class BehaviorInstance {
253-
constructor(behavior: any, executionContext: any, instruction: any);
272+
constructor(behavior: any, bindingContext: any, instruction: any);
254273
static createForUnitTest(type: any, attributes: any, bindingContext: any): any;
255274
created(context: any): any;
256275
bind(context: any): any;
@@ -263,9 +282,9 @@ declare module 'aurelia-templating' {
263282
registerWith(target: any, behavior: any, descriptor: any): any;
264283
configureDescriptor(behavior: any, descriptor: any): any;
265284
defineOn(target: any, behavior: any): any;
266-
createObserver(executionContext: any): any;
267-
initialize(executionContext: any, observerLookup: any, attributes: any, behaviorHandlesBind: any, boundProperties: any): any;
268-
createDynamicProperty(executionContext: any, observerLookup: any, behaviorHandlesBind: any, name: any, attribute: any, boundProperties: any): any;
285+
createObserver(bindingContext: any): any;
286+
initialize(bindingContext: any, observerLookup: any, attributes: any, behaviorHandlesBind: any, boundProperties: any): any;
287+
createDynamicProperty(bindingContext: any, observerLookup: any, behaviorHandlesBind: any, name: any, attribute: any, boundProperties: any): any;
269288
}
270289
class BehaviorPropertyObserver {
271290
constructor(taskQueue: any, obj: any, propertyName: any, selfSubscriber: any, initialValue: any);
@@ -329,9 +348,10 @@ declare module 'aurelia-templating' {
329348
load(container: any, target: any): any;
330349
register(): any;
331350
}
351+
export function resource(instance: any): any;
332352
export function behavior(override: any): any;
333353
export function customElement(name: any): any;
334-
export function customAttribute(name: any, defaultBindingMode: any): any;
354+
export function customAttribute(name: any, defaultBindingMode?: any): any;
335355
export function templateController(target: any): any;
336356
export function bindable(nameOrConfigOrTarget?: any, key?: any, descriptor?: any): any;
337357
export function dynamicOptions(target: any): any;

0 commit comments

Comments
 (0)