Skip to content

Commit

Permalink
chore(all): prepare release 1.0.0-rc.1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Jul 12, 2016
1 parent d2aa7c8 commit 56ecba3
Show file tree
Hide file tree
Showing 11 changed files with 287 additions and 98 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-templating",
"version": "1.0.0-rc.1.0.0",
"version": "1.0.0-rc.1.0.1",
"description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.",
"keywords": [
"aurelia",
Expand Down
56 changes: 38 additions & 18 deletions dist/amd/aurelia-templating.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
};
}();

var _class4, _temp, _dec, _class5, _dec2, _class6, _dec3, _class7, _dec4, _class8, _dec5, _class9, _class10, _temp2, _dec6, _class11, _class12, _temp3, _class14, _dec7, _class16, _dec8, _class17, _dec9, _class19, _dec10, _class20, _dec11, _class21;
var _class4, _temp, _dec, _class5, _dec2, _class6, _dec3, _class7, _dec4, _class8, _dec5, _class9, _class10, _temp2, _dec6, _class11, _class12, _temp3, _class15, _dec7, _class17, _dec8, _class18, _dec9, _class20, _dec10, _class21, _dec11, _class22;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
Expand Down Expand Up @@ -1499,7 +1499,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
var end = this.lastChild;
var next = void 0;

while (true) {
while (current) {
next = current.nextSibling;
fragment.appendChild(current);

Expand Down Expand Up @@ -2002,7 +2002,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
return ViewSlot;
}();

var ProviderResolver = (0, _aureliaDependencyInjection.resolver)(_class14 = function () {
var ProviderResolver = (0, _aureliaDependencyInjection.resolver)(_class15 = function () {
function ProviderResolver() {

}
Expand All @@ -2013,7 +2013,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
};

return ProviderResolver;
}()) || _class14;
}()) || _class15;

var providerResolverInstance = new ProviderResolver();

Expand Down Expand Up @@ -2370,10 +2370,15 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
applySurrogateInstruction(container, element, this.surrogateInstruction, controllers, bindings, children);
}

if (createInstruction.enhance && fragment.hasAttribute('au-target-id')) {
instructable = fragment;
instruction = instructions[instructable.getAttribute('au-target-id')];
applyInstructions(containers, instructable, instruction, controllers, bindings, children, shadowSlots, partReplacements, resources);
}

for (i = 0, ii = instructables.length; i < ii; ++i) {
instructable = instructables[i];
instruction = instructions[instructable.getAttribute('au-target-id')];

applyInstructions(containers, instructable, instruction, controllers, bindings, children, shadowSlots, partReplacements, resources);
}

Expand Down Expand Up @@ -2466,7 +2471,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
return auShadowSlot;
}

var ViewCompiler = exports.ViewCompiler = (_dec7 = (0, _aureliaDependencyInjection.inject)(BindingLanguage, ViewResources), _dec7(_class16 = function () {
var ViewCompiler = exports.ViewCompiler = (_dec7 = (0, _aureliaDependencyInjection.inject)(BindingLanguage, ViewResources), _dec7(_class17 = function () {
function ViewCompiler(bindingLanguage, resources) {


Expand Down Expand Up @@ -2826,7 +2831,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
};

return ViewCompiler;
}()) || _class16);
}()) || _class17);

var ResourceModule = exports.ResourceModule = function () {
function ResourceModule(moduleId) {
Expand All @@ -2839,6 +2844,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
this.viewStrategy = null;
this.isInitialized = false;
this.onLoaded = null;
this.loadContext = null;
}

ResourceModule.prototype.initialize = function initialize(container) {
Expand Down Expand Up @@ -2881,7 +2887,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli

ResourceModule.prototype.load = function load(container, loadContext) {
if (this.onLoaded !== null) {
return this.onLoaded;
return this.loadContext === loadContext ? Promise.resolve() : this.onLoaded;
}

var main = this.mainResource;
Expand All @@ -2901,6 +2907,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
}
}

this.loadContext = loadContext;
this.onLoaded = Promise.all(loads);
return this.onLoaded;
};
Expand Down Expand Up @@ -3100,7 +3107,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
return ProxyViewFactory;
}();

