From b43f292afc5ec392461e7bd1774998e7ffd4bfee Mon Sep 17 00:00:00 2001 From: EisenbergEffect Date: Sun, 15 Oct 2017 23:01:05 -0700 Subject: [PATCH] chore(all): prepare release 1.6.0 --- bower.json | 2 +- dist/amd/aurelia-templating.js | 17 ++++++++++++++--- dist/aurelia-templating.js | 17 ++++++++++++++--- dist/commonjs/aurelia-templating.js | 17 ++++++++++++++--- dist/es2015/aurelia-templating.js | 18 +++++++++++++++--- dist/native-modules/aurelia-templating.js | 17 ++++++++++++++--- dist/system/aurelia-templating.js | 19 +++++++++++++++---- doc/CHANGELOG.md | 16 ++++++++++++++++ package.json | 2 +- 9 files changed, 104 insertions(+), 21 deletions(-) diff --git a/bower.json b/bower.json index dca71fb3..337cd0b5 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating", - "version": "1.5.0", + "version": "1.6.0", "description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-templating.js b/dist/amd/aurelia-templating.js index 10a9554b..797f5b5f 100644 --- a/dist/amd/aurelia-templating.js +++ b/dist/amd/aurelia-templating.js @@ -2828,6 +2828,8 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli auTargetID = makeIntoInstructionTarget(node); instructions[auTargetID] = TargetInstruction.lifting(parentInjectorId, liftingInstruction); } else { + var skipContentProcessing = false; + if (expressions.length || behaviorInstructions.length) { injectorId = behaviorInstructions.length ? getNextInjectorId() : false; @@ -2835,6 +2837,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli instruction = behaviorInstructions[i]; instruction.type.compile(this, resources, node, instruction, parentNode); providers.push(instruction.type.target); + skipContentProcessing = skipContentProcessing || instruction.skipContentProcessing; } for (i = 0, ii = expressions.length; i < ii; ++i) { @@ -2848,7 +2851,7 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli instructions[auTargetID] = TargetInstruction.normal(injectorId, parentInjectorId, providers, behaviorInstructions, expressions, elementInstruction); } - if (elementInstruction && elementInstruction.skipContentProcessing) { + if (skipContentProcessing) { return node.nextSibling; } @@ -3167,6 +3170,8 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli return ProxyViewFactory; }(); + var auSlotBehavior = null; + var ViewEngine = exports.ViewEngine = (_dec8 = (0, _aureliaDependencyInjection.inject)(_aureliaLoader.Loader, _aureliaDependencyInjection.Container, ViewCompiler, ModuleAnalyzer, ViewResources), _dec8(_class14 = (_temp4 = _class15 = function () { function ViewEngine(loader, container, viewCompiler, moduleAnalyzer, appResources) { @@ -3178,8 +3183,12 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli this.appResources = appResources; this._pluginMap = {}; - var auSlotBehavior = new HtmlBehaviorResource(); - auSlotBehavior.attributeName = 'au-slot'; + if (auSlotBehavior === null) { + auSlotBehavior = new HtmlBehaviorResource(); + auSlotBehavior.attributeName = 'au-slot'; + _aureliaMetadata.metadata.define(_aureliaMetadata.metadata.resource, auSlotBehavior, SlotCustomAttribute); + } + auSlotBehavior.initialize(container, SlotCustomAttribute); auSlotBehavior.register(appResources); } @@ -4046,6 +4055,8 @@ define(['exports', 'aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aureli } else { instruction.skipContentProcessing = true; } + } else if (!this.processContent(compiler, resources, node, instruction)) { + instruction.skipContentProcessing = true; } return node; diff --git a/dist/aurelia-templating.js b/dist/aurelia-templating.js index 969057c9..ede0f512 100644 --- a/dist/aurelia-templating.js +++ b/dist/aurelia-templating.js @@ -3528,6 +3528,8 @@ export class ViewCompiler { auTargetID = makeIntoInstructionTarget(node); instructions[auTargetID] = TargetInstruction.lifting(parentInjectorId, liftingInstruction); } else { + let skipContentProcessing = false; + if (expressions.length || behaviorInstructions.length) { injectorId = behaviorInstructions.length ? getNextInjectorId() : false; @@ -3535,6 +3537,7 @@ export class ViewCompiler { instruction = behaviorInstructions[i]; instruction.type.compile(this, resources, node, instruction, parentNode); providers.push(instruction.type.target); + skipContentProcessing = skipContentProcessing || instruction.skipContentProcessing; } for (i = 0, ii = expressions.length; i < ii; ++i) { @@ -3555,7 +3558,7 @@ export class ViewCompiler { ); } - if (elementInstruction && elementInstruction.skipContentProcessing) { + if (skipContentProcessing) { return node.nextSibling; } @@ -3921,6 +3924,8 @@ class ProxyViewFactory { } } +let auSlotBehavior = null; + /** * Controls the view resource loading pipeline. */ @@ -3947,8 +3952,12 @@ export class ViewEngine { this.appResources = appResources; this._pluginMap = {}; - let auSlotBehavior = new HtmlBehaviorResource(); - auSlotBehavior.attributeName = 'au-slot'; + if (auSlotBehavior === null) { + auSlotBehavior = new HtmlBehaviorResource(); + auSlotBehavior.attributeName = 'au-slot'; + metadata.define(metadata.resource, auSlotBehavior, SlotCustomAttribute); + } + auSlotBehavior.initialize(container, SlotCustomAttribute); auSlotBehavior.register(appResources); } @@ -4989,6 +4998,8 @@ export class HtmlBehaviorResource { } else { instruction.skipContentProcessing = true; } + } else if (!this.processContent(compiler, resources, node, instruction)) { + instruction.skipContentProcessing = true; } return node; diff --git a/dist/commonjs/aurelia-templating.js b/dist/commonjs/aurelia-templating.js index 8b220dd6..6a0c0716 100644 --- a/dist/commonjs/aurelia-templating.js +++ b/dist/commonjs/aurelia-templating.js @@ -2809,6 +2809,8 @@ var ViewCompiler = exports.ViewCompiler = (_dec7 = (0, _aureliaDependencyInjecti auTargetID = makeIntoInstructionTarget(node); instructions[auTargetID] = TargetInstruction.lifting(parentInjectorId, liftingInstruction); } else { + var skipContentProcessing = false; + if (expressions.length || behaviorInstructions.length) { injectorId = behaviorInstructions.length ? getNextInjectorId() : false; @@ -2816,6 +2818,7 @@ var ViewCompiler = exports.ViewCompiler = (_dec7 = (0, _aureliaDependencyInjecti instruction = behaviorInstructions[i]; instruction.type.compile(this, resources, node, instruction, parentNode); providers.push(instruction.type.target); + skipContentProcessing = skipContentProcessing || instruction.skipContentProcessing; } for (i = 0, ii = expressions.length; i < ii; ++i) { @@ -2829,7 +2832,7 @@ var ViewCompiler = exports.ViewCompiler = (_dec7 = (0, _aureliaDependencyInjecti instructions[auTargetID] = TargetInstruction.normal(injectorId, parentInjectorId, providers, behaviorInstructions, expressions, elementInstruction); } - if (elementInstruction && elementInstruction.skipContentProcessing) { + if (skipContentProcessing) { return node.nextSibling; } @@ -3148,6 +3151,8 @@ var ProxyViewFactory = function () { return ProxyViewFactory; }(); +var auSlotBehavior = null; + var ViewEngine = exports.ViewEngine = (_dec8 = (0, _aureliaDependencyInjection.inject)(_aureliaLoader.Loader, _aureliaDependencyInjection.Container, ViewCompiler, ModuleAnalyzer, ViewResources), _dec8(_class14 = (_temp4 = _class15 = function () { function ViewEngine(loader, container, viewCompiler, moduleAnalyzer, appResources) { @@ -3159,8 +3164,12 @@ var ViewEngine = exports.ViewEngine = (_dec8 = (0, _aureliaDependencyInjection.i this.appResources = appResources; this._pluginMap = {}; - var auSlotBehavior = new HtmlBehaviorResource(); - auSlotBehavior.attributeName = 'au-slot'; + if (auSlotBehavior === null) { + auSlotBehavior = new HtmlBehaviorResource(); + auSlotBehavior.attributeName = 'au-slot'; + _aureliaMetadata.metadata.define(_aureliaMetadata.metadata.resource, auSlotBehavior, SlotCustomAttribute); + } + auSlotBehavior.initialize(container, SlotCustomAttribute); auSlotBehavior.register(appResources); } @@ -4027,6 +4036,8 @@ var HtmlBehaviorResource = exports.HtmlBehaviorResource = function () { } else { instruction.skipContentProcessing = true; } + } else if (!this.processContent(compiler, resources, node, instruction)) { + instruction.skipContentProcessing = true; } return node; diff --git a/dist/es2015/aurelia-templating.js b/dist/es2015/aurelia-templating.js index 1ccc71af..9590791b 100644 --- a/dist/es2015/aurelia-templating.js +++ b/dist/es2015/aurelia-templating.js @@ -2585,6 +2585,8 @@ export let ViewCompiler = (_dec7 = inject(BindingLanguage, ViewResources), _dec7 auTargetID = makeIntoInstructionTarget(node); instructions[auTargetID] = TargetInstruction.lifting(parentInjectorId, liftingInstruction); } else { + let skipContentProcessing = false; + if (expressions.length || behaviorInstructions.length) { injectorId = behaviorInstructions.length ? getNextInjectorId() : false; @@ -2592,6 +2594,7 @@ export let ViewCompiler = (_dec7 = inject(BindingLanguage, ViewResources), _dec7 instruction = behaviorInstructions[i]; instruction.type.compile(this, resources, node, instruction, parentNode); providers.push(instruction.type.target); + skipContentProcessing = skipContentProcessing || instruction.skipContentProcessing; } for (i = 0, ii = expressions.length; i < ii; ++i) { @@ -2605,7 +2608,7 @@ export let ViewCompiler = (_dec7 = inject(BindingLanguage, ViewResources), _dec7 instructions[auTargetID] = TargetInstruction.normal(injectorId, parentInjectorId, providers, behaviorInstructions, expressions, elementInstruction); } - if (elementInstruction && elementInstruction.skipContentProcessing) { + if (skipContentProcessing) { return node.nextSibling; } @@ -2899,6 +2902,9 @@ let ProxyViewFactory = class ProxyViewFactory { } }; + +let auSlotBehavior = null; + export let ViewEngine = (_dec8 = inject(Loader, Container, ViewCompiler, ModuleAnalyzer, ViewResources), _dec8(_class14 = (_temp4 = _class15 = class ViewEngine { constructor(loader, container, viewCompiler, moduleAnalyzer, appResources) { this.loader = loader; @@ -2908,8 +2914,12 @@ export let ViewEngine = (_dec8 = inject(Loader, Container, ViewCompiler, ModuleA this.appResources = appResources; this._pluginMap = {}; - let auSlotBehavior = new HtmlBehaviorResource(); - auSlotBehavior.attributeName = 'au-slot'; + if (auSlotBehavior === null) { + auSlotBehavior = new HtmlBehaviorResource(); + auSlotBehavior.attributeName = 'au-slot'; + metadata.define(metadata.resource, auSlotBehavior, SlotCustomAttribute); + } + auSlotBehavior.initialize(container, SlotCustomAttribute); auSlotBehavior.register(appResources); } @@ -3733,6 +3743,8 @@ export let HtmlBehaviorResource = class HtmlBehaviorResource { } else { instruction.skipContentProcessing = true; } + } else if (!this.processContent(compiler, resources, node, instruction)) { + instruction.skipContentProcessing = true; } return node; diff --git a/dist/native-modules/aurelia-templating.js b/dist/native-modules/aurelia-templating.js index 62f454e3..28b25e75 100644 --- a/dist/native-modules/aurelia-templating.js +++ b/dist/native-modules/aurelia-templating.js @@ -2772,6 +2772,8 @@ export var ViewCompiler = (_dec7 = inject(BindingLanguage, ViewResources), _dec7 auTargetID = makeIntoInstructionTarget(node); instructions[auTargetID] = TargetInstruction.lifting(parentInjectorId, liftingInstruction); } else { + var skipContentProcessing = false; + if (expressions.length || behaviorInstructions.length) { injectorId = behaviorInstructions.length ? getNextInjectorId() : false; @@ -2779,6 +2781,7 @@ export var ViewCompiler = (_dec7 = inject(BindingLanguage, ViewResources), _dec7 instruction = behaviorInstructions[i]; instruction.type.compile(this, resources, node, instruction, parentNode); providers.push(instruction.type.target); + skipContentProcessing = skipContentProcessing || instruction.skipContentProcessing; } for (i = 0, ii = expressions.length; i < ii; ++i) { @@ -2792,7 +2795,7 @@ export var ViewCompiler = (_dec7 = inject(BindingLanguage, ViewResources), _dec7 instructions[auTargetID] = TargetInstruction.normal(injectorId, parentInjectorId, providers, behaviorInstructions, expressions, elementInstruction); } - if (elementInstruction && elementInstruction.skipContentProcessing) { + if (skipContentProcessing) { return node.nextSibling; } @@ -3111,6 +3114,8 @@ var ProxyViewFactory = function () { return ProxyViewFactory; }(); +var auSlotBehavior = null; + export var ViewEngine = (_dec8 = inject(Loader, Container, ViewCompiler, ModuleAnalyzer, ViewResources), _dec8(_class14 = (_temp4 = _class15 = function () { function ViewEngine(loader, container, viewCompiler, moduleAnalyzer, appResources) { @@ -3122,8 +3127,12 @@ export var ViewEngine = (_dec8 = inject(Loader, Container, ViewCompiler, ModuleA this.appResources = appResources; this._pluginMap = {}; - var auSlotBehavior = new HtmlBehaviorResource(); - auSlotBehavior.attributeName = 'au-slot'; + if (auSlotBehavior === null) { + auSlotBehavior = new HtmlBehaviorResource(); + auSlotBehavior.attributeName = 'au-slot'; + metadata.define(metadata.resource, auSlotBehavior, SlotCustomAttribute); + } + auSlotBehavior.initialize(container, SlotCustomAttribute); auSlotBehavior.register(appResources); } @@ -3989,6 +3998,8 @@ export var HtmlBehaviorResource = function () { } else { instruction.skipContentProcessing = true; } + } else if (!this.processContent(compiler, resources, node, instruction)) { + instruction.skipContentProcessing = true; } return node; diff --git a/dist/system/aurelia-templating.js b/dist/system/aurelia-templating.js index fcd5bfe4..eaeac5c0 100644 --- a/dist/system/aurelia-templating.js +++ b/dist/system/aurelia-templating.js @@ -3,7 +3,7 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia-path', 'aurelia-loader', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-task-queue'], function (_export, _context) { "use strict"; - var LogManager, metadata, Origin, protocol, DOM, PLATFORM, FEATURE, relativeToFile, TemplateRegistryEntry, Loader, inject, Container, resolver, Binding, createOverrideContext, ValueConverterResource, BindingBehaviorResource, subscriberCollection, bindingMode, ObserverLocator, EventManager, TaskQueue, _createClass, _class, _temp, _dec, _class2, _dec2, _class3, _dec3, _class4, _dec4, _class5, _dec5, _class6, _class7, _temp2, _dec6, _class8, _class9, _temp3, _class11, _dec7, _class13, _dec8, _class14, _class15, _temp4, _dec9, _class16, _dec10, _class17, _dec11, _class18, _typeof, animationEvent, Animator, CompositionTransactionNotifier, CompositionTransactionOwnershipToken, CompositionTransaction, capitalMatcher, ViewEngineHooksResource, ElementEvents, ResourceLoadContext, ViewCompileInstruction, BehaviorInstruction, TargetInstruction, viewStrategy, RelativeViewStrategy, ConventionalViewStrategy, NoViewStrategy, TemplateRegistryViewStrategy, InlineViewStrategy, ViewLocator, BindingLanguage, noNodes, SlotCustomAttribute, PassThroughSlot, ShadowSlot, ShadowDOM, ViewResources, View, ViewSlot, ProviderResolver, providerResolverInstance, BoundViewFactory, ViewFactory, nextInjectorId, lastAUTargetID, ViewCompiler, ResourceModule, ResourceDescription, ModuleAnalyzer, logger, ProxyViewFactory, ViewEngine, Controller, BehaviorPropertyObserver, BindableProperty, lastProviderId, HtmlBehaviorResource, ChildObserver, noMutations, ChildObserverBinder, SwapStrategies, CompositionEngine, ElementConfigResource, defaultShadowDOMOptions, TemplatingEngine; + var LogManager, metadata, Origin, protocol, DOM, PLATFORM, FEATURE, relativeToFile, TemplateRegistryEntry, Loader, inject, Container, resolver, Binding, createOverrideContext, ValueConverterResource, BindingBehaviorResource, subscriberCollection, bindingMode, ObserverLocator, EventManager, TaskQueue, _createClass, _class, _temp, _dec, _class2, _dec2, _class3, _dec3, _class4, _dec4, _class5, _dec5, _class6, _class7, _temp2, _dec6, _class8, _class9, _temp3, _class11, _dec7, _class13, _dec8, _class14, _class15, _temp4, _dec9, _class16, _dec10, _class17, _dec11, _class18, _typeof, animationEvent, Animator, CompositionTransactionNotifier, CompositionTransactionOwnershipToken, CompositionTransaction, capitalMatcher, ViewEngineHooksResource, ElementEvents, ResourceLoadContext, ViewCompileInstruction, BehaviorInstruction, TargetInstruction, viewStrategy, RelativeViewStrategy, ConventionalViewStrategy, NoViewStrategy, TemplateRegistryViewStrategy, InlineViewStrategy, ViewLocator, BindingLanguage, noNodes, SlotCustomAttribute, PassThroughSlot, ShadowSlot, ShadowDOM, ViewResources, View, ViewSlot, ProviderResolver, providerResolverInstance, BoundViewFactory, ViewFactory, nextInjectorId, lastAUTargetID, ViewCompiler, ResourceModule, ResourceDescription, ModuleAnalyzer, logger, ProxyViewFactory, auSlotBehavior, ViewEngine, Controller, BehaviorPropertyObserver, BindableProperty, lastProviderId, HtmlBehaviorResource, ChildObserver, noMutations, ChildObserverBinder, SwapStrategies, CompositionEngine, ElementConfigResource, defaultShadowDOMOptions, TemplatingEngine; @@ -3239,6 +3239,8 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia- auTargetID = makeIntoInstructionTarget(node); instructions[auTargetID] = TargetInstruction.lifting(parentInjectorId, liftingInstruction); } else { + var skipContentProcessing = false; + if (expressions.length || behaviorInstructions.length) { injectorId = behaviorInstructions.length ? getNextInjectorId() : false; @@ -3246,6 +3248,7 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia- instruction = behaviorInstructions[i]; instruction.type.compile(this, resources, node, instruction, parentNode); providers.push(instruction.type.target); + skipContentProcessing = skipContentProcessing || instruction.skipContentProcessing; } for (i = 0, ii = expressions.length; i < ii; ++i) { @@ -3259,7 +3262,7 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia- instructions[auTargetID] = TargetInstruction.normal(injectorId, parentInjectorId, providers, behaviorInstructions, expressions, elementInstruction); } - if (elementInstruction && elementInstruction.skipContentProcessing) { + if (skipContentProcessing) { return node.nextSibling; } @@ -3578,6 +3581,8 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia- return ProxyViewFactory; }(); + auSlotBehavior = null; + _export('ViewEngine', ViewEngine = (_dec8 = inject(Loader, Container, ViewCompiler, ModuleAnalyzer, ViewResources), _dec8(_class14 = (_temp4 = _class15 = function () { function ViewEngine(loader, container, viewCompiler, moduleAnalyzer, appResources) { @@ -3589,8 +3594,12 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia- this.appResources = appResources; this._pluginMap = {}; - var auSlotBehavior = new HtmlBehaviorResource(); - auSlotBehavior.attributeName = 'au-slot'; + if (auSlotBehavior === null) { + auSlotBehavior = new HtmlBehaviorResource(); + auSlotBehavior.attributeName = 'au-slot'; + metadata.define(metadata.resource, auSlotBehavior, SlotCustomAttribute); + } + auSlotBehavior.initialize(container, SlotCustomAttribute); auSlotBehavior.register(appResources); } @@ -4438,6 +4447,8 @@ System.register(['aurelia-logging', 'aurelia-metadata', 'aurelia-pal', 'aurelia- } else { instruction.skipContentProcessing = true; } + } else if (!this.processContent(compiler, resources, node, instruction)) { + instruction.skipContentProcessing = true; } return node; diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 80284ee8..438a9fcd 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,19 @@ + +# [1.6.0](https://github.com/aurelia/templating/compare/1.5.0...v1.6.0) (2017-10-16) + + +### Bug Fixes + +* **view-engine:** define metadata for SlotCustomAttribute ([e3474bb](https://github.com/aurelia/templating/commit/e3474bb)), closes [#566](https://github.com/aurelia/templating/issues/566) +* **view-engine:** singleton instance of auSlotBehavior ([c08db20](https://github.com/aurelia/templating/commit/c08db20)) + + +### Features + +* **html-behavior:** enable processContent via custom attributes ([7096e66](https://github.com/aurelia/templating/commit/7096e66)) + + + # [1.5.0](https://github.com/aurelia/templating/compare/1.4.2...v1.5.0) (2017-10-02) diff --git a/package.json b/package.json index 09e8195c..356913c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-templating", - "version": "1.5.0", + "version": "1.6.0", "description": "An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.", "keywords": [ "aurelia",