var ViewEngine = exports.ViewEngine = (_dec8 = (0, _aureliaDependencyInjection.inject)(_aureliaLoader.Loader, _aureliaDependencyInjection.Container, ViewCompiler, ModuleAnalyzer, ViewResources), _dec8(_class17 = function () {
var ViewEngine = exports.ViewEngine = (_dec8 = (0, _aureliaDependencyInjection.inject)(_aureliaLoader.Loader, _aureliaDependencyInjection.Container, ViewCompiler, ModuleAnalyzer, ViewResources), _dec8(_class18 = function () {
function ViewEngine(loader, container, viewCompiler, moduleAnalyzer, appResources) {


Expand Down Expand Up @@ -3258,7 +3265,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
};

return ViewEngine;
}()) || _class17);
}()) || _class18);

var Controller = exports.Controller = function () {
function Controller(behavior, instruction, viewModel, elementEvents) {
Expand Down Expand Up @@ -3430,7 +3437,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
return Controller;
}();

var BehaviorPropertyObserver = exports.BehaviorPropertyObserver = (_dec9 = (0, _aureliaBinding.subscriberCollection)(), _dec9(_class19 = function () {
var BehaviorPropertyObserver = exports.BehaviorPropertyObserver = (_dec9 = (0, _aureliaBinding.subscriberCollection)(), _dec9(_class20 = function () {
function BehaviorPropertyObserver(taskQueue, obj, propertyName, selfSubscriber, initialValue) {


Expand Down Expand Up @@ -3488,7 +3495,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
};

return BehaviorPropertyObserver;
}()) || _class19);
}()) || _class20);


function getObserver(behavior, instance, name) {
Expand Down Expand Up @@ -4331,7 +4338,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
return context.viewModel.activate(context.model) || Promise.resolve();
}

var CompositionEngine = exports.CompositionEngine = (_dec10 = (0, _aureliaDependencyInjection.inject)(ViewEngine, ViewLocator), _dec10(_class20 = function () {
var CompositionEngine = exports.CompositionEngine = (_dec10 = (0, _aureliaDependencyInjection.inject)(ViewEngine, ViewLocator), _dec10(_class21 = function () {
function CompositionEngine(viewEngine, viewLocator) {


Expand Down Expand Up @@ -4478,7 +4485,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
};

return CompositionEngine;
}()) || _class20);
}()) || _class21);

var ElementConfigResource = exports.ElementConfigResource = function () {
function ElementConfigResource() {
Expand Down Expand Up @@ -4601,7 +4608,13 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
function processAttributes(processor) {
return function (t) {
var r = _aureliaMetadata.metadata.getOrCreateOwn(_aureliaMetadata.metadata.resource, HtmlBehaviorResource, t);
r.processAttributes = processor;
r.processAttributes = function (compiler, resources, node, attributes, elementInstruction) {
try {
processor(compiler, resources, node, attributes, elementInstruction);
} catch (error) {
LogManager.getLogger('templating').error(error);
}
};
};
}

Expand All @@ -4612,7 +4625,14 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
function processContent(processor) {
return function (t) {
var r = _aureliaMetadata.metadata.getOrCreateOwn(_aureliaMetadata.metadata.resource, HtmlBehaviorResource, t);
r.processContent = processor || doNotProcessContent;
r.processContent = processor ? function (compiler, resources, node, instruction) {
try {
return processor(compiler, resources, node, instruction);
} catch (error) {
LogManager.getLogger('templating').error(error);
return false;
}
} : doNotProcessContent;
};
}

Expand Down Expand Up @@ -4655,7 +4675,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
return target ? deco(target) : deco;
}

var TemplatingEngine = exports.TemplatingEngine = (_dec11 = (0, _aureliaDependencyInjection.inject)(_aureliaDependencyInjection.Container, ModuleAnalyzer, ViewCompiler, CompositionEngine), _dec11(_class21 = function () {
var TemplatingEngine = exports.TemplatingEngine = (_dec11 = (0, _aureliaDependencyInjection.inject)(_aureliaDependencyInjection.Container, ModuleAnalyzer, ViewCompiler, CompositionEngine), _dec11(_class22 = function () {
function TemplatingEngine(container, moduleAnalyzer, viewCompiler, compositionEngine) {


Expand Down Expand Up @@ -4695,5 +4715,5 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli
};

return TemplatingEngine;
}()) || _class21);
}()) || _class22);
});
25 changes: 25 additions & 0 deletions dist/aurelia-templating.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,31 @@ export declare class ViewResources {
}
export declare class View {

/**
* The Dependency Injection Container that was used to create this View instance.
*/
container: Container;

/**
* The ViewFactory that built this View instance.
*/
viewFactory: ViewFactory;

/**
* Contains the DOM Nodes which represent this View. If the view was created via the "enhance" API, this will be an Element, otherwise it will be a DocumentFragment. If not created via "enhance" then the fragment will only contain nodes when the View is detached from the DOM.
*/
fragment: DocumentFragment | Element;

/**
* The primary binding context that this view is data-bound to.
*/
bindingContext: Object;

/**
* The override context which contains properties capable of overriding those found on the binding context.
*/
overrideContext: Object;

/**
* Creates a View instance.
* @param container The container from which the view was created.
Expand Down
56 changes: 51 additions & 5 deletions dist/aurelia-templating.js
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,31 @@ interface ViewNode {
}

export class View {
/**
* The Dependency Injection Container that was used to create this View instance.
*/
container: Container;

/**
* The ViewFactory that built this View instance.
*/
viewFactory: ViewFactory;

/**
* Contains the DOM Nodes which represent this View. If the view was created via the "enhance" API, this will be an Element, otherwise it will be a DocumentFragment. If not created via "enhance" then the fragment will only contain nodes when the View is detached from the DOM.
*/
fragment: DocumentFragment | Element;

/**
* The primary binding context that this view is data-bound to.
*/
bindingContext: Object;

/**
* The override context which contains properties capable of overriding those found on the binding context.
*/
overrideContext: Object;

/**
* Creates a View instance.
* @param container The container from which the view was created.
Expand Down Expand Up @@ -1951,7 +1976,7 @@ export class View {
let end = this.lastChild;
let next;

while (true) {
while (current) {
next = current.nextSibling;
fragment.appendChild(current);

Expand Down Expand Up @@ -2928,10 +2953,15 @@ export class ViewFactory {
applySurrogateInstruction(container, element, this.surrogateInstruction, controllers, bindings, children);
}

if (createInstruction.enhance && fragment.hasAttribute('au-target-id')) {
instructable = fragment;
instruction = instructions[instructable.getAttribute('au-target-id')];
applyInstructions(containers, instructable, instruction, controllers, bindings, children, shadowSlots, partReplacements, resources);
}

for (i = 0, ii = instructables.length; i < ii; ++i) {
instructable = instructables[i];
instruction = instructions[instructable.getAttribute('au-target-id')];

applyInstructions(containers, instructable, instruction, controllers, bindings, children, shadowSlots, partReplacements, resources);
}

Expand Down Expand Up @@ -3424,6 +3454,7 @@ export class ResourceModule {
this.viewStrategy = null;
this.isInitialized = false;
this.onLoaded = null;
this.loadContext = null;
}

/**
Expand Down Expand Up @@ -3481,7 +3512,8 @@ export class ResourceModule {
*/
load(container: Container, loadContext?: ResourceLoadContext): Promise<void> {
if (this.onLoaded !== null) {
return this.onLoaded;
//if it's trying to load the same thing again during the same load, this is a circular dep, so just resolve
return this.loadContext === loadContext ? Promise.resolve() : this.onLoaded;
}

let main = this.mainResource;
Expand All @@ -3501,6 +3533,7 @@ export class ResourceModule {
}
}

this.loadContext = loadContext;
this.onLoaded = Promise.all(loads);
return this.onLoaded;
}
Expand Down Expand Up @@ -5537,7 +5570,13 @@ export function useShadowDOM(targetOrOptions?): any {
export function processAttributes(processor: Function): any {
return function(t) {
let r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);
r.processAttributes = processor;
r.processAttributes = function(compiler, resources, node, attributes, elementInstruction) {
try {
processor(compiler, resources, node, attributes, elementInstruction);
} catch (error) {
LogManager.getLogger('templating').error(error);
}
};
};
}

Expand All @@ -5554,7 +5593,14 @@ function doNotProcessContent() { return false; }
export function processContent(processor: boolean | Function): any {
return function(t) {
let r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);
r.processContent = processor || doNotProcessContent;
r.processContent = processor ? function(compiler, resources, node, instruction) {
try {
return processor(compiler, resources, node, instruction);
} catch (error) {
LogManager.getLogger('templating').error(error);
return false;
}
} : doNotProcessContent;
};
}

Expand Down
Loading

0 comments on commit 56ecba3

Please sign in to comment